[
  {
    "path": ".cargo/config.toml",
    "content": "[alias]\nxtask = \"run --package xtask --\"\n\n[env]\n# To provide an anchor to the root of the workspace when working with paths.\n# See https://github.com/rust-lang/cargo/issues/3946#issuecomment-973132993\nCARGO_WORKSPACE_DIR = { value = \"\", relative = true }\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "# Translations\npo/ar.po @younies\npo/bn.po @mirwasi @sudiptachatterjee\npo/da.po @mgeisler @voss @thedataking\npo/de.po @ronaldfw @fechu\npo/el.po @Mandragorian\npo/es.po @deavid @vzz1x2\npo/fa.po @DannyRavi @hamidrezakp @moaminsharifi @mehrad77 @javad-jafari\npo/fr.po @sakex\npo/it.po @detro @nicomazz\npo/ja.po @keiichiw @chikoski @kantasv @HidenoriKobayashi\npo/ko.po @jiyongp @jooyunghan @namhyung\npo/pl.po @jkotur @dyeroshenko\npo/pt-BR.po @rastringer @hugojacob @henrif75 @joaovicmendes @azevedoalice\npo/ro.po @AlexandraImbrisca @razvanm\npo/ru.po @istolga @baltuky @zvonden @dyeroshenko\npo/tr.po @alerque @Enes1313 @rexoplans1\npo/uk.po @dyeroshenko\npo/vi.po @daivinhtran @qu-ngx\npo/zh-CN.po @wnghl @anlunx @kongy @noahdragon @superwhd @emmali01 @candysonya @AgainstEntropy\npo/zh-TW.po @edong @hueich @kuanhungchen @victorhsieh @mingyc\n\n# Dependency changes (mostly dependabot PRs)\nCargo.toml @djmitche @mgeisler @qwandor\nCargo.lock @djmitche @mgeisler @qwandor\nsrc/bare-metal/alloc-example/Cargo.toml @djmitche @mgeisler @qwandor\nsrc/bare-metal/alloc-example/Cargo.lock @djmitche @mgeisler @qwandor\nsrc/bare-metal/aps/examples/Cargo.toml @djmitche @mgeisler @qwandor\nsrc/bare-metal/aps/examples/Cargo.lock @djmitche @mgeisler @qwandor\nsrc/bare-metal/microcontrollers/examples/Cargo.toml @djmitche @mgeisler @qwandor\nsrc/bare-metal/microcontrollers/examples/Cargo.lock @djmitche @mgeisler @qwandor\nsrc/exercises/bare-metal/compass/Cargo.toml @djmitche @mgeisler @qwandor\nsrc/exercises/bare-metal/compass/Cargo.lock @djmitche @mgeisler @qwandor\nsrc/exercises/bare-metal/rtc/Cargo.toml @djmitche @mgeisler @qwandor\nsrc/exercises/bare-metal/rtc/Cargo.lock @djmitche @mgeisler @qwandor\n.github/workflows @djmitche @mgeisler @qwandor\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# Please see the documentation for all configuration options:\n# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\n\nversion: 2\nupdates:\n  - package-ecosystem: cargo\n    directory: /\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: cargo\n    directory: /src/bare-metal/alloc-example/\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: cargo\n    directory: /src/bare-metal/aps/examples/\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: cargo\n    directory: /src/bare-metal/microcontrollers/examples/\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: cargo\n    directory: /src/exercises/bare-metal/compass/\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: cargo\n    directory: /src/exercises/bare-metal/rtc/\n    schedule:\n      interval: monthly\n    commit-message:\n      prefix: cargo\n    groups:\n      minor:\n        update-types:\n          - minor\n      patch:\n        update-types:\n          - patch\n  - package-ecosystem: github-actions\n    directory: /\n    schedule:\n      interval: monthly\n"
  },
  {
    "path": ".github/labeler.yml",
    "content": "translation:\n  - changed-files:\n      - any-glob-to-any-file: po/*.po\n\n\"translation/ar\":\n  - changed-files:\n      - any-glob-to-any-file: po/ar.po\n\n\"translation/bn\":\n  - changed-files:\n      - any-glob-to-any-file: po/bn.po\n\n\"translation/da\":\n  - changed-files:\n      - any-glob-to-any-file: po/da.po\n\n\"translation/de\":\n  - changed-files:\n      - any-glob-to-any-file: po/de.po\n\n\"translation/el\":\n  - changed-files:\n      - any-glob-to-any-file: po/el.po\n\n\"translation/es\":\n  - changed-files:\n      - any-glob-to-any-file: po/es.po\n\n\"translation/fa\":\n  - changed-files:\n      - any-glob-to-any-file: po/fa.po\n\n\"translation/fr\":\n  - changed-files:\n      - any-glob-to-any-file: po/fr.po\n\n\"translation/id\":\n  - changed-files:\n      - any-glob-to-any-file: po/id.po\n\n\"translation/it\":\n  - changed-files:\n      - any-glob-to-any-file: po/it.po\n\n\"translation/ja\":\n  - changed-files:\n      - any-glob-to-any-file: po/ja.po\n\n\"translation/ko\":\n  - changed-files:\n      - any-glob-to-any-file: po/ko.po\n\n\"translation/pl\":\n  - changed-files:\n      - any-glob-to-any-file: po/pl.po\n\n\"translation/pt-BR\":\n  - changed-files:\n      - any-glob-to-any-file: po/pt-BR.po\n\n\"translation/ro\":\n  - changed-files:\n      - any-glob-to-any-file: po/ro.po\n\n\"translation/ru\":\n  - changed-files:\n      - any-glob-to-any-file: po/ru.po\n\n\"translation/tr\":\n  - changed-files:\n      - any-glob-to-any-file: po/tr.po\n\n\"translation/uk\":\n  - changed-files:\n      - any-glob-to-any-file: po/uk.po\n\n\"translation/vi\":\n  - changed-files:\n      - any-glob-to-any-file: po/vi.po\n\n\"translation/zh-CN\":\n  - changed-files:\n      - any-glob-to-any-file: po/zh-CN.po\n\n\"translation/zh-TW\":\n  - changed-files:\n      - any-glob-to-any-file: po/zh-TW.po\n"
  },
  {
    "path": ".github/pandoc/README.md",
    "content": "# Config Overrides for `mdbook-pandoc`\n\nThe configuration file fragments here are used to override the configuration in\n`book.toml`. See `.github/workflows/build.sh` for details.\n"
  },
  {
    "path": ".github/pandoc/ja.yaml",
    "content": "variables:\n  CJKmainfont: \"Noto Serif CJK JP\"\n  CJKsansfont: \"Noto Sans CJK JP\"\n  CJKmonofont: \"Noto Sans Mono CJK JP\"\n"
  },
  {
    "path": ".github/pandoc/ko.yaml",
    "content": "variables:\n  CJKmainfont: \"Noto Serif CJK KR\"\n  CJKsansfont: \"Noto Sans CJK KR\"\n  CJKmonofont: \"Noto Sans Mono CJK KR\"\n"
  },
  {
    "path": ".github/pandoc/zh-CN.yaml",
    "content": "variables:\n  CJKmainfont: \"Noto Serif CJK SC\"\n  CJKsansfont: \"Noto Sans CJK SC\"\n  CJKmonofont: \"Noto Sans Mono CJK SC\"\n"
  },
  {
    "path": ".github/pandoc/zh-TW.yaml",
    "content": "variables:\n  CJKmainfont: \"Noto Serif CJK TC\"\n  CJKsansfont: \"Noto Sans CJK TC\"\n  CJKmonofont: \"Noto Sans Mono CJK TC\"\n"
  },
  {
    "path": ".github/typos.toml",
    "content": "[default.extend-identifiers]\n# False positives.\nmis = \"mis\"\nMIS = \"MIS\"\ninout = \"inout\"\nesource = \"esource\"\nBARs = \"BARs\"\n\n[type.po]\n# Localized content should not be checked for typos. English\n# in these files should be validated manually.\nextend-glob = [\"*.po\"]\ncheck-file = false\n\n[files]\n# Typos in third party packages should be fixed upstream.\nextend-exclude = [\"third_party/*\", \"theme/book.js\"]\n"
  },
  {
    "path": ".github/workflows/apt-get-install/action.yml",
    "content": "name: Setup Apt and Install Packages\ndescription: Configures apt, runs update once per job, and installs packages.\n\ninputs:\n  packages:\n    description: A space-separated list of packages to install.\n    required: true\n\nruns:\n  using: composite\n  steps:\n    - name: Configure dpkg and apt for CI\n      shell: bash\n      run: |\n        # Avoid time-consuming man-db updates.\n        sudo tee /etc/dpkg/dpkg.cfg.d/99-no-doc > /dev/null <<EOF\n        path-exclude /usr/share/doc/*\n        path-exclude /usr/share/man/*\n        path-exclude /usr/share/info/*\n        EOF\n\n        # Exclude translations.\n        sudo tee /etc/apt/apt.conf.d/99-no-translations > /dev/null <<EOF\n        Acquire::Languages \"none\";\n        EOF\n\n        # Exclude command-not-found utility.\n        sudo rm -f /etc/apt/apt.conf.d/50command-not-found\n\n        # Remove unnecessary repository lists (we don't install Azure\n        # utilities)\n        sudo rm -f /etc/apt/sources.list.d/microsoft-prod.* /etc/apt/sources.list.d/azure-cli.*\n\n    - name: Run apt-get update\n      if: env.APT_UPDATED != 'true'\n      shell: bash\n      run: |\n        sudo apt-get update\n        echo \"APT_UPDATED=true\" >> $GITHUB_ENV\n\n    - name: Installing ${{ inputs.packages }}\n      shell: bash\n      run: |\n        sudo apt-get install --quiet --yes --no-install-recommends ${{ inputs.packages }}\n"
  },
  {
    "path": ".github/workflows/build.sh",
    "content": "#!/usr/bin/env bash\nset -Eeuo pipefail\n\n# Usage: build.sh <book-lang> <dest-dir>\n#\n# Build the course as of the date specified specified in the\n# POT-Creation-Date header of po/$book_lang.po. The output can be\n# found in $dest_dir.\n#\n# The src/ and third_party/ directories are left in a dirty state so\n# you can run `mdbook test` and other commands afterwards.\n#\n# See also TRANSLATIONS.md.\n\nbook_lang=${1:?\"Usage: $0 <book-lang> <dest-dir>\"}\ndest_dir=${2:?\"Usage: $0 <book-lang> <dest-dir>\"}\n\nif [ \"$book_lang\" = \"en\" ]; then\n    echo \"::group::Building English course\"\nelse\n    pot_creation_date=$(grep --max-count 1 '^\"POT-Creation-Date:' \"po/$book_lang.po\" | sed -E 's/\".*: (.*)\\\\n\"/\\1/')\n    pot_creation_date=${pot_creation_date:-now}\n    echo \"::group::Building $book_lang translation as of $pot_creation_date\"\n\n    # Back-date the sources to POT-Creation-Date. The content lives in two\n    # directories:\n    rm -r src/ third_party/\n    git restore --source \"$(git rev-list -n 1 --before \"$pot_creation_date\" @)\" src/ third_party/ book.toml\n    # Set language and adjust site URL. Clear the redirects since they are\n    # in sync with the source files, not the translation.\n    export MDBOOK_BOOK__LANGUAGE=$book_lang\n    export MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$book_lang/\n    export MDBOOK_OUTPUT__HTML__REDIRECT='{}'\n\n    # Include language-specific Pandoc configuration\n    if [ -f \".github/pandoc/$book_lang.yaml\" ]; then\n        export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS=\".github/pandoc/$book_lang.yaml\"\n    fi\nfi\n\n# Enable mdbook-pandoc to build PDF version of the course\nexport MDBOOK_OUTPUT__PANDOC__DISABLED=false\n\nmdbook build -d \"$dest_dir\"\n\nmv \"$dest_dir/pandoc/pdf/comprehensive-rust.pdf\" \"$dest_dir/html/\"\n(cd \"$dest_dir/exerciser\" && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)\n\necho \"::endgroup::\"\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Test\npermissions:\n  contents: read\n\non:\n  pull_request:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n\nenv:\n  CARGO_TERM_COLOR: always\n\njobs:\n  cargo:\n    strategy:\n      matrix:\n        os:\n          - ubuntu-latest\n          - macos-latest\n    runs-on: ${{ matrix.os }}\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Update Rust\n        run: rustup update\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n\n      - name: Build Rust code\n        run: cargo build\n\n      - name: Test Rust code\n        run: cargo test\n\n  bare-metal:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        include:\n          - directory: src/bare-metal/alloc-example\n            target: aarch64-unknown-none\n          - directory: src/bare-metal/aps/examples\n            target: aarch64-unknown-none\n          - directory: src/bare-metal/microcontrollers/examples\n            target: thumbv7em-none-eabihf\n          - directory: src/exercises/bare-metal/compass\n            target: thumbv7em-none-eabihf\n          - directory: src/exercises/bare-metal/rtc\n            target: aarch64-unknown-none\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Install toolchain\n        run: |\n          rustup update\n          rustup target add ${{ matrix.target }}\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n\n      - name: Install dependencies\n        uses: ./.github/workflows/apt-get-install\n        with:\n          packages: gcc-aarch64-linux-gnu\n\n      - name: Build Rust code\n        working-directory: ${{ matrix.directory }}\n        run: cargo build\n\n  find-languages:\n    runs-on: ubuntu-latest\n    outputs:\n      languages: ${{ steps.find-languages.outputs.languages }}\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Find languages\n        id: find-languages\n        shell: python\n        run: |\n          import os, json, pathlib\n          languages = [\"en\"] + [p.stem for p in pathlib.Path(\"po\").iterdir() if p.suffix == \".po\"]\n          github_output = open(os.environ[\"GITHUB_OUTPUT\"], \"a\")\n          github_output.write(\"languages=\")\n          json.dump(sorted(languages), github_output)\n\n  build:\n    runs-on: ubuntu-latest\n    needs:\n      - find-languages\n    strategy:\n      matrix:\n        language: ${{ fromJSON(needs.find-languages.outputs.languages) }}\n      fail-fast: false\n    env:\n      # Opt-in for checking links in translations - add the language below.\n      LINK_CHECKED_LANGUAGES: '[\"en\", \"fa\"]'\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0 # We need the full history for build.sh below.\n\n      - name: Update Rust\n        run: rustup update\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n        with:\n          key: ${{ contains(fromJSON(env.LINK_CHECKED_LANGUAGES), matrix.language) }}\n\n      - name: Install dependencies\n        uses: ./.github/workflows/apt-get-install\n        with:\n          packages: gettext\n\n      - name: Install mdbook\n        uses: ./.github/workflows/install-mdbook\n\n      - name: Test format of ${{ matrix.language }} translation\n        if: matrix.language != 'en'\n        run: msgfmt --statistics -o /dev/null po/${{ matrix.language }}.po\n\n      - name: Test extracting English strings\n        if: matrix.language == 'en'\n        run: |\n          MDBOOK_OUTPUT='{\"xgettext\": {\"pot-file\": \"messages.pot\"}}' mdbook build -d po\n          msgfmt -o /dev/null --statistics po/messages.pot\n\n      - name: Build ${{ matrix.language }} translation\n        run: |\n          .github/workflows/build.sh ${{ matrix.language }} book/comprehensive-rust-${{ matrix.language }}\n\n      # Upload the book now to retain it in case mdbook test fails.\n      - name: Upload book\n        uses: actions/upload-artifact@v7\n        with:\n          name: comprehensive-rust-${{ matrix.language }}\n          path: book/\n\n      - name: Test code snippets\n        env:\n          MDBOOK_BOOK__LANGUAGE: ${{ matrix.language }}\n        run: mdbook test\n\n  web-tests:\n    runs-on: ubuntu-latest\n    needs: build\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: 22\n          cache: \"npm\"\n          cache-dependency-path: \"tests/package-lock.json\"\n      - name: Install test framework\n        run: npm install\n        working-directory: ./tests\n      - name: Download english book\n        uses: actions/download-artifact@v8\n        with:\n          name: comprehensive-rust-en\n          path: book/\n      - name: Test Javascript\n        run: cargo xtask web-tests --dir book/comprehensive-rust-en/html\n\n  po-diff:\n    name: Translation diff\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Update Rust\n        run: rustup update\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n\n      - name: Install mdbook\n        uses: ./.github/workflows/install-mdbook\n\n      - name: Copy latest version of translations\n        run: cp -r po new-po\n\n      - name: Checkout base version\n        run: git checkout ${{ github.event.pull_request.base.sha }}\n\n      - name: Translation diff\n        run: i18n-report diff po/ new-po/ > $GITHUB_STEP_SUMMARY\n"
  },
  {
    "path": ".github/workflows/check-msgid-changes.py",
    "content": "# Copyright 2023 Google LLC\n# SPDX-License-Identifier: Apache-2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Find changed msgid fields without a change in POT-Creation-Date.\n\nWhen following the instructions in\nhttps://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md,\none of two things should happen:\n\n- The `msgid` fields change because `msgmerge --update` was used. This\n  will also update the POT-Creation-Date field since a new timestamp\n  is merged in from the messages.pot file.\n\n- Translations are added or updated. This should not change the\n  `msgid` fields: only the `msgstr` fields should change. If the PO\n  editor being used inadvertently changes the wrapping of both `msgid`\n  and `msgstr` fields, then `dprint fmt` can be used to normalize them\n  all.\n\nThe code here detects if both of these happen at the same time: if one\nor more `msgid` fields changed without a corresponding change to the\nPOT-Creation-Date field. If this happens, the translator should fix it\nby running:\n\n  dprint fmt\n\nCommit and push to the branch again.\n\"\"\"\n\nimport os\n\n# TODO: move the `git reset` from the action code to here. Infact, we\n# should be able to determine this with read-only operations.\n\n# TODO: use Git plumbing commands instead of porcelain, see\n# https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git.html.\nfor filename in os.popen(\"git diff --name-only\").read().split():\n    if not filename.endswith(\".po\"):\n        continue\n\n    # If POT-Creation-Date has changed, then we assume that the commit\n    # is the result of `msgmerge --update`. It is expected that the\n    # `msgid` fields change when `msgmerge` is run, so there is\n    # nothing to check.\n    if \"POT-Creation-Date\" in os.popen(\n            f\"git diff --unified=0 {filename}\").read():\n        print(\n            f\"Assuming {filename} was changed automatically, skipping msgid check\"\n        )\n        continue\n\n    changed_lines = {\n        i + 1\n        for i, line in enumerate(\n            os.popen(f\"git blame {filename}\").readlines())\n        if line.startswith(\"00000000\")\n    }\n\n    # Look for a changed line between `msgid` and `msgstr`.\n    saw_msgid = False\n    with open(filename, \"r\") as f:\n        line = f.readline()\n        line_number = 1\n\n        while line:\n            if line.startswith(\"msgid\"):\n                saw_msgid = True\n            elif line.startswith(\"msgstr\"):\n                saw_msgid = False\n\n            if saw_msgid and line_number in changed_lines:\n                print(f\"Changed msgid in file {filename}:{line_number}!\")\n                print(\n                    \"Please read https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md#creating-and-updating-translations.\"\n                )\n                exit(1)\n\n            line_number += 1\n            line = f.readline()\n"
  },
  {
    "path": ".github/workflows/check-msgid-changes.yml",
    "content": "name: Prevent unintended msgid changes\npermissions:\n  contents: read\n\non:\n  pull_request:\n    paths:\n      - \"po/*.po\"\n\njobs:\n  check-msgid-changes:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Reset git\n        run: git reset origin/main\n\n      - name: Check po file changes\n        run: python3 .github/workflows/check-msgid-changes.py\n"
  },
  {
    "path": ".github/workflows/install-mdbook/action.yml",
    "content": "name: Install mdbook and dependencies\n\ndescription: Install mdbook with the dependencies we need.\n\nruns:\n  using: composite\n  steps:\n    - name: Ensure cargo-binstall is installed\n      uses: cargo-bins/cargo-binstall@main\n\n    - name: Install mdbook\n      run: cargo xtask install-tools --binstall\n      shell: bash\n\n    - name: Install mdbook-pandoc dependencies\n      uses: ./.github/workflows/apt-get-install\n      with:\n        packages: >\n          fonts-noto\n          fonts-noto-cjk\n          fonts-noto-color-emoji\n          fonts-noto-extra\n          fonts-symbola\n          librsvg2-bin\n          texlive\n          texlive-fonts-recommended\n          texlive-lang-arabic\n          texlive-lang-cjk\n          texlive-lang-japanese\n          texlive-luatex\n\n    - name: Install mdbook-pandoc\n      run: |\n        curl -LsSf https://github.com/jgm/pandoc/releases/download/3.7.0.1/pandoc-3.7.0.1-linux-amd64.tar.gz | tar zxf -\n        echo \"$PWD/pandoc-3.7.0.1/bin\" >> $GITHUB_PATH\n      shell: bash\n"
  },
  {
    "path": ".github/workflows/labeler.yml",
    "content": "name: \"Pull Request Labeler\"\non:\n  - pull_request_target\n\njobs:\n  triage:\n    permissions:\n      contents: read\n      pull-requests: write\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/labeler@v6\n        with:\n          sync-labels: true\n"
  },
  {
    "path": ".github/workflows/lint.yml",
    "content": "name: Lint\npermissions:\n  contents: read\n\non:\n  pull_request:\n  push:\n    branches:\n      - main\n\nenv:\n  CARGO_TERM_COLOR: always\n\njobs:\n  clippy:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n\n      - name: Clippy\n        run: cargo clippy -- -Dwarnings\n\n  format:\n    runs-on: ubuntu-latest\n    env:\n      NIGHTLY_VERSION: nightly-2025-09-01\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Install formatting dependencies\n        uses: ./.github/workflows/apt-get-install\n        with:\n          packages: gettext yapf3\n\n      - name: Install pinned nightly for rustfmt\n        run: |\n          rustup toolchain install --profile minimal \"$NIGHTLY_VERSION\"\n          rustup component add rustfmt --toolchain \"$NIGHTLY_VERSION\"\n\n      - name: Check formatting\n        uses: dprint/check@v2.3\n\n  typos:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Check for typos\n        uses: crate-ci/typos@v1.44.0\n        with:\n          config: ./.github/typos.toml\n"
  },
  {
    "path": ".github/workflows/publish.yml",
    "content": "name: Publish\n\n# See also TRANSLATIONS.md.\n\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n\n# Allow one concurrent deployment\nconcurrency:\n  group: pages\n  cancel-in-progress: true\n\nenv:\n  CARGO_TERM_COLOR: always\n  # Update the language picker in index.hbs to link new languages.\n  LANGUAGES: ar bn da de el es fa fr id it ja ko pl pt-BR ro ru tr uk vi zh-CN zh-TW\n\njobs:\n  publish:\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0 # We need the full history for build.sh below.\n\n      - name: Update Rust\n        run: rustup update\n\n      - name: Setup Rust cache\n        uses: ./.github/workflows/setup-rust-cache\n\n      - name: Install Gettext\n        uses: ./.github/workflows/apt-get-install\n        with:\n          packages: gettext\n\n      - name: Install mdbook\n        uses: ./.github/workflows/install-mdbook\n\n      - name: Build course in English\n        run: .github/workflows/build.sh en book\n\n      - name: Build all translations\n        run: |\n          for po_lang in ${{ env.LANGUAGES }}; do\n              .github/workflows/build.sh $po_lang book/$po_lang\n              mv book/$po_lang/html book/html/$po_lang\n          done\n\n      - name: Build translation report\n        run: i18n-report report book/html/translation-report.html po/*.po\n\n      - name: Build synced translation report\n        run: |\n          cp -r po synced-po\n          MDBOOK_OUTPUT='{\"xgettext\": {\"pot-file\": \"messages.pot\", \"granularity\": 0}}' mdbook build -d synced-po\n          for file in synced-po/*.po; do msgmerge --update $file synced-po/messages.pot ; done\n          i18n-report report book/html/synced-translation-report.html synced-po/*.po\n\n      - name: Setup Pages\n        uses: actions/configure-pages@v5\n\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v4\n        with:\n          path: book/html\n\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v4\n"
  },
  {
    "path": ".github/workflows/setup-rust-cache/action.yml",
    "content": "name: Setup Rust cache\n\ndescription: Configure the rust-cache workflow.\n\ninputs:\n  key:\n    description: Additional caching key\n    required: false\n    default:\n\nruns:\n  using: composite\n  steps:\n    - name: Setup Rust cache\n      uses: Swatinem/rust-cache@v2\n      with:\n        # Only save the cache on the main branch to avoid PRs filling\n        # up the cache.\n        save-if: ${{ github.ref == 'refs/heads/main' }}\n        # Further, save the cache per key - e.g. language grouping.\n        key: ${{ inputs.key }}\n"
  },
  {
    "path": ".gitignore",
    "content": "# Build artifacts\n/book/\ntarget/\n*.bin\n\n# Translation artifacts\npo/*.mo\npo/*.po~\n\n# macOS artifacts\n.DS_Store\n\n# Jetbrains IDEs project files\n.idea/\n.iml\n.iws\ncount.dat\n\n# Nodejs Files (dprint)\nnode_modules/\npackage.json\n!tests/package.json\npnpm-lock.yaml\n\n# Crowdin Config (Contains API Keys)\ncrowdin.yml\n\n# Google's Project IDX files and VSCode\n.idx/\n.vscode/\n\n# Python virtualenv (for mdbook-slide-evaluator local installation)\n.venv/\n\n# tests/ framework artifacts\ntests/src/slide/slides/slides.list.ts\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# How to Contribute\n\nWe'd love to accept your patches and contributions to this project. There are\njust a few small guidelines you need to follow.\n\nMake sure you can build the book with `mdbook build`, that `mdbook serve` works,\nand that `dprint fmt` formats the code. Please use `cargo xtask install-tools`\nto install the necessary dependencies, following the\n[instructions in the README].\n\n[instructions in the README]: README.md#building\n\n## Writing Exercises\n\nEach segment ends with an exercise. Exercises are typically structured as an\n`exercise.rs` containing the problem and solution. This is referenced from\n`exercise.md` and `solution.md`, using `{{#include exercise.rs:anchor_name}}` to\nmatch ANCHOR comments in the `exercise.rs` file. Each segment also has a\n`Cargo.toml` file containing a `[[bin]]` or `[lib]` section referring to\n`exercise.rs`, and that Cargo package is referenced from the workspace the root\n`Cargo.toml`. The result is that `exercise.rs` is built and tested by\n`cargo test`.\n\nFor segments on day 1, exercises should use `fn main() { .. }` and `dbg!` or\n`println!`, with students visually verifying the correct output. On subsequent\ndays, prefer tests and omit `fn main() { .. }`. However, where tests would be\ndifficult and visual verification is more natural (such as in the Logger\nexercise), using `fn main { .. }` is OK.\n\nEspecially for exercises without tests, consider including tests in\n`exercise.rs` that do not appear in either `exercise.md` or `solution.md`, as\nthese can ensure the solution is correct.\n\n## Testing\n\nWe test the course material in several ways:\n\n- `mdbook test`: This will test the code samples. Some code samples are marked\n  with `ignore` in the Markdown file because the Playground is missing some of\n  the crates we use. For this we have\n- `cargo test`: This will build and test the Rust code found in our tooling, as\n  well as the code samples which cannot be tested using the Playground.\n- `npm test`: This will test the functionality of the rendered web pages. See\n  the [testing README](tests/README.md) for details.\n\n## Formatting\n\nPlease ensure that your files are formatted consistently. We use a few tools for\nthis:\n\n- [`dprint`] for driving the formatting.\n- [`rustfmt`] for formatting Rust code.\n- [`yapf`] for formatting Python code.\n- [`msgcat`] for formatting PO files.\n\nRun `dprint fmt` to automatically format all files.\n\n**Note:** To make sure you have the correct version of `rustfmt` installed,\nplease run:\n\n```bash\ncargo xtask install-tools\n```\n\nThis will install the pinned nightly toolchain and add the `rustfmt` component,\nso your local formatting will match the CI.\n\n### Linux\n\nInstall `dprint` using their\n[installation instructions](https://dprint.dev/install/) and install `rustfmt`\nvia `rustup`.\n\nInstall [pandoc 3.7.0.1](https://github.com/jgm/pandoc/releases/tag/3.7.0.1).\n\nOn Debian, you can install the other tools using:\n\n```sh\nsudo apt install yapf3 gettext texlive texlive-luatex texlive-lang-cjk texlive-lang-arabic librsvg2-bin fonts-noto\n```\n\n### MacOS\n\nOn MacOS with [Homebrew], you can install the necessary tools with:\n\n```shell\nbrew install dprint yapf gettext\n```\n\n### Windows\n\nOn Windows, you can should install [Gettext tools for Windows].\n\nInstall `dprint` using their\n[installation instructions](https://dprint.dev/install/) and install `rustfmt`\nvia `rustup`.\n\n> _TODO: fill in how to install `yapf` on Windows._\n\n[`dprint`]: https://dprint.dev/\n[`rustfmt`]: https://github.com/rust-lang/rustfmt\n[`yapf`]: https://github.com/google/yapf\n[`msgcat`]: https://www.gnu.org/software/gettext/manual/html_node/msgcat-Invocation.html\n[Homebrew]: https://brew.sh/\n[Gettext tools for Windows]: https://github.com/vslavik/gettext-tools-windows/releases\n\n## Contributor License Agreement\n\nContributions to this project must be accompanied by a Contributor License\nAgreement. You (or your employer) retain the copyright to your contribution;\nthis simply gives us permission to use and redistribute your contributions as\npart of the project. Head over to <https://cla.developers.google.com/> to see\nyour current agreements on file or to sign a new one.\n\nYou generally only need to submit a CLA once, so if you've already submitted one\n(even if it was for a different project), you probably don't need to do it\nagain.\n\n## Code Reviews\n\nAll submissions, including submissions by project members, require review. We\nuse GitHub pull requests for this purpose. Consult\n[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more\ninformation on using pull requests.\n\n## Community Guidelines\n\nThis project follows\n[Google's Open Source Community Guidelines](https://opensource.google/conduct/).\n"
  },
  {
    "path": "Cargo.toml",
    "content": "[workspace]\n# Please keep the workspace members sorted.\nmembers = [\n  \"mdbook-course\",\n  \"mdbook-exerciser\",\n  \"src/android/testing\",\n  \"src/bare-metal/useful-crates/allocator-example\",\n  \"src/bare-metal/useful-crates/zerocopy-example\",\n  \"src/borrowing\",\n  \"src/concurrency/async-exercises/chat-async\",\n  \"src/concurrency/sync-exercises\",\n  \"src/control-flow-basics\",\n  \"src/error-handling\",\n  \"src/generics\",\n  \"src/iterators\",\n  \"src/lifetimes\",\n  \"src/memory-management\",\n  \"src/methods-and-traits\",\n  \"src/modules\",\n  \"src/pattern-matching\",\n  \"src/references\",\n  \"src/smart-pointers\",\n  \"src/std-traits\",\n  \"src/std-types\",\n  \"src/testing\",\n  \"src/tuples-and-arrays\",\n  \"src/types-and-values\",\n  \"src/unsafe-rust\",\n  \"src/user-defined-types\",\n  \"third_party/cxx/blobstore\",\n  \"xtask\",\n]\nresolver = \"2\"\n"
  },
  {
    "path": "GEMINI.md",
    "content": "# Project Overview\n\nThis repository contains the source code for Comprehensive Rust, a family of\ncourses on Rust developed by Google, starting with Rust foundations, and\nincluding deep dives into specialized topics like Android, Chromium, bare-metal\ndevelopment, and concurrency. The project is a Rust workspace that leverages\n`mdbook` to generate a course website.\n\n## Key Technologies\n\n- **Rust:** The primary programming language for the course subject, custom\n  tools, and examples.\n- **mdbook:** A command-line tool to create books from Markdown files, used for\n  generating the course website.\n- **Custom mdbook Preprocessors:** `mdbook-course` and `mdbook-exerciser` are\n  Rust binaries that extend `mdbook`'s functionality, for example, to extract\n  exercise starter code.\n- **`cargo xtask`:** A custom binary within the workspace used for project\n  automation, simplifying common development tasks.\n\n# Building and Running\n\nThe project uses `cargo xtask` for project-specific automation, like builds,\ntests, and managing translations.\n\n## Setup\n\n1. **Install Rust:** Follow the instructions on\n   [https://rustup.rs/](https://rustup.rs/).\n2. **Clone Repository:**\n   ```bash\n   git clone https://github.com/google/comprehensive-rust/\n   cd comprehensive-rust\n   ```\n3. **Install Project Tools:**\n   ```bash\n   cargo xtask install-tools\n   ```\n   This is a necessary first step for working with this repository. It will\n   install the correct versions of all tools used by the project.\n\n## Commands\n\nAll commands are run using `cargo xtask`. Run `cargo xtask --help` for a full\nlist of options.\n\n- **Serve the Course Locally:** Starts a web server to view the course content.\n  ```bash\n  cargo xtask serve [--language <ISO_639_language_code>] [--output <output_directory>]\n  ```\n  (e.g., `cargo xtask serve -l da` for the Danish translation)\n\n- **Build the Course:** Creates a static version of the course in the `book/`\n  directory.\n  ```bash\n  cargo xtask build [--language <ISO_639_language_code>] [--output <output_directory>]\n  ```\n\n- **Run Rust Snippet Tests:** Tests all Rust code snippets included in the\n  course material.\n  ```bash\n  cargo xtask rust-tests\n  ```\n\n- **Run Web Driver Tests:** Executes web driver tests located in the `tests/`\n  directory.\n  ```bash\n  cargo xtask web-tests [--dir <book_html_directory>]\n  ```\n\n# Development Conventions\n\n- **Project Automation:** `cargo xtask` is the primary interface for common\n  development tasks.\n- **Course Content:** Markdown files in the `src/` directory, structured\n  according to `src/SUMMARY.md`.\n- **Code Formatting:** `dprint fmt` is used to format all source files according\n  to `rustfmt.toml` and `dprint.json`. Note that you must first install the\n  project tools with `cargo xtask install-tools`.\n- **Contributions:** Refer to `CONTRIBUTING.md` for guidelines on contributing\n  to the project.\n- **Style:** Refer to `STYLE.md` for style guidelines. When making changes to\n  Markdown files in `src/`, always first read `STYLE.md` and follow its\n  conventions.\n- **GitHub Actions:** The project uses composite GitHub Actions to simplify CI\n  workflows. These actions should be preferred over hand-written commands.\n  - **`apt-get-install`:** This action efficiently installs Debian packages. It\n    configures `dpkg` and `apt` to skip documentation and translations, and\n    ensures that `apt-get update` is run only once per job. This significantly\n    speeds up CI runs.\n  - **`install-mdbook`:** A composite action to install `mdbook` and its\n    dependencies, including `pandoc` and `texlive`.\n  - **`setup-rust-cache`:** A composite action that configures the\n    `Swatinem/rust-cache` action.\n\n## Developing Exercises\n\nExercises allow students to practice what they have learned. When adding or\nupdating exercises, follow these structural conventions:\n\n- **File Structure:**\n  - `exercise.md`: Contains the problem description and a code block with\n    placeholders.\n  - `exercise.rs`: Contains the full solution code, including a license header\n    and `ANCHOR` tags to delimit sections.\n  - `solution.md`: Includes the full solution code from `exercise.rs`.\n  - `Cargo.toml`: Must define a `[[bin]]` target pointing to `exercise.rs` so\n    that the solution code is compiled and tested.\n\n- **Content Inclusion:**\n  - Use `{{#include exercise.rs:anchor_name}}` in `exercise.md` to show specific\n    parts of the code (e.g., setup, main).\n  - Use `{{#include exercise.rs:solution}}` in `solution.md` to show the\n    solution code _without_ the license header. Ensure `exercise.rs` has a\n    `// ANCHOR: solution` line before the first line of the solution. It is\n    unnecessary to add a `// ANCHOR_END: solution` line at the bottom of the\n    file.\n\n- **Testing:**\n  - Run `cargo xtask rust-tests` to ensure the solution code compiles and runs\n    correctly.\n  - Run `cargo check -p <crate_name>` to verify the specific exercise crate.\n\n## Markdown Conventions\n\n- **Headings:**\n  - **H1 (`#`):** Used for the main title of each page. Each slide has exactly\n    one title.\n  - **H2 (`##`):** Used for major sections. Slides do not use H2 headings to\n    save vertical space; more slides are created instead.\n  - **H3 (`###`):** Used for sub-sections, but not on slides.\n\n- **Emphasis:**\n  - **Bold (`**...**`):** Used to highlight key terms, commands, and for notes\n    (e.g., `**Note:**`). The colon (`:`) is included inside the bold text for\n    notes.\n  - **Italic (`_..._`):** Used for general emphasis, titles of external\n    articles, and for terms being defined.\n\n- **Code:**\n  - **Inline Code (`` `...` ``):** Used for code snippets, file names, commands,\n    type names, and language keywords. Rust fragments are formatted as `rustfmt`\n    would.\n  - **Code Blocks (`` ```...``` ``):** Fenced code blocks are used for\n    multi-line code examples, annotated with a language identifier (e.g.,\n    `rust`, `c`, `ignore`).\n  - **Interactive Code Blocks:** Rust examples are made interactive with\n    `editable`. Examples that fail to compile are marked with `compile_fail` or\n    `should_panic`.\n  - **Diagrams:** The `bob` language identifier is used in code blocks to\n    generate ASCII art diagrams.\n  - **Formatting Control:** The `#[rustfmt::skip]` attribute is used to prevent\n    `rustfmt` from formatting specific code blocks, though it is used rarely.\n\n- **Lists:**\n  - **Bulleted Lists:** Unordered lists are the primary way to lay out key\n    points on slides.\n  - **Glossary Format:** The glossary uses a specific format with a colon and\n    backslash (`:\\`) after each term to create a hard line break for visual\n    formatting.\n\n- **Other Markdown Elements:**\n  - **Block Quotes (`> ...`):** Used sparingly for important notes, warnings, or\n    supplementary information to draw attention.\n  - **Links:** Both standard (`[text](url)`) and reference-style\n    (`[text][label]`) links are used.\n  - **Tables:** Markdown tables are used to present structured data.\n  - **Horizontal Rules (`---`):** Not used on slides.\n\n- **HTML Tags:**\n  - **`<details>`:** Used for collapsible \"speaker notes\".\n  - **`<kbd>`:** Used to denote keyboard keys. Each key in a combination must be\n    wrapped in its own tag, e.g., `<kbd>Ctrl</kbd> + <kbd>S</kbd>`.\n  - **`<style>`:** Used rarely for targeted custom CSS.\n  - **`<img>`:** Used to embed images.\n\n- **Project-Specific Conventions:**\n  - **mdbook Includes:** The `{{#include ...}}` helper is used to include\n    snippets from other files.\n  - **mdbook Segments:** The `{{%segment ...%}}` and `{{%session ...%}}` helpers\n    are used for course structuring.\n  - **Frontmatter:** Files start with YAML frontmatter (enclosed in `---`) to\n    provide metadata.\n  - **Doc Comments:** Standard Rust doc comments (`///`, `//!`) are used.\n    `/// # Safety` is used to document safety preconditions for `unsafe` code.\n  - **Comments:** HTML comments (`<!-- ... -->`) are used for editor/translator\n    instructions and content control (e.g., `mdbook-xgettext: skip`).\n\n# Project-Specific Technical Context\n\nThis section contains critical, non-obvious technical details about this\nproject's tooling and environment that an AI assistant needs to know to perform\nits tasks correctly.\n\n## `mdbook` Behavior\n\n- **Isolated Code Snippets:** `mdbook` treats each fenced Rust code block (e.g.,\n  `` ```rust ... ``` ``) as a separate compilation unit. When analyzing a code\n  snippet, treat it as a self-contained program. Do not assume it shares a scope\n  or context with other snippets in the same file unless the surrounding text\n  explicitly states otherwise.\n\n## Interacting with the `mdbook` Theme\n\nThe `mdbook` theme has several interactive elements. Here's how to interact with\nthem:\n\n- **Sidebar Toggle:** The sidebar can be opened and closed by clicking the\n  \"hamburger\" button in the top-left of the body text. This button has the ID\n  `sidebar-toggle`. You can use the following JavaScript to toggle the sidebar:\n\n  ```javascript\n  const button = document.getElementById(\"sidebar-toggle\");\n  button.click();\n  ```\n\n## WebdriverIO Testing\n\nThis project uses WebdriverIO for browser-based integration tests. Here are some\nkey findings about the test environment:\n\n### Test Environments\n\nThe `tests/` directory contains two primary configurations:\n\n- `npm test` (runs `wdio.conf.ts`): This is the standard for self-contained\n  integration tests. It uses `@wdio/static-server-service` to create a temporary\n  web server on port 8080.\n- `npm run test-mdbook` (runs `wdio.conf-mdbook.ts`): This is for testing\n  against a live `mdbook serve` instance, which typically runs on port 3000.\n\nIt is important to use the standard `npm test` command for most test development\nto ensure the tests are self-contained.\n\n### Writing Stable Tests\n\nTests can be flaky if they don't correctly handle the asynchronous nature of the\nweb browser and the test environment's state management.\n\n- **State Leakage Between Tests:** Despite what the WebdriverIO documentation\n  might suggest, `browser.url()` is not always sufficient to guarantee a clean\n  slate between tests. Lingering state, such as inline CSS styles applied by\n  JavaScript, can leak from one test into the next, causing unexpected failures.\n  The most effective solution found for this project is to add\n  `await browser.refresh();` to the `beforeEach` hook. This forces a full page\n  reload that properly clears the old state.\n\n- **Race Conditions with Dynamic Elements:** Many elements in this project are\n  created dynamically by JavaScript after the initial page load. If a test tries\n  to access an element immediately after navigation, it may fail because the\n  script hasn't finished running and the element doesn't exist in the DOM yet.\n  This creates a race condition. To prevent this, always use\n  `await element.waitForExist()` to ensure the element is present before trying\n  to interact with it or assert its state (e.g., `toBeDisplayed()`).\n\n### Handling Redirects\n\n`mdbook` uses a redirect map defined in `book.toml` under the\n`[output.html.redirect]` section. When writing tests, it is crucial to use the\nfinal, non-redirecting URL for navigation. Navigating to a URL that is a\nredirect will cause the browser to follow it, but this process can strip URL\nquery parameters, leading to test failures for features that depend on them.\n\n### Running and Debugging Tests\n\nTo run a single test file, use the `--spec` flag with the a string matching the\nfile name:\n\n```bash\nnpm test -- --spec redbox\n```\n\nTo check for flakiness, you can repeat a test multiple times using the\n`--repeat` flag:\n\n```bash\nnpm test -- --spec redbox --repeat 100\n```\n\nUse `--mochaOpts.grep` to run a single test within a file:\n\n```bash\nnpm test -- --spec redbox --mochaOpts.grep \"should be hidden by default\"\n```\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. 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\n   2. 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\n   3. 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\n   4. 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\n   5. 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\n   6. 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\n   7. 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\n   8. 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\n   9. 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\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: 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\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "LICENSE-CC-BY",
    "content": "Attribution 4.0 International\n\n=======================================================================\n\nCreative Commons Corporation (\"Creative Commons\") is not a law firm and\ndoes not provide legal services or legal advice. Distribution of\nCreative Commons public licenses does not create a lawyer-client or\nother relationship. Creative Commons makes its licenses and related\ninformation available on an \"as-is\" basis. Creative Commons gives no\nwarranties regarding its licenses, any material licensed under their\nterms and conditions, or any related information. Creative Commons\ndisclaims all liability for damages resulting from their use to the\nfullest extent possible.\n\nUsing Creative Commons Public Licenses\n\nCreative Commons public licenses provide a standard set of terms and\nconditions that creators and other rights holders may use to share\noriginal works of authorship and other material subject to copyright\nand certain other rights specified in the public license below. The\nfollowing considerations are for informational purposes only, are not\nexhaustive, and do not form part of our licenses.\n\n     Considerations for licensors: Our public licenses are\n     intended for use by those authorized to give the public\n     permission to use material in ways otherwise restricted by\n     copyright and certain other rights. Our licenses are\n     irrevocable. Licensors should read and understand the terms\n     and conditions of the license they choose before applying it.\n     Licensors should also secure all rights necessary before\n     applying our licenses so that the public can reuse the\n     material as expected. Licensors should clearly mark any\n     material not subject to the license. This includes other CC-\n     licensed material, or material used under an exception or\n     limitation to copyright. More considerations for licensors:\n    wiki.creativecommons.org/Considerations_for_licensors\n\n     Considerations for the public: By using one of our public\n     licenses, a licensor grants the public permission to use the\n     licensed material under specified terms and conditions. If\n     the licensor's permission is not necessary for any reason--for\n     example, because of any applicable exception or limitation to\n     copyright--then that use is not regulated by the license. Our\n     licenses grant only permissions under copyright and certain\n     other rights that a licensor has authority to grant. Use of\n     the licensed material may still be restricted for other\n     reasons, including because others have copyright or other\n     rights in the material. A licensor may make special requests,\n     such as asking that all changes be marked or described.\n     Although not required by our licenses, you are encouraged to\n     respect those requests where reasonable. More considerations\n     for the public:\n    wiki.creativecommons.org/Considerations_for_licensees\n\n=======================================================================\n\nCreative Commons Attribution 4.0 International Public License\n\nBy exercising the Licensed Rights (defined below), You accept and agree\nto be bound by the terms and conditions of this Creative Commons\nAttribution 4.0 International Public License (\"Public License\"). To the\nextent this Public License may be interpreted as a contract, You are\ngranted the Licensed Rights in consideration of Your acceptance of\nthese terms and conditions, and the Licensor grants You such rights in\nconsideration of benefits the Licensor receives from making the\nLicensed Material available under these terms and conditions.\n\n\nSection 1 -- Definitions.\n\n  a. Adapted Material means material subject to Copyright and Similar\n     Rights that is derived from or based upon the Licensed Material\n     and in which the Licensed Material is translated, altered,\n     arranged, transformed, or otherwise modified in a manner requiring\n     permission under the Copyright and Similar Rights held by the\n     Licensor. For purposes of this Public License, where the Licensed\n     Material is a musical work, performance, or sound recording,\n     Adapted Material is always produced where the Licensed Material is\n     synched in timed relation with a moving image.\n\n  b. Adapter's License means the license You apply to Your Copyright\n     and Similar Rights in Your contributions to Adapted Material in\n     accordance with the terms and conditions of this Public License.\n\n  c. Copyright and Similar Rights means copyright and/or similar rights\n     closely related to copyright including, without limitation,\n     performance, broadcast, sound recording, and Sui Generis Database\n     Rights, without regard to how the rights are labeled or\n     categorized. For purposes of this Public License, the rights\n     specified in Section 2(b)(1)-(2) are not Copyright and Similar\n     Rights.\n\n  d. Effective Technological Measures means those measures that, in the\n     absence of proper authority, may not be circumvented under laws\n     fulfilling obligations under Article 11 of the WIPO Copyright\n     Treaty adopted on December 20, 1996, and/or similar international\n     agreements.\n\n  e. Exceptions and Limitations means fair use, fair dealing, and/or\n     any other exception or limitation to Copyright and Similar Rights\n     that applies to Your use of the Licensed Material.\n\n  f. Licensed Material means the artistic or literary work, database,\n     or other material to which the Licensor applied this Public\n     License.\n\n  g. Licensed Rights means the rights granted to You subject to the\n     terms and conditions of this Public License, which are limited to\n     all Copyright and Similar Rights that apply to Your use of the\n     Licensed Material and that the Licensor has authority to license.\n\n  h. Licensor means the individual(s) or entity(ies) granting rights\n     under this Public License.\n\n  i. Share means to provide material to the public by any means or\n     process that requires permission under the Licensed Rights, such\n     as reproduction, public display, public performance, distribution,\n     dissemination, communication, or importation, and to make material\n     available to the public including in ways that members of the\n     public may access the material from a place and at a time\n     individually chosen by them.\n\n  j. Sui Generis Database Rights means rights other than copyright\n     resulting from Directive 96/9/EC of the European Parliament and of\n     the Council of 11 March 1996 on the legal protection of databases,\n     as amended and/or succeeded, as well as other essentially\n     equivalent rights anywhere in the world.\n\n  k. You means the individual or entity exercising the Licensed Rights\n     under this Public License. Your has a corresponding meaning.\n\n\nSection 2 -- Scope.\n\n  a. License grant.\n\n       1. Subject to the terms and conditions of this Public License,\n          the Licensor hereby grants You a worldwide, royalty-free,\n          non-sublicensable, non-exclusive, irrevocable license to\n          exercise the Licensed Rights in the Licensed Material to:\n\n            a. reproduce and Share the Licensed Material, in whole or\n               in part; and\n\n            b. produce, reproduce, and Share Adapted Material.\n\n       2. Exceptions and Limitations. For the avoidance of doubt, where\n          Exceptions and Limitations apply to Your use, this Public\n          License does not apply, and You do not need to comply with\n          its terms and conditions.\n\n       3. Term. The term of this Public License is specified in Section\n          6(a).\n\n       4. Media and formats; technical modifications allowed. The\n          Licensor authorizes You to exercise the Licensed Rights in\n          all media and formats whether now known or hereafter created,\n          and to make technical modifications necessary to do so. The\n          Licensor waives and/or agrees not to assert any right or\n          authority to forbid You from making technical modifications\n          necessary to exercise the Licensed Rights, including\n          technical modifications necessary to circumvent Effective\n          Technological Measures. For purposes of this Public License,\n          simply making modifications authorized by this Section 2(a)\n          (4) never produces Adapted Material.\n\n       5. Downstream recipients.\n\n            a. Offer from the Licensor -- Licensed Material. Every\n               recipient of the Licensed Material automatically\n               receives an offer from the Licensor to exercise the\n               Licensed Rights under the terms and conditions of this\n               Public License.\n\n            b. No downstream restrictions. You may not offer or impose\n               any additional or different terms or conditions on, or\n               apply any Effective Technological Measures to, the\n               Licensed Material if doing so restricts exercise of the\n               Licensed Rights by any recipient of the Licensed\n               Material.\n\n       6. No endorsement. Nothing in this Public License constitutes or\n          may be construed as permission to assert or imply that You\n          are, or that Your use of the Licensed Material is, connected\n          with, or sponsored, endorsed, or granted official status by,\n          the Licensor or others designated to receive attribution as\n          provided in Section 3(a)(1)(A)(i).\n\n  b. Other rights.\n\n       1. Moral rights, such as the right of integrity, are not\n          licensed under this Public License, nor are publicity,\n          privacy, and/or other similar personality rights; however, to\n          the extent possible, the Licensor waives and/or agrees not to\n          assert any such rights held by the Licensor to the limited\n          extent necessary to allow You to exercise the Licensed\n          Rights, but not otherwise.\n\n       2. Patent and trademark rights are not licensed under this\n          Public License.\n\n       3. To the extent possible, the Licensor waives any right to\n          collect royalties from You for the exercise of the Licensed\n          Rights, whether directly or through a collecting society\n          under any voluntary or waivable statutory or compulsory\n          licensing scheme. In all other cases the Licensor expressly\n          reserves any right to collect such royalties.\n\n\nSection 3 -- License Conditions.\n\nYour exercise of the Licensed Rights is expressly made subject to the\nfollowing conditions.\n\n  a. Attribution.\n\n       1. If You Share the Licensed Material (including in modified\n          form), You must:\n\n            a. retain the following if it is supplied by the Licensor\n               with the Licensed Material:\n\n                 i. identification of the creator(s) of the Licensed\n                    Material and any others designated to receive\n                    attribution, in any reasonable manner requested by\n                    the Licensor (including by pseudonym if\n                    designated);\n\n                ii. a copyright notice;\n\n               iii. a notice that refers to this Public License;\n\n                iv. a notice that refers to the disclaimer of\n                    warranties;\n\n                 v. a URI or hyperlink to the Licensed Material to the\n                    extent reasonably practicable;\n\n            b. indicate if You modified the Licensed Material and\n               retain an indication of any previous modifications; and\n\n            c. indicate the Licensed Material is licensed under this\n               Public License, and include the text of, or the URI or\n               hyperlink to, this Public License.\n\n       2. You may satisfy the conditions in Section 3(a)(1) in any\n          reasonable manner based on the medium, means, and context in\n          which You Share the Licensed Material. For example, it may be\n          reasonable to satisfy the conditions by providing a URI or\n          hyperlink to a resource that includes the required\n          information.\n\n       3. If requested by the Licensor, You must remove any of the\n          information required by Section 3(a)(1)(A) to the extent\n          reasonably practicable.\n\n       4. If You Share Adapted Material You produce, the Adapter's\n          License You apply must not prevent recipients of the Adapted\n          Material from complying with this Public License.\n\n\nSection 4 -- Sui Generis Database Rights.\n\nWhere the Licensed Rights include Sui Generis Database Rights that\napply to Your use of the Licensed Material:\n\n  a. for the avoidance of doubt, Section 2(a)(1) grants You the right\n     to extract, reuse, reproduce, and Share all or a substantial\n     portion of the contents of the database;\n\n  b. if You include all or a substantial portion of the database\n     contents in a database in which You have Sui Generis Database\n     Rights, then the database in which You have Sui Generis Database\n     Rights (but not its individual contents) is Adapted Material; and\n\n  c. You must comply with the conditions in Section 3(a) if You Share\n     all or a substantial portion of the contents of the database.\n\nFor the avoidance of doubt, this Section 4 supplements and does not\nreplace Your obligations under this Public License where the Licensed\nRights include other Copyright and Similar Rights.\n\n\nSection 5 -- Disclaimer of Warranties and Limitation of Liability.\n\n  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE\n     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS\n     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF\n     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,\n     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,\n     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR\n     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,\n     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT\n     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT\n     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.\n\n  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE\n     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,\n     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,\n     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,\n     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR\n     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN\n     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR\n     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR\n     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.\n\n  c. The disclaimer of warranties and limitation of liability provided\n     above shall be interpreted in a manner that, to the extent\n     possible, most closely approximates an absolute disclaimer and\n     waiver of all liability.\n\n\nSection 6 -- Term and Termination.\n\n  a. This Public License applies for the term of the Copyright and\n     Similar Rights licensed here. However, if You fail to comply with\n     this Public License, then Your rights under this Public License\n     terminate automatically.\n\n  b. Where Your right to use the Licensed Material has terminated under\n     Section 6(a), it reinstates:\n\n       1. automatically as of the date the violation is cured, provided\n          it is cured within 30 days of Your discovery of the\n          violation; or\n\n       2. upon express reinstatement by the Licensor.\n\n     For the avoidance of doubt, this Section 6(b) does not affect any\n     right the Licensor may have to seek remedies for Your violations\n     of this Public License.\n\n  c. For the avoidance of doubt, the Licensor may also offer the\n     Licensed Material under separate terms or conditions or stop\n     distributing the Licensed Material at any time; however, doing so\n     will not terminate this Public License.\n\n  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public\n     License.\n\n\nSection 7 -- Other Terms and Conditions.\n\n  a. The Licensor shall not be bound by any additional or different\n     terms or conditions communicated by You unless expressly agreed.\n\n  b. Any arrangements, understandings, or agreements regarding the\n     Licensed Material not stated herein are separate from and\n     independent of the terms and conditions of this Public License.\n\n\nSection 8 -- Interpretation.\n\n  a. For the avoidance of doubt, this Public License does not, and\n     shall not be interpreted to, reduce, limit, restrict, or impose\n     conditions on any use of the Licensed Material that could lawfully\n     be made without permission under this Public License.\n\n  b. To the extent possible, if any provision of this Public License is\n     deemed unenforceable, it shall be automatically reformed to the\n     minimum extent necessary to make it enforceable. If the provision\n     cannot be reformed, it shall be severed from this Public License\n     without affecting the enforceability of the remaining terms and\n     conditions.\n\n  c. No term or condition of this Public License will be waived and no\n     failure to comply consented to unless expressly agreed to by the\n     Licensor.\n\n  d. Nothing in this Public License constitutes or may be interpreted\n     as a limitation upon, or waiver of, any privileges and immunities\n     that apply to the Licensor or You, including from the legal\n     processes of any jurisdiction or authority.\n\n\n=======================================================================\n\nCreative Commons is not a party to its public\nlicenses. Notwithstanding, Creative Commons may elect to apply one of\nits public licenses to material it publishes and in those instances\nwill be considered the “Licensor.” The text of the Creative Commons\npublic licenses is dedicated to the public domain under the CC0 Public\nDomain Dedication. Except for the limited purpose of indicating that\nmaterial is shared under a Creative Commons public license or as\notherwise permitted by the Creative Commons policies published at\ncreativecommons.org/policies, Creative Commons does not authorize the\nuse of the trademark \"Creative Commons\" or any other trademark or logo\nof Creative Commons without its prior written consent including,\nwithout limitation, in connection with any unauthorized modifications\nto any of its public licenses or any other arrangements,\nunderstandings, or agreements concerning use of licensed material. For\nthe avoidance of doubt, this paragraph does not form part of the\npublic licenses.\n\nCreative Commons may be contacted at creativecommons.org.\n\n"
  },
  {
    "path": "README.md",
    "content": "# Comprehensive Rust 🦀\n\n[![Build workflow](https://img.shields.io/github/actions/workflow/status/google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain)\n[![GitHub contributors](https://img.shields.io/github/contributors/google/comprehensive-rust?style=flat-square)](https://github.com/google/comprehensive-rust/graphs/contributors)\n[![GitHub stars](https://img.shields.io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.com/google/comprehensive-rust/stargazers)\n\nThis repository has the source code for Comprehensive Rust 🦀, a multi-day Rust\ncourse developed by the Android team. The course covers all aspects of Rust,\nfrom basic syntax to generics and error handling. It also includes deep dives on\n[Android], [Chromium], [bare-metal], and [concurrency].\n\n[Android]: https://google.github.io/comprehensive-rust/android.html\n[Chromium]: https://google.github.io/comprehensive-rust/chromium.html\n[bare-metal]: https://google.github.io/comprehensive-rust/bare-metal.html\n[concurrency]: https://google.github.io/comprehensive-rust/concurrency.html\n\nRead the course at **https://google.github.io/comprehensive-rust/**.\n\n## Course Format and Target Audience\n\nThe course is used internally at Google to teach Rust to experienced software\nengineers, typically with a background in C++ or Java.\n\nThe course is taught in a classroom setting, and we hope it will be useful for\nothers who want to teach Rust to their team. The course is less ideal for\nself-study, since you would miss out on classroom discussions. You would not see\nthe questions and answers, nor the compiler errors we trigger when going through\nthe code samples. We hope to improve the self-study experience via\n[speaker notes](https://github.com/google/comprehensive-rust/issues/53) and by\n[publishing videos](https://github.com/google/comprehensive-rust/issues/52).\n\n## Press\n\nArticles and blog posts from around the web which cover Comprehensive Rust:\n\n- 2023-09-08:\n  _[Teaching Rust in 5 days](https://mo8it.com/blog/teaching-rust/)_.\n  Comprehensive Rust was used as a base for a 5-day university class on Rust.\n- 2023-09-21:\n  _[Scaling Rust Adoption Through Training](https://security.googleblog.com/2023/09/scaling-rust-adoption-through-training.html)_.\n  We published a blog post with details on the development of the course.\n- 2023-10-02:\n  _[In Search of Rust Developers, Companies Turn to In-House Training](https://www.darkreading.com/application-security/seeking-rust-developers-in-house-training)_.\n  About how Microsoft, Google, and others are training people in Rust.\n- 2024-10-18:\n  _[Rust Training at Scale | Rust Global @ RustConf 2024](https://youtu.be/7h5KyMqt2-Q?si=4M99HdWWxMaqN8Zr)_.\n  What Google learned from teaching Comprehensive Rust for more than two years.\n\n## Setup\n\nThe course is built using a few tools:\n\n- [mdbook](https://github.com/rust-lang/mdBook)\n- [mdbook-svgbob](https://github.com/boozook/mdbook-svgbob)\n- [mdbook-i18n-helpers and i18n-report](https://github.com/google/mdbook-i18n-helpers)\n- [mdbook-exerciser](mdbook-exerciser/)\n- [mdbook-course](mdbook-course/)\n- [mdbook-linkcheck2](https://github.com/marxin/mdbook-linkcheck2)\n\nFirst, install Rust by following the instructions on https://rustup.rs/. Then\nclone this repository:\n\n```shell\ngit clone https://github.com/google/comprehensive-rust/\ncd comprehensive-rust\n```\n\nThen run the following command to install the correct versions of all tools\nmentioned above:\n\n```shell\ncargo xtask install-tools\n```\n\nThis uses `cargo install` to install the tools, so you will find them in your\n`~/.cargo/bin/` directory afterwards.\n\n## Commands\n\nHere are some of the commonly used commands you can run in the project. Run\n`cargo xtask` to view all available commands.\n\n| Command                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `cargo xtask install-tools` | Install all the tools the project depends on.                                                                                                                                                                                                                                                                                                                                                                                          |\n| `cargo xtask serve`         | Start a web server with the course. You'll find the content on http://localhost:3000. To serve any of the translated versions of the course, add the language flag (--language or -l) followed by xx, where xx is the ISO 639 language code (e.g. cargo xtask serve -l da for the Danish translation).                                                                                                                                 |\n| `cargo xtask rust-tests`    | Test the included Rust snippets.                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `cargo xtask web-tests`     | Run the web driver tests in the tests directory.                                                                                                                                                                                                                                                                                                                                                                                       |\n| `cargo xtask build`         | Create a static version of the course in the `book/` directory. Note that you have to separately build and zip exercises and add them to book/html. To build any of the translated versions of the course, add the language flag (--language or -l) followed by xx, where xx is the ISO 639 language code (e.g. cargo xtask build -l da for the Danish translation). [TRANSLATIONS.md](TRANSLATIONS.md) contains further instructions. |\n\n> **Note** On Windows, you need to enable symlinks\n> (`git config --global core.symlinks true`) and Developer Mode.\n\n## Contributing\n\nWe welcome contributions. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for\ndetails.\n\n## License\n\nThis project is licensed under a mix of the Apache License 2.0 and the Creative\nCommons Attribution 4.0 International License.\n\n- **Source Code:** All source code files and code examples embedded in the\n  documentation are licensed under the [Apache License, Version 2.0](LICENSE).\n\n- **Documentation & Content:** All non-source code assets—specifically Markdown\n  (`.md`) files, documentation, and images—are licensed under the\n  [Creative Commons Attribution 4.0 International License](LICENSE-CC-BY).\n\n## Contact\n\nFor questions or comments, please contact\n[Martin Geisler](mailto:mgeisler@google.com) or start a\n[discussion on GitHub](https://github.com/google/comprehensive-rust/discussions).\nWe would love to hear from you.\n"
  },
  {
    "path": "STYLE.md",
    "content": "# Comprehensive Rust 🦀 Style Guide\n\nThe course has been expanded and improved by tons of volunteers like you! Thank\nyou for that! To help ensure a consistent style throughout the course, we have\nwritten down some guidelines for you to follow.\n\n## Course Philosophy and Design\n\nTo contribute effectively, it's helpful to understand the core design principles\nof Comprehensive Rust. This is not a self-study book; it is a set of slides and\nnotes for an **instructor-led course**.\n\n### Target Audience\n\nThe course is designed for an audience of experienced software engineers who are\nnew to Rust. We assume they have 2-3 years of experience in an imperative\nlanguage like C, C++11+, Java 7+, Python, or Go.\n\nWe **do not** assume familiarity with functional programming concepts or\nfeatures from more modern languages like Swift or Kotlin. Course material should\nbuild upon the concepts that are likely to be familiar to this audience.\n\n### Goals\n\nThe goal of the course is to provide a solid foundation in Rust within a bounded\ntime frame. This prepares students to continue learning effectively as they\nbegin to apply their new skills on the job.\n\n### Pedagogical Principles\n\nWe follow a few key principles to make the material effective for learning:\n\n- **Build on a Foundation:** New Rust concepts should be connected to what a\n  learner already knows, either from their prior language experience or from\n  earlier parts of this course.\n- **Provide a Working Mental Model (The \"No Magic\" Rule):** As much as possible,\n  avoid telling students to accept syntax or behavior that will be explained\n  later. For everything that appears on the slides or in exercises, we must\n  provide a working mental model that allows the student to understand and use\n  the concept.\n- **Use a [Spiral Approach](https://en.wikipedia.org/wiki/Spiral_approach):** To\n  avoid overwhelming the learner, it is highly encouraged to introduce a concept\n  by first providing basic facts and a simplified mental model. The topic can\n  then be revisited later to provide more detail. For example, very early in the\n  course we explain the basics of `println!`, mention that it is a macro so the\n  usage syntax is a bit unusual, but we don't go into details of format strings\n  or macros. We explain details of format strings later, once we have covered\n  traits and can mention the `Debug` and `Display` traits.\n- **Live, Interactive Instruction:** The instructor is expected to run and\n  modify the code on the slides, and use compiler errors as a teaching tool. The\n  audience is expected to frequently interrupt with questions, and the\n  instructor would often experiment with the code on the slide to illustrate the\n  answer.\n\n### Pacing and Structure\n\nThe course is designed for approximately 5 hours of teaching per day, typically\nsplit into a 3-hour morning session and a 2-hour afternoon session.\n\nThis pacing is important context for contributors. Material should be structured\nto fit this rhythm, with clear sections that can be taught in roughly 45-50\nminute blocks to accommodate short breaks and Q&A.\n\nEach slide must include a `minutes` field in its frontmatter, which specifies\nthe estimated teaching time for that slide. This helps ensure the overall pacing\nof the course remains consistent.\n\n### Course Structure\n\nThe course starts with a core **Rust Fundamentals** curriculum, followed by a\ncollection of specialized **deep dives**. All students take the Fundamentals\ncourse and can then opt into any deep dives that are relevant to them.\n\n#### The Rust Fundamentals Course\n\nThe **Rust Fundamentals** course provides a solid foundation in a strictly\nbounded, four-day time frame. This duration is firm, and its scope is carefully\nmanaged to focus on the most essential concepts for new Rust programmers.\n\nThe overall progression of the course starts with the parts of the Rust language\nthat should be conceptually familiar to most students from other languages. Then\nwe move on to more difficult parts (for example, enums with payloads and\ngenerics), and parts that are unique to Rust (lifetimes and the borrow checker).\n\nContributors should keep this structure in mind. The four-day schedule for the\nFundamentals course is completely full, leaving no time slack for new topics.\nProposals to add material to the Rust Fundamentals course must also include a\nplan to shorten or remove existing content. Refinements to existing topics are\nalways welcome. Topics that are not essential for all new Rust programmers\nshould be proposed as new deep dives.\n\n#### Deep Dives\n\nSpecialized material can be added to _deep dives_. These cover things like Rust\nin Android, Bare-Metal Rust, etc., which are not necessarily something every\nRust developer should know. More deep dives can be added in the future.\n\n## Course Slides\n\nPlease take the following into account when updating the course material.\n\n### Vertical Space\n\nWhat looks like pages in a browser, are actually slides in a presentation. It is\nimportant to keep this in mind when adding content: we only have limited\nvertical space. Scrolling up and down should be avoided since it is very jarring\nfor people who attend the class.\n\nYou can test the amount of space available using a simple tool. This tool can be\nused by clicking a toggle button next to the search button on left side of the\nnavbar.\n\nThe rectangle has an aspect ratio similar to what you can see when you share\nyour screen on a 16:9 display or projector.\n\nUse the rectangle as a rough guide for how much you can fit on a single slide.\nIf you find yourself adding too much detail, move the details to the speaker\nnotes (see below).\n\n### One Core Idea Per Slide\n\nIdeally, each slide should focus on a single, clear takeaway. If a slide\nintroduces a core concept and then explores an important but distinct tangent\n(e.g., a limitation or an advanced use case), that tangent should be moved to\nits own slide. This keeps the presentation focused and easier to follow.\n\nConsider the instructor's workflow. If the speaker notes require a long or\ncomplex series of live edits, it can be difficult for the instructor to execute\nwell every time. It may be better to add a new slide that presents the desired\nstate of the code.\n\n### Pedagogical Flow\n\nWhen introducing a new concept, start with a simple, relatable, and concrete\nexample. A good opening example grounds the concept for the learner and provides\nmotivation for the more detailed explanation that will follow.\n\n### Use Meaningful Examples\n\nCode samples on the slides should be short and do something meaningful. Avoid\nusing generic placeholders like `Foo`, `Bar`, and `Baz`. Using descriptive names\nfrom a real-world, even if simplified, domain makes the code easier to\nunderstand and relate to.\n\n### Plan Interactive Code Snippets\n\nAll Rust code blocks in the course are not static text but are live, editable\nplaygrounds. An important teaching method is for the instructor to edit these\nsnippets live to demonstrate concepts, introduce and fix errors, and explore\nvariations based on student questions.\n\nContributors should design their slides with this interactivity in mind. The\ninitial state of the code should be a good starting point for a live\ndemonstration.\n\n### `mdbook` and `mdbook-course` Conventions\n\nThe project uses `mdbook` features in specific ways, as well as a custom\npreprocessor, `mdbook-course`. The following conventions are mandatory:\n\n- **YAML Frontmatter:** Every slide file **must** include YAML frontmatter at\n  the top. At a minimum, this must include the `minutes` field to specify the\n  estimated teaching time.\n- **Outline Helpers:** Pages that serve as an index for a session or segment\n  **must** use the `{{%session outline%}}` or `{{%segment outline%}}` helpers.\n- **File Includes:** Code for exercises and their solutions **must** be included\n  from external files using the standard `mdbook` `{{#include ...}}` helper.\n- **Translation Directives:** To prevent an element (such as a paragraph, code\n  block, or list item) from being translated, place a\n  `<!-- mdbook-xgettext: skip -->` comment on a line by itself, followed by a\n  blank line, immediately before the element.\n\nFor a complete explanation of the custom helpers and all available frontmatter\nfields, please refer to the [`mdbook-course` README](mdbook-course/README.md).\n\n### Language and Tone\n\nThe courses are written in American English, so write \"initialize\", not\n\"initialise\".\n\nUse an informal, friendly, and concise tone. Remember that the courses are meant\nto be taught by an experienced programmer to other experienced programmers. When\npossible, prefer terminology used in\n[the official Rust Book](https://doc.rust-lang.org/book/). If a less common but\nnecessary term is used, provide a brief definition.\n\n#### Glossary\n\nThe `src/glossary.md` file contains definitions for key Rust terms used\nthroughout the course. When editing course content, use the glossary to anchor\nconcepts and ensure consistency in terminology. Terms should be defined and used\nconsistently with their glossary entries.\n\n### Precision\n\nAvoid [\"weasel words\"](https://en.wikipedia.org/wiki/Weasel_word) (e.g.,\n\"likely\", \"probably\", \"maybe\", \"usually\") when a definite statement can be made.\nThe course material should be clear, concise, and authoritative. If a behavior\nis conditional, explain the condition precisely rather than hedging.\n\nWhen describing conventions or standard behavior, prefer \"typically\" (implies a\nnorm or design characteristic) over \"usually\" (implies statistical frequency).\n\n## Exercises\n\nAt the end of some sections, learners will actively engage with the material by\ncompleting a small exercise. The goal of an exercise is to provide hands-on\npractice with the concepts just taught.\n\nPlease keep the following principles in mind when creating or updating\nexercises:\n\n- **Focused Scope:** An exercise should focus on the topic of the preceding\n  section. It should not require knowledge of concepts that have not yet been\n  taught.\n- **Short Duration:** An exercise should be solvable by the target audience in\n  approximately 10-15 minutes. The goal is a quick, successful application of\n  knowledge, not a complex project.\n- **Clear Instructions:** The problem description should be clear and\n  unambiguous.\n\n## Speaker Notes\n\nWe have extended `mdbook` with support for speaker notes: content added between\n`<details> ... </details>` tags is rendered in a special box that can be\ncollapsed or removed entirely from the slide.\n\n- Speaker notes suggest a narrative structure for the instructor.\n\n- The speaker notes should expand on the topic of the slide. Use them to provide\n  interesting background information for both the instructor and for students\n  who look at the material outside of a class. Remember that many more people\n  will read the course by themselves, so make the notes complete and useful even\n  when there is no Rust expert around.\n\n- For slides with evolving code examples, the notes provide a clear,\n  step-by-step flow for how the code is modified and presented. This is a\n  suggested flow for the instructor's live-coding session within the slide's\n  interactive playground. This includes:\n\n  - The order in which to introduce concepts, how to motivate them.\n\n  - Framing of the code example: the problem it tries to solve, if not obvious.\n\n  - How to demonstrate variations of the code example (e.g., code that does not\n    compile or illustrates a bug).\n\n  - How to change the code on the slide to illustrate the concepts being taught.\n\n  - Where to pause and engage the class with questions.\n\n- Speaker notes should serve as a quick reference for instructors, not a\n  verbatim script. Because instructors have limited time to glance at notes, the\n  content should be concise and easy to scan.\n\n  **Avoid** long, narrative paragraphs meant to be read aloud:\n  > **Bad:** _\"In this example, we define a trait named `StrExt`. This trait has\n  > a single method, `is_palindrome`, which takes a `&self` receiver and returns\n  > a boolean value indicating if the string is the same forwards and\n  > backwards...\"_\n\n  **Instead, prefer** bullet points with background information or actionable\n  **teaching prompts**:\n  > **Good:**\n  >\n  > - Note: The `Ext` suffix is a common convention.\n  > - Ask: What happens if the `use` statement is removed?\n  > - Demo: Comment out the `use` statement to show the compiler error.\n\n- Nevertheless, include all of the necessary teaching prompts for the instructor\n  in the speaker notes. Unlike the main content, the speaker notes don't have to\n  fit on a single slide.\n\n### More to Explore\n\nUse the \"More to Explore\" section for valuable topics that are outside the main\nscope of the class. The content should be placed within the `<details>` block as\nshown below:\n\n```markdown\n<details>\n\n...\n\n## More to Explore\n\n...\n\n</details>\n```\n\nThis section can contain a deeper explanation of a concept or provide specific\npointers to external resources. A link should be accompanied by a brief\nexplanation of what the resource contains and why it is relevant. A vague\nreference is not helpful, but a specific one can be a great tool for\nself-learners.\n\n## Code Blocks Mechanics\n\nCode blocks are a critical part of the course. To ensure they are consistent and\nbehave as expected, please follow these conventions.\n\n### Language Identifiers\n\nUse the following language identifiers for fenced code blocks:\n\n- **`rust`**: For Rust code examples.\n- **`shell`**: For shell commands. Use a `$` prompt for consistency. Omit the\n  prompt for multi-line commands or when the output is shown.\n- **`bob`**: For ASCII art diagrams generated by `mdbook-bob`.\n- **`ignore`**: For code snippets that are not complete, self-contained programs\n  or are for illustrative purposes only and should not be compiled.\n\n### mdbook Annotations\n\nYou can add annotations to Rust code blocks to control how they are tested and\ndisplayed:\n\n- **`editable`**: Makes the code block an interactive playground where users can\n  edit and run the code. This should be used for most Rust examples.\n- **`compile_fail`**: Indicates that the code is expected to fail compilation.\n  This is used to demonstrate specific compiler errors.\n- **`should_panic`**: Indicates that the code is expected to panic when run.\n- **`warnunused`**: Re-enables `unused` lints for a code block. By default, the\n  course's test runner disables lints for unused variables, imports, etc., to\n  avoid distracting warnings. Use this annotation only when a warning is part of\n  the lesson.\n\n### Rust Code Formatting\n\nWhen showing Rust code inline, please use the same spacing as `rustfmt`: `3 * x`\ninstead of `3*x`. However, feel free to remove newlines when it can make the\ncode more compact and easier to understand, e.g., you can define a struct on one\nline if it is not the focus of your example:\n\n<!-- dprint-ignore-start -->\n\n```rust\nstruct Person { name: String }\n```\n\n<!-- dprint-ignore-end -->\n\nEnclose the code block in `<!-- dprint-ignore-start -->` and\n`<!-- dprint-ignore-end -->` to suppress the automatic formatting. Please use\nthis sparingly.\n\n## Translations\n\nThis section is about what you write in the translation. We describe\n[how to create or update translations elsewhere](TRANSLATIONS.md).\n\nWhen translating the course, please take the following into account:\n\n- Do not translate:\n  - The course name (\"Comprehensive Rust 🦀\"). If the name is not easily\n    understood in your language, please add the translated version after the\n    original name.\n  - Variable names (you _should_ translate the comments, though.)\n\n- If the Rust Book has been\n  [translated into your language](https://doc.rust-lang.org/book/appendix-06-translation.html),\n  please use the same vocabulary.\n\n- The text you write is in Markdown format. Make sure to preserve the original\n  formatting in the translation by marking text as `` `code` ``, `_emphasis_`\n  and `**strong emphasis**` like in the original.\n\n- If you find mistakes or things that sound awkward in the original English\n  text, please submit PRs to fix them in the English text! Fixing typos in the\n  translation is great, but we want everybody to benefit from the fixes and that\n  is why we need the fix to be made in the English text too.\n\n## Licensing and Copyright\n\nTo comply with our licensing requirements, all content must include appropriate\ncopyright and license headers.\n\n### Markdown Files\n\nAll Markdown files (`src/**/*.md`) must start with a copyright notice and an\nSPDX identifier for the Creative Commons Attribution 4.0 International License\n(CC-BY-4.0).\n\nThis block should be placed after the YAML frontmatter (if present), separated\nby a blank line, or at the very top of the file. It must be enclosed in an HTML\ncomment block to hide it from the rendered output.\n\nExample:\n\n```markdown\n---\nminutes: 10\n---\n\n<!--\nCopyright 2024 Google LLC\nSPDX-License-Identifier: CC-BY-4.0\n-->\n\n# [ ...Slide title... ]\n\n[ ...The rest of slide content... ]\n```\n\nThe year should be the year the file was created.\n\n### Embedded Rust Code\n\nAll Rust code blocks in Markdown files must include a copyright notice and an\nSPDX identifier for the Apache License, Version 2.0.\n\nThese lines must be prefixed with `#` so they are hidden in the rendered slides\nto save vertical space but remain inside the fenced code block to make the\nassociation clear.\n\nUse a `#` on the blank line following the header to ensure the vertical spacing\nis also hidden in the rendered output.\n\nExample:\n\n````markdown\n```rust\n# // Copyright 2024 Google LLC\n# // SPDX-License-Identifier: Apache-2.0\n#\nfn main() {\n    println!(\"Hello, world!\");\n}\n```\n````\n"
  },
  {
    "path": "TRANSLATIONS.md",
    "content": "# Translations of Comprehensive Rust 🦀\n\nWe would love to have your help with translating the course into other\nlanguages! Please see the [translations page] for the existing translations.\n\n[translations page]: https://google.github.io/comprehensive-rust/running-the-course/translations.html\n\nWe use the [Gettext] system for translations. This means that you don't modify\nthe Markdown files directly: instead you modify `.po` files in a `po/`\ndirectory. The `.po` files are small text-based translation databases.\n\n> **Tip:** You should not edit the `.po` files by hand. Instead use a PO editor,\n> such as [Poedit](https://poedit.net/). There are also several online editors\n> available. This will ensure that the file is encoded correctly.\n\n> **Important:** You need to run `dprint fmt` after editing the PO file. This\n> ensures consistent formatting of the file. You need to install the Gettext\n> tools for this, see the Preparation section below.\n\nThere is a `.po` file for each language. They are named after the [ISO 639]\nlanguage codes: Danish would go into `po/da.po`, Korean would go into\n`po/ko.po`, etc. The `.po` files contain all the English text plus the\ntranslations. They are initialized from a `messages.pot` file (a PO template)\nwhich contains only the English text.\n\nWe will show how to update and manipulate the `.po` and `.pot` files using the\nGNU Gettext utilities below.\n\n[Gettext]: https://www.gnu.org/software/gettext/manual/html_node/index.html\n[ISO 639]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\n\n## Preparation\n\nPlease make sure you can [build the course](README.md#building). You will also\nneed the `msgmerge` and `msgcat` Gettext tool installed. Please see our\n[contribution guide](CONTRIBUTING.md#formatting) for details.\n\n## Creating and Updating Translations\n\nFirst, you need to know how to update the `.pot` and `.po` files.\n\nYou should never touch the auto-generated `book/xgettext/messages.pot` file. You\nshould also never edit the `msgid` entries in a `po/xx.po` file. If you find\nmistakes, you need to update the original English text instead. The fixes to the\nEnglish text will flow into the `.po` files the next time the translators update\nthem.\n\n> **Tip:** See our [style guide](STYLE.md) for some things to keep in mind when\n> writing the translation.\n\n### Generating the PO Template\n\nTo extract the original English text and generate a `messages.pot` file, you\nbuild the book. This will automatically invoke the `mdbook-xgettext` renderer:\n\n```shell\nmdbook build\n```\n\nYou will find the generated POT file as `book/xgettext/messages.pot`.\n\n### Initialize a New Translation\n\nTo start a new translation, first generate the `book/xgettext/messages.pot`\nfile. Then use `msginit` to create a `xx.po` file for the fictional `xx`\nlanguage:\n\n```shell\nmsginit -i book/xgettext/messages.pot -l xx -o po/xx.po\n```\n\nYou can also simply copy `book/xgettext/messages.pot` to `po/xx.po`. Then update\nthe file header (the first entry with `msgid \"\"`) to the correct language.\n\n> **Tip:** You can use the\n> [`cloud-translate`](https://github.com/mgeisler/cloud-translate) tool to\n> quickly machine-translate a new translation. Install it with\n>\n> ```shell\n> cargo install cloud-translate\n> ```\n>\n> Untranslated entries will be sent through GCP Cloud Translate. Some of the\n> translations will be wrong after this, so you must inspect them by hand\n> afterwards.\n\nNext, please update the file `.github/labeler.yml` to include the new language:\n\n```diff\n+\"translation/xx\":\n+  - changed-files:\n+      - any-glob-to-any-file: po/xx.po\n```\n\n### Refreshing an Existing Translation\n\nAs the English text changes, translations gradually become outdated. The\ntranslations contain a POT-Creation-Date header which tells you when they were\nlast updated with new English messages.\n\nTo update the `po/xx.po` file with new messages, first extract the English text\ninto a `book/xgettext/messages.pot` template file. Then run\n\n```shell\nmsgmerge --update po/xx.po book/xgettext/messages.pot\n```\n\nNotice that the POT-Creation-Date field is updated to the current time and date.\nThis becomes the new baseline for the translation: new English text added\nafterwards will not show up in your translation, including completely new pages.\n\nWhen running `msgmerge`, unchanged messages stay intact, deleted messages are\nmarked as old, and updated messages are marked \"fuzzy\". A fuzzy entry is not\nused when we publish a translation! You have to go over the fuzzy entries by\nhand and verify that the translation is correct the fuzzy marker.\n\n> **Note:** Your PRs should either be the result of running `msgmerge` or the\n> result of new translation work on the PO file for your language. Avoid mixing\n> the two since it often creates a very large diff, which is hard or impossible\n> to review.\n\n### Editing a Translation\n\nYou should install a PO editor to edit the `.po` file for your language. The\nfiles are simple text files, but it helps to use a dedicated editor since it\nwill take care of escaping things like `\"` correctly.\n\nThere are many PO editors available. [Poedit](https://poedit.net/) is a popular\ncross-platform choice, but you can also find several online editors.\n\n### Formatting a Translation\n\nIf the file is not formatted correct, you will get an error on the PR. Make sure\nto follow the [steps](#preparation) to install [Gettext] and\n[`dprint`](https://dprint.dev/) and then run:\n\n```shell\ndprint fmt po/xx.po\n```\n\nThis will automatically format the `.po` file for you. Commit the formatting fix\nand push to your branch. Your PR should now be error free.\n\n## Using Translations\n\nThis will show you how to use the translations to generate localized HTML\noutput.\n\n> **Note:** `mdbook` will use original untranslated entries for all entries\n> marked as \"fuzzy\" (visible as \"Needs work\" in Poedit). This is especially\n> important when using\n> [`cloud-translate`](https://github.com/mgeisler/cloud-translate) for initial\n> translation as all entries will be marked as \"fuzzy\".\n\n### Building a Translation\n\nMake sure you have gone through the [build setup](./README.md#building) at least\nonce.\n\nTo use the `po/xx.po` file for your output, run the following command:\n\n```shell\nMDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx\n```\n\nThis will tell the `mdbook-gettext` preprocessor to translate the book using the\n`po/xx.po` file. The HTML output can be found in `book/xx/html/`.\n\n### Serving a Translation\n\nLike normal, you can use `mdbook serve` to view your translation as you work on\nit. You use the same command as with `mdbook build` above:\n\n```shell\nMDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx\n```\n\nWhen you update the `po/xx.po` file, the translated book will automatically\nreload.\n\n## Reviewing Translations\n\nWhen a new translation is started, we look for people who can help review it.\nThese reviewers are often Googlers, but they don't have to be. To automatically\nget an email when new PRs are created for your language, please add yourself to\nthe [CODEOWNERS] file.\n\nWhen reviewing a translation, please keep in mind that translations are a labour\nof love. Someone spends their free time translating the course because they want\nto bring Rust to users who speak their language.\n\nNothing is published right away after a PR lands for a new in-progress language.\nIt is therefore safe to merge the PR as long as the translation is reasonable.\nThis is often better than leaving 50+ comments since this can be overwhelming\nfor the contributor. Instead, please work with the contributor to improve things\nin follow-up PRs.\n\n### GitHub Suggestions\n\nWhen reviewing a translation PR, please use the\n[GitHub suggestion feature](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request).\nThis feature allows you to directly write how you think a line or paragraph\nshould be phrased. Use the left-most button in the toolbar to create a\nsuggestion.\n\nThe PR author can\n[apply the changes with a single click](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)\nafterwards, drastically reducing the number of round-trips needed in a review.\n\n### Incomplete Translations\n\nWhen the first 1-2 days of the course have been translated, we can publish the\ntranslation and link it from the [translations page]. The idea is to celebrate\nthe hard work, even if it is incomplete.\n\n[CODEOWNERS]: https://github.com/google/comprehensive-rust/blob/main/.github/CODEOWNERS\n\n## Publication Workflow\n\n> This section is for the developers of Comprehensive Rust, but it might give\n> you valuable background information on how the translations are published.\n\nWhen a change is made to the `main` branch, the [`publish.yml`] GitHub CI\nworkflow starts.\n\nThe `publish` job in this workflow will:\n\n- Install dependencies as described in [`CONTRIBUTING`](CONTRIBUTING.md).\n\n- Build every translation of the course, including the original English, using\n  [`build.sh`]. The English HTML ends up in `book/html/`, the HTML for the `xx`\n  language ends up in `book/xx/html/`.\n\n- Publish the entire `book/html/` directory to\n  https://google.github.io/comprehensive-rust/.\n\n[`build.sh`]: https://github.com/google/comprehensive-rust/blob/main/.github/workflows/build.sh\n\n### `build.sh`\n\nThe `build.sh` script is used both when testing code from a PR (with\n[`build.yml`]) and when publishing the finished book (with [`publish.yml`]).\n\n[`build.yml`]: https://github.com/google/comprehensive-rust/blob/main/.github/workflows/build.yml\n[`publish.yml`]: https://github.com/google/comprehensive-rust/blob/main/.github/workflows/publish.yml\n\nThe job of the script is to call `mdbook build`, but with a few extra steps:\n\n- It will enable the PDF output using `mdbook-pandoc`. This is disabled by\n  default to make it easier for people to run `mdbook build` without having to\n  configure LaTeX.\n\n#### Restoring Translations\n\nWhen building a translation (languages other than English), `build.sh` will\nrestore all Markdown files to how they looked at the time recorded in the\nPOT-Creation-Date header.\n\nThis means that:\n\n- A translation does not degrade when the English text is changed.\n- A translation will not received the latest fixes to the English text.\n\nThe script restores the Markdown with a simple\n\n```sh\n$ git restore --source $LAST_COMMIT src/ third_party/\n```\n\ncommand, where `$LAST_COMMIT` is the commit at the time of the POT-Creation-Date\nheader.\n\nA consequence of this is that we use the latest theme, CSS, JavaScript, etc for\neach translation.\n\nAfter `build.sh` was run, the working copy is left in this dirty state. Beware\nof this if you want to build the English version next, as you will have to clean\nup manually.\n\n## Status reports\n\nTwo translation status reports are automatically generated:\n\n- [Translation status as checked in][translation-report]\n- [Translation status after syncing to the latest version of the source with msgmerge][synced-translation-report]\n\nYou can also generate this report locally to see the effect of your local\nchanges:\n\n```shell\ni18n-report translation-report.html po/*.po\n```\n\n[translation-report]: https://google.github.io/comprehensive-rust/translation-report.html\n[synced-translation-report]: https://google.github.io/comprehensive-rust/synced-translation-report.html\n"
  },
  {
    "path": "book.toml",
    "content": "[book]\nauthors = [\"Martin Geisler\"]\nlanguage = \"en\"\nsrc = \"src\"\ntitle = \"Comprehensive Rust 🦀\"\n\n[rust]\nedition = \"2024\"\n\n[build]\nextra-watch-dirs = [\"po\", \"third_party\"]\n\n[preprocessor.gettext]\nafter = [\"links\"]\n\n[preprocessor.svgbob]\nrenderers = [\"html\"]\nafter = [\"gettext\"]\nclass = \"bob\"\n\n[preprocessor.course]\nverbose = false # Report timing information.\n\n[output.xgettext]\noptional = true\npot-file = \"messages.pot\"\ngranularity = 0\n\n[output.pandoc]\noptional = true\ndisabled = true\nhosted-html = \"https://google.github.io/comprehensive-rust/\"\n\n[output.pandoc.profile.pdf]\noutput-file = \"comprehensive-rust.pdf\"\npdf-engine = \"lualatex\"\n\n[output.pandoc.profile.pdf.variables]\nmainfont = \"Noto Serif\"\nsansfont = \"Noto Sans\"\nmonofont = \"Noto Sans Mono\"\nmainfontfallback = [\n  \"NotoColorEmoji:mode=harf\",\n  \"NotoNaskhArabic:\",\n]\nsansfontfallback = [\n  \"NotoSansArabic:\",\n]\nmonofontfallback = [\n  \"NotoColorEmoji:mode=harf\",\n  \"NotoSansMath:\",\n  \"NotoSansMonoCJKSC:\",\n  \"NotoSansArabic:\",\n]\ngeometry = [\"margin=1.25in\"]\nlinkcolor = \"blue\"\nurlcolor = \"red\"\n\n[output.html]\nsmart-punctuation = true\nadditional-js = [\n  \"theme/speaker-notes.js\",\n  \"theme/redbox.js\",\n]\nadditional-css = [\n  \"theme/css/svgbob.css\",\n  \"theme/css/redbox.css\",\n  \"theme/css/speaker-notes.css\",\n  \"theme/css/language-picker.css\",\n  \"theme/css/rtl.css\",\n]\nsite-url = \"/comprehensive-rust/\"\ngit-repository-url = \"https://github.com/google/comprehensive-rust\"\nedit-url-template = \"https://github.com/google/comprehensive-rust/edit/main/{path}\"\n\n[output.html.fold]\nenable = true\nlevel = 0\n\n[output.html.playground]\neditable = true\nline-numbers = true\n\n[output.html.search]\nuse-boolean-and = true\n\n# Redirects in the form of \"old-path\" = \"new-path\", where the new path\n# is relative to the old path.\n#\n# Please keep the table sorted and avoid multi-step redirects.\n[output.html.redirect]\n\"async/async-await.html\" = \"../concurrency/async/async-await.html\"\n\"async/channels.html\" = \"../concurrency/async-control-flow/channels.html\"\n\"async/concurrency/channels.html\" = \"../channels.html\"\n\"async/control-flow/join.html\" = \"../concurrency/async-control-flow/join.html\"\n\"async/control-flow/select.html\" = \"../concurrency/async-control-flow/select.html\"\n\"async/futures.html\" = \"../concurrency/async/futures.html\"\n\"async.html\" = \"concurrency/welcome-async.html\"\n\"async/pitfall/async-traits.html\" = \"../async-pitfalls/async-traits.html\"\n\"async/pitfalls/async-traits.html\" = \"../concurrency/async-pitfalls/async-traits.html\"\n\"async/pitfalls/blocking-executor.html\" = \"../concurrency/async-pitfalls/blocking-executor.html\"\n\"async/pitfalls/cancellation.html\" = \"../concurrency/async-pitfalls/cancellation.html\"\n\"async/pitfalls.html\" = \"../concurrency/async-pitfalls.html\"\n\"async/pitfalls/pin.html\" = \"../concurrency/async-pitfalls/pin.html\"\n\"async/runtimes.html\" = \"../concurrency/async/runtimes.html\"\n\"async/runtimes/tokio.html\" = \"../concurrency/async/runtimes/tokio.html\"\n\"async/tasks.html\" = \"../concurrency/async/tasks.html\"\n\"basic-syntax/compound-types.html\" = \"../tuples-and-arrays/tuples-and-arrays.html\"\n\"basic-syntax/functions.html\" = \"../control-flow-basics/functions.html\"\n\"basic-syntax/functions-interlude.html\" = \"../control-flow-basics/functions.html\"\n\"basic-syntax.html\" = \"control-flow-basics.html\"\n\"basic-syntax/methods.html\" = \"../control-flow-basics/functions.html\"\n\"basic-syntax/references-dangling.html\" = \"../references/shared.html\"\n\"basic-syntax/references.html\" = \"../references/shared.html\"\n\"basic-syntax/rustdoc.html\" = \"../std-types/docs.html\"\n\"basic-syntax/scalar-types.html\" = \"../types-and-values/values.html\"\n\"basic-syntax/scopes-shadowing.html\" = \"../control-flow-basics/blocks-and-scopes.html\"\n\"basic-syntax/slices.html\" = \"../references/slices.html\"\n\"basic-syntax/static-and-const.html\" = \"../unsafe-rust/static-and-const.html\"\n\"basic-syntax/string-slices.html\" = \"../references/strings.html\"\n\"basic-syntax/type-inference.html\" = \"../types-and-values/inference.html\"\n\"basic-syntax/variables.html\" = \"../types-and-values/variables.html\"\n\"concurrency.html\" = \"concurrency/welcome.html\"\n\"concurrency/scoped-threads.html\" = \"threads/scoped.html\"\n\"concurrency/shared_state/arc.html\" = \"../shared-state/arc.html\"\n\"concurrency/shared_state/example.html\" = \"../shared-state/example.html\"\n\"concurrency/shared_state.html\" = \"shared-state.html\"\n\"concurrency/shared_state/mutex.html\" = \"../shared-state/mutex.html\"\n\"control-flow-basics/conditionals.html\" = \"if.html\"\n\"control-flow/blocks.html\" = \"../control-flow-basics/blocks-and-scopes.html\"\n\"control-flow/break-continue.html\" = \"../control-flow-basics/break-continue.html\"\n\"control-flow/for-expressions.html\" = \"../control-flow-basics/loops.html\"\n\"control-flow.html\" = \"control-flow-basics.html\"\n\"control-flow/if-expressions.html\" = \"../control-flow-basics/conditionals.html\"\n\"control-flow/if-let-expressions.html\" = \"../pattern-matching/let-control-flow.html\"\n\"control-flow/loop-expressions.html\" = \"../control-flow-basics/loops.html\"\n\"control-flow/match-expressions.html\" = \"../tuples-and-arrays/match.html\"\n\"control-flow/novel.html\" = \"../pattern-matching/let-control-flow.html\"\n\"control-flow/while-expressions.html\" = \"../control-flow-basics/loops.html\"\n\"control-flow/while-let-expression.html\" = \"while-let-expressions.html\"\n\"control-flow/while-let-expressions.html\" = \"../pattern-matching/let-control-flow.html\"\n\"enums.html\" = \"user-defined-types/enums.html\"\n\"enums/sizes.html\" = \"../user-defined-types/enums.html\"\n\"enums/variant-payloads.html\" = \"../user-defined-types/enums.html\"\n\"error-handling/converting-error-types-example.html\" = \"../error-handling/try-conversions.html\"\n\"error-handling/converting-error-types.html\" = \"../error-handling/try-conversions.html\"\n\"error-handling/deriving-error-enums.html\" = \"../error-handling/error.html\"\n\"error-handling/dynamic-errors.html\" = \"../error-handling/anyhow.html\"\n\"error-handling/error-contexts.html\" = \"../error-handling/anyhow.html\"\n\"error-handling/thiserror-and-anyhow.html\" = \"../error-handling/anyhow.html\"\n\"error-handling/panic-unwind.html\" = \"../error-handling/panics.html\"\n\"error-handling/try-operator.html\" = \"../error-handling/try.html\"\n\"exercises/concurrency/afternoon.html\" = \"../../concurrency/async-exercises.html\"\n\"exercises/concurrency/chat-app.html\" = \"../../concurrency/async-exercises/chat-app.html\"\n\"exercises/concurrency/dining-philosophers-async.html\" = \"../../concurrency/async-exercises/dining-philosophers.html\"\n\"exercises/concurrency/dining-philosophers.html\" = \"../../concurrency/sync-exercises/dining-philosophers.html\"\n\"exercises/concurrency/elevator.html\" = \"chat-app.html\"\n\"exercises/concurrency/link-checker.html\" = \"../../concurrency/sync-exercises/link-checker.html\"\n\"exercises/concurrency/morning.html\" = \"../../concurrency/sync-exercises.html\"\n\"exercises/concurrency/solutions-afternoon.html\" = \"../../concurrency/async-exercises/solutions.html\"\n\"exercises/concurrency/solutions-morning.html\" = \"../../concurrency/sync-exercises/solutions.html\"\n\"exercises/day-1/afternoon.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-1/book-library.html\" = \"../day-2/book-library.html\"\n\"exercises/day-1/for-loops.html\" = \"../../tuples-and-arrays/exercise.html\"\n\"exercises/day-1/implicit-conversions.html\" = \"../../std-traits/exercise.html\"\n\"exercises/day-1/iterators-and-ownership.html\" = \"../day-2/iterators-and-ownership.html\"\n\"exercises/day-1/luhn.html\" = \"../../testing/exercise.html\"\n\"exercises/day-1/morning.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-1/pattern-matching.html\" = \"../../user-defined-types/exercise.html\"\n\"exercises/day-1/soluções-tarde.html\" = \"solutions-afternoon.html\"\n\"exercises/day-2/afternoon.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-2/book-library.html\" = \"../../std-types/exercise.html\"\n\"exercises/day-2/health-statistics.html\" = \"../../borrowing/exercise.html\"\n\"exercises/day-2/iterators-and-ownership.html\" = \"../../iterators/intoiterator.html\"\n\"exercises/day-2/luhn.html\" = \"../day-1/luhn.html\"\n\"exercises/day-2/morning.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-2/points-polygons.html\" = \"../day-3/points-polygons.html\"\n\"exercises/day-2/soluções-tarde.html\" = \"solutions-afternoon.html\"\n\"exercises/day-2/strings-iterators.html\" = \"../../iterators/exercise.html\"\n\"exercises/day-3/afternoon.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-3/morning.html\" = \"../../control-flow-basics/exercise.html\"\n\"exercises/day-3/points-polygons.html\" = \"../../references/exercise.html\"\n\"exercises/day-3/safe-ffi-wrapper.html\" = \"../../unsafe-rust/exercise.html\"\n\"exercises/day-3/simple-gui.html\" = \"../../methods-and-traits/exercise.html\"\n\"exercises/day-3/simples-gui.html\" = \"simple-gui.html\"\n\"exercises/day-3/soluções-tarde.html\" = \"solutions-afternoon.html\"\n\"exercises/day-4/afternoon.html\" = \"../android/morning.html\"\n\"exercises/day-4/android.html\" = \"../android/morning.html\"\n\"exercises/day-4/dining-philosophers.html\" = \"../concurrency/dining-philosophers.html\"\n\"exercises/day-4/elevator.html\" = \"../concurrency/elevator.html\"\n\"exercises/day-4/link-checker.html\" = \"../concurrency/link-checker.html\"\n\"exercises/day-4/morning.html\" = \"../concurrency/morning.html\"\n\"exercises/day-4/solutions-morning.html\" = \"../concurrency/solutions-morning.html\"\n\"generics/closures.html\" = \"../traits/closures.html\"\n\"generics/data-types.html\" = \"../generics/generic-data.html\"\n\"generics/methods.html\" = \"../generics/generic-data.html\"\n\"generics/monomorphization.html\" = \"../generics/generic-functions.html\"\n\"generics/trait-objects.html\" = \"../traits/trait-objects.html\"\n\"hello-world/basic-syntax/functions-interlude.html\" = \"../../control-flow-basics/functions.html\"\n\"hello-world/hello-world.html\" = \"../types-and-values/hello-world.html\"\n\"lifetimes/lifetime-annotations.html\" = \"../lifetimes.html\"\n\"memory-management/manual.html\" = \"../memory-management/approaches.html\"\n\"memory-management/rust.html\" = \"../memory-management/ownership.html\"\n\"memory-management/scope-based.html\" = \"../memory-management/approaches.html\"\n\"memory-management/stack.html\" = \"../memory-management/review.html\"\n\"memory-management/stack-vs-heap.html\" = \"../memory-management/review.html\"\n\"methods-and-traits/trait-objects.html\" = \"../smart-pointers/trait-objects.html\"\n\"methods/example.html\" = \"../methods-and-traits/methods.html\"\n\"methods.html\" = \"methods-and-traits/methods.html\"\n\"methods/receiver.html\" = \"../methods-and-traits/methods.html\"\n\"outros-recursos.html\" = \"other-resources.html\"\n\"ownership/borrowing.html\" = \"../borrowing/shared.html\"\n\"ownership/copy-clone.html\" = \"../memory-management/copy-types.html\"\n\"ownership/double-free-modern-cpp.html\" = \"../memory-management/move.html\"\n\"ownership.html\" = \"memory-management/ownership.html\"\n\"ownership/lifetimes-data-structures.html\" = \"../lifetimes/struct-lifetimes.html\"\n\"ownership/lifetimes-function-calls.html\" = \"../lifetimes/lifetime-elision.html\"\n\"ownership/lifetimes.html\" = \"../lifetimes/lifetime-annotations.html\"\n\"ownership/moved-strings-rust.html\" = \"../memory-management/move.html\"\n\"ownership/move-semantics.html\" = \"../memory-management/move.html\"\n\"ownership/moves-function-calls.html\" = \"../memory-management/move.html\"\n\"ownership/shared-unique-borrows.html\" = \"../borrowing/shared.html\"\n\"pattern-matching/destructuring-arrays.html\" = \"../tuples-and-arrays/destructuring.html\"\n\"pattern-matching/destructuring.html\" = \"destructuring-structs.html\"\n\"pattern-matching/match-guards.html\" = \"../tuples-and-arrays/match.html\"\n\"running-the-course/day-4.html\" = \"course-structure.html\"\n\"sintaxe-básica/funções-interlude.html\" = \"../basic-syntax/functions-interlude.html\"\n\"slices-and-lifetimes/exercise.html\" = \"../lifetimes/exercise.html\"\n\"slices-and-lifetimes.html\" = \"lifetimes.html\"\n\"slices-and-lifetimes/lifetime-annotations.html\" = \"../lifetimes/lifetime-annotations.html\"\n\"slices-and-lifetimes/lifetime-elision.html\" = \"../lifetimes/lifetime-elision.html\"\n\"slices-and-lifetimes/slices.html\" = \"../references/slices.html\"\n\"slices-and-lifetimes/solution.html\" = \"../lifetimes/solution.html\"\n\"slices-and-lifetimes/str.html\" = \"../references/strings.html\"\n\"slices-and-lifetimes/struct-lifetimes.html\" = \"../lifetimes/struct-lifetimes.html\"\n\"std/box.html\" = \"../smart-pointers/box.html\"\n\"std/box-niche.html\" = \"../smart-pointers/box.html\"\n\"std/box-recursive.html\" = \"../smart-pointers/box.html\"\n\"std/cell.html\" = \"../borrowing/interior-mutability.html\"\n\"std/hashmap.html\" = \"../std-types/hashmap.html\"\n\"std.html\" = \"std-types/std.html\"\n\"std/option-result.html\" = \"../std-types/option.html\"\n\"std/rc.html\" = \"../smart-pointers/rc.html\"\n\"std/string.html\" = \"../std-types/string.html\"\n\"std/vec.html\" = \"../std-types/vec.html\"\n\"structs/field-shorthand.html\" = \"../user-defined-types/named-structs.html\"\n\"structs.html\" = \"user-defined-types/named-structs.html\"\n\"structs/tuple-structs.html\" = \"../user-defined-types/tuple-structs.html\"\n\"structure.html\" = \"running-the-course/course-structure.html\"\n\"testing/doc-tests.html\" = \"../testing/other.html\"\n\"testing/googletest.html\" = \"../android/testing/googletest.html\"\n\"testing/integration-tests.html\" = \"../testing/other.html\"\n\"testing/mockall.html\" = \"../android/testing/mockall.html\"\n\"testing/useful-crates.html\" = \"../testing.html\"\n\"traits/closures.html\" = \"../std-traits/closures.html\"\n\"traits/default.html\" = \"../std-traits/default.html\"\n\"traits/default-methods.html\" = \"../methods-and-traits/traits.html\"\n\"traits/deriving-traits.html\" = \"../methods-and-traits/deriving.html\"\n\"traits/drop.html\" = \"../memory-management/drop.html\"\n\"traits/from-into.html\" = \"../std-traits/from-and-into.html\"\n\"traits/from-iterator.html\" = \"../iterators/fromiterator.html\"\n\"traits.html\" = \"methods-and-traits/traits.html\"\n\"traits/impl-trait.html\" = \"../generics/impl-trait.html\"\n\"traits/important-traits.html\" = \"../std-traits/comparisons.html\"\n\"traits/iterator.html\" = \"../iterators/iterators.html\"\n\"traits/operators.html\" = \"../std-traits/operators.html\"\n\"traits/read-write.html\" = \"../std-traits/read-and-write.html\"\n\"traits/trait-bounds.html\" = \"../generics/trait-bounds.html\"\n\"traits/trait-objects.html\" = \"../smart-pointers/trait-objects.html\"\n\"tuples-and-arrays/match.html\" = \"../pattern-matching/match.html\"\n\"tuples-and-arrays/tuples-and-arrays.html\" = \"tuples.html\"\n\"types-and-values/strings.html\" = \"../references/strings.html\"\n\"unsafe/calling-unsafe-functions.html\" = \"../unsafe-rust/unsafe-functions.html\"\n\"unsafe/extern-functions.html\" = \"../unsafe-rust/unsafe-functions.html\"\n\"unsafe.html\" = \"unsafe-rust/unsafe.html\"\n\"unsafe/mutable-static-variables.html\" = \"../unsafe-rust/mutable-static.html\"\n\"unsafe/mutable-static-variables.md\" = \"mutable-static-variables.html\"\n\"unsafe/raw-pointers.html\" = \"../unsafe-rust/dereferencing.html\"\n\"unsafe/unions.html\" = \"../unsafe-rust/unions.html\"\n\"unsafe/unsafe-functions.html\" = \"calling-unsafe-functions.html\"\n\"unsafe/unsafe-traits.html\" = \"../unsafe-rust/unsafe-traits.html\"\n\"unsafe/writing-unsafe-functions.html\" = \"../unsafe-rust/unsafe-functions.html\"\n\"user-defined-types/static-and-const.html\" = \"../user-defined-types/static.html\"\n\"welcome-bare-metal.html\" = \"bare-metal.html\"\n\"welcome-day-1/what-is-rust.html\" = \"../hello-world/what-is-rust.html\"\n\"welcome.html\" = \"./\"\n\"why-rust/an-example-in-c.html\" = \"../hello-world/example.html\"\n\"why-rust/compile-time.html\" = \"../hello-world/benefits.html\"\n\"why-rust.html\" = \"hello-world/benefits.html\"\n\"why-rust/modern.html\" = \"../hello-world/benefits.html\"\n\"why-rust/runtime.html\" = \"../hello-world/benefits.html\"\n\n[output.exerciser]\noutput-directory = \"comprehensive-rust-exercises\"\n\n[output.linkcheck]\noptional = true\nfollow-web-links = false # change to true to check web links\nexclude = [\n  \"comprehensive-rust.pdf\",\n  \"comprehensive-rust-exercises.zip\",\n  # \"crates.io\", # uncomment when follow-web-links is true\n]\n\n[output.linkcheck2]\noptional = true\nfollow-web-links = false # change to true to check web links\nexclude = [\n  \"comprehensive-rust.pdf\",\n  \"comprehensive-rust-exercises.zip\",\n  # \"crates.io\", # uncomment when follow-web-links is true\n]\n"
  },
  {
    "path": "dprint.json",
    "content": "{\n  \"lineWidth\": 80,\n  \"json\": {},\n  \"markdown\": {\n    \"textWrap\": \"always\"\n  },\n  \"exec\": {\n    \"commands\": [{\n      \"command\": \"yapf3\",\n      \"exts\": [\"py\"]\n    }, {\n      \"command\": \"rustup run nightly-2025-09-01 rustfmt --edition 2024\",\n      \"exts\": [\"rs\"]\n    }]\n  },\n  \"excludes\": [\n    \"/book/\",\n    \"/theme/*.hbs\",\n    \"/theme/book.js\",\n    \"/third_party/\",\n    \"target/\"\n  ],\n  \"plugins\": [\n    \"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf\",\n    \"https://plugins.dprint.dev/json-0.20.0.wasm\",\n    \"https://plugins.dprint.dev/markdown-0.18.0.wasm\",\n    \"https://plugins.dprint.dev/toml-0.7.0.wasm\",\n    \"https://plugins.dprint.dev/prettier-0.56.0.json@0b67676535141b03f0eb0648172d3a20f13044b3d8df677d645bd79e3ee5147f\"\n  ]\n}\n"
  },
  {
    "path": "mdbook-course/Cargo.toml",
    "content": "[package]\nname = \"mdbook-course\"\nversion = \"0.1.0\"\nauthors = [\"Dustin Mitchell <djmitche@google.com>\"]\nedition = \"2024\"\nlicense = \"Apache-2.0\"\npublish = false\nrepository = \"https://github.com/google/comprehensive-rust\"\ndescription = \"An mdbook preprocessor for comprehensive-rust.\"\n\n[dependencies]\nanyhow = \"1.0.102\"\nclap = \"4.5.60\"\nlazy_static = \"1.5\"\nlog = \"0.4.29\"\nmatter = \"0.1.0-alpha4\"\nmdbook = \"0.4.52\"\npretty_env_logger = \"0.5.0\"\nregex = \"1.12\"\nserde = \"1.0.228\"\nserde_json = \"1.0.149\"\nserde_yaml = \"0.9\"\n"
  },
  {
    "path": "mdbook-course/README.md",
    "content": "# mdbook-course\n\nThis is an mdBook preprocessor to handle some specific details of Comprehensive\nRust.\n\nIt provides three binaries:\n\n- `mdbook-course` -- the actual preprocessor\n- `course-schedule` -- prints the course schedule with timings\n- `course-content` -- dumps all course content to stdout, in order\n\n## Frontmatter\n\nThe preprocessor parses \"frontmatter\" -- YAML between `---` at the beginning of\na Markdown file -- and removes it from the rendered result.\n\nFrontmatter is optional, and can contain any of the following fields, defined\nbelow:\n\n```yaml\nminutes: NNN\ntarget_minutes: NNN\ncourse: COURSE NAME\nsession: SESSION NAME\n```\n\n## Course Structure\n\nA book can contain multiple _courses_. Each course is made up of _sessions_,\nwhich are blocks of instructional time (and include breaks). Typically two\nsessions are taught per day, morning and afternoon.\n\nEach session is comprised of _segments_, which are slides on a related theme.\nBreaks are scheduled between segments.\n\nEach segment is comprised of _slides_. A slide can be made up of one or more\nmdBook chapters.\n\nThe course structure is derived from the mdBook structure. Each top-level mdBook\n\"section\" is treated as a segment, and may optionally begin a new session or\ncourse. Within each section, the first chapter and subsequent second-level\nchapters are each treated as a slide. Any further-nested chapters are treated as\nparts of the parent slide. For example:\n\n```ignore\n- [Frobnication](frobnication.md)\n  - [Integer Frobnication](frobnication/integers.md)\n  - [Frob Expansion](frobnication/expansion.md)\n    - [Structs](frobnication/expansion-structs.md)\n    - [Enums](frobnication/expansion-structs.md)\n  - [Exercise](frobnication/exercise.md)\n    - [Solution](frobnication/Solution.md)\n```\n\nIn this segment, there are four slides: \"Frobnication\", \"Integer Frobnication\",\n\"Frob Expansion\", and \"Exercise\". The last two slides are made up of multiple\nchapters.\n\nThe first chapter of a segment can use the `course` and `session` fields in its\nfrontmatter to indicate that it is the first segment in a session or course.\n\n## Timing\n\nEach chapter should specify an estimate of the instructional time it will\nrequire in the `minutes` field. This information is summed, with breaks\nautomatically added between segments, to give time estimates for segments,\nsessions, and courses.\n\nEach session should list a `target_minutes` that is the target duration of the\nsession.\n\n## Directives\n\nWithin the course material, the following directives can be used:\n\n```\n{{%segment outline}}\n{{%session outline}}\n{{%course outline}}\n{{%course outline COURSENAME}}\n```\n\nThese will be replaced with a markdown outline of the current segment, session,\nor course. The last directive can refer to another course by name and is used in\nthe \"Running the Course\" section.\n\n# Course-Schedule Comments\n\nThe `course-schedule` binary generates Markdown output that is included in a\nGitHub pull request comment, based on the information provided in the above\nformat.\n"
  },
  {
    "path": "mdbook-course/src/bin/course-content.rs",
    "content": "// Copyright 2024 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse mdbook::MDBook;\nuse mdbook_course::course::Courses;\nuse std::fs;\nuse std::path::Path;\n\nfn main() {\n    pretty_env_logger::init();\n    let root_dir = \".\";\n    let mdbook = MDBook::load(root_dir).expect(\"Unable to load the book\");\n    let (courses, _) = Courses::extract_structure(mdbook.book)\n        .expect(\"Unable to extract course structure\");\n\n    let src_dir = Path::new(\"src\");\n    for course in &courses {\n        println!(\"# COURSE: {}\", course.name);\n        for session in course {\n            println!(\"# SESSION: {}\", session.name);\n            for segment in session {\n                println!(\"# SEGMENT: {}\", segment.name);\n                for slide in segment {\n                    println!(\"# SLIDE: {}\", slide.name);\n                    for path in &slide.source_paths {\n                        let content =\n                            fs::read_to_string(src_dir.join(path)).unwrap();\n                        println!(\"{}\", content);\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "mdbook-course/src/bin/course-schedule.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse clap::Command;\nuse mdbook::MDBook;\nuse mdbook_course::course::Courses;\nuse mdbook_course::markdown::duration;\n\nfn main() {\n    pretty_env_logger::init();\n    let app = Command::new(\"mdbook-course\")\n        .about(\"mdbook preprocessor for Comprehensive Rust\")\n        .subcommand(Command::new(\"sessions\").about(\"Show session summary (default)\"))\n        .subcommand(Command::new(\"segments\").about(\"Show segment summary\"))\n        .subcommand(Command::new(\"pr\").about(\"Show summary for a PR\"));\n    let matches = app.get_matches();\n\n    let root_dir = \".\";\n    let mdbook = MDBook::load(root_dir).expect(\"Unable to load the book\");\n    let (courses, _) = Courses::extract_structure(mdbook.book)\n        .expect(\"Unable to extract course structure\");\n\n    match matches.subcommand() {\n        Some((\"session\", _)) | None => session_summary(&courses),\n        Some((\"pr\", _)) => pr_summary(&courses),\n        _ => unreachable!(),\n    }\n}\n\nfn timediff(actual: u64, target: u64, slop: u64) -> String {\n    if actual > target + slop {\n        format!(\n            \"{} (\\u{23f0} *{} too long*)\",\n            duration(actual),\n            duration(actual - target),\n        )\n    } else if actual + slop < target {\n        format!(\"{}: ({} short)\", duration(actual), duration(target - actual),)\n    } else {\n        duration(actual).to_string()\n    }\n}\n\nfn session_summary(courses: &Courses) {\n    for course in courses {\n        if course.target_minutes() == 0 {\n            return;\n        }\n        for session in course {\n            println!(\"### {} // {}\", course.name, session.name);\n            println!(\n                \"_{}_\",\n                timediff(session.minutes(), session.target_minutes(), 15)\n            );\n            println!();\n            for segment in session {\n                println!(\"* {} - _{}_\", segment.name, duration(segment.minutes()));\n            }\n            println!();\n        }\n    }\n}\n\nfn pr_summary(courses: &Courses) {\n    println!(\"## Course Schedule\");\n    println!(\"With this pull request applied, the course schedule is as follows:\");\n    for course in courses {\n        if course.target_minutes() == 0 {\n            return;\n        }\n        println!(\"### {}\", course.name);\n        println!(\"_{}_\", timediff(course.minutes(), course.target_minutes(), 15));\n\n        for session in course {\n            println!(\n                \"* {} - _{}_\",\n                session.name,\n                timediff(session.minutes(), session.target_minutes(), 5)\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "mdbook-course/src/bin/mdbook-course.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse clap::{Arg, Command};\nuse mdbook::book::BookItem;\nuse mdbook::preprocess::CmdPreprocessor;\nuse mdbook_course::course::Courses;\nuse mdbook_course::{replacements, timing_info};\nuse std::io::{stdin, stdout};\nuse std::process;\n\nfn main() {\n    pretty_env_logger::init();\n    let app = Command::new(\"mdbook-course\")\n        .about(\"mdbook preprocessor for Comprehensive Rust\")\n        .subcommand(\n            Command::new(\"supports\").arg(Arg::new(\"renderer\").required(true)),\n        );\n    let matches = app.get_matches();\n\n    if matches.subcommand_matches(\"supports\").is_some() {\n        // Support all renderers.\n        process::exit(0);\n    }\n\n    if let Err(e) = preprocess() {\n        eprintln!(\"{}\", e);\n        process::exit(1);\n    }\n}\n\nfn preprocess() -> anyhow::Result<()> {\n    let (_, book) = CmdPreprocessor::parse_input(stdin())?;\n    let (courses, mut book) = Courses::extract_structure(book)?;\n\n    book.for_each_mut(|chapter| {\n        if let BookItem::Chapter(chapter) = chapter {\n            if let Some((course, session, segment, slide)) =\n                courses.find_slide(chapter)\n            {\n                timing_info::insert_timing_info(slide, chapter);\n                replacements::replace(\n                    &courses,\n                    Some(course),\n                    Some(session),\n                    Some(segment),\n                    chapter,\n                );\n            } else {\n                // Outside of a course, just perform replacements.\n                replacements::replace(&courses, None, None, None, chapter);\n            }\n        }\n    });\n\n    serde_json::to_writer(stdout(), &book)?;\n    Ok(())\n}\n"
  },
  {
    "path": "mdbook-course/src/course.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//! Representation of Comprehensive Rust as a hierarchy of types.\n//!\n//! ```ignore\n//! Courses -- a collection of courses\n//!   Course -- the level of content at which students enroll (fundamentals, android, etc.)\n//!     Session -- a block of instructional time (typically morning or afternoon)\n//!       Segment -- a collection of slides with a related theme\n//!         Slide -- a single topic (may be represented by multiple mdBook chapters)\n//! ```\n//!\n//! This structure is parsed from the format of the book using a combination of\n//! the order in which chapters are listed in `SUMMARY.md` and annotations in\n//! the frontmatter of each chapter.\n//!\n//! A book contains a sequence of BookItems, each of which can contain\n//! sub-items. A top-level item can potentially introduce a new course, session,\n//! segment, and slide all in the same item. If the item has a `course` property\n//! in its frontmatter, then it introduces a new course. If it has a `session`\n//! property, then it introduces a new session. A top-level item always\n//! corresponds 1-to-1 with a segment (as long as it is a chapter), and that\n//! item becomes the first slide in that segment. Any other sub-items of the\n//! top-level item are treated as further slides in the same segment.\n\nuse crate::frontmatter::{Frontmatter, split_frontmatter};\nuse crate::markdown::{Table, duration};\nuse mdbook::book::{Book, BookItem, Chapter};\nuse std::fmt::Write;\nuse std::path::PathBuf;\n\n/// Duration, in minutes, of breaks between segments in the course.\nconst BREAK_DURATION: u64 = 10;\n\n/// Courses is simply a collection of Courses.\n///\n/// Non-instructional material (such as the introduction) has `course: none` and\n/// is not included in this data structure.\n#[derive(Default, Debug)]\npub struct Courses {\n    pub courses: Vec<Course>,\n}\n\n/// A Course is the level of content at which students enroll.\n///\n/// Courses are identified by the `course` property in a session's frontmatter.\n/// All sessions with the same value for `course` are grouped into a Course.\n#[derive(Default, Debug)]\npub struct Course {\n    pub name: String,\n    pub sessions: Vec<Session>,\n}\n\n/// A Session is a block of instructional time, containing segments. Typically a\n/// full day of instruction contains two sessions: morning and afternoon.\n///\n/// A session is identified by the `session` property in the session's\n/// frontmatter. There can be only one session with a given name in a course.\n#[derive(Default, Debug)]\npub struct Session {\n    pub name: String,\n    pub segments: Vec<Segment>,\n    target_minutes: u64,\n}\n\n/// A Segment is a collection of slides with a related theme.\n///\n/// A segment is identified as a top-level chapter within a session.\n#[derive(Default, Debug)]\npub struct Segment {\n    pub name: String,\n    pub slides: Vec<Slide>,\n}\n\n/// A Slide presents a single topic. It may contain multiple mdBook chapters.\n///\n/// A slide is identified as an sub-chapter of a segment. Any sub-items of\n/// that chapter are also included in the slide.\n#[derive(Default, Debug)]\npub struct Slide {\n    pub name: String,\n    /// Minutes this slide should take to teach.\n    pub minutes: u64,\n    /// Source paths (`.md` files) in this slide.\n    pub source_paths: Vec<PathBuf>,\n}\n\nimpl Courses {\n    /// Extract the course structure from the book. As a side-effect, the\n    /// frontmatter is stripped from each slide.\n    pub fn extract_structure(mut book: Book) -> anyhow::Result<(Self, Book)> {\n        let mut courses = Courses::default();\n        let mut current_course_name = None;\n        let mut current_session_name = None;\n\n        for item in &mut book.sections {\n            // We only want to process chapters, omitting part titles and separators.\n            let BookItem::Chapter(chapter) = item else {\n                continue;\n            };\n\n            let (frontmatter, content) = split_frontmatter(chapter)?;\n            chapter.content = content;\n\n            // If 'course' is given, use that course (if not 'none') and reset the\n            // session.\n            if let Some(course_name) = &frontmatter.course {\n                current_session_name = None;\n                if course_name == \"none\" {\n                    current_course_name = None;\n                } else {\n                    current_course_name = Some(course_name.clone());\n                }\n            }\n\n            // If 'session' is given, use that session.\n            if let Some(session_name) = &frontmatter.session {\n                current_session_name = Some(session_name.clone());\n            }\n\n            if current_course_name.is_some() && current_session_name.is_none() {\n                anyhow::bail!(\n                    \"{:?}: 'session' must appear in frontmatter when 'course' appears\",\n                    chapter.path\n                );\n            }\n\n            // If we have a course and session, then add this chapter to it as a\n            // segment.\n            if let (Some(course_name), Some(session_name)) =\n                (&current_course_name, &current_session_name)\n            {\n                let course = courses.course_mut(course_name);\n                let session = course.session_mut(session_name);\n                session.target_minutes += frontmatter.target_minutes.unwrap_or(0);\n                session.add_segment(frontmatter, chapter)?;\n            }\n        }\n        Ok((courses, book))\n    }\n\n    /// Get a reference to a course, adding a new one if none by this name\n    /// exists.\n    fn course_mut(&mut self, name: impl AsRef<str>) -> &mut Course {\n        let name = name.as_ref();\n        if let Some(found_idx) =\n            self.courses.iter().position(|course| course.name == name)\n        {\n            return &mut self.courses[found_idx];\n        }\n        let course = Course::new(name);\n        self.courses.push(course);\n        self.courses.last_mut().unwrap()\n    }\n\n    /// Find a course by name.\n    pub fn find_course(&self, name: impl AsRef<str>) -> Option<&Course> {\n        let name = name.as_ref();\n        self.courses.iter().find(|c| c.name == name)\n    }\n\n    /// Find the slide generated from the given Chapter within these courses,\n    /// returning the \"path\" to that slide.\n    pub fn find_slide(\n        &self,\n        chapter: &Chapter,\n    ) -> Option<(&Course, &Session, &Segment, &Slide)> {\n        let source_path = chapter.source_path.as_ref()?;\n\n        for course in self {\n            for session in course {\n                for segment in session {\n                    for slide in segment {\n                        if slide.source_paths.contains(source_path) {\n                            return Some((course, session, segment, slide));\n                        }\n                    }\n                }\n            }\n        }\n\n        None\n    }\n}\n\nimpl<'a> IntoIterator for &'a Courses {\n    type Item = &'a Course;\n    type IntoIter = std::slice::Iter<'a, Course>;\n\n    fn into_iter(self) -> Self::IntoIter {\n        self.courses.iter()\n    }\n}\n\nimpl Course {\n    fn new(name: impl Into<String>) -> Self {\n        Course { name: name.into(), ..Default::default() }\n    }\n\n    /// Get a reference to a session, adding a new one if none by this name\n    /// exists.\n    fn session_mut(&mut self, name: impl AsRef<str>) -> &mut Session {\n        let name = name.as_ref();\n        if let Some(found_idx) =\n            self.sessions.iter().position(|session| session.name == name)\n        {\n            return &mut self.sessions[found_idx];\n        }\n        let session = Session::new(name);\n        self.sessions.push(session);\n        self.sessions.last_mut().unwrap()\n    }\n\n    /// Return the total duration of this course, as the sum of all segment\n    /// durations.\n    ///\n    /// This includes breaks between segments, but does not count time between\n    /// between sessions.\n    pub fn minutes(&self) -> u64 {\n        self.into_iter().map(|s| s.minutes()).sum()\n    }\n\n    /// Return the target duration of this course, as the sum of all segment\n    /// target durations.\n    ///\n    /// This includes breaks between segments, but does not count time between\n    /// sessions.\n    pub fn target_minutes(&self) -> u64 {\n        self.into_iter().map(|s| s.target_minutes()).sum()\n    }\n\n    /// Generate a Markdown schedule for this course, for placement at the given\n    /// path.\n    pub fn schedule(&self) -> String {\n        let mut outline = String::from(\"Course schedule:\\n\");\n        for session in self {\n            writeln!(\n                &mut outline,\n                \" * {} ({}, including breaks)\\n\",\n                session.name,\n                duration(session.minutes())\n            )\n            .unwrap();\n            let mut segments = Table::new([\"Segment\".into(), \"Duration\".into()]);\n            for segment in session {\n                // Skip short segments (welcomes, wrap-up, etc.)\n                if segment.minutes() == 0 {\n                    continue;\n                }\n                segments\n                    .add_row([segment.name.clone(), duration(segment.minutes())]);\n            }\n            writeln!(&mut outline, \"{}\\n\", segments).unwrap();\n        }\n        outline\n    }\n}\n\nimpl<'a> IntoIterator for &'a Course {\n    type Item = &'a Session;\n    type IntoIter = std::slice::Iter<'a, Session>;\n\n    fn into_iter(self) -> Self::IntoIter {\n        self.sessions.iter()\n    }\n}\n\nimpl Session {\n    fn new(name: impl Into<String>) -> Self {\n        Session { name: name.into(), ..Default::default() }\n    }\n\n    /// Add a new segment to the session, representing sub-items as slides.\n    fn add_segment(\n        &mut self,\n        frontmatter: Frontmatter,\n        chapter: &mut Chapter,\n    ) -> anyhow::Result<()> {\n        let mut segment = Segment::new(&chapter.name);\n        segment.add_slide(frontmatter, chapter, false)?;\n        for sub_chapter in &mut chapter.sub_items {\n            let BookItem::Chapter(sub_chapter) = sub_chapter else {\n                continue;\n            };\n            let (frontmatter, content) = split_frontmatter(sub_chapter)?;\n            sub_chapter.content = content;\n\n            segment.add_slide(frontmatter, sub_chapter, true)?;\n        }\n        self.segments.push(segment);\n        Ok(())\n    }\n\n    /// Generate a Markdown outline for this session, for placement at the given\n    /// path.\n    pub fn outline(&self) -> String {\n        let mut segments = Table::new([\"Segment\".into(), \"Duration\".into()]);\n        for segment in self {\n            // Skip short segments (welcomes, wrap-up, etc.)\n            if segment.minutes() == 0 {\n                continue;\n            }\n            segments.add_row([segment.name.clone(), duration(segment.minutes())]);\n        }\n        format!(\n            \"Including {BREAK_DURATION} minute breaks, this session should take about {}. It contains:\\n\\n{}\",\n            duration(self.minutes()),\n            segments\n        )\n    }\n\n    /// Return the total duration of this session.\n    pub fn minutes(&self) -> u64 {\n        let instructional_time: u64 = self.into_iter().map(|s| s.minutes()).sum();\n        if instructional_time == 0 {\n            return instructional_time;\n        }\n        let breaks = (self.into_iter().filter(|s| s.minutes() > 0).count() - 1)\n            as u64\n            * BREAK_DURATION;\n        instructional_time + breaks\n    }\n\n    /// Return the target duration of this session.\n    ///\n    /// This includes breaks between segments.\n    pub fn target_minutes(&self) -> u64 {\n        if self.target_minutes > 0 { self.target_minutes } else { self.minutes() }\n    }\n}\n\nimpl<'a> IntoIterator for &'a Session {\n    type Item = &'a Segment;\n    type IntoIter = std::slice::Iter<'a, Segment>;\n\n    fn into_iter(self) -> Self::IntoIter {\n        self.segments.iter()\n    }\n}\n\nimpl Segment {\n    fn new(name: impl Into<String>) -> Self {\n        Segment { name: name.into(), ..Default::default() }\n    }\n\n    /// Create a slide from a chapter. If `recurse` is true, sub-items of this\n    /// chapter are included in this slide as well.\n    fn add_slide(\n        &mut self,\n        frontmatter: Frontmatter,\n        chapter: &mut Chapter,\n        recurse: bool,\n    ) -> anyhow::Result<()> {\n        let mut slide = Slide::new(frontmatter, chapter);\n\n        if recurse {\n            slide.add_sub_chapters(chapter)?;\n        }\n        self.slides.push(slide);\n        Ok(())\n    }\n\n    /// Return the total duration of this segment (the sum of the durations of\n    /// the enclosed slides).\n    pub fn minutes(&self) -> u64 {\n        self.into_iter().map(|s| s.minutes()).sum()\n    }\n\n    pub fn outline(&self) -> String {\n        let mut slides = Table::new([\"Slide\".into(), \"Duration\".into()]);\n        for slide in self {\n            if slide.minutes() == 0 {\n                continue;\n            }\n            slides.add_row([slide.name.clone(), duration(slide.minutes())]);\n        }\n        format!(\n            \"This segment should take about {}. It contains:\\n\\n{}\",\n            duration(self.minutes()),\n            slides,\n        )\n    }\n}\n\nimpl<'a> IntoIterator for &'a Segment {\n    type Item = &'a Slide;\n    type IntoIter = std::slice::Iter<'a, Slide>;\n\n    fn into_iter(self) -> Self::IntoIter {\n        self.slides.iter()\n    }\n}\n\nimpl Slide {\n    fn new(frontmatter: Frontmatter, chapter: &Chapter) -> Self {\n        let mut slide = Self { name: chapter.name.clone(), ..Default::default() };\n        slide.add_frontmatter(&frontmatter);\n        slide.push_source_path(&chapter.source_path);\n        slide\n    }\n\n    fn add_frontmatter(&mut self, frontmatter: &Frontmatter) {\n        self.minutes += frontmatter.minutes.unwrap_or(0);\n    }\n\n    fn push_source_path(&mut self, source_path: &Option<PathBuf>) {\n        if let Some(source_path) = &source_path {\n            self.source_paths.push(source_path.clone());\n        }\n    }\n\n    /// Add sub-chapters of this chapter to this slide (recursively).\n    fn add_sub_chapters(&mut self, chapter: &mut Chapter) -> anyhow::Result<()> {\n        for sub_slide in &mut chapter.sub_items {\n            let BookItem::Chapter(sub_slide) = sub_slide else {\n                continue;\n            };\n            let (frontmatter, content) = split_frontmatter(sub_slide)?;\n            sub_slide.content = content;\n\n            if frontmatter.course.is_some() || frontmatter.session.is_some() {\n                anyhow::bail!(\n                    \"{:?}: sub-slides may not have 'course' or 'session' set\",\n                    sub_slide.path\n                );\n            }\n            self.add_frontmatter(&frontmatter);\n            self.push_source_path(&sub_slide.source_path);\n            self.add_sub_chapters(sub_slide)?;\n        }\n        Ok(())\n    }\n\n    /// Determine whether the given chapter is a sub-chapter of this slide.\n    pub fn is_sub_chapter(&self, chapter: &Chapter) -> bool {\n        // The first `source_path` in the slide is the \"parent\" chapter, so anything\n        // else is a sub-chapter.\n        chapter.source_path.as_ref() != self.source_paths.first()\n    }\n\n    /// Return the total duration of this slide.\n    pub fn minutes(&self) -> u64 {\n        self.minutes\n    }\n}\n"
  },
  {
    "path": "mdbook-course/src/frontmatter.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse anyhow::Context;\nuse matter::matter;\nuse mdbook::book::Chapter;\nuse serde::Deserialize;\n\n#[derive(Deserialize, Debug, Default)]\npub struct Frontmatter {\n    pub minutes: Option<u64>,\n    pub target_minutes: Option<u64>,\n    pub course: Option<String>,\n    pub session: Option<String>,\n}\n\n/// Split a chapter's contents into frontmatter and the remaining contents.\npub fn split_frontmatter(\n    chapter: &Chapter,\n) -> anyhow::Result<(Frontmatter, String)> {\n    if let Some((frontmatter, content)) = matter(&chapter.content) {\n        let frontmatter: Frontmatter = serde_yaml::from_str(&frontmatter)\n            .with_context(|| {\n                format!(\"error parsing frontmatter in {:?}\", chapter.source_path)\n            })?;\n\n        Ok((frontmatter, content))\n    } else {\n        Ok((Frontmatter::default(), chapter.content.clone()))\n    }\n}\n"
  },
  {
    "path": "mdbook-course/src/lib.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npub mod course;\npub mod frontmatter;\npub mod markdown;\npub mod replacements;\npub mod timing_info;\n"
  },
  {
    "path": "mdbook-course/src/markdown.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse std::fmt;\nuse std::path::Path;\n\n/// Given a source_path for the markdown file being rendered and a source_path\n/// for the target, generate a relative link.\npub fn relative_link(\n    doc_path: impl AsRef<Path>,\n    target_path: impl AsRef<Path>,\n) -> String {\n    let doc_path = doc_path.as_ref();\n    let target_path = target_path.as_ref();\n\n    let mut dotdot = -1;\n    for parent in doc_path.ancestors() {\n        if target_path.starts_with(parent) {\n            break;\n        }\n        dotdot += 1;\n    }\n    if dotdot > 0 {\n        format!(\"{}{}\", \"../\".repeat(dotdot as usize), target_path.display())\n    } else {\n        format!(\"./{}\", target_path.display())\n    }\n}\n\n/// Represent the given duration in a human-readable way.\n///\n/// This will round times longer than 5 minutes to the next 5-minute interval.\npub fn duration(mut minutes: u64) -> String {\n    if minutes > 5 {\n        minutes += 4;\n        minutes -= minutes % 5;\n    }\n\n    let (hours, minutes) = (minutes / 60, minutes % 60);\n    match (hours, minutes) {\n        (0, 1) => \"1 minute\".into(),\n        (0, m) => format!(\"{m} minutes\"),\n        (1, 0) => \"1 hour\".into(),\n        (1, m) => format!(\"1 hour and {m} minutes\"),\n        (h, 0) => format!(\"{h} hours\"),\n        (h, m) => format!(\"{h} hours and {m} minutes\"),\n    }\n}\n\n/// Table implements Display to format a two-dimensional table as markdown,\n/// following https://github.github.com/gfm/#tables-extension-.\npub struct Table<const N: usize> {\n    header: [String; N],\n    rows: Vec<[String; N]>,\n}\n\nimpl<const N: usize> Table<N> {\n    pub fn new(header: [String; N]) -> Self {\n        Self { header, rows: Vec::new() }\n    }\n\n    pub fn add_row(&mut self, row: [String; N]) {\n        self.rows.push(row);\n    }\n\n    fn write_row<'a, I: Iterator<Item = &'a str>>(\n        &self,\n        f: &mut fmt::Formatter<'_>,\n        iter: I,\n    ) -> fmt::Result {\n        write!(f, \"|\")?;\n        for cell in iter {\n            write!(f, \" {} |\", cell)?;\n        }\n        writeln!(f)\n    }\n}\n\nimpl<const N: usize> fmt::Display for Table<N> {\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n        self.write_row(f, self.header.iter().map(|s| s.as_str()))?;\n        self.write_row(f, self.header.iter().map(|_| \"-\"))?;\n        for row in &self.rows {\n            self.write_row(f, row.iter().map(|s| s.as_str()))?;\n        }\n        Ok(())\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use super::*;\n\n    #[test]\n    fn relative_link_same_dir() {\n        assert_eq!(\n            relative_link(Path::new(\"welcome.md\"), Path::new(\"hello-world.md\")),\n            \"./hello-world.md\".to_string()\n        );\n    }\n\n    #[test]\n    fn relative_link_subdir() {\n        assert_eq!(\n            relative_link(\n                Path::new(\"hello-world.md\"),\n                Path::new(\"hello-world/foo.md\")\n            ),\n            \"./hello-world/foo.md\".to_string()\n        );\n    }\n\n    #[test]\n    fn relative_link_parent_dir() {\n        assert_eq!(\n            relative_link(\n                Path::new(\"references/foo.md\"),\n                Path::new(\"hello-world.md\")\n            ),\n            \"../hello-world.md\".to_string()\n        );\n    }\n\n    #[test]\n    fn relative_link_deep_parent_dir() {\n        assert_eq!(\n            relative_link(\n                Path::new(\"references/foo/bar.md\"),\n                Path::new(\"hello-world.md\")\n            ),\n            \"../../hello-world.md\".to_string()\n        );\n    }\n\n    #[test]\n    fn relative_link_peer_dir() {\n        assert_eq!(\n            relative_link(\n                Path::new(\"references/foo.md\"),\n                Path::new(\"hello-world/foo.md\")\n            ),\n            \"../hello-world/foo.md\".to_string()\n        );\n    }\n\n    #[test]\n    fn duration_no_time() {\n        assert_eq!(duration(0), \"0 minutes\");\n    }\n\n    #[test]\n    fn duration_single_minute() {\n        assert_eq!(duration(1), \"1 minute\");\n    }\n\n    #[test]\n    fn duration_two_minutes() {\n        assert_eq!(duration(2), \"2 minutes\");\n    }\n\n    #[test]\n    fn duration_seven_minutes() {\n        assert_eq!(duration(7), \"10 minutes\");\n    }\n\n    #[test]\n    fn duration_hour() {\n        assert_eq!(duration(60), \"1 hour\");\n    }\n\n    #[test]\n    fn duration_hour_mins() {\n        assert_eq!(duration(61), \"1 hour and 5 minutes\");\n    }\n\n    #[test]\n    fn duration_hours() {\n        assert_eq!(duration(120), \"2 hours\");\n    }\n\n    #[test]\n    fn duration_hours_mins() {\n        assert_eq!(duration(130), \"2 hours and 10 minutes\");\n    }\n\n    #[test]\n    fn table() {\n        let mut table = Table::new([\"a\".into(), \"b\".into()]);\n        table.add_row([\"a1\".into(), \"b1\".into()]);\n        table.add_row([\"a2\".into(), \"b2\".into()]);\n        assert_eq!(\n            format!(\"{}\", table),\n            \"| a | b |\\n| - | - |\\n| a1 | b1 |\\n| a2 | b2 |\\n\"\n        );\n    }\n}\n"
  },
  {
    "path": "mdbook-course/src/replacements.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse crate::course::{Course, Courses, Segment, Session};\nuse mdbook::book::Chapter;\nuse regex::Regex;\n\nlazy_static::lazy_static! {\n    static ref DIRECTIVE: Regex = Regex::new(r#\"\\{\\{%([^}]*)}}\"#).unwrap();\n}\n\n/// Replace supported directives with the relevant content.\n///\n/// See the mdbook-course README for details.\n#[allow(unused_variables)]\npub fn replace(\n    courses: &Courses,\n    course: Option<&Course>,\n    session: Option<&Session>,\n    segment: Option<&Segment>,\n    chapter: &mut Chapter,\n) {\n    let Some(source_path) = &chapter.source_path else {\n        return;\n    };\n    chapter.content = DIRECTIVE\n        .replace_all(&chapter.content, |captures: &regex::Captures| {\n            let directive_str = captures[1].trim();\n            let directive: Vec<_> = directive_str.split_whitespace().collect();\n            match directive.as_slice() {\n                [\"session\", \"outline\"] if session.is_some() => {\n                    session.unwrap().outline()\n                }\n                [\"segment\", \"outline\"] if segment.is_some() => {\n                    segment.unwrap().outline()\n                }\n                [\"course\", \"outline\"] if course.is_some() => {\n                    course.unwrap().schedule()\n                }\n                [\"course\", \"outline\", course_name @ ..] => {\n                    let course_name = course_name.join(\" \");\n                    let Some(course) = courses.find_course(course_name) else {\n                        return format!(\"not found - {}\", &captures[0]);\n                    };\n                    course.schedule()\n                }\n                _ => directive_str.to_owned(),\n            }\n        })\n        .to_string();\n}\n"
  },
  {
    "path": "mdbook-course/src/timing_info.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse crate::course::Slide;\nuse mdbook::book::Chapter;\n\n/// Insert timing information for this slide into the speaker notes.\npub fn insert_timing_info(slide: &Slide, chapter: &mut Chapter) {\n    if slide.minutes > 0\n        && !slide.is_sub_chapter(chapter)\n        && chapter.content.contains(\"<details>\")\n    {\n        // Include the minutes in the speaker notes.\n        let minutes = slide.minutes;\n        let plural = if slide.minutes == 1 { \"minute\" } else { \"minutes\" };\n        let mut subslides = \"\";\n        if slide.source_paths.len() > 1 {\n            subslides = \"and its sub-slides \";\n        }\n        let timing_message =\n            format!(\"This slide {subslides}should take about {minutes} {plural}. \");\n        chapter.content = chapter\n            .content\n            .replace(\"<details>\", &format!(\"<details>\\n{timing_message}\"));\n    }\n}\n"
  },
  {
    "path": "mdbook-exerciser/Cargo.toml",
    "content": "[package]\nname = \"mdbook-exerciser\"\nversion = \"0.1.0\"\nauthors = [\"Andrew Walbran <qwandor@google.com>\"]\nedition = \"2024\"\nlicense = \"Apache-2.0\"\nrepository = \"https://github.com/google/comprehensive-rust\"\ndescription = \"A tool for extracting starter code for exercises from Markdown files.\"\n\n[dependencies]\nanyhow = \"1.0.102\"\nlog = \"0.4.29\"\nmdbook = \"0.4.52\"\npretty_env_logger = \"0.5.0\"\npulldown-cmark = { version = \"0.13.1\", default-features = false }\n"
  },
  {
    "path": "mdbook-exerciser/README.md",
    "content": "# exerciser\n\nThis is an mdBook renderer to generate templates for exercises from the Markdown\nsource. Given a Markdown file `example.md` with one or more sections like:\n\n````markdown\n<!-- File src/main.rs -->\n\n```rust,compile_fail\n{{#include example/src/main.rs:main}}\n\nfn some_more_code() {\n    // TODO: Write some Rust code here.\n}\n```\n````\n\nand mdbook configuration in `book.toml` like:\n\n```toml\n[output.exerciser]\noutput-directory = \"comprehensive-rust-exercises\"\n```\n\nIt will create a file\n`book/exerciser/comprehensive-rust-exercises/example/src/main.rs` with the\nappropriate contents.\n"
  },
  {
    "path": "mdbook-exerciser/src/lib.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse log::{info, trace};\nuse pulldown_cmark::{Event, Parser, Tag, TagEnd};\nuse std::fs::{File, create_dir_all};\nuse std::io::Write;\nuse std::path::Path;\n\nconst FILENAME_START: &str = \"<!-- File \";\nconst FILENAME_END: &str = \" -->\";\n\npub fn process(output_directory: &Path, input_contents: &str) -> anyhow::Result<()> {\n    let parser = Parser::new(input_contents);\n\n    // Find a specially-formatted comment followed by a code block, and then call\n    // `write_output` with the contents of the code block, to write to a file\n    // named by the comment. Code blocks without matching comments will be\n    // ignored, as will comments which are not followed by a code block.\n    let mut next_filename: Option<String> = None;\n    let mut current_file: Option<File> = None;\n    for event in parser {\n        trace!(\"{:?}\", event);\n        match event {\n            Event::Html(html) => {\n                let html = html.trim();\n                if html.starts_with(FILENAME_START) && html.ends_with(FILENAME_END) {\n                    next_filename = Some(\n                        html[FILENAME_START.len()..html.len() - FILENAME_END.len()]\n                            .to_string(),\n                    );\n                    info!(\"Next file: {:?}:\", next_filename);\n                }\n            }\n            Event::Start(Tag::CodeBlock(x)) => {\n                info!(\"Start {:?}\", x);\n                if let Some(filename) = &next_filename {\n                    let full_filename = output_directory.join(filename);\n                    info!(\"Opening {:?}\", full_filename);\n                    if let Some(directory) = full_filename.parent() {\n                        create_dir_all(directory)?;\n                    }\n                    current_file = Some(File::create(full_filename)?);\n                    next_filename = None;\n                }\n            }\n            Event::Text(text) => {\n                info!(\"Text: {:?}\", text);\n                if let Some(output_file) = &mut current_file {\n                    output_file.write_all(text.as_bytes())?;\n                }\n            }\n            Event::End(TagEnd::CodeBlock) => {\n                info!(\"End\");\n                current_file = None;\n            }\n            _ => {}\n        }\n    }\n\n    Ok(())\n}\n"
  },
  {
    "path": "mdbook-exerciser/src/main.rs",
    "content": "// Copyright 2023 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse anyhow::Context;\nuse log::trace;\nuse mdbook::BookItem;\nuse mdbook::book::Book;\nuse mdbook::renderer::RenderContext;\nuse mdbook_exerciser::process;\nuse std::fs::{create_dir, remove_dir_all};\nuse std::io::stdin;\nuse std::path::Path;\n\nfn main() -> anyhow::Result<()> {\n    pretty_env_logger::init();\n\n    let context = RenderContext::from_json(&mut stdin()).context(\"Parsing stdin\")?;\n\n    let config = context\n        .config\n        .get_renderer(\"exerciser\")\n        .context(\"Missing output.exerciser configuration\")?;\n\n    let output_directory = Path::new(\n        config\n            .get(\"output-directory\")\n            .context(\n                \"Missing output.exerciser.output-directory configuration value\",\n            )?\n            .as_str()\n            .context(\"Expected a string for output.exerciser.output-directory\")?,\n    );\n\n    let _ = remove_dir_all(output_directory);\n    create_dir(output_directory).with_context(|| {\n        format!(\"Failed to create output directory {:?}\", output_directory)\n    })?;\n\n    process_all(&context.book, output_directory)?;\n\n    Ok(())\n}\n\nfn process_all(book: &Book, output_directory: &Path) -> anyhow::Result<()> {\n    for item in book.iter() {\n        if let BookItem::Chapter(chapter) = item {\n            trace!(\"Chapter {:?} / {:?}\", chapter.path, chapter.source_path);\n            if let Some(chapter_path) = &chapter.path {\n                // Put the exercises in a subdirectory named after the chapter file,\n                // without its parent directories.\n                let chapter_output_directory =\n                    output_directory.join(chapter_path.file_stem().with_context(\n                        || format!(\"Chapter {:?} has no file stem\", chapter_path),\n                    )?);\n                process(&chapter_output_directory, &chapter.content)?;\n            }\n        }\n    }\n\n    Ok(())\n}\n"
  },
  {
    "path": "po/ar.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-07-09T12:20:23-07:00\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\n\"\n\"Language: ar\\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 src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"مرحبًا بكم في Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"تشغيل الدورة\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"هيكل الدورة\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"(keyboard shortcuts) اختصارات لوحة المفاتيح\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"الترجمات\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"استخدام Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"(Code Samples) عينات الكود\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"تشغيل Cargo محليًا\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"مرحبًا\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"مرحبًا، أيها العالم\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"ما هي Rust؟\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"فوائد Rust\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"مكان لتجربة اللغة (playground)\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"الأنواع والقيم\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"المتغيرات\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"القيم\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"الحساب\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"استنباط النوع \"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"الحل\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"أساسيات التحكم في التدفق\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"تعبيرات `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"الحلقات\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"الحلقة `for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"حلقة\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"كسر واستمرار\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"تسميات\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"الكتل والنطاقات\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"النطاقات والتظليل\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"الدوال\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"الماكروهات\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"تمرين: تسلسل كولاتز\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 1: Afternoon\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Tuples and Arrays\"\nmsgstr \"الأنواع والقيم\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"المصفوفات\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"الصفوف\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"الدوران على عناصر المصفوفة\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"الأنماط والتفكيك\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"تمرين: المصفوفات المتداخلة\"\n\n#: src/SUMMARY.md src/references.md\n#, fuzzy\nmsgid \"References\"\nmsgstr \"استنباط النوع \"\n\n#: src/SUMMARY.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"مراجع مشتركة\"\n\n#: src/SUMMARY.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"مراجع حصرية\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"الشرائح: `&[T]`\"\n\n#: src/SUMMARY.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"السلاسل النصية\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"تمرين: هندسة الأشكال\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"أنواع معرفة من قبل المستخدم\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"هياكل مسماة\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"Tuple Structs\"\nmsgstr \"هيكل الصفوف\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"التعدادات\"\n\n#: src/SUMMARY.md\nmsgid \"Static\"\nmsgstr \"ثابت الذاكرة (Static)\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"الثوابت (Const)\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"أسماء مستعارة للنوع\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"تمرين: أحداث المصعد\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 2: Morning\"\nmsgstr \"اليوم الثاني: صباحا\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"مطابقة الأنماط\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"مطابقة القيم\"\n\n#: src/SUMMARY.md\nmsgid \"Destructuring Structs\"\nmsgstr \"تفكيك الهياكل\"\n\n#: src/SUMMARY.md\nmsgid \"Destructuring Enums\"\nmsgstr \"تفكيك التعدادات\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"دع التحكم في التدفق\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"الدوال\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"سمات\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"تنفيذ السمات\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"السمات الفائقة\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"الأنواع المرتبطة\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"اشتقاق\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"تمرين: مسجل عام\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 2: Afternoon\"\nmsgstr \"اليوم الثاني: بعد الظهر\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"التعميم\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"الدوال المعممة\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"أنواع البيانات المعممة\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"السمات المعممة\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"حدود السمات\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"تطوير السمات `impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"تطوير السمات المتغيرة `dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\n#, fuzzy\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"أنواع المكتبة القياسية\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"المكتبة القياسية\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"المستندات التوثيقية (Documentation)\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"الخيار (`Option`)\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"النتيجة (`Result`)\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"السلاسل النصية (`String`)\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"المصفوفات (`Vec`)\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"خريطة المشفرة (`HashMap`)\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"تمرين: عداد\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"سمات المكتبة القياسية\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"مقارنات\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"المشغلات (Operators)\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"السمات (من و إلى) (`From` and `Into`)\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"التحويل\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"السمات (القراءة و الكتابة) (`Read` and `Write`)\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"الإفتراضي، بناء جملة تحديث البنية (`Default`, struct update syntax)\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"الإغلاقات\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"تمرين: ROT13\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 3: Morning\"\nmsgstr \"اليوم الثالث: صباحا\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"إدارة الذاكرة\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"مراجعة ذاكرة البرنامج\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"طرق إدارة الذاكرة\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"الملكية\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"دلالات النقل\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"الاستنساخ\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"أنواع النسخ\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"تمرين: نمط البناء\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"المؤشرات الذكية\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"`(Owned Trait Objects)` كائنات السمات المملوكة\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 3: Afternoon\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"الاستعارة (Borrowing)\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"استعارة قيمة\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"فحص الاستعارة (Borrow Checking)\"\n\n#: src/SUMMARY.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"أخطاء الاستعارة (Borrow Errors)\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"القابلية للتغيير الداخلي (Interior Mutability)\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"(Health Statistics) تمرين: إحصاءات الصحة\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"فترات الحياة (Lifetimes)\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"تعليقات فترة الحياة (Lifetime Annotations)\"\n\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"حذف فترة الحياة (Lifetime Elision)\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"فترات حياة الهيكل (Struct Lifetimes)\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"تمرين: تحليل Protobuf (Protobuf Parsing)\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Morning\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"المكررات (Iterators)\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator` (المكرر)\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator` (إلى مكرر)\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator` (من مكرر)\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"تمرين: تسلسل طرق المكرر (Iterator Method Chaining)\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"الوحدات (Modules)\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"التسلسل الهرمي لنظام الملفات (Filesystem Hierarchy)\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"الرؤية (Visibility)\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"\"\n\"تمرين: الوحدات لمكتبة واجهة المستخدم الرسومية (Modules for a GUI Library)\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"الاختبار (Testing)\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"وحدات الاختبار (Test Modules)\"\n\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"أنواع أخرى من الاختبارات (Other Types of Tests)\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"التحذيرات البرمجية  (Compiler Lints) و Clippy\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"تمرين: خوارزمية لون (Luhn Algorithm)\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Afternoon\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"معالجة الأخطاء (Error Handling)\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panics\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"مشغل المحاولة (Try Operator)\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"محاولات التحويل (Try Conversions)\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"سمة `Error` (Error Trait)\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` و `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"تمرين: إعادة الكتابة باستخدام `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust غير الآمنة (Unsafe Rust)\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"غير آمن (Unsafe)\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"إلغاء مرجعية المؤشرات الخام (Dereferencing Raw Pointers)\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"المتغيرات الثابتة القابلة للتغيير (Mutable Static Variables)\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"الاتحادات (Unions)\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"الدوال غير الآمنة (Unsafe Functions)\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"السمات غير الآمنة (Unsafe Traits)\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"أندرويد (Android)\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"الإعداد (Setup)\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"قواعد البناء (Build Rules)\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"ثنائي (Binary)\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"مكتبة (Library)\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"دليل خدمة عيد الميلاد (Birthday Service Tutorial)\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"الواجهة (Interface)\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"واجهة برمجة التطبيقات للخدمة (Service API)\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"الخدمة (Service)\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"الخادم (Server)\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"النشر (Deploy)\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"العميل (Client)\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"تغيير واجهة برمجة التطبيقات (Changing API)\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"تحديث التنفيذات (Updating Implementations)\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"أنواع AIDL (AIDL Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"الأنواع الأولية (Primitive Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"أنواع المصفوفات (Array Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"إرسال الكائنات (Sending Objects)\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"المتغيرات\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"إرسال الملفات (Sending Files)\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"المحاكاة (Mocking)\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"التسجيل (Logging)\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"قابلية التشغيل البيني (Interoperability)\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"مع C (With C)\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"استدعاء C باستخدام Bindgen (Calling C with Bindgen)\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"استدعاء Rust من C (Calling Rust from C)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"مع C++ (With C++)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"وحدة الجسر (The Bridge Module)\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"جسر Rust (Rust Bridge)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"C++ المُولَّد (Generated C++)\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"جسر C++ (C++ Bridge)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"الأنواع المشتركة (Shared Types)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"التعدادات المشتركة (Shared Enums)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"معالجة الأخطاء في Rust (Rust Error Handling)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"معالجة الأخطاء في C++ (C++ Error Handling)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"الأنواع الإضافية (Additional Types)\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"البناء لأندرويد: C++ (Building for Android: C++)\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"البناء لأندرويد: قواعد التوليد (Building for Android: Genrules)\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"البناء لأندرويد: Rust (Building for Android: Rust)\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"مع Java (With Java)\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"التمارين\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"كروميوم (Chromium)\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\"مقارنة بين بيئات Chromium و Cargo (Comparing Chromium and Cargo Ecosystems)\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"سياسة الاستخدام (Policy)\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"الكود غير الآمن (Unsafe Code)\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\"الاعتماد على كود Rust من Chromium C++ (Depending on Rust Code from Chromium \"\n\"C++)\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"فيجوال ستوديو كود (Visual Studio Code)\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"تمرين (Exercise)\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"مكتبة `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"قواعد GN لاختبارات Rust (GN Rules for Rust Tests)\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"ماكرو Macro `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"التشغيل البيني مع C++ (Interoperability with C++)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"أمثلة على الربط (Example Bindings)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"قيود CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"معالجة الأخطاء في CXX (CXX Error Handling)\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"معالجة الأخطاء (Error Handling): مثال QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"معالجة الأخطاء: مثال PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"استخدام CXX في Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"إضافة كريت الطرف الثالث (third party Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"تهيئة Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"تهيئة `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"تنزيل الحزم (Crates)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"توليد قواعد البناء Generating `gn` Build Rules\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"حل المشاكل\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"برامج البناء التي تولد الكود (Build Scripts Which Generate Code)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\"برامج البناء التي تبني C++ أو تتخذ إجراءات عشوائية (Build Scripts Which \"\n\"Build C++ or Take Arbitrary Actions)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"الاعتماد على كريت (Depending on a Crate)\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"المراجعات والتدقيقات (Reviews and Audits)\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"التحقق من مصدر الكود Chromium (Checking into Chromium Source Code)\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"الحفاظ على الكريتات محدثة (Keeping Crates Up to Date)\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"جمعها معًا - تمرين (Bringing It Together - Exercise)\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Bare Metal: Morning\"\nmsgstr \"اليوم الأول: صباحا\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"مثال بسيط\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"المتحكمات الدقيقة (Microcontrollers)\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO الخام (Raw MMIO)\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"حزم الوصول المحيطي (PACs)\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"حزم طبقة تجريد الأجهزة (HAL Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"حزم دعم اللوحة (Board Support Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"نمط حالة النوع (The Type State Pattern)\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` و `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"تتبع الأخطاء (Debugging)\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"مشاريع أخرى\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"بوصلة (Compass)\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"حلول (Solutions)\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: بعد الظهر\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"معالجات التطبيقات\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"الاستعداد للبرمجة بلغة Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"التجميع المضمن (Inline Assembly)\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO (إدخال/إخراج الذاكرة المعين)\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"لنكتب برنامج تشغيل UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"المزيد من السمات (Traits)\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"برنامج تشغيل UART أفضل\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"أعلام البت (Bitflags)\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"سجلات متعددة (Multiple Registers)\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"برنامج تشغيل (Driver)\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Using It\"\nmsgstr \"استخدام Cargo\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"استثناءات (Exceptions)\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"كريتات مفيدة ( Useful Crates)\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"برنامج تشغيل RTC (RTC Driver)\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"التزامن: الصباح (Concurrency)\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"الخيوط البرمجية (Threads)\"\n\n#: src/SUMMARY.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Plain Threads\"\n\n#: src/SUMMARY.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"الخيوط البرمجية المحددة النطاق (Scoped Threads)\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"القنوات (Channels)\"\n\n#: src/SUMMARY.md src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"المرسلون والمستقبلون (Senders and Receivers)\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"القنوات غير المحدودة (Unbounded Channels)\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"القنوات المحدودة (Bounded Channels)\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` و `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"سمات العلامات (Marker Traits)\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Examples\"\nmsgstr \"أمثلة (Examples)\"\n\n#: src/SUMMARY.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"الحالة المشتركة (Shared State)\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"مثال (Example)\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Dining Philosophers\"\nmsgstr \"عشاء الفلاسفة (Dining Philosophers)\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"مدقق الروابط متعدد الخيوط (Multi-threaded Link Checker)\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"التزامن: بعد الظهر (Concurrency)\"\n\n#: src/SUMMARY.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"أساسيات البرمجة غير المتزامنة (Async Basics)\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"المستقبلات (Futures)\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"وقت التشغيل (Runtimes)\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"طوكيو (Tokio)\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async/tasks.md src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"المهام (Tasks)\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"القنوات وتدفق التحكم (Channels and Control Flow)\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"القنوات غير المتزامنة (Async Channels)\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"الانضمام (Join)\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"اختيار (Select)\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"المزالق (Pitfalls)\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"حجب المنفذ (Blocking the Executor)\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"السمات غير المتزامنة (Async Traits)\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"Cancellation\"\nmsgstr \"الإلغاء (Cancellation)\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"تطبيق الدردشة الجماعية (Broadcast Chat Application)\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"كلمات أخيرة (Final Words)\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"شكرًا! (Thanks!)\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"مسرد المصطلحات (Glossary)\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"موارد أخرى (Other Resources)\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"الشكر والتقدير (Credits)\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![سير العمل للبناء](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[مساهمون GitHub](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![نجوم GitHub](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"هذه دورة مجانية عن Rust تم تطويرها بواسطة فريق Android في Google. تغطي \"\n\"الدورة النطاق الكامل لـ Rust، من بناء الجملة الأساسي إلى المواضيع المتقدمة \"\n\"مثل generics ومعالجة الأخطاء.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"يمكن العثور على أحدث إصدار من الدورة على <https://google.github.io/\"\n\"comprehensive-rust/>. إذا كنت تقرأ في مكان آخر، يرجى التحقق هناك للحصول على \"\n\"التحديثات.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"الدورة متاحة بلغات أخرى. اختر لغتك المفضلة في الزاوية العلوية اليمنى من \"\n\"الصفحة أو تحقق من صفحة [Translations](running-the-course/translations.md) \"\n\"للحصول على قائمة بجميع الترجمات المتاحة.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"الدورة متاحة أيضًا [كملف PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"هدف الدورة هو تعليمك Rust. نفترض أنك لا تعرف أي شيء عن Rust ونأمل أن تتعلمها:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"نقدم لك فهماً شاملاً لبناء  (syntax) جملة Rust و لغة البرمجة.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"تمكينك من تعديل البرامج الحالية وكتابة برامج جديدة بلغة Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"نوضح لك التعابير الشائعة في Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"نسمي الأيام الأربعة الأولى من الدورة أساسيات Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"بناءً على ذلك، أنت مدعو للتعمق في موضوع أو أكثر من المواضيع المتخصصة:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): دورة نصف يومية حول استخدام Rust لتطوير منصة Android \"\n\"(AOSP). يتضمن ذلك التوافق مع C و C++ و Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): دورة نصف يومية حول استخدام Rust داخل المتصفحات \"\n\"المبنية على Chromium. يتضمن ذلك التوافق مع C++ وكيفية تضمين الحزم الخارجية \"\n\"(crates) في Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): دورة ليوم كامل حول استخدام Rust لتطوير الأنظمة \"\n\"المضمنة (bare-metal). يتم تغطية كل من المتحكمات الدقيقة ومعالجات التطبيقات.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency.md): دورة ليوم كامل حول البرمجة المتزامنة في Rust. \"\n\"نغطي كل من البرمجة المتزامنة التقليدية (الجدولة الاستباقية باستخدام الخيوط \"\n\"(threads) والأقفال (mutexes)) والبرمجة المتزامنة باستخدام async/await (تعدد \"\n\"المهام التعاوني باستخدام futures).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"الأهداف غير المقصودة (Non-Goals)\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust هي لغة كبيرة ولن نتمكن من تغطية كل شيء في بضعة أيام. بعض الأهداف غير \"\n\"المقصودة لهذه الدورة هي:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"تعلم كيفية تطوير الماكروز (macros): يرجى الاطلاع على [الفصل 19.5 في كتاب \"\n\"Rust](https://doc.rust-lang.org/book/ch19-06-macros.html) و [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) بدلاً من ذلك.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"افتراضات\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"تفترض الدورة أنك تعرف بالفعل كيفية البرمجة. Rust هي لغة ذات نوع ثابت \"\n\"(statically-typed) وسنقوم أحيانًا بإجراء مقارنات مع C و C++ لشرح أو مقارنة \"\n\"منهج Rust بشكل أفضل.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"إذا كنت تعرف كيفية البرمجة بلغة ذات نوع ديناميكي مثل Python أو JavaScript، \"\n\"فستتمكن من المتابعة بشكل جيد أيضًا.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"هذا مثال على _ملاحظة المتحدث_. سنستخدم هذه لإضافة معلومات إضافية إلى \"\n\"الشرائح. يمكن أن تكون هذه النقاط الرئيسية التي يجب على المدرب تغطيتها \"\n\"بالإضافة إلى الاجابة على الأسئلة النموذجية التي تطرح في الفصل.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"هذه الصفحة مخصصة لمدرب الدورة.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"إليك بعض المعلومات الأساسية حول كيفية تشغيلنا للدورة داخليًا في Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"عادةً ما نجري الفصول الدراسية من الساعة 9:00 صباحًا حتى 4:00 مساءً، مع استراحة \"\n\"غداء لمدة ساعة في المنتصف. يترك هذا 3 ساعات للفصل الصباحي و 3 ساعات للفصل \"\n\"المسائي. تحتوي كلتا الجلستين على فترات راحة متعددة ووقت للطلاب للعمل على \"\n\"التمارين.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"قبل أن تدير الدورة، ستحتاج إلى:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"تعرف على مواد الدورة. لقد قمنا بتضمين ملاحظات المتحدث للمساعدة في تسليط \"\n\"الضوء على النقاط الرئيسية (يرجى مساعدتنا من خلال المساهمة بمزيد من ملاحظات \"\n\"المتحدث!). عند العرض، يجب عليك التأكد من فتح ملاحظات المتحدث في نافذة منبثقة \"\n\"(انقر على الرابط مع السهم الصغير بجانب \\\"ملاحظات المتحدث\\\"). بهذه الطريقة، \"\n\"سيكون لديك شاشة نظيفة لتقديمها إلى الفصل.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"حدد التواريخ. نظرًا لأن الدورة تستغرق أربعة أيام، نوصي بجدولة الأيام على مدى \"\n\"أسبوعين. قال المشاركون في الدورة إنهم يجدون أنه من المفيد أن يكون هناك فجوة \"\n\"زمنيةفي الدورة لأنها تساعدهم على معالجة جميع المعلومات التي نقدمها لهم.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"ابحث عن غرفة كبيرة بما يكفي للمشاركين. نوصي بحجم فصل من 15-25 شخصًا. هذا \"\n\"الحجم صغير بما يكفي ليشعر الناس بالراحة عند طرح الأسئلة --- كما أنه صغير بما \"\n\"يكفي ليتمكن مدرب واحد من الإجابة على الأسئلة. تأكد من أن الغرفة تحتوي على \"\n\"_مكاتب_ لك وللطلاب: ستحتاجون جميعًا إلى الجلوس والعمل باستخدام أجهزة \"\n\"الكمبيوتر المحمولة الخاصة بكم. على وجه الخصوص، ستقوم بالكثير من البرمجة \"\n\"الحية كمدرب، لذا فإن المنصة لن تكون مفيدة جدًا لك.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"في يوم الدورة، احضر إلى الغرفة مبكرًا قليلاً لإعداد الأشياء. نوصي بالعرض \"\n\"مباشرة باستخدام `mdbook serve` الذي يعمل على جهاز الكمبيوتر المحمول الخاص بك \"\n\"(راجع [تعليمات التثبيت](https://github.com/google/comprehensive-\"\n\"rust#building)). يضمن هذا الأداء الأمثل عدم التأخير عند تغيير الصفحات. \"\n\"استخدام جهاز الكمبيوتر المحمول الخاص بك سيسمح لك أيضًا بإصلاح الأخطاء \"\n\"المطبعية عند اكتشافها من قبلك أو من قبل المشاركين في الدورة.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"دع المشاركون يحلون التمارين بأنفسهم أو في مجموعات صغيرة. نحن عادة نقضي 30-45 \"\n\"دقيقة على التمارين في الصباح وبعد الظهر (بما في ذلك الوقت لمراجعة الحلول). \"\n\"تأكد من سؤال الناس إذا كانوا عالقين أو إذا كان هناك أي شيء يمكنك المساعدة \"\n\"به. عندما ترى أن عدة أشخاص لديهم نفس المشكلة، إشرح المشكلة والحل للجميع، على \"\n\"سبيل المثال، من خلال إظهار الناس أين يجدون المعلومات ذات الصلة في مكتبة \"\n\"standard library.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"هذا كل شيء، حظاً سعيداً في إدارة الدورة! نأمل أن تكون ممتعة لك كما كانت لنا!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"يرجى [تقديم ملاحظات](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) بعد ذلك حتى نتمكن من تحسين الدورة باستمرار. نود أن نسمع ما \"\n\"الذي نجح معك وما الذي يمكن تحسينه. طلابك مرحب بهم أيضاً [لإرسال ملاحظاتهم]\"\n\"(https://github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"أساسيات Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"الأيام الأربعة الأولى تشكل [أساسيات Rust](../welcome-day-1.md). الأيام سريعة \"\n\"الوتيرة ونغطي الكثير من المواضيع!\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"هيكل الدورة\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"اليوم الأول صباحاً (ساعتان و5 دقائق، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[ترحيب](../welcome-day-1.md) (5 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md) (15 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\nmsgstr \"[Types and Values](../types-and-values.md) (40 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"[Control Flow Basics](../control-flow-basics.md) (40 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"اليوم الأول بعد الظهر (ساعتان و35 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tuples و Arrays](../tuples-and-arrays.md) (35 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (55 minutes)\"\nmsgstr \"[References](../references.md) (55 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[User-Defined Types](../user-defined-types.md) (50 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"اليوم الثاني صباحاً (ساعتان و10 دقائق، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[ترحيب](../welcome-day-2.md) (3 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[Pattern Matching](../pattern-matching.md) (ساعة واحدة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Methods و Traits](../methods-and-traits.md) (50 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"اليوم الثاني بعد الظهر (3 ساعات و15 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"[Generics](../generics.md) (45 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour)\"\nmsgstr \"[Standard Library Types](../std-types.md) (ساعة واحدة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 10 minutes)\"\nmsgstr \"[Standard Library Traits](../std-traits.md) (ساعة و10 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"اليوم الثالث صباحاً (ساعتان و20 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[ترحيب](../welcome-day-3.md) (3 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[Memory Management](../memory-management.md) (ساعة واحدة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[Smart Pointers](../smart-pointers.md) (55 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"اليوم الثالث بعد الظهر (ساعة و55 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (55 minutes)\"\nmsgstr \"[Borrowing](../borrowing.md) (55 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\nmsgstr \"[Lifetimes](../lifetimes.md) (50 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"اليوم الرابع صباحاً (ساعتان و40 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[ترحيب](../welcome-day-4.md) (3 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[Iterators](../iterators.md) (45 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[Modules](../modules.md) (40 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[Testing](../testing.md) (45 دقيقة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"اليوم الرابع بعد الظهر (ساعتان و15 دقيقة، بما في ذلك فترات الاستراحة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (1 hour)\"\nmsgstr \"[Error Handling](../error-handling.md) (ساعة واحدة)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[Unsafe Rust](../unsafe-rust.md) (ساعة و5 دقائق)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"التعمق في المواضيع\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"بالإضافة إلى الدورة التي تستمر 4 أيام حول أساسيات Rust، نغطي بعض المواضيع \"\n\"المتخصصة الأخرى:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust في Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"التعمق في [Rust في Android](../android.md) هو دورة نصف يوم حول استخدام Rust \"\n\"لتطوير منصة Android. يتضمن ذلك التوافق مع C، C++، و Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"ستحتاج إلى [AOSP checkout](https://source.android.com/docs/setup/download/\"\n\"downloading). قم بعمل checkout لمستودع [الدورة](https://github.com/google/\"\n\"comprehensive-rust) على نفس الجهاز وانقل دليل `src/android/` إلى جذر AOSP \"\n\"checkout الخاص بك. سيضمن ذلك أن نظام بناء Android يرى ملفات `Android.bp` في \"\n\"`src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"تأكد من أن `adb sync` يعمل مع المحاكي أو الجهاز الحقيقي وقم ببناء جميع أمثلة \"\n\"Android مسبقًا باستخدام `src/android/build_all.sh`. اقرأ السكربت لترى الأوامر \"\n\"التي يقوم بتشغيلها وتأكد من أنها تعمل عند تشغيلها يدويًا.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust في Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"التعمق في [Rust في Chromium](../chromium.md) هو دورة نصف يوم حول استخدام \"\n\"Rust كجزء من متصفح Chromium. يتضمن استخدام Rust في نظام بناء Chromium `gn`، \"\n\"وجلب مكتبات الطرف الثالث (\\\"crates\\\") والتوافق مع C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"ستحتاج إلى أن تكون قادرًا على بناء Chromium --- يوصى ببناء مكون Debug \"\n\"[recommended](../chromium/setup.md) للسرعة ولكن أي بناء سيعمل. تأكد من أنك \"\n\"تستطيع تشغيل متصفح Chromium الذي قمت ببنائه.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust على الأنظمة المدمجة (Bare-Metal)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"التعمق في [Bare-Metal Rust](../bare-metal.md) هو دورة كاملة لمدة يوم حول \"\n\"استخدام Rust لتطوير الأنظمة المدمجة (bare-metal). يتم تغطية كل من المتحكمات \"\n\"الدقيقة (microcontrollers) ومعالجات التطبيقات (application processors).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"بالنسبة لجزء المتحكم الدقيق، ستحتاج إلى شراء لوحة التطوير [BBC micro:bit]\"\n\"(https://microbit.org/) v2 مسبقًا. سيحتاج الجميع إلى تثبيت عدد من الـ \"\n\"packages كما هو موضح في [صفحة الترحيب](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"التزامن (Concurrency) في Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"التعمق في [Concurrency في Rust](../concurrency.md) هو دورة كاملة لمدة يوم \"\n\"حول التزامن الكلاسيكي وكذلك `async`/`await`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"ستحتاج إلى إعداد حزمة جديدة (crate) وتنزيل التبعيات (dependencies) وجعلها \"\n\"جاهزة. يمكنك بعد ذلك نسخ/لصق الأمثلة في `src/main.rs` لتجربتها:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"{{%course outline Concurrency}}\"\nmsgstr \"{{%course outline Concurrency}}\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"التنسيق (Format)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"تم تصميم الدورة لتكون تفاعلية للغاية ونوصي بترك الأسئلة توجه لاستكشاف Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"هناك العديد من اختصارات لوحة المفاتيح المفيدة في mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"السهم-الأيسر (Arrow-Left)\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": الانتقال إلى الصفحة السابقة.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"السهم-الأيمن (Arrow-Right)\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": الانتقال إلى الصفحة التالية.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": تنفيذ عينة الكود التي تركز عليها.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": تفعيل شريط البحث.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"تمت ترجمة الدورة إلى لغات أخرى من قبل مجموعة رائعة من المتطوعين:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[البرتغالية البرازيلية](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"بواسطة [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), و \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[الصينية (المبسطة)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"بواسطة [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), و [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[الصينية (التقليدية)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"بواسطة [@hueich](https://github.com/hueich), [@victorhsieh](https://github.\"\n\"com/victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen]\"\n\"(https://github.com/kuanhungchen), و [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[اليابانية](https://google.github.io/comprehensive-rust/ja/) بواسطة [@CoinEZ-\"\n\"JPN](https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) و \"\n\"[@kantasv](https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[الكورية](https://google.github.io/comprehensive-rust/ko/) بواسطة [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), و [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[الإسبانية](https://google.github.io/comprehensive-rust/es/) بواسطة [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[الأوكرانية](https://google.github.io/comprehensive-rust/uk/) بواسطة [@git-\"\n\"user-cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) و [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"استخدم منتقي اللغة في الزاوية العلوية اليمنى للتبديل بين اللغات.\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"Incomplete Translations\"\nmsgstr \"الترجمات غير المكتملة\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"هناك عدد كبير من الترجمات قيد التقدم. نحن نربط بأحدث الترجمات المحدثة:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[العربية](https://google.github.io/comprehensive-rust/ar/) بواسطة [@younies]\"\n\"(https://github.com/younies)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[البنغالية](https://google.github.io/comprehensive-rust/bn/) بواسطة \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[الفرنسية](https://google.github.io/comprehensive-rust/fr/) بواسطة [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) و \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[الألمانية](https://google.github.io/comprehensive-rust/de/) بواسطة [@Throvn]\"\n\"(https://github.com/Throvn) و [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[الإيطالية](https://google.github.io/comprehensive-rust/it/) بواسطة \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) و [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"إذا كنت ترغب في المساعدة في هذا الجهد، يرجى الاطلاع على [تعليماتنا](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) لمعرفة كيفية \"\n\"البدء. يتم تنسيق الترجمات على [issue tracker](https://github.com/google/\"\n\"comprehensive-rust/issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"عندما تبدأ في قراءة Rust، ستتعرف قريبًا على [Cargo](https://doc.rust-lang.org/\"\n\"cargo/)، الأداة القياسية المستخدمة في نظام Rust لبناء وتشغيل تطبيقات Rust. \"\n\"هنا نريد أن نقدم نظرة عامة موجزة عن ماهية Cargo وكيف يتناسب مع النظام البيئي \"\n\"الأوسع وكيف يتناسب مع هذا التدريب.\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"Installation\"\nmsgstr \"التثبيت\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**يرجى اتباع التعليمات على <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"سيمنحك هذا أداة بناء Cargo (`cargo`) ومترجم Rust (`rustc`). ستحصل أيضًا على \"\n\"`rustup`، وهي أداة سطر الأوامر التي يمكنك استخدامها لتثبيت إصدارات مختلفة من \"\n\"المترجم.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"بعد تثبيت Rust، يجب عليك تكوين محرر النصوص أو بيئة التطوير المتكاملة (IDE) \"\n\"للعمل مع Rust. تقوم معظم المحررات بذلك عن طريق التحدث إلى [rust-analyzer]\"\n\"(https://rust-analyzer.github.io/)، الذي يوفر وظيفة الإكمال التلقائي \"\n\"والانتقال إلى التعريف لـ [VS Code](https://code.visualstudio.com/)، [Emacs]\"\n\"(https://rust-analyzer.github.io/manual.html#emacs)، [Vim/Neovim](https://\"\n\"rust-analyzer.github.io/manual.html#vimneovim)، والعديد من المحررات الأخرى. \"\n\"هناك أيضًا بيئة تطوير متكاملة مختلفة متاحة تسمى [RustRover](https://www.\"\n\"jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"على Debian/Ubuntu، يمكنك أيضًا تثبيت Cargo، مصدر Rust و [Rust formatter]\"\n\"(https://github.com/rust-lang/rustfmt) عبر `apt`. ومع ذلك، ستحصل على إصدار \"\n\"قديم من Rust وقد يؤدي ذلك إلى سلوك غير متوقع. سيكون الأمر:\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"على macOS، يمكنك استخدام [Homebrew](https://brew.sh/) لتثبيت Rust، ولكن قد \"\n\"يوفر هذا إصدارًا قديمًا. لذلك، يُوصى بتثبيت Rust من الموقع الرسمي.\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"The Rust Ecosystem\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"يتكون النظام البيئي ل Rust من عدد من الأدوات، من أهمها:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: مترجم Rust الذي يحول ملفات `.rs` إلى ملفات تنفيذية وصيغ وسيطة أخرى.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: مدير التبعية وأداة البناء لـ Rust. يعرف Cargo كيفية تنزيل التبعيات، \"\n\"عادةً ما تكون مستضافة على <https://crates.io>، وسوف يمررها إلى `rustc` عند \"\n\"بناء مشروعك. يأتي Cargo أيضًا مع مشغل اختبارات مدمج يستخدم لتنفيذ الإختبارات \"\n\"الوحدة.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: مثبت ومحدث أدوات Rust. تُستخدم هذه الأداة لتثبيت وتحديث `rustc` و \"\n\"`cargo` عند إصدار نسخ جديدة من Rust. بالإضافة إلى ذلك، يمكن لـ `rustup` أيضًا \"\n\"تنزيل التوثيق للمكتبة القياسية(standard library). يمكنك تثبيت عدة إصدارات من Rust في وقت واحد \"\n\"و `rustup` سيسمح لك بالتبديل بينها حسب الحاجة.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"نقاط رئيسية:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"لدى Rust جدول إصدارات سريع مع إصدار جديد كل ستة أسابيع. تحافظ الإصدارات \"\n\"الجديدة على التوافق العكسي مع الإصدارات القديمة --- بالإضافة إلى إِتاحة \"\n\"وظائف جديدة.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"هناك·ثلاث·قنوات·إصدار:·\\\"stable\\\"·(مستقر)،·\\\"beta\\\"·(بيتا)،\"\n\"·و\\\"nightly\\\"·(ليلي).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"يتم اختبار الميزات الجديدة على \\\"nightly\\\" (ليلي)، و\\\"beta\\\" (بيتا) هو ما \"\n\"يصبح \\\"stable\\\" (مستقر) كل ستة أسابيع.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"يمكن أيضًا حل التبعيات من [سجلات](https://doc.rust-lang.org/cargo/reference/\"\n\"registries.html) بديلة، git، المجلدات، والمزيد.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"لدى Rust أيضًا [إصدارات](https://doc.rust-lang.org/edition-guide/): الإصدار \"\n\"الحالي هو Rust 2021. الإصدارات السابقة كانت Rust 2015 و Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"تُسمح الإصدارات بإجراء تغييرات غير متوافقة (backwards incompatible) مع \"\n\"الإصدارات السابقة على اللغة.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"لتجنب إفساد الكود (breaking code)، تكون الإصدارات اختيارية (opt-in): يمكنك \"\n\"اختيار الإصدار لمكتبتك عبر ملف `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"لتجنب تقسيم النظام البيئي، يمكن لمترجمات Rust مزج الكود المكتوب لإصدارات \"\n\"مختلفة.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"اذكر أنه من النادر جدًا استخدام المترجم مباشرةً دون استخدام `cargo` (معظم \"\n\"المستخدمين لا يفعلون ذلك).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"قد يكون من المفيد الإشارة إلى أن Cargo نفسه هو أداة قوية وشاملة للغاية. إنه \"\n\"قادر على العديد من الميزات المتقدمة بما في ذلك على سبيل المثال لا الحصر:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"هيكل المشروع/الحزمة (Project/package structure)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[مساحات العمل](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"تبعيات التطوير (Dev Depenedency) و إدارة/تخزين مُؤَقَّتٌ للتبعيات وقت التشغيل\"\n\"التشغيل (Runtime Dependency management/caching)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[برمجة البناء (build scripting)](https://doc.rust-lang.org/cargo/reference/\"\n\"build-scripts.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[التثبيت الشامل](https://doc.rust-lang.org/cargo/commands/cargo-install.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"كما أنه قابل للتوسعة باستخدام ملحقات الأوامر الفرعية (sub command plugins) \"\n\"أيضًا (مثل [cargo clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"اقرأ المزيد من [الكتاب الرسمي لـ Cargo](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"عينات الكود (Code Samples) في هذا التدريب\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"في هذا التدريب، سنستكشف لغة Rust بشكل أساسي من خلال أمثلة يمكن تنفيذها عبر \"\n\"المتصفح. هذا يجعل الإعداد أسهل بكثير ويضمن تجربة متسقة للجميع.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"لا يزال يُنصح بتثبيت Cargo: سيسهل عليك القيام بالتمارين. في اليوم الأخير، \"\n\"سنقوم بتمرين أكبر يوضح لك كيفية العمل مع الاعتماديات (dependencies) ولهذا \"\n\"تحتاج إلى Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"كتل الأكواد (code blocks) في هذه الدورة تفاعلية بالكامل:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"حررني (Edit me)!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"يمكنك استخدام \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \"لتنفيذ الكود (code) عندما يكون التركيز في مربع النص.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"معظم عينات الكود (code samples) قابلة للتحرير كما هو موضح أعلاه. بعض عينات \"\n\"الكود غير قابلة للتحرير لأسباب مختلفة:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"لا يمكن للـ playgrounds المدمجة تنفيذ اختبارات الوحدة (unit tests). قم بنسخ \"\n\"ولصق الكود (code) وافتحه في الـ Playground الحقيقي لعرض اختبارات الوحدة.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"تفقد الـ playgrounds المدمجة حالتها بمجرد التنقل بعيدًا عن الصفحة! هذا هو \"\n\"السبب في أن الطلاب يجب أن يحلوا التمارين باستخدام تثبيت محلي لـ Rust أو عبر \"\n\"الـ Playground.\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"تشغيل الكود محليًا باستخدام Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"إذا كنت تريد تجربة الكود على نظامك الخاص، فستحتاج أولاً إلى تثبيت Rust. قم \"\n\"بذلك باتباع [التعليمات في كتاب Rust](https://doc.rust-lang.org/book/ch01-01-\"\n\"installation.html). يجب أن يمنحك هذا `rustc` و `cargo` يعملان. في وقت كتابة \"\n\"هذا، تحتوي أحدث إصدارات Rust المستقرة على هذه الأرقام:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"يمكنك استخدام أي إصدار لاحق أيضًا لأن Rust يحافظ على التوافق العكسي \"\n\"(backwards compatibility).\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"مع وجود هذا، اتبع هذه الخطوات لبناء ملف ثنائي (binary) لـ Rust من أحد \"\n\"الأمثلة في هذا التدريب:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"انقر على زر \\\"نسخ إلى الحافظة (Copy to clipboard)\\\" على المثال الذي تريد \"\n\"نسخه.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"استخدم `cargo new exercise` لإنشاء دليل جديد `exercise/` لكودك:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"انتقل إلى `exercise/` واستخدم `cargo run` لبناء وتشغيل الملف الثنائي الخاص \"\n\"بك:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"استبدل الكود النموذجي في `src/main.rs` بكودك الخاص. على سبيل المثال، \"\n\"باستخدام المثال في الصفحة السابقة، اجعل `src/main.rs` يبدو كالتالي:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"استخدم `cargo run` لبناء وتشغيل الملف الثنائي المحدث الخاص بك:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"استخدم `cargo check` للتحقق بسرعة من مشروعك بحثًا عن الأخطاء، واستخدم `cargo \"\n\"build` لترجمته دون تشغيله. ستجد المخرجات في `target/debug/` لبناء تصحيح \"\n\"عادي. استخدم `cargo build --release` لإنتاج بناء إصدار محسن في `target/\"\n\"release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"يمكنك إضافة التبعيات (dependencies) لمشروعك عن طريق تحرير `Cargo.toml`. عند \"\n\"تشغيل أوامر `cargo`، سيقوم تلقائيًا بتنزيل وتجميع التبعيات (dependencies) \"\n\"المفقودة لك.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"حاول تشجيع المشاركين في الفصل على تثبيت Cargo واستخدام محرر محلي (local \"\n\"editor). سيسهل ذلك حياتهم لأنهم سيكون لديهم بيئة تطوير عادية (normal \"\n\"development environment).\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Welcome to Day 1\"\nmsgstr \"مرحبًا بكم في اليوم الأول\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"هذا هو اليوم الأول من أساسيات Rust. سنغطي الكثير من المواضيع اليوم:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"بنية Rust الأساسية: المتغيرات، الأنواع العددية والمركبة، التعدادات (enums)، \"\n\"الهياكل (structs)، المراجع (references)، الدوال (functions)، والطرق \"\n\"(methods).\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"الأنواع (Types) واستنباط النوع (type inference)\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\"بنيات التحكم في التدفق (Control flow constructs): الحلقات (loops)، العبارات \"\n\"الشرطية (conditionals)، وهكذا.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"الأنواع المعرفة من قبل المستخدم: الهياكل (structs) والتعدادات (enums).\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\"مطابقة الأنماط: تفكيك التعدادات (destructuring enums)، الهياكل (structs)، \"\n\"والمصفوفات (arrays).\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"الجدول الزمني\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"In this session:\"\nmsgstr \"في هذه الجلسة:\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[مرحبًا](./welcome-day-1.md) (5 دقائق)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](./hello-world.md) (15 دقيقة)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\nmsgstr \"[الأنواع والقيم (Types and Values)](./types-and-values.md) (40 دقيقة)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"\"\n\"[أساسيات التحكم في التدفق (Control Flow Basics)](./control-flow-basics.md) \"\n\"(40 دقيقة)\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\"بما في ذلك فترات استراحة لمدة 10 دقائق، يجب أن تستغرق هذه الجلسة حوالي \"\n\"ساعتين و5 دقائق\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"يرجى تذكير الطلاب بأن:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"يجب عليهم طرح الأسئلة عندما يحصلون عليها، لا يحتفظون بها حتى النهاية.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"الفصل الدراسي مصمم ليكون تفاعليًا ويتم تشجيع النقاشات بشكل كبير!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"بصفتك مدربًا، يجب أن تحاول إبقاء النقاشات ذات صلة، أي إبقاء النقاشات متعلقة \"\n\"بكيفية قيام Rust بالأشياء مقابل بعض اللغات الأخرى. قد يكون من الصعب العثور \"\n\"على التوازن الصحيح، ولكن من الأفضل السماح بالنقاشات لأنها تشرك الناس أكثر \"\n\"بكثير من التواصل في اتجاه واحد (one-way communication).\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"من المحتمل أن تعني الأسئلة أننا سنتحدث عن الأشياء قبل الشرائح.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"هذا مقبول تمامًا! التكرار جزء مهم من التعلم. تذكر أن الشرائح هي مجرد دعم وأنت \"\n\"حر في تخطيها كما تشاء.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"الفكرة في اليوم الأول هي عرض الأشياء \\\"الأساسية\\\" في Rust التي يجب أن يكون \"\n\"لها نظائر فورية في لغات البرمجة الأخرى. تأتي الأجزاء الأكثر تقدمًا من Rust في \"\n\"الأيام التالية.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"إذا كنت تدرس هذا في الفصل الدراسي، فهذا مكان جيد لمراجعة الجدول الزمني. لاحظ \"\n\"أن هناك تمرينًا في نهاية كل جزء، يليه استراحة. خطط لتغطية حل التمرين بعد \"\n\"الاستراحة. الأوقات المدرجة هنا هي اقتراح للحفاظ على سير الدورة وفقًا للجدول \"\n\"الزمني. لا تتردد في أن تكون مرنًا وتعدل حسب الضرورة!\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"In this segment:\"\nmsgstr \"في هذا الجزء:\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"[ما هو Rust؟](./hello-world/what-is-rust.md) (10 دقائق)\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"[فوائد Rust](./hello-world/benefits.md) (3 دقائق)\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"[Playground](./hello-world/playground.md) (2 دقائق)\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"يجب أن يستغرق هذا الجزء حوالي 15 دقيقة\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust هي لغة برمجة جديدة تم إصدار نسختها [1.0 في عام 2015](https://blog.rust-\"\n\"lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Rust هي لغة مترجمة بشكل ثابت (statically compiled) وتؤدي دورًا مشابهًا لـ C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` يستخدم LLVM كخلفية له.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust يدعم العديد من [المنصات والهياكل](https://doc.rust-lang.org/nightly/\"\n\"rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86، ARM، WebAssembly، ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux، Mac، Windows، ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"يُستخدم Rust لمجموعة واسعة من الأجهزة:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"البرامج الثابتة (firmware) ومحملات الإقلاع (boot loaders),\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"الشاشات الذكية,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"الهواتف المحمولة,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"أجهزة الكمبيوتر المكتبية,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"الخوادم.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust يناسب نفس مجال C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"مرونة عالية.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"مستوى عالٍ من التحكم.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"يمكن تقليصه ليعمل على الأجهزة ذات الموارد المحدودة مثل المتحكمات الدقيقة \"\n\"(microcontrollers).\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"لا يحتوي على وقت تشغيل (runtime) أو جمع القمامة (garbage collection).\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"يركز على الموثوقية والأمان دون التضحية بالأداء.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"بعض نقاط البيع الفريدة لـ Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"أمان الذاكرة وقت الترجمة (Compile time memory safety) - يتم منع فئات كاملة \"\n\"من أخطاء الذاكرة أثناء وقت الترجمة\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"لا توجد متغيرات غير مهيأة (uninitialized variables).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"لا يوجد تحرير مزدوج للذاكرة (double-frees).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"لا يوجد استخدام بعد التحرير (use-after-free).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"لا توجد مؤشرات `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"لا توجد أقفال متروكة (forgotten locked mutexes).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"لا توجد سباقات بيانات بين الخيوط (data races between threads).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"لا يوجد إبطال للمكررات (iterator invalidation).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"لا يوجد سلوك غير محدد وقت التشغيل (undefined runtime behavior) - ما يفعله \"\n\"تصريح Rust لا يُترك غير محدد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"\"\n\"يتم التحقق من حدود الوصول إلى المصفوفة (Array access is bounds checked).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"\"\n\"يتم تعريف تجاوز السعة العددية (Integer overflow) (إما panic أو wrap-around).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"ميزات اللغة الحديثة (Modern language features) - معبرة ومريحة مثل اللغات \"\n\"عالية المستوى.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"التعدادات (Enums) ومطابقة الأنماط (pattern matching).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"الأنماط العامة (Generics).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"لا يوجد عبء إضافي لواجهة استدعاء الوظائف الأجنبية (FFI).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"تجريدات بدون تكلفة (Zero-cost abstractions).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"أخطاء مترجم رائعة (Great compiler errors).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"مدير التبعيات المدمج (Built-in dependency manager).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"دعم مدمج للاختبار (Built-in support for testing).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"دعم ممتاز لبروتوكول خادم اللغة (Language Server Protocol).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"لا تقضِ الكثير من الوقت هنا. سيتم تغطية جميع هذه النقاط بمزيد من العمق لاحقًا.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"تأكد من سؤال الفصل عن اللغات التي لديهم خبرة بها. بناءً على الإجابة، يمكنك \"\n\"تسليط الضوء على ميزات مختلفة لـ Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"الخبرة مع C أو C++: يقضي Rust على فئة كاملة من أخطاء وقت التشغيل (runtime \"\n\"errors) عبر مدقق الاقتراض (borrow checker). تحصل على أداء مثل C و C++، ولكن \"\n\"بدون مشاكل عدم أمان الذاكرة. بالإضافة إلى ذلك، تحصل على لغة حديثة مع تراكيب \"\n\"مثل مطابقة الأنماط (pattern matching) وإدارة التبعيات المدمجة (built-in \"\n\"dependency management).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"الخبرة مع Java، Go، Python، JavaScript...: تحصل على نفس أمان الذاكرة كما في \"\n\"تلك اللغات، بالإضافة إلى شعور لغة عالية المستوى مماثل. بالإضافة إلى ذلك، \"\n\"تحصل على أداء سريع ومتوقع مثل C و C++ (بدون جامع القمامة (garbage \"\n\"collector)) وكذلك الوصول إلى الأجهزة منخفضة المستوى (إذا كنت بحاجة إليها).\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"يوفر [Rust Playground](https://play.rust-lang.org/) طريقة سهلة لتشغيل برامج \"\n\"Rust القصيرة، وهو الأساس للأمثلة والتمارين في هذه الدورة. جرب تشغيل برنامج \"\n\"\\\"hello-world\\\" الذي يبدأ به. يأتي مع بعض الميزات المفيدة:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"تحت \\\"الأدوات\\\"، استخدم خيار `rustfmt` لتنسيق الكود الخاص بك بالطريقة \"\n\"\\\"القياسية\\\".\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"لدى Rust ملفان رئيسيان لتوليد الكود: Debug (فحص إضافي في وقت التشغيل، تحسين \"\n\"أقل) و Release (فحص أقل في وقت التشغيل، تحسين كبير). يمكن الوصول إليهما تحت \"\n\"\\\"Debug\\\" في الأعلى.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"إذا كنت مهتمًا، استخدم \\\"ASM\\\" تحت \\\"...\\\" لرؤية كود التجميع (assembly code) \"\n\"الناتج.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"عندما يتوجه الطلاب إلى الاستراحة، شجعهم على فتح الملعب (playground) والتجربة \"\n\"قليلاً. شجعهم على إبقاء علامة تبويب المتصفح مفتوحة وتجربة الأشياء خلال بقية الدورة. هذا \"\n\"مفيد بشكل خاص للطلاب المتقدمين الذين يريدون معرفة المزيد عن تحسينات Rust أو \"\n\"كود التجميع (assembly) الناتج.\"\n\n#: src/types-and-values.md\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Hello, World](./types-and-values/hello-world.md) (5 دقائق)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[Variables](./types-and-values/variables.md) (5 دقائق)\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[القيم](./types-and-values/values.md) (5 دقائق)\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[الحساب](./types-and-values/arithmetic.md) (3 دقائق)\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[استنتاج النوع](./types-and-values/inference.md) (3 دقائق)\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"[تمرين: فيبوناتشي](./types-and-values/exercise.md) (15 دقائق)\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"يجب أن يستغرق هذا الجزء حوالي 40 دقيقة\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"دعونا نبدأ بأبسط برنامج ممكن في Rust، وهو برنامج كلاسيكي لطباعة Hello World:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"ما تراه:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"يتم تعريف الدوال باستخدام `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"يتم تحديد الكتل باستخدام الأقواس المعقوفة مثل C و C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"دالة `main` هي نقطة الدخول للبرنامج.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust has hygienic macros, `println!` is an example of this.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"سلاسل Rust مرمّزه بـ UTF-8 ويمكن أن تحتوي على أي حرف Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"تحاول هذه الشريحة تجعل الطلاب مرتاحين مع كود Rust. سيرون الكثير منه خلال \"\n\"الأيام الأربعة القادمة لذا نبدأ بشيء صغير ومألوف.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust يشبه إلى حد كبير اللغات الأخرى في تقليد C/C++/Java. إنه لغة imperative \"\n\"ولا تحاول إعادة اختراع الأشياء إلا إذا كان ذلك ضروريًا للغاية.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust حديثة وتدعم بشكل كامل أشياء مثل Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust يستخدم الماكروهات في الحالات التي تريد فيها الحصول على عدد متغير من \"\n\"الوسائط (لا يوجد [overloading](../control-flow-basics/functions.md) للدوال).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"كون الماكروهات (macros) 'hygienic' يعني أنها لا تلتقط identifiers من scope \"\n\"الذي تُستخدم فيه عن طريق الخطأ. في الواقع، ماكروهات Rust (macros) هي فقط \"\n\"[hygienic جزئيًا](https://veykril.github.io/tlborm/decl-macros/minutiae/\"\n\"hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust متعدد الأنماط (multi-paradigm). على سبيل المثال، يحتوي على ميزات قوية \"\n\"لبرمجة الكائنات (object-oriented programming features)، وعلى الرغم من أنه \"\n\"ليس لغة وظيفية، إلا أنه يتضمن مجموعة من المفاهيم الوظيفية (functional \"\n\"concepts).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust يوفر أمان النوع من خلال الكتابة الثابتة (static typing). يتم إنشاء \"\n\"ارتباطات المتغيرات باستخدام `let`:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"قم بإلغاء التعليق على  `x = 20` لإظهار أن المتغيرات غير قابلة للتغيير بشكل \"\n\"افتراضي. أضف الكلمة المفتاحية `mut` للسماح بالتغييرات.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"الـ `i32` هنا هو نوع المتغير (type). يجب أن يكون هذا معروفًا في وقت الترجمة \"\n\"(compile time)، ولكن استنباط النوع (type inference) (الذي سيتم تغطيته لاحقًا) \"\n\"يسمح للمبرمج بتجاهله في العديد من الحالات.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"هنا بعض الأنواع المدمجة الأساسية (built-in types)، وصيغة القيم الحرفية \"\n\"(literal values) لكل نوع (type).\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"الأنواع (Types)\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"القيم الحرفية (Literals)\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"الأعداد الصحيحة الموقعة، اي لها اشارة (Signed integers)\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`، `i16`، `i32`، `i64`، `i128`، `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`، `0`، `1_000`، `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"الأعداد الصحيحة غير الموقعة، اي ليس لها اشارة (Unsigned integers)\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`، `u16`، `u32`، `u64`، `u128`، `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`، `123`، `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"الأعداد العشرية (Floating point numbers)\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`، `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`، `-10.0e20`، `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"قيم يونيكود العددية (Unicode scalar values)\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`، `'α'`، `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"القيم المنطقية (Booleans)\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`، `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"عرض الأنواع كما يلي:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`، `uN`، و `fN` عرضها _N_ بت،\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` و `usize` هما عرض المؤشر،\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` عرضه 32 بت،\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` عرضه 8 بت.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"هناك بعض الصيغ التي لم يتم عرضها أعلاه:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"يمكن حذف جميع الشرطات السفلية في الأرقام، فهي فقط من أجل الوضوح. لذلك يمكن \"\n\"كتابة `1_000` كـ `1000` (أو `10_00`)، ويمكن كتابة `123_i64` كـ `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"النتيجة: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"هذه هي المرة الأولى التي نرى فيها دالة غير `main`، ولكن يجب أن يكون المعنى \"\n\"واضحًا: إنها تأخذ ثلاثة أعداد صحيحة (integers)، وتعيد عددًا صحيحًا (integer). \"\n\"سيتم تغطية الدوال (functions) بمزيد من التفصيل لاحقًا.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"الحساب مشابه جدًا للغات الأخرى، مع أسبقية مشابهة.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"ماذا عن تجاوز السعة للأعداد الصحيحة (integer overflow)؟ في C و C++، تجاوز \"\n\"السعة للأعداد الصحيحة الموقعة (signed) غير معرف فعليًا، وقد يقوم بأشياء غير \"\n\"معروفة أثناء التشغيل. في Rust، هو معرف.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"قم بتغيير `i32` إلى `i16` لرؤية تجاوز السعة للأعداد الصحيحة، والذي يسبب (panic) \"\n\"(panic) في بناء التصحيح (debug build) ويلتف في بناء الإصدار (release build). \"\n\"هناك خيارات أخرى، مثل التجاوز (overflowing)، التشبع (saturating)، والحمل \"\n\"(carrying). يتم الوصول إليها باستخدام صيغة الدالة (method syntax)، مثل `(a * \"\n\"b).saturating_add(b * c).saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"في الواقع، سيكتشف المترجم (compiler) تجاوز السعة (overflow) للتعابير الثابتة \"\n\"(constant expressions)، وهذا هو السبب في أن المثال يتطلب دالة منفصلة.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"ستنظر Rust في كيفية _استخدام_ المتغير لتحديد النوع:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"توضح هذه الشريحة كيف يستنتج مترجم Rust الأنواع بناءً على القيود المقدمة من \"\n\"انشاء المتغيرات (variable declarations) واستخداماتها.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"من المهم جدًا التأكيد على أن المتغيرات المعلنة بهذه الطريقة ليست من نوع \"\n\"ديناميكي \\\"أي نوع\\\" يمكنه الاحتفاظ بأي بيانات. الكود الآلي الناتج عن هذا \"\n\"التصريح مطابق للتصريح الصريح عن النوع. يقوم المترجم بالعمل نيابة عنا \"\n\"ويساعدنا في كتابة كود أكثر اختصارًا.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"عندما لا يوجد شيء يقيد نوع العدد الصحيح (integer literal)، فإن Rust تستخدم \"\n\"افتراضيًا `i32`. يظهر هذا أحيانًا كـ `{integer}` في رسائل الخطأ. وبالمثل، \"\n\"تستخدم الأعداد العشرية (floating-point literals) افتراضيًا `f64`.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// خطأ: لا يوجد تنفيذ لـ `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"تبدأ متتالية فيبوناتشي بـ `[0,1]`. بالنسبة لـ n>1، يتم حساب العدد فيبوناتشي \"\n\"الـ n عن طريق الاستدعاء الذاتي كمجموع للعدد فيبوناتشي الـ n-1 والعدد \"\n\"فيبوناتشي الـ n-2.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"اكتب دالة `fib(n)` التي تحسب العدد فيبوناتشي الـ n. متى ستسبب هذه الدالة \"\n\"(panic)؟\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// الحالة الأساسية.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"نفذ هذا\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// الحالة العودية (recursive case).\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[تعابير if](./control-flow-basics/if.md) (4 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[الحلقات (Loops)](./control-flow-basics/loops.md) (5 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"[break و continue](./control-flow-basics/break-continue.md) (4 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\"[الكتل (Blocks) والنطاقات (Scopes)](./control-flow-basics/blocks-and-scopes.\"\n\"md) (5 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[الدوال (Functions)](./control-flow-basics/functions.md) (3 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[الماكروز (Macros)](./control-flow-basics/macros.md) (2 دقائق)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[تمرين: متتالية كولاتز (Collatz Sequence)](./control-flow-basics/exercise.\"\n\"md) (15 دقائق)\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"تعابير `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"تستخدم [تعابير `if`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) تمامًا مثل جمل `if` في اللغات الأخرى:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"صفر!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"كبير نوعًا ما\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"ضخم\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"بالإضافة إلى ذلك، يمكنك استخدام `if` كتعبير. يصبح التعبير الأخير في كل كتلة \"\n\"هو قيمة تعبير `if`:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"صغير\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"كبير\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"حجم الرقم: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"لأن `if` هو تعبير ويجب أن يكون له نوع معين، يجب أن تكون كلا الكتلتين \"\n\"الفرعيتين من نفس النوع. أظهر ما يحدث إذا أضفت `;` بعد `\\\"small\\\"` في المثال \"\n\"الثاني.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"عندما يتم استخدام `if` في تعبير، يجب أن يحتوي التعبير على `;` لفصله عن \"\n\"الجملة التالية. قم بإزالة `;` قبل `println!` لرؤية خطأ المترجم.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"هناك ثلاث كلمات مفتاحية للتكرار في Rust: `while`، `loop`، و `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"تعمل [الكلمة المفتاحية `while`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#predicate-loops) بشكل مشابه لما في اللغات الأخرى، \"\n\"حيث تنفذ جسم الحلقة طالما أن الشرط صحيح.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"القيمة النهائية لـ x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"تقوم [حلقة `for`](https://doc.rust-lang.org/std/keyword.for.html) بالتكرار \"\n\"عبر نطاقات القيم أو العناصر في مجموعة:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"العنصر (elem): {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"تستخدم حلقات `for` مفهوم يسمى \\\"المكررات (iterators)\\\" للتعامل مع التكرار \"\n\"عبر أنواع مختلفة من النطاقات/المجموعات. سيتم مناقشة المكررات بمزيد من \"\n\"التفصيل لاحقًا.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"لاحظ أن حلقة `for` الأولى تتكرر فقط حتى `4`. أظهر بناء الجملة `1..=5` لنطاق \"\n\"شامل.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"تقوم [جملة `loop`](https://doc.rust-lang.org/std/keyword.loop.html) بالتكرار \"\n\"إلى الأبد، حتى يتم استخدام `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"إذا كنت تريد بدء التكرار التالي فورًا، استخدم [`continue`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"إذا كنت تريد الخروج من أي نوع من الحلقات مبكرًا، استخدم [`break`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#break-expressions). \"\n\"بالنسبة لـ `loop`، يمكن أن تأخذ هذه تعبيرًا اختياريًا يصبح قيمة تعبير `loop`.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"يمكن لكل من `continue` و `break` أن يأخذوا اختياريًا وسيط تسمية يُستخدم للخروج \"\n\"من الحلقات المتداخلة:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"العناصر التي تم البحث عنها: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"لاحظ أن `loop` هو البناء التكراري الوحيد الذي يعيد قيمة معقده (non-\"\n\"trivial value). هذا لأنه مضمون الدخول إليه مرة واحدة على الأقل (على عكس \"\n\"حلقات `while` و `for` (while و for)).\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"الكتل\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"الكتلة في Rust تحتوي على تسلسل من التعابير، محاطة بأقواس `{}`. كل كتلة لها \"\n\"قيمة ونوع، وهما نفسهما للعبارة الأخيرة في الكتلة:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"إذا انتهى التعبير الأخير بـ `;`، فإن القيمة والنوع الناتجين هما `()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"يمكنك إظهار كيفية تغير قيمة الكتلة عن طريق تغيير السطر الأخير في الكتلة. على \"\n\"سبيل المثال، إضافة/إزالة فاصلة منقوطة أو استخدام `return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"نطاق المتغير محدود بالكتلة المحيطة به.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"يمكنك تظليل المتغيرات، سواء تلك من النطاقات الخارجية أو المتغيرات من نفس \"\n\"النطاق:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"قبل: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"النطاق الداخلي: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"مظلل في النطاق الداخلي: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"بعد: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"أظهر أن نطاق المتغير محدود عن طريق إضافة `b` في الكتلة الداخلية في المثال \"\n\"الأخير، ثم محاولة الوصول إليه خارج تلك الكتلة.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"التظليل (Shadowing) يختلف عن التغيير (Mutation)، لأنه بعد التظليل، كلا موقعي \"\n\"ذاكرة المتغيرين موجودان في نفس الوقت. كلاهما متاحان تحت نفس الاسم، اعتمادًا \"\n\"على مكان استخدامه في الكود.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"المتغير المظلل (Shadowing) يمكن أن يكون له نوع مختلف.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"التظليل (Shadowing) يبدو غامضًا في البداية، لكنه مريح للاحتفاظ بالقيم بعد `.\"\n\"unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"معلمات التصريح (Declaration parameters) يتبعها نوع (type) (عكس بعض لغات \"\n\"البرمجة)، ثم نوع الإرجاع (return type).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"آخر تعبير في جسم الدالة (function body) (أو أي كتلة) يصبح قيمة الإرجاع \"\n\"(return value). ببساطة احذف `;` في نهاية التعبير. يمكن استخدام الكلمة \"\n\"المفتاحية `return` للإرجاع المبكر (early return)، ولكن الشكل \\\"bare value\\\" \"\n\"هو الشكل الاصطلاحي في نهاية الدالة (refactor `gcd` to use a `return`) قم بتغيير 'gcd' و استخدم 'return'.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"بعض الدوال ليس لها قيمة إرجاع، وتعيد 'unit type'، `()`. سيستنتج المترجم \"\n\"(compiler) هذا إذا تم حذف نوع الإرجاع `-> ()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"التحميل الزائد (Overloading) غير مدعوم -- كل دالة لها تنفيذ واحد فقط.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"دائمًا تأخذ عددًا ثابتًا من المعلمات (parameters). المعلمات الافتراضية (Default \"\n\"arguments) غير مدعومة. يمكن استخدام الماكروز (Macros) لدعم الدوال المتغيرة \"\n\"(variadic functions).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"دائمًا تأخذ مجموعة واحدة من أنواع المعلمات (parameter types). يمكن أن تكون \"\n\"هذه الأنواع عامة (generic)، والتي سيتم تغطيتها لاحقًا.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"الماكروز (Macros) يتم توسيعها إلى كود Rust أثناء الترجمة، ويمكن أن تأخذ عددًا \"\n\"متغيرًا من المعلمات (arguments). يتم تمييزها بعلامة `!` في النهاية. تتضمن \"\n\"مكتبة Rust القياسية مجموعة من الماكروز المفيدة.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` تطبع سطرًا إلى الإخراج القياسي (standard output)، \"\n\"وتطبق التنسيق (formatting) الموضح في [`std::fmt`](https://doc.rust-lang.org/\"\n\"std/fmt/index.html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` تعمل تمامًا مثل `println!` ولكنها تعيد النتيجة كسلسلة \"\n\"نصية (string).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` يسجل قيمة التعبير (expression) ويعيدها.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` تشير إلى جزء من الكود على أنه لم يتم تنفيذه بعد (not-yet-\"\n\"implemented). إذا تم تنفيذه، سيتسبب في (panic).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` تشير إلى جزء من الكود على أنه غير قابل للوصول \"\n\"(unreachable). إذا تم تنفيذه، سيتسبب في (panic).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"الخلاصة من هذا القسم هي أن هذه التسهيلات الشائعة موجودة، وكيفية استخدامها. \"\n\"لماذا تم تعريفها كـ macros، وما الذي تتوسع إليه، ليس بالأمر الحاسم بشكل خاص.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"الدورة لا تغطي تعريف الماكروز (macros)، ولكن قسم لاحق سيصف استخدام الماكروز \"\n\"المشتقة (derive macros).\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"تُعرّف [متتالية كولاتز (Collatz Sequence)](https://en.wikipedia.org/wiki/\"\n\"Collatz_conjecture) كما يلي، لأي قيمة n عشوائية:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"أكبر من الصفر:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"إذا كانت _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ تساوي 1، فإن المتتالية تنتهي عند _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \".\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ زوجية، فإن _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ فردية، فإن _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"على سبيل المثال، بدءًا من _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 فردية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 زوجية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 فردية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"16 زوجية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"8 زوجية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"4 زوجية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"2 زوجية، لذا _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1; و\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"تنتهي السلسلة.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"اكتب دالة لحساب طول سلسلة كولاتز (collatz sequence) لقيمة ابتدائية معينة `n`.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// تحديد طول سلسلة كولاتز (collatz sequence) بدءًا من `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"الطول: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"مرحبًا بعودتكم\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tuples and Arrays] (التجمعات والمصفوفات) (35 دقيقة)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (55 minutes)\"\nmsgstr \"[References] (المراجع) (55 دقيقة)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"[User-Defined Types] (الأنواع المعرفة من قبل المستخدم) (50 دقيقة)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes\"\nmsgstr \"\"\n\"بما في ذلك فترات استراحة لمدة 10 دقائق، يجب أن تستغرق هذه الجلسة حوالي \"\n\"ساعتين و35 دقيقة\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"[Arrays] (المصفوفات) (5 دقائق)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"[Tuples] (التجمعات) (5 دقائق)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"[Array Iteration] (تكرار المصفوفة) (3 دقائق)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"[Patterns and Destructuring] (الأنماط والتفكيك) (5 دقائق)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"[Exercise: Nested Arrays] (تمرين: المصفوفات المتداخلة) (15 دقيقة)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"يجب أن يستغرق هذا الجزء حوالي 35 دقيقة\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"قيمة من نوع المصفوفة `[T; N]` تحتوي على `N` (ثابت وقت الترجمة) عناصر من نفس \"\n\"النوع `T`. لاحظ أن طول المصفوفة هو _جزء من نوعها_، مما يعني أن `[u8; 3]` و \"\n\"`[u8; 4]` يعتبران نوعين مختلفين. سيتم تغطية الشرائح (slices)، التي يتم تحديد \"\n\"حجمها في وقت التشغيل، لاحقًا.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"حاول الوصول إلى عنصر مصفوفة خارج الحدود. يتم التحقق من الوصول إلى المصفوفة \"\n\"في وقت التشغيل. يمكن لـ Rust عادةً تحسين هذه الفحوصات، ويمكن تجنبها باستخدام \"\n\"Rust غير الآمن (unsafe Rust).\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"يمكننا استخدام القيم الحرفية (literals) لتعيين القيم إلى المصفوفات.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"الماكرو `println!` يطلب تنفيذ التصحيح (debug implementation) باستخدام معامل \"\n\"التنسيق `?`: `{}` يعطي المخرجات الافتراضية، `{:?}` يعطي مخرجات التصحيح \"\n\"(debug output). الأنواع مثل الأعداد الصحيحة (integers) والسلاسل النصية \"\n\"(strings) تنفذ المخرجات الافتراضية، لكن المصفوفات تنفذ فقط مخرجات التصحيح. \"\n\"هذا يعني أنه يجب علينا استخدام مخرجات التصحيح هنا.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"إضافة `#`، مثل `{a:#?}`، يستدعي تنسيق \\\"الطباعة الجميلة\\\" (pretty printing)، \"\n\"والذي يمكن أن يكون أسهل في القراءة.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"مثل المصفوفات، التجمعات (tuples) لها طول ثابت.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"تجمع التجمعات (tuples) القيم من أنواع مختلفة في نوع مركب.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"يمكن الوصول إلى حقول التجمع (tuple) باستخدام النقطة (period) وفهرس القيمة، \"\n\"مثل `t.0`، `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"التجمع الفارغ `()` يُشار إليه بـ \\\"نوع الوحدة\\\" (unit type) ويشير إلى غياب \"\n\"قيمة الإرجاع، مشابهًا لـ `void` في لغات البرمجة الأخرى.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\"جملة `for` تدعم التكرار عبر المصفوفات (arrays) (ولكن ليس التجمعات (tuples)).\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"هذه الوظيفة تستخدم السمة `IntoIterator`، لكننا لم نغطي ذلك بعد.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"الماكرو `assert_ne!` جديد هنا. هناك أيضًا ماكروهات `assert_eq!` و `assert!`. \"\n\"هذه دائمًا ما يتم التحقق منها، بينما المتغيرات الخاصة بالتصحيح فقط مثل \"\n\"`debug_assert!` لا يتم تجميعها في إصدارات الإنتاج (release builds).\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"عند العمل مع التجمعات (tuples) والقيم المهيكلة الأخرى، من الشائع الرغبة في \"\n\"استخراج القيم الداخلية إلى متغيرات محلية. يمكن القيام بذلك يدويًا عن طريق \"\n\"الوصول المباشر إلى القيم الداخلية:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"left: {left}, right: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"ومع ذلك، تدعم Rust أيضًا استخدام مطابقة الأنماط (pattern matching) لتفكيك \"\n\"قيمة أكبر إلى أجزائها المكونة:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"الأنماط المستخدمة هنا هي \\\"غير قابلة للدحض\\\" (irrefutable)، مما يعني أن \"\n\"المترجم يمكنه التحقق بشكل ثابت من أن القيمة على يمين `=` لها نفس بنية النمط.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"اسم المتغير هو نمط غير قابل للدحض (irrefutable pattern) يطابق دائمًا أي قيمة، \"\n\"لذلك يمكننا أيضًا استخدام `let` لإعلان متغير واحد.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"تدعم Rust أيضًا استخدام الأنماط في العبارات الشرطية (conditionals)، مما يسمح \"\n\"بمقارنة المساواة والتفكيك (destructuring) في نفس الوقت. سيتم مناقشة هذا \"\n\"الشكل من مطابقة الأنماط بمزيد من التفصيل لاحقًا.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"قم بتحرير الأمثلة أعلاه لإظهار خطأ المترجم عندما لا يتطابق النمط مع القيمة \"\n\"التي يتم مطابقتها.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"المصفوفات (arrays) يمكن أن تحتوي على مصفوفات أخرى:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"ما هو نوع (type) هذا المتغير؟\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"استخدم مصفوفة مثل المذكورة أعلاه لكتابة دالة `transpose` التي ستقوم بتبديل \"\n\"مصفوفة (تحويل الصفوف إلى أعمدة):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"انسخ الكود أدناه إلى <https://play.rust-lang.org/> ونفذ الدالة. هذه الدالة \"\n\"تعمل فقط على المصفوفات 3x3.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: قم بإزالة هذا عند الانتهاء من تنفيذك.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- التعليق يجعل rustfmt يضيف سطرًا جديدًا\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transposed: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"[Shared References](./references/shared.md) (10 دقائق)\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"[Exclusive References] (المراجع الحصرية) (10 دقائق)\"\n\n#: src/references.md\nmsgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\nmsgstr \"[Slices: &\\\\[T\\\\]] (الشرائح: &\\\\[T\\\\]) (10 دقائق)\"\n\n#: src/references.md\nmsgid \"[Strings](./references/strings.md) (10 minutes)\"\nmsgstr \"[Strings] (السلاسل النصية) (10 دقائق)\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"[Exercise: Geometry] (تمرين: الهندسة) (15 دقيقة)\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"يجب أن يستغرق هذا الجزء حوالي 55 دقيقة\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"المرجع (reference) يوفر طريقة للوصول إلى قيمة أخرى دون تحمل المسؤولية عن \"\n\"القيمة، ويُسمى أيضًا \\\"الاستعارة\\\" (borrowing). المراجع المشتركة (Shared \"\n\"references) هي للقراءة فقط، ولا يمكن تغيير البيانات المشار إليها.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"المرجع المشترك (shared reference) لنوع `T` يكون من النوع `&T`. يتم إنشاء \"\n\"قيمة المرجع باستخدام المعامل `&`.\"\n\"·المعامل·`*`·يقوم·بـ·\\\"إلغاء·المرجع\\\"·(dereferences)·للمرجع،·مما·يعطي·قيمته.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"سيمنع Rust بشكل ثابت المراجع المتدلية (dangling references):\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"يُقال أن المرجع \\\"يستعير\\\" (borrow) القيمة التي يشير إليها، وهذا نموذج جيد \"\n\"للطلاب غير المألوفين بالمؤشرات (pointers): يمكن للكود استخدام المرجع للوصول \"\n\"إلى القيمة، ولكنها لا تزال \\\"مملوكة\\\" (owned) من قبل المتغير الأصلي. ستتناول \"\n\"الدورة مزيدًا من التفاصيل حول الملكية (ownership) في اليوم الثالث.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"يتم تنفيذ المراجع (references) كمؤشرات (pointers)، وميزة رئيسية هي أنها يمكن \"\n\"أن تكون أصغر بكثير من الشيء الذي تشير إليه. الطلاب المألوفون بلغة C أو C++ \"\n\"سيتعرفون على المراجع (references) كمؤشرات (pointers). ستغطي الأجزاء اللاحقة \"\n\"من الدورة كيفية منع Rust أخطاء أمان الذاكرة (memory-safety bugs) التي تأتي \"\n\"من استخدام المؤشرات الخام (raw pointers).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\"لا يقوم Rust بإنشاء المراجع (references) تلقائيًا - المعامل `&` مطلوب دائمًا.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"سيقوم Rust بإلغاء المرجع تلقائيًا (auto-dereference) في بعض الحالات، خاصة عند \"\n\"استدعاء الدوال (methods) (جرب `r.is_ascii()`). لا حاجة لمعامل `->` كما في C+\"\n\"+.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"في هذا المثال، `r` قابل للتغيير (mutable) بحيث يمكن إعادة تعيينه (`r = &b`). \"\n\"لاحظ أن هذا يعيد ربط `r`، بحيث يشير إلى شيء آخر. هذا يختلف عن C++، حيث أن \"\n\"التعيين إلى مرجع يغير القيمة المشار إليها.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"المرجع المشترك (shared reference) لا يسمح بتعديل القيمة التي يشير إليها، حتى \"\n\"لو كانت تلك القيمة قابلة للتغيير (mutable). جرب `*r = 'X'`.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"يقوم Rust بتتبع أعمار (lifetimes) جميع المراجع لضمان أنها تعيش لفترة كافية. \"\n\"لا يمكن أن تحدث المراجع المتدلية (dangling references) في Rust الآمن. ستعيد \"\n\"`x_axis` مرجعًا إلى `point`، ولكن سيتم إلغاء تخصيص `point` عند انتهاء الدالة، \"\n\"لذلك لن يتم تجميع هذا الكود.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"سنتحدث أكثر عن الاستعارة (borrowing) عندما نصل إلى الملكية (ownership).\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"المراجع الحصرية (Exclusive references)، والمعروفة أيضًا بالمراجع القابلة \"\n\"للتغيير (mutable references)، تسمح بتغيير القيمة التي تشير إليها. نوعها هو \"\n\"`&mut T`.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"تعني \\\"حصرية\\\" (Exclusive) أن هذا المرجع فقط يمكن استخدامه للوصول إلى \"\n\"القيمة. لا يمكن أن توجد مراجع أخرى (مشتركة أو حصرية) في نفس الوقت، ولا يمكن \"\n\"الوصول إلى القيمة المشار إليها بينما المرجع الحصري موجود. جرب إنشاء \"\n\"`&point.0` أو تغيير `point.0` بينما `x_coord` موجود.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"تأكد من ملاحظة الفرق بين `let mut x_coord: &i32` و `let x_coord: &mut i32`. \"\n\"الأول يمثل مرجعًا مشتركًا (shared reference) يمكن ربطه بقيم مختلفة، بينما \"\n\"الثاني يمثل مرجعًا حصريًا (exclusive reference) لقيمة قابلة للتغيير (mutable \"\n\"value).\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"الشرائح (Slices)\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"تعطيك الشريحة (slice) نظرة على مجموعة أكبر:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"تستعير الشرائح (Slices) البيانات من النوع المقطوع (sliced type).\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"سؤال: ماذا يحدث إذا قمت بتعديل `a[3]` قبل طباعة `s` مباشرةً؟\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"نقوم بإنشاء شريحة (slice) عن طريق استعارة `a` وتحديد الفهارس (indexes) \"\n\"البداية والنهاية بين الأقواس.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"إذا بدأت الشريحة (slice) عند الفهرس 0، فإن صيغة النطاق (range syntax) في \"\n\"Rust تسمح لنا بإسقاط فهرس البداية، مما يعني أن `&a[0..a.len()]` و `&a[..a.\"\n\"len()]` متطابقتان.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"ينطبق نفس الشيء على الفهرس الأخير، لذا فإن `&a[2..a.len()]` و `&a[2..]` \"\n\"متطابقتان.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"لإنشاء شريحة (slice) بسهولة من المصفوفة الكاملة، يمكننا استخدام `&a[..]`.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` هو مرجع لشريحة (slice) من `i32`s. لاحظ أن نوع `s` (`&[i32]`) لم يعد يذكر \"\n\"طول المصفوفة. هذا يسمح لنا بإجراء العمليات الحسابية على شرائح (slices) \"\n\"بأحجام مختلفة.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"الشرائح (Slices) تستعير دائمًا من كائن آخر. في هذا المثال، يجب أن يبقى `a` \"\n\"موجودًا (في النطاق) على الأقل طالما أن شريحتنا (slice) موجودة.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"السؤال حول تعديل `a[3]` يمكن أن يثير نقاشًا مثيرًا للاهتمام، ولكن الإجابة هي \"\n\"أنه لأسباب تتعلق بسلامة الذاكرة (memory safety) لا يمكنك القيام بذلك من خلال \"\n\"`a` في هذه المرحلة من التنفيذ (execution)، ولكن يمكنك قراءة البيانات من كل \"\n\"من `a` و `s` بأمان. يعمل ذلك قبل إنشاء الشريحة (slice)، ومرة أخرى بعد \"\n\"`println`، عندما لا يتم استخدام الشريحة (slice) بعد الآن.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"يمكننا الآن فهم نوعي السلاسل النصية (string types) في Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"`&str` هو شريحة (slice) من بايتات مشفرة بـ UTF-8، مشابهة لـ `&[u8]`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\"`String` هو مخزن مؤقت مملوك (owned buffer) من بايتات مشفرة بـ UTF-8، مشابه \"\n\"لـ `Vec<T>`.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"World\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"مرحبًا، أيها العالم\\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` يقدم شريحة نصية (string slice)، وهي مرجع غير قابل للتغيير (immutable \"\n\"reference) لبيانات نصية مشفرة بـ UTF-8 مخزنة في كتلة من الذاكرة. الحروف \"\n\"النصية (`\\\"Hello\\\"`)، مخزنة في البرنامج الثنائي (binary).\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"نوع `String` في Rust هو غلاف حول متجه من البايتات (vector of bytes). كما هو \"\n\"الحال مع `Vec<T>`، فهو مملوك (owned).\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"كما هو الحال مع العديد من الأنواع الأخرى، فإن `String::from()` ينشئ سلسلة \"\n\"نصية من حرف نصي (string literal)؛ `String::new()` ينشئ سلسلة نصية جديدة \"\n\"فارغة، يمكن إضافة بيانات نصية إليها باستخدام طريقتي `push()` و `push_str()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"الماكرو `format!()` هو طريقة مريحة لإنشاء سلسلة نصية مملوكة (owned string) \"\n\"من قيم ديناميكية. يقبل نفس مواصفات التنسيق (format specification) مثل \"\n\"`println!()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"يمكنك استعارة شرائح `&str` من `String` عبر `&` واختيار النطاق (range \"\n\"selection) اختياريًا. إذا اخترت نطاق بايت غير متوافق مع حدود الأحرف، فإن \"\n\"التعبير سيتسبب في خطأ (panic). المكرر `chars` يتكرر عبر الأحرف ويفضل \"\n\"استخدامه على محاولة الحصول على حدود الأحرف بشكل صحيح.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"لمبرمجي C++: فكر في `&str` كـ `std::string_view` من C++، ولكنه دائمًا يشير \"\n\"إلى سلسلة نصية صالحة في الذاكرة. `String` في Rust هو مكافئ تقريبي لـ `std::\"\n\"string` من C++ (الفرق الرئيسي: يمكن أن يحتوي فقط على بايتات مشفرة بـ UTF-8 \"\n\"ولن يستخدم أبدًا تحسين السلسلة الصغيرة (small-string optimization)).\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"الحروف النصية للبايت (Byte strings literals) تتيح لك إنشاء قيمة `&[u8]` \"\n\"مباشرةً:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"السلاسل النصية الخام (Raw strings) تتيح لك إنشاء قيمة `&str` مع تعطيل الهروب \"\n\"(escapes): `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. يمكنك تضمين علامات الاقتباس المزدوجة \"\n\"باستخدام كمية متساوية من `#` على جانبي علامات الاقتباس:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// احسب مقدار المتجه (magnitude of a vector) بجمع مربعات إحداثياته\\n\"\n\"// وأخذ الجذر التربيعي (square root). استخدم طريقة `sqrt()` لحساب الجذر\\n\"\n\"// التربيعي، مثل `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// قم بتطبيع المتجه (Normalize a vector) بحساب مقداره (magnitude) وقسمة جميع \"\n\"إحداثياته\\n\"\n\"// على هذا المقدار (magnitude).\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// استخدم `main` التالي لاختبار عملك.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"مقدار المتجه الواحد: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"مقدار {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"مقدار {v:?} بعد التطبيع: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// احسب مقدار المتجه (magnitude of the vector) المعطى.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// غير مقدار المتجه إلى 1.0 دون تغيير اتجاهه.\\n\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\"[الهياكل المسماة (Named Structs)](./user-defined-types/named-structs.md) (10 \"\n\"دقائق)\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\"[هياكل الترتيب (Tuple Structs)](./user-defined-types/tuple-structs.md) (10 \"\n\"دقائق)\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"[التعدادات (Enums)](./user-defined-types/enums.md) (5 دقائق)\"\n\n#: src/user-defined-types.md\nmsgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\nmsgstr \"[ثابت (Static)](./user-defined-types/static.md) (5 دقائق)\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\"[أسماء مستعارة للأنواع (Type Aliases)](./user-defined-types/aliases.md) \"\n\"(دقيقتان)\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[تمرين: أحداث المصعد (Elevator Events)](./user-defined-types/exercise.md) \"\n\"(15 دقيقة)\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"يجب أن يستغرق هذا الجزء حوالي 50 دقيقة\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"مثل C و C++، يدعم Rust الهياكل المخصصة (custom structs):\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"بيتر\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"أفيري\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"جاكي\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"نقاط رئيسية (Key Points):\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"الهياكل (Structs) تعمل مثلما في C أو C++.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"مثل C++، وعلى عكس C، لا حاجة إلى typedef لتعريف نوع.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"على عكس C++، لا يوجد وراثة (inheritance) بين الهياكل (structs).\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"قد يكون هذا وقتًا جيدًا لإعلام الناس بوجود أنواع مختلفة من الهياكل (structs).\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"الهياكل ذات الحجم الصفري (Zero-sized structs) (مثل `struct Foo;`) قد تُستخدم \"\n\"عند تطبيق سمة (trait) على نوع معين ولكن لا تحتوي على أي بيانات تريد تخزينها \"\n\"في القيمة نفسها.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"الشريحة التالية ستقدم هياكل الترتيب (Tuple structs)، التي تُستخدم عندما لا \"\n\"تكون أسماء الحقول مهمة.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"إذا كان لديك بالفعل متغيرات بالأسماء الصحيحة، فيمكنك إنشاء الهيكل (struct) \"\n\"باستخدام اختصار.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"الصيغة `..avery` تسمح لنا بنسخ معظم الحقول من الهيكل القديم دون الحاجة إلى \"\n\"كتابتها جميعًا بشكل صريح. يجب أن تكون دائمًا العنصر الأخير.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"إذا كانت أسماء الحقول غير مهمة، يمكنك استخدام هيكل الترتيب (tuple struct):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"غالبًا ما يُستخدم هذا للأغلفة ذات الحقل الواحد (single-field wrappers) (تسمى \"\n\"newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"اسأل عالم صواريخ في ناسا\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"الأنواع الجديدة (Newtypes) هي طريقة رائعة لترميز معلومات إضافية حول القيمة \"\n\"في نوع بدائي (primitive type)، على سبيل المثال:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"يتم قياس الرقم بوحدات معينة: `نيوتن` (Newtons) في المثال أعلاه.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"القيمة اجتازت بعض التحقق عند إنشائها، لذلك لم تعد بحاجة إلى التحقق منها مرة \"\n\"أخرى في كل استخدام: `PhoneNumber(String)` أو `OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"أظهر كيفية إضافة قيمة `f64` إلى نوع `Newtons` عن طريق الوصول إلى الحقل \"\n\"الفردي في النوع الجديد (newtype).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust عمومًا لا يحب الأشياء غير الواضحة، مثل فك التغليف التلقائي (automatic \"\n\"unwrapping) أو على سبيل المثال استخدام القيم المنطقية (booleans) كأعداد \"\n\"صحيحة (integers).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\"يتم مناقشة التحميل الزائد للمشغل (Operator overloading) في اليوم الثالث (Day \"\n\"3) (الأنواع العامة (generics)).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"المثال هو إشارة دقيقة إلى فشل [Mars Climate Orbiter](https://en.wikipedia.\"\n\"org/wiki/Mars_Climate_Orbiter).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"الكلمة المفتاحية `enum` تسمح بإنشاء نوع يحتوي على عدة متغيرات مختلفة \"\n\"(variants):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// متغير بسيط (Simple variant)\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// متغير ترتيب (Tuple variant)\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// متغير هيكل (Struct variant)\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"في هذا الدور: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"التعدادات (Enumerations) تسمح لك بجمع مجموعة من القيم تحت نوع واحد.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` هو نوع يحتوي على متغيرات (variants). هناك قيمتان لـ `Direction`: \"\n\"`Direction::Left` و `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` هو نوع يحتوي على ثلاثة متغيرات (variants). بالإضافة إلى \"\n\"الحمولات (payloads)، سيخزن Rust مميزًا (discriminant) حتى يعرف في وقت التشغيل \"\n\"(runtime) أي متغير موجود في قيمة `PlayerMove`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"قد يكون هذا وقتًا جيدًا لمقارنة الهياكل (structs) والتعدادات (enums):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"في كليهما، يمكنك الحصول على نسخة بسيطة بدون حقول (unit struct) أو واحدة \"\n\"تحتوي على أنواع مختلفة من الحقول (variant payloads).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"يمكنك حتى تنفيذ المتغيرات المختلفة (variants) لتعداد (enum) باستخدام هياكل \"\n\"منفصلة (separate structs) ولكنها لن تكون من نفس النوع كما لو كانت جميعها \"\n\"معرفة في تعداد (enum).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust يستخدم مساحة صغيرة لتخزين المميز (discriminant).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"إذا لزم الأمر، فإنه يخزن عددًا صحيحًا (integer) بأصغر حجم مطلوب.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"إذا لم تغطي القيم المسموح بها للمتغيرات (variant values) جميع أنماط البتات \"\n\"(bit patterns)، فسيستخدم أنماط البتات غير الصالحة (invalid bit patterns) \"\n\"لترميز المميز (discriminant) (تحسين الفجوة (niche optimization)). على سبيل \"\n\"المثال، `Option<&u8>` يخزن إما مؤشرًا إلى عدد صحيح (integer) أو `NULL` \"\n\"للمتغير `None`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"يمكنك التحكم في المميز (discriminant) إذا لزم الأمر (على سبيل المثال، \"\n\"للتوافق مع C):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"بدون `repr`، يأخذ نوع المميز (discriminant type) 2 بايت، لأن 10001 يناسب 2 \"\n\"بايت.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/smart-pointers/box.md\n#: src/borrowing/shared.md src/error-handling/result.md\nmsgid \"More to Explore\"\nmsgstr \"المزيد لاستكشافه\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"لدى Rust العديد من التحسينات (optimizations) التي يمكن استخدامها لجعل \"\n\"التعدادات (enums) تشغل مساحة أقل.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"تحسين المؤشر الفارغ (Null pointer optimization): بالنسبة لبعض الأنواع \"\n\"(types)، يضمن Rust أن `size_of::<T>()` يساوي `size_of::<Option<T>>()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"مثال إذا كنت تريد إظهار كيف يمكن أن تبدو التمثيلات الثنائية (bitwise \"\n\"representation) في الممارسة العملية. من المهم ملاحظة أن المترجم (compiler) \"\n\"لا يقدم أي ضمانات بخصوص هذا التمثيل، لذلك هذا غير آمن تمامًا.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"المتغيرات الثابتة (Static variables) ستظل موجودة طوال تنفيذ البرنامج \"\n\"بالكامل، وبالتالي لن تتحرك:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Welcome to RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"كما هو مذكور في [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html)، هذه المتغيرات لا يتم تضمينها عند الاستخدام ولها موقع ذاكرة \"\n\"فعلي مرتبط بها. هذا مفيد للكود غير الآمن (unsafe) والمضمن (embedded)، ويظل \"\n\"المتغير موجودًا طوال تنفيذ البرنامج بالكامل. عندما لا يكون للقيمة ذات النطاق \"\n\"العالمي سبب للحاجة إلى هوية الكائن (object identity)، يفضل استخدام `const` \"\n\"بشكل عام.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"`static` مشابه للمتغيرات العالمية القابلة للتغيير (mutable global variables) \"\n\"في C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` يوفر هوية الكائن (object identity): عنوان في الذاكرة وحالة كما هو \"\n\"مطلوب من الأنواع ذات القابلية للتغيير الداخلي (interior mutability) مثل \"\n\"`Mutex<T>`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"نظرًا لأن المتغيرات الثابتة (`static` variables) يمكن الوصول إليها من أي خيط \"\n\"(thread)، يجب أن تكون `Sync`. القابلية للتغيير الداخلي (Interior mutability) \"\n\"ممكنة من خلال [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.\"\n\"html)، (atomic) أو ما شابه.\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"يمكن إنشاء البيانات المحلية للخيط (Thread-local data) باستخدام الماكرو `std::\"\n\"thread_local`.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"يتم تقييم الثوابت (Constants) في وقت الترجمة (compile time) ويتم تضمين قيمها \"\n\"في أي مكان يتم استخدامها فيه:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"وفقًا لـ [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html) يتم تضمين هذه القيم عند الاستخدام.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"فقط الدوال المميزة بـ `const` يمكن استدعاؤها في وقت الترجمة (compile time) \"\n\"لتوليد قيم `const`. ومع ذلك، يمكن استدعاء الدوال `const` في وقت التشغيل \"\n\"(runtime).\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"اذكر أن `const` يتصرف بشكل مشابه دلاليًا لـ `constexpr` في C++.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"ليس من الشائع جدًا أن يحتاج المرء إلى ثابت يتم تقييمه في وقت التشغيل (runtime \"\n\"evaluated constant)، ولكنه مفيد وأكثر أمانًا من استخدام ثابت (static).\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"الاسم المستعار للنوع (type alias) ينشئ اسمًا لنوع آخر. يمكن استخدام النوعين \"\n\"بالتبادل.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\"// الأسماء المستعارة (Aliases) تكون أكثر فائدة مع الأنواع الطويلة والمعقدة:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"مبرمجو C سيتعرفون على هذا كشيء مشابه لـ `typedef`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"سنقوم بإنشاء هيكل بيانات (data structure) لتمثيل حدث في نظام التحكم في \"\n\"المصعد. الأمر متروك لك لتحديد الأنواع (types) والدوال (functions) لبناء \"\n\"الأحداث المختلفة. استخدم `#[derive(Debug)]` للسماح بتنسيق الأنواع باستخدام \"\n\"`{:?}`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"يتطلب هذا التمرين فقط إنشاء وملء هياكل البيانات (data structures) بحيث يتم \"\n\"تشغيل `main` بدون أخطاء. سيغطي الجزء التالي من الدورة استخراج البيانات من \"\n\"هذه الهياكل.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Welcome to Day 2\"\nmsgstr \"مرحبًا\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Destructuring Structs](./pattern-matching/destructuring-structs.md) (4 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Destructuring Enums](./pattern-matching/destructuring-enums.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\n#: src/error-handling.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"تمرين: فيبوناتشي\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[dyn Trait](./generics/dyn-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"String\"\nmsgstr \"السلاسل النص او الكتابة (Strings)\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"مرحبًا\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Owned Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Errors](./borrowing/examples.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `i32` to be an `I32` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"مرحبًا\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"مرحبًا، أيها العالم\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Result](./error-handling/result.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"مرحبًا، أيها العالم\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), a self-guided Rust course: it provides a guided introduction to \"\n\"the library, with exercises to help you get comfortable with `googletest` \"\n\"macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"السلاسل النص او الكتابة (Strings)\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"مرحبًا، أيها العالم\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"مرحبًا، أيها العالم\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"مرحبًا بكم في Comprehensive Rust 🦀\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"ما هي Rust؟\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"استخدام Cargo\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"مرحبًا بكم في Comprehensive Rust 🦀\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Threads](./concurrency/threads.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Channels](./concurrency/channels.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Send and Sync](./concurrency/send-sync.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Shared State](./concurrency/shared-state.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Exercises](./concurrency/sync-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"[Plain Threads](./concurrency/threads/plain.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"[Scoped Threads](./concurrency/threads/scoped.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"[Senders and Receivers](./concurrency/channels/senders-receivers.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"[Unbounded Channels](./concurrency/channels/unbounded.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"[Bounded Channels](./concurrency/channels/bounded.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Marker Traits](./concurrency/send-sync/marker-traits.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Send](./concurrency/send-sync/send.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Sync](./concurrency/send-sync/sync.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Examples](./concurrency/send-sync/examples.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Arc](./concurrency/shared-state/arc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Mutex](./concurrency/shared-state/mutex.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Example](./concurrency/shared-state/example.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Multi-threaded Link Checker](./concurrency/sync-exercises/link-checker.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"[Solutions](./concurrency/sync-exercises/solutions.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Async Basics](./concurrency/async.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"[Channels and Control Flow](./concurrency/async-control-flow.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Pitfalls](./concurrency/async-pitfalls.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Exercises](./concurrency/async-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[async/await](./concurrency/async/async-await.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[Futures](./concurrency/async/futures.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[Runtimes](./concurrency/async/runtimes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[Tasks](./concurrency/async/tasks.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"\"\n\"[Async Channels](./concurrency/async-control-flow/channels.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Join](./concurrency/async-control-flow/join.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Select](./concurrency/async-control-flow/select.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Blocking the Executor](./concurrency/async-pitfalls/blocking-executor.md) \"\n\"(10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"[Pin](./concurrency/async-pitfalls/pin.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Async Traits](./concurrency/async-pitfalls/async-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Cancellation](./concurrency/async-pitfalls/cancellation.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Broadcast Chat Application](./concurrency/async-exercises/chat-app.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"[Solutions](./concurrency/async-exercises/solutions.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](concurrency/sync-exercises/dining-philosophers.md) \"\n\"for a description of the problem.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.38.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.3\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"تشغيل الدورة\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): a self-paced workshop that goes beyond Rust's \"\n\"built-in testing framework. It covers `googletest`, snapshot testing, \"\n\"mocking as well as how to write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"النظام البيئي ل Rust\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n"
  },
  {
    "path": "po/bn.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-03-03T20:37:57+05:30\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: Abhik Banerjee <abhik@abhikbanerjee.com>\\n\"\n\"Language-Team: abhik-99<abhikbanerjee.com>, noob_rasel<raselm@duck.com>\\n\"\n\"Language: bn\\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==0 || n==1);\\n\"\n\"X-Generator: Poedit 3.4.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Comprehensive Rust 🦀 এ আপনাকে স্বাগতম\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"কোর্স চালানো\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"কোর্স এর গঠন\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"কিবোর্ড শর্টকাট\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"অনুবাদ\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Cargo ব্যবহার\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"রাস্ট ইকোসিস্টেম\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"কোড নমুনা\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Cargo Locally চালানো হচ্ছে\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"প্রথম দিনঃ সকাল\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"স্বাগতম\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"হ্যালো ওয়ার্ল্ড\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"রাস্ট কি?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"রাস্ট এর সুবিধা\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"প্লেগ্রাউন্ড\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"টাইপ এবং মান\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"ভেরিয়েবল\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"মান\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"অঙ্কশাস্ত্র\"\n\n#: src/SUMMARY.md src/types-and-values/strings.md\nmsgid \"Strings\"\nmsgstr \"Strings\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"টাইপ অনুমান\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"অনুশীলনী: ফিবোনাচ্চি\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/slices-and-lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md\n#: src/error-handling/solution.md src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"সমাধান\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"প্রোগ্রামের প্রবাহ নিয়ন্ত্রণের মৌলিক বিষয়\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"if অভিব্যক্তি\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"লুপ্স\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` এবং  `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"লেবেল\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"ব্লক এবং  স্কোপ\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"প্রসার এবং  প্রতিচ্ছায়া করা\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"ফাংশন\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"ম্যাক্রো\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"অনুশীলনী: কল্যাটজ এর ক্রম\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"প্রথম দিনঃ বিকাল\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"টিউপল এবং অ্যারে\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"অ্যারে এর পুনরাবৃত্তি\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"ঢক-এ ফেলা এবং ডিস্ট্রাকচার করা\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"অনুশীলনী: নেস্টেড অ্যারে\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"রেফারেন্স\"\n\n#: src/SUMMARY.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"ভাগ করা রেফারেন্স\"\n\n#: src/SUMMARY.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"একচেটিয়া রেফারেন্স\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"অনুশীলনী: জ্যামিতি\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"ব্যবহারকারী দ্বারা বর্ণিত টাইপ\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"অভিহিত Structs (গঠন)\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Tuple Structs\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Enums\"\n\n#: src/SUMMARY.md src/user-defined-types/static-and-const.md\nmsgid \"Static and Const\"\nmsgstr \"Static এবং Const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"টাইপ এর উপনাম\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"অনুশীলনী: লিফট এর ঘটনাবলী\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"দ্বিতীয় দিনঃ সকাল\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"প্যাটার্ন মিলানো\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"মান মেলানো\"\n\n#: src/SUMMARY.md src/pattern-matching/destructuring.md\nmsgid \"Destructuring\"\nmsgstr \"ডিস্ট্রাকচার করা\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Let এর প্রবাহ নিয়ন্ত্রণ\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"অনুশীলনী: অভিব্যক্তি মূল্যায়ন\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"মেথড এবং ট্রেইট\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"মেথডস\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"ট্রেইট\"\n\n#: src/SUMMARY.md\nmsgid \"Implmementing Traits\"\nmsgstr \"ট্রেইট বাস্তবায়ন করা\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"যুক্ত টাইপ\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"আহরণ করা\"\n\n#: src/SUMMARY.md src/methods-and-traits/exercise.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"অনুশীলনী: জেনেরিক তথ্য নির্মাতা\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"জেনেরিকস\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"জেনেরিক পদ্ধতি\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"জেনেরিক ডেটা টাইপ\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"ট্রেইট এর সীমানা\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"অনুশীলনী: জেনেরিক `min`\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"দ্বিতীয় দিনঃ বিকাল\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"স্ট্যান্ডার্ড লাইব্রেরির টাইপ\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"স্ট্যান্ডার্ড লাইব্রেরি\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"দলিল\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"অনুশীলন: সংখ্যায়ক\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"স্ট্যান্ডার্ড লাইব্রেরির ট্রেইট\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\nmsgid \"Comparisons\"\nmsgstr \"তুলনাসমূহ\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"কার্যকারক\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` এবং `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"নিক্ষেপণ করা\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` এবং `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, স্ট্রাক্টের হালনাগাদ করবার বাক্য গঠন\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"ক্লোজারেস (Closures)\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"অনুশীলনী: রো.ও.t ১৩ (ROT 13)\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"তৃতীয় দিনঃ সকাল\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"মেমোরি ব্যবস্থাপনা\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"প্রোগ্রামের স্মৃতির (Memory) ব্যাপারে পর্যালোচনা\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"মেমরি ব্যবস্থাপনার বিভিন্ন পদ্ধতি\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"মালিকানা\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"মুভ এর শব্দার্থবিদ্যা\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"অনুলিপি টাইপগুলি\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"অনুশীলনী: রচনাকারী টাইপ\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"বুদ্ধিমান ইঙ্গিতকারী (স্মার্ট পয়েন্টার)\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Trait Objects\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"অনুশীলনী: দুই চলবিশিষ্ট তরূ\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"তৃতীয় দিনঃ বিকাল\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"ধার নেওয়া\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"একটি ম্যান ধার নেওয়া\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"ধার নেওয়া ম্যান পরীক্ষা করা\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"আন্তঃকার্যক্ষমতা\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"অনুশীলনী: স্বাস্থ্য পরিসংখ্যান\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes.md\nmsgid \"Slices and Lifetimes\"\nmsgstr \"টুকরা এবং জীবনকাল\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"টুকরা: `&[T]`\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/str.md\nmsgid \"String References\"\nmsgstr \"স্ট্রিং রেফারেন্স\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"জীবনকালের টীকা\"\n\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"জীবনকালের লোপ\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"স্ট্রাক্টের জীবনকাল\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"অনুশীলনী: প্রোটোবাফ পদান্বয় করা\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"চথুর্ত দিন: সকালবেলা\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"পুনরাবৃত্তিকারী\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"অনুশীলনী: পুনরাবৃত্তিকারী মালাবন্ধন\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Modules\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Filesystem Hierarchy\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"দৃশ্যমানতা\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"অনুশীলনী: একটি জি.ইউ.আই লাইব্রেরি বানাবার মডিউল\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"টেস্টিং\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"টেস্ট মডিউল\"\n\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"অন্যান্য টাইপের পরীক্ষা\"\n\n#: src/SUMMARY.md src/testing/useful-crates.md\nmsgid \"Useful Crates\"\nmsgstr \"উপকারী ক্রেটসমূহ\"\n\n#: src/SUMMARY.md src/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"উপহাস করা\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"সংকলনকারী (কম্পাইলার) এর লিন্টগুলি এবং ক্লিপি\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"অনুশীলনী: লুন এর গাণিতিক পরিভাষা\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"চতুর্থ দিন: দুপুরবেলা\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"ত্রুটি সামলানো\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panics-প্যানিক\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Try কার্যকারক\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Try রূপান্তর\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error` ট্রেইট\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` এবং `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"অনুশীলনী: `Result` ব্যবহার করে আবার লেখা\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"অনিরাপদ রাস্ট\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"অনিরাপদ\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"র পয়েন্টার ডি-রেফারেন্স করা\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"পরিবর্তনযোগ্য স্ট্যাটিক ভেরিয়েবলস\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Unions\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"অনিরাপদ কাজকর্ম\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"নানান  অনিরাপদ ট্রেইট\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"অনুশীলনী: এফ . এফ . আই মোড়ক\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"সেটআপ\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"গঠনের নিয়ম\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"বাইনারি\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"লাইব্রেরি\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"জন্মদিনের সেবার টিউটোরিয়াল\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"ইন্টারফেস\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"সার্ভিস এ . পি . আই\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"সার্ভিস\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"সার্ভার\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"স্থাপন\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"ক্লায়েন্ট\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"API পরিবর্তন\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"বাস্তবায়নগুলির হাল নাগাদ করা\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"এ.আই.দি.এল টাইপ\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"বনিয়াদি টাইপ\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"অ্যারে এর টাইপ\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"অবজেক্ট পাঠানো\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"পার্সেলবলেস  (পুলিন্দা বানানো যায় যাকে)\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"একাধিক ফাইল পাঠানো\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Logging\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"আন্তঃকার্যক্ষমতা\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"C এর সাথে\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Bindgen এর মাধ্যমে C কে ডাকা\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"C থেকে রাস্ট কে ডাকা\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"C++এর সাথে\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Bridge মডিউল\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"রাস্ট Bridge\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"উত্পন্ন হওয়া C++ কোড\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ Bridge\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"অংশে মালিকানাধীন টাইপগুলি\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"অংশে মালিকানাধীন গণনাকারী (শেয়ার্ড ইনুম্স)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"রাস্ট এর ত্রুটি পরিচালনা\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"C++ এর ত্রুটি পরিচালনা\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"আরো কিছু টাইপ\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"এন্ড্রোইড এর জন্যে বানানো: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"এন্ড্রোইড এর জন্যে বানানো: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"এন্ড্রোইড এর জন্যে বানানো: রাস্ট\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Java এর সাথে\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"অনুশীলন\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Chromium এবং Cargo এর বাস্তুতন্ত্রগুলির মধ্যে তুলনা\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"কর্মপন্থা\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"অনিরাপদ কোড\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"ক্রোমিয়ম C++ এর থেকে আসা রাস্ট কোড এর ওপরে নির্ভর করছে\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"অনুশীলনী\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` কোড সংগ্রহ বা লাইব্রেরি\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"রাস্ট এ পরীক্ষা-নিরীক্ষা করবার জন্যে জি . এন নিয়মাবলী\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` ম্যাক্রো\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"সি++ এর সাথে আন্তঃকার্যক্ষমতা\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"উদাহরণ বাইন্ডিং\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"সি.এক্স.এক্স এর সীমাবদ্ধতা\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"সি.এক্স.এক্স ত্রুটি পরিচালনা\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"ত্রুটি পরিচালনা: কিউ.আর উদাহরণ\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"ত্রুটি পরিচালনা: পি.এন.জি উদাহরণ\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"ক্রোমিয়ম এ সি.এক্স.এক্স ব্যবহার করা\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"তৃতীয় পক্ষের ক্রেট জোড়া\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Cargo.toml সজ্জিত করা\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"`gnrt_config.toml` সজ্জিত করা\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"ক্রেট ডাউনলোড করা\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"`gn` নির্মাণ নিয়মাবলী উত্পাদন করা\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"সমস্যা সমাধান করা\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"কোড উৎপাদন করে এমন নির্মাণ নিয়মসমূহ\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"নির্মাণ নিয়মসমূহ যা C++ নির্মাণ করে বা কোনো ইচ্ছামত কাজ করে\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"ক্রেট এর ওপরে নির্ভর করে যে\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"পর্যালোচনা এবং নিরীক্ষা\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Chromium এর মূল কোড এ ঢোকা\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"ক্রেটগুলি অবাধ রাখা\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"সবকিছু একসাথে এনে কিছু বানানো - অনুশীলনী\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"অনুশীলনীর সমাধানসমূহ\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal: সকাল\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"একটি ন্যূনতম উদাহরণ\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"মাইক্রোকন্ট্রোলার\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"অপক্ব এম . এম . আই . ও\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"পি . এ . সি\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crates\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Board Support Crates\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"টাইপ এর অবস্থা বিবেচনা করে এমন প্যাটার্ন\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` এবং `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"ডিবাগিং\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"আরও প্রকল্পগুলি\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"কম্পাস\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"সমাধানসমূহ\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"বেয়ার মেটাল: দুপুরবেলা\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"এপ্লিকেশন প্রসেসর\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"রাস্টের জন্যে প্রস্তুত হওয়া\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Inline Assembly\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"চলুন একটি UART Driver লিখি\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"আরও Traits\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"একটি উন্নতর UART ড্রাইভার\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"একাধিক রেজিস্টারস\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"চালক বা ড্রাইভার\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"ব্যবহার করা\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"ব্যতিক্রম\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC Driver\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concurrency: সকাল\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"সম্পাদনার সুতো\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"স্কোপড Threads\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"নালা বা চ্যানেল\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"সীমাহীন চ্যানেল\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"আবদ্ধ চ্যানেল\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` এবং `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"উদাহরণসমূহ\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"অংশিদারী মালিকানা বিভাজিত অবস্থা বা স্টেট\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"উদাহরণ\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Dining দার্শনিক\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"মাল্টি থ্রেডেড লিঙ্ক চেকার\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"সমবর্তীশীলতা: দুপুরবেলা\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"Async Basics\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"ভবিষ্যৎ\"\n\n#: src/SUMMARY.md src/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"রানটাইম\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Tasks-কর্ম\"\n\n#: src/SUMMARY.md src/async/channels.md\nmsgid \"Async Channels\"\nmsgstr \"অসমনিয়ত চ্যানেল\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"প্রবাহ নিয়ন্ত্রণ\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"জোড়া\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"নির্বাচন করা\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"ক্ষতি\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"এক্সিকিউটর ব্লক করা\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Async Traits\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"বাতিলকরণ\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"সম্প্রচার করে কথোপকথন করার এপ্লিকেশন\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"চূড়ান্ত কিছু কথা\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"ধন্যবাদ!\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"শব্দকোষ\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"অন্যান্য উৎসসমূহ\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"ক্রেডিটস\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"এটি Google এর অ্যান্ড্রয়েড টিম দ্বারা তৈরি একটি চার দিনের রাস্টশিখবার কোর্স যা \"\n\"রাস্ট-এর সম্পূর্ণ স্পেকট্রাম, মৌলিক সিনট্যাক্স থেকে শুরু করে জেনেরিক এবং ত্রুটি \"\n\"পরিচালনার মতো উন্নত বিষয় শিখতে সাহায্য করতে পারে।\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"এই কোর্স এর সবচেয়ে নতুন সংস্করণ <https://google.github.io/comprehensive-rust/> \"\n\"- এখানে পাওয়া যাবে। যদি অন্য কোথাও থেকে আপনি পড়ছেন তাহলে এইখানে একবার দেখে \"\n\"নেয়া ভালো।\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"এই কোর্সটি পি.ডি.এফ মাধ্যমেও উপলব্ধ আছে (comprehensive-rust.pdf)।\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"কোর্সের লক্ষ্য হল আপনাকে রাস্ট শেখানো। আমরা ধরে নিলাম আপনি কিছুই জানেন না রাস্ট \"\n\"সম্পর্কে এবং আশা করি:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"আপনাকে রাস্ট সিনট্যাক্স এবং ভাষা সম্পর্কে একটি বিস্তারিত বোঝায়\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"আপনাকে বিদ্যমান প্রোগ্রামগুলি সংশোধন করতে এবং রাস্ট এ নতুন প্রোগ্রাম লিখতে সক্ষম করে।\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"আপনাকে সাধারণ রাস্ট ইডিয়মস দেখায়।\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"আমরা কোর্সের প্রথম চারটি দিনকে রাস্ট ফান্ডামেন্টাল বলি।\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"এটির উপর ভিত্তি করে, আপনাকে এক বা একাধিক বিশেষ বিষয়গুলিতে ডুব দেওয়ার জন্য \"\n\"আমন্ত্রিত।\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): অ্যান্ড্রয়েড প্ল্যাটফর্মের ডেভেলপমেন্ট (AOSP) এর জন্য রাস্ট \"\n\"ব্যবহার করার একটি অর্ধ-দিনের কোর্স। এর মধ্যে C, C++ এবং Java সহ আন্তঃকার্যযোগ্যতা \"\n\"অন্তর্ভুক্ত রয়েছে।\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium][chromium.md): একটি আধা দিনের কোর্স যেখানে কিভাবে Chromium যুক্ত \"\n\"ব্রাউসার এ রাস্ট ব্যবহার করা যেতে পারে এটা শেখানো হয়েছে। এতে C++ আন্তঃকার্যক্ষমতা \"\n\"সহ তৃতীয় পক্ষের ক্রেট কিভাবে Chromium এ ব্যবহার করা যেতে পারে এটাও দেখানো হয়েছে।\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[বেয়ার-মেটাল](bare-metal.md): রাস্ট কিভাবে এমবেডেড ডেভেলপমেন্ট এ লাগতে পারে এই \"\n\"বিষয়ের ওপরে একটা পুরো দিনের ক্লাস। মাইক্রোকন্ট্রোলেরস এবং এপ্লিকেশন প্রসেসসর্স এই \"\n\"দুটো বিষয়গুলির চর্চা করা হয়েছে এখানে।\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[সমবর্তী গণনা](concurrency.md): রাস্ট এ সমবর্তী গণনার ওপরে একটা পুরো দিনের ক্লাস \"\n\"। এখানে ক্লাসিকাল সমবর্তী (থ্রেড এবং mutexes ব্যবহার করে অগ্রক্রয়াধিকার-সংক্রান্ত \"\n\"সময়সূচী বানানো) গণনা এবং async/await সমবর্তী গণনা (ফিউচার ব্যবহার করে সমবায় \"\n\"মাল্টিটাস্কিং)-এই দুই ধরণের নিয়ে চর্চা করা হয়েছে।\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"যা লক্ষ্যের মধ্যে পড়ে না\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"রাস্ট একটি বৃহৎ প্রোগ্রামিং ল্যাংগুয়েজ এবং আমরা কয়েক দিনের মধ্যে এটিকে কভার করতে \"\n\"সক্ষম হব না। এই কোর্সের কিছু অ-লক্ষ্য হলঃ\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"ম্যাক্রো কিভাবে বানানো যেতে পারে: এর জন্যে [রাস্ট বই এর অধ্যায় ১৯.৫](https://doc.\"\n\"rust-lang.org/book/ch19-06-macros.html) এবং [উদাহরণ দ্বারা Rust](https://doc.\"\n\"rust-lang.org/rust-by-example/macros.html) দেখুন।\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"\\\\##ধৃষ্টতাসমূহ\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"কোর্সটি অনুমান করে যে আপনি ইতিমধ্যেই প্রোগ্রাম করতে জানেন। রাস্ট একটি স্ট্যাটিকালি \"\n\"টাইপড প্রোগ্রামিং ল্যাংগুয়েজ এবং আমরা কখনও কখনও C এবং C++ এর সাথে তুলনা করব \"\n\"ভালোভাব ব্যাখা করার জন্য অথবা বিপরীত রাস্ট পদ্ধতি।\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"আপনি যদি জানেন কিভাবে একটি ডাইনামিক্যালি টাইপড ভাষায় প্রোগ্রাম করতে হয় যেমন \"\n\"পাইথন বা জাভাস্ক্রিপ্ট, তাহলে আপনি খুব ভাল অনুসরণ করতে সক্ষম হবেন।\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"এটি একটি  _speaker note_ এর উদাহরণ। আমরা অতিরিক্ত তথ্য স্লাইডে যোগ করতে এইগুলো \"\n\"ব্যবহার করবো। এটি প্রধান পয়েন্ট হতে পারে যা প্রশিক্ষকের উচিত কভারের পাশাপাশি \"\n\"ক্লাসে আসা সাধারণ প্রশ্নের উত্তর দেওয়া।\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"এই পৃষ্ঠাটি কোর্স প্রশিক্ষকের জন্য।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"আমরা কীভাবে কোর্সটি চালাচ্ছি সে সম্পর্কে এখানে কিছু পটভূমির গুগলে অভ্যন্তরীণভাবে  তথ্য \"\n\"রয়েছে।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"সাধারণত আমরা সকাল ৯.০০ থেকে বিকেল ৪.০০ (মাঝে ১ ঘন্টার বিরতিসহ) পর্যন্ত ক্লাস করে \"\n\"থাকি। এই জন্যে সকালে ৩ ঘন্টা এবং দুপুরে ৩ ঘন্টা সময়ে থাকে ক্লাস এর জন্যে। দুটি ভাগেই \"\n\"শিক্ষার্থী দের জন্যে বিরতি এবং অনুশীলনীর কাজের সময়ে যুক্ত থাকে।\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"আপনি কোর্স চালানোর আগে, আপনি চাইবেন:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"কোর্সের উপাদানের সাথে নিজেকে পরিচিত করুন। আমরা স্পিকার নোট অন্তর্ভুক্ত করেছি মূল \"\n\"পয়েন্টগুলি হাইলাইট করতে সাহায্য করার জন্য (অনুগ্রহ করে আরও স্পিকার নোট অবদান রেখে \"\n\"আমাদের সাহায্য করুন !)। উপস্থাপন করার সময়, আপনি একটি স্পিকার নোট পপআপ এ খুলতে \"\n\"ভুলবেন না (\\\"স্পীকার নোটস\\\" এর পাশে একটি ছোট তীর সহ লিঙ্কে ক্লিক করুন)। এই পথে \"\n\"ক্লাসে উপস্থাপন করার জন্য আপনার কাছে একটি পরিষ্কার পর্দা রয়েছে।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"তিথির ওপরে আগে থেকে সিদ্ধান্ত নিয়ে নেয়া ভালো। যেহেতু এই কোর্সটি ৪-দিন এর সেহেতু \"\n\"আমাদের তরফ থেকে পরামর্শ থাকবে যে তিথিগুলি দুই সপ্তা ধরে ছড়িয়ে রাখবা। আগের \"\n\"অংশগ্রহণকারীদের প্রতিক্রিয়া থেকে এই পাওয়া গেছে যে এরম করে একাধিক সপ্তা ধরে \"\n\"কোর্সটি করালে তারা আরও ভালো বোঝে।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"আপনার ব্যক্তিগত অংশগ্রহনের জন্য যথেষ্ট বড় একটি রুম খুঁজুন। আমরা সুপারিশ করি 15-25 জনের \"\n\"সাইজের ক্লাস। এটি যথেষ্ট ছোট যে মানুষ আরামদায়ক অনুভব করে প্রশ্ন জিজ্ঞাসা করতে--- \"\n\"এটি যথেষ্ট ছোট যে একজন প্রশিক্ষক এর সময় থাকবে প্রশ্নের উত্তর দেওয়ার জন্য। নিশ্চিত \"\n\"করুন যে ঘরে আপনার জন্য এবং ছাত্রদের জন্য _desks_ আছে : আপনা্দের সকলকে আপনাদের \"\n\"ল্যাপটপের সাথে বসে কাজ করতে সক্ষম হতে হবে। বিশেষ করে, আপনি একজন প্রশিক্ষক হিসাবে \"\n\"প্রচুর লাইভ-কোডিং করবেন, তাই lecturn আপনার জন্য খুব সহায়ক হবে না।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"আপনার কোর্সের দিন, জিনিসগুলি সেট করতে একটু তাড়াতাড়ি করুন আমরা আপনার ল্যাপটপে \"\n\"চলমান `mdbook serve` ব্যবহার করে সরাসরি উপস্থাপন করার পরামর্শ দিই (দেখুন \"\n\"\\\\[ইনস্টলেশন নির্দেশাবলী\\\\] [3](https://github.com/google/comprehensive-\"\n\"rust#building))। আপনি পৃষ্ঠাগুলি পরিবর্তন করার সাথে সাথে এটি কোনও ল্যাগ ছাড়াই \"\n\"সর্বোত্তম কার্যক্ষমতা নিশ্চিত করে। আপনার ল্যাপটপ ব্যবহার করলে আপনি আপনার বা কোর্সের \"\n\"মতো টাইপ ভুল ঠিক করতে পারবেন অংশগ্রহণকারীরা তাদের খুঁজে বের করে।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"তাদেরকে একা একা বা ছোট দলে অনুশীলনের সমাধান করতে দিন। আমরা সাধারণত সকালে এবং \"\n\"বিকেলে ব্যায়ামের জন্য 30-45 মিনিট ব্যয় করি (সমাধানগুলি পর্যালোচনা করার সময় সহ)। \"\n\"নিশ্চিত করুন লোকেদের জিজ্ঞাসা করুন তারা আটকে আছে কিনা বা আপনি সাহায্য করতে পারেন \"\n\"এমন কিছু আছে কিনা। যখন আপনি দেখতে পাচ্ছেন যে বেশ কয়েকজনের একই সমস্যা রয়েছে, \"\n\"এটিকে ক্লাসে কল করুন এবং একটি সমাধান অফার করুন, যেমন, প্রাসঙ্গিক তথ্যটি  স্ট্যান্ডার্ড \"\n\"লাইব্রেরিতে  কোথায় পাওয়া যাবে তা লোকেদের দেখিয়ে দিন।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"এইসব যে, কোর্সটি চালানোর জন্য শুভকামনা। আমরা আশা করি এটা ততটাই মজার হবে আপনার \"\n\"জন্য যতটা হয়েছিলো আমাদের কাছে।\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"অনুগ্রহ করে \\\\[প্রতিক্রিয়া প্রদান করুন\\\\] [1](https://github.com/google/\"\n\"comprehensive-rust/discussions/86) পরে যাতে আমরা উন্নতি করতে পারি। অবশ্যই \"\n\"আপনার জন্য কী ভাল কাজ করেছে এবং উত্তম কী তৈরি করা যেতে পারে তা আমরা শুনতে চাই।\"\n\"আপনার ছাত্রদেরও \\\\[আমাদের প্রতিক্রিয়া পাঠাতে\\\\] খুব স্বাগত জানাই[2](https://\"\n\"github.com/google/comprehensive-rust/discussions/100)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"রাস্ট এর ভিত্তি জ্ঞান \"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"প্রথম চার দিন ধরে [রাস্ট এর মূলসূত্রগুলি](../welcome-day-1.md) সেখান হবে। এই \"\n\"অধ্যায়গুলি দ্রুত গতির হয় এবং আমরা অনেকটা একসাথে শিখবার চেষ্টা করাবো।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"কোর্স এর সময়সূচী\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"প্রথম দিনের সকাল (বিরতিসহ ২ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[স্বাগত](../welcome-day-1.md) (৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[হ্যালো, ওয়ার্ল্ড](../hello-world.md) (১৫ মিনিট )\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (45 minutes)\"\nmsgstr \"[টাইপ এবং মান](../types-and-values.md) (৪৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"[নিয়ন্ত্রণ প্রবাহর প্রাথমিক জ্ঞান](../control-flow-basics.md) (৪০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"প্রথম দিনের দুপুর (বিরতিসহ ২ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[টিউপল এবং অ্যারে](../tuples-and-arrays.md) (৩৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (35 minutes)\"\nmsgstr \"[রেফারেন্স](../references.md) (৩৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[ব্যবহারকারী দ্বারা সংজ্ঞায়িত টাইপ](../user-defined-types.md) (৫০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"দ্বিতীয় দিনের সকাল (বিরতিসহ ২ ঘন্টা ৫০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[স্বাগতম](../welcome-day-2.md) (৩ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[প্যাটার্ন ম্যাচিং](../pattern-matching.md) (১ ঘন্টা)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (45 minutes)\"\nmsgstr \"[প্রণালী এবং ট্রেইট](../methods-and-traits.md) (৪৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (40 minutes)\"\nmsgstr \"[জেনেরিক্স\\\\](../generics.md) (৪০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 10 minutes, including breaks)\"\nmsgstr \"দ্বিতীয় দিনের দুপুরবেলা (বিরতিসহ ৩ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[স্ট্যান্ডার্ড লাইব্রেরির টাইপগুলি](../std-types.md) (১ ঘন্টা টো মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"[স্ট্যান্ডার্ড লাইব্রেরির ট্রেইট](../std-traits.md) (১ ঘন্টা টো মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"তৃতীয় দিনের সকালবেলা (বিরতিসহ ২ ঘন্টা ২০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[স্বাগতম](../welcome-day-3.md) (৩ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[মেমরি ব্যবস্থাপনা](../memory-management.md) (১ ঘন্টা)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[বুদ্ধিমান ইঙ্গিতকারী বা স্মার্ট পয়েন্টার](../smart-pointers.md) (৫৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"তৃতীয় দিনের দুপুরবেলা (বিরতিসহ ২ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (50 minutes)\"\nmsgstr \"[ধার নেওয়া বা বরোয়িং](../borrowing.md) (৫০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\"[টুকরা বা স্লাইসেস এবং জীবনকাল ](../slices-and-lifetimes.md) (১ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"চতুর্থ দিনের সকালবেলা (বিরতিসহ ২ঘন্টা ৫০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[স্বাগতম](../welcome-day-4.md) (৩ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[পুনরাবৃত্তিকারী বা ইটারেটর্স](../iterators.md) (৪৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[মডিউল](../modules.md) (৪০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (1 hour)\"\nmsgstr \"[পরীক্ষা করা](../testing.md) (১ ঘন্টা)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"চতুর্থ দিনের দুপুরবেলা (বিরতিসহ ২ ঘন্টা ১০ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (55 minutes)\"\nmsgstr \"[ত্রুটি পরিচালনা](../error-handling.md) (৫৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[অনিরাপদ রাস্ট](../unsafe-rust.md) (১ ঘন্টা ৫ মিনিট)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"গভীর ডুব\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"রাস্টের মূল বিষয়ের ওপরে ৪ দিনের ক্লাস ছাড়াও, এখানে আরও কিছু বিশেষ বিষয় চর্চা করা \"\n\"হয়েছে যেমন:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"অ্যান্ড্রয়েডে রাস্ট\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[অ্যান্ড্রয়েডে রাস্ট](../android.md) হল অ্যান্ড্রয়েড প্ল্যাটফর্ম ডেভেলপমেন্ট এর জন্য \"\n\"রাস্ট ব্যবহার করার একটি অর্ধ-দিনের কোর্স। এর মধ্যে রয়েছে C, C++, এবং Java এর সাথে \"\n\"আন্তঃকার্যযোগ্যতা।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"আপনার একটি \\\\[AOSP চেকআউট\\\\] প্রয়োজন হবে [1](https://source.android.com/docs/\"\n\"setup/download/downloading)। একটি চেকআউট করুন \\\\[কোর্স রিপোজিটরি [2](https://\"\n\"github.com/google/comprehensive-rust) একই মেশিনে এবং `src/android/` ডিরেক্টরি \"\n\"সরান আপনার AOSP চেকআউটের মূল ডিরেক্টরিতে। এটি অ্যান্ড্রয়েড বিল্ড সিস্টেম নিশ্চিত \"\n\"করবে `src/android/`\\\\-এ `Android.bp` ফাইলগুলি দেখুন।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"নিশ্চিত করুন যে `adb সিঙ্ক` আপনার এমুলেটর বা বাস্তব ডিভাইসের সাথে কাজ করে এবং \"\n\"Android উদাহরণগুলো প্রি-বিল্ড করুন `src/android/build_all.sh` ব্যবহার করে।স্ক্রিপ্ট \"\n\"পড়ুন কমান্ড দেখতে যেগুলো এটি চালায় এবং নিশ্চিত করুন যে আপনি যখন তাদের ব্যবহার করেন \"\n\"তখন তারা কাজ করে।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"ক্রোমিয়মে রাস্ট\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"ক্রোমিয়ম ব্রাউসার এর জন্যে রাস্ট কিভাবে ব্যবহার করা যায় এর ওপরে অর্ধেক দিনের জন্যে \"\n\"গভীর ভাবে চর্চা করা হয়েছে এখানে - [ক্রোমিয়ম এর জন্যে রাস্ট](../chromium.md)। \"\n\"ক্রোমিয়ম এর `gn` নির্মাণ পদ্ধতিতে কিভাবে ব্যবহার করা যেতে পারে, তৃতীয় পক্ষের \"\n\"লাইব্রেরি (যাকে ক্রেট বলা হয়ে Rust এ) ব্যবহার করা এবং C++ আন্তঃ-কার্যক্ষমতা এই \"\n\"বিষয়ে গুলির গভীর চর্চা করা হয়েছে।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"এর জন্যে আপনার ক্রোমিয়ম নির্মাণ করবার ক্ষমতা থাকে দরকার। যদিও যেকোনো নির্মিত \"\n\"ক্রোমিয়ম ব্যবহার করা যাবে, তবুও তাড়াতাড়ি কাজ করবার জন্যে আমরা একটি ডিবাগ পদ্ধতিতে \"\n\"নির্মিত ক্রোমিয়ম ব্যবহার করবার [পরামর্শ](../chromium/setup.md) দেব। নির্মিত \"\n\"ক্রোমিয়ম যেন আপনার সিস্টেমে চলতে পারে এটাও মাথায় রাখা দরকার। \"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Bare-Metal রাস্ট\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Bare-Metal রাস্ট](../bare-metal.md): রাস্ট ব্যবহার করে bare-metal (embedded) \"\n\"ডেভেলপমেন্ট এর জন্য একটি পুরো দিনের ক্লাস। মাইক্রোকন্ট্রোলার এবং অ্যাপ্লিকেশন প্রসেসর \"\n\"উভয়ই কভার করা হয়েছে।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"মাইক্রোকন্ট্রোলার অংশের জন্য, আপনাকে সময়ের আগে কিনতে হবে [BBC micro:bit](https://\"\n\"microbit.org/) v2 উন্নয়ন বোর্ড। সবাইকে [welcome page](../bare-metal.md) এ \"\n\"বর্ণিত প্যাকেজগুলির একটি সংখ্যা ইনস্টল করতে হবে।\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Concurrency in রাস্ট\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Concurrency in Rust](../concurrency.md) ডিপ ডাইভ ক্লাসিক্যালের উপর পুরো দিনের \"\n\"একটি ক্লাস সেইসাথে `async`/`await` concurrency.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"আপনার প্রয়োজন হবে একটি নতুন ক্রেট সেট আপ এবং নির্ভরতা ডাউনলোড করা এবং প্রস্তুত \"\n\"হওয়া। তারপর আপনি পরীক্ষা করার জন্য `src/main.rs`\\\\-এ উদাহরণগুলো কপি/পেস্ট করতে \"\n\"পারেন:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"বিন্যাস\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"কোর্সটি খুব ইন্টারেক্টিভ হতে বোঝানো হয়েছে এবং আমরা এটি করার সুপারিশ করছি প্রশ্নগুলো \"\n\"Rust এর অন্বেষণ চালনা করুক!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"mdBook-এ বেশ কিছু দরকারী কীবোর্ড শর্টকাট রয়েছেঃ\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Arrow-Left\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Navigate to the previous page.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Arrow-Right\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Navigate to the next page.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Execute the code sample that has focus.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Activate the search bar.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"কোর্সটি বিস্ময়কর একটি সেট স্বেচ্ছাসেবক দ্বারা অন্যান্য ভাষায় অনুবাদ করা হয়েছেঃ\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[ব্রাজিলীয় পর্তুগীজ](https://google.github.io/comprehensive-rust/pt-BR/) করা \"\n\"হয়েছে [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) \"\n\"এবং [@henrif75](https://github.com/henrif75) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[সরলীকৃত চীনা ভাষা](https://google.github.io/comprehensive-rust/zh-CN/) করা \"\n\"হয়েছে  [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), এবং [@nodmp]\"\n\"(https://github.com/nodmp) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[ঐতিহ্যগত চীনা ভাষা](https://google.github.io/comprehensive-rust/zh-TW/) করা \"\n\"হয়েছে [@hueich](https://github.com/hueich), [@victorhsieh](https://github.\"\n\"com/victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen]\"\n\"(https://github.com/kuanhungchen), এবং [@johnathan79717](https://github.com/\"\n\"johnathan79717) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[কোরিয়ান](https://google.github.io/comprehensive-rust/ko/) করা হয়েছে \"\n\"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com/\"\n\"jiyongp) এবং [@jooyunghan](https://github.com/jooyunghan) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[স্প্যানিশ ভাষা](https://google.github.io/comprehensive-rust/es/) করা হয়েছে \"\n\"[@deavid](https://github.com/deavid) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"ভাষার মধ্যে স্যুইচ করতে উপরের-ডান কোণে ভাষা চয়নকারী ব্যবহার করুন।\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"অসম্পূর্ণ অনুবাদ\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"প্রচুর সংখ্যক অনুবাদ চলছে। আমরা সাম্প্রতিক আপডেট হওয়া অনুবাদগুলির সাথে লিঙ্ক করিঃ\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[বাংলা](https://google.github.io/comprehensive-rust/bn/) করা হয়েছে \"\n\"[@abhik-99](https://github.com/abhik-99) এবং [@raselmandol](https://github.\"\n\"com/raselmandol) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[ইতালিয়ান ভাষা](https://google.github.io/comprehensive-rust/it/) করা হয়েছে \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) এবং [@detro](https://\"\n\"github.com/detro) দ্বারা।\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"আপনি যদি এই প্রচেষ্টায় সাহায্য করতে চান, তাহলে কীভাবে শুরু করবেন তার জন্য \"\n\"\\\\[আমাদের নির্দেশাবলী\\\\] দেখুন। অনুবাদগুলি \\\\[ইস্যু ট্র্যাকার\\\\] এ সমন্বিত হয়েছে।\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"আপনি যখন রাস্ট সম্বন্ধে পড়া শুরু করবেন, আপনি শীঘ্রই [কার্গো](https://doc.rust-lang.\"\n\"org/cargo/) এর সাথে দেখা করবেন, একটি আদর্শ টুল যা Rust অ্যাপ্লিকেশন তৈরি এবং \"\n\"চালানোর জন্য Rust ইকোসিস্টেমে ব্যবহৃত হয়েছে। এখানে আমরা চাই কার্গো কী এবং এটি \"\n\"কীভাবে বৃহত্তর ইকোসিস্টেমে ফিট করে তার একটি সংক্ষিপ্ত বিবরণ দিতে এবং কিভাবে এটি \"\n\"এই প্রশিক্ষণের সাথে খাপ খায়।\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Installation\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**<https://rustup.rs/>. এ দেওয়া নির্দেশাবলী অনুসরণ করুন।**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"এভাবে আপনি কার্গো (`cargo`) এবং রাস্টের কম্পাইলার (`rustc`) পেয়ে যাবেন। কার্গো \"\n\"নির্মাণকার্যে ব্যবহার করা হবে। উপরন্তু `rustup` ও পেয়ে যাবেন। এটি ব্যবহার করা হয়ে \"\n\"বিভিন্ন রাস্টের কম্পাইলার এর সংস্করণ একই সিস্টেম এ ব্যবহার করবার জন্যে।\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"রাস্ট ইনস্টল করবার পরে আপনার এডিটর বা আই.ডি.ই সজ্জিত করা দরকার। বেশিরভাগ এডিটর \"\n\"এইজন্যে [rust-analyzer](https://rust-analyzer.github.io/) এর সাথে যোগাযোগ করে \"\n\"করতে সক্ষম। [rust-analyzer](https://rust-analyzer.github.io/) [VS Code]\"\n\"(https://code.visualstudio.com/), [Emacs](https://rust-analyzer.github.io/\"\n\"manual.html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) এবং ইত্যাদির জন্যে স্বয়ং-সম্পূর্ণতা এবং সরাসরি সংজ্ঞায় খুজার মতন \"\n\"কার্যকারিতা প্রদান করে। আরেটা আই.ডি.ই-ও ব্যবহার করা যেতে পারে এখানে যার নাম \"\n\"[RustRover](https://www.jetbrains.com/rust/)।\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"ডেবিয়ান বা উবুন্টু তেও `apt` দ্বারা আপনি কার্গো, রাস্টের উৎস এবং [Rust formatter]\"\n\"(https://github.com/rust-lang/rustfmt) ইনস্টল করতে পারেন। কিন্তু এই পদ্ধতিতে \"\n\"করলে পুরোনো রাস্টের সংকরণ পাবার সম্ভবনা আছে। এর দরুন অপ্রত্যাশিত আচরণ প্রদর্শন হতে \"\n\"পারে। এর জন্যে কম্যান্ড হলো:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"The Rust এর ইকোসিস্টেম\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"The Rust ecosystem এ বেশ কয়েকটি সরঞ্জাম রয়েছে, যার মধ্যে প্রধানগুলি হল:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: Rust কম্পাইলার যা `.rs` ফাইলগুলিকে বাইনারি এবং অন্যান্যগুলিতে পরিণত করে \"\n\"মধ্যবর্তী বিন্যাসে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: রাস্টের নির্ভরতা ব্যবস্থাপক এবং নির্মাণ সাধনী। কার্গো জানে কিভাবে \"\n\"<https://crates.io>\\\\-এ হোস্ট করা যে সব ক্র্যাটগুলো প্রোগ্রামের জন্যে দরকার সেগুলি \"\n\"ডাউনলোড করতে হয় এবং এটি তাদের পাস করবে আপনার প্রজেক্ট তৈরি করার সময় `rustc` \"\n\"তে। কার্গো একটি অন্তর্নির্মিত পরীক্ষা পরিচালক এর সঙ্গে আসে রানার যা সর্বনিম্ন পরীক্ষা \"\n\"চালানোর জন্য ব্যবহৃত হয়।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: রাস্ট টুলচেইন ইনস্টলার এবং আপডেটার। এই টুল ব্যবহার করা হয় রাস্ট-এর নতুন \"\n\"সংস্করণ প্রকাশিত হলে `rustc` এবং `cargo` ইনস্টল ও আপডেট করতে। উপরন্তু, `rustup` \"\n\"স্ট্যান্ডার্ডে লাইব্রেরির জন্য ডকুমেন্টেশনও ডাউনলোড করতে পারে আপনি একবারে Rust এর \"\n\"একাধিক সংস্করণ এবং `রস্টআপ` ইনস্টল করতে পারেন প্রয়োজন অনুসারে আপনাকে তাদের মধ্যে \"\n\"স্যুইচ করতে দেবে।\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/tuples-and-arrays/tuples-and-arrays.md src/references/exclusive.md\n#: src/pattern-matching/destructuring.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md src/concurrency/threads.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"গুরুত্বপূর্ণ দিক:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"রাস্ট দ্রুত প্রকাশের সময়সূচী অনুসরণ করে যার দরুন প্রত্যেক ৬ মাস অন্তর-অন্তর নতুন  সংস্করণ \"\n\"প্রকাশ করা হয়ে। নতুন সংস্করণগুলি পুরোনো সংস্করণগুলির সাথে সামঞ্জস্য বজায় রাখার \"\n\"অতিরিক্ত নতুন বৈশিষ্ট্য আনে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"নতুন সংস্করণ-মুক্তির জন্যে ৩টি গতিপথ রাখা হয়েছে - \\\"stable\\\" (স্ট্যাবল - স্থিতিশীল), \"\n\"\\\"beta\\\" (বিটা -প্রাক মুক্তি নির্মিত) এবং \\\"nightly\\\" (নাইটলি - রাত্রিকালীন)।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"নতুন বৈশিষ্টগুলি নাইটলি নির্মিত রাস্ট-এ পরীক্ষা করা হয়ে এবং বিটা নির্মিত প্রত্যেক \"\n\"৬মাসে স্ট্যাবল সংকরণ হয়ে যায়।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"ডিপেন্ডেন্সির সমাধান করবার জন্যে যেকোনো [বৈকল্পিক রেজিস্ট্রি](https://doc.rust-\"\n\"lang.org/cargo/reference/registries.html), গিট্, ফোল্ডার ইত্যাদির ব্যবহার ও করা \"\n\"যেতে পারে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"রাস্টের [প্রকাশন](https://doc.rust-lang.org/edition-guide/) -ও আছে: ইদানিং \"\n\"রাস্ট ২০২১ প্রকাশন ব্যবহার করা হয়। এর আগের প্রকাশনগুলি হলো রাস্ট ২০১৫ এবং রাস্ট ২০১।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"একটি প্রকাশন আগের প্রকাশন এর সঙ্গে সামঞ্জস্য বজায় নাও রাখতে পারে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"যাতে কোড করবার দরুন ভেঙে না যায় তাই নিজের পছন্দের মতন প্রকাশন বেঁচে নেবার সুবিধা \"\n\"`Cargo.toml` ফাইল দ্বারা দেওয়া হয়েছে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"বাস্তুতন্ত্র যাতে বিভাজিত না হয় যায় তাই রাস্ট কম্পাইলার আলাদা-আলাদা প্রকাশনের কোড \"\n\"একসাথে মিলিয়ে কাজ করতে পারে।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"তবে এটাও উল্লেখ্যযোগ্য যে বেশিরভাগ সময়ে `cargo` না কাজে লাগিয়ে কম্পাইলার ধরে কাজ \"\n\"করা খুবই দুর্লভ (বেশিরভাগ ব্যবহারকারী কখনই তা করে থাকে না)।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"এবং এটাও বলে রাখা দরকার যে কার্গো নিজেও অনেক ক্ষমতাশীল ও বিস্তীর্ণ একটি সাধন। এর \"\n\"দ্বারা একাধিক আধুনিক কাজ করা সম্ভব যেমন:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"প্রজেক্ট/প্যাকেজ এর গঠন\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[কর্মক্ষেত্র বা ওয়ার্কস্পেসেস](https://doc.rust-lang.org/cargo/reference/\"\n\"workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"ডেভ এবং রানটিমের নির্ভরতা পরিচালনা এবং ক্যাশিং\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[নির্মাণের লিপিরচনা](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[সার্বজনীন স্থাপনা](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"[cargo clippy](https://github.com/rust-lang/rust-clippy)-র মতন নানান উপ-আদেশ \"\n\"প্লাগিন কাজে লাগিয়েও প্রসারিত করা যায়।\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"[অফিসিয়াল কার্গো বই](https://doc.rust-lang.org/cargo/) তে এই ব্যাপারে আরও পড়তে \"\n\"পারবেন।\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"এই প্রশিক্ষণে কোড নমুনা\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"এই প্রশিক্ষণের জন্য, আমরা বেশিরভাগ এমন উদাহরণের মাধ্যমে রাস্ট ভাষা অন্বেষণ করব যা \"\n\"আপনার ব্রাউজারের মাধ্যমে কার্যকর চলতে পারবে। এটি সেটআপটিকে আরও সহজ করে তোলে এবং \"\n\"প্রত্যেকের জন্য একটি ধারাবাহিক অভিজ্ঞতা নিশ্চিত করে।\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"কার্গো ইনস্টল করে নেওয়া ভালো: এটি আপনার জন্য অনুশীলনী সহজ করে তুলবে। শেষের দিনে \"\n\"আমরা একটি অনুশীলনী করব যা আপনাকে দেখাবে কিভাবে ডিপেন্ডেন্সির সাথে কাজ করতে হয় \"\n\"এবং এর জন্য আপনার কার্গো থাকা দরকার।\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"এই কোর্সের কোড ব্লকগুলি সম্পূর্ণ ইন্টারেক্টিভ:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"আমাকে বদলে দেখো তো দেখি!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"যখন টেক্সট বক্স এ ফোকাস থাকে তখন কোডটি এক্সিকিউট করতে আপনি \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \"  ব্যবহার  করতে পারেন।\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"বেশিরভাগ কোড নমুনা উপরে দেখানো মত সম্পাদনাযোগ্য। কয়েকটি কোড নমুনা বিভিন্ন কারণে \"\n\"সম্পাদনাযোগ্য নয়:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"অনুবিদ্ধ প্লেগ্রাউন্ডটি একক পরীক্ষা চালাতে পারবে না। একক পরীক্ষাগুলি প্রদর্শনের জন্য \"\n\"কোডটি কপি-পেস্ট করুন আসল প্লেগ্রাউন্ডে।\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"অনুবিদ্ধ প্লেগ্রাউন্ডগুলির অবস্থা ক্ষণস্থায়ী - অন্য ওয়েবপেজ এ গেলে এগুলি আবার পুরোনো \"\n\"অবস্থায় ফিরে যাবে! এই কারণেই ছাত্রদের নিজের সিস্টেমে রাস্ট ইনস্টলেশন করে আসল \"\n\"প্লেগ্রাউন্ডের মাধ্যমে অনুশীলনগুলি সমাধান করা উচিত।\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Cargo এর মাধ্যমে স্থানীয়ভাবে কোড চালানো\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"আপনি যদি আপনার নিজের সিস্টেমে কোডটি পরীক্ষা করতে চান তবে আপনাকে প্রথমে রাস্ট \"\n\"ইনস্টল করতে হবে। [রাস্ট বইয়ের নির্দেশাবলী](https://doc.rust-lang.org/book/\"\n\"ch01-01-installation.html) অনুসরণ করে এটি করুন। এরই ভাবে আপনি কাজে লাগানোর মতন \"\n\"`rustc` এবং `cargo` পেয়ে যাবেন। এই বইটি লিখবার সময়ে, সর্বশেষ স্থিতিশীল রাস্টের \"\n\"মুক্তির এই সংস্করণ সংখ্যা রয়েছে:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"আপনি পরবর্তী সংস্করণও ব্যবহার করতে পারেন যেহেতু রাস্ট ঐতিহাসিক সামঞ্জস্য বজায় রাখে।\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"এটির সাথে, এই প্রশিক্ষণের উদাহরণগুলির মধ্যে একটি থেকে একটি রাস্টের বাইনারি তৈরি \"\n\"করতে এই পদক্ষেপগুলি অনুসরণ করুন:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"আপনি \\\"Copy to clipboard\\\" বাটন দাবিয়ে যেই উদাহরণটি চান সেটি কপি করতে পারেন।\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"আপনার কোডের জন্য একটি নতুন `exercise/` ডিরেক্টরি তৈরি করতে ``cargo new \"\n\"exercise` ব্যবহার করুন:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"`exercise/` -ডিরেক্টরিতে গিয়ে আপনার বাইনারি তৈরি করা ও সেটা চালাতে `cargo \"\n\"run` ব্যবহার করুন:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"`src/main.rs`-এর থেকে বয়লারপ্লেট কোড সরিয়ে নিজের কোড দিয়ে প্রতিস্থাপন করুন। যেমন \"\n\"আগের পৃষ্ঠার উদাহরণ কাজে লাগিয়ে `src/main.rs`-টিকে এমনি বানিয়ে ফেলুন\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"`cargo run` ব্যবহার করে নিজের বিনারীটিকে বানান এবং আপডেট করুন:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"আপনার প্রজেক্টির দ্রুত পরীক্ষা করে ত্রুটির বের করবার জন্য `cargo check` ব্যবহার করুন, \"\n\"এটিকে না চালিয়ে কম্পাইল করতে `cargo build` ব্যবহার করুন। একটি সাধারণ ডিবাগ \"\n\"বিল্ডের জন্য আপনি আউটপুটি `target/debug/` ডিরেক্টরিতে পাবেন। `target/release/`-এ \"\n\"একটি অপ্টিমাইজড রিলিজ বিল্ড তৈরি করতে `cargo build --release` ব্যবহার করুন।\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"`Cargo.toml` বদলে আপনি নিজের প্রজেক্টে আরও নতুন ডিপেন্ডেন্সি যোগ করতে পারেন।\\n\"\n\"আপনি যখন `cargo` কমান্ড চালান, তখন এটি নিজে-নিজেই আপনার জন্য অনুপস্থিত \"\n\"ডিপেন্ডেন্সিগুলি ডাউনলোড এবং কম্পাইল করবে।\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"ক্লাস অংশগ্রহণকারীদের Cargo ইনস্টল করতে এবং একটি লোকাল এডিটর ব্যবহার করতে \"\n\"উৎসাহিত করার চেষ্টা করুন। এটি তাদের জীবনকে সহজ করে তুলবে যেহেতু তাদের একটি  \"\n\"স্বাভাবিক ডেভেলপমেন্ট এনভাইরনমেন্ট থাকবে।\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"প্রথম দিনে আপনাকে স্বাগতম\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"রাস্টের মূলবিষয় চর্চার এটি প্রথম দিন। আমরা আজকে অনেককিছু বুঝবার চেষ্টা করবো।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"রাত এর প্রাথমিক শব্দবিন্যাস: ভেরিয়েবল, স্কেলার এবং যৌগিক প্রকার, ইনাম, স্ট্রাক্ট, \"\n\"রেফারেন্স, ফাংশন, এবং পদ্ধতি।\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"টাইপ এবং টাইপের অনুমান করা\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"নিয়ন্ত্রণ প্রবাহ গঠন: লুপ, শর্তসাপেক্ষগঠন এবং আরও অনেক কিছু।\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"ব্যবহারকারী-সংজ্ঞায়িত টাইপ: ষ্ট্রাক্ট ও ইনাম\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"প্যাটার্ন ম্যাচিং: ইনাম, ষ্ট্রাক্ট এবং অ্যারে ডিস্ট্রাক্টচার করা।\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"সময়সূচী\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"এই অধিবেশনে:\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[স্বাগতম](./welcome-day-1.md) (৫ মিনিট)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[হ্যালো,ওয়ার্ল্ড](./hello-world.md) (১৫ মিনিট)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (45 minutes)\"\nmsgstr \"[টাইপ এবং তাদের মান](./types-and-values.md) (৪৫ মিনিট)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"[সম্পাদন প্রবাহ নিয়ন্ত্রণ এর মুলজ্ঞান](./control-flow-basics.md) (৪০ মিনিট)\"\n\n#: src/welcome-day-1.md src/welcome-day-3-afternoon.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"১০ মিনিট বিরতিসহ এই অধিবেশনটি ২ ঘন্টা ১০ মিনিটের\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"শিক্ষার্থীদের এটি মনে করিয়ে দিন যেঃ\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"তাদের প্রশ্ন জিজ্ঞাসা করা উচিত যখন তারা সেগুলি পাবে, শেষ পর্যন্ত বাঁচিয়ে রেখে লাভ \"\n\"নেই।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"এই ক্লাসটি মিথষ্ক্রিয় হওয়া দরকার এবং তার জন্যে বিষয় সম্পর্কিত তর্ক-বিতর্ক করতে উত্সাহ \"\n\"দেওয়া উচিত।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"একজন প্রশিক্ষক হিসাবে, আপনার আলোচনাগুলিকে প্রাসঙ্গিক রাখার চেষ্টা করা উচিত, অর্থাৎ, \"\n\"অন্য কোন ভাষা বনাম রাস্ট কীভাবে জিনিসগুলি করে তার সাথে সম্পর্কিত আলোচনাগুলি রাখুন। \"\n\"সঠিক ভারসাম্য খুঁজে পাওয়া কঠিন হতে পারে, তবে আলোচনার অনুমতি দেওয়ার ক্ষেত্রে ভুল হতে \"\n\"পারে কারণ তারা একমুখী যোগাযোগের চেয়ে অনেক বেশি লোককে জড়িত করে।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"যদি কোনো প্রশ্ন আসে তাহলে সেটা সম্ভবত সামনের স্লাইড এর বিষয়গুলি নিয়েই আসবে।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"এটা ভুল ব্যাপার নয়! পুনরাবৃত্তি শেখার একটি গুরুত্বপূর্ণ অংশ। মনে রাখবেন যে স্লাইডগুলি \"\n\"শুধুমাত্র একটি সমর্থন এবং আপনি আপনার পছন্দ মতো সেগুলি এড়িয়ে যেতে পারেন।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"প্রথম দিনের ধারণাটি হল রাস্টের \\\"মৌলিক\\\" জিনিসগুলি দেখানো যা অন্যান্য ভাষায় \"\n\"অবিলম্বে সমান্তরাল হওয়া উচিত। রাস্টের আরো উন্নত অংশ পরবর্তী দিনে আলোচনা করা হবে।\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"আপনি যদি এটি একটি শ্রেণীকক্ষে শেখান তাহলে এটি সময়সূচীতে যাওয়ার জন্য একটি ভাল \"\n\"জায়গা। মনে রাখবেন যে প্রতিটি সেগমেন্টের শেষে একটি অনুশীলন রয়েছে, তারপরে একটি \"\n\"বিরতিও রয়েছে। বিরতির পরে অনুশীলনীর সমাধানচর্চা করা ভালো। কোর্সটি সময়সূচীতে রাখার \"\n\"জন্য এখানে তালিকাভুক্ত সময়গুলি পরামর্শ হিসাবে দেওয়া হয়েছে। বিনা দ্বিধায় এবং \"\n\"প্রয়োজনীয় হিসাবে সামঞ্জস্য করুন ভালো করে পোড়ানোর জন্যে!\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/slices-and-lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"এই অংশে:\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"[রাস্ট কি?](./hello-world/what-is-rust.md) (১০ মিনিট)\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"[রাস্টের সুবিধে](./hello-world/benefits.md) (৩ মিনিট)\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"[প্লেগ্রাউন্ড](./hello-world/playground.md) (২ মিনিট)\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"এই অংশটি শেষ করতে প্রায় ১৫ মিনিট লাগবে\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust একটি নতুন প্রোগ্রামিং ভাষা যেটার ছিলো [1.0 প্রকাশ 2015 তে](https://blog.\"\n\"rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \" সি++ এর মতন, রাস্টও 'একটি স্থিতিশীলভাবে সংকলিত ভাষা\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` এল.এল.ভি.এম নেপথ্যে ব্যবহার করে\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"রাস্ট অনেকগুলি [প্ল্যাটফর্ম এবং আর্কিটেকচার](https://doc.rust-lang.org/nightly/\"\n\"rustc/platform-support.html) সমর্থন করে যেমন:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"রাস্ট বিভিন্ন ডিভাইসের জন্য ব্যবহৃত হয়:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"ফার্মওয়্যার এবং বুট লোয়াডর্স,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"স্মার্ট ডিসপ্লে,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"মোবাইল ফোন,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"ডেস্কটপ,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"সার্ভার।\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust ঠিক C++ এর মতো সবজায়গায় খাপ খায়:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"উচ্চস্তরের নমনীয়তা।\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"নিয়ন্ত্রণের উচ্চ স্তর।\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"মাইক্রোকন্ট্রোলারের মতো খুব সীমাবদ্ধ ডিভাইসে ছোট করে ব্যবহার করা যেতে পারে।\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"কোন রানটাইম বা আবর্জনা সংগ্রহপ্রণালী নেই।\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"কর্মক্ষমতায়ে কোনোরকম বলিদান না দিয়ে নির্ভরযোগ্যতা এবং নিরাপত্তা উপর ফোকাস করে।\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Rustএর কিছু অনন্য বিক্রয় পয়েন্ট:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_সংকলন সময় মেমরি নিরাপত্তা_ - কম্পাইলের সময় মেমরি বাগগুলির সম্পূর্ণ ভাবে প্রতিরোধ \"\n\"করা হয়\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"কোনো সূচনাকৃত ভেরিয়েবল থাকে না।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"কোনো রকম ডাবল-ফ্রেস হয়ে না।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"মুক্তির পরে কোনো রকম ব্যবহার করবার জায়গা নেই।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"কোনো `NULL` পয়েন্টার নেই।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"ভুল করে ভুলেযাও কোনো লক করা মিউটেক্স থাকে সম্ভাবনা নেই।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"থ্রেডের মাঝে কোনো রকমের ডাটা নিয়েই রেস পরিস্থিতি নেই।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"ইটারেটরের অবৈধকরণ করা যায়না।\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_কোন অনির্ধারিত রানটাইম আচরণ নয়_- একটি রাস্ট বিবৃতি যা করে তা কখনই অনির্দিষ্ট \"\n\"থাকে না\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"অ্যারে অ্যাক্সেস সীমানা চেক করা হয়.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"পূর্ণসংখ্যা ওভারফ্লো সংজ্ঞায়িত করা হয়।\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_আধুনিক প্রোগ্রামিং ভাষার বৈশিষ্ট্য_- উচ্চ-স্তরের ভাষার মতোই অভিব্যক্তিপূর্ণ এবং \"\n\"এরগনোমিক\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"ইনাম এবং প্যাটার্ন ম্যাচিং।\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"জেনেরিক্স।\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"No overhead FFI.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Zero-cost abstractions.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"মহান কম্পাইলার ত্রুটি।\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"অন্তর্নির্মিত ডিপেন্ডেন্সি পরিচালক।\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"পরীক্ষা-নিরীক্ষার জন্যে অন্তর্নির্মিতভাবে সমর্থন।\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"খুবই ভালো সমর্থন রয়েছে ভাষার সার্ভার মুসাবিদার।\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"এখানে বেশি সময় ব্যয় করবেন না। এই সমস্ত বিষয়গুলি পরে আরও গভীরতায় চর্চা করা হবে।\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"ক্লাসে তাদের কোন প্রোগ্রামিং ভাষার অভিজ্ঞতা আছে তা জিজ্ঞাসা করতে ভুলবেন না। উত্তরের \"\n\"উপর নির্ভর করে আপনি রাস্ট এর বিভিন্ন বৈশিষ্ট্য উল্লেখ করতে পারেন:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"সি বা সি++ এর অভিজ্ঞতা: রাস্ট ধার পরীক্ষকের মাধ্যমে _রানটাইম ত্রুটির_ একটি সম্পূর্ণ \"\n\"ভাবে দূর করে। এবং আপনি সি এবং সি++ এর মত কর্মক্ষমতা পান, কিন্তু আপনার মেমরির \"\n\"নিরাপত্তা সংক্রান্ত সমস্যা থাকে না। এছাড়াও, আপনি প্যাটার্ন ম্যাচিং এবং \"\n\"অন্তর্নিহিতভাবে ডিপেন্ডেন্সি ব্যবস্থাপনার মতো বৈশিষ্ট সহ একটি আধুনিক ভাষা পান।\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"জাভা, গো, পাইথন, জাভাস্ক্রিপ্টের সাথে অভিজ্ঞতা...: আপনি সেই ভাষাগুলির মতো একই \"\n\"মেমরি সুরক্ষা এবং একই রকম উচ্চ-স্তরের ভাষা অনুভূতি পেয়ে থাকেন। এছাড়াও আপনি সি এবং \"\n\"সি++ এর মত দ্রুত এবং অনুমানযোগ্য কর্মক্ষমতা পাবেন (কোনো গার্বেজ কালেক্টর ছাড়াই) \"\n\"পাশাপাশি দরকারমতন নিম্ন-স্তরের হার্ডওয়্যারে অ্যাক্সেস।\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[রাস্ট প্লেগ্রাউন্ড](https://play.rust-lang.org/) সংক্ষিপ্ত রাস্ট প্রোগ্রাম চালানোর \"\n\"একটি সহজ উপায় প্রদান করে, এবং এই কোর্সের উদাহরণ এবং অনুশীলনের ভিত্তি। এটি দিয়ে \"\n\"শুরু হওয়া \\\"হ্যালো-ওয়ার্ল্ড\\\" প্রোগ্রামটি চালানোর চেষ্টা করুন। এটি কয়েকটি সুবিধাজনক \"\n\"বৈশিষ্ট্য সহ আসে:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"\\\"Tools\\\" এর নিচে, \\\"স্ট্যান্ডার্ড\\\" উপায়ে আপনার কোড ফর্ম্যাট করতে `rustfmt` \"\n\"বিকল্পটি ব্যবহার করুন।\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"কোড তৈরি করার জন্য রাস্টের দুটি প্রধান \\\"পরিলেখ\\\" আছে: ডিবাগ (অতিরিক্ত রানটাইম \"\n\"চেক, কম অপ্টিমাইজেশান) এবং রিলিজ (কম রানটাইম চেক কিন্তু প্রচুর পরিমাণে \"\n\"অপ্টিমাইজেশান)। \\\"Debug\\\" এর নিচে এগুলি পাওয়া যাবে।\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"তৈরী করা সমাবেশ কোড দেখতে যদি আপনি যদি আগ্রহী হন,  তাহলে \\\"...\\\" এর অধীনে \"\n\"\\\"ASM\\\" ব্যবহার করুন।\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"শিক্ষার্থীরা যখন বিরতিতে যায়, তখন তাদের প্লেগ্রাউন্ড খুলতে এবং একটু পরীক্ষা-নিরীক্ষা \"\n\"করতে উৎসাহিত করুন। তাদের ট্যাব খোলা রাখতে উত্সাহিত করুন এবং বাকি কোর্সের সময় কিছু \"\n\"চেষ্টা করে দেখতে বলুন। এটি বিশেষত উন্নত ছাত্রদের জন্য সহায়ক যারা রাস্টের \"\n\"অপ্টিমাইজেশন বা জেনারেট করা অ্যাসেম্বলি সম্পর্কে আরও জানতে চান।\"\n\n#: src/types-and-values.md\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[হ্যালো, ওয়ার্ল্ড](./types-and-values/hello-world.md) (৫ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[ভেরিএবলেস](./types-and-values/variables.md) (৫ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[মান](./types-and-values/values.md) (৫ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[গণিত](./types-and-values/arithmetic.md) (৩ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Strings](./types-and-values/strings.md) (5 minutes)\"\nmsgstr \"[স্ট্রিং](./types-and-values/strings.md) (৫ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[টাইপের অনুমিতি](./types-and-values/inference.md) (৩ মিনিট)\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"[অনুশীলনী: : ফিবোনাচি](./types-and-values/exercise.md) (১৫ মিনিট)\"\n\n#: src/types-and-values.md src/methods-and-traits.md src/iterators.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"এই অংশটি প্রায় ৪৫ মিনিট সময় নেবে\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"আসুন সহজতম সম্ভাব্য রাস্ট প্রোগ্রামে ঝাঁপ দেওয়া যাক, একটি ক্লাসিক হ্যালো ওয়ার্ল্ড \"\n\"প্রোগ্রাম:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"যা তুমি দেখতে পাওঃ\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"`fn` দিয়ে ফাংশন চালু করা হয়েছে।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"\"\n\"ব্লকগুলি সি এবং সি++ এর মত কোঁকড়া ধনুর্বন্ধনী (কারলি ব্রেসেস) দ্বারা সীমাবদ্ধ করা হয়।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"প্রোগ্রাম সবসময়ে `main` ফাংশন থেকে শুরু হয়।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"রাস্টের ম্যাক্রো স্বাস্থকর বলা যেতে পারে, `println!` এরই এক উদাহরণ।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"রাস্টের স্ট্রিংগুলি ইউ.টি.এফ-৮ এনকোডেড এবং যে কোনও ইউনিকোড অক্ষর এতে থাকতে পারে।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"এই স্লাইডটি শিক্ষার্থীদের রাস্ট কোডের সাথে সুপরিচিত করার চেষ্টা করে। তারা পরের চার \"\n\"দিনে এটি অনেকবার দেখতে পাবে তাই আমরা পরিচিত কিছু ছোট দিয়ে শুরু করি।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"রাস্ট সি/সি++/জাভা ঐতিহ্যের অন্যান্য ভাষার মতোই। এটা অনুজ্ঞাসূচক এবং এটি একেবারে \"\n\"প্রয়োজনীয় না হলে জিনিসগুলিকে পুনরায় উদ্ভাবনের চেষ্টা করে না।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"ইউনিকোডের মতো জিনিসগুলির জন্য সম্পূর্ণ সমর্থন সহ রাস্ট একটি আধুনিক ভাষা।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"রাস্টে ফাংশন [ওভারলোডিং](../control-flow-basics/functions.md) নেই তাই এমন \"\n\"পরিস্থিতিতে ম্যাক্রো ব্যবহার করে যেখানে আপনি পরিবর্তনশীল সংখ্যক আর্গুমেন্ট রাখতে চান।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"ম্যাক্রোগুলি 'স্বাস্থ্যকর' হওয়ার অর্থ হল যে তারা দুর্ঘটনাক্রমে তাদের ব্যবহৃত স্কোপের মধ্যে \"\n\"থেকে ভ্যারিয়েবল তুলে না। রাস্টের ম্যাক্রো আসলে শুধুমাত্র [আংশিকভাবে স্বাস্থ্যকর]\"\n\"(https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)।\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"রাস্ট বহু-দৃষ্টান্ত একটি ভাষা। উদাহরণস্বরূপ, এটিতে শক্তিশালী [অবজেক্ট-ওরিয়েন্টেড \"\n\"প্রোগ্রামিং বৈশিষ্ট্য রয়েছে](https://doc.rust-lang.org/book/ch17-00-oop.html),\"\n\"এবং, যদিও এটি একটি ফাংশনাল ভাষা নয়, এটিতে অনেক [ফাংশনাল ভাষার ধারণা](https://\"\n\"doc.rust-lang.org/book/ch13-00-functional-features.html) ও রয়েছে।\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"রাস্ট স্ট্যাটিক টাইপিংয়ের মাধ্যমে টাইপ নিরাপত্তা প্রদান করে। ভ্যারিয়েবলের বাইন্ডিং \"\n\"`let` দিয়ে তৈরি করা হয়:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"// x = 20;\"\nmsgstr \"// x = 20;\"\n\n#: src/types-and-values/variables.md\nmsgid \"// println!(\\\"x: {x}\\\");\"\nmsgstr \"// println!(\\\"x: {x}\\\");\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"ভেরিয়েবলগুলি গতানুগতিকরূপে অপরিবর্তনীয় তা প্রদর্শন করতে `x = 20` টি আনকমেন্ট করুন। \"\n\"পরিবর্তনের অনুমতি দিতে `mut` কীওয়ার্ড যোগ করুন।\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"এখানে `i32` হল ভেরিয়েবলের ধরন। কম্পাইলের সময় এটি অবশ্যই জানা থাকা দরকার, তবে \"\n\"টাইপ ইনফারেন্স (পরে আচ্ছাদিত) প্রোগ্রামারকে অনেক ক্ষেত্রে এটি বাদ দেওয়ার অনুমতি দেয়।\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"এখানে কিছু মৌলিক অন্তর্নির্মিত টাইপ রয়েছে, এবং প্রতিটি প্রকারের আক্ষরিক মানগুলির জন্য \"\n\"বাক্য গঠন ও দেওয়া রয়েছে।\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\n#: src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Types\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Literals\"\nmsgstr \"Literals\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Signed integers\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Unsigned integers\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Floating point numbers\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Unicode scalar values\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Booleans\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"টাইপগুলোর আকার এ রকম:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` and `usize` are the width of a pointer,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` হচ্ছে ৩২ বিট প্রশস্ত,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` হচ্ছে ৮ বিট চৌড়া।\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"কিছু সিনট্যাক্স আছে যা উপরে দেখানো হয়নিঃ\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"সংখ্যার সমস্ত আন্ডারস্কোর বাদ দেওয়া যেতে পারে, সেগুলি শুধুমাত্র স্পষ্টতার জন্য দেওয়া। \"\n\"সুতরাং `1_000` কে `1000` (বা `10_00`) হিসাবে লেখা যেতে পারে এবং `123_i64` কে \"\n\"`123i64` হিসাবে লেখা যেতে পারে।\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"এই প্রথম আমরা বাদে অন্য কোনো ফাংশন দেখছি, কিন্তু এই ফাংশনের অর্থটি পরিষ্কার হওয়া \"\n\"উচিত: এটি তিনটি পূর্ণসংখ্যা বা ইন্টিজার নেয় এবং একটি ইন্টিজার প্রদান করে। ফাংশন \"\n\"পরে আরো বিস্তারিত চর্চা করা হবে।\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"একই অগ্রাধিকার রেখে এখানে পাটিগণিতের অন্যান্য ভাষার সাথে খুব মিল।\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\"ইন্টিজার ওভারফ্লো হলে? সি বা সি++ -এ চিহ্নিত ইন্টিজার ওভারফ্লো হলে তার ম্যান \"\n\"অনির্ধারিত হয়ে এবং বিভিন্ন প্ল্যাটফর্ম বা কম্পাইলারে বিভিন্ন জিনিস করতে পার। রাস্ট এ \"\n\"তা নির্ধারিত ম্যান নিয়ে থাকে।\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"ইন্টিজার ওভারফ্লো সরাসরি দেখবার জন্যে কে এ পরিবর্তন করে দেখুন। ডিবাগ অবস্থায় \"\n\"নির্মিত হলে এটি আতংকিত (প্যানিক) হয়ে পরে এবং মুক্তিগামী নির্মাণ হলে সেটি মুড়িয়ে \"\n\"দেওয়া হয়ে নিজে নিজেই। অন্যান্য বিকল্পও আছে যেমন ওভারফ্লো (ম্যান উপচে পড়া), \"\n\"স্যাচুরেটিং (বা পরিপৃক্ত করা) এবং ক্যারিং (বা বহন করা)। এগুলি অভিগমন করবার জন্যে \"\n\"এরখম কোনো মেথড সিনটেক্স ব্যবহার করতে হবে `(a * b).saturating_add(b * c).\"\n\"saturating_add(c * a)`।\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"প্রকৃতপক্ষে, কম্পাইলার ধ্রুবক অভিব্যক্তির ওভারফ্লো সনাক্ত করবে, যার কারণে উদাহরণটির \"\n\"জন্য একটি আলাদা ফাংশন প্রয়োজন।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\"স্ট্রিংগুলিকে উপস্থাপন করার জন্য রাস্ট এ দুটি উপায়ে আছে, উভয়ই পরবর্তীতে আরও গভীরতায় \"\n\"কভার করা হবে। উভয়ই _সবসময়ে_ ইউ.টি.এফ-৮ এনকোড করে স্ট্রিং সংরক্ষণ করে।\"\n\n#: src/types-and-values/strings.md\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"`String` - একটি পরিবর্তনযোগ্য, মালিকানাধীন স্ট্রিং।\"\n\n#: src/types-and-values/strings.md\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"`&str` - একটি পঠনযোগ্য স্ট্রিং। স্ট্রিং লিটারেলে এই ধরন আছে।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\\\"Greetings\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\\\"🪐\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\", \\\"\"\nmsgstr \"\\\", \\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\\\"final sentence: {}\\\"\"\n\n#: src/types-and-values/strings.md\n#: src/methods-and-traits/traits/associated-types.md\n#: src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\"\nmsgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\"এই স্লাইড স্ট্রিং কি জিনিস এটা দেখায়। এখানে সবকিছু পরে আরও গভীরতায় কভার করা হবে, \"\n\"কিন্তু স্ট্রিং ব্যবহার করার জন্য,পরবর্তী স্লাইডের জন্যে এবং অনুশীলনের জন্য এটি যথেষ্ট।\"\n\n#: src/types-and-values/strings.md\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"\"\n\"UB একটি ইউ.টি.এফ-৮ স্ট্রিং-এ থাকা ভুল এবং সেই জন্যে এটি নিরাপদ রাস্ট এর ভেতরে \"\n\"ব্যবহার করা যায় না।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\"`String` হচ্ছে কনস্ট্রাক্টর (`::new()`) সহ একটি ব্যবহারকারী-সংজ্ঞায়িত প্রকার এবং \"\n\"এতে `s.push_str(..)` -র মতন মেথড ও রয়েছে।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\"`&str` এটা যে একটা রেফারেন্স সেটা এটাতে থাকা `&` দিয়ে বোঝা যাচ্ছে। আমরা পরে \"\n\"রেফারেন্স দেখবো , তাই আপাতত শুধু `&str` কে একটি ইউনিট হিসেবে ভাবুন যার অর্থ \\\"এমন \"\n\"একটি স্ট্রিং যা শুধু পঠনযোগ্য \\\"।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\"কমেন্ট করা লাইন বাইট অবস্থান দ্বারা স্ট্রিং মধ্যে ইনডেক্স করছে। `12..13` সীমানায় \"\n\"পড়ে না, তাই প্রোগ্রাম আতঙ্কিত ব্যবহার প্রদর্শন করে। ত্রুটি বার্তার উপর ভিত্তি করে \"\n\"এটিকে একটি সঠিক সীমানার মধ্যে নিয়ে আসুন।\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Using `{:?}` is a convenient way to print array/vector/struct of values for \"\n\"debugging purposes, and it's commonly used in code.\"\nmsgstr \"\"\n\"`{:?}` ব্যবহার করা ডিবাগিং উদ্দেশ্যে মানগুলির অ্যারে/ভেক্টর/স্ট্রাকট প্রিন্ট করার একটি \"\n\"সুবিধাজনক উপায় এবং এটি সাধারণত অনেক কোডে ব্যবহৃত হয়।\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"একটি ভ্যারিয়েবল কিভাবে ব্যবহার করা হচ্ছে তা দেখে রাস্ট সেটির টাইপ ঠিক করবে:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"এই স্লাইডটি দেখায় যে কীভাবে রাস্টের কম্পাইলার একটি ভ্যারিয়েবলের পরিবর্তনশীল ঘোষণা \"\n\"এবং ব্যবহার দ্বারা সীমাবদ্ধতার উপর ভিত্তি করে সেটির টাইপ অনুমান করে।\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"এটা জোর দেওয়া খুবই গুরুত্বপূর্ণ যে এইরকম ঘোষিত ভেরিয়েবলগুলি কোন ধরণের ডাইনামিক \"\n\"\\\"যেকোন ধরণের\\\" নয় যা কোনও ডেটা ধারণ করতে পারে। এই ধরনের ঘোষণা দ্বারা উত্পন্ন \"\n\"মেশিন কোড একটি টাইপ-এর সুস্পষ্ট ঘোষণার অনুরূপ। কম্পাইলার আমাদের জন্য এই কাজ করে এবং \"\n\"আমাদের আরও সংক্ষিপ্ত কোড লিখতে সাহায্য করে।\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"যখন কোন কিছুই পূর্ণসংখ্যার আক্ষরিকের ধরণকে বাধা দেয় না, তখন রাস্ট সেটাকে `i32` \"\n\"হিসাবে ভেবে নিয়ে কাজ করে। এটি কখনও কখনও ত্রুটি বার্তাগুলিতে `{integer}` হিসাবে \"\n\"প্রদর্শিত হয়। একইভাবে, ফ্লোটিং-পয়েন্ট লিটারাল কে `f64` এ ভেবে নেওয়া হয়ে।\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\"\nmsgstr \"// ERROR: no implementation for `{float} == {integer}`\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\"প্রথম এবং দ্বিতীয় ফিবোনাচ্চি সংখ্যা উভয়ই `1`। n>২ এর জন্য, n'তম ফিবোনাচ্চি সংখ্যাটি \"\n\"n-১ এবং n-২'তম ফিবোনাচ্চি সংখ্যার যোগফল হিসাবে পুনরাবৃত্তভাবে গণনা করা হয়।\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"একটি ফাংশন লিখুন `fib(n)` যা n'th ফিবোনাচ্চি সংখ্যা গণনা করে। কখন এই ফাংশন \"\n\"প্যানিক করতে পারে?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\"\nmsgstr \"// The base case.\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Implement this\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\"\nmsgstr \"// The recursive case.\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[if অভিব্যক্তি](./control-flow-basics/if.md) (৪ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[লুপ](./control-flow-basics/loops.md) (৫ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"\"\n\"[break এবং continue](./control-flow-basics/break-continue.md) (৪ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"[ব্লক এবং স্কোপ](./control-flow-basics/blocks-and-scopes.md) (৫ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[ফাংশন](./control-flow-basics/functions.md) (৩ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[ম্যাক্রো](./control-flow-basics/macros.md) (২ মিনিট)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"[অনুশীলনী: কল্যাটজ এর ক্রম](./control-flow-basics/exercise.md) (১৫ মিনিট)\"\n\n#: src/control-flow-basics.md src/generics.md src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"এই অংশটি প্রায় ৪০ মিনিট সময় নেবে\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"`if` অভিব্যক্তি\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"[`if` অভিব্যক্তি](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) রাস্ট এ ঠিক অন্য প্রোগ্রামিং ভাষার `if` অভিব্যক্তির মতন হয় \"\n\"ব্যবহার করা হয়ে:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"zero!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"biggish\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"huge\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"উপরন্তু, আপনি `if` কেও একটি অভিব্যক্তি হিসাবে ব্যবহার করতে পারেন। প্রতিটি ব্লকের \"\n\"শেষ অভিব্যক্তি `if` অভিব্যক্তির মান হয়ে যায়:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"small\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"large\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"number size: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"যেহেতু `if` একটি অভিব্যক্তি এবং অবশ্যই এটির একটি নির্দিষ্ট টাইপ থাকতে হবে, তাই উভয় \"\n\"শাখা ব্লকের একই টাইপ থাকতে হবে। দ্বিতীয় উদাহরণে `\\\"small\\\"` এর পরে `;` যোগ \"\n\"করলে কি হবে তা দেখান।\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"যখন একটি অভিব্যক্তিতে `if` ব্যবহার করা হয়, তখন অভিব্যক্তিটির অবশ্যই শেষে একটি `;` \"\n\"থাকতে হবে যা পরবর্তী বিবৃতি থেকে সেটিকে আলাদা করবে। কম্পাইলার ত্রুটি দেখতে \"\n\"`println!` এর আগে `;` সরিয়ে দেখুন।\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"রাস্টে তিনটি লুপিং কীওয়ার্ড রয়েছে: `while`, `loop`, ও `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[`while` কীওয়ার্ড](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-loops) রাস্ট এ অন্যান্য ভাষার `while` কীওয়ার্ড এর মতোই কাজ করে, \"\n\"যতক্ষণ পর্যন্ত শর্তটি সত্য হয় ততক্ষণ লুপ বডি কার্যকর করে।\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`for` লুপ](https://doc.rust-lang.org/std/keyword.for.html) একটি মানের \"\n\"পরিসীমা বা সংগ্রহের আইটেমগুলির উপর পুনরাবৃত্তি করে:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"`ফর` লুপগুলি বিভিন্ন ধরণের রেঞ্জ/সংগ্রহের পুনরাবৃত্তি পরিচালনা করতে \\\"ইটারেটর\\\" নামক \"\n\"একটি ধারণা ব্যবহার করে। ইটারেটর পরে আরও বিশদে আলোচনা করা হবে।\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\"ইটা লক্ষ্য করা দরকার যে `for` -টি লুপ শুধুমাত্র `4` পর্যন্ত পুনরাবৃত্তি করে। এখানে `5` \"\n\"পর্যন্ত পুনরাবৃত্তি করবার জন্যে `1..=5` গঠন ব্যবহার করা দরকার।\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"`break` না পাওয়া পর্যন্ত পুনরাবৃত্তি করতেই থাকে একটি [`loop` statement](https://\"\n\"doc.rust-lang.org/std/keyword.loop.html)।\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"আপনি অবিলম্বে পরবর্তী পুনরাবৃত্তি ব্যবহার শুরু করতে যদি চান তাহলে [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions) ব্যবহার করতে পারেন।\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"আপনি যদি কোনো ধরনের লুপ থেকে তাড়াতাড়ি প্রস্থান করতে চান তবে [`break`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions) \"\n\"ব্যবহার করুন। `loop` এর জন্য, এটি একটি ঐচ্ছিক অভিব্যক্তি নিতে পারে যা `loop` \"\n\"অভিব্যক্তির মান হয়ে যায়।\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"'continue' এবং 'break' উভয়ই ঐচ্ছিকভাবে একটি লেবেল আর্গুমেন্ট নিতে পারে যা নেস্টেড \"\n\"লুপগুলি থেকে বেরিয়ে আসতে ব্যবহৃত হয়:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elements searched: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"`while` এবং `for` এর বিপরীত `loop` অন্তত একবার প্রবেশ করার নিশ্চয়তা দেওয়ার \"\n\"কারণে একমাত্র লুপিং গঠন যা একটি অ-তুচ্ছ মান প্রদান করে।\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blocks\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"রাস্ট এ একটি ব্লকে এক্সপ্রেশনের একটি ক্রম রয়েছে যা `{}` বন্ধনী দ্বারা আবদ্ধ। প্রতিটি \"\n\"ব্লকের একটি মান এবং একটি টাইপ রয়েছে, যা সেই ব্লকের শেষ অভিব্যক্তিগুলির দ্বারা \"\n\"সংজ্ঞায়িত:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"যদি শেষ এক্সপ্রেশনটি `;` দিয়ে শেষ হয়, তাহলে ফলস্বরূপ মান এবং টাইপ হবে `()`।\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"আপনি ব্লকের শেষ লাইন পরিবর্তন করে ব্লকের মান কীভাবে পরিবর্তিত হয় তা দেখাতে \"\n\"পারেন। উদাহরণস্বরূপ, একটি সেমিকোলন যোগ করা/মুছে ফেলা বা একটি `রিটার্ন` ব্যবহার \"\n\"করা।\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"একটি ভেরিয়েবলের স্কোপ সেটির ঘেরা ব্লকের মধ্যে সীমাবদ্ধ।\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"আপনি ভেরিয়েবলগুলিকে ছায়াবৃত করতে পারেন, এটি বাইরের স্কোপ এবং একই ভেরিয়েবলের \"\n\"নিজেস্ব স্কোপ উভয়ে থেকেই সম্ভব:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#: src/std-traits/from-and-into.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"shadowed in inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"after: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"আগের উদাহরণে ভেতরের ব্লকে একটি `b` লাগিয়ে সেটাকে বাইরে থেকে অ্যাক্সেস করবার \"\n\"চেষ্টা করে এটা দেখান যে একটি ভ্যারিয়েবলের স্কোপ সীমাবদ্ধ থাকে।\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"ছায়াবৃত করা এবং পরিব্যক্তির মধ্যে তফাৎ আছে, কারণ ছায়াবৃত করবার পরে উভয় ভেরিয়েবলের-\"\n\"ই মেমরি অবস্থান একই সময়ে বিদ্যমান থাকে। আপনি কোডে কোথায় ব্যবহার করেন তার উপর \"\n\"নির্ভর করে উভয়ই একই নামে উপলব্ধ।\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"\"\n\"একটি ভ্যারিয়েবল যেটি অন্য ভ্যারিয়েবলের ছায়া হিসেবে বানানো হয়েছে সেটির থেকে \"\n\"আলাদা টাইপ ধারণ করতেই পারে।\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"ছায়া করা প্রথমে অস্পষ্ট দেখায়, কিন্তু `.unwrap()` এর পরে মান ধরে রাখার জন্য \"\n\"সুবিধাজনক।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"ঘোষিত পরামিতির পরে তার টাইপ লাগানো হয়ে (এই জিনিস তা অনেক প্রোগ্রামিং ভাষার \"\n\"তুলনায় বিপরীত) এবং তার পরে একটি রিটার্ন টাইপ দেওয়া হয়ে।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"একটি ফাংশন বডি (বা যেকোনো ব্লক) এর শেষ অভিব্যক্তি সেটির ফেরতগামী মান হয়ে যায়। \"\n\"শুধু অভিব্যক্তির শেষে `;` বাদ দিন। `return` কীওয়ার্ডটি প্রাথমিক রিটার্নের জন্য \"\n\"ব্যবহার করা যেতে পারে, কিন্তু একটি ফাংশনের শেষে \\\"বেয়ার ভ্যালু\\\" ফর্মটি \"\n\"বাগ্বৈশিষ্ট্যসম্মত (`gcd` টাতে `return` লাগিয়ে আবার লিখে দেখুন)।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"অনেক ফাংশনের রিটার্ন টাইপ থাকে না এবং তারা 'একক বা ইউনিট টাইপ ' বা `()` \"\n\"রিটার্ন করে থাকে। কম্পাইলার এটি নিজে-নিজেই অনুমান করে নিতে পারবে যদি `-> ()` \"\n\"রিটার্ন টাইপ বাদ দেওয়া হয়।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"ওভারলোডিং সমর্থিত নয় -- প্রতিটি ফাংশনের শুধু একটি বাস্তবায়ন থাকতে পারে।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"সর্বদা একটি নির্দিষ্ট সংখ্যক পরামিতি লাগে। রেস্ট এ ডিফল্ট আর্গুমেন্ট সমর্থিত নয। \"\n\"ম্যাক্রো দিয়ে বৈচিত্র্যময় বা ভ্যারিয়াডিক ফাংশন ব্যবহার করা যেতে পারে।\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"সর্বদা পরামিতির টাইপ একটি একক সেট-ই লাগে। এই টাইপগুলি জেনেরিক হতে পারে। \"\n\"জেনেরিক পরে আলোচনা করা হবে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"সংকলনের সময় ম্যাক্রোগুলিকে রাস্ট কোডে প্রসারিত করা হয় এবং একটি পরিবর্তনশীল সংখ্যক \"\n\"আর্গুমেন্ট নিতে পারে। ম্যাক্রোর শেষে একটি `!` দিয়ে সেটি অন্য কোডের থেকে পার্থক্য করা \"\n\"হয়ে। রাস্ট স্ট্যান্ডার্ড লাইব্রেরিতে দরকারী ম্যাক্রোগুলির একটি ভাণ্ডার অন্তর্ভুক্ত রয়েছে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"[`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html) এ বর্ণিত বিন্যাস \"\n\"প্রয়োগ করে `println!(format, ..)` স্ট্যান্ডার্ড আউটপুটে একটি লাইন প্রিন্ট করে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` ঠিক `println!` এর মতো কাজ করে কিন্তু একটি স্ট্রিং হিসেবে \"\n\"ফলাফল প্রদান করে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` অভিব্যক্তির মান লগ করে এবং সেটিকে ফেরত দেয়।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` কোডের একটি ব্লককে এখনো-বাস্তবায়িত হয়নি বলে চিহ্নিত করে। এই কোড চালালে \"\n\"রাস্ট আতঙ্কিত হবে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` একটি কোডের অংশ কে পৌঁছানো যায় না বলে চিহ্নিত করে। এই কোড \"\n\"চালালে রাস্ট আতঙ্কিত হবে।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"এই বিভাগ থেকে বোঝা যায় যে এই সাধারণ সুবিধাগুলি বিদ্যমান, এবং কীভাবে সেগুলি \"\n\"ব্যবহার করা যায়। কেন সেগুলি ম্যাক্রো হিসাবে সংজ্ঞায়িত করা আছে, এবং সেগুলি কি \"\n\"প্রসারিত হয়, বিশেষ করে সমালোচনামূলক নয়।\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"কোর্সটি ম্যাক্রো কিভাবে সংজ্ঞায়িত সেটা আলোচনা করে না, তবে পরবর্তী একটি বিভাগে \"\n\"ডেরাইভ ম্যাক্রোর ব্যবহার বর্ণনা করা হবে।\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"[Collatz সিকোয়েন্স](https://en.wikipedia.org/wiki/Collatz_conjecture) নিম্নরূপ \"\n\"সংজ্ঞায়িত করা হয়েছে, একটি নির্বিচারে n এর জন্য\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"১\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"শূন্যের চেয়ে বড়:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"If _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"1 হলে, ক্রমটি _n শেষ হয়ে\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ জোড় হলে , তাহলে _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" /2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ বিজোড় যদি হয়ে, তাহলে _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"উদাহরণস্বরূপ, _n দিয়ে শুরু হলে\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 বিজোড়, তাই _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 জোড়, তাই _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"স্বাগতম\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[টিউপেল এবং অ্যারে](./tuples-and-arrays.md) (৩৫ মিনিট)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (35 minutes)\"\nmsgstr \"[রেফারেন্স](./references.md)(৩৫ মিনিট)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"[ব্যবহারকারীর দ্বারা সংজ্ঞায়িত টাইপ](./user-defined-types.md) (৫০ মিনিট)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"১০ মিনিট বিরতিসহ এই অধিবেশন শেষ করতে ২ ঘন্টা ১৫ মিনিট লাগবে\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\nmsgstr \"\"\n\"[টিউপেল এবং অ্যারে](./tuples-and-arrays/tuples-and-arrays.md) (১০ মিনিট)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md src/references.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n\"elements of an array have the same type, while tuples can accommodate \"\n\"different types. Both types have a size fixed at compile time.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Arrays\"\nmsgstr \"Arrays\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[T; N]`\"\nmsgstr \"`[T; N]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[20, 30, 40]`, `[0; 3]`\"\nmsgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples\"\nmsgstr \"Tuples\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\nmsgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\nmsgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Array assignment and access:\"\nmsgstr \"অ্যারে অ্যাসাইনমেন্ট এবং অ্যাক্সেস:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuple assignment and access:\"\nmsgstr \"Tuple assignment and access:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Arrays:\"\nmsgstr \"অ্যারে:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples:\"\nmsgstr \"Tuples:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n\"and the only valid value of that type --- that is to say both the type and \"\n\"its value are expressed as `()`. It is used to indicate, for example, that a \"\n\"function or expression has no return value, as we'll see in a future slide.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"You can think of it as `void` that can be familiar to you from other \"\n\"programming languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"This works with any kind of structured value:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"a: {a}, b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// root, like `v.sqrt()`.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// coordinates by that magnitude.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md src/borrowing.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Byte strings allow you to create a `&[u8]` value directly:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`const`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`static`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"প্রথম দিনে আপনাকে স্বাগতম\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Properties table:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Static\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Constant\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Has an address in memory\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"No (inlined)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Can be mutable\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (unsafe)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Evaluated at compile time\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Inlined wherever it is used\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 50 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md src/memory-management.md src/testing.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"Structs\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"while let এক্সপ্রেশন\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"while let এক্সপ্রেশন\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/googletest.md\n#: src/testing/solution.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"Implementing Traits\"\nmsgstr \"অনিরাপদ Traits বাস্তবায়ন\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types allow are placeholder types which are filled in by the \"\n\"trait implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"// fn set_x(&mut self, x: T)\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"// Syntactic sugar for:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"This segment should take about 1 hour and 20 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second argument.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md src/testing/other.md\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"///\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"/// If the second argument is zero, the result is false.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of integers.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"ব্যতিক্রম\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"/// Create a new Counter.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"/// Count an occurrence of the given value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"/// Return the number of times the given value has been seen.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"অনিরাপদ ফাংশন ডাকা\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"// DON'T DO THIS AT HOME! For educational purposes only.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// String provides no guarantees about its layout, so this could lead to\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"// undefined behavior.\"\nmsgstr \"রানটাইমে কোন অনির্ধারিত আচরণ নেই:\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/memory-management/move.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Slices\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"আধুনিক C++ এ ডবল মুক্ত\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md src/error-handling.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a Box or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Niche অপটিমাইজেশন\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices\"\nmsgstr \"Slices\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Hello World!\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"Rust terminology:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Byte strings allow you to create a `&[u8]` value directly:\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the the compiler does not know what lifetime to infer for \"\n\"`p3`. Looking inside the function body shows that it can only safely assume \"\n\"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, \"\n\"Rust requires explicit annotations of lifetimes on function arguments and \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"ফাংশন কল এ জীবনকাল\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"ডেটা স্ট্রাকচার এ জীবনকাল\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"প্রথম দিনে আপনাকে স্বাগতম\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"টেস্টিং\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"আপনাকে [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"থেকে একটি সংগ্রহ তৈরি করতে দেয়|\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"//! implementation.\"\nmsgstr \"বাস্তবায়ন\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Paths\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"সেটআপ\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"/// Natural width of `self`.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// add a bit of padding\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-width\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// Add 4 paddings for borders\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// TODO: after learning about error handling, you can change\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// draw_into to return Result<(), std::fmt::Error>. Then use\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// the ?-operator here instead of .unwrap().\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"ইউনিট টেস্ট\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"ইন্টিগ্রেশন টেস্ট\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"ডকুমেন্টেশন টেস্ট\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// Shortens a string to the given length.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// ```\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// # use playground::shorten_string;\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"Rust comes with only basic support for writing tests.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"Here are some additional crates which we recommend for writing tests:\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n\"library in the tradition of GoogleTest for C++.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n\"tests.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"GoogleTest is available for use in AOSP.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"The advice here is for Android (AOSP) where Mockall is the recommended \"\n\"mocking library. There are other [mocking libraries available on crates.io]\"\n\"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP \"\n\"services. The other mocking libraries work in a similar fashion as Mockall, \"\n\"meaning that they make it easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"লুন অ্যালগরিদম\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"ডায়নামিক ত্রুটির ধরন\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// Safe because r1 and r2 were obtained from references and so are\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// guaranteed to be non-null and properly aligned, the objects underlying\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// the references from which they were obtained are live throughout the\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// whole unsafe block, and they are not accessed either through the\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// references or concurrently through any other pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// NOT SAFE. DO NOT DO THIS.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"/*\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\"\nmsgstr \"রানটাইমে কোন অনির্ধারিত আচরণ নেই:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"অনিরাপদ ফাংশন ডাকা\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// the string slice, and lie on UTF-8 sequence boundaries.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\"\nmsgstr \"রানটাইমে কোন অনির্ধারিত আচরণ নেই:\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Not upholding the UTF-8 encoding requirement breaks memory safety!\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// println!(\\\"char count: {}\\\", count_chars(unsafe {\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// emojis.get_unchecked(0..3) }));\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"অনিরাপদ ফাংশন লেখা\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"/// Swaps the values pointed to by the given pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/unsafe-traits.md\nmsgid \"/// # Safety\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"/// The pointers must be valid and properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"অনিরাপদ Traits বাস্তবায়ন\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"/// ...\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"/// The type must have a defined representation and no padding.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"নিরাপদ FFI  মোড়ক\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Call closedir as needed.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"অনিরাপদ রাস্ট\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"উদাহরণের মাধ্যমে রাস্ট\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`bool`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"সমাধানসমূহ\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"Slices\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"Rustdoc\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"ফাংশন\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"অনিরাপদ রাস্ট\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Types\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"অ্যান্ড্রয়েডে রাস্ট\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate a C++ header containing the C++ bindings\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// to the Rust exported functions in lib.rs.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"অনুশীলন\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"গঠনের নিয়ম\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"গঠনের নিয়ম\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"উদাহরণ\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"অনুশীলনে রাস্ট\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"ত্রুটি সামলানো\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"ত্রুটি সামলানো\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// ()>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"আন্তঃকার্যক্ষমতা\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"কিছু নোট:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"লাইব্রেরি\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"রাস্ট ইকোসিস্টেম\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"রাস্ট ইকোসিস্টেম\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"দরকারী ক্রেট-সমূহ\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"জেনেরিকস\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"দরকারী ক্রেট-সমূহ\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Bare Metal Rust: বিকাল\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Notice that the thread is stopped before it reaches 10 --- the main thread \"\n\"is not waiting.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Trigger a panic in the thread, notice how this doesn't affect `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"panic payload. This is a good time to talk about [`Any`](https://doc.rust-\"\n\"lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// left_fork: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// right_fork: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// thoughts: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Pick up forks...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Create forks\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Create philosophers\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Output their thoughts\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"মাল্টি থ্রেডেড লিঙ্ক চেকার\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"Async Rust\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"Futures Control Flow\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A work item. In this case, just sleep for the given time and respond\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// with a message on the `respond_on` channel.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are not yet supported in the stable channel ([An \"\n\"experimental feature exists in nightly and should be stabilized in the mid \"\n\"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n\"nightly.html))\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"provides a workaround through a macro:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Dining দার্শনিক\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Keep trying until we have both forks\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Make them think and eat\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.36.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"কোর্স চালানো\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀 কোর্সটি নেওয়ার জন্য আপনাকে ধন্যবাদ! আমরা আশা করি আপনি এটি \"\n\"উপভোগ করেছেন এবং এটি উপকারী ছিলো।\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"অফিসিয়াল ডকুমেন্টেশন\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"উদাহরণের মাধ্যমে রাস্ট\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"অনুশীলনে রাস্ট\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"\"\n#~ \"C, C++ or Java থেকে বেশিরভাগ রাস্ট সিনট্যাক্স আপনার কাছে পরিচিত মনে হবেঃ\"\n\n#, fuzzy\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"aarch64-paging\"\n\n#, fuzzy\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"ব্যতিক্রম\"\n\n#, fuzzy\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"ছোট্ট উদাহরণ\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Rust কেনো?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"কম্পাইল সময়ের গ্যারান্টি\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"রানটাইম গ্যরান্টি\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"আধুনিক সুবিধাসমূহ\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"মৌলিক সিনট্যাক্স\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String বনাম str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"অভারলোডিং\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Arrays এবং for-Loops\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for এক্সপ্রেশন\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while এক্সপ্রেশন\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop এক্সপ্রেশন\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"ভিন্ন Payloads\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Enum এর মাপ\"\n\n#~ msgid \"Novel Control Flow\"\n#~ msgstr \"নভেল কন্ট্রোল ফ্লো\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let এক্সপ্রেশন\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"while let এক্সপ্রেশন\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"match এক্সপ্রেশন\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"Structs ডিস্ট্রাকচার \"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Arrays ডিস্ট্রাকচার \"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Match Guards\"\n\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"প্যাটার্ন ম্যাচিং (TBD)\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stack বনাম Heap\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Stack মেমোরি\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"ম্যানুয়াল মেমোরি ব্যবস্থাপনা\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"স্কোপ ভিত্তিক মেমোরি ব্যবস্থাপনা\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"তুলনা\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"অনুলিপি এবং ক্লোনিং\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"ভাগ করা ধার এবং অনন্য ধার\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"বই সংরক্ষণ করা\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Field Shorthand Syntax\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"Method Receiver\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option এবং Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"রিকার্সিভ ডেটা টাইপ\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Strings এবং Iterators\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"জেনেরিক মেথড-সমূহ\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Monomorphization\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"ডিফল্ট মেথড-সমূহ\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"impl Trait\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"গুরুত্বপূর্ণ Traits\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From এবং Into\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"অপারেটরঃ Add, Mul, ...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"Closures: Fn, FnMut, FnOnce\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"একটি সাধারণ GUI  লাইব্রেরি\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Points and Polygons\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Catching Stack Unwinding\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"স্ট্রাকচার্ড এরর হ্যান্ডলিং\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"এর সাহায্যে এরর/ত্রুটি হস্তান্তর করা ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"এররের টাইপ রূপান্তর\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"এররের ইনামগুলো বের করা\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"ত্রুটিতে কন্টেক্সট যোগ করা\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"spin\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send এবং Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"async/await\"\n#~ msgstr \"async/await\"\n\n#~ msgid \"Pin\"\n#~ msgstr \"Pin\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"প্রথম দিনঃ সকাল\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"প্রথম দিনঃ বিকাল\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"দ্বিতীয় দিনঃ সকাল\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"দ্বিতীয় দিনঃ বিকাল\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"তৃতীয় দিনঃ সকাল\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"তৃতীয় দিনঃ বিকাল\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Bare Metal Rust: সকাল\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Concurrency: বিকাল\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Concurrency: বিকাল\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"কোর্সটি দ্রুত গতির এবং অনেক কিছু কভার করেঃ\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"দ্বিতীয় দিনঃ মেমোরি ম্যানেজমেন্ট, মালিকানা, কম্পাউন্ড ডেটা টাইপস, এবং দি \"\n#~ \"স্ট্যান্ডার্ড লাইব্রেরি।\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"তৃতীয় দিনঃ Traits এবং Generics, এরর হ্যান্ডলিং, টেস্টিং, এবং অনিরাপদ রাস্ট।\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"এটি \\\\[rust-analyzer\\\\] \\\\[1\\\\] কে সংজ্ঞায় যেতে অনুমতি দেবে। আমরা ব্যবহার \"\n#~ \"করার পরামর্শ দিই [VS Code](https://code.visualstudio.com/) কোড এডিট করতে \"\n#~ \"(কিন্তু যেকোনো LSP সামঞ্জস্যপূর্ণ এডিটর কাজ করে)।\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"কিছু লোক IDE-এর জন্য [JetBrains](https://www.jetbrains.com/clion/) ব্যবহার \"\n#~ \"করতে পছন্দ করে, যারা তাদের নিজস্ব বিশ্লেষণে করে কিন্তু তাদের নিজস্ব ট্রেডঅফ \"\n#~ \"রয়েছে। আপনি যদি তাদের পছন্দ করেন তবে আপনি [Rust Plugin](https://www.\"\n#~ \"jetbrains.com/rust/) ইনস্টল করতে পারেন। অনুগ্রহ করে মনে রাখবেন যে জানুয়ারী \"\n#~ \"2023 অনুযায়ী ডিবাগিং শুধুমাত্র JetBrains IDEA স্যুটের CLion সংস্করণে কাজ করে।\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.61.0 (fe5b13d68 2022-05-18)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.61.0 (a028ae4 2022-04-29)\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"যদি আপনি এটি একটি শ্রেনীকক্ষে পড়াচ্ছেন, এটি একটি ভালো যায়গা নিয়মমাফিক  চলার \"\n#~ \"জন্য। আমরা পরামর্শ দিই যে দিনটাকে দুইটা ভাগে ভাগ করুন(স্লাইডগুলোকে অনুসরন করে):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"সকালঃ ৯:০০ থেকে ১২:০০,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"বিকাল ১:০০ থেকে ৪:০০.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"আপনি অবশ্যই এটি প্রয়োজন অনুসারে পরিবর্তন করতে পারেন। অনুগ্রহ করে নিশ্চিত করুন \"\n#~ \"বিরতি নিতে, আমরা পরামর্শ দিই প্রতি ঘন্টায় একবার বিরতি নিতে!\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"এটি একটি ছোট উদাহরণ প্রোগ্রাম Rust এ:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"গত 40 বছরে অর্জিত সমস্ত অভিজ্ঞতা দিয়ে Rust তৈরি করা হয়েছে।\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"ভাষার বৈশিষ্ট্যসমূহ\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Tooling\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i8; 10] = [42; 10];\\n\"\n#~ \"    a[5] = 0;\\n\"\n#~ \"    println!(\\\"a: {:?}\\\", a);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i8; 10] = [42; 10];\\n\"\n#~ \"    a[5] = 0;\\n\"\n#~ \"    println!(\\\"a: {:?}\\\", a);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"C++ এর মতো, Rust এর ও references আছে\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i32; 6] = [10, 20, 30, 40, 50, 60];\\n\"\n#~ \"    println!(\\\"a: {a:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let s: &[i32] = &a[2..4];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"s: {s:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i8; 10] = [42; 10];\\n\"\n#~ \"    a[5] = 0;\\n\"\n#~ \"    println!(\\\"a: {:?}\\\", a);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"প্রথম দিনঃ সকালের অনুশীলন\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"লুন অ্যালগরিদম\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Enums and pattern matching.\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Strings এবং Iterators\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Stack বনাম Heap\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"আপনি নিজেই heap-memory এলোকেট এবং ডি-এলোকেট করুন।\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"C উদাহরণ\"\n\n#, fuzzy\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"আধুনিক C++ এ ডবল মুক্ত\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"দ্বিতীয় দিনঃ সকালের অনুশিলন\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"তৃতীয় দিনঃ সকালের অনুশীলন\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"adb logcat -s rust\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo new link-checker\\n\"\n#~ \"cd link-checker\\n\"\n#~ \"cargo add --features blocking,rustls-tls reqwest\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"আপনি অনুশীলনীর সমাধান এই পৃষ্ঠাগুলোতে খুজে পাবেন।\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"প্রথম দিনঃ সকালের অনুশীলন\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"প্যাটার্ন মিলানো\"\n\n#~ msgid \"Elevator Operations\"\n#~ msgstr \"লিফট অপারেশন\"\n\n#~ msgid \"\"\n#~ \"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n#~ \"google/comprehensive-rust/build.yml?style=flat-square)](https://github.\"\n#~ \"com/google/comprehensive-rust/actions/workflows/build.yml)\"\n#~ msgstr \"\"\n#~ \"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n#~ \"google/comprehensive-rust/build.yml?style=flat-square)](https://github.\"\n#~ \"com/google/comprehensive-rust/actions/workflows/build.yml)\"\n\n#~ msgid \"Build workflow\"\n#~ msgstr \"কর্মপ্রবাহ তৈরি\"\n\n#~ msgid \"GitHub contributors\"\n#~ msgstr \"GitHub অবদানকারী\"\n\n#~ msgid \"\"\n#~ \"[![GitHub contributors](https://img.shields.io/github/contributors/google/\"\n#~ \"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n#~ \"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.\"\n#~ \"shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n#~ \"(https://github.com/google/comprehensive-rust/stargazers)\"\n#~ msgstr \"\"\n#~ \"[![GitHub contributors](https://img.shields.io/github/contributors/google/\"\n#~ \"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n#~ \"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.\"\n#~ \"shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n#~ \"(https://github.com/google/comprehensive-rust/stargazers)\"\n\n#~ msgid \"GitHub stars\"\n#~ msgstr \"GitHub stars\"\n\n#~ msgid \"\"\n#~ \"[![GitHub stars](https://img.shields.io/github/stars/google/comprehensive-\"\n#~ \"rust?style=flat-square)](https://github.com/google/comprehensive-rust/\"\n#~ \"stargazers)\"\n#~ msgstr \"\"\n#~ \"[![GitHub stars](https://img.shields.io/github/stars/google/comprehensive-\"\n#~ \"rust?style=flat-square)](https://github.com/google/comprehensive-rust/\"\n#~ \"stargazers)\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"প্রথম দিনঃ প্রাথমিক রাস্ট, মালিকানা এবং ধার পরীক্ষক।\"\n\n#~ msgid \"Concurrency\"\n#~ msgstr \"Concurrency\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (প্রস্তাবিত)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"রাস্ট ফাউন্ডেশন দ্বারা রক্ষণাবেক্ষণ করা [rustup](https://rust-analyzer.github.\"\n#~ \"io/) টুল সহ অন্যান্য স্ট্যান্ডার্ড ইকোসিস্টেম টুলের মধ্যে আপনি Cargo এবং রাস্ট \"\n#~ \"কম্পাইলার ইনস্টল করার নির্দেশাবলী অনুসরণ করতে পারেন।\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"প্যাকেজ ম্যানেজার\"\n\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n"
  },
  {
    "path": "po/da.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-01-24T13:24:49+01:00\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\n\"\n\"Language: da\\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 src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Velkommen til Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Afvikling af kurset\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Kursets struktur\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Genvejstaster\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Oversættelser\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Brug af Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust's økosystem\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Kodeeksempler\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Dag 1: Formiddag\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"Velkommen\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Hej verden!\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Hvad er Rust?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variabler\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/strings.md\nmsgid \"Strings\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Typeudledning\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/slices-and-lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md\n#: src/error-handling/solution.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Løsninger\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Forgreninger\"\n\n#: src/SUMMARY.md src/control-flow-basics/conditionals.md\nmsgid \"Conditionals\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"`for`\\\\-løkker\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funktioner\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Dag 1: Eftermiddag\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/match.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Mønstergenkendelse\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"Dekonstruktion af enumerationer\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Referencer\"\n\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Referencer\"\n\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Hængende referencer\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Strukturer\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Tuple-strukturer\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Enumerationer\"\n\n#: src/SUMMARY.md src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static and Const\"\nmsgstr \"static & const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Dag 2: Formiddag\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"Forgreninger\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Asynkrone egenskaber (eng. Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Metoder\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Funktioner\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Dag 2: Eftermiddag\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-types/docs.md\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"Officiel dokumentation\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Option`\"\nmsgstr \"Undtagelser\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\nmsgid \"Comparisons\"\nmsgstr \"Sammenligninger\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"Iteratorer\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` og `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` og `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: ROT13\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Håndtering af hukommelse\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Hukommelseshåndtering i Rust\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Ejerskab\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Overførselssemantik\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Sammensatte typer\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"`Box`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Lån af variabler\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"Lån af variabler\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"Lån af variabler\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"([tilbage til øvelsen](health-statistics.md))\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes.md\n#, fuzzy\nmsgid \"Slices and Lifetimes\"\nmsgstr \"Livstider\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Arraysegmenter\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"String References\"\nmsgstr \"Hængende referencer\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Livstider i funktionskald\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Livstider\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"Livstider\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Morning\"\nmsgstr \"Dag 1: Formiddag\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Iteratorer\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`FromIterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/other.md\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"Andre projekter\"\n\n#: src/SUMMARY.md src/testing/useful-crates.md\nmsgid \"Useful Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Luhn-algorithmen\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Dag 1: Eftermiddag\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Implicitte konverteringer\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"`Error`\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`From` og `Into`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Funktioner\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Asynkrone egenskaber (eng. Traits)\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Implementation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/deploy.md\nmsgid \"Deploy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/changing.md\nmsgid \"Changing API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Rust Bridge\"\nmsgstr \"Rust i Android\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Skalartyper\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Exercise\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Eksempler\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Rust i Android\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"Øvelser\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Rå jern: Formiddag\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Et minimalt eksempel\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"Rå MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC'er\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"probe-rs, cargo-embed\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Fejlfinding\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Andre projekter\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Kompas\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"Løsninger\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Rå jern: Eftermiddag\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflag\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Driver\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Anvendelse\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Undtagelser\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`vmbase`\"\nmsgstr \"vmbase\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Tråde\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"Tråde med virkefelt\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Kanaler\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Ubegrænsede kanaler\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Begrænsede kanaler\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` og `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Eksempler\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"Delt tilstand\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"Eksempel\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Filosoffer omkring spisebordet\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Flertrådet linktjekker\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concurrency: Eftermiddag\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"Grundlæggende Async\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Fremtidige resultater (eng. Futures)\"\n\n#: src/SUMMARY.md src/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Opgaver (eng. Tasks)\"\n\n#: src/SUMMARY.md src/async/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Asynkrone kanaler\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"Forgreninger\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"Faldgruber\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Asynkrone egenskaber (eng. Traits)\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Annulering\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Broadcast chat-applikation\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Afsluttende bemærkninger\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Tak!\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Andre resourcer\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Anerkendelser\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Bygge-arbejdsgang](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub-bidragsydere](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub-stjerner](https://img.\"\n\"shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n\"(https://github.com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Dette er et gratis Rust-kursus udviklet af Android-teamet. Kurset dækker \"\n\"hele spektret af Rust, fra grundlæggende syntaks til avancerede emner som \"\n\"generiske typer og fejlhåndtering.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Målet med kurset er at lære dig Rust. Vi antager, at du ikke ved noget om \"\n\"Rust og håber at:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Give dig en omfattende forståelse af Rust-syntaksen og sproget.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Gøre det muligt for dig at ændre eksisterende programmer og skrive nye \"\n\"programmer i Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Vise dig idiomatisk Rust.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\"Vi kalder de første tre kursusdage Grundlæggende Rust (_Rust Fundamentals_).\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Efterfølgende er du inviteret til at dykke ned i et eller flere \"\n\"specialiserede emner:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): en halv kursusdag om at bruge Rust til \"\n\"platformudvikling i Android (AOSP). Dette inkluderer interoperabilitet med \"\n\"C, C++ og Java.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Android](android.md): en halv kursusdag om at bruge Rust til \"\n\"platformudvikling i Android (AOSP). Dette inkluderer interoperabilitet med \"\n\"C, C++ og Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Rå jern](bare-metal.md): en fuld kursusdag om at bruge Rust til udvikling \"\n\"på det rå jern og indlejrede (_bare metal and embedded_) systemer. Dækker \"\n\"både mikroprocessorer og applikationsprocessorer.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Samtidighed](concurrency.md): en hel kursusdag om samtidighed \"\n\"(_concurrency_) i Rust. Vi dækker både klassisk samtidighed (tidsdelt \"\n\"multitasking ved hjælp af tråde og mutexes) og async/await samtidighed \"\n\"(kooperativ multitasking ved hjælp af _futures_).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Ting som ikke dækkes\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust er et stort sprog og vi vil ikke være i stand til at dække det hele på \"\n\"et par dage. Nogle ting som vi ikke dækker er:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"At lære hvordan man udvikler makroer: se venligst [Kapitel 19.5 i Rust-bogen]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) og [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) i stedet.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Antagelser\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Kurset antager at du allerede ved hvordan man programerer. Rust er et \"\n\"statisk typet sprog og vi vil nogle gange sammenligne med C og C++ for bedre \"\n\"at kunne forklare Rust's tilgangsvinkel.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Hvis du ved hvordan man programmerer i et dynamisk typet sprog såsom Python \"\n\"eller JavaScript, så vil du også fint kunne følge med.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Dette er et eksempel på en _note_. Vi vil bruge disse til at tilføje \"\n\"yderligere information til siderne. Dette kan være nøglepunkter som \"\n\"instruktøren skal dække såvel som svar på typiske spørgsmål som bliver \"\n\"stillet i klassen.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Denne side er for kursuslederen.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"Kursets struktur\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (3 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 55 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 15 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Ud over kurset på tre dage om Grundlæggende Rust, dækker vi mere \"\n\"specialiserede emner:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust i Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust i Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Bare-Metal Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Samtidighed i Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Ufuldstændige oversættelser\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Installation\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md src/hello-world/hello-world.md\n#: src/tuples-and-arrays/tuples-and-arrays.md src/references/exclusive.md\n#: src/pattern-matching/destructuring.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md src/concurrency/threads.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Nøglepunkter:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Rediger mig!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Du kan bruge \"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \"for at afvikle koden når tekstboksen er i fokus.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Velkommen til Dag 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Dette er den første dag af Rust Fundamentals. Vi kommer til at dække en \"\n\"masse terræn i dag:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Typeudledning\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 3 hours\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/slices-and-lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust har det samme anvendelsesområde som C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hallo 🌍!\\\"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Hvad du ser:\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md src/testing.md src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops.md\n#: src/control-flow-basics/break-continue.md\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"{x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\n#: src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Literals\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`char`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\n#, fuzzy\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\n#, fuzzy\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\", \\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\n#, fuzzy\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\\\"indre blok: {a}\\\"\"\n\n#: src/types-and-values/strings.md src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\n#, fuzzy\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md src/tuples-and-arrays.md src/borrowing.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Blocks are delimited by curly braces.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"Line comments are started with `//`, block comments are delimited by `/* ... \"\n\"*/`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Keywords like `if` and `while` work the same.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"`if` expressions\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"{numbers:?}\\\"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\" -> {x}\\\"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`for`\"\nmsgstr \"`for`\\\\-løkker\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`loop`\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"We will discuss iteration later; for now, just stick to range expressions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\\\"{result}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\\\"x: {x}, i: {i}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"In this case we break the outer loop after 3 iterations of the inner loop.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blokke\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Virkefelt og overskyggede variabler\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"før: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md src/std-traits/from-and-into.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hallo\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"indre blok: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"overskygget i indre blok: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"efter: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Længde: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Velkommen\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n\"elements of an array have the same type, while tuples can accommodate \"\n\"different types. Both types have a size fixed at compile time.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Arrays\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[T; N]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[20, 30, 40]`, `[0; 3]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Tuples\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Array assignment and access:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuple assignment and access:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n\"and the only valid value of that type --- that is to say both the type and \"\n\"its value are expressed as `()`. It is used to indicate, for example, that a \"\n\"function or expression has no return value, as we'll see in a future slide.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"You can think of it as `void` that can be familiar to you from other \"\n\"programming languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be irrefutable, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/user-defined-types/named-structs.md\n#: src/user-defined-types/enums.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Destructuring is a way of extracting data from a data structure by writing a \"\n\"pattern that is matched up to the data structure, binding variables to \"\n\"subcomponents of the data structure.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"You can destructure tuples and arrays by matching on their elements:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left of Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"below X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"first quadrant\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"Tell me about {triple:?}\\\"\"\nmsgstr \"\\\"Fortæl mig om {triple:?}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 1 and the rest were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"All elements were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Create a new array pattern using `_` to represent an element.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Add more values to the array.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Point out that how `..` will expand to account for different number of \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\n#, fuzzy\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix:\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\n#, fuzzy\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transponeret:\\\"\"\n\n#: src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/references.md src/user-defined-types.md src/pattern-matching.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.count_ones()`). There is no need for an `->` operator like \"\n\"in C++.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`const`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`static`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Velkommen til RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Properties table:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Egenskab\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Static\"\nmsgstr \"Statisk\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Constant\"\nmsgstr \"Konstant\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Has an address in memory\"\nmsgstr \"Har en adresse i hukommelsen\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"Ja\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"No (inlined)\"\nmsgstr \"Nej (inlinet)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"Nej\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Can be mutable\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (unsafe)\"\nmsgstr \"Ja (_unsafe_)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Evaluated at compile time\"\nmsgstr \"Evalueret ved kompileringstid\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"Ja (initialiseret ved kompileringstid)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Inlined wherever it is used\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"Modtaget: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Velkommen til Dag 2\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"Strukturer\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, andre felter blev ignoreret\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"`if let`-udtryk\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"`while let`-udtryk\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"`match`-udtryk\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"`while let`-udtryk\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"En streng\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/googletest.md\n#: src/testing/solution.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"`while let`-lykker\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Monacos Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Hej, mit navn er {}\\\"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"Traits are implemented in an `impl <trait> for <type> { .. }` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Traits may specify pre-implemented (provided) methods and methods that users \"\n\"are required to implement themselves. Provided methods can rely on required \"\n\"methods. In this case, `greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Hej, mit navn er {}\\\"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stak                              Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \"\n\"pets                   :     :                                             :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----\"\n\"+                             :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o \"\n\"|                             :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-\"\n\"+                             :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |   +---------------\"\n\"+           :\\n\"\n\":   +-----------+-------+   :     :     | |   | '-->| name: \\\"Fido\\\"  \"\n\"|           :\\n\"\n\":                           :     :     | |   |     +---------------\"\n\"+           :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::name\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |   +-\"\n\"+                               :\\n\"\n\"                                  :     | '-->|\"\n\"\\\\|                               :\\n\"\n\"                                  :     |     +-\"\n\"+                               :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::name\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"\\n\"\n\"```\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/closures.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md src/smart-pointers.md src/iterators.md src/error-handling.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"{numbers:?}\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} og {float:?}\\\"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md src/memory-management.md src/slices-and-lifetimes.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Undtagelser\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"'Z'\"\nmsgstr \"'x'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"dagbog.txt\\\"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Kære dagbog: {contents}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hello\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, antal tegn = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms eventyr\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Stolthed og fordom\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"De Elendige\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice i Eventyrland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} sider\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} er ukendt.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"Dødsspillet\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Break error.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Read` og `Write`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"pengepremie: {}\\\"\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"pengepremie: {}\\\"\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"pengepremie: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"linjer i slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"linjer i file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"Verden\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y er sat!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Hej\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"there\\\"\"\nmsgstr \"\\\"der\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\n#, fuzzy\nmsgid \"'A'\"\nmsgstr \"'x'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Velkommen til Dag 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stak                              Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(utilgængelig)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Defensive kopier i moderne C++\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropper {}\\\"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serr_lower\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stak                            Heap\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                         :     :                                               :\\n\"\n\":    \"\n\"list                 :     :                                               :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":   | Cons | 1  | o--+----+-----+--->| Cons | 2  | o--+--->| Nil  | // | // \"\n\"|   :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":                         :     :                                               :\\n\"\n\":                         :     :                                               :\\n\"\n\"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not compute a fixed size of the struct in memory \"\n\"(`List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. \"\n\"\\\"Recursive with indirection\\\" is a hint you might want to use a Box or \"\n\"reference of some kind, instead of storing a value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stak                            Heap\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                         :     :                                               :\\n\"\n\":    \"\n\"list                 :     :                                               :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":   | Cons | 1  | o--+----+-----+--->| Cons | 2  | o--+--->| Nil  | // | // \"\n\"|   :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":                         :     :                                               :\\n\"\n\":                         :     :                                               :\\n\"\n\"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md src/android/aidl/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices\"\nmsgstr \"Arraysegmenter\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Hallo \\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"Rust terminology:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the the compiler does not know what lifetime to infer for \"\n\"`p3`. Looking inside the function body shows that it can only safely assume \"\n\"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, \"\n\"Rust requires explicit annotations of lifetimes on function arguments and \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Livstider i funktionskald\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Livstider i datastrukturer\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Farvel {text}!\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\n#, fuzzy\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\\\"hallo\\\"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Velkommen til Dag 1\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator`\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: main\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: main\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: main\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Hej verden\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"Rust comes with only basic support for writing tests.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"Here are some additional crates which we recommend for writing tests:\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n\"library in the tradition of GoogleTest for C++.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n\"tests.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings strings \"\n\"are shown as a diff:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"GoogleTest is available for use in AOSP.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"The advice here is for Android (AOSP) where Mockall is the recommended \"\n\"mocking library. There are other [mocking libraries available on crates.io]\"\n\"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP \"\n\"services. The other mocking libraries work in a similar fashion as Mockall, \"\n\"meaning that they make it easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Luhn-algorithmen\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject number with less than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Er {cc_number} et gyldigt kreditkortnummer? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"ja\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"nej\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 2 hours\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"åh nej!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process:Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"IO-fejl: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"count: {}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Fejl: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Fejl: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror`\"\nmsgstr \"`Error`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// Parity error.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// Analyze the numbers.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// Parity error.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'z'\"\nmsgstr \"'x'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'_'\"\nmsgstr \"'x'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'+'\"\nmsgstr \"'x'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'-'\"\nmsgstr \"'x'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"IO-fejl: {e}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 er: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 er: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"Hej verden!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md src/android/aidl/implementation.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\nmsgid \"\"\n\"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n\"vendor partition.\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/client.md\nmsgid \"/// Connect to the BirthdayService.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/changing.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen-demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI-demo.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analyze the numbers.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) er mindst!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) er muligvis større end x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Funktioner\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Fejl: {err}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rust by Example\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Rust i Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\\\"Velkommen til RustOS 3.14\\\"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust community typically uses `cargo` and libraries from [crates.io](https://\"\n\"crates.io/). Chromium is built using `gn` and `ninja` and a curated set of \"\n\"dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Øvelser\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, by `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stak                            Heap\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                         :     :                                             :\\n\"\n\":    \"\n\"list                 :     :                                             :\\n\"\n\":   +----+----+           :     :    +----+----+    +----+------\"\n\"+             :\\n\"\n\":   | 1  | o--+-----------+-----+--->| 2  | o--+--->| // | null \"\n\"|             :\\n\"\n\":   +----+----+           :     :    +----+----+    +----+------\"\n\"+             :\\n\"\n\":                         :     :                                             :\\n\"\n\":                         :     :                                             :\\n\"\n\"`- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Eksempel\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Øvelser\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Rust's økosystem\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Rust's økosystem\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"\\\"Sokrates\\\"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"Konstant\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Velkommen til Rust på det rå jern\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"På MacOS:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` og `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` og resten af `fs`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` og resten af `io`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` og resten af `thread`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Give the allocator some memory to allocate.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Now we can do things that require heap allocation.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\\\"En streng\\\"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// GPIO port 0 peripheral address\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// GPIO peripheral offsets\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// PIN_CNF fields\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"ADC\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"I2C, SPI, UART, CAN\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"RNG\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"Embed.toml:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"Andre projekter\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Bindinger til FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\"    // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Read compass data and log it to the serial port.\\n\"\n\"        // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Bar metal formiddagsøvelser\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([tilbage til øvelsen](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Writes a single byte to the UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Wait until there is room in the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Write to the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Wait until the UART is no longer busy.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Flags from the UART flag register.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Data set ready.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Data carrier detect.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART busy transmitting data.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// Receive FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// Transmit FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// Receive FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// Transmit FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Ring indicator.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been \"\n\"received.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Check for error conditions in bits 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Initialises UART logger.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Wait for 3 seconds.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Copyright 2023 Google LLC\\n\"\n\"//\\n\"\n\"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\"// you may not use this file except in compliance with the License.\\n\"\n\"// You may obtain a copy of the License at\\n\"\n\"//\\n\"\n\"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n\"//\\n\"\n\"// Unless required by applicable law or agreed to in writing, software\\n\"\n\"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\"// See the License for the specific language governing permissions and\\n\"\n\"// limitations under the License.\\n\"\nmsgstr \"\"\n\"// Copyright 2023 Google LLC\\n\"\n\"//\\n\"\n\"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\"// you may not use this file except in compliance with the License.\\n\"\n\"// You may obtain a copy of the License at\\n\"\n\"//\\n\"\n\"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n\"//\\n\"\n\"// Unless required by applicable law or agreed to in writing, software\\n\"\n\"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\"// See the License for the specific language governing permissions and\\n\"\n\"// limitations under the License.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_exception_current\\\"\"\nmsgstr \"\\\"sync_exception_current\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_current\\\"\"\nmsgstr \"\\\"irq_current\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"No pending interrupt\\\"\"\nmsgstr \"\\\"No pending interrupt\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"IRQ {intid:?}\\\"\"\nmsgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_current\\\"\"\nmsgstr \"\\\"fiq_current\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_current\\\"\"\nmsgstr \"\\\"serr_current\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_lower\\\"\"\nmsgstr \"\\\"sync_lower\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_lower\\\"\"\nmsgstr \"\\\"irq_lower\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_lower\\\"\"\nmsgstr \"\\\"fiq_lower\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_lower\\\"\"\nmsgstr \"\\\"serr_lower\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: main\\n\"\nmsgstr \"// ANCHOR: main\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: Flags\\n\"\nmsgstr \"// ANCHOR: Flags\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Flags\\n\"\nmsgstr \"// ANCHOR_END: Flags\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\nmsgstr \"\"\n\"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Framing error.\\n\"\nmsgstr \"/// Framing error.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Parity error.\\n\"\nmsgstr \"/// Parity error.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Break error.\\n\"\nmsgstr \"/// Break error.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Overrun error.\\n\"\nmsgstr \"/// Overrun error.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: Registers\\n\"\nmsgstr \"// ANCHOR: Registers\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Registers\\n\"\nmsgstr \"// ANCHOR_END: Registers\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// ANCHOR: Uart\\n\"\n\"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\"// ANCHOR: Uart\\n\"\n\"/// Driver for a PL011 UART.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Uart\\n\"\nmsgstr \"// ANCHOR_END: Uart\\n\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\\\"linux\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"CROSS_COMPILE\\\"\"\nmsgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-linux-gnu\\\"\"\nmsgstr \"\\\"aarch64-linux-gnu\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-none-elf\\\"\"\nmsgstr \"\\\"aarch64-none-elf\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"entry.S\\\"\"\nmsgstr \"\\\"entry.S\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"exceptions.S\\\"\"\nmsgstr \"\\\"exceptions.S\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"idmap.S\\\"\"\nmsgstr \"\\\"idmap.S\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"empty\\\"\"\nmsgstr \"\\\"empty\\\"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".macro adr_l, reg:req, sym:req\\n\"\n\"\\tadrp \\\\reg, \\\\sym\\n\"\n\"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n\".endm\\n\"\n\"\\n\"\n\".macro mov_i, reg:req, imm:req\\n\"\n\"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n\".endm\\n\"\n\"\\n\"\n\".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n\".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n\".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n\"\\n\"\n\"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n\".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n\"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n\".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n\"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n\"fault instead. */\\n\"\n\".set .L_TCR_EPD1, 0x1 << 23\\n\"\n\"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n\".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are outer write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are inner write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n\"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n\".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n\".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n\"L_TCR_RGN_OWB\\n\"\n\".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n\"L_TCR_T0SZ_512\\n\"\n\"\\n\"\n\"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n\"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n\".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n\"/* Stage 1 data access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n\"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n\".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n\"/* Privileged Access Never is unchanged on taking an exception to EL1. */\\n\"\n\".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n\"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n\"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n\".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n\"28) | (0x1 << 29)\\n\"\n\".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n\"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n\".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n\"L_SCTLR_EL1_RES1\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic entry point for an image. It carries out the operations \"\n\"required to prepare the\\n\"\n\" * loaded image to be run. Specifically, it zeroes the bss section using \"\n\"registers x25 and above,\\n\"\n\" * prepares the stack, enables floating point, and sets up the exception \"\n\"vector. It preserves x0-x3\\n\"\n\" * for the Rust entry point, as these may contain boot parameters.\\n\"\n\" */\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"\\t/* Load and apply the memory management configuration, ready to enable MMU \"\n\"and caches. */\\n\"\n\"\\tadrp x30, idmap\\n\"\n\"\\tmsr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lmairval\\n\"\n\"\\tmsr mair_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Ltcrval\\n\"\n\"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n\"\\tbfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"\\tmsr tcr_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Ensure everything before this point has completed, then invalidate any \"\n\"potentially stale\\n\"\n\"\\t * local TLB entries before they start being used.\\n\"\n\"\\t */\\n\"\n\"\\tisb\\n\"\n\"\\ttlbi vmalle1\\n\"\n\"\\tic iallu\\n\"\n\"\\tdsb nsh\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this has completed.\\n\"\n\"\\t */\\n\"\n\"\\tmsr sctlr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Disable trapping floating point access in EL1. */\\n\"\n\"\\tmrs x30, cpacr_el1\\n\"\n\"\\torr x30, x30, #(0x3 << 20)\\n\"\n\"\\tmsr cpacr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Zero out the bss section. */\\n\"\n\"\\tadr_l x29, bss_begin\\n\"\n\"\\tadr_l x30, bss_end\\n\"\n\"0:\\tcmp x29, x30\\n\"\n\"\\tb.hs 1f\\n\"\n\"\\tstp xzr, xzr, [x29], #16\\n\"\n\"\\tb 0b\\n\"\n\"\\n\"\n\"1:\\t/* Prepare the stack. */\\n\"\n\"\\tadr_l x30, boot_stack_end\\n\"\n\"\\tmov sp, x30\\n\"\n\"\\n\"\n\"\\t/* Set up exception vector. */\\n\"\n\"\\tadr x30, vector_table_el1\\n\"\n\"\\tmsr vbar_el1, x30\\n\"\n\"\\n\"\n\"\\t/* Call into Rust code. */\\n\"\n\"\\tbl main\\n\"\n\"\\n\"\n\"\\t/* Loop forever waiting for interrupts. */\\n\"\n\"2:\\twfi\\n\"\n\"\\tb 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers with 18 \"\n\"instructions\\n\"\n\" * left.\\n\"\n\" *\\n\"\n\" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n\"respectively,\\n\"\n\" * which can be used as the first and second arguments of a subsequent \"\n\"call.\\n\"\n\" */\\n\"\n\".macro save_volatile_to_stack\\n\"\n\"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n\"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n\"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tstr x18, [sp, #8 * 18]\\n\"\n\"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\\n\"\n\"\\t * and still be able to unwind.\\n\"\n\"\\t */\\n\"\n\"\\tmrs x0, elr_el1\\n\"\n\"\\tmrs x1, spsr_el1\\n\"\n\"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Restores the volatile registers from the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers while still leaving \"\n\"18\\n\"\n\" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n\" * instructions to spare.\\n\"\n\" */\\n\"\n\".macro restore_volatile_from_stack\\n\"\n\"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n\"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tldr x18, [sp, #8 * 18]\\n\"\n\"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n\"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n\"\\tmsr elr_el1, x0\\n\"\n\"\\tmsr spsr_el1, x1\\n\"\n\"\\n\"\n\"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n\"\\tldp x0, x1, [sp], #8 * 24\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n\"doing\\n\"\n\" * the work, then switching back to SP0 before returning.\\n\"\n\" *\\n\"\n\" * Switching to SPx and calling the Rust handler takes 16 instructions. To\\n\"\n\" * restore and return we need an additional 16 instructions, so we can \"\n\"implement\\n\"\n\" * the whole handler within the allotted 32 instructions.\\n\"\n\" */\\n\"\n\".macro current_exception_sp0 handler:req\\n\"\n\"\\tmsr spsel, #1\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\tmsr spsel, #0\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n\"volatile\\n\"\n\" * registers, then returns.\\n\"\n\" *\\n\"\n\" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n\" * non-volatile registers.\\n\"\n\" *\\n\"\n\" * Saving state and jumping to the Rust handler takes 15 instructions, and\\n\"\n\" * restoring and returning also takes 15 instructions, so we can fit the \"\n\"whole\\n\"\n\" * handler in 30 instructions, under the limit of 32.\\n\"\n\" */\\n\"\n\".macro current_exception_spx handler:req\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n\".global vector_table_el1\\n\"\n\".balign 0x800\\n\"\n\"vector_table_el1:\\n\"\n\"sync_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_cur_spx:\\n\"\n\"\\tcurrent_exception_spx sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_spx:\\n\"\n\"\\tcurrent_exception_spx serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_64:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_64:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_64:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_64:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_32:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_32:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_32:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_32:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n\".set .L_TT_TYPE_PAGE,  0x3\\n\"\n\".set .L_TT_TYPE_TABLE, 0x3\\n\"\n\"\\n\"\n\"/* Access flag. */\\n\"\n\".set .L_TT_AF, 0x1 << 10\\n\"\n\"/* Not global. */\\n\"\n\".set .L_TT_NG, 0x1 << 11\\n\"\n\".set .L_TT_XN, 0x3 << 53\\n\"\n\"\\n\"\n\".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n\".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n\"shareable\\n\"\n\"\\n\"\n\".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n\".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n\"\\n\"\n\".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n\".global idmap\\n\"\n\".align 12\\n\"\n\"idmap:\\n\"\n\"\\t/* level 1 */\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n\"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n\"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```ld\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/*\\n\"\n\" * Code will start running at this symbol which is placed at the start of \"\n\"the\\n\"\n\" * image.\\n\"\n\" */\\n\"\n\"ENTRY(entry)\\n\"\n\"\\n\"\n\"MEMORY\\n\"\n\"{\\n\"\n\"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n\"}\\n\"\n\"\\n\"\n\"SECTIONS\\n\"\n\"{\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the code.\\n\"\n\"\\t */\\n\"\n\"\\t.init : ALIGN(4096) {\\n\"\n\"\\t\\ttext_begin = .;\\n\"\n\"\\t\\t*(.init.entry)\\n\"\n\"\\t\\t*(.init.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.text : {\\n\"\n\"\\t\\t*(.text.*)\\n\"\n\"\\t} >image\\n\"\n\"\\ttext_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together read-only data.\\n\"\n\"\\t */\\n\"\n\"\\t.rodata : ALIGN(4096) {\\n\"\n\"\\t\\trodata_begin = .;\\n\"\n\"\\t\\t*(.rodata.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.got : {\\n\"\n\"\\t\\t*(.got)\\n\"\n\"\\t} >image\\n\"\n\"\\trodata_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the read-write data including .bss at the end which\\n\"\n\"\\t * will be zero'd by the entry code.\\n\"\n\"\\t */\\n\"\n\"\\t.data : ALIGN(4096) {\\n\"\n\"\\t\\tdata_begin = .;\\n\"\n\"\\t\\t*(.data.*)\\n\"\n\"\\t\\t/*\\n\"\n\"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n\"\\t\\t * bytes long.\\n\"\n\"\\t\\t */\\n\"\n\"\\t\\t. = ALIGN(32);\\n\"\n\"\\t\\tdata_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n\"\\tbin_end = .;\\n\"\n\"\\n\"\n\"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n\"\\t.bss : ALIGN(16)  {\\n\"\n\"\\t\\tbss_begin = .;\\n\"\n\"\\t\\t*(.bss.*)\\n\"\n\"\\t\\t*(COMMON)\\n\"\n\"\\t\\t. = ALIGN(16);\\n\"\n\"\\t\\tbss_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n\"\\t\\tboot_stack_begin = .;\\n\"\n\"\\t\\t. += 40 * 4096;\\n\"\n\"\\t\\t. = ALIGN(4096);\\n\"\n\"\\t\\tboot_stack_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t. = ALIGN(4K);\\n\"\n\"\\tPROVIDE(dma_region = .);\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Remove unused sections from the image.\\n\"\n\"\\t */\\n\"\n\"\\t/DISCARD/ : {\\n\"\n\"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n\"\\t\\t*(.gnu.hash)\\n\"\n\"\\t\\t*(.hash)\\n\"\n\"\\t\\t*(.interp)\\n\"\n\"\\t\\t*(.eh_frame_hdr)\\n\"\n\"\\t\\t*(.eh_frame)\\n\"\n\"\\t\\t*(.note.gnu.build-id)\\n\"\n\"\\t}\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"# Copyright 2023 Google LLC\"\nmsgstr \"# Copyright 2023 Google LLC\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"$(shell uname -s)\"\nmsgstr \"$(shell uname -s)\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"aarch64-linux-gnu\"\nmsgstr \"aarch64-linux-gnu\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"stdio -display none -kernel $< -s\"\nmsgstr \"stdio -display none -kernel $< -s\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"cargo clean\"\nmsgstr \"cargo clean\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rå jern Rust eftermiddag\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([tilbage til øvelsen](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_pl031.rs_:\"\nmsgstr \"`pl031.rs`:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Velkommen til Concurrency i Rust\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Tråde (eng: _threads_) i Rust virker på samme måde som i andre sprog:\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Tæller i tråden: {i}!\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Hovedtråden: {i}\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\"Tråde er alle dæmontråde (eng: _daemon threads_), hvilket vil sige at \"\n\"hovedtråden ikke venter på dem.\"\n\n#: src/concurrency/threads.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Hver tråd kan gå i panik uafhængigt af andre tråde.\"\n\n#: src/concurrency/threads.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"En panik kan have en nyttelast som kan udpakkes med `downcast_ref`.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Notice that the thread is stopped before it reaches 10 --- the main thread \"\n\"is not waiting.\"\nmsgstr \"Bemærk at tråden stopper før den når 10 --- hovedtråden venter ikke.\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish.\"\nmsgstr \"\"\n\"Brug `let handle = thread::spawn(...)` og senere `handle.join()` for at \"\n\"vente på at tråden afsluttes.\"\n\n#: src/concurrency/threads.md\nmsgid \"Trigger a panic in the thread, notice how this doesn't affect `main`.\"\nmsgstr \"Skab en panik i tråden, bemærk hvordan dette ikke påvirker `main`.\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"panic payload. This is a good time to talk about [`Any`](https://doc.rust-\"\n\"lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Bruge `Result`\\\\-returværdien fra  `handle.join()` til at få adgang til \"\n\"panikkens nyttelast. Dette er et godt tidspunkt til at snakke om [`Any`]\"\n\"(https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Normale tråde kan ikke låne fra deres omgivelser:\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Du kan dog bruge en [tråd med virkefelt (eng: _scoped thread_)](https://doc.\"\n\"rust-lang.org/std/thread/fn.scope.html) for at opnå dette:\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"Grunden er, at `thread::scope`\\\\-funktionen garanterer at alle trådene er \"\n\"blevet forenet med hovedtråden når kaldet afsluttet. De vil således \"\n\"returnere det lånte data.\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"De normale låneregler for Rust gælder: du kan enten lade én tråd låne data \"\n\"for at ændre på det, eller du kan lade flere tråde låne data uden at ændre \"\n\"på det.\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Modtaget: {:?}\\\"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Besked {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: sendte Besked {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: færdig\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Hovedtråden: modtog {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` kan hjælpe.\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Sokrates\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Plato\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristoteles\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Link Checker\"\nmsgstr \"Linktjekker\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([tilbage til øvelsen](link-checker.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"Async Rust\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"IO-fejl: {e}\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"Futures Control Flow\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"[Join](control-flow/join.md)\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"[Select](control-flow/select.md)\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"Kunne ikke sende katten.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"Kunne ikke sende hunden.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"Kunne ikke modtage vinderen\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"Vinderen er {winner:?}\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"Faldgruber ved async/await\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"[Pin](pitfalls/pin.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are not yet supported in the stable channel ([An \"\n\"experimental feature exists in nightly and should be stabilized in the mid \"\n\"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n\"nightly.html))\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"provides a workaround through a macro:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Filosoffer omkring spisebordet\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"Afvikling af binære filer\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// Add a delay before picking the second fork to allow the execution\\n\"\n\"        // to transfer to another task\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"            // somewhere. This will swap the forks without deinitializing\\n\"\n\"            // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([tilbage til øvelsen](chat-app.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Tak for at tage Comprehensive Rust 🦀!_ Vi håber du har nydt det og at det \"\n\"har været hjælpsomt.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 3 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Andre Rust-resourcer\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"Officiel dokumentation\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Rust-projektet huser mange ressourcer. Disse dækker Rust generelt:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): en gratis \"\n\"bog om Rust. Dækker sproget detaljeret og indeholder et par projekter du kan \"\n\"bygge.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): dækker \"\n\"syntaksen i Rust via en række eksempler som viser de forskellige \"\n\"konstruktioner. Der er sommetider små opgaver hvor du bliver bedt om at \"\n\"udvide koden i eksemplerne.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): fuld dokumentation \"\n\"af standardbiblioteket for Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): en ufuldstændig \"\n\"bog som beskriver grammatikken og en hukommelsesmodel for Rust.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Mere specialiserede guider huset på den officielle Rust side:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): dækker unsafe Rust, \"\n\"inklusiv det at arbejde med rå pointere og at kommunikere med andre sprog \"\n\"(FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"dækker den nye asynkrone programmeringsmodel som blev introduceret efter at \"\n\"Rustbogen blev skrevet.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"en introduktion til at bruge Rust på indlejrede enheder uden et \"\n\"operativsystem.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Uofficielt læremateriale\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Et lille udvalg af andre guides for Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust på Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#, fuzzy\n#~ msgid \"Impl Trait\"\n#~ msgstr \"`impl Trait`\"\n\n#, fuzzy\n#~ msgid \"Move semantics\"\n#~ msgstr \"Overførselssemantik\"\n\n#, fuzzy\n#~ msgid \"IntoIterator\"\n#~ msgstr \"`IntoIterator`\"\n\n#, fuzzy\n#~ msgid \"Try operator\"\n#~ msgstr \"Egenskab\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"aarch64-paging\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"spin\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send og Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"async/await\"\n#~ msgstr \"async/await\"\n\n#~ msgid \"Pin\"\n#~ msgstr \"Pin\"\n\n#, fuzzy\n#~ msgid \"For example:\"\n#~ msgstr \"C-eksempel\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - -.\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \":    \"\n#~ \"list                 :     :                                             :\\n\"\n#~ \":   +----+----+           :     :    +----+----+    +----+------\"\n#~ \"+             :\\n\"\n#~ \":   | 1  | o--+-----------+-----+--->| 2  | o--+--->| // | null \"\n#~ \"|             :\\n\"\n#~ \":   +----+----+           :     :    +----+----+    +----+------\"\n#~ \"+             :\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \"`- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stak                            Heap\\n\"\n#~ \".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - -.\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \":    \"\n#~ \"list                 :     :                                             :\\n\"\n#~ \":   +----+----+           :     :    +----+----+    +----+------\"\n#~ \"+             :\\n\"\n#~ \":   | 1  | o--+-----------+-----+--->| 2  | o--+--->| // | null \"\n#~ \"|             :\\n\"\n#~ \":   +----+----+           :     :    +----+----+    +----+------\"\n#~ \"+             :\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \":                         :     :                                             :\\n\"\n#~ \"`- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` og `RefCell`\"\n\n#~ msgid \"Lifetimes\"\n#~ msgstr \"Livstider\"\n\n#, fuzzy\n#~ msgid \"\\\"name: {}\\\"\"\n#~ msgstr \"\\\"nyt areal: {}\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"id: {}\\\"\"\n#~ msgstr \"\\\"int: {}\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"  number: {}\\\"\"\n#~ msgstr \"\\\"{numbers:?}\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"  type: {}\\\"\"\n#~ msgstr \"\\\"int: {}\\\"\"\n\n#~ msgid \"\\\"127.0.0.1:6142\\\"\"\n#~ msgstr \"\\\"127.0.0.1:6142\\\"\"\n"
  },
  {
    "path": "po/de.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2025-01-11T19:48:31+01:00\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\n\"\n\"Language: de\\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\"X-Generator: Poedit 3.5\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Willkommen bei Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Ablauf des Kurses\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Kursstruktur\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Tastaturkürzel\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Übersetzungen\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Cargo verwenden\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Das Rust Ökosystem\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Codebeispiele\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Cargo lokal ausführen\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Tag 1: Vormittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-2.md src/welcome-day-3.md src/welcome-day-4.md\n#: src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Willkommen\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Hallo Welt!\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Was ist Rust?\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Vorteile von Rust\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Testumgebung\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Datentypen und Wertebereiche\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variablen\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Wertebereiche\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Arithmetik\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Typinferenz\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Übung: Fibonacci Reihe\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md src/std-traits/solution.md\n#: src/memory-management/solution.md src/smart-pointers/solution.md\n#: src/borrowing/solution.md src/lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Lösungen\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Kontrollfluss\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"`if` Anweisungen\"\n\n#: src/SUMMARY.md src/control-flow-basics/match.md\nmsgid \"`match` Expressions\"\nmsgstr \"`Match` Anweisungen\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Schleifen\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for` Schleifen\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop` Schleifen\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` und `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Bezeichner\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Blöcke und Gültigkeitsbereiche\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Gültigkeitsbereiche und Verschattungen\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funktionen\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Makros\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Übung: Die Collatz Sequenz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Tag 1: Nachmittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Tuples und Datenfelder\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Datenfelder(Arrays)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Tupel\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Iteration über Datenfelder\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Muster und Zerlegung\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Übung: Verschachtelte Datenfelder\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"Referenzen\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Geteilte Referenzen\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Exklusive Referenzen\"\n\n#: src/SUMMARY.md src/references.md src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Anteilstypen\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Zeichenketten(Strings)\"\n\n#: src/SUMMARY.md src/references.md src/references/dangling.md\n#, fuzzy\nmsgid \"Reference Validity\"\nmsgstr \"Referenzen\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Übung: Geometrie\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Benutzerdefinierte Datentypen\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Strukturen\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Tupelstrukturen\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Aufzählungstypen(Enums)\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Konstanten\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#, fuzzy\nmsgid \"Static\"\nmsgstr \"`static`\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Tag 2: Vormittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Mustervergleich\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Wertevergleich\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"Strukturen auflösen\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Aufzählungstypen auflösen\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Flusskontrolle mit `Let`\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Übung: Untersuchung von Ausdrücken\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Methoden und Merkmale\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Methoden\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Merkmale(Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Implementierung von Merkmalen\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"gekoppelte Merkmale (Supertraits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Datentypen von Merkmalen (Associated Types)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"Ableitung von Merkmalen\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Übung: Allgemeiner Datenlogger\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Tag 2: Nachmittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Generische Datentypen und Methoden\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Generische Funktionen\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Generische Datentypen\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Generische Methoden\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Merkmalsgrenzen\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"\"\n\"Merkmal `impl\\n\"\n\"`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"\"\n\"Merkmal `dyn\\n\"\n\"`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\"Übung: Allgemeine '\\n\"\n\"min' Funktion\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Standardbibliothek Datentypen\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Standardbibliothek\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Dokumentation\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\n#, fuzzy\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Übung: Zähler\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Standardbibliothek von Merkmalen\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Vergleiche\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Operatoren\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` und `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Datentypen festlegen (Casting)\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` und `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"Der `Default`, Struktur syntax\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Anonyme Funktionen (closures)\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Übung: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Tag 3: Vormittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-3.md\n#: src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Speicherverwaltung\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Überprüfung des Programmspeichers\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Ansätze zur Speicherverwaltung\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Eigentümerschaft\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Semantik des Verschiebens\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Verbundtypen\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Übung: Datentypen erzeugen\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-3.md\n#: src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"erweiterter Zeigertyp (Smart pointer)\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"`Kasten`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Aneignung von Merkmalsobjekten\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Übung: Binärer Baum\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Tag 3: Nachmittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Ausborgen\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Ausborgen von Werten\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Ausborgen - Überprüfung\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Ausborgen - Fehler\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"Interior Mutability\"\nmsgstr \"Interoperabilität\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Übung: Gesundheitsstatistiken\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Lebensdauer\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Lebensdauern in Funktionsaufrufen\"\n\n#: src/SUMMARY.md src/lifetimes.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Lebensdauern\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Lebensdauer von Strukturen\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Übung: Protobuf Analyse\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Tag 4: Vormittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md\n#: src/iterators.md\n#, fuzzy\nmsgid \"Iterators\"\nmsgstr \"Iteratoren\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Motivation\"\nmsgstr \"Motivation\"\n\n#: src/SUMMARY.md src/iterators/iterator.md\nmsgid \"`Iterator` Trait\"\nmsgstr \"`Iterator` Merkmale\"\n\n#: src/SUMMARY.md src/iterators/helpers.md\nmsgid \"`Iterator` Helper Methods\"\nmsgstr \"`Iterator` Hilfsmethoden\"\n\n#: src/SUMMARY.md src/iterators/collect.md\nmsgid \"`collect`\"\nmsgstr \"`collect`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Übung: Anwendung verschiedener Iteratormethoden\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md\n#: src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Module\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Dateisystemhierarchie\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Sichtbarkeit\"\n\n#: src/SUMMARY.md src/modules.md\nmsgid \"Encapsulation\"\nmsgstr \"Verkapselung\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Übung: Module für eine GUI Bibliothek\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md src/welcome-day-4.md\n#: src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Tests\"\n\n#: src/SUMMARY.md src/testing.md src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Unit-Tests\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Andere Testmöglichkeiten\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Compiler Lints und Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Luhn-Algorithmus\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Tag 4: Nachmittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Fehlerbehandlung\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Laufzeitabbrüche\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"`Try Operator\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"`Try` Konvertierungen\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Èrror` Merkmal\"\n\n#: src/SUMMARY.md src/error-handling/thiserror.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/SUMMARY.md src/error-handling/anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Übung: Fehlerbehandlung mit `Result`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Unsicheres Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"Unsicherheit\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Roh-zeiger dereferenzieren\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Veränderbare statische Variablen\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Vereinigungen\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Unsichere Funktionen aufrufen\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Unsichere Merkmale implementieren\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Übung: Ein FFI-Wrapper\"\n\n#: src/SUMMARY.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Einrichtung\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Regeln zum Erstellen\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Binärdatei\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Bibliothek\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Tutorial: Geburtstagsdienst\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Schnittstelle\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"Service API\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Dienst\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Server\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Verteilen\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Klient\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"API verändern\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Aktualsierung von Implementierungen\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"AIDL Typen\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Einfache Datentypen\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Array Types\"\nmsgstr \"Arrays\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"Sending Objects\"\nmsgstr \"Merkmalsobjekte\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"Variablen\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Dateien versenden\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"Google Test\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Protokollierung\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interoperabilität\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Mit C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Aufruf von C-Funktionen mit Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Aufruf von Rust aus C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Mit C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Das Verbindungsmodul (bridge)\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Verbindungen mit Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"C++ Generierung\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"Verbindungen mit C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Gemeinsame Datentypen\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Gemeinsam genutzte Aufzählungstypen (Enums)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Fehlerbehandlung in Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Fehlerbehandlung in C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Zusätzliche Datentypen\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Programmierung für Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Programmierung für Android: Allgemeine Regeln\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Programmierung für Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Mit Java\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Vergleich zwischen Chromium und dem Cargo Ökosystem\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Vorgaben\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Unsicherer Programmcode\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Abhängigkeit des Rust Codes vom Chromium C++\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Übung\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` Bibliothek\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"GN Regeln für Rust Tests\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` Macro\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperabilität mit C++\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Beispiele\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Die Grenzen von CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Fehlerbehandlung in CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Fehlerbehandlung: QR Beispiel\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Fehlerbehandlung: PNG Beispiel\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Die Benutzung von CXX in Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Hinzufügen von externen Kisten\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Konfiguration von Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Konfiguration von `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Herunterladen von Kisten (crates)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Erzeugung von `gn` Bauvorschriften\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Probleme auflösen\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Bauanleitungen, welche Programmcode erzeugen\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"Bauanleitungen, welche C++ erzeugen oder spezielle Aktionen auslösen\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Abhängigkeit von Kisten\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Überprüfungen und Audits\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Quellcode in Chromium einbauen\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Kisten auf den aktuellen Stand halten\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Zusammenfassung aller Einzelteile - Übung\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Lösungsvorschläge der Übungen\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Hardwarenahes Rust: Vormittags\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Kleines Beispiel\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Mikrokontroller\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"Direktes MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PACs\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Kisten\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Helfer Kisten\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Das Typzustandsmuster\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` und `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Debugging\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Andere Projekte\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Übungen\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Kompass\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Lösungen\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare-Metal: Nachmittags\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Applikationsprozessoren\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Los gehts mit Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Inline Assembler\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Schreiben eines UART Treibers\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Noch mehr Merkmale\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Benutzung\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Ein besserer UART Treiber\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Mehrere Register\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Treiber\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Ausnahmen\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Nützliche Kisten\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Bare-Metal on Android\"\nmsgstr \"Hardwarenahes Rust auf Android\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC Treiber\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Parallelität: Vormittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Abläufe\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Geradlinige Abläufe\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Ausführungsstrang mit Sichtbarkeitsbereich\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Kanäle\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Sender und Empfänger\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Unbegrenzte Kanäle\"\n\n#: src/SUMMARY.md src/concurrency/channels.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Unbeschränkte Kanäle\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` und `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"Marker Merkmale\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Beispiele\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Geteilter Zustand\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Beispiel\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Philosophenproblem\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Link Überprüfung mit mehreren Ausführungssträngen\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Parallelität: Nachmittags\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Grundlagen asynchroner Programmabläufe\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"Futures\"\nmsgstr \"Schließungen\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Laufzeiten\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Aufgaben\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Kanäle und Kontrollfluss\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Asynchrone Kanäle\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Tücken\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Blockieren des Ausführers\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Async Merkmale\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Programmabbruch\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Allgemeine Chat Anwendung\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Letzte Worte\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Danke!\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Glossary\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Andere Ressourcen\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Würdigungen\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/google/\"\n\"comprehensive-rust/build.yml?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [![GitHub \"\n\"contributors](https://img.shields.io/github/contributors/google/comprehensive-\"\n\"rust?style=flat-square)](https://github.com/google/comprehensive-rust/graphs/\"\n\"contributors) [![GitHub stars](https://img.shields.io/github/stars/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/comprehensive-\"\n\"rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/google/\"\n\"comprehensive-rust/build.yml?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [![GitHub \"\n\"contributors](https://img.shields.io/github/contributors/google/comprehensive-\"\n\"rust?style=flat-square)](https://github.com/google/comprehensive-rust/graphs/\"\n\"contributors) [![GitHub stars](https://img.shields.io/github/stars/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/comprehensive-\"\n\"rust/stargazers)\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The course \"\n\"covers the full spectrum of Rust, from basic syntax to advanced topics like \"\n\"generics and error handling.\"\nmsgstr \"\"\n\"Dies ist ein dreitägiger Rust-Kurs, der vom Android-Team entwickelt wurde. Der \"\n\"Kurs umfasst das gesamte Spektrum von Rust, von grundlegender Syntax bis hin zu \"\n\"fortgeschrittenen Themen wie generischen Methoden und Datentypen sowie \"\n\"Fehlerbehandlung. Am letzten Tag werden auch Android-spezifische Inhalte \"\n\"behandelt.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there for \"\n\"updates.\"\nmsgstr \"\"\n\"Die neueste Version des Kurses ist unter <https://google.github.io/\"\n\"comprehensive-rust/> zu finden. Wenn Sie diesen auf anderen Seiten lesen, \"\n\"prüfen sie dort bitte auf Aktualisierungen.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language in \"\n\"the top right corner of the page or check the [Translations](running-the-course/\"\n\"translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"Dieser Kurs ist in anderen Sprachen verfügbar. Wählen Sie ihre bevorzugte \"\n\"Sprache in der rechten oberen Ecke der Seite aus oder gehen Sie auf die \"\n\"[Übersetzungen](running-the-course/translations.md) Seite um eine Liste der \"\n\"verfügbaren Sprachen zu erhalten.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"Der Kurs ist auch als PDF (comprehensive-rust.pdf) verfügbar.\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know anything \"\n\"about Rust and hope to:\"\nmsgstr \"\"\n\"Das Ziel des Kurses ist es, Dir Rust beizubringen. Wie setzen keine \"\n\"Vorkenntnisse über Rust voraus, und hoffen das Folgende zu erreichen:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\"Dir ein umfassendes Verständnis der Rust-Syntax und -Sprache zu vermitteln.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Es dir ermöglichen, bestehende Programme zu modifizieren und neue Programme in \"\n\"Rust zu schreiben.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Dir gängige Rust-Idiome zu zeigen.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\"In den ersten vier Tagen des Kurses werden die Rust Grundlagen vermittelt.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Aufbauend darauf, laden wir dich ein sich mit einem oder mehreren Spezialthemen \"\n\"zu befassen:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): ein halbtägiger Kurs zur Verwendung von Rust für die \"\n\"Android-Plattform Entwicklung (AOSP). Dazu gehört die Interoperabilität mit C, \"\n\"C++ und Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium based \"\n\"browsers. This includes interoperability with C++ and how to include third-\"\n\"party crates in Chromium.\"\nmsgstr \"\"\n\"[Android](android.md): ein halbtägiger Kurs zur Verwendung von Rust in Chromium \"\n\"basierenden Browsern. Dazu gehört die Interoperabilität mit C++ und wie man \"\n\"Drittanbieter Kisten in Chromium einbindet.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-Metal](bare-metal.md): ein ganztägiger Kurs über die Verwendung von Rust \"\n\"für die Hardwarenahe Entwicklung (Embedded System). Sowohl Mikrocontroller als \"\n\"auch Anwendungen werden behandelt.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in \"\n\"Rust. We cover both classical concurrency (preemptively scheduling using \"\n\"threads and mutexes) and async/await concurrency (cooperative multitasking \"\n\"using futures).\"\nmsgstr \"\"\n\"[Parallelität](concurrency/welcome.md): ein ganztägiger Kurs zum Thema \"\n\"Parallelität in Rust. Wir decken sowohl die klassische Parallelität ab \"\n\"(präventive Planung mit Hilfe von Threads als auch Mutexes) und Async/Await-\"\n\"Parallelität (kooperatives Multitasking mit Futures).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Nicht-Ziele\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few days. \"\n\"Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust ist eine große Sprache und wir werden sie in ein paar Tagen nicht \"\n\"vollständig abdecken können. Einige Nicht-Ziele dieses Kurses sind:\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Um zu erfahren, wie Du Makros entwickelst, siehe [Kapitel 19.5 im Rust Buch]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) und [Rust im Beispiel]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Annahmen\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a statically-\"\n\"typed language and we will sometimes make comparisons with C and C++ to better \"\n\"explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Der Kurs setzt voraus, dass du bereits Programmierkenntnisse besitzt. Rust ist \"\n\"eine statisch geschriebene Sprache und wir werden manchmal Vergleiche mit C und \"\n\"C++ machen, um besser den Rust-Ansatz zu erklären oder gegenüberzustellen.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Aber auch wenn du Vorwissen in einer dynamisch geschriebenen Sprache wie Python \"\n\"oder JavaScript hast, wirst du problemlos folgen können.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor should \"\n\"cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Dies ist ein Beispiel für eine _Sprechernotiz_, welche wir verwenden, um \"\n\"weitere Informationen zu den Folien hinzuzufügen. Sprechernotizen können \"\n\"wichtige Punkte beinhalten, die vom Kursleiter erwähnt werden sollten, oder \"\n\"auch Antworten auf Fragen, die typischerweise im Kurs vorkommen.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Diese Seite ist für den Kursleiter.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the course \"\n\"internally at Google.\"\nmsgstr \"\"\n\"Hier ein paar Hintergrundinformationen darüber, wie wir den Kurs intern bei \"\n\"Google durchführen.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break in \"\n\"the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students to \"\n\"work on exercises.\"\nmsgstr \"\"\n\"Der Unterricht findet typischerweise von 9 Uhr bis 16 Uhr, mit einer Stunde \"\n\"Mittagspause, statt. Damit haben wir vormittags drei Stunden Unterricht und \"\n\"auch nachmittags drei Stunden. In beiden Einheiten gibt es mehrere Pausen und \"\n\"genügend Zeit für die Studenten, um an den Übungen zu arbeiten.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Bevor du den Kurs anfängst solltest du:\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker notes \"\n\"to help highlight the key points (please help us by contributing more speaker \"\n\"notes!). When presenting, you should make sure to open the speaker notes in a \"\n\"popup (click the link with a little arrow next to \\\"Speaker Notes\\\"). This way \"\n\"you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Setze dich mit dem Kursmaterial auseinander. Wir haben Sprechernotizen \"\n\"hinzugefügt, um Schlüsselpunkte hervorzuheben (gerne kannst du uns helfen \"\n\"weitere Sprechernotizen hinzuzufügen!). Beim Vorstellen kannst du die \"\n\"Sprechernotizen in einem Seitenfenster öffnen (klick dazu auf den kleinen Pfeil \"\n\"neben \\\"Speaker Notes\\\"). Dadurch hast du eine übersichtliche Oberfläche wenn \"\n\"du den Kurs vorstellst.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they find \"\n\"it helpful to have a gap in the course since it helps them process all the \"\n\"information we give them.\"\nmsgstr \"\"\n\"Lege im Vorhinein die Kurszeiten fest. Der Kurs ist umfangreich, daher \"\n\"empfehlen wir vier Tage in einem Zeitraum von zwei Wochen. Kursteilnehmer \"\n\"meinten, dass Pausen zwischen den Tagen sinnvoll seien um die Menge an \"\n\"Informationen zu verarbeiten.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a class \"\n\"size of 15-25 people. That's small enough that people are comfortable asking \"\n\"questions --- it's also small enough that one instructor will have time to \"\n\"answer the questions. Make sure the room has _desks_ for yourself and for the \"\n\"students: you will all need to be able to sit and work with your laptops. In \"\n\"particular, you will be doing a lot of live-coding as an instructor, so a \"\n\"lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Finde einen Raum der groß genug für alle anwesenden Teilnehmer ist. Wir \"\n\"empfehlen eine Teilnehmeranzahl von 15 bis 20 Leuten. Das schafft ein gutes \"\n\"Klima, um Fragen zu stellen, und es ist möglich alle Fragen zeitnah zu \"\n\"beantworten. Stelle auch sicher, dass der Raum _Tische_ mit Stühlen für die \"\n\"Teilnehmer und dich hat. Ihr werdet nämlich eure Laptops benötigen. Um genau zu \"\n\"sein wirst du viel vorprogrammieren.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things up. \"\n\"We recommend presenting directly using `mdbook serve` running on your laptop \"\n\"(see the [installation instructions](https://github.com/google/comprehensive-\"\n\"rust#building)). This ensures optimal performance with no lag as you change \"\n\"pages. Using your laptop will also allow you to fix typos as you or the course \"\n\"participants spot them.\"\nmsgstr \"\"\n\"Sei schon etwas vor dem ersten Termin da, um alles vorzubereiten. Wir schlagen \"\n\"vor, dass du direkt mit `mdbook serve` präsentierst (siehe \"\n\"[Installationsanleitung](https://github.com/google/comprehensive-\"\n\"rust#building)). Somit entstehen keine Störungen oder Unklarheiten bei dem \"\n\"Wechseln von Seiten und falls du oder die Teilnehmer Rechtschreibfehler finden \"\n\"können diese sofort behoben werden.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We typically \"\n\"spend 30-45 minutes on exercises in the morning and in the afternoon (including \"\n\"time to review the solutions). Make sure to ask people if they're stuck or if \"\n\"there is anything you can help with. When you see that several people have the \"\n\"same problem, call it out to the class and offer a solution, e.g., by showing \"\n\"people where to find the relevant information in the standard library.\"\nmsgstr \"\"\n\"Gib den Kursteilnehmern Zeit die Aufgaben selbst oder in kleinen Gruppen zu \"\n\"lösen. Eine Übung vormittags und nachmittags sollte typischerweise jeweils \"\n\"30-45 Minuten dauern (inklusive der Zeit für die Besprechung der Lösungen). \"\n\"Vergiss nicht ab und an zu fragen ob jemand Hilfe benötigt. Wenn mehrere \"\n\"Teilnehmer das gleiche Problem haben, spreche es vor allen Teilnehmern an und \"\n\"zeige einen möglichen Lösungsweg auf. Z. B. könntest du zeigen wo man die \"\n\"relevante Information in der Standardbibliothek findet.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun for \"\n\"you as it has been for us!\"\nmsgstr \"\"\n\"Das ist alles, viel Glück bei der Durchführung des Kurses! Wir hoffen, dass es \"\n\"dir genauso viel Spaß machen wird wie uns!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We would \"\n\"love to hear what worked well for you and what can be made better. Your \"\n\"students are also very welcome to [send us feedback](https://github.com/google/\"\n\"comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Bitte gib uns anschließend eine [Rückmeldung](https://github.com/google/\"\n\"comprehensive-rust/discussions/86), damit wir den Kurs weiter verbessern \"\n\"können. Was uns besonders interessieren würde ist, was gut funktioniert hat, \"\n\"aber auch was wir verbessern könnten. Deine Teilnehmer sind natürlich auch \"\n\"herzlich eingeladen, uns eine [Rückmeldung](https://github.com/google/\"\n\"comprehensive-rust/discussions/100) zu geben!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust Grundlagen\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The days \"\n\"are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"An den ersten vier Tagen werden wir die [Rust Grundlagen](../welcome-day-1.md) \"\n\"behandeln. Das Tempo wird während dieser Zeit hoch sein und wir werden auf sehr \"\n\"viel eingehen und vorstellen.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Kurs Zeitplan:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Tag 1 Vormittag (zwei Stunden und 10 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"Segment\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md src/welcome-day-3-afternoon.md\n#: src/borrowing.md src/lifetimes.md src/welcome-day-4.md src/iterators.md\n#: src/modules.md src/testing.md src/welcome-day-4-afternoon.md\n#: src/error-handling.md src/unsafe-rust.md src/concurrency/welcome.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-pitfalls.md src/concurrency/async-exercises.md\nmsgid \"Duration\"\nmsgstr \"Dauer\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"5 Minuten\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"15 Minuten\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\nmsgid \"40 minutes\"\nmsgstr \"40 Minuten\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"45 Minuten\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"Tag 1 Nachmittag (zwei Stunden 35 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"35 Minuten\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"55 Minuten\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"50 Minuten\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours, including breaks)\"\nmsgstr \"Tag 2 Vormittag (zwei Stunden, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/welcome-day-2.md src/methods-and-traits.md\n#: src/std-types.md src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"3 Minuten\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"Tag 2 Nachmittag ( drei Stunden und 15 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3.md\nmsgid \"1 hour\"\nmsgstr \"eine Stunde\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"eine Stunde und 10 Minuten\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"Tag 3 Vormittag (zwei Stunden und 20 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"Tag 3 Nachmittag (eine Stunde und 55 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"Tag 4 Vormittag (zwei Stunden und 50 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Tag 4 Nachmittag (zwei Stunden und 10 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"eine Stunde und 5 Minuten\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Vertiefungen\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Zusätzlich zu den vier-tägigen Rust-Grundlagen Kurs behandeln wir noch einiges \"\n\"mehr Spezialthemen nach Tag 3:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust in Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with C, C+\"\n\"+, and Java.\"\nmsgstr \"\"\n\"Der [Android - Vertiefung](../android.md) ist ein halbtägiger Kurs zur \"\n\"Verwendung von Rust für die Entwicklung der Android-Plattform. Dazu gehört die \"\n\"Interoperabilität mit C, C++ und Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/download/\"\n\"downloading). Make a checkout of the [course repository](https://github.com/\"\n\"google/comprehensive-rust) on the same machine and move the `src/android/` \"\n\"directory into the root of your AOSP checkout. This will ensure that the \"\n\"Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Du wirst eine lokale Arbeitskopie von [AOSP](https://source.android.com/docs/\"\n\"setup/download/downloading) benötigen. Mache dir eine Arbeitskopie des [Kurses]\"\n\"(https://github.com/google/comprehensive-rust) auf deinem Laptop und verschiebe \"\n\"das Verzeichnis `src/android/` in das Stammverzeichnis Deiner AOSP \"\n\"Arbeitskopie. Dadurch wird sichergestellt, dass das Android-Buildsystem die \"\n\"`Android.bp`\\\\-Dateien in `src/android/` sehen kann.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to see \"\n\"the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Stelle sicher, dass `adb sync` auf deinem Emulator oder Rechner funktioniert. \"\n\"Erstelle bereits vor dem Kurs alle Android-Beispiele mit `src/android/build_all.\"\n\"sh`. Schaue auch in das Skript rein und probiere aus, ob alle Befehle, die es \"\n\"ausführt auch von Hand ausgeführt funktionieren.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust im Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on using \"\n\"Rust as part of the Chromium browser. It includes using Rust in Chromium's `gn` \"\n\"build system, bringing in third-party libraries (\\\"crates\\\") and C++ \"\n\"interoperability.\"\nmsgstr \"\"\n\"Der [Rust in Chromium] (../chromium.md) ist ein halbtägiger Kurs zur Verwendung \"\n\"von Rust als Teil des Chromium Browsers. Dazu gehört die Interoperabilität mit \"\n\"C++, die Rust Benutzung mit dem Chromiums `gn` Kompiler System und das \"\n\"Einbinden von Drittanbieter Bibliotheken (\\\"crates\\\").\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. Ensure \"\n\"that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Du solltest in der Lage sein, Chromium kompilieren zu können --- eine Debug- \"\n\"oder Komponentenversion wird [Empfehlung] [recommended](../chromium/setup.md) \"\n\"wird aus Geschwindigkeitsaspekten empfohlen, ist jedoch nicht zwingend \"\n\"erforderlich. Wichtig ist nur, dass die erstellte Version von Chromium auch \"\n\"gestartet werden kann.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Hardwarenahes Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on using \"\n\"Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"Der [Hardwarenahes Programmieren - Vertiefung](../bare-metal.md): ein \"\n\"ganztägiger Kurs über die Verwendung von Rust für die Hardwarenahe-Entwicklung \"\n\"(Embedded Lösungen). Sowohl Mikrocontroller als auch Anwendungen werden \"\n\"behandelt.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit](https://\"\n\"microbit.org/) v2 development board ahead of time. Everybody will need to \"\n\"install a number of packages as described on the [welcome page](../bare-metal.\"\n\"md).\"\nmsgstr \"\"\n\"Für den Mikrocontroller-Teil solltest Du das [BBC micro:bit](https://microbit.\"\n\"org/) v2-Entwicklungsboard im Voraus kaufen. Alle müssen eine Reihe von Paketen \"\n\"installieren, wie auf der [Willkommens Seite](../bare-metal.md) beschrieben.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Parallelität in Rust 🦀\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day \"\n\"class on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"Der [Parallelität - Vertiefung](../concurrency/welcome.md) ist ein ganztägiger \"\n\"Kurs mit dem klassischen Ansatz sowie der „async“/„await“-Parallelität.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready to \"\n\"go. You can then copy/paste the examples into `src/main.rs` to experiment with \"\n\"them:\"\nmsgstr \"\"\n\"Du solltest eine neue Kiste (crate) einrichten und die Abhängigkeiten \"\n\"(dependencies) herunterladen und einsatzbereit machen. Anschließend kannst Du \"\n\"die Beispiele kopieren und in `src/main.rs` einfügen, um damit zu \"\n\"experimentieren:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Vormittag (drei Stunden und 20 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md src/std-traits.md\n#: src/smart-pointers.md src/lifetimes.md src/iterators.md src/testing.md\n#: src/unsafe-rust.md src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"30 Minuten\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/methods-and-traits.md src/std-types.md src/memory-management.md\n#: src/borrowing.md src/error-handling.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async-pitfalls.md src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"20 Minuten\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"Send und Sync\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Nachmittag (drei Stunden und 20 Minuten, inklusive Pausen)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Format\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Der Kurs soll sehr interaktiv ablaufen und wir empfehlen, durch Fragen die \"\n\"Erkundung von Rust voranzutreiben!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Es gibt mehrere nützliche Tastaturkürzel in mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"<kbd>Pfeiltaste-Links</kbd>: Zur vorherigen Seite navigieren.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"<kbd>Pfeiltaste-Rechts</kbd>: Zur nächsten Seite navigieren.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Ctrl + Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"\"\n\"<kbd>Ctrl + Enter</kbd>: Führe das Codebeispiel aus, das aktuell den Fokus hat.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"<kbd>s</kbd>: Suchleiste aktivieren.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Der Kurs wurde auch durch die Mithilfe von sehr hilfsbereiten Freiwilligen in \"\n\"andere Sprachen übersetzt:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) by \"\n\"[@rastringer](https://github.com/rastringer), [@hugojacob](https://github.com/\"\n\"hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and [@henrif75]\"\n\"(https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Brasilianisch Portugiesisch](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) durch [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), und \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) by \"\n\"[@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/wnghl), \"\n\"[@anlunx](https://github.com/anlunx), [@kongy](https://github.com/kongy), \"\n\"[@noahdragon](https://github.com/noahdragon), [@superwhd](https://github.com/\"\n\"superwhd), @SketchK, and [@nodmp](https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Chinesisch (Vereinfacht)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"durch [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, und [@nodmp](https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) by \"\n\"[@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Chinesisch (Traditionell)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"durch [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), und [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) and \"\n\"[@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) durch [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) und \"\n\"[@mehrad77](https://github.com/mehrad77).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/momotaro1105), \"\n\"[@HidenoriKobayashi](https://github.com/HidenoriKobayashi) and [@kantasv]\"\n\"(https://github.com/kantasv).\"\nmsgstr \"\"\n\"[Japanisch](https://google.github.io/comprehensive-rust/ja/) durch [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/momotaro1105), \"\n\"[@HidenoriKobayashi](https://github.com/HidenoriKobayashi) und [@kantasv]\"\n\"(https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Koreanisch](https://google.github.io/comprehensive-rust/ko/) durch [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), und [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid](https://\"\n\"github.com/deavid).\"\nmsgstr \"\"\n\"[Spanisch](https://google.github.io/comprehensive-rust/es/) durch [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-cpp]\"\n\"(https://github.com/git-user-cpp), [@yaremam](https://github.com/yaremam) and \"\n\"[@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[Ukrainisch](https://google.github.io/comprehensive-rust/uk/) durch [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/yaremam) \"\n\"und [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"Benutze die Sprachenauswahl oben rechts, um die Sprache zu wechseln.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Unvollständige Übersetzungen\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Es gibt noch eine Vielzahl an weiteren Sprachen, in die dieser Kurs gerade \"\n\"übersetzt wird. Wir listen hier einige der neuesten Aktualisierungen auf:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies](https://\"\n\"github.com/younies)\"\nmsgstr \"\"\n\"[Arabisch](https://google.github.io/comprehensive-rust/ar/) durch [@younies]\"\n\"(https://github.com/younies)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Bengalisch](https://google.github.io/comprehensive-rust/bn/) durch \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS](https://\"\n\"github.com/KookaS), [@vcaen](https://github.com/vcaen) and [@AdrienBaudemont]\"\n\"(https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Französisch](https://google.github.io/comprehensive-rust/fr/) durch [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) und \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn](https://\"\n\"github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Deutsch](https://google.github.io/comprehensive-rust/de/) durch [@Throvn]\"\n\"(https://github.com/Throvn), [@ronaldfw](https://github.com/ronaldfw) und \"\n\"[@kweber](https://github.com/DerWiesel206).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by [@henrythebuilder]\"\n\"(https://github.com/henrythebuilder) and [@detro](https://github.com/detro).\"\nmsgstr \"\"\n\"[Italienisch](https://google.github.io/comprehensive-rust/it/) durch \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) und [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\"Die vollständige Liste der Übersetzungen mit dem aktuellen Status ist ebenfalls \"\n\"entweder hier [Neueste Version](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) oder [synchronisiert mit dem aktuellen Kurs](https://\"\n\"google.github.io/comprehensive-rust/synced-translation-report.html) zu finden.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to get \"\n\"going. Translations are coordinated on the [issue tracker](https://github.com/\"\n\"google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Wenn du uns hierbei unterstützen möchtest, lies dir bitte [unsere Anweisungen]\"\n\"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) durch. \"\n\"Übersetzungen werden mit dem [Issue-Tracker](https://github.com/google/\"\n\"comprehensive-rust/issues/282) koordiniert.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.rust-\"\n\"lang.org/cargo/), the standard tool used in the Rust ecosystem to build and run \"\n\"Rust applications. Here we want to give a brief overview of what Cargo is and \"\n\"how it fits into the wider ecosystem and how it fits into this training.\"\nmsgstr \"\"\n\"Wenn du anfängst über Rust zu lesen, wirst du sehr bald [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), ein Standardwerkzeug, welches im Rust-Ökosystem \"\n\"verwendet wird, um Rust-Anwendungen zu erstellen und auszuführen, kennenlernen. \"\n\"Hier wollen wir einen kurzen Überblick geben, was Cargo ist und wie es in das \"\n\"breitere Ökosystem und in dieses Training passt.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Installation\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Bitte folgt den Anweisungen auf <https://rustup.rs/>.**\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can use \"\n\"to install to different compiler versions.\"\nmsgstr \"\"\n\"Neben cargo und rustc installiert sich rustup selbst als Befehlszeilenprogramm, \"\n\"mit welchem du Toolchains installieren/wechseln, oder cross-Kompilierung \"\n\"einrichten kannst.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-analyzer.\"\n\"github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-analyzer.\"\n\"github.io/manual.html#vimneovim), and many others. There is also a different \"\n\"IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this gets \"\n\"you an outdated Rust version and may lead to unexpected behavior. The command \"\n\"would be:\"\nmsgstr \"\"\n\"Auf Debian/Ubuntu kannst du Cargo und den Rust Quellcode wie folgt installieren\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install Rust \"\n\"from the official site.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Das Rust-Ökosystem\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Das Rust-Ökosystem besteht aus einer Reihe von Werkzeugen, von denen die \"\n\"wichtigsten die Folgenden sind:\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: der Rust-Compiler, der `.rs`\\\\-Dateien in Binärdateien und andere \"\n\"Zwischenformate umwandelt\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will pass \"\n\"them to `rustc` when building your project. Cargo also comes with a built-in \"\n\"test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: der Rust-Abhängigkeitsmanager (Dependency manager) und das Bauwerkzeug \"\n\"(Build-Tool). Cargo weiß, wie die Abhängigkeiten heruntergeladen werden müssen, \"\n\"die auf <https://crates.io> gehostet werden, und übergibt sie an `rustc` beim \"\n\"Erstellen Ihres Projekts. Cargo verfügt außerdem über einen integrierten \"\n\"Testausführer,  der zum Ausführen von Unit-Tests verwendet wird.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are released. \"\n\"In addition, `rustup` can also download documentation for the standard library. \"\n\"You can have multiple versions of Rust installed at once and `rustup` will let \"\n\"you switch between them as needed.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Schlüsselpunkte:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- plus \"\n\"they enable new functionality.\"\nmsgstr \"\"\n\"Rust hat einen schnellen Veröffentlichungsplan. Alle sechs Wochen wird eine \"\n\"neue Version veröffentlicht. Neue Versionen bleiben rückwärtskompatibel mit \"\n\"älteren Versionen und fügen neue Funktionen hinzu.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Es gibt drei Veröffentlichungskanäle: „stable“, „beta“ und „nightly“.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Neue Funktionen werden in „nightly“ getestet. „Beta“ wird alle sechs Wochen \"\n\"„stabil“.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the current \"\n\"edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust hat auch \\\\[Editionen\\\\]: Die aktuelle Edition ist Rust 2021. Vorherige \"\n\"Editionen waren Rust 2015 und Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the language.\"\nmsgstr \"Editionen dürfen rückwärtsinkompatible Änderungen vornehmen.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for your \"\n\"crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Um zu verhindern, dass Code nicht kaputt geht, sind Editionen optional: Du \"\n\"wählst ihre Edition für deine Kiste (crate) in der Datei `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Um eine Aufspaltung des Ökosystems zu vermeiden, können Rust-Compiler Code der \"\n\"für verschiedene Editionen geschrieben wurde vermischen.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Erwähne, dass es ziemlich selten vorkommt, dass der Compiler jemals direkt und \"\n\"nicht über `cargo` verwendet wird (die meisten Benutzer tun dies nie).\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but not \"\n\"limited to:\"\nmsgstr \"\"\n\"Es könnte erwähnenswert sein, dass Cargo selbst ein äußerst leistungsstarkes \"\n\"und umfassendes Tool ist. Es verfügt über viele erweiterte Funktionen, \"\n\"einschließlich, aber nicht beschränkt auf:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Projekt-/Paketstruktur\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\\\\[Arbeitsbereiche\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Verwaltung/Caching von Entwicklungsabhängigkeiten und Laufzeitabhängigkeiten\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.html)\"\nmsgstr \"\\\\[Build-Skripting\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\\\\[globale Installation\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo clippy]\"\n\"(https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Es ist auch mit Unterbefehls-Plugins erweiterbar (z. B. [cargo clippy](https://\"\n\"github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"Lese mehr aus dem \\\\[offiziellen Cargo Buch\\\\]\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Codebeispiele in diesem Training\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"In diesem Training werden wir die Rust-Sprache hauptsächlich anhand von \"\n\"Beispielen erkunden die über Ihren Browser ausgeführt werden können. Dies \"\n\"erleichtert die Einrichtung erheblich und sorgt für ein konsistentes Erlebnis.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do the \"\n\"exercises. On the last day, we will do a larger exercise which shows you how to \"\n\"work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Die Installation von Cargo wird dennoch empfohlen: Es wird Dir die Bearbeitung \"\n\"der Übungen erleichtern. Am letzten Tag werden wir eine größere Übung machen, \"\n\"die zeigt, wie Du mit Abhängigkeiten (dependencies) arbeitest und dafür \"\n\"benötigst Du Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Die Codeblöcke in diesem Kurs sind vollständig interaktiv:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"You can use <kbd>Ctrl + Enter</kbd> to execute the code when focus is in the \"\n\"text box.\"\nmsgstr \" verwenden, um den Code auszuführen, wenn der Fokus auf dem Textfeld ist.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Die meisten Codebeispiele können wie oben gezeigt bearbeitet werden. Ein paar \"\n\"Codebeispiele sind aus verschiedenen Gründen nicht editierbar:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Die eingebetteten Testumgebungen (embedded Playgrounds) können keine Unit-Tests \"\n\"durchführen. Kopiere die Datei und füge  den Code in der echten Testumgebung \"\n\"ein, um Unit-Tests zu demonstrieren.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from the \"\n\"page! This is the reason that the students should solve the exercises using a \"\n\"local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Die eingebetteten Testumgebungen verlieren ihren Zustand, sobald Du von der \"\n\"Seite weg navigierst! Aus diesem Grund sollten die Schüler die Übungen mit \"\n\"einer lokalen Rust-Installation oder in der lokalen Testumgebung lösen.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Code lokal mit Cargo ausführen\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will need \"\n\"to first install Rust. Do this by following the [instructions in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch01-01-installation.html). This should give \"\n\"you a working `rustc` and `cargo`. At the time of writing, the latest stable \"\n\"Rust release has these version numbers:\"\nmsgstr \"\"\n\"Wenn Du mit dem Code auf Deinem eigenen System experimentieren möchten, \"\n\"solltest Du zuerst Rust installieren. Befolge dazu die \\\\[Anweisungen in dem \"\n\"Rust Buch 1\\\\]. Dies sollte ein funktionierendes `rustc` und `cargo` \"\n\"hervorbringen. Zum Verfassungszeitpunkt hat die neueste stabile Rust-Version \"\n\"folgende Versionsnummer:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of the \"\n\"examples in this training:\"\nmsgstr \"\"\n\"Wenn dies vorhanden ist, befolge die folgenden Schritte, um eine Rust-\"\n\"Binärdatei aus einem Beispiel zu erstellen:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Klicke bei dem Beispiel, dass Du kopieren möchtest, auf die Schaltfläche „In \"\n\"die Zwischenablage kopieren“.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Verwende `cargo new exercise`, um ein neues `exercise/`\\\\-Verzeichnis für \"\n\"Deinen Code zu erstellen:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Navigiere zu `exercise/` und verwende \\\\`cargo run, um eine Binärdatei zu \"\n\"erstellen und auszuführen:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For example, \"\n\"using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Ersetze den Platzhalter-Code in `src/main.rs` durch eigenen Code. Verwende \"\n\"beispielsweise das Beispiel auf der vorherigen Seite und lasse `src/main.rs` so \"\n\"aussehen:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Verwende `cargo run`, um die neue Binärdatei zu erstellen und auszuführen:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo build` \"\n\"to compile it without running it. You will find the output in `target/debug/` \"\n\"for a normal debug build. Use `cargo build --release` to produce an optimized \"\n\"release build in `target/release/`.\"\nmsgstr \"\"\n\"Verwende `cargo check`, um Dein Projekt schnell auf Fehler zu überprüfen, und \"\n\"verwende `cargo build`, um es zu kompilieren, ohne es auszuführen. Du findest \"\n\"die Ausgabe in `target/debug/` für einen normalen Debug-Build. Verwende `cargo \"\n\"build --release`, um einen optimierten Release-Build in `target/release/` zu \"\n\"erstellen.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you run \"\n\"`cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Du kannst Abhängigkeiten (dependencies) zu Deinem Projekt hinzufügen, indem Du \"\n\"`Cargo.toml` bearbeitest. Wenn Du `cargo`\\\\-Befehle ausführst, werden fehlende \"\n\"Abhängigkeiten automatisch heruntergeladen und für Dich kompiliert.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Versuche, die Kursteilnehmer zu ermutigen, Cargo zu installieren und einen \"\n\"lokalen Texteditor zu verwenden Es wird Dein Leben einfacher machen, wenn alle \"\n\"eine lokale Entwicklungsumgebung haben.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground today:\"\nmsgstr \"\"\n\"Dies ist der erste Tag von Comprehensive Rust. Heute werden wir viel behandeln:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Grundlegende Rust-Syntax: Variablen, Skalar- und zusammengesetzte Typen (scalar-\"\n\"types, union-types) , Aufzählungen (enums), Strukturen (structs), Referenzen \"\n\"(references), Funktionen (functions) und Methoden (methods).\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Typinferenz\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Bitte erinnere die Kursteilnehmer daran:\"\n\n#: src/welcome-day-1.md\nmsgid \"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Sie sollten Fragen stellen, sobald ihnen welche einfallen, und nicht bis zum \"\n\"Ende warten.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much encouraged!\"\nmsgstr \"Der Unterricht soll interaktiv sein und Diskussionen sind erwünscht!\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., keep \"\n\"the discussions related to how Rust does things vs some other language. It can \"\n\"be hard to find the right balance, but err on the side of allowing discussions \"\n\"since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Als Dozent sollten Sie versuchen, die Diskussionen relevant zu halten, d. h. \"\n\"Behalten Sie den Bezug dazu bei, wie Rust Dinge im Vergleich zu einer anderen \"\n\"Sprache tut. Es kann schwer sein, die richtige Balance zu finden, aber lassen \"\n\"Sie lieber Diskussionen zu, um Kursteilnehmer einzubeziehen und lange Monologe \"\n\"zu vermeiden.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Bei Fragen wird es wahrscheinlich dazu kommen, dass wir über die Dinge vor den \"\n\"eigentlichen Folien sprechen.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. Remember \"\n\"that the slides are just a support and you are free to skip them as you like.\"\nmsgstr \"\"\n\"Das ist vollkommen in Ordnung! Wiederholung ist ein wichtiger Teil des Lernens. \"\n\"Die Folien sind nur eine Unterstützung und Sie können sie nach Belieben \"\n\"überspringen.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that should \"\n\"have immediate parallels in other languages. The more advanced parts of Rust \"\n\"come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, followed \"\n\"by a break. Plan to cover the exercise solution after the break. The times \"\n\"listed here are a suggestion in order to keep the course on schedule. Feel free \"\n\"to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015](https://\"\n\"blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"Rust ist eine neue Programmiersprache, die 2015 ihre Version 1.0 hatte:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Rust ist eine statisch kompilierte Sprache in einer ähnlichen Rolle wie C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` verwendet LLVM als Backend.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust unterstützt viele \\\\[Plattformen und Architekturen\\\\] (https://doc.rust-\"\n\"lang.org/nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust wird für eine Vielzahl von Geräten verwendet:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"Firmware und Bootloader,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"intelligente Displays,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"Mobiltelefone,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"Desktops,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"Server.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust passt in den gleichen Bereich wie C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Hohe Flexibilität.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Hohes Maß an Kontrolle.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Kann auf sehr eingeschränkte Geräte wie Mobiltelefone herunterskaliert werden.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Hat keine Laufzeit oder Speicherbereinigung (garbage collection).\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Konzentriert sich auf Zuverlässigkeit und Sicherheit ohne Leistungseinbußen.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Einige Alleinstellungsmerkmale von Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Keine nicht initialisierten (uninitialized) Variablen.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Keine Doppelbefreiungen (double-frees).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Keine Nachnutzung (use-after-free).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Keine `NULL`\\\\-Zeiger (null Pointer).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Keine vergessenen gesperrten Mutexe.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Keine Datenrennen (data races) zwischen Ausführungssträngen (threads).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Keine Invalidierung des Iterators.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Der Array-Zugriff wird auf Grenzen geprüft.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Ganzzahlüberlauf ist definiert.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enums und Musterabgleich (pattern matching).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Generika.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"Kein Overhead-FFI.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Nullkosten-Abstraktionen.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Gute Compiler-Fehler.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Eingebauter Paketmanager.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Eingebaute Unterstützung für Tests.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Hervorragende Unterstützung des Language Server Protokolls.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more depth \"\n\"later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. Depending \"\n\"on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Frage den Kurs unbedingt, mit welchen Programmiersprachen sie Erfahrung haben. \"\n\"Abhängig von der Antwort kannst Du verschiedene Funktionen von Rust hervorheben:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ via \"\n\"the borrow checker. You get performance like in C and C++, but you don't have \"\n\"the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Erfahrung mit C oder C++: Rust eliminiert eine ganze Klasse von \"\n\"_Laufzeitfehlern (runtime Errors)_ über den Ausleihenprüfer (borrow checker). \"\n\"Du erhältst eine ähnliche Leistung wie in C und C++, aber hast keine Probleme \"\n\"mit der Speicherunsicherheit. Darüber hinaus erhältst Du eine moderne Sprache \"\n\"mit Konstrukten wie Mustervergleich (Pattern matching) und integriertes \"\n\"Abhängigkeitsmanagement (dependency management).\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory safety \"\n\"as in those languages, plus a similar high-level language feeling. In addition \"\n\"you get fast and predictable performance like C and C++ (no garbage collector) \"\n\"as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Erfahrung mit Java, Go, Python, JavaScript...: Du erhältst die gleiche \"\n\"Speichersicherheit wie in diesen Sprachen, dazu ein ähnlich hohes Sprachgefühl. \"\n\"Zusätzlich erhältst Du eine schnelle und vorhersehbare Leistung wie in C und C+\"\n\"+ (keine Speicherbereinigung (garbage collector)) sowie Zugriff auf Low-Level-\"\n\"Hardware (falls benötigt).\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to run \"\n\"short Rust programs, and is the basis for the examples and exercises in this \"\n\"course. Try running the \\\"hello-world\\\" program it starts with. It comes with a \"\n\"few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated assembly \"\n\"code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground and \"\n\"experiment a little. Encourage them to keep the tab open and try things out \"\n\"during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Lasst uns in das einfachste Rust-Programm einsteigen, ein klassisches Hallo \"\n\"Welt Programm:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Du siehst:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Funktionen beginnen mit `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Blöcke werden wie in C und C++ durch geschweifte Klammern getrennt.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Die `main`\\\\-Funktion ist der Einstiegspunkt des Programms.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"\"\n\"Rust hat hygienische (hygienic) Makros, `println!` ist ein Beispiel dafür.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Rust-Strings sind UTF-8-codiert und können beliebige Unicode-Zeichen enthalten.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will see \"\n\"a ton of it over the next four days so we start small with something familiar.\"\nmsgstr \"\"\n\"Diese Folie versucht, die Schüler mit Rust-Code vertraut zu machen. Sie werden \"\n\"viel davon in den nächsten vier Tagen sehen, also fangen wir klein und mit \"\n\"etwas Vertrautem an.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust ist anderen Sprachen in der C/C++/Java-Tradition sehr ähnlich. Es ist \"\n\"Imperativ (nicht funktional) und es wird nicht versucht, Dinge neu zu erfinden, \"\n\"es sei denn es ist absolut notwendig.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust ist modern und unterstützt Dinge wie Unicode vollständig.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust verwendet Makros für Situationen, in denen Du eine variable Anzahl von \"\n\"Argumenten haben möchtest (keine [Funktionüberladung](basic-syntax/functions-\"\n\"interlude.md)).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers from \"\n\"the scope they are used in. Rust macros are actually only [partially hygienic]\"\n\"(https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html).\"\nmsgstr \"\"\n\"Makros sind „hygienisch“, was bedeutet, dass sie nicht versehentlich \"\n\"Identifikatoren in ihrem Umfang (scope) in dem sie verwendet werden erfassen \"\n\"Rust-Makros sind eigentlich nur [teilweise hygienisch](https://veykril.github.\"\n\"io/tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust bietet Typsicherheit (type safety) durch statische Typisierung (static \"\n\"typing). Bindungen an Variablen (variable bindings) sind standardmäßig \"\n\"unveränderlich (immutable):\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by default. \"\n\"Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile time, \"\n\"but type inference (covered later) allows the programmer to omit it in many \"\n\"cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of each \"\n\"type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Types\"\nmsgstr \"Typen\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Literals\"\nmsgstr \"Literale\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Signed integers\"\nmsgstr \"Ganzzahlen mit Vorzeichen\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123i64`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Unsigned integers\"\nmsgstr \"Ganzzahlen ohne Vorzeichen  `u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`0`, `123`, `10u16`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"Fließkommazahlen\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Floating point numbers\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`f32`, `f64`\"\nmsgstr \"`3.14`, `-10.0e20`, `2f32`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"Zeichenketten (Strings)\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Unicode scalar values\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`char`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"Wahrheitswerte (booleans)\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Booleans\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`bool`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Die Typen haben folgende Breiten:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` und `fN` sind _N_ Bits breit,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` und `usize` sind die Breite eines Zeigers,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` ist 32 Bit breit,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` ist 8 Bit breit.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Es gibt einige Syntaxen, die oben nicht aufgeführt sind:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written as \"\n\"`123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the meaning \"\n\"should be clear: it takes three integers, and returns an integer. Functions \"\n\"will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics (checked) \"\n\"in a debug build and wraps in a release build. There are other options, such as \"\n\"overflowing, saturating, and carrying. These are accessed with method syntax, e.\"\n\"g., `(a * b).saturating_add(b * c).saturating_add(c * a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust wird sich ansehen, wie die Variable _benutzt_ wird, um den Typ zu \"\n\"bestimmen:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on constraints \"\n\"given by variable declarations and usages.\"\nmsgstr \"\"\n\"Diese Folie zeigt, wie der Rust-Compiler Typen basierend auf Einschränkungen \"\n\"ableitet, die durch Variablendeklarationen und Verwendungen gegeben sind.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not of \"\n\"some sort of dynamic \\\"any type\\\" that can hold any data. The machine code \"\n\"generated by such declaration is identical to the explicit declaration of a \"\n\"type. The compiler does the job for us and helps us write more concise code.\"\nmsgstr \"\"\n\"Es ist sehr wichtig zu betonen, dass auf diese Weise deklarierte Variablen \"\n\"**nicht** von einem dynamischem \\\"beliebigen Typ\\\" sind, der beliebige Daten \"\n\"enthalten kann. Der durch eine solche Deklaration erzeugte Maschinencode ist \"\n\"identisch mit der expliziten Deklaration eines Typs. Der Compiler erledigt \"\n\"lediglich die Arbeit für uns und hilft uns prägnanteren Code zu schreiben.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to `i32`. \"\n\"This sometimes appears as `{integer}` in error messages. Similarly, floating-\"\n\"point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci number \"\n\"is calculated recursively as the sum of the n-1'th and n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When will \"\n\"this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"Implementierung\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md src/generics.md src/modules.md src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"if Expressions\"\nmsgstr \"if-Ausdrücke\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"match Expressions\"\nmsgstr \"match-Ausdrücke\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"break and continue\"\nmsgstr \"`break` und `continue`\"\n\n#: src/control-flow-basics.md\nmsgid \"We will now cover the many kinds of flow control found in Rust.\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"\"\n\"Most of this will be very familiar to what you have seen in other programming \"\n\"languages.\"\nmsgstr \"\"\n\"Du kannst es Dir als `void` vorstellen, das Dir aus anderen Programmiersprachen \"\n\"bekannt sein könnte.\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"`if` expressions\"\nmsgstr \"`if`\\\\-Ausdrücke\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Darüber hinaus können Sie es als Ausdruck verwenden. Das macht dasselbe wie \"\n\"oben:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` after \"\n\"`\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"An `if` expression should be used in the same way as the other expressions. For \"\n\"example, when it is used in a `let` statement, the statement must be terminated \"\n\"with a `;` as well. Remove the `;` before `println!` to see the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"`match` can be used to check a value against one or more options:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"one\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"ten\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"one hundred\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"something else\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"Like `if` expressions, `match` can also return a value;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"The value of {flag} is {val}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` arms are evaluated from top to bottom, and the first one that matches \"\n\"has its corresponding body executed.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"There is no fall-through between cases the way that `switch` works in other \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"The body of a `match` arm can be a single expression or a block. Technically \"\n\"this is the same thing, since blocks are also expressions, but students may not \"\n\"fully understand that symmetry at this point.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` expressions need to be exhaustive, meaning they either need to cover \"\n\"all possible values or they need to have a default case such as `_`. \"\n\"Exhaustiveness is easiest to demonstrate with enums, but enums haven't been \"\n\"introduced yet. Instead we demonstrate matching on a `bool`, which is the \"\n\"simplest primitive type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"This slide introduces `match` without talking about pattern matching, giving \"\n\"students a chance to get familiar with the syntax without front-loading too \"\n\"much information. We'll be talking about pattern matching in more detail \"\n\"tomorrow, so try not to go into too much detail here.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md src/references/dangling.md\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/borrowing/shared.md\n#: src/iterators/motivation.md src/iterators/iterator.md src/iterators/helpers.md\n#: src/iterators/collect.md src/modules/encapsulation.md\n#: src/error-handling/result.md src/error-handling/anyhow.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"To further motivate the usage of `match`, you can compare the examples to their \"\n\"equivalents written with `if`. In the second case matching on a `bool` an `if \"\n\"{} else {}` block is pretty similar. But in the first example that checks \"\n\"multiple cases, a `match` expression can be more concise than `if {} else if {} \"\n\"else if {} else`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` also supports match guards, which allow you to add an arbitrary logical \"\n\"condition that will get evaluated to determine if the match arm should be \"\n\"taken. However talking about match guards requires explaining about pattern \"\n\"matching, which we're trying to avoid on this slide.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"`while`\\\\-Ausdrücke\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-loops) works much like in other languages, executing the loop \"\n\"body as long as the condition is true.\"\nmsgstr \"\"\n\"Wie bei `if` gibt es eine `while let`\\\\-Variante, die einen Wert wiederholt \"\n\"testet gegen ein Muster:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates over \"\n\"ranges of values or the items in a collection:\"\nmsgstr \"`Drop` wird zum Definieren von Destruktoren verwendet.\"\n\n#: src/control-flow-basics/loops/for.md src/iterators/iterator.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/loop.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"`Drop` wird zum Definieren von Destruktoren verwendet.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The `loop` statement works like a `while true` loop. Use it for things like \"\n\"servers which will serve connections forever.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-lang.\"\n\"org/reference/expressions/loop-expr.html#break-expressions). With `loop`, this \"\n\"can take an optional expression that becomes the value of the `loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which can return a non-trivial \"\n\"value. This is because it's guaranteed to only return at a `break` statement \"\n\"(unlike `while` and `for` loops, which can also return when the condition \"\n\"fails).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\n#, fuzzy\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is used \"\n\"to break out of nested loops:\"\nmsgstr \"\"\n\"Wenn Sie eine Schleife vorzeitig verlassen möchten, verwenden Sie `break`, wenn \"\n\"Sie sofort beginnen möchten Verwenden Sie für die nächste Iteration \"\n\"\\\"Continue\\\". Sowohl `Continue` als auch `Break` können optional verwendet \"\n\"werden Nehmen Sie ein Label-Argument, das zum Ausbrechen aus verschachtelten \"\n\"Schleifen verwendet wird:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"Labeled break also works on arbitrary blocks, e.g.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"This line gets skipped\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blöcke\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Ein Block in Rust hat einen Wert und einen Typ: Der Wert ist der letzte \"\n\"Ausdruck der Block:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is `()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Sie können zeigen, wie sich der Wert des Blocks ändert, indem Sie die letzte \"\n\"Zeile im Block ändern. Zum Beispiel das Hinzufügen/Entfernen eines Semikolons \"\n\"oder die Verwendung eines `Return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from the \"\n\"same scope:\"\nmsgstr \"\"\n\"Sie können Variablen verschatten (shadow), sowohl solche aus äußeren \"\n\"Gültigkeitsbereichen (outer scopes) als auch Variablen aus dem gleichen \"\n\"Gültigkeitsbereich:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block in \"\n\"the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both variables' \"\n\"memory locations exist at the same time. Both are available under the same \"\n\"name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Definition: Verschattung (shadowing) unterscheidet sich von Mutation, da nach \"\n\"der Verschattung die Speicherplätze beider Variablen gleichzeitig existieren. \"\n\"Beide Speicherplätze sind unter demselben Namen verfügbar, je nachdem, wo Sie \"\n\"die Variablen im Code verwenden.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Eine Shadowing-Variable kann einen anderen Typ haben.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Shadowing sieht zunächst obskur aus, ist aber praktisch, um Werte nach `.\"\n\"unwrap()` festzuhalten.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some programming \"\n\"languages), then a return type.\"\nmsgstr \"\"\n\"Auf Deklarationsparameter folgt ein Typ (das Gegenteil einiger \"\n\"Programmiersprachen) und dann ein Rückgabetyp.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return value. \"\n\"Simply omit the `;` at the end of the expression. The `return` keyword can be \"\n\"used for early return, but the \\\"bare value\\\" form is idiomatic at the end of a \"\n\"function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Der letzte Ausdruck in einem Funktionskörper (oder einem beliebigen Block) wird \"\n\"zum Rückgabewert. Lasse einfach das `;` am Ende des Ausdrucks weg.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the return type is omitted.\"\nmsgstr \"\"\n\"Einige Funktionen haben keinen Rückgabewert und geben den `Einheitentyp` \"\n\"(Unittyp) `()` zurück. Der Compiler schließt daraus, wenn der Rückgabetyp `-\"\n\">()` weggelassen wird.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Jede Funktion hat eine einzige Implementierung:\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not supported. \"\n\"Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, which \"\n\"will be covered later.\"\nmsgstr \"Akzeptiert immer einen einzelnen Satz von Parametertypen.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a variable \"\n\"number of arguments. They are distinguished by a `!` at the end. The Rust \"\n\"standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"Das Überladen von Operatoren wird über Traits in `std::ops` implementiert:\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and how \"\n\"to use them. Why they are defined as macros, and what they expand to, is not \"\n\"especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Willkommen\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"We have seen how primitive types work in Rust. Now it's time for you to start \"\n\"building new composite types.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) elements \"\n\"of the same type `T`. Note that the length of the array is _part of its type_, \"\n\"which means that `[u8; 3]` and `[u8; 4]` are considered two different types. \"\n\"Slices, which have a size determined at runtime, are covered later.\"\nmsgstr \"\"\n\"Arrays haben Elemente desselben Typs `T` und der Länge `N`, was eine Konstante \"\n\"zur Kompilierungszeit ist. Beachten Sie, dass die Länge des Arrays _Teil seines \"\n\"Typs_ ist, was bedeutet, dass `[u8; 3]` und `[u8; 4]` als zwei verschiedene \"\n\"Typen betrachtet werden.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be avoided \"\n\"using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Wir können Literale verwenden, um Arrays Werte zuzuweisen.\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. Types \"\n\"such as integers and strings implement the default output, but arrays only \"\n\"implement the debug output. This means that we must use debug output here.\"\nmsgstr \"\"\n\"In der `main`\\\\-Funktion fragt die print-Anweisung mit dem Formatparameter `?` \"\n\"nach der Debug-Implementierung: `{}` gibt die Standardausgabe aus, „{:?}“ gibt \"\n\"die Debug-Ausgabe aus. Wir hätten auch `{a}` und `{a:?}` verwenden können, ohne \"\n\"den Wert nach der Formatzeichenfolge anzugeben.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Das Hinzufügen von `#`, z. B. `{a:#?}`, ruft ein „hübsches Druckformat“ (pretty \"\n\"print) auf, das einfacher zu lesen ist.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Wie Arrays haben Tupel eine feste Länge.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\"Tupel gruppieren Werte unterschiedlicher Typen zu einem zusammengesetzten Typ.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, e.\"\n\"g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Auf Felder eines Tupels kann durch einen Punkt gefolgt von dem Index des Werts \"\n\"zugegriffen werden, z. B. „t.0“, „t.1“.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies absence \"\n\"of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered that \"\n\"yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!` \"\n\"macros. These are always checked, while debug-only variants like `debug_assert!\"\n\"` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure as \"\n\"the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, hence \"\n\"why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of pattern \"\n\"matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"Was ist die Art von „Wort“ in jeder Schleife?\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Verwende den obigen Code, um eine Funktion `pretty_print` zu schreiben, die \"\n\"eine Matrix formatiert druckt und schreibe eine Funktion `transpose`, die eine \"\n\"Matrix transponiert (Zeilen in Spalten umwandelt):\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Kopiere den folgenden Code nach <https://play.rust-lang.org/> und implementiere \"\n\"die Funktionen:\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md src/iterators.md\n#: src/error-handling.md src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking ownership of \"\n\"the value, and is also called \\\"borrowing\\\". Shared references are read-only, \"\n\"and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made with \"\n\"the `&` operator. The `*` operator \\\"dereferences\\\" a reference, yielding its \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"References can never be null in Rust, so null checking is not necessary.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The course \"\n\"will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can be \"\n\"much smaller than the thing they point to. Students familiar with C or C++ will \"\n\"recognize references as pointers. Later parts of the course will cover how Rust \"\n\"prevents the memory-safety bugs that come from using raw pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking methods \"\n\"(try `r.is_ascii()`). There is no need for an `->` operator like in C++.\"\nmsgstr \"\"\n\"Rust wird in einigen Fällen automatisch dereferenzieren, insbesondere beim \"\n\"Aufrufen von Methoden (probiere `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). Note \"\n\"that this re-binds `r`, so that it refers to something else. This is different \"\n\"from C++, where assignment to a reference changes the referenced value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return a \"\n\"reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"Wir werden mehr über das Ausleihen (borrowing) sprechen, wenn wir zum Eigentum \"\n\"(ownership) kommen.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the value. \"\n\"No other references (shared or exclusive) can exist at the same time, and the \"\n\"referenced value cannot be accessed while the exclusive reference exists. Try \"\n\"making an `&point.0` or changing `point.0` while `x_coord` is alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive reference \"\n\"to a mutable value.\"\nmsgstr \"\"\n\"Beachte unbedingt den Unterschied zwischen `let mut ref_x: &i32` und `let \"\n\"ref_x: &mut i32`. Das erste stellt eine veränderliche Referenz (mutable \"\n\"reference) dar, an die unterschiedliche Werte gebunden werden können, während \"\n\"das zweite Beispiel einen Verweis auf einen veränderlichen Wert darstellt.\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\"Ein Anteilstyp (slice) gibt Ihnen einen Einblick in eine größere Sammlung \"\n\"(collection):\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Anteilstypen (slices) borgen (borrow) Daten vom Sliced-Typ.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Wir erstellen ein Anteilstyp, indem wir `a` ausleihen (borrow) und den Start- \"\n\"und Endindex in Klammern angeben.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are identical.\"\nmsgstr \"\"\n\"Wenn der Anteilstyp bei Index 0 beginnt, erlaubt uns die Range-Syntax von Rust, \"\n\"den Startindex wegzulassen, was bedeutet, dass `&a[0..a.len()]` und `&a[..a.\"\n\"len()]` identisch sind.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Das Gleiche gilt für den letzten Index, daher sind `&a[2..a.len()]` und \"\n\"`&a[2..]` identisch.\"\n\n#: src/references/slices.md\nmsgid \"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Um einfach einen Anteilstyp des gesamten Arrays zu erstellen, können wir daher \"\n\"„&a\\\\[..\\\\]“ verwenden.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` (`&[i32]`) \"\n\"no longer mentions the array length. This allows us to perform computation on \"\n\"slices of different sizes.\"\nmsgstr \"\"\n\"`s` ist ein Verweis (reference) auf einen Teil von `i32`. Beachte, dass der Typ \"\n\"`s` (`&[i32]`) die Array-Länge nicht mehr erwähnt. Dadurch können wir \"\n\"Berechnungen für Anteilstypen unterschiedlicher Größe durchführen.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Anteilstypen (slices) leihen (borrow) sich immer etwas von einem anderen Objekt \"\n\"aus. In diesem Beispiel muss `a` mindestens so lange (im Gültigkeitsbereich \"\n\"(scope)) „lebendig“ bleiben wie unser Anteilstyp.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Kommen wir jetzt zu den beiden String-Typen in Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals (`\\\"Hello\\\"`), \"\n\"are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` führt einen String-Slice ein, der eine unveränderliche Referenz auf \"\n\"UTF-8-codierte String-Daten ist, die in einem Speicherblock gespeichert sind. \"\n\"String-Literale (`\\\"Hallo\\\"`) werden in der Binärdatei des Programms \"\n\"gespeichert.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a `Vec<T>`, \"\n\"it is owned.\"\nmsgstr \"\"\n\"Der `String`\\\\-Typ von Rust ist eine Verpackung (wrapper) um einen Byte-Vektor. \"\n\"Wie bei einem `Vec<T>` ist es im Besitz.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data can \"\n\"be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Wie bei vielen anderen Typen erstellt `String::from()` einen String aus einem \"\n\"String-Literal; `String::new()` erstellt einen neuen leeren String, zu dem \"\n\"String-Daten mit den Methoden `push()` und `push_str()` hinzugefügt werden \"\n\"können.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"Das Makro `format!()` ist eine praktische Möglichkeit, einen aneigenbaren \"\n\"(owned) String aus dynamischen Werten zu generieren. Es akzeptiert die gleiche \"\n\"Formatspezifikation wie `println!()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Für C++-Programmierer: Stell Dir `&str` als `const char*` aus C++ vor, der \"\n\"immer auf eine gültige Zeichenfolge im Speicher zeigt. Rust `String` ist ein \"\n\"grobes Äquivalent von `std::string` aus C++ (Hauptunterschied: Es kann nur \"\n\"UTF-8-codierte Bytes enthalten und wird niemals eine Optimierung für kleine \"\n\"Zeichenfolgen verwenden). \"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Mit Byte-Strings kannst Du direkt einen „&\\\\[u8\\\\]“-Wert erstellen:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: `r\\\"\\\\n\\\" \"\n\"== \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal amount of `#` on \"\n\"either side of the quotes:\"\nmsgstr \"\"\n\"Mit puren Zeichenketten (raw strings) kannst Du einen `&str`\\\\-Wert mit \"\n\"deaktivierten Escape-Zeichen erstellen: `r\\\"\\\\n\\\" == \\\"\\\\\\\\\\\\\\\\n\\\"`. Du kannst \"\n\"doppelte Anführungszeichen einbetten, indem Du auf beiden Seiten der \"\n\"Anführungszeichen die gleiche Anzahl von `#` verwendest:\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"Rust enforces a number of rules for references that make them always safe to \"\n\"use. One rule is that references can never be `null`, making them safe to use \"\n\"without `null` checks. The other rule we'll look at for now is that references \"\n\"can't _outlive_ the data they point to.\"\nmsgstr \"\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"This slide gets students thinking about references as not simply being \"\n\"pointers, since Rust has different rules for references than other languages.\"\nmsgstr \"\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"We'll look at the rest of Rust's borrowing rules on day 3 when we talk about \"\n\"Rust's ownership system.\"\nmsgstr \"\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"Rust's equivalent of nullability is the `Option` type, which can be used to \"\n\"make any type \\\"nullable\\\" (not just references/pointers). We haven't yet \"\n\"introduced enums or pattern matching, though, so try not to go into too much \"\n\"detail about this here.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, representing \"\n\"a point as `[f64;3]`. It is up to you to determine the function signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md src/pattern-matching.md src/methods-and-traits.md\n#: src/lifetimes.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Wie C und C++ unterstützt Rust benutzerdefinierte Strukturen:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Key Points:\"\nmsgstr \"Wichtige Punkte:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a trait \"\n\"on some type but don’t have any data that you want to store in the value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are not \"\n\"important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Wenn Sie bereits Variablen mit den richtigen Namen haben, können Sie die \"\n\"erstellen struct mit einer Abkürzung:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the old \"\n\"struct without having to explicitly type it all out. It must always be the last \"\n\"element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Wenn die Feldnamen unwichtig sind, können Sie eine Tupelstruktur verwenden:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"Dies wird häufig für Einzelfeld-Wrapper (genannt Newtypes) verwendet:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in a \"\n\"primitive type, for example:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have to \"\n\"validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or for \"\n\"instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Das Schlüsselwort „enum“ ermöglicht die Erstellung eines Typs, der mehrere hat \"\n\"verschiedene Varianten:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {player_move:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Aufzählungen ermöglichen es Ihnen, eine Reihe von Werten unter einem Typ zu \"\n\"sammeln\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, Rust \"\n\"will store a discriminant so that it knows at runtime which variant is in a \"\n\"`PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\"Dies könnte ein guter Zeitpunkt sein, um Structs und Enums zu vergleichen:\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one with \"\n\"different types of fields (variant payloads).\"\nmsgstr \"\"\n\"In beiden Fällen können Sie eine einfache Version ohne Felder (unit struct) \"\n\"oder eine mit unterschiedlichen Feldtypen (variant payloads) haben.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were all \"\n\"defined in an enum.\"\nmsgstr \"\"\n\"Sie könnten sogar die verschiedenen Varianten einer Aufzählung mit separaten \"\n\"Structs implementieren, aber dann wären sie nicht vom gleichen Typ, wie wenn \"\n\"sie alle in einer Aufzählung definiert wären.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche optimization\\\"). \"\n\"For example, `Option<&u8>` stores either a pointer to an integer or `NULL` for \"\n\"the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals `size_of::\"\n\"<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look like \"\n\"in practice. It's important to note that the compiler provides no guarantees \"\n\"regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined wherever \"\n\"they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Gemäß dem [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html) werden diese bei der Verwendung eingefügt (inlined upon use).\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate `const` \"\n\"values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"Erwähne, dass sich `const` semantisch ähnlich wie `constexpr` in C++ verhält.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but it \"\n\"is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Es kommt nicht sehr häufig vor, dass man eine zur Laufzeit ausgewertete \"\n\"Konstante benötigt, aber es ist hilfreich und sicherer als die Verwendung einer \"\n\"statischen.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html), these are not inlined upon use and have an actual associated \"\n\"memory location. This is useful for unsafe and embedded code, and the variable \"\n\"lives through the entirety of the program execution. When a globally-scoped \"\n\"value does not have a reason to need object identity, `const` is generally \"\n\"preferred.\"\nmsgstr \"\"\n\"Wie im [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html) erwähnt, werden diese bei der Verwendung nicht inliniert und haben einen \"\n\"tatsächlich zugeordneten Speicherort. Dies ist nützlich für unsicheren (unsafe) \"\n\"und eingebetteten (embedded) Code. Die Variable existiert während der gesamten \"\n\"Programmausführung.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"`static` hingegen ist einer `const` oder veränderlichen (mutable) globalen \"\n\"Variable in C++ viel ähnlicher.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as required \"\n\"by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be `Sync`. \"\n\"Interior mutability is possible through a [`Mutex`](https://doc.rust-lang.org/\"\n\"std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A [newtype](tuple-structs.html) is often a better alternative since it creates \"\n\"a distinct type. Prefer `struct InventoryCount(usize)` to `type InventoryCount \"\n\"= usize`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct various \"\n\"events. Use `#[derive(Debug)]` to allow the types to be formatted with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting data \"\n\"out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Welcome to Day 2\"\nmsgstr \"Willkommen zu Tag 2\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"Nachdem wir nun eine ganze Menge Rust gesehen haben, fahren wir fort mit:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours. It contains:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. The \"\n\"patterns can be simple values, similarly to `switch` in C and C++, but they can \"\n\"also be used to express more complex conditions:\"\nmsgstr \"\"\n\"Mit dem Schlüsselwort „match“ können Sie einen Wert mit einem oder mehreren \"\n\"_Mustern_ abgleichen. Der Vergleiche werden von oben nach unten durchgeführt \"\n\"und das erste Match gewinnt.\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md src/generics/solution.md\n#: src/std-traits/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm. We will learn more about this on the next \"\n\"slide.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A match guard causes the arm to match only if the condition is true. If the \"\n\"condition is false the match will continue checking later cases.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Sie können darauf hinweisen, wie bestimmte Zeichen in einem Muster verwendet \"\n\"werden\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` als `oder`\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` kann beliebig erweitert werden\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"„1..=5“ steht für einen inklusiven Bereich\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`_` is a wild card\"\nmsgstr \"„\\\\_“ ist ein Platzhalter\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when we \"\n\"wish to concisely express more complex ideas than patterns alone would allow.\"\nmsgstr \"Match Guards als separates Syntax-Feature sind wichtig und notwendig.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. An \"\n\"`if` expression inside of the branch block (after `=>`) happens after the match \"\n\"arm is selected. Failing the `if` condition inside of that block won't result \"\n\"in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Sie sind nicht dasselbe wie ein separater „if“-Ausdruck innerhalb des Match-\"\n\"Arms. Ein „if“-Ausdruck innerhalb des Verzweigungsblocks (nach „=>“) erfolgt, \"\n\"nachdem der Match-Arm ausgewählt wurde. Wenn die 'if'-Bedingung innerhalb \"\n\"dieses Blocks nicht bestanden wird, führt dies nicht zu anderen Armen des \"\n\"betrachteten ursprünglichen \\\"Match\\\"-Ausdrucks.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Die im Guard definierte Bedingung gilt für jeden Ausdruck in einem Muster mit \"\n\"einem `|`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"More To Explore\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Another piece of pattern syntax you can show students is the `@` syntax which \"\n\"binds a part of a pattern to a variable. For example:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"outer: {outer:?}, inner: {inner}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"In this example `inner` has the value 123 which it pulled from the `Option` via \"\n\"destructuring, `outer` captures the entire `Some(inner)` expression, so it \"\n\"contains the full `Option::Some(123)`. This is rarely used but can be useful in \"\n\"more complex patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Strukturen\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple `enum` \"\n\"type:\"\nmsgstr \"\"\n\"Muster können auch verwendet werden, um Variablen an Teile Ihrer Werte zu \"\n\"binden. Das ist wie Sie inspizieren die Struktur Ihrer Typen. Beginnen wir mit \"\n\"einem einfachen `enum`\\\\-Typ:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second arm, \"\n\"`msg` is bound to the error message.\"\nmsgstr \"\"\n\"Hier haben wir die Arme verwendet, um den „Result“-Wert zu _destrukturieren_. \"\n\"In der ersten arm, `half` ist an den Wert innerhalb der `Ok`\\\\-Variante \"\n\"gebunden. Im zweiten Arm, `msg` wird an die Fehlermeldung gebunden.\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with a \"\n\"`match`.\"\nmsgstr \"\"\n\"Der `if`/`else`\\\\-Ausdruck gibt eine Aufzählung zurück, die später mit einem \"\n\"`match` entpackt wird.\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Sie können versuchen, der Enum-Definition eine dritte Variante hinzuzufügen und \"\n\"die Fehler beim Ausführen des Codes anzuzeigen. Weisen Sie auf die Stellen hin, \"\n\"an denen Ihr Code jetzt unerschöpflich ist und wie der Compiler versucht, Ihnen \"\n\"Hinweise zu geben.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. They \"\n\"are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`if let` expressions\"\nmsgstr \"`if let`\\\\-Ausdrücke\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"while let-Ausdrücke\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"while let-Ausdrücke\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {duration:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, use \"\n\"[`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.\"\n\"html). The \\\"else\\\" case must diverge (`return`, `break`, or panic - anything \"\n\"but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md src/android/testing.md\n#: src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Wie bei `if` gibt es eine `while let`\\\\-Variante, die einen Wert wiederholt \"\n\"testet gegen ein Muster:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.String.\"\n\"html#method.pop) returns `Some(c)` until the string is empty, after which it \"\n\"will return `None`. The `while let` lets us keep iterating through all items.\"\nmsgstr \"\"\n\"Hier gibt der von `v.iter()` zurückgegebene Iterator bei jedem eine \"\n\"`Option<i32>` zurück Aufruf von `next()`. Es gibt `Some(x)` zurück, bis es \"\n\"fertig ist, danach wird es gibt \\\"Keine\\\" zurück. Das `while let` lässt uns \"\n\"alle Elemente durchlaufen.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make it \"\n\"more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports flattening \"\n\"this nested code. Rewrite the awkward version for students, so they can see the \"\n\"transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"`while let`\\\\-Ausdrücke\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Weisen Sie darauf hin, dass die „while let“-Schleife so lange läuft, wie der \"\n\"Wert mit dem Muster übereinstimmt.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if statement \"\n\"that breaks when there is no value to unwrap for `name.pop()`. The `while let` \"\n\"provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Sie könnten die „while let“-Schleife als Endlosschleife mit einer if-Anweisung \"\n\"umschreiben, die abbricht, wenn es keinen Wert zum Auspacken für „iter.next()“ \"\n\"gibt. Das `while let` liefert syntaktischen Zucker für das obige Szenario.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"An example of a small arithmetic expression could be `10 + 20`, which evaluates \"\n\"to `30`. We can represent the expression as a tree:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, which \"\n\"evaluate to `85`. We represent this as a much bigger tree:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"In code, we will represent the tree with two types:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later in \"\n\"the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use `todo!\"\n\"()` and get the tests to pass one-by-one. You can also skip a test temporarily \"\n\"with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"\\\"expr: {expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with an \"\n\"`impl` block:\"\nmsgstr \"\"\n\"Mit Rust können Sie Ihren neuen Typen Funktionen zuordnen. Das machst du mit \"\n\"einem `impl`\\\\-Block:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self (covered later)\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts on. \"\n\"There are several common receivers for a method:\"\nmsgstr \"\"\n\"Das obige `&self` gibt an, dass die Methode das Objekt unveränderlich ausleiht. \"\n\"Dort sind weitere mögliche Empfänger für eine Methode:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: leiht sich das Objekt vom Aufrufer unter Verwendung eines Shared und \"\n\"Immutable Referenz. Das Objekt kann danach wieder verwendet werden.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: leiht sich das Objekt vom Aufrufer unter Verwendung eines Unique \"\n\"und Mutable Referenz. Das Objekt kann danach wieder verwendet werden.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: übernimmt den Besitz des Objekts und verschiebt es vom Aufrufer weg. \"\n\"Der Die Methode wird Eigentümer des Objekts. Das Objekt wird gelöscht \"\n\"(deallocated) wenn die Methode zurückkehrt, es sei denn, ihr Besitz ist \"\n\"explizit übermittelt.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\"`mut self`: wie oben, aber während die Methode das Objekt besitzt, kann sie es \"\n\"mutiere es auch. Vollständiges Eigentum bedeutet nicht automatisch \"\n\"Wandelbarkeit.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Kein Empfänger: Dies wird zu einer statischen Methode für die Struktur. \"\n\"Typischerweise gewohnt Erstellen Sie Konstruktoren, die per Konvention \\\"neu\\\" \"\n\"genannt werden.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\"Es kann hilfreich sein, Methoden einzuführen, indem man sie mit Funktionen \"\n\"vergleicht.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Methoden werden für eine Instanz eines Typs aufgerufen (z. B. eine Struktur \"\n\"oder Aufzählung), der erste Parameter repräsentiert die Instanz als „self“.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep all \"\n\"the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Entwickler können sich dafür entscheiden, Methoden zu verwenden, um die \"\n\"Methodenempfängersyntax zu nutzen und sie besser organisiert zu halten. Durch \"\n\"die Verwendung von Methoden können wir den gesamten Implementierungscode an \"\n\"einem vorhersehbaren Ort aufbewahren.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"Weisen Sie auf die Verwendung des Schlüsselworts „self“ hin, einem \"\n\"Methodenempfänger.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how the \"\n\"struct name could also be used.\"\nmsgstr \"\"\n\"Zeigen Sie, dass es sich um eine Abkürzung für `self:&Self` handelt und zeigen \"\n\"Sie vielleicht, wie der Strukturname auch verwendet werden könnte.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and can \"\n\"be used elsewhere in the block.\"\nmsgstr \"\"\n\"Erklären Sie, dass Self ein Typ-Alias für den Typ ist, in dem sich der „impl“-\"\n\"Block befindet, und an anderer Stelle im Block verwendet werden kann.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Beachten Sie, dass self wie andere Strukturen verwendet wird und die \"\n\"Punktnotation verwendet werden kann, um auf einzelne Felder zu verweisen.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` by \"\n\"trying to run `finish` twice.\"\nmsgstr \"\"\n\"Dies könnte ein guter Zeitpunkt sein, um zu demonstrieren, wie sich `&self` von \"\n\"`self` unterscheidet, indem Sie den Code ändern und versuchen, say_hello \"\n\"zweimal auszuführen.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://doc.\"\n\"rust-lang.org/reference/special-types-and-traits.html) allowed to be receiver \"\n\"types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Neben Varianten von „self“ gibt es auch [spezielle Wrapper-Typen](https://doc.\"\n\"rust-lang.org/reference/special-types-and-traits.html) dürfen Empfängertypen \"\n\"sein, wie z. B. `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Mit Rust können Sie über Typen mit Merkmalen abstrahieren. Sie ähneln \"\n\"Schnittstellen:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to implement \"\n\"the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality that \"\n\"is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` type \"\n\"with a `talk()` method would not automatically satisfy `Pet` unless it is in an \"\n\"`impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, `greet` \"\n\"is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement `Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not expect \"\n\"this to behave like OO inheritance. It just specifies an additional requirement \"\n\"on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{p1:?} vs. {p2:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Übungen\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. In \"\n\"testing, this might put messages in the test logfile, while in a production \"\n\"build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StdoutLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other kinds \"\n\"of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Merkmal\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"dyn Trait\"\nmsgstr \"Async Merkmale\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"Exercise: Generic min\"\nmsgstr \"Übungen\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data structures \"\n\"(such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust unterstützt Generika, mit denen Sie einen Algorithmus abstrahieren können \"\n\"(z. B. Sortieren) über die im Algorithmus verwendeten Typen.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a string: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"In this example we only use the primitive types `i32` and `&str` for `T`, but \"\n\"we can use any type here, including user-defined types:\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching the \"\n\"constraints. For example, try modifying `pick` to return `even + odd` if `n == \"\n\"0`. Even if only the `pick` instantiation with integers is used, Rust still \"\n\"considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This is a \"\n\"zero-cost abstraction: you get exactly the same result as if you had hand-coded \"\n\"the data structures without the abstraction.\"\nmsgstr \"\"\n\"Dies ist eine Null-Kosten-Abstraktion: Sie erhalten genau das gleiche Ergebnis, \"\n\"als ob Sie es hätten die Datenstrukturen ohne die Abstraktion von Hand codiert.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"Mit Generika können Sie über den konkreten Feldtyp abstrahieren:\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that redundant?\"\nmsgstr \"\"\n\"_F:_ Warum wird `T` zweimal in `impl<T> Point<T> {}` angegeben? Ist das nicht \"\n\"überflüssig?\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. They \"\n\"are independently generic.\"\nmsgstr \"\"\n\"Dies liegt daran, dass es sich um einen generischen Implementierungsabschnitt \"\n\"für einen generischen Typ handelt. Sie sind unabhängig generisch.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Dies bedeutet, dass diese Methoden für jedes `T` definiert sind.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Es ist möglich `impl Point<u32> { .. }` zu schreiben.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"„Point“ ist immer noch generisch und Sie können „Point\\n\"\n\"\\n\"\n\"“ verwenden, aber Methoden in diesem Block sind nur für „Point\\n\"\n\"\\n\"\n\"“ verfügbar.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two type \"\n\"variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's parameters \"\n\"get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type parameters. \"\n\"Here, `Foo::from(\\\"hello\\\")` would not compile because there is no `From<&str>` \"\n\"implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different input \"\n\"types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for any \"\n\"type T. Unlike some other languages, Rust has no heuristic for choosing the \"\n\"\\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Wenn Sie mit Generika arbeiten, möchten Sie häufig die Typen einschränken. Du \"\n\"kannst das mit `T:Trait` oder `impl Trait`:\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"You can do this with `T: Trait`:\"\nmsgstr \"Sie können es von Hand tun, wenn Sie möchten:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotCloneable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonCloneable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Es entrümpelt die Funktionssignatur, wenn Sie viele Parameter haben.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Es hat zusätzliche Funktionen, die es leistungsfähiger machen.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can be \"\n\"arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Wenn jemand fragt, das zusätzliche Feature ist, dass der Typ links von \\\":\\\" \"\n\"beliebig sein kann, wie `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Ähnlich wie Merkmalsgrenzen kann eine \\\"impl Trait\\\"-Syntax in Funktion \"\n\"verwendet werden Argumente und Rückgabewerte:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The meaning \"\n\"of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"Die Bedeutung von „impl Trait“ ist in den verschiedenen Positionen etwas \"\n\"unterschiedlich.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Für einen Parameter ist `impl Trait` wie ein anonymer generischer Parameter mit \"\n\"einer Eigenschaftsbindung.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Für einen Rückgabetyp bedeutet dies, dass der Rückgabetyp ein konkreter Typ \"\n\"ist, der die Eigenschaft implementiert, ohne den Typ zu nennen. Dies kann \"\n\"nützlich sein, wenn Sie den konkreten Typ in a nicht verfügbar machen möchten \"\n\"öffentliche API.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks the \"\n\"concrete type it returns, without writing it out in the source. A function \"\n\"returning a generic type like `collect<B>() -> B` can return any type \"\n\"satisfying `B`, and the caller may need to choose one, such as with `let x: \"\n\"Vec<_> = foo.collect()` or with the turbofish, `foo.collect::<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what the \"\n\"error message shows.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a specialized \"\n\"instance of the function for each different type that the generic is \"\n\"instantiated with. This means that calling a trait method from within a generic \"\n\"function still uses static dispatch, as the compiler has full type information \"\n\"and can resolve which type's trait implementation to use.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements `Pet`, \"\n\"and the other points to the vtable for the trait implementation for that type. \"\n\"When calling the `talk` method on `&dyn Pet` the compiler looks up the function \"\n\"pointer for `talk` in the vtable and then invokes the function, passing the \"\n\"pointer to the `Dog` or `Cat` into that function. The compiler doesn't need to \"\n\"know the concrete type of the `Pet` in order to do this.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-lang.\"\n\"org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"Sie können das `Iterator`\\\\-Merkmal für Ihre eigenen Typen implementieren:\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"`Lesen` und `Schreiben` für IO verwendet,\"\n\n#: src/std-types.md src/memory-management.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"\"\n\n#: src/std-types.md src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Funktionen\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"Vec\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common types \"\n\"used by Rust libraries and programs. This way, two libraries can work together \"\n\"smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust wird mit einer Standardbibliothek geliefert, die dabei hilft, eine Reihe \"\n\"gängiger Typen zu erstellen Wird von Rust-Bibliotheken und -Programmen \"\n\"verwendet. Auf diese Weise können zwei Bibliotheken zusammenarbeiten \"\n\"reibungslos, da beide den gleichen `String`\\\\-Typ verwenden.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, `alloc` \"\n\"and `std`.\"\nmsgstr \"\"\n\"Tatsächlich enthält Rust mehrere Schichten der Standardbibliothek: `core`, \"\n\"`alloc` und `std`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on `libc`, \"\n\"allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` enthält die grundlegendsten Typen und Funktionen, die nicht von `libc`, \"\n\"allocator oder abhängen sogar das Vorhandensein eines Betriebssystems.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"„alloc“ umfasst Typen, die einen globalen Heap-Zuordner erfordern, wie etwa \"\n\"„Vec“, „Box“ und „Arc“.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Eingebettete Rust-Anwendungen verwenden oft nur `core` und manchmal `alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Siehe die \\\\[Rust-Referenz\\\\] (https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/std/\"\n\"collections/struct.BinaryHeap.html).\"\nmsgstr \"`Lesen` und `Schreiben` für IO verwendet,\"\n\n#: src/std-types/docs.md\nmsgid \"Use `rustup doc --std` or <https://std.rs> to view the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is idiomatic \"\n\"to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Die Inhalte werden als Markdown behandelt. Alle veröffentlichten Rust-\"\n\"Bibliothekskästen (library crates) werden automatisch unter [`docs.rs`](https://\"\n\"docs.rs) mit [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) \"\n\"dokumentiert. Es ist idiomatisch, alle öffentlichen Elemente in einer API \"\n\"mithilfe dieses Musters zu dokumentieren.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!` \"\n\"or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/rand>.\"\nmsgstr \"\"\n\"Zeige den Schülern die generierten Dokumente für die Kiste (crate) `rand` unter \"\n\"[`docs.rs/rand`](https://docs.rs/rand).\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of type \"\n\"`T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/stable/\"\n\"std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"„Option“ und „Ergebnis“ werden nicht nur in der Standardbibliothek häufig \"\n\"verwendet.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The \\\"niche optimization\\\" means that `Option<T>` often has the same size in \"\n\"memory as `T`, if there is some representation that is not a valid value of T. \"\n\"For example, a reference cannot be NULL, so `Option<&T>` automatically uses \"\n\"NULL to represent the `None` variant, and thus can be stored in the same memory \"\n\"as `&T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the case \"\n\"where an error should never happen, `unwrap()` or `expect()` can be called, and \"\n\"this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Wie bei `Option` befindet sich der erfolgreiche Wert innerhalb von `Result`, \"\n\"was den Entwickler dazu zwingt explizit extrahieren. Dies fördert die \"\n\"Fehlerprüfung. Für den Fall, dass niemals ein Fehler passieren sollte, \"\n\"`unwrap()` oder `expect()` können aufgerufen werden, und dies ist auch ein \"\n\"Signal für die Absicht des Entwicklers.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it is \"\n\"worth mentioning. It contains a lot of convenience methods and functions that \"\n\"help functional-style programming.\"\nmsgstr \"\"\n\"Die `Result`\\\\-Dokumentation ist eine empfohlene Lektüre. Nicht während des \"\n\"Kurses, aber es ist erwähnenswert. Es enthält viele bequeme Methoden und \"\n\"Funktionen, die bei der funktionalen Programmierung helfen.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on Day \"\n\"4.\"\nmsgstr \"\"\n\"„Ergebnis“ ist der Standardtyp zur Implementierung der Fehlerbehandlung, wie \"\n\"wir an Tag 3 sehen werden.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) ist der \"\n\"Standard-Heap-zugewiesene erweiterbare UTF-8-String-Puffer:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call all \"\n\"`str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementiert [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), was bedeutet, dass Sie alle \"\n\"aufrufen können `str`\\\\-Methoden auf einem `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when you \"\n\"know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be different \"\n\"from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due to \"\n\"[grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it access \"\n\"to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, out-\"\n\"of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character boundaries \"\n\"or not.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.rust-\"\n\"lang.org/std/string/trait.ToString.html#tymethod.to_string) method. This trait \"\n\"is automatically implemented for all types that implement `Display`, so \"\n\"anything that can be formatted can also be converted to a string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) ist der \"\n\"Standardpuffer mit anpassbarer Heapzuweisung:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementiert [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), was bedeutet, dass Sie Slice aufrufen \"\n\"können Methoden auf einem `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data it \"\n\"contains is stored on the heap. This means the amount of data doesn't need to \"\n\"be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established during \"\n\"the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it supports \"\n\"adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a value \"\n\"of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Standard-Hash-Map mit Schutz vor HashDoS-Angriffen:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert the \"\n\"alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://doc.\"\n\"rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,\"\n\"+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows us to easily \"\n\"initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-value \"\n\"tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the Rust \"\n\"docs. Show students the docs for this type, and the helpful link back to the \"\n\"`keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values have \"\n\"been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` values. \"\n\"Make the struct and its methods generic over the type of value being tracked, \"\n\"that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.HashMap.html#method.entry) method to halve the number of \"\n\"hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From und Into\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"Read and Write\"\nmsgstr \"`Lesen` und `Schreiben`\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation for \"\n\"each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived for \"\n\"types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) and \"\n\"implies `PartialEq`. Functions that require full equivalence will use `Eq` as a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Lesen` und `Schreiben`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.rust-\"\n\"lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Das Überladen von Operatoren wird über Traits in `std::ops` implementiert:\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\n#, fuzzy\nmsgid \"Discussion points:\"\nmsgstr \"Diskussionspunkte:\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Sie könnten `Add` für `&Point` implementieren. In welchen Situationen ist das \"\n\"sinnvoll?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Antwort: `Add:add` verbraucht `self`. Geben Sie \\\"T\\\" ein, für das Sie sind Das \"\n\"Überladen des Operators ist nicht \\\"Kopieren\\\", Sie sollten das Überladen in \"\n\"Betracht ziehen auch der Operator für `&T`. Dies vermeidet unnötiges Klonen auf \"\n\"der Website aufrufen.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Warum ist `Output` ein assoziierter Typ? Könnte es ein Typparameter gemacht \"\n\"werden?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a trait.\"\nmsgstr \"\"\n\"Kurze Antwort: Typparameter werden vom Aufrufer gesteuert, aber Zugehörige \"\n\"Typen (wie `Output`) werden vom Implementierer von a gesteuert Merkmal.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, i32)> \"\n\"for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"The `Not` trait (`!` operator) is notable because it does not \\\"boolify\\\" like \"\n\"the same operator in C-family languages; instead, for integer types it negates \"\n\"each bit of the number, which arithmetically is equivalent to subtracting it \"\n\"from -1: `!5 == -6`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) \"\n\"and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions. Unlike `as`, these traits correspond to lossless, \"\n\"infallible conversions.\"\nmsgstr \"\"\n\"Typen implementieren „From“ und „Into“, um Typkonvertierungen zu erleichtern:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html) is implemented:\"\nmsgstr \"„Into“ wird automatisch implementiert, wenn „From“ implementiert wird:\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get `Into` \"\n\"implementation too.\"\nmsgstr \"\"\n\"Aus diesem Grund ist es üblich, nur `From` zu implementieren, da Ihr Typ auch \"\n\"die `Into`\\\\-Implementierung erhält.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. Your \"\n\"function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Beim Deklarieren eines Funktionsargument-Eingabetyps wie „alles, was in einen \"\n\"„String“ konvertiert werden kann“, ist die Regel umgekehrt, Sie sollten „Into“ \"\n\"verwenden. Ihre Funktion akzeptiert Typen, die `From` implementieren, und \"\n\"solche, die _nur_ `Into` implementieren.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts with \"\n\"`as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting to \"\n\"a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use incorrectly, \"\n\"and can be a source of subtle bugs as future maintenance work changes the types \"\n\"that are used or the ranges of values in types. Casts are best used only when \"\n\"the intent is to indicate unconditional truncation (e.g. selecting the bottom \"\n\"32 bits of a `u64` with `as u32`, regardless of what was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` over \"\n\"`as` to confirm that the cast is in fact infallible. For fallible casts, \"\n\"`TryFrom` and `TryInto` are available when you want to handle casts that fit \"\n\"differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might be \"\n\"lost is generally discouraged, or at least deserves an explanatory comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`BufRead`]\"\n\"(https://doc.rust-lang.org/std/io/trait.BufRead.html), you can abstract over \"\n\"`u8` sources:\"\nmsgstr \"Mit `Read` und `BufRead` können Sie über `u8`\\\\-Quellen abstrahieren:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"In ähnlicher Weise können Sie mit \\\"Write\\\" über \\\"u8\\\"-Senken abstrahieren:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {buffer:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The `Default` Trait\"\nmsgstr \"Die `Drop`\\\\-Eigenschaft\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to their \"\n\"default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. `0`, \"\n\"`\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/book/\"\n\"ch05-01-defining-structs.html#creating-instances-from-other-instances-with-\"\n\"struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, they \"\n\"implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html), \"\n\"[`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and [`FnOnce`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Closures oder Lambda-Ausdrücke haben Typen, die nicht benannt werden können. \"\n\"Allerdings sie spezielles \\\\[`Fn`\\\\] implementieren (https://doc.rust-lang.org/\"\n\"std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.\"\n\"html) und [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) \"\n\"Eigenschaften:\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling {func_name}({input}): {}\\\"\"\nmsgstr \"Unsichere Funktionen aufrufen\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can be \"\n\"called needing only a shared reference to the closure, which means the closure \"\n\"can be executed repeatedly and even concurrently.\"\nmsgstr \"\"\n\"Ein „Fn“ verbraucht oder mutiert erfasste Werte nicht oder erfasst vielleicht \"\n\"gar nichts, also kann es das mehrmals gleichzeitig aufgerufen werden.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure object \"\n\"is accessed via exclusive reference, so it can be called repeatedly but not \"\n\"concurrently.\"\nmsgstr \"\"\n\"Ein `FnMut` kann erfasste Werte mutieren, sodass Sie es mehrmals, aber nicht \"\n\"gleichzeitig aufrufen können.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. Doing \"\n\"so consumes the closure and any values captured by move.\"\nmsgstr \"\"\n\"Wenn Sie ein `FnOnce` haben, können Sie es nur einmal aufrufen. Es kann \"\n\"erfasste Werte verbrauchen.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. I.\"\n\"e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can use \"\n\"an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` ist ein Untertyp von `FnOnce`. „Fn“ ist ein Untertyp von „FnMut“ und \"\n\"„FnOnce“. D.h. Sie können eine verwenden „FnMut“, wo immer ein „FnOnce“ \"\n\"verlangt wird, und Sie können ein „Fn“ überall dort verwenden, wo ein „FnMut“ \"\n\"oder „FnOnce“ steht ist angesagt.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(which can be passed to a consumer of any of the 3 closure traits), then \"\n\"`FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures. Function pointers \"\n\"(references to `fn` items) implement `Copy` and `Fn`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture each variable from an outer scope by the \"\n\"least demanding form of access they can (by shared reference if possible, then \"\n\"exclusive reference, then by move). The `move` keyword forces capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://en.\"\n\"wikipedia.org/wiki/ROT13). Copy this code to the playground, and implement the \"\n\"missing bits. Only rotate ASCII alphabetic characters, to ensure the result is \"\n\"still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating by \"\n\"13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"Willkommen zu Tag 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures memory \"\n\"safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Stack: Kontinuierlicher Speicherbereich für lokale Variablen.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Werte haben feste Größen, die zur Kompilierzeit bekannt sind.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Extrem schnell: Durch Bewegen eines Stapelzeigers.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Einfach zu verwalten: folgt Funktionsaufrufen.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Große Speicherlokalität (memory locality).\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap: Speicherung von Werten außerhalb von Funktionsaufrufen.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Werte haben dynamische Größen, die zur Laufzeit bestimmt werden.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Etwas langsamer als der Stapel: Etwas Buchhaltung ist erforderlich.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Keine Garantie für Speicherlokalität.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Das Erstellen eines \\\"Strings\\\" legt Daten mit fester Größe auf den Stapel und \"\n\"dynamisch in der Größe Daten auf dem Haufen:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and length \"\n\"and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should point \"\n\"out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Traditionell fallen Sprachen in zwei grobe Kategorien:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"Volle Kontrolle über manuelle Speicherverwaltung: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Volle Sicherheit durch automatische Speicherverwaltung zur Laufzeit: Java, \"\n\"Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Typically implemented with reference counting or garbage collection.\"\nmsgstr \"Hat keine Laufzeit oder Speicherbereinigung (garbage collection).\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust bietet eine neue Mischung:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Volle Kontrolle _und_ Sicherheit durch Erzwingung des korrekten Speichers zur \"\n\"Kompilierzeit.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\"Dies geschieht mit einem expliziten Eigentumskonzept (explicit ownership \"\n\"concept).\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put Rust \"\n\"in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, or \"\n\"dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory is \"\n\"freed when a function returns. It is still quite easy to mis-use these tools \"\n\"and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that is \"\n\"no longer reachable and discard it. This guarantees that any pointer can be \"\n\"dereferenced, eliminating use-after-free and other classes of bugs. But, GC has \"\n\"a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance of \"\n\"C, with alloc and free operations precisely where they are required -- zero \"\n\"cost. It also provides tools similar to C++'s smart pointers. When required, \"\n\"other options such as reference counting are available, and there are even \"\n\"crates available to support runtime garbage collection (not covered in this \"\n\"class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error to \"\n\"use a variable outside its scope:\"\nmsgstr \"\"\n\"Alle Variablenbindungen haben einen _Geltungsbereich_, wo sie gültig sind und \"\n\"es ein Fehler ist Verwenden Sie eine Variable außerhalb ihres \"\n\"Gültigkeitsbereichs:\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely one \"\n\"owner at all times.\"\nmsgstr \"Wir sagen, dass die Variable den Wert _besitzt_.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"Am Ende des Gültigkeitsbereichs wird die Variable _gelöscht_ und die Daten \"\n\"werden freigegeben.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable memory. \"\n\"Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Eine Zuweisung überträgt den Besitz zwischen Variablen:\"\n\n#: src/memory-management/move.md src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"Die Zuweisung von `s1` an `s2` überträgt das Eigentum.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Wenn `s1` den Gültigkeitsbereich verlässt, passiert nichts: Es hat keinen \"\n\"Besitz.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"Wenn `s2` den Geltungsbereich verlässt, werden die String-Daten freigegeben.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before move to `s2`:\"\nmsgstr \"Vor dem Wechsel zu `s2`:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After move to `s2`:\"\nmsgstr \"Nach Umzug nach `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Wenn Sie einer Funktion einen Wert übergeben, wird der Wert der Funktion \"\n\"zugewiesen Parameter. Dadurch wird das Eigentum übertragen:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Anteilstypen\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by value \"\n\"unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Erwähnen Sie, dass dies das Gegenteil der Standardeinstellungen in C++ ist, die \"\n\"nach Wert kopieren, es sei denn, Sie verwenden `std::move` (und der Move-\"\n\"Konstruktor ist definiert!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated to \"\n\"manipulate the data itself is a matter of optimization, and such copies are \"\n\"aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Mit dem ersten Aufruf von `say_hello` gibt `main` den Besitz von `name` auf. \"\n\"Danach kann `name` nicht mehr innerhalb von `main` verwendet werden.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"Der für `name` zugewiesene Heap-Speicher wird am Ende der `say_hello`\\\\-\"\n\"Funktion freigegeben.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and if \"\n\"`say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` kann den Besitz behalten, wenn es `name` als Referenz (`&name`) übergibt \"\n\"und wenn `say_hello` eine Referenz als Parameter akzeptiert.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternativ kann `main` beim ersten Aufruf (`name.clone()`) einen Klon von \"\n\"`name` übergeben.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust macht es schwieriger als C++, versehentlich Kopien zu erstellen, indem es \"\n\"die Bewegungssemantik zum Standard macht und Programmierer dazu zwingt, Klone \"\n\"explizit zu machen.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Doppel-Freigabe-Fehler in modernem C++\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Modernes C++ löst dies anders:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Die Heap-Daten von `s1` werden dupliziert und `s2` bekommt seine eigene \"\n\"unabhängige Kopie.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Wenn `s1` und `s2` den Geltungsbereich verlassen, geben sie jeweils ihren \"\n\"eigenen Speicher frei.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before copy-assignment:\"\nmsgstr \"Vor Kopierauftrag:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After copy-assignment:\"\nmsgstr \"Nach der Kopierzuweisung:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the move, \"\n\"`s1` would be in a valid but unspecified state. Unlike Rust, the programmer is \"\n\"allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type which \"\n\"is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait accomplishes \"\n\"this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, and \"\n\"return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.g. \"\n\"clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Während die Bewegungssemantik der Standard ist, werden bestimmte Typen \"\n\"standardmäßig kopiert:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Diese Typen implementieren das `Copy`\\\\-Merkmal.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Sie können Ihre eigenen Typen für die Verwendung von Kopiersemantik aktivieren:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Nach der Zuweisung besitzen sowohl `p1` als auch `p2` ihre eigenen Daten.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"Wir können auch `p1.clone()` verwenden, um die Daten explizit zu kopieren.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Kopieren und Klonen sind nicht dasselbe:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Kopieren bezieht sich auf bitweises Kopieren von Speicherbereichen und \"\n\"funktioniert nicht mit beliebigen Objekten.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Beim Kopieren ist keine benutzerdefinierte Logik möglich (im Gegensatz zu \"\n\"Kopierkonstruktoren in C++).\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Klonen ist eine allgemeinere Operation und ermöglicht auch benutzerdefiniertes \"\n\"Verhalten durch Implementieren der Eigenschaft \\\"Klonen\\\".\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\"Das Kopieren funktioniert nicht bei Typen, die das `Drop`\\\\-Merkmal \"\n\"implementieren.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"In the above example, try the following:\"\nmsgstr \"Versuchen Sie im obigen Beispiel Folgendes:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` is \"\n\"not a `Copy` type.\"\nmsgstr \"\"\n\"Fügen Sie ein `String`\\\\-Feld zu `struct Point` hinzu. Es wird nicht \"\n\"kompiliert, da `String` kein `Copy`\\\\-Typ ist.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Entfernen Sie „Copy“ aus dem „derive“-Attribut. Der Compiler-Fehler steht jetzt \"\n\"im `println!` für `p1`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Zeigen Sie, dass es funktioniert, wenn Sie stattdessen `p1` klonen.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because Rust requires that mutable references be exclusive, so while it's valid \"\n\"to make a copy of a shared reference, creating a copy of a mutable reference \"\n\"would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"The `Drop` Trait\"\nmsgstr \"Die `Drop`\\\\-Eigenschaft\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Werte, die \\\"Drop\\\" implementieren, können Code angeben, der ausgeführt werden \"\n\"soll, wenn sie den Gültigkeitsbereich verlassen:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop values \"\n\"earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Warum nimmt `Drop::drop` nicht `self`?\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Kurzantwort: Wenn ja, würde `std::mem::drop` am Ende von aufgerufen werden den \"\n\"Block, was zu einem weiteren Aufruf von `Drop::drop` und einem Stack führt \"\n\"Überlauf!\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Versuchen Sie, `drop(a)` durch `a.drop()` zu ersetzen.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value piece-\"\n\"by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"Box<T>\"\nmsgstr \"`Kasten`\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) ist ein eigener \"\n\"Zeiger auf Daten auf dem Heap:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call methods \"\n\"from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/trait.Deref.\"\n\"html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementiert `Deref<Target = T>`, was bedeutet, dass Sie [Methoden \"\n\"aufrufen können von `T` direkt auf eine `Box<T>`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes cannot be stored inline \"\n\"without a pointer indirection. `Box` accomplishes that indirection:\"\nmsgstr \"\"\n\"Rekursive Datentypen oder Datentypen mit dynamischer Größe müssen eine `Box` \"\n\"verwenden:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"- - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"- - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be not \"\n\"null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size can't be known at compile time, but the Rust compiler \"\n\"wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` so \"\n\"only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the struct \"\n\"in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and just \"\n\"points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get the \"\n\"message \\\"recursive without indirection\\\", because for data recursion, we have \"\n\"to use indirection, a `Box` or reference of some kind, instead of storing the \"\n\"value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. This \"\n\"makes `Box` one of the types that allow the compiler to optimize storage of \"\n\"some enums (the \\\"niche optimization\\\").\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-counted \"\n\"shared pointer. Use this when you need to refer to the same data from multiple \"\n\"places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) ist ein \"\n\"referenzgezählter gemeinsamer Zeiger. Verwenden Sie dies, wenn Sie verweisen \"\n\"müssen auf dieselben Daten von mehreren Orten:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.org/\"\n\"std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there are \"\n\"references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and increases \"\n\"the reference count. Does not make a deep clone and can generally be ignored \"\n\"when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create cycles \"\n\"that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` to \"\n\"create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Speicherlayout nach Zuweisung von `xs`:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - -.\\n\"\n\":                               :     :                                             :\\n\"\n\":    \\\"pets: Vec<Box<dyn Pet>>\\\"  :     :   \\\"data: Cat\\\"         +----+----\"\n\"+----+----+ :\\n\"\n\":   +-----------+-------+       :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+-------+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |       :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |       :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+       :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                               :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                               :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                                   `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                      :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                      :     |     \"\n\"|                                 :\\n\"\n\"                                      `- - -| - - |- - - - - - - - - - - - - - \"\n\"- - -'\\n\"\n\"                                            |     |\\n\"\n\"                                            |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                      .- - -| - - |- - - - - - - - - - - - - - \"\n\"- - -.\\n\"\n\"                                      :     |     |       \"\n\"vtable                    :\\n\"\n\"                                      :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                      :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :     |            +----------------------\"\n\"+   :\\n\"\n\"                                      :     |             \"\n\"vtable                    :\\n\"\n\"                                      :     |            +----------------------\"\n\"+   :\\n\"\n\"                                      :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :                  +----------------------\"\n\"+   :\\n\"\n\"                                      :                                             :\\n\"\n\"                                      '- - - - - - - - - - - - - - - - - - - - \"\n\"- - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Merkmale können vorimplementierte (Standard-)Methoden und Methoden \"\n\"spezifizieren, die Benutzer selbst implementieren müssen. Methoden mit \"\n\"Standardimplementierungen können sich auf erforderliche Methoden stützen.\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"Typen, die ein bestimmtes Merkmal implementieren, können unterschiedlich groß \"\n\"sein. Das macht es unmöglich Dinge wie `Vec<Greet>` im obigen Beispiel zu haben.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on the \"\n\"heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` implementation \"\n\"of that particular object.\"\nmsgstr \"\"\n\"„dyn Greet“ ist eine Möglichkeit, dem Compiler einen Typ mit dynamischer Größe \"\n\"mitzuteilen, der „Greet“ implementiert.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` has \"\n\"a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\"Im Beispiel enthält `pets` Fat Pointer auf Objekte, die `Greet` implementieren. \"\n\"Der Fat Pointer besteht aus zwei Komponenten, einem Zeiger auf das tatsächliche \"\n\"Objekt und einem Zeiger auf die virtuelle Methodentabelle für die \\\"Greet\\\"-\"\n\"Implementierung dieses bestimmten Objekts.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two children \"\n\"(left and right). We will create a tree where each node stores a value. For a \"\n\"given node N, all nodes in a N's left subtree contain smaller values, and all \"\n\"nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the values \"\n\"in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Anstatt den Besitz beim Aufruf einer Funktion zu übertragen, können Sie a \"\n\"function _borrow_ den Wert:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\"Die `add`\\\\-Funktion _leiht_ zwei Punkte und gibt einen neuen Punkt zurück.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Der Aufrufer behält das Eigentum an den Eingaben.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"Hinweise zur Stapelrückgabe:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change the \"\n\"above code to print stack addresses and run it on the [Playground](https://play.\"\n\"rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay the \"\n\"same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a function \"\n\"level with `#[inline(never)]`.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return of \"\n\"the value depends on the ABI, e.g. on amd64 the two i32 that is making up the \"\n\"point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"We've already seen that a reference cannot _outlive_ the value it borrows:\"\nmsgstr \"Rust schränkt die Art und Weise ein, wie Sie Werte ausleihen können:\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"There's also a second main rule that the borrow checker enforces: The \"\n\"_aliasing_ rule. For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Sie können jederzeit einen oder mehrere `&T`\\\\-Werte haben, _oder_\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Sie können genau einen `&mut T`\\\\-Wert haben.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The \\\"outlives\\\" rule was demonstrated previously when we first looked at \"\n\"references. We review it here to show students that the borrow checking is \"\n\"following a few different rules to validate borrowing.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Der obige Code lässt sich nicht kompilieren, da `a` gleichzeitig als \"\n\"veränderlich (durch `c`) und als unveränderlich (durch `b`) ausgeliehen wird.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` to \"\n\"make the code compile.\"\nmsgstr \"\"\n\"Verschieben Sie die `println!`\\\\-Anweisung für `b` vor den Gültigkeitsbereich, \"\n\"der `c` einführt, um den Code zu kompilieren.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before the \"\n\"new mutable borrow of `a` through `c`. This is a feature of the borrow checker \"\n\"called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Nach dieser Änderung erkennt der Compiler, dass `b` immer nur vor dem neuen \"\n\"änderbaren Borgen von `a` bis `c` verwendet wird. Dies ist eine Funktion des \"\n\"Borrow-Checkers, die als \\\"nicht-lexikalische Lebensdauern\\\" bezeichnet wird.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure that \"\n\"data races do not occur. Rust also _relies_ on this constraint to optimize \"\n\"code. For example, a value behind a shared reference can be safely cached in a \"\n\"register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same time. \"\n\"But, there are some situations where it doesn't quite \\\"get it\\\" and this often \"\n\"results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to its \"\n\"elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements into \"\n\"it can potentially invalidate existing references to the collection's elements \"\n\"if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-only) \"\n\"reference. For example, a shared data structure might have an internal cache, \"\n\"and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind a \"\n\"shared reference. The standard library provides several ways to do this, all \"\n\"while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Zelle<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value using only a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the inner value. Since there are no references, borrowing rules cannot be \"\n\"broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` allows accessing and mutating a wrapped value by providing \"\n\"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without \"\n\"actually being Rust references.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"These types perform dynamic checks using a counter in the `RefCell` to prevent \"\n\"existence of a `RefMut` alongside another `Ref`/`RefMut`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow \"\n\"calling methods on the inner value without allowing references to escape.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ ways \"\n\"to modify data behind a shared reference. There are a variety of ways to ensure \"\n\"that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this case, \"\n\"all borrows are very short and never overlap, so the checks always succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` can't \"\n\"be passed between threads. This prevents two threads trying to access the cell \"\n\"at once.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, you \"\n\"need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Sie arbeiten an der Implementierung eines Gesundheitsüberwachungssystems. Als \"\n\"Teil davon Sie müssen die Gesundheitsstatistiken der Benutzer verfolgen.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Sie beginnen mit einigen Stub-Funktionen in einem `impl`\\\\-Block sowie einem \"\n\"`User` Strukturdefinition. Ihr Ziel ist es, die Stubbed-out-Methoden auf dem zu \"\n\"implementieren `User` `struct` definiert im `impl` Block.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und füllen \"\n\"Sie die fehlenden aus Methoden:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes can \"\n\"also be explicit: `&'a Point`, `&'document str`. Lifetimes start with `'` and \"\n\"`'a` is a typical default name. Read `&'a Point` as \\\"a borrowed `Point` which \"\n\"is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Lebensdauern in Funktionsaufrufen\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, but \"\n\"Rust allows lifetimes to be elided in most cases with [a few simple rules]\"\n\"(https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, that \"\n\"lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for validity \"\n\"by the compiler. Note that this is not the case for raw pointers (unsafe), and \"\n\"this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have lifetimes. \"\n\"Most of the time, elision and type inference mean these don't need to be \"\n\"written out. In more complicated cases, lifetime annotations can help resolve \"\n\"ambiguity. Often, especially when prototyping, it's easier to just work with \"\n\"owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Lebensdauern in Datenstrukturen\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Wenn ein Datentyp geliehene Daten speichert, muss er mit einer Lebensdauer \"\n\"versehen werden:\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"Im obigen Beispiel erzwingt die Anmerkung zu `Highlight`, dass die Daten, die \"\n\"dem enthaltenen `&str` zugrunde liegen, mindestens so lange leben wie jede \"\n\"Instanz von `Highlight`, die diese Daten verwendet.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), the \"\n\"borrow checker throws an error.\"\nmsgstr \"\"\n\"Wenn `text` vor dem Ende der Lebensdauer von `fox` (oder `dog`) verbraucht \"\n\"wird, wirft der Borrow-Checker einen Fehler.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This can \"\n\"be useful for creating lightweight views, but it generally makes them somewhat \"\n\"harder to use.\"\nmsgstr \"\"\n\"Typen mit geliehenen Daten zwingen Benutzer, an den Originaldaten festzuhalten. \"\n\"Dies kann nützlich sein, um einfache Ansichten zu erstellen, macht sie jedoch \"\n\"im Allgemeinen etwas schwieriger zu verwenden.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"Wenn möglich, machen Sie Datenstrukturen direkt Eigentümer ihrer Daten.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime of \"\n\"the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Einige Strukturen mit mehreren darin enthaltenen Referenzen können mehr als \"\n\"eine lebenslange Anmerkung haben. Dies kann erforderlich sein, wenn zusätzlich \"\n\"zur Lebensdauer der Struktur selbst Lebensdauerbeziehungen zwischen den \"\n\"Referenzen selbst beschrieben werden müssen. Das sind sehr fortgeschrittene \"\n\"Anwendungsfälle.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's simpler \"\n\"than it seems! This illustrates a common parsing pattern, passing slices of \"\n\"data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` file. \"\n\"In this exercise, we'll encode that information into `match` statements in \"\n\"functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"Messages\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each is \"\n\"implemented as a \\\"tag\\\" followed by the value. The tag contains a field number \"\n\"(e.g., `2` for the `id` field of a `Person` message) and a wire type defining \"\n\"how the payload should be determined from the byte stream. These are combined \"\n\"into a single integer, as decoded in `unpack_tag` below.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"Varint\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"Wire Types\"\nmsgstr \"Skalare Typen\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Proto defines several wire types, only two of which are used in this exercise.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The `Varint` wire type contains a single varint, and is used to encode proto \"\n\"values of type `int32` such as `Person.id`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The `Len` wire type contains a length expressed as a varint, followed by a \"\n\"payload of that number of bytes. This is used to encode proto values of type \"\n\"`string` such as `Person.name`. It is also used to encode proto values \"\n\"containing sub-messages such as `Person.phones`, where the payload contains an \"\n\"encoding of the sub-message.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The given code also defines callbacks to handle `Person` and `PhoneNumber` \"\n\"fields, and to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    // little-endian order containing a 64-bit signed integer or double type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I32(i32),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"String\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md src/modules/exercise.md\n#: src/modules/solution.md src/testing/unit-tests.md src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"beautiful name\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Evan\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1234-777-9090\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"home\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// Put that all together into a single parse.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"maxwell\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1202-555-1212\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1800-867-5308\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"mobile\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, e.\"\n\"g. if you try to parse an `i32` when there are fewer than 4 bytes left in the \"\n\"data buffer. In normal Rust code we'd handle this with the `Result` enum, but \"\n\"for simplicity in this exercise we panic if any errors are encountered. On day \"\n\"4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"Heute werden wir einige fortgeschrittenere Themen von Rust behandeln:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Testen\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 50 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"Iterator Trait\"\nmsgstr \"Iteratoren\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"Iterator Helper Methods\"\nmsgstr \"`Iterator`\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"collect\"\nmsgstr \"Aufstellen\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"IntoIterator\"\nmsgstr \"`IntoIterator`\"\n\n#: src/iterators/motivation.md\n#, fuzzy\nmsgid \"Motivating Iterators\"\nmsgstr \"Strings und Iteratoren\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"If you want to iterate over the contents of an array, you'll need to define:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"Some state to keep track of where you are in the iteration process, e.g. an \"\n\"index.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"A condition to determine when iteration is done.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"Logic for updating the state of iteration each loop.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"Logic for fetching each element using that iteration state.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"In a C-style for loop you declare these things directly:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"In Rust we bundle this state and logic together into an object known as an \"\n\"\\\"iterator\\\".\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"This slide provides context for what Rust iterators do under the hood. We use \"\n\"the (hopefully) familiar construct of a C-style `for` loop to show how \"\n\"iteration requires some state and some logic, that way on the next slide we can \"\n\"show how an iterator bundles these together.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"Rust doesn't have a C-style `for` loop, but we can express the same thing with \"\n\"`while`:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"There's another way to express array iteration using `for` in C and C++: You \"\n\"can use a pointer to the front and a pointer to the end of the array and then \"\n\"compare those pointers to determine when the loop should end.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"If students ask, you can point out that this is how Rust's slice and array \"\n\"iterators work under the hood (though implemented as a Rust iterator).\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) trait \"\n\"defines how an object can be used to produce a sequence of values. For example, \"\n\"if we wanted to create an iterator that can produce the elements of a slice it \"\n\"might look something like this:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `SliceIter` example implements the same logic as the C-style `for` loop \"\n\"demonstrated on the last slide.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"Point out to the students that iterators are lazy: Creating the iterator just \"\n\"initializes the struct but does not otherwise do any work. No work happens \"\n\"until the `next` method is called.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"Iterators don't need to be finite! It's entirely valid to have an iterator that \"\n\"will produce values forever. For example, a half open range like `0..` will \"\n\"keep going until integer overflow occurs.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The \\\"real\\\" version of `SliceIter` is the [`slice::Iter`](https://doc.rust-\"\n\"lang.org/stable/std/slice/struct.Iter.html) type in the standard library, \"\n\"however the real version uses pointers under the hood instead of an index in \"\n\"order to eliminate bounds checks.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `SliceIter` example is a good example of a struct that contains a reference \"\n\"and therefore uses lifetime annotations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"You can also demonstrate adding a generic parameter to `SliceIter` to allow it \"\n\"to work with any kind of slice (not just `&[i32]`).\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"In addition to the `next` method that defines how an iterator behaves, the \"\n\"`Iterator` trait provides 70+ helper methods that can be used to build \"\n\"customized iterators.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Create a range from 1 to 10\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Keep only even numbers\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Square each number\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Sum up all the squared numbers\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\\\"The sum of squares of even numbers from 1 to 10 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming operations \"\n\"over collections (e.g. `map`, `filter`, `reduce`, etc). This is the trait where \"\n\"you can find all the documentation about them.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Many of these helper methods take the original iterator and produce a new \"\n\"iterator with different behavior. These are know as \\\"iterator adapter \"\n\"methods\\\".\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Some methods, like `sum` and `count`, consume the iterator and pull all of the \"\n\"elements out of it.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"These methods are designed to be chained together so that it's easy to build a \"\n\"custom iterator that does exactly what you need.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Rust's iterators are extremely efficient and highly optimizable. Even complex \"\n\"iterators made by combining many adapter methods will still result in code as \"\n\"efficient as equivalent imperative implementations.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\n#, fuzzy\nmsgid \"\"\n\"The [`collect`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.\"\n\"collect) method lets you build a collection from an [`Iterator`](https://doc.\"\n\"rust-lang.org/std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"Mit „FromIterator“ können Sie eine Sammlung aus einem „Iterator“ erstellen.\"\n\n#: src/iterators/collect.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"Any iterator can be collected in to a `Vec`, `VecDeque`, or `HashSet`. \"\n\"Iterators that produce key-value pairs (i.e. a two-element tuple) can also be \"\n\"collected into `HashMap` and `BTreeMap`.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"Show the students the definition for `collect` in the standard library docs. \"\n\"There are two ways to specify the generic type `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as shown. \"\n\"The `_` shorthand used here lets Rust infer the type of the `Vec` elements.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\n#, fuzzy\nmsgid \"\"\n\"If students are curious about how this works, you can bring up the \"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"trait, which defines how each type of collection gets built from an iterator.\"\nmsgstr \"\"\n\"Sie können das `Iterator`\\\\-Merkmal für Ihre eigenen Typen implementieren:\"\n\n#: src/iterators/collect.md\n#, fuzzy\nmsgid \"\"\n\"In addition to the basic implementations of `FromIterator` for `Vec`, \"\n\"`HashMap`, etc., there are also more specialized implementations which let you \"\n\"do cool things like convert an `Iterator<Item = Result<V, E>>` into a \"\n\"`Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Es gibt auch Implementierungen, mit denen Sie coole Dinge tun können, wie z \"\n\"`Iterator<Item = Result<V, E>>` in ein `Result<Vec<V>, E>`.\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"The reason type annotations are often needed with `collect` is because it's \"\n\"generic over its return type. This makes it harder for the compiler to infer \"\n\"the correct type in a lot of cases.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.IntoIterator.html) defines how to create an iterator for a type. It is \"\n\"used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Die Eigenschaft „Iterator“ sagt Ihnen, wie Sie _iteraten_, sobald Sie eine \"\n\"erstellt haben Iterator. Die zugehörige Eigenschaft `IntoIterator` sagt Ihnen, \"\n\"wie Sie den Iterator erstellen:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` and \"\n\"`&[T]`. Ranges also implement it. This is why you can iterate over a vector \"\n\"with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Die Syntax hier bedeutet, dass jede Implementierung von `IntoIterator` muss \"\n\"deklarieren Sie zwei Arten:\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: der Typ, über den wir iterieren, wie z. B. `i8`,\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\"`IntoIter`: der `Iterator`\\\\-Typ, der von der `into_iter`\\\\-Methode \"\n\"zurückgegeben wird.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Beachten Sie, dass „IntoIter“ und „Item“ verknüpft sind: Der Iterator muss \"\n\"dasselbe haben `Item`\\\\-Typ, was bedeutet, dass es `Option<Item>` zurückgibt\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in some_vector` \"\n\"will take ownership of `some_vector` and iterate over owned elements from that \"\n\"vector. Use `for e in &some_vector` instead, to iterate over references to \"\n\"elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods in \"\n\"the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) trait \"\n\"to implement a complex calculation.\"\nmsgstr \"\"\n\"Sie können das `Iterator`\\\\-Merkmal für Ihre eigenen Typen implementieren:\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und führen \"\n\"Sie die Tests durch passieren. Versuchen Sie, Ihren Zwischenergebnissen kein \"\n\"„Vec“ zuzuweisen:\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by `offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Wir haben gesehen, wie `impl`\\\\-Blöcke Namensraumfunktionen zu einem Typ machen.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"In ähnlicher Weise lässt uns `mod` Namespace-Typen und -Funktionen zu:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that describes \"\n\"how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and a \"\n\"library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells Rust that the `garden` module content is found at `src/garden.rs`. \"\n\"Similarly, a `garden::vegetables` module can be found at `src/garden/vegetables.\"\n\"rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"Die „Kiste“-Wurzel befindet sich in:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (für eine Bibliothekskiste)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (für eine Binärkiste)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc comments\\\". \"\n\"These document the item that contains them -- in this case, a module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.rs` \"\n\"was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module in a \"\n\"file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Module sind eine Datenschutzgrenze:\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Modulelemente sind standardmäßig privat (versteckt Implementierungsdetails).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Übergeordnete und gleichgeordnete Elemente sind immer sichtbar.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all the \"\n\"descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope of \"\n\"public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of its \"\n\"descendants).\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"Visibility and Encapsulation\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Like with items in a module, struct fields are also private by default. Private \"\n\"fields are likewise visible within the rest of the module (including child \"\n\"modules). This allows us to encapsulate implementation details of struct, \"\n\"controlling what data and functionality is visible externally.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\\\"Is {} big? {}\\\"\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\\\"foo.val = {}\\\"\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"// let foo = Foo { val: 42, is_big: true };\\n\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"// println!(\\\"Is {} big? {}\\\", foo.val, foo.is_big);\\n\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"This slide demonstrates how privacy in structs is module-based. Students coming \"\n\"from object oriented languages may be used to types being the encapsulation \"\n\"boundary, so this demonstrates how Rust behaves differently while showing how \"\n\"we can still achieve encapsulation.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Note how the `is_big` field is fully controlled by `Foo`, allowing `Foo` to \"\n\"control how it's initialized and enforce any invariants it needs to (e.g. that \"\n\"`is_big` is only `true` if `val > 100`).\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Point out how helper functions can be defined in the same module (including \"\n\"child modules) in order to get access to the type's private fields/methods.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"The first commented out line demonstrates that you cannot initialize a struct \"\n\"with private fields. The second one demonstrates that you also can't directly \"\n\"access private fields.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Enums do not support privacy: Variants and data within those variants is always \"\n\"public.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"If students want more information about privacy (or lack thereof) in enums, you \"\n\"can bring up `#[doc_hidden]` and `#[non_exhaustive]` and show how they're used \"\n\"to limit what can be done with an enum.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\n#, fuzzy\nmsgid \"\"\n\"Module privacy still applies when there are `impl` blocks in other modules \"\n\"[(example in the playground)](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3e61f43c88de12bcdf69c1d6df9ab3da).\"\nmsgstr \"\"\n\"Testen Sie den obigen Code auf [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You will \"\n\"typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Pfade\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Pfade werden wie folgt aufgelöst:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"Als absoluter Pfad:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\"`crate::foo` bezieht sich auf `foo` im Stammverzeichnis der aktuellen Kiste,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`bar::foo` bezieht sich auf `foo` in der `bar`\\\\-Crate.\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the top-\"\n\"level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if a \"\n\"type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is discouraged \"\n\"because it is not clear which items are imported, and those might change over \"\n\"time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. This \"\n\"library defines a `Widget` trait and a few implementations of that trait, as \"\n\"well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Einrichtung\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, and \"\n\"get accustomed to the required `mod`, `use`, and `pub` declarations. Afterward, \"\n\"discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Rust and Cargo come with a simple unit test framework. Tests are marked with \"\n\"`#[test]`. Unit tests are often put in a nested `tests` module, using \"\n\"`#[cfg(test)]` to conditionally compile them only when building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Damit können Sie private Helfer testen.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"Das Attribut `#[cfg(test)]` ist nur aktiv, wenn Sie `cargo test` ausführen.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Integrationstests\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Wenn Sie Ihre Bibliothek als Client testen möchten, verwenden Sie einen \"\n\"Integrationstest.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Erstellen Sie eine `.rs`\\\\-Datei unter `tests/`:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Diese Tests haben nur Zugriff auf die öffentliche API Ihrer Crate.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Dokumentationstests\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust hat eine eingebaute Unterstützung für Dokumentationstests:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Codeblöcke in `///`\\\\-Kommentaren werden automatisch als Rust-Code angesehen.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Der Code wird im Rahmen von „Cargo Test“ kompiliert und ausgeführt.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/run \"\n\"it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Testen Sie den obigen Code auf [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful built-\"\n\"in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even more lints, \"\n\"organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints visible \"\n\"here, but those will not be shown once the code compiles. Switch to the \"\n\"Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show clippy \"\n\"warnings. Clippy has extensive documentation of its lints, and adds new lints \"\n\"(including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` or \"\n\"via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used to \"\n\"validate credit card numbers. The algorithm takes a string as input and does \"\n\"the following to validate the credit card number:\"\nmsgstr \"\"\n\"Dazu dient der [Luhn-Algorithmus](https://en.wikipedia.org/wiki/\"\n\"Luhn_algorithm). Kreditkartennummern validieren. Der Algorithmus nimmt eine \"\n\"Zeichenfolge als Eingabe und führt die aus Folgendes, um die Kreditkartennummer \"\n\"zu validieren:\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, along \"\n\"with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional tests \"\n\"to uncover bugs in the provided implementation, fixing any bugs you find.\"\nmsgstr \"\"\n\"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und füllen \"\n\"Sie die fehlenden aus Funktionen und Methoden:\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: accept whitespace.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: reject all other characters.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: check that we have at least two digits\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"Error Trait\"\nmsgstr \"Die `Drop`\\\\-Eigenschaft\"\n\n#: src/error-handling.md\nmsgid \"thiserror\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"anyhow\"\nmsgstr \"\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Rust löst eine Panik aus, wenn zur Laufzeit ein schwerwiegender Fehler auftritt:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Paniken sind für nicht behebbare und unerwartete Fehler.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Paniken sind Symptome von Fehlern im Programm.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions had \"\n\"returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Verwenden Sie Anti-Panik-APIs (wie `Vec::get`), wenn ein Absturz nicht \"\n\"akzeptabel ist.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be caught:\"\nmsgstr \"\"\n\"Standardmäßig führt eine Panik dazu, dass der Stack abgewickelt wird. Die \"\n\"Abwicklung kann gefangen werden:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with `catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Dies kann bei Servern nützlich sein, die auch bei einem einzigen weiterlaufen \"\n\"sollen Anfrage stürzt ab.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Dies funktioniert nicht, wenn in Ihrer `Cargo.toml` `panic = 'abort'` gesetzt \"\n\"ist.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://doc.\"\n\"rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly saw \"\n\"when discussing standard library types.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like `unwrap` \"\n\"make it easier to write quick-and-dirty code that doesn't do robust error \"\n\"handling, but means that you can always see in your source code where proper \"\n\"error handling is being skipped.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming languages.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or not.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise invalid \"\n\"success value.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with the \"\n\"`Result` type, but matching this type on every call can be cumbersome. The try-\"\n\"operator `?` is used to return errors to the caller. It lets you turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"ins viel einfachere\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Wir können dies verwenden, um unseren Fehlerbehandlungscode zu vereinfachen:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\"Die Variable „username“ kann entweder „Ok(string)“ oder „Err(error)“ sein.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Verwenden Sie den `fs::write`\\\\-Aufruf, um die verschiedenen Szenarien zu \"\n\"testen: keine Datei, leere Datei, Datei mit Benutzername.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. The \"\n\"executable will print the `Err` variant and return a nonzero exit status on \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"Die effektive Erweiterung von „?“ ist etwas komplizierter als zuvor angedeutet:\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"works the same as\"\nmsgstr \"funktioniert genauso wie\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Der `From::from`\\\\-Aufruf hier bedeutet, dass wir versuchen, den Fehlertyp in \"\n\"den zu konvertieren Typ, der von der Funktion zurückgegeben wird:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"I/O error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. A \"\n\"function that returns `Result<T, ErrorOuter>` can only use `?` on a value of \"\n\"type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the same type \"\n\"or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and `U` \"\n\"types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Dynamische Fehlertypen\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing our \"\n\"own enum covering all the different possibilities. The `std::error::Error` \"\n\"trait makes it easy to create a trait object that can contain any error.\"\nmsgstr \"\"\n\"Manchmal möchten wir zulassen, dass jede Art von Fehler zurückgegeben wird, \"\n\"ohne unsere eigene Enum-Abdeckung zu schreiben all die verschiedenen \"\n\"Möglichkeiten. `std::error::Error` macht das einfach.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) or \"\n\"`std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not a \"\n\"good idea to use `Box<dyn Error>` in the public API of a library, but it can be \"\n\"a good option in a program where you just want to display the error message \"\n\"somewhere.\"\nmsgstr \"\"\n\"Dies spart Code, gibt aber die Möglichkeit auf, verschiedene Fehlerfälle sauber \"\n\"unterschiedlich zu behandeln das Programm. Daher ist es im Allgemeinen keine \"\n\"gute Idee, `Box<dyn Error>` in der öffentlichen API von a zu verwenden \"\n\"Bibliothek, aber es kann eine gute Option in einem Programm sein, in dem Sie \"\n\"nur die Fehlermeldung anzeigen möchten irgendwo.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) crate provides macros to help \"\n\"avoid boilerplate when defining error types. It provides derive macros that \"\n\"assist in implementing `From<T>`, `Display`, and the `Error` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\\\"I/O error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"Note that the (`thiserror::`)`Error` derive macro, while it has the effect of \"\n\"implementing the (`std::error::`)`Error` trait, is not the same this; traits \"\n\"and macros do not share a namespace.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type with \"\n\"support for carrying additional contextual information, which can be used to \"\n\"provide a semantic trace of what the program was doing leading up to the error.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"This can be combined with the convenience macros from [`thiserror`](https://\"\n\"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom \"\n\"error types.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such it's \"\n\"again generally not a good choice for the public API of a library, but is \"\n\"widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` ist im Wesentlichen ein Wrapper um `Box<dyn Error>`. Als \"\n\"solches ist es wieder im Allgemeinen nicht eine gute Wahl für die öffentliche \"\n\"API einer Bibliothek, wird aber häufig in Anwendungen verwendet.\"\n\n#: src/error-handling/anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"`anyhow::Result<V>` ist ein Typ-Alias für `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Error` may be familiar to Go developers, as \"\n\"it provides similar behavior to the Go `error` type and `Result<T, anyhow::\"\n\"Error>` is much like a Go `(T, error)` (with the convention that only one \"\n\"element of the pair is meaningful).\"\nmsgstr \"\"\n\"Die von `anyhow::Result<T>` bereitgestellte Funktionalität ist Go-Entwicklern \"\n\"möglicherweise vertraut, da sie bereitgestellt wird ähnliche Nutzungsmuster und \"\n\"Ergonomie wie `(T, error)` von Go.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and `Option` \"\n\"types. `use anyhow::Context` is necessary to enable `.context()` and `.\"\n\"with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the \"\n\"specific error type stored inside can be extracted for examination if desired \"\n\"with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct.Error.\"\n\"html#method.downcast).\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"In this exercise we're revisiting the expression evaluator exercise that we did \"\n\"in day 2. Our initial solution ignores a possible error case: Dividing by zero! \"\n\"Rewrite `eval` to instead use idiomatic error handling to handle this error \"\n\"case and return an error when it occurs. We provide a simple \"\n\"`DivideByZeroError` type to use as the error type for `eval`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"// The original implementation of the expression evaluator. Update this to\\n\"\n\"// return a `Result` and produce an error when dividing by 0.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Cannot divide by zero!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The starting code here isn't exactly the same as the previous exercise's \"\n\"solution: We've added in an explicit panic to show students where the error \"\n\"case is. Point this out if students get confused.\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Die Rust-Sprache besteht aus zwei Teilen:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"**Safe Rust:** Speichersicher, kein undefiniertes Verhalten möglich.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are violated.\"\nmsgstr \"\"\n\"**Unsicherer Rost:** kann undefiniertes Verhalten auslösen, wenn Vorbedingungen \"\n\"verletzt werden.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what Unsafe \"\n\"Rust is.\"\nmsgstr \"\"\n\"Wir werden in diesem Kurs hauptsächlich sicheres Rust sehen, aber es ist \"\n\"wichtig zu wissen was unsicherer Rost ist.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Unsicherer Code ist normalerweise klein und isoliert, und seine Korrektheit \"\n\"sollte sorgfältig geprüft werden dokumentiert. Es ist normalerweise in eine \"\n\"sichere Abstraktionsschicht eingeschlossen.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Unsafe Rust bietet Ihnen Zugriff auf fünf neue Funktionen:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Rohzeiger dereferenzieren.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\"Greifen Sie auf veränderliche statische Variablen zu oder ändern Sie diese.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Greifen Sie auf `Union`\\\\-Felder zu.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"„Unsichere“ Funktionen aufrufen, einschließlich „externer“ Funktionen.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementieren Sie \\\"unsichere\\\" Eigenschaften.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-unsafe-\"\n\"rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"Als nächstes werden wir uns kurz mit unsicheren Fähigkeiten befassen. \"\n\"Ausführliche Informationen finden Sie unter [Kapitel 19.1 im Rust-Buch](https://\"\n\"doc.rust-lang.org/book/ch19-01-unsafe-rust.html) und das \\\\[Rustonomicon\\\\] \"\n\"(https://doc.rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers have \"\n\"turned off some compiler safety features and have to write correct code by \"\n\"themselves. It means the compiler no longer enforces Rust's memory-safety rules.\"\nmsgstr \"\"\n\"Unsicherer Rost bedeutet nicht, dass der Code falsch ist. Es bedeutet, dass \"\n\"Entwickler haben die Compiler-Sicherheitsfunktionen ausgeschaltet haben und \"\n\"korrekten Code schreiben müssen sich. Das bedeutet, dass der Compiler die \"\n\"Speichersicherheitsregeln von Rust nicht mehr erzwingt.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"Das Erstellen von Zeigern ist sicher, aber das Dereferenzieren erfordert \"\n\"\\\"unsicher\\\":\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write a \"\n\"comment for each `unsafe` block explaining how the code inside it satisfies the \"\n\"safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Es ist eine gute Praxis (und vom Android Rust Styleguide vorgeschrieben), für \"\n\"jeden einen Kommentar zu schreiben \\\"unsicherer\\\" Block, der erklärt, wie der \"\n\"darin enthaltene Code die Sicherheitsanforderungen des unsicheren Codes erfüllt \"\n\"Operationen, die es tut.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"Im Fall von Zeigerdereferenzen bedeutet dies, dass die Zeiger sein müssen \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), also:\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Der Zeiger darf nicht null sein.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single allocated \"\n\"object).\"\nmsgstr \"\"\n\"Der Zeiger muss _dereferenzierbar_ sein (innerhalb der Grenzen eines einzelnen \"\n\"zugewiesenen Objekts).\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"Das Objekt darf nicht freigegeben worden sein.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Es darf nicht gleichzeitig auf denselben Standort zugegriffen werden.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object must \"\n\"be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Wenn der Zeiger durch Casting einer Referenz erhalten wurde, muss das zugrunde \"\n\"liegende Objekt live sein und nein Referenz kann verwendet werden, um auf den \"\n\"Speicher zuzugreifen.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"In den meisten Fällen muss auch der Zeiger richtig ausgerichtet werden.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` has \"\n\"the `'static` lifetime, so `r3` has type `&'static String`, and thus outlives \"\n\"`s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Es ist sicher, eine unveränderliche statische Variable zu lesen:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Da es jedoch zu Datenrennen kommen kann, ist es unsicher, änderbar zu lesen und \"\n\"zu schreiben statische Variablen:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the `unsafe` \"\n\"and see how the compiler explains that it is undefined behavior to mutate a \"\n\"static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases where \"\n\"it might make sense in low-level `no_std` code, such as implementing a heap \"\n\"allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Die Verwendung eines änderbaren statischen Werts ist im Allgemeinen eine \"\n\"schlechte Idee, aber es gibt einige Fälle, in denen es sinnvoll sein könnte in \"\n\"`no_std`\\\\-Code auf niedriger Ebene, wie z. B. die Implementierung eines Heap-\"\n\"Allokators oder die Arbeit mit einigen C-APIs.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Unions sind wie Aufzählungen, aber Sie müssen das aktive Feld selbst verfolgen:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Kein undefiniertes Verhalten (undefined behavior) zur Laufzeit:\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They are \"\n\"occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Unions werden in Rust sehr selten benötigt, da Sie normalerweise eine \"\n\"Aufzählung verwenden können. Sie werden gelegentlich benötigt für die \"\n\"Interaktion mit C-Bibliotheks-APIs.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.transmute.\"\n\"html) or a safe wrapper such as the [`zerocopy`](https://crates.io/crates/\"\n\"zerocopy) crate.\"\nmsgstr \"\"\n\"Wenn Sie Bytes nur als einen anderen Typ neu interpretieren möchten, möchten \"\n\"Sie dies wahrscheinlich tun [`std::mem::transmute`](https://doc.rust-lang.org/\"\n\"stable/std/mem/fn.transmute.html) oder einen Safe Wrapper wie die Kiste \"\n\"[`zerocopy`](https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Unsichere Funktionen aufrufen\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions you \"\n\"must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Eine Funktion oder Methode kann als „unsicher“ gekennzeichnet werden, wenn sie \"\n\"zusätzliche Voraussetzungen für Sie hat muss eingehalten werden, um \"\n\"undefiniertes Verhalten zu vermeiden:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Unsichere Funktionen schreiben\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Sie können Ihre eigenen Funktionen als \\\"unsicher\\\" markieren, wenn sie \"\n\"bestimmte Bedingungen erfordern, um undefined zu vermeiden Verhalten.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is unsafe for a different reason: it \"\n\"is an external function (FFI). Calling external functions is usually only a \"\n\"problem when those functions do things with pointers which might violate Rust's \"\n\"memory model, but in general any C function might have undefined behaviour \"\n\"under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Dies ist normalerweise nur ein Problem für externe Funktionen, die \"\n\"möglicherweise Dinge mit Zeigern tun verletzen das Speichermodell von Rust, \"\n\"aber im Allgemeinen kann jede C-Funktion undefiniertes Verhalten unter jeder \"\n\"haben willkürliche Umstände.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too](https://\"\n\"doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done safely \"\n\"with references.\"\nmsgstr \"\"\n\"Wir würden dafür eigentlich keine Zeiger verwenden, da dies mit Referenzen \"\n\"sicher möglich ist.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an `unsafe` \"\n\"block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. Try adding \"\n\"it and see what happens. This will likely change in a future Rust edition.\"\nmsgstr \"\"\n\"Beachten Sie, dass unsicherer Code innerhalb einer unsicheren Funktion ohne \"\n\"einen „unsicheren“ Block zulässig ist. Wir können verbieten Sie dies mit \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Versuchen Sie es hinzuzufügen und sehen Sie, \"\n\"was passiert.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Unsichere Merkmale implementieren\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Wie bei Funktionen können Sie ein Merkmal als \\\"unsicher\\\" markieren, wenn die \"\n\"Implementierung dies gewährleisten muss besondere Bedingungen, um undefiniertes \"\n\"Verhalten zu vermeiden.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):\"\nmsgstr \"\"\n\"Zum Beispiel hat die „Nullkopie“-Kiste eine unsichere Eigenschaft, die aussieht \"\n\"[etwas in der Art](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Es sollte einen Abschnitt „# Sicherheit“ im Rustdoc für das Merkmal geben, in \"\n\"dem die Anforderungen für erklärt werden die sicher zu implementierende \"\n\"Eigenschaft.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `IntoBytes` is rather longer and more complicated.\"\nmsgstr \"\"\n\"Der eigentliche Sicherheitsabschnitt für `AsBytes` ist etwas länger und \"\n\"komplizierter.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\"Die eingebauten Eigenschaften „Senden“ und „Synchronisieren“ sind unsicher.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Sicherer FFI-Wrapper\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust bietet großartige Unterstützung für den Aufruf von Funktionen über eine \"\n\"_foreign-Funktion Schnittstelle_ (FFI). Wir werden dies verwenden, um einen \"\n\"sicheren Wrapper für die `libc` zu erstellen Funktionen, die Sie von C \"\n\"verwenden würden, um die Dateinamen eines Verzeichnisses zu lesen.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Sie werden die Handbuchseiten konsultieren wollen:\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und füllen \"\n\"Sie die fehlenden aus Funktionen und Methoden:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {path:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call closedir as needed.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can write \"\n\"new services, libraries, drivers or even firmware in Rust (or improve existing \"\n\"code as needed).\"\nmsgstr \"\"\n\"Rust wird für die native Plattformentwicklung auf Android unterstützt. Das \"\n\"bedeutet, dass Sie können neue Betriebssystemdienste in Rust schreiben und \"\n\"erweitern bestehende Dienste.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust in \"\n\"Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-rust-\"\n\"binder-v1-0-08ba9197f637@google.com/).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html).\"\nmsgstr \"\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Wir werden ein Android Virtual Device verwenden, um unseren Code zu testen. \"\n\"Stell sicher dass du hast Greifen Sie auf eines zu oder erstellen Sie ein neues \"\n\"mit:\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Bitte lesen Sie die \\\\[Android Developer Codelab\\\\] (https://source.android.com/\"\n\"docs/setup/start) für Details.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The code on the following pages can be found in the [`src/android/` directory]\"\n\"(https://github.com/google/comprehensive-rust/tree/main/src/android) of the \"\n\"course material. Please `git clone` the repository to follow along.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is the \"\n\"ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Das Android-Build-System (Soong) unterstützt Rust über eine Reihe von Modulen:\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"Modultyp\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Description\"\nmsgstr \"Beschreibung\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Erzeugt eine Rust-Binärdatei.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Erzeugt eine Rust-Bibliothek und bietet sowohl `rlib`\\\\- als auch `dylib`\\\\-\"\n\"Varianten.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static and \"\n\"shared variants.\"\nmsgstr \"\"\n\"Erzeugt eine Rust-C-Bibliothek, die von `cc`\\\\-Modulen verwendet werden kann, \"\n\"und bietet sowohl statische als auch gemeinsam genutzte Varianten.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler plugins.\"\nmsgstr \"\"\n\"Erzeugt eine `proc-macro` Rust-Bibliothek. Diese sind analog zu Compiler-\"\n\"Plugins.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Erzeugt eine Rust-Test-Binärdatei, die die standardmäßige Rust-Testumgebung \"\n\"verwendet.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Erzeugt eine Rust-Fuzz-Binärdatei, die `libfuzzer` nutzt.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for a \"\n\"particular protobuf.\"\nmsgstr \"\"\n\"Generiert Quellcode und erstellt eine Rust-Bibliothek, die eine Schnittstelle \"\n\"für einen bestimmten Protobuf bereitstellt.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Generiert Quellcode und erstellt eine Rust-Bibliothek, die Rust-Bindungen an C-\"\n\"Bibliotheken enthält.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Als nächstes schauen wir uns `rust_binary` und `rust_library` an.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must also \"\n\"interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to [Bazel](https://bazel.build/), which is the open-\"\n\"source variant of Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"Rust Binaries\"\nmsgstr \"Rust-Binärdateien\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, create \"\n\"the following files:\"\nmsgstr \"\"\n\"Beginnen wir mit einer einfachen Anwendung. Erstellen Sie im Stammverzeichnis \"\n\"eines AOSP-Checkouts folgende Dateien:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Sie können die Binärdatei jetzt erstellen, pushen und ausführen:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"Go through the build steps and demonstrate them running in your emulator.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Notice the extensive documentation comments? The Android build rules enforce \"\n\"that all modules have documentation. Try removing it and see what error you get.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Stress that the Rust build rules look like the other Soong rules. This is on \"\n\"purpose to make it as easy to use Rust as C++ or Java.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Rust Libraries\"\nmsgstr \"Rust-Bibliotheken\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Sie verwenden `rust_library`, um eine neue Rust-Bibliothek für Android zu \"\n\"erstellen.\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Hier deklarieren wir eine Abhängigkeit von zwei Bibliotheken:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, das wir unten definieren,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, das ist eine Kiste, in der bereits verkauft wird [`extern/rust/\"\n\"crates/`](https://cs.android.com/android/platform/superproject/+/master:\"\n\"external/rust/crates/).\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md src/android/aidl/example-service/service.md\n#: src/android/testing.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Sie erstellen, pushen und führen die Binärdatei wie zuvor aus:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"A Rust crate named `greetings` must be built by a rule called `libgreetings`. \"\n\"Note how the Rust code uses the crate name, as is normal in Rust.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"Again, the build rules enforce that we add documentation comments to all public \"\n\"items.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Die [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) wird in Rust unterstützt:\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Rust-Code kann bestehende AIDL-Server aufrufen,\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Sie können neue AIDL-Server in Rust erstellen.\"\n\n#: src/android/aidl.md\nmsgid \"AIDL is what enables Android apps to interact with each other.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"Since Rust is supported as a first-class citizen in this ecosystem, Rust \"\n\"services can be called by any other process on the phone.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement the \"\n\"described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"AIDL-Schnittstellen\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Sie deklarieren die API Ihres Dienstes über eine AIDL-Schnittstelle:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Binder generates a trait for each interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_out/soong/.intermediates/.../birthdayservice/IBirthdayService.rs_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use this \"\n\"trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument and \"\n\"return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Dienstimplementierung\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Wir können jetzt den AIDL-Dienst implementieren:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Dienstimplementierung\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain why \"\n\"each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"AIDL-Server\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\"Schließlich können wir einen Server erstellen, der den Dienst verfügbar macht:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case the \"\n\"`BirthdayService` type, which implements the `IBirthdayService`) and starting \"\n\"it as a Binder service has multiple steps, and may appear more complicated than \"\n\"students are used to if they've used Binder from C++ or another language. \"\n\"Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object (the \"\n\"`BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool and \"\n\"start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Wir können den Dienst jetzt erstellen, pushen und starten:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Überprüfen Sie in einem anderen Terminal, ob der Dienst ausgeführt wird:\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Sie können den Service auch mit `Service Call` aufrufen:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"AIDL-Client\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\"Schließlich können wir einen Rust-Client für unseren neuen Dienst erstellen.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Beachten Sie, dass der Client nicht von `libbirthdayservice` abhängt.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Erstellen, pushen und führen Sie den Client auf Ihrem Gerät aus:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref count \"\n\"that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses the \"\n\"exact same trait that the server implements. For a given Binder interface, \"\n\"there is a single Rust trait generated that both client and server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This should \"\n\"ideally be defined in a common crate that both the client and server can depend \"\n\"on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients specify a \"\n\"list of lines for the birthday card:\"\nmsgstr \"\"\n\"Lassen Sie uns die API um mehr Funktionalität erweitern: Wir möchten, dass \"\n\"Kunden a angeben Liste der Zeilen für die Geburtstagskarte:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a `&[String]` \"\n\"in Rust, i.e. that idiomatic Rust types are used in the generated bindings \"\n\"wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rost zum Beispiel\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`true`, `false`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"Beschreibung\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"Anteilstypen\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` becomes \"\n\"`[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. `int[3][4]`). In \"\n\"the Java backend, fixed-size arrays are represented as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-erased \"\n\"`IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a `File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a `File` \"\n\"(or any other type that wraps an `OwnedFd`), and can be used to create a new \"\n\"`File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests work \"\n\"in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"Sie können die Bindungen jetzt automatisch generieren:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"Der Gesamtansatz sieht wie folgt aus:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED in \"\n\"2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add googletest` to quickly add it to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust applications\\\"]\"\n\"(https://rust-exercises.com/advanced-testing/), a self-guided Rust course: it \"\n\"provides a guided introduction to the library, with exercises to help you get \"\n\"comfortable with `googletest` macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are shown \"\n\"as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. You \"\n\"need to refactor your code to use traits, which you can then quickly mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are other \"\n\"[mocking libraries available on crates.io](https://crates.io/keywords/mock), in \"\n\"particular in the area of mocking HTTP services. The other mocking libraries \"\n\"work in a similar fashion as Mockall, meaning that they make it easy to get a \"\n\"mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and more \"\n\"stable test execution. On the other hand, the mocks can be configured wrongly \"\n\"and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As an \"\n\"example, many databases allow you to configure an in-memory backend. This means \"\n\"that you get the correct behavior in your tests, plus they are fast and will \"\n\"automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away the \"\n\"framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example in \"\n\"a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock a \"\n\"cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this isn't \"\n\"satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) or \"\n\"`stdout` (on-host):\"\nmsgstr \"\"\n\"Sie sollten die `log`\\\\-Crate verwenden, um sich automatisch bei `logcat` (auf \"\n\"dem Gerät) anzumelden oder `stdout` (auf dem Host):\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Erstellen, übertragen und führen Sie die Binärdatei auf Ihrem Gerät aus:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Die Protokolle werden in `adb logcat` angezeigt:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"The logger implementation in `liblogger` is only needed in the final binary, if \"\n\"you're logging from a library you only need the `log` facade crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust bietet eine hervorragende Unterstützung für die Interoperabilität mit \"\n\"anderen Sprachen. Das heisst dass du kannst:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Rufen Sie Rust-Funktionen aus anderen Sprachen auf.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Rufen Sie in anderen Sprachen geschriebene Funktionen von Rust auf.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Wenn Sie Funktionen in einer Fremdsprache aufrufen, sagen wir, dass Sie a \"\n\"verwenden _Fremdfunktionsschnittstelle_, auch bekannt als FFI.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"This is a key ability of Rust: compiled code becomes indistinguishable from \"\n\"compiled C or C++ code.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Technically, we say that Rust can be compiled to the same [ABI](https://en.\"\n\"wikipedia.org/wiki/Application_binary_interface) (application binary interface) \"\n\"as C code.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperabilität mit C\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust bietet volle Unterstützung für das Linken von Objektdateien mit einer C-\"\n\"Aufrufkonvention. Ebenso können Sie Rust-Funktionen exportieren und von C aus \"\n\"aufrufen.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Sie können es von Hand tun, wenn Sie möchten:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/\"\n\"exercise.md).\"\nmsgstr \"\"\n\"Wir haben dies bereits im [Safe FFI Wrapper Übung](../../Übungen/Tag-3/safe-ffi-\"\n\"wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Dies setzt vollständige Kenntnisse der Zielplattform voraus. Nicht \"\n\"empfehlenswert für Produktion.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"Wir werden uns als nächstes bessere Optionen ansehen.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"The [`\\\"C\\\"` part](https://doc.rust-lang.org/reference/items/external-blocks.\"\n\"html#abi) of the `extern` block tells Rust that `abs` can be called using the C \"\n\"[ABI](https://en.wikipedia.org/wiki/Application_binary_interface) (application \"\n\"binary interface).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"The `safe fn abs` part tells that Rust that `abs` is a safe function. By \"\n\"default, extern functions are considered unsafe, but since `abs(x)` is valid \"\n\"for any `x`, we can declare it safe.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Verwenden von Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) tool \"\n\"can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Das Tool [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html). \"\n\"kann Bindungen aus einer C-Header-Datei automatisch generieren.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Erstellen Sie zunächst eine kleine C-Bibliothek:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Fügen Sie dies zu Ihrer `Android.bp`\\\\-Datei hinzu:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Erstellen Sie eine Wrapper-Header-Datei für die Bibliothek (in this Beispiel):\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Sie können die Bindungen jetzt automatisch generieren:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Schließlich können wir die Bindungen in unserem Rust-Programm verwenden:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Schließlich können wir automatisch generierte Tests ausführen, um \"\n\"sicherzustellen, dass die Bindungen funktionieren:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The Android build rules will automatically call `bindgen` for you behind the \"\n\"scenes.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Notice that the Rust code in `main` is still hard to write. It is good practice \"\n\"to encapsulate the output of `bindgen` in a Rust library which exposes a safe \"\n\"interface to caller.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Rust anrufen\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Der Export von Rust-Funktionen und -Typen nach C ist einfach:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"/// Analyze the numbers.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Wir können dies jetzt aus einer C-Binärdatei aufrufen:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported \"\n\"symbol will just be the name of the function. You can also use \"\n\"`#[unsafe(export_name = \\\"some_name\\\")]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` deaktiviert Rusts übliches Namensverstümmeln, so dass das \"\n\"exportierte Symbol nur der Name von ist die Funktion. Sie können auch \"\n\"`#[export_name = \\\"some_name\\\"]` verwenden, um einen beliebigen Namen anzugeben.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe interoperability \"\n\"between Rust and C++.\"\nmsgstr \"\"\n\"Die [CXX-Kiste](https://cxx.rs/) ermöglicht eine sichere Interoperabilität \"\n\"zwischen Rust und C++.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"Der Gesamtansatz sieht wie folgt aus:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"Rustdoc\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to both \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/dtolnay/\"\n\"cargo-expand) to view the expanded proc macro. For most of the examples you \"\n\"would use `cargo expand ::ffi` to expand just the `ffi` module (though this \"\n\"doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Funktionen\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C++ \"\n\"header file containing the corresponding C++ declarations. The generated header \"\n\"has the same path as the Rust source file containing the bridge, except with a .\"\n\"rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed in \"\n\"are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to call \"\n\"from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"Unsicheres Rust\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum class \"\n\"to hold a value different from all of the listed variants, and our Rust \"\n\"representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come from \"\n\"the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to immediately \"\n\"terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception on \"\n\"the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not declared \"\n\"by the CXX bridge to return `Result`, the program calls C++'s `std::terminate`. \"\n\"The behavior is equivalent to the same exception being thrown through a \"\n\"`noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"C++-Beispiel\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`&str`\"\nmsgstr \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Zelle<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments and \"\n\"returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are a \"\n\"few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed directly \"\n\"between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these are \"\n\"setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in order \"\n\"to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs](https://\"\n\"source.android.com/docs/setup/build/rust/building-rust-modules/android-rust-\"\n\"patterns#rust-cpp-interop-using-cxx). You may want to share that link with the \"\n\"class so that students know where they can find these instructions again in the \"\n\"future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Interoperabilität mit Java\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java kann gemeinsame Objekte über [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). Die [`jni` crate](https://docs.rs/\"\n\"jni/) ermöglicht es Ihnen, eine kompatible Bibliothek zu erstellen.\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Zuerst erstellen wir eine Rust-Funktion zum Exportieren nach Java:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"/// HelloWorld::hello method implementation.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Schließlich können wir diese Funktion von Java aus aufrufen:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Hallo Welt!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\"Schließlich können Sie die Binärdatei erstellen, synchronisieren und ausführen:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"The `unsafe(no_mangle)` attribute instructs Rust to emit the \"\n\"`Java_HelloWorld_hello` symbol exactly as written. This is important so that \"\n\"Java can recognize the symbol as a `hello` method on the `HelloWorld` class.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"By default, Rust will mangle (rename) symbols so that a binary can link in two \"\n\"versions of the same Rust crate.\"\nmsgstr \"\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Willkommen zu Tag 1\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party glue \"\n\"code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've got a \"\n\"corner of the code where you're displaying a UTF8 string to the user, feel free \"\n\"to follow this recipe in your part of the codebase instead of the exact part we \"\n\"talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build flags \"\n\"is OK, so long as your code is relatively recent (commit position 1223636 \"\n\"onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This is \"\n\"the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-the-\"\n\"code/) if you aren't already at that point. Be warned: setting up to build \"\n\"Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. If \"\n\"you don't have time to complete a certain part, don't worry: you can catch up \"\n\"in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.gni` \"\n\"(e.g. `rust_static_library` that we'll meet later). This uses Chromium's \"\n\"audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and crates]\"\n\"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Übungen\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the risk \"\n\"profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them to \"\n\"discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where Cargo \"\n\"may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, one \"\n\"has access to the rich ecosystem of crates.io libraries. There is a crate for \"\n\"almost anything and they are usually quite pleasant to use. (`clap` for command-\"\n\"line parsing, `serde` for serializing/deserializing to/from various formats, \"\n\"`itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.toml` \"\n\"and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by an \"\n\"ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a streamlined \"\n\"way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry for \"\n\"writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich typesystem) \"\n\"and running faster (as a compiled, rather than interpreted language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be used \"\n\"outside of Chromium (e.g. in Bazel or Android/Soong build environments) should \"\n\"probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which resulted \"\n\"in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` for \"\n\"command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` when \"\n\"building and bootstrapping Rust standard library when building Rust toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by security@chromium.\"\n\"org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's Rust policy can be found [here](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:docs/rust.md;l=22). Rust can be used for both first-party \"\n\"and third-party code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Using Rust for pure first-party code looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - -.\\n\"\n\":                   :           :                     :\\n\"\n\": Existing Chromium :           :  Chromium Rust      :\\n\"\n\": \\\"C++\\\"             :           :  code               :\\n\"\n\": +---------------+ :           : +----------------+  :\\n\"\n\": |               | :           : |                |  :\\n\"\n\": |         o-----+-+-----------+-+->              |  :\\n\"\n\": |               | : Language  : |                |  :\\n\"\n\": +---------------+ : boundary  : +----------------+  :\\n\"\n\":                   :           :                     :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"The third-party case is also common. It's likely that you'll also need a small \"\n\"amount of first-party glue code, because very few Rust libraries directly \"\n\"expose a C/C++ API.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"The scenario of using a third-party crate is the more complex one, so today's \"\n\"course will focus on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Writing glue code to be able to use those crates from Chromium C++. (The same \"\n\"techniques are used when working with first-party Rust code).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Regeln beim Bauen\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and `ninja` \"\n\"for efficiency --- its static rules allow maximum parallelism. Rust is no \"\n\"exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to depend \"\n\"upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root file \"\n\"of the compilation unit --- typically `lib.rs`. `sources` is a complete list of \"\n\"all source files which `ninja` needs in order to determine when rebuilds are \"\n\"necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire crate \"\n\"is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using [gn's \"\n\"built-in support for Rust static libraries](https://gn.googlesource.com/gn/+/\"\n\"main/docs/reference.md#func_static_library). The answer is that this template \"\n\"provides support for CXX interop, Rust features, and unit tests, some of which \"\n\"we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it won't \"\n\"compile. If you need unsafe Rust code, add `allow_unsafe = true` to the gn \"\n\"target. (Later in the course we'll see circumstances where this is necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than for \"\n\"C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of Rust \"\n\"support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-analyzer \"\n\"might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the `QrCode::\"\n\"with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will need \"\n\"to be rerun after editing `BUILD.gn` files (which we will do a few times \"\n\"throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Regeln beim Bauen\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety by \"\n\"the Rust compiler, so you'll need to allow unsafe code in your `gn` target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll see \"\n\"how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - we \"\n\"suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build and run \"\n\"Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful in \"\n\"subsequent exercises. If you've succeeded, you will be able to use right-click \"\n\"\\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/rust_static_library.gni;\"\n\"l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/\"\n\"reference/abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.extern.\"\n\"html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/gn/\"\n\"+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-denominator \"\n\"interop language, C. Both C++ and Rust can natively declare and call C ABI \"\n\"functions. Later in the course, we'll connect C++ directly to Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might \"\n\"allow Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.md) \"\n\"in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the subject \"\n\"of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing both \"\n\"the C++ and the Rust implementation (parameterizing the tests so they enable or \"\n\"disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not panicking \"\n\"and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Beispiel\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing test \"\n\"binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to import \"\n\"and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't provided an \"\n\"explicit `crate_name` for `my_rust_lib` so its crate name is computed based on \"\n\"the full target path and name. Fortunately we can avoid working with such an \"\n\"unwieldy name by using the `chromium::import!` macro from the automatically-\"\n\"imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:build/rust/chromium_prelude/chromium_prelude.rs?\"\n\"q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool covered \"\n\"in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Rost auf Übung\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding two \"\n\"integers received as arguments, computing the nth Fibonacci number, summing \"\n\"integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new tools \"\n\"being developed all the time. At the moment, Chromium uses a tool called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition language \"\n\"(which looks a lot like Rust) and then CXX tools generate declarations for \"\n\"functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Ein vollständiges Beispiel für die Verwendung finden Sie im \\\\[CXX-Tutorial\\\\] \"\n\"[2](https://cxx.rs/tutorial.html).\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has the \"\n\"following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free functions \"\n\"manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't guarantee \"\n\"any particular ABI or memory layout. With manual bindings `std::span<T>` / \"\n\"`&[T]` have to be manually destructured and rebuilt out of a pointer and length \"\n\"- this is error-prone given that each language represents empty slices slightly \"\n\"differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` procedural \"\n\"macro does complex things to it. The generated code is quite a bit more \"\n\"sophisticated - though this does still result in a `mod` called `ffi` in your \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Eingebaute Unterstützung für Tests.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by Rust, \"\n\"but this is misleading. This header is never interpreted by Rust, but simply \"\n\"`#include`d in the generated C++ code for the benefit of C++ compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://cxx.\"\n\"rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well isolated \"\n\"\\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When considering a \"\n\"use-case for Rust in Chromium, a good starting point is to draft the CXX \"\n\"bindings for the language boundary to see if it appears simple enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies on \"\n\"C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can be \"\n\"passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed when \"\n\"`T` is a Rust type, which cannot be passed across the FFI boundary, and cannot \"\n\"be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been needed \"\n\"in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Fehlerbehandlung\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.rs;\"\n\"l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is used \"\n\"to communicate success vs failure, and where the successful result can be \"\n\"passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. This \"\n\"is not the size of the vector, but the size of the QR code (and admittedly it \"\n\"is a bit redundant - this is the square root of the size of the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that points \"\n\"to uninitialized memory results in Undefined Behavior (unlike in C++, when only \"\n\"the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around like \"\n\"Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Fehlerbehandlung\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the successful \"\n\"result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these types \"\n\"cannot cross the FFI boundary without indirection of a `Box<T>`. We can't have \"\n\"an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ to store Rust \"\n\"objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-node \"\n\"where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium C+\"\n\"+ types to CXX Rust types --- for example [`SpanToRustSlice`](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things to \"\n\"memory, and compromise the safety of Rust's own data layouts. Presence of _too \"\n\"many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise ratio of \"\n\"such a keyword, and is [controversial](https://steveklabnik.com/writing/the-cxx-\"\n\"debate), but strictly, bringing any foreign code into a Rust binary can cause \"\n\"unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the previous \"\n\"section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Interoperabilität mit C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which specifies \"\n\"a single function, to be called from C++, called `hello_from_rust`, taking no \"\n\"parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[unsafe(no_mangle)]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. Instead, \"\n\"include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Einige Notizen:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can own \"\n\"some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you need \"\n\"a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X and \"\n\"Y are both function types. This is because your C++ function doesn't quite \"\n\"match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although CXX's \"\n\"design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"Bibliothek\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Rust Ökosystem\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Rust Ökosystem\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely have \"\n\"to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. These \"\n\"are managed through a single [`Cargo.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.\"\n\"html) --- most commonly, you'll want to specify the `features` that you wish to \"\n\"enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this file \"\n\"to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file to \"\n\"resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running this \"\n\"command you will be downloading and running its dependencies from `crates.io`. \"\n\"See [the earlier section](../cargo.md) discussing this security decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"Nützliche Kisten (Crates)\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://doc.\"\n\"rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Siehe die \\\\[Rust-Referenz\\\\] (https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium it's \"\n\"to allow multiple incompatible versions of a crate, which is discouraged but \"\n\"sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the design \"\n\"of `gn` and `ninja` which aim for static, deterministic, build rules to \"\n\"maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Generische Datentypen und Methoden\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to add \"\n\"`build-script-outputs` to the crate. If this is a transitive dependency, that \"\n\"is, one on which Chromium code should not directly depend, also add `allow-\"\n\"first-party-usage=false`. There are several examples already in that file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input to \"\n\"subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and link \"\n\"C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://crates.io/\"\n\"crates/bindgen) within their build scripts. These actions can't be supported in \"\n\"a Chromium context --- our gn, ninja and LLVM build system is very specific in \"\n\"expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/<crate>` \"\n\"- see for example the [patches against the `cxx` crate](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/\"\n\"cxx/) - and will be applied automatically by `gnrt` each time it upgrades the \"\n\"crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending on a \"\n\"crate is simple. Find your `rust_static_library` target, and add a `dep` on the \"\n\"`:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As you \"\n\"may be bringing in not just a single crate but also transitive dependencies, \"\n\"there may be a lot of code to review. On the other hand, safe Rust code can \"\n\"have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet](https://\"\n\"mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? If \"\n\"the build system for each crate contains a `build.rs` or procedural macros, \"\n\"work out what they're for. Are they compatible with the way Chromium is \"\n\"normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/security/rule-of-2.md#unsafe-code-in-\"\n\"safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place that \"\n\"might have been maliciously inserted. (You can't realistically aim for 100% \"\n\"perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.org` \"\n\"to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.toml` \"\n\"changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So you \"\n\"may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to keep \"\n\"it up to date with any security fixes](https://chromium.googlesource.com/\"\n\"chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is hoped that \"\n\"we will soon automate this for Rust crates, but for now, it's still your \"\n\"responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/features.\"\n\"html#the-default-feature). Assume that the crate will be used in shipping \"\n\"Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/+/\"\n\"main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to turn \"\n\"off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. It's \"\n\"important that we get Chromium for Pixies delivered to them as soon as possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate which \"\n\"does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and diligence. \"\n\"Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always do \"\n\"this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, and \"\n\"will probably decide that it's better to do the conversion on the C++ side \"\n\"using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/slice.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student that \"\n\"they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may need to \"\n\"explain what `Pin` does, and then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can't be moved around like \"\n\"Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably already \"\n\"did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Willkommen bei Comprehensive Rust 🦀\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people who \"\n\"are familiar with the basics of Rust (perhaps from completing the Comprehensive \"\n\"Rust course), and ideally also have some experience with bare-metal programming \"\n\"in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller with \"\n\"some LEDs and buttons, an I2C-connected accelerometer and compass, and an on-\"\n\"board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"You should see \\\"NXP ARM mbed\\\" in the output of `lsusb` if the device is \"\n\"available. If you are using a Linux environment on a Chromebook, you will need \"\n\"to share the USB device with Linux, via `chrome://os-settings/crostini/\"\n\"sharedUsbDevices`.\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to define \"\n\"your own entry point. This will typically involve a linker script and some \"\n\"assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.rust-\"\n\"lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a crate implementing a basic buddy system \"\n\"allocator. Other crates are available, or you can write your own or hook into \"\n\"your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. in \"\n\"this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -> !\"\n\"`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 to \"\n\"the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by silicon \"\n\"vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects which \"\n\"patch the mistakes, add missing details, and publish the generated crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin pac \"\n\"-- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various STM32, \"\n\"GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"Tastaturkürzel\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific board \"\n\"for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, and a \"\n\"bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can exist. \"\n\"Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you can’t \"\n\"keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, the \"\n\"configuration state of a GPIO pin. This encodes the state machine into the type \"\n\"system, and ensures that you don't try to use a pin in a certain way without \"\n\"properly configuring it first. Illegal state transitions are caught at compile \"\n\"time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but not \"\n\"vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken out \"\n\"into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-can`]\"\n\"(https://crates.io/crates/embedded-can) and [`rand_core`](https://crates.io/\"\n\"crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/awesome-\"\n\"embedded-rust#driver-crates) in terms of these traits, e.g. an accelerometer \"\n\"driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other platforms \"\n\"such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides another \"\n\"approach to non-blocking I/O, based on the [`nb`](https://crates.io/crates/nb) \"\n\"crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, like \"\n\"OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT (Real \"\n\"Time Transfers) output and connect GDB. It's configured by an `Embed.toml` file \"\n\"in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is an \"\n\"Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the on-\"\n\"board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link is \"\n\"a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin Serial \"\n\"Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you want \"\n\"to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"Überprüfen Sie in einem anderen Terminal, ob der Dienst ausgeführt wird:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\".\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Shared resource management, message passing, task scheduling, timer queue.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.github.\"\n\"io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for scheduling \"\n\"rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Nachdem Sie sich die Übung angesehen haben, können Sie sich die bereitgestellte \"\n\"\\\\[Lösung\\\\] ansehen.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/latest/\"\n\"lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) \"\n\"crates, as well as the [micro:bit hardware](https://tech.microbit.org/\"\n\"hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::I2c` \"\n\"trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.com/\"\n\"pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for this \"\n\"exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Tag 3 Morgengymnastik\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([zurück zur Übung](for-loops.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to\\n\"\n\"     * enable MMU and caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then\\n\"\n\"     * invalidate any potentially stale local TLB entries before they\\n\"\n\"     * start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed\\n\"\n\"     * until this has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This code is in `src/bare-metal/aps/examples/entry.S`. It's not necessary to \"\n\"understand this in detail -- the takeaway is that typically some low-level \"\n\"setup is needed to meet Rust's expectations of the system.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space on \"\n\"zeroes. The compiler assumes that the loader will take care of zeroing them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and the \"\n\"image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If we \"\n\"don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-unknown-\"\n\"none` target which sets `+strict-align` to prevent the compiler generating \"\n\"unaligned accesses, so it should be fine in this case, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache is \"\n\"cleaned or the VM enables the cache. (Cache is keyed by physical address, not \"\n\"VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB for \"\n\"DRAM, and another 1 GiB higher up for more devices. This matches the memory \"\n\"layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to modify \"\n\"`entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with Rust \"\n\"code. For example, to make an HVC (hypervisor call) to tell the firmware to \"\n\"power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of functions \"\n\"to manage system and CPU power states, among other things. It is implemented by \"\n\"EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \\\"C\\\"` \"\n\"because it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/primitive.\"\n\"pointer.html#method.read_volatile) and [`pointer::write_volatile`](https://doc.\"\n\"rust-lang.org/stable/core/primitive.pointer.html#method.write_volatile).\"\nmsgstr \"`From` und `Into` werden verwendet, um Werte zu konvertieren,\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use `&raw` to get fields of structs without creating an intermediate reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"// SAFETY: Some device is mapped at this address.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent the \"\n\"compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the compiler \"\n\"may assume that the value read is the same as the value just written, and not \"\n\"bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `&raw` to get struct field pointers from a pointer to the struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"For compatibility with old versions of Rust you can use the [`addr_of!`]\"\n\"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/documentation/\"\n\"ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the driver \"\n\"for a given UART, and nothing else aliasing its address space), then it is \"\n\"always safe to call `write_byte` later because we can assume the necessary \"\n\"preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but `write_byte` \"\n\"unsafe), but that would be much less convenient to use as every place that \"\n\"calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving the \"\n\"burden of proof for soundness from a large number of places to a smaller number \"\n\"of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"More traits\"\nmsgstr \"Züge\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more traits \"\n\"too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"`Send` is an auto-trait, but not implemented automatically because it is not \"\n\"implemented for pointers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"Verwenden von Bindgen\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/better-uart/using.md\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to read. \"\n\"Plus, some of them are bit fields which would be nice to access in a structured \"\n\"way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for working \"\n\"with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along with \"\n\"a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `&raw const` / `&raw mut` to get pointers to individual fields \"\n\"without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"\\\\n\\\\nBye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`](https://\"\n\"crates.io/crates/log) crate. We can do this by implementing the `Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The first unwrap in `log` will succeed because we initialise `LOGGER` before \"\n\"calling `set_logger`. The second will succeed because `Uart::write_str` always \"\n\"returns `Ok`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with SP0, \"\n\"current EL with SPx, lower EL using AArch64, lower EL using AArch32). We \"\n\"implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current EL \"\n\"exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't expect \"\n\"any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or less \"\n\"like different threads. [`Send` and `Sync`](../../concurrency/send-sync.md) \"\n\"will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the rest \"\n\"of the program, and it's `Send` but not `Sync`, then we'll need to wrap it in \"\n\"something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\".\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However, this has \"\n\"the problems mentioned at the beginning of this session regarding unaligned \"\n\"access and cache coherency.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Nützliche Kisten (Crates)\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll look at a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by DMA, \"\n\"or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is valid, \"\n\"and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not all \"\n\"byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/zerocopy-\"\n\"example/`. (It won't run in the Playground because of the crate dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets you \"\n\"create page tables according to the AArch64 Virtual Memory System Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should be \"\n\"straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.com/\"\n\"android/platform/superproject/+/master:packages/modules/Virtualization/pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware or \"\n\"under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) is \"\n\"a crate implementing a basic buddy system allocator. It can be used both to \"\n\"implement [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) (using [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html)) so \"\n\"you can use the standard `alloc` crate (as we saw [before](../alloc.md)), or \"\n\"for allocating other address space (using [`FrameAllocator`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.FrameAllocator.\"\n\"html)) . For example, we might want to allocate MMIO space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/allocator-\"\n\"example/`. (It won't run in the Playground because of the crate dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides this: a \"\n\"vector backed by an array or slice, which could be statically allocated or on \"\n\"the stack, which keeps track of how many elements are used and panics if you \"\n\"try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a `rust_ffi_static` \"\n\"Soong rule to build your Rust code, then a `cc_binary` with a linker script to \"\n\"produce the binary itself, and then a `raw_binary` to convert the ELF to a raw \"\n\"binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/\"\n\"libs/libvmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Nachdem Sie sich die Übung angesehen haben, können Sie sich die bereitgestellte \"\n\"\\\\[Lösung\\\\] ansehen.\"\n\n#: src/exercises/bare-metal/rtc.md src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, you \"\n\"should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://doc.\"\n\"rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by the \"\n\"RTC match. You can use the driver provided in the [`arm-gic`](https://docs.rs/\"\n\"arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Hadwarenahes Rust: Nachmittags\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([zurück zur Übung](luhn.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Willkommen bei Comprehensive Rust 🦀\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust bietet volle Unterstützung für Parallelität unter Verwendung von \"\n\"Betriebssystem-Threads mit Mutexes und Kanäle.\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Das Rust-Typsystem spielt eine wichtige Rolle bei der Entstehung vieler \"\n\"Nebenläufigkeitsfehler Kompilierzeitfehler. Dies wird seit Ihnen oft als \"\n\"_furchtlose Parallelität_ bezeichnet kann sich auf den Compiler verlassen, um \"\n\"die Korrektheit zur Laufzeit sicherzustellen.\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.g., a \"\n\"called function that might mutate an argument or save references to it to read \"\n\"later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Rust-Threads funktionieren ähnlich wie Threads in anderen Sprachen:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Spawning new threads does not automatically delay program termination at the \"\n\"end of `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Thread-Panics sind voneinander unabhängig.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]\"\n\"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref).\"\nmsgstr \"\"\n\"Paniken können eine Nutzlast tragen, die mit `downcast_ref` entpackt werden \"\n\"kann.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"Rost zum Beispiel\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because `main` ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) returns a \"\n\"`JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) ist ein eigener \"\n\"Zeiger auf Daten auf dem Heap:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for the \"\n\"thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s closure \"\n\"returns `T`\"\nmsgstr \"\"\n\"Sie können dafür jedoch einen [Scoped Thread](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html) verwenden:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.JoinHandle.\"\n\"html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://doc.\"\n\"rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Das Überladen von Operatoren wird über Traits in `std::ops` implementiert:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? See next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Normale Threads können nicht von ihrer Umgebung ausleihen:\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/fn.\"\n\"scope.html) for this:\"\nmsgstr \"\"\n\"Sie können dafür jedoch einen [Scoped Thread](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html) verwenden:\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"Der Grund dafür ist, dass nach Abschluss der `thread::scope`\\\\-Funktion \"\n\"garantiert alle Threads verbunden sind, sodass sie geliehene Daten zurückgeben \"\n\"können.\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one thread, \"\n\"or immutably by any number of threads.\"\nmsgstr \"\"\n\"Es gelten die normalen Rust-Ausleihregeln: Sie können entweder veränderlich von \"\n\"einem Thread ausleihen oder unveränderlich von einer beliebigen Anzahl von \"\n\"Threads.\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a [`Sender<T>`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.Sender.html) and a [`Receiver<T>`](https://doc.rust-lang.org/\"\n\"std/sync/mpsc/struct.Receiver.html). The two parts are connected via the \"\n\"channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Rust-Kanäle bestehen aus zwei Teilen: einem `Sender<T>` und einem \"\n\"`Receiver<T>`. Die zwei Teile über den Kanal verbunden sind, aber Sie sehen nur \"\n\"die Endpunkte.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for Multi-\"\n\"Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` (so you \"\n\"can make multiple producers) but `Receiver` does not.\"\nmsgstr \"\"\n\"„mpsc“ steht für Multi-Producer, Single-Consumer. `Sender` und `SyncSender` \"\n\"implementieren `Clone` (also Sie können mehrere Producer erstellen), aber \"\n\"'Receiver' nicht.\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.\"\n\"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv) return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` und `recv()` geben `Result` zurück. Wenn sie `Err` zurückgeben, \"\n\"bedeutet dies das Gegenstück `Sender` bzw „Receiver“ wird fallen gelassen und \"\n\"der Kanal wird geschlossen.\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"\"\n\"You get an unbounded and asynchronous channel with [`mpsc::channel()`](https://\"\n\"doc.rust-lang.org/std/sync/mpsc/fn.channel.html):\"\nmsgstr \"\"\n\"Einen unbegrenzten und asynchronen Kanal erhält man mit `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"An unbounded channel will allocate as much space as is necessary to store \"\n\"pending messages. The `send()` method will not block the calling thread.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"A call to `send()` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.SyncSender.html#method.send) can block the current thread:\"\nmsgstr \"\"\n\"Gebundene und synchrone Kanäle sorgen dafür, dass der aktuelle Thread durch \"\n\"„Senden“ blockiert wird:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send()` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there is \"\n\"nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Like unbounded channels, a call to `send()` will abort with an error if the \"\n\"channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". Every \"\n\"send will block the current thread until another thread calls [`recv()`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv).\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"Send\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"Sync\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in two \"\n\"traits:\"\nmsgstr \"\"\n\"Woher weiß Rust, dass es den gemeinsamen Zugriff über Threads verbieten soll? \"\n\"Die Antwort liegt in zwei Merkmalen:\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` is \"\n\"`Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): ein Typ `T` ist \"\n\"`Send`, wenn es sicher ist, ein `T` über einen Thread zu bewegen Grenze.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` is \"\n\"`Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): ein Typ `T` ist \"\n\"`Sync`, wenn es sicher ist, ein `&T` über einen Thread zu verschieben Grenze.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when you \"\n\"know it is valid.\"\nmsgstr \"\"\n\"„Senden“ und „Synchronisieren“ sind [unsichere Eigenschaften](../unsafe/unsafe-\"\n\"traits.md). Der Compiler leitet sie automatisch für Ihre Typen ab solange sie \"\n\"nur die Typen `Send` und `Sync` enthalten. Sie können sie auch manuell \"\n\"implementieren, wenn Sie wissen, dass es gültig ist.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Man kann sich diese Eigenschaften als Markierungen dafür vorstellen, dass der \"\n\"Typ bestimmte Thread-Sicherheitseigenschaften hat.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"Sie können in den generischen Einschränkungen als normale Merkmale verwendet \"\n\"werden.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) if \"\n\"it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Ein Typ `T` ist [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html), \"\n\"wenn es sicher ist, einen `T`\\\\-Wert in einen anderen Thread zu verschieben.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will run \"\n\"in that thread. So the question is when you can allocate a value in one thread \"\n\"and deallocate it in another.\"\nmsgstr \"\"\n\"Das Verschieben der Eigentümerschaft auf einen anderen Thread hat zur Folge, \"\n\"dass _destructors_ ausgeführt wird in diesem Thread. Die Frage ist also, wann \"\n\"Sie einen Wert in einem Thread zuweisen können und es in einem anderen \"\n\"freigeben.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from a \"\n\"single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) if \"\n\"it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Ein Typ `T` ist [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html), \"\n\"wenn es sicher ist, von mehreren auf einen `T`\\\\-Wert zuzugreifen Threads \"\n\"gleichzeitig.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Genauer gesagt lautet die Definition:\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` ist `Sync` genau dann, wenn `&T` `Send` ist\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Diese Anweisung ist im Wesentlichen eine Kurzform dafür, dass ein Typ, der für \"\n\"die gemeinsame Verwendung Thread-sicher ist, auch Thread-sicher ist, Verweise \"\n\"auf ihn über Threads hinweg zu übergeben.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type is \"\n\"also safe to move to another thread, because the data it references can be \"\n\"accessed from any thread safely.\"\nmsgstr \"\"\n\"Denn wenn ein Typ Sync ist, bedeutet dies, dass er von mehreren Threads \"\n\"gemeinsam genutzt werden kann, ohne das Risiko von Datenrennen oder anderen \"\n\"Synchronisierungsproblemen, sodass es sicher ist, ihn in einen anderen Thread \"\n\"zu verschieben. Ein Verweis auf den Typ kann auch sicher in einen anderen \"\n\"Thread verschoben werden, da auf die Daten, auf die er verweist, von jedem \"\n\"Thread aus sicher zugegriffen werden kann.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"`Senden + Synchronisieren`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"Die meisten Typen, auf die Sie stoßen, sind „Send + Sync“:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Die generischen Typen sind typischerweise `Send + Sync`, wenn es die \"\n\"Typparameter sind „Senden + Synchronisieren“.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Senden + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Diese Typen können in andere Threads verschoben werden, sind aber nicht Thread-\"\n\"sicher. Typischerweise wegen innerer Mutabilität:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Zelle<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Senden + Synchronisieren`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are safe to access (via shared references) from multiple threads, \"\n\"but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Diese Typen sind Thread-sicher, können aber nicht in einen anderen Thread \"\n\"verschoben werden:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them. However, an already-locked mutex can have its \"\n\"guarded variable read by any thread with which the guard is shared.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: Verwendet Primitive auf Betriebssystemebene, die auf dem \"\n\"freigegeben werden müssen Thread, der sie erstellt hat.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Senden + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Diese Typen sind nicht Thread-sicher und können nicht in andere Threads \"\n\"verschoben werden:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: Jedes `Rc<T>` hat eine Referenz auf eine `RcBox<T>`, die eine enthält \"\n\"nicht-atomarer Referenzzähler.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust geht davon aus, dass Rohzeiger möglicherweise etwas \"\n\"Besonderes haben Parallelitätsüberlegungen.\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) ermöglicht den \"\n\"gemeinsamen Nur-Lese-Zugriff über seine `clone`\\\\-Methode:\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` steht für \\\"Atomic Reference Counted\\\", eine Thread-sichere Version von \"\n\"`Rc`, die atomar verwendet Operationen.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` and \"\n\"`Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementiert `Clone` unabhängig davon, ob `T` dies tut oder nicht. Es \"\n\"implementiert `Send` und `Sync` iff `T` setzt sie beide um.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but after \"\n\"that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` hat die Kosten für atomare Operationen, die ausgeführt werden, \"\n\"aber danach die Verwendung der „T“ ist frei.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Hüten Sie sich vor Referenzzyklen, `Arc` verwendet keinen Garbage Collector, um \"\n\"sie zu erkennen.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` kann helfen.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability.md)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) sorgt für \"\n\"gegenseitigen Ausschluss _und_ erlaubt veränderlichen Zugriff auf `T` hinter \"\n\"einer Nur-Lese-Schnittstelle:\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Beachten Sie, wie wir eine [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) Blanket haben \"\n\"Implementierung.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the protected \"\n\"data.\"\nmsgstr \"\"\n\"`Mutex` in Rust sieht aus wie eine Sammlung mit nur einem Element - den \"\n\"geschützten Daten.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Es ist nicht möglich, das Abrufen des Mutex zu vergessen, bevor auf die \"\n\"geschützten Daten zugegriffen wird.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Sie können ein `&mut T` von einem `&Mutex<T>` erhalten, indem Sie die Sperre \"\n\"nehmen. Der `MutexGuard` sorgt dafür, dass die `&mut T` überlebt die gehaltene \"\n\"Sperre nicht.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` if and only if `T` implements \"\n\"`Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implementiert sowohl `Send` als auch `Sync`, wenn `T` `Send` \"\n\"implementiert.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Ein Gegenstück zur Lese-Schreib-Sperre - `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Warum gibt `lock()` ein `Result` zurück?\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \\\"poisoned\\\" \"\n\"to signal that the data it protected might be in an inconsistent state. Calling \"\n\"`lock()` on a poisoned mutex fails with a [`PoisonError`](https://doc.rust-lang.\"\n\"org/std/sync/struct.PoisonError.html). You can call `into_inner()` on the error \"\n\"to recover the data regardless.\"\nmsgstr \"\"\n\"Wenn der Thread, der den `Mutex` enthielt, in Panik geriet, wird der `Mutex` \"\n\"\\\"vergiftet\\\", um dies zu signalisieren Die geschützten Daten befinden sich \"\n\"möglicherweise in einem inkonsistenten Zustand. Aufruf von `lock()` auf einem \"\n\"vergifteten Mutex schlägt mit einem [`PoisonError`](https://doc.rust-lang.org/\"\n\"std/sync/struct.PoisonError.html) fehl. Sie können `into_inner()` für den \"\n\"Fehler aufrufen, um die Daten wiederherzustellen trotzdem.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Sehen wir uns `Arc` und `Mutex` in Aktion an:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are orthogonal.\"\nmsgstr \"\"\n\"`v` ist sowohl in `Arc` als auch in `Mutex` eingeschlossen, weil ihre Anliegen \"\n\"orthogonal sind.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Das Umhüllen eines `Mutex` in einen `Arc` ist ein gängiges Muster, um einen \"\n\"veränderlichen Zustand zwischen Threads zu teilen.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"„v: Arc\\\\<\\\\_\\\\>“ muss als „v2“ geklont werden, bevor es in einen anderen \"\n\"Thread verschoben werden kann. Der Lambda-Signatur wurde der Hinweis „move“ \"\n\"hinzugefügt.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Blöcke werden eingeführt, um den Anwendungsbereich von `LockGuard` so weit wie \"\n\"möglich einzuschränken.\\n\"\n\"\\n\"\n\"Wir müssen noch den `Mutex` erwerben, um unseren `Vec` zu drucken.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Das Dining-Philosophen-Problem ist ein klassisches Nebenläufigkeitsproblem:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has their \"\n\"own place at the table. There is a fork between each plate. The dish served is \"\n\"a kind of spaghetti which has to be eaten with two forks. Each philosopher can \"\n\"only alternately think and eat. Moreover, a philosopher can only eat their \"\n\"spaghetti when they have both a left and right fork. Thus two forks will only \"\n\"be available when their two nearest neighbors are thinking, not eating. After \"\n\"an individual philosopher finishes eating, they will put down both forks.\"\nmsgstr \"\"\n\"Fünf Philosophen speisen gemeinsam am selben Tisch. Jeder Philosoph hat seine \"\n\"eigener Platz am Tisch. Zwischen jedem Teller befindet sich eine Gabel. Das \"\n\"servierte Gericht ist eine Art Spaghetti, die mit zwei Gabeln gegessen werden \"\n\"muss. Jeder Philosoph kann nur abwechselnd denken und essen. Außerdem kann ein \"\n\"Philosoph nur ihre essen Spaghetti, wenn sie sowohl eine linke als auch eine \"\n\"rechte Gabel haben. Also zwei Gabeln werden nur verfügbar sein, wenn ihre \"\n\"beiden nächsten Nachbarn nachdenken, nicht essen. Nach ein einzelner Philosoph \"\n\"mit dem Essen fertig ist, legen sie beide Gabeln weg.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) for \"\n\"this exercise. Copy the code below to a file called `src/main.rs`, fill out the \"\n\"blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Dazu benötigen Sie eine lokale [Cargo-Installation](../../cargo/running-locally.\"\n\"md). diese Übung. Kopieren Sie den folgenden Code in die Datei `src/main.rs`, \"\n\"füllen Sie die Lücken aus, und teste, dass `cargo run` keinen Deadlock \"\n\"verursacht:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Encourage students to focus first on implementing a solution that \\\"mostly\\\" \"\n\"works.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"The deadlock in the simplest solution is a general concurrency problem and \"\n\"highlights that Rust does not automatically prevent this sort of bug.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It should \"\n\"start at a webpage and check that links on the page are valid. It should \"\n\"recursively check other pages on the same domain and keep doing this until all \"\n\"pages have been validated.\"\nmsgstr \"\"\n\"Lassen Sie uns unser neues Wissen nutzen, um einen Multithread-Link-Checker zu \"\n\"erstellen. Es sollte Starten Sie auf einer Webseite und prüfen Sie, ob die \"\n\"Links auf der Seite gültig sind. Es sollte Überprüfen Sie rekursiv andere \"\n\"Seiten auf derselben Domain und tun Sie dies so lange, bis alle Seiten wurden \"\n\"validiert.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, we \"\n\"will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Dazu benötigen Sie einen HTTP-Client wie [`reqwest`](https://docs.rs/reqwest/). \"\n\"Erstelle eine neue Frachtprojekt und `reqwest` es als Abhängigkeit mit:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Wenn `cargo add` mit `error: no such subcommand` fehlschlägt, dann bearbeiten \"\n\"Sie bitte die `Cargo.toml`\\\\-Datei von Hand. Fügen Sie die unten aufgeführten \"\n\"Abhängigkeiten hinzu.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Die `cargo add`\\\\-Aufrufe aktualisieren die `Cargo.toml`\\\\-Datei so, dass sie \"\n\"wie folgt aussieht:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://www.\"\n\"google.org/`.\"\nmsgstr \"\"\n\"Sie können nun die Startseite herunterladen. Versuchen Sie es mit einer kleinen \"\n\"Website wie z `https://www.google.org/`.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Ihre `src/main.rs`\\\\-Datei sollte in etwa so aussehen:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Führen Sie den Code in `src/main.rs` mit aus\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Verwenden Sie Threads, um die Links parallel zu prüfen: Senden Sie die zu \"\n\"prüfenden URLs an a Channel und lass ein paar Threads parallel die URLs prüfen.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.org` \"\n\"domain. Put an upper limit of 100 pages or so so that you don't end up being \"\n\"blocked by the site.\"\nmsgstr \"\"\n\"Erweitern Sie dies, um Links von allen Seiten rekursiv zu extrahieren `www.\"\n\"google.org`\\\\-Domain. Setzen Sie eine Obergrenze von 100 Seiten oder so, dass \"\n\"Sie am Ende nicht von der Seite blockiert werden.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"This is a complex exercise and intended to give students an opportunity to work \"\n\"on a larger project than others. A success condition for this exercise is to \"\n\"get stuck on some \\\"real\\\" issue and work through it with the support of other \"\n\"students or the instructor.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Link Überprüfung mit mehreren Ausführungssträngen\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed concurrently \"\n\"by executing each task until it would block, then switching to another task \"\n\"that is ready to make progress. The model allows running a larger number of \"\n\"tasks on a limited number of threads. This is because the per-task overhead is \"\n\"typically very low and operating systems provide primitives for efficiently \"\n\"identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they signal \"\n\"that they are complete.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise resolution \"\n\"are hidden.\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"async/await\"\nmsgstr \"Async Merkmale\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return type \"\n\"with a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the compiler \"\n\"on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. Unlike \"\n\"`block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a trait, \"\n\"implemented by objects that represent an operation that may not be complete \"\n\"yet. A future can be polled, and `poll` returns a [`Poll`](https://doc.rust-\"\n\"lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but uncommon) \"\n\"to implement `Future` for your own types. For example, the `JoinHandle` \"\n\"returned from `tokio::spawn` implements `Future` to allow joining to it.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function to \"\n\"pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the links \"\n\"to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async code, \"\n\"rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an event \"\n\"occurs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into that \"\n\"future remain valid. This is required to allow references to remain valid after \"\n\"an `.await`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust does \"\n\"not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes a \"\n\"basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never used.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make progress. \"\n\"That future may have one or more nested futures that its `poll` method polls, \"\n\"corresponding loosely to a call stack. Concurrency within a task is possible by \"\n\"polling multiple child futures, such as racing a timer and an I/O operation.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.com/\"\n\"man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with a \"\n\"few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, similar \"\n\"to an `async fn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling using \"\n\"`?`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient for \"\n\"complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to combine \"\n\"them with other `future`s to combine them and create complex control flow.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns a \"\n\"collection of their results. This is similar to `Promise.all` in JavaScript or \"\n\"`asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{page_sizes_dict:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is currently \"\n\"in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all requests \"\n\"to an http service as well as a database query. Try adding a `tokio::time::\"\n\"sleep` to the future, using `futures::join!`. This is not a timeout (that \"\n\"requires `select!`, explained in the next chapter), but demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and responds \"\n\"to that future's result. In JavaScript, this is similar to `Promise.race`. In \"\n\"Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, each \"\n\"of the form `pattern = future => statement`. When a `future` is ready, its \"\n\"return value is destructured by the `pattern`. The `statement` is then run with \"\n\"the resulting variables. The `statement` result becomes the result of the \"\n\"`select!` macro.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"got: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"timeout\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send greeting\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Listener failed\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"The `listener` async block here is a common form: wait for some async event, or \"\n\"for a timeout. Change the `sleep` to sleep longer to see it fail. Why does the \"\n\"`send` also fail in this situation?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"`select!` is also often used in a loop in \\\"actor\\\" architectures, where a task \"\n\"reacts to events in a loop. That has some pitfalls, which will be discussed in \"\n\"the next segment.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from being \"\n\"executed. An easy workaround is to use async equivalent methods where possible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This makes \"\n\"the effect more obvious, but the bug is still present in the multi-threaded \"\n\"flavor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, where \"\n\"that library might depend on thread-local storage or map to specific OS threads \"\n\"(e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such situations.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause another \"\n\"task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because of \"\n\"that, the future should never be moved to a different memory location, as it \"\n\"would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your time \"\n\"with it.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::pin`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset `timeout_fut` \"\n\"every time it expires:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, but \"\n\"that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that will \"\n\"send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, the \"\n\"Rust borrow checker would prevent self-referential data from being moved, as \"\n\"the references cannot outlive the data they point to. However, the code \"\n\"transformation for async blocks and functions is not verified by the borrow \"\n\"checker.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its place \"\n\"using a pinned pointer. However, it can still be moved through an unpinned \"\n\"pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of `&mut \"\n\"Self` to refer to the instance. That's why it can only be called on a pinned \"\n\"pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized in the 1.75 release. This required \"\n\"support for using return-position `impl Trait` in traits, as the desugaring for \"\n\"`async fn` includes `-> impl Future<Output = ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support, there are some pitfalls around `async \"\n\"fn`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position `impl Trait` captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async traits cannot be used with [trait objects](../../smart-pointers/trait-\"\n\"objects.md) (`dyn Trait` support).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround for \"\n\"`dyn` support through a macro, with some caveats:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Running all sleepers...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Slept for {} ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are too deep to describe \"\n\"in-depth in this class. See [this blog post](https://smallcultfollowing.com/\"\n\"babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/) by Niko Matsakis if you \"\n\"are interested in digging deeper. See also these keywords:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-\"\n\"return-types): short for [return-position `impl Trait`](../../generics/impl-\"\n\"trait.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html): \"\n\"short for return-position `impl Trait` in trait (RPIT in trait).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of time \"\n\"and adding it to the `Vec`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to ensure \"\n\"the system works correctly even when futures are cancelled. For example, it \"\n\"shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs error-\"\n\"handling).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the struct:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a tick \"\n\"has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.AsyncReadExt.\"\n\"html#method.read) is cancellation-safe because it either returns or doesn't \"\n\"read data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Speisende Philosophen\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a \"\n\"description of the problem.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/main.\"\n\"rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Dazu benötigen Sie eine lokale [Cargo-Installation](../../cargo/running-locally.\"\n\"md). diese Übung. Kopieren Sie den folgenden Code in die Datei `src/main.rs`, \"\n\"füllen Sie die Lücken aus, und teste, dass `cargo run` keinen Deadlock \"\n\"verursacht:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. You \"\n\"can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module from \"\n\"the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and publish \"\n\"their messages. The client reads user messages from the standard input, and \"\n\"sends them to the server. The chat server broadcasts each message that it \"\n\"receives to all the clients.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/sync/\"\n\"broadcast/fn.channel.html) on the server, and [`tokio_websockets`](https://docs.\"\n\"rs/tokio-websockets/) for the communication between the client and the server.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.31\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.2.0\\\"\\n\"\n\"tokio = { version = \\\"1.42.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.10.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes to \"\n\"familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/trait.\"\n\"SinkExt.html#method.send) implemented by `WebSocketStream`: for asynchronously \"\n\"sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/struct.\"\n\"Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"Two binaries\"\nmsgstr \"Rust-Binärdateien\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. For \"\n\"this to work, the client and the server code should go under `src/bin` (see the \"\n\"[documentation](https://doc.rust-lang.org/cargo/reference/cargo-targets.\"\n\"html#binaries)).\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/bin/\"\n\"client.rs`, respectively. Your task is to complete these files as described \"\n\"below.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"Ablauf des Kurses\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and sending \"\n\"them to the server, and (2) receiving messages from the server, and displaying \"\n\"them for the user.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// Keep trying until we have both forks\\n\"\n\"        // Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and that \"\n\"it was useful.\"\nmsgstr \"\"\n\"_Vielen Dank, dass Sie Comprehensive Rust 🦀 genommen haben!_ Wir hoffen, dass \"\n\"es Ihnen gefallen hat und dass es war nützlich.\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not perfect, \"\n\"so if you spotted any mistakes or have ideas for improvements, please get in \"\n\"[contact with us on GitHub](https://github.com/google/comprehensive-rust/\"\n\"discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Es hat uns viel Spaß gemacht, den Kurs zusammenzustellen. Der Kurs ist nicht \"\n\"perfekt, Wenn Sie also Fehler entdeckt haben oder Verbesserungsvorschläge \"\n\"haben, melden Sie sich bitte [Kontakt mit uns auf GitHub](https://github.com/\"\n\"google/comprehensive-rust/discussions). Wir würden lieben von dir zu hören.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"Thank you for reading the speaker notes! We hope they have been useful. If you \"\n\"find pages without notes, please send us a PR and link it to [issue #1083]\"\n\"(https://github.com/google/comprehensive-rust/issues/1083). We are also very \"\n\"grateful for fixes and improvements to the existing notes.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many Rust \"\n\"terms. For translations, this also serves to connect the term back to the \"\n\"English original.\"\nmsgstr \"\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/review.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"associated type:  \\n\"\n\"A type associated with a specific trait. Useful for defining the relationship \"\n\"between types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](borrowing/shared.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency/welcome.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in a \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are no \"\n\"longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling code \"\n\"reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when normal \"\n\"functions are not enough. A typical example is `format!`, which takes a \"\n\"variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the value \"\n\"of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer needed, \"\n\"leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, to \"\n\"organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of the \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against an \"\n\"expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task or \"\n\"solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which the \"\n\"method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object is \"\n\"tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, preventing \"\n\"memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different types \"\n\"under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to achieve \"\n\"polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple fields \"\n\"have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values of \"\n\"a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading to \"\n\"unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe-rust/unsafe.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Other Rust Resources\"\nmsgstr \"Andere Rostressourcen\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Die Rust-Community hat eine Fülle hochwertiger und kostenloser Ressourcen \"\n\"geschaffen online.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Official Documentation\"\nmsgstr \"Offizielle Dokumentation\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"Das Rust-Projekt beherbergt viele Ressourcen. Diese decken Rust im Allgemeinen \"\n\"ab:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the canonical \"\n\"free book about Rust. Covers the language in detail and includes a few projects \"\n\"for people to build.\"\nmsgstr \"\"\n\"[Die Programmiersprache Rust](https://doc.rust-lang.org/book/): die Kanonisches \"\n\"kostenloses Buch über Rust. Deckt die Sprache im Detail ab und enthält a wenige \"\n\"Projekte für Menschen zu bauen.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the Rust \"\n\"syntax via a series of examples which showcase different constructs. Sometimes \"\n\"includes small exercises where you are asked to expand on the code in the \"\n\"examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): deckt den Rust \"\n\"ab Syntax über eine Reihe von Beispielen, die verschiedene Konstrukte \"\n\"demonstrieren. Manchmal enthält kleine Übungen, in denen Sie aufgefordert \"\n\"werden, den Code in der zu erweitern Beispiele.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation of \"\n\"the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): vollständige \"\n\"Dokumentation von die Standardbibliothek für Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete book \"\n\"which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): ein unvollständiges \"\n\"Buch das die Rust-Grammatik und das Speichermodell beschreibt.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\"Weitere spezialisierte Guides, die auf der offiziellen Rust-Website gehostet \"\n\"werden:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages (FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): deckt unsicheres Rust \"\n\"ab, einschließlich der Arbeit mit rohen Zeigern und der Anbindung an andere \"\n\"Sprachen (FFI).\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchrone Programmierung in Rust](https://rust-lang.github.io/async-book/): \"\n\"deckt das neue asynchrone Programmiermodell ab, das nach dem eingeführt wurde \"\n\"Rust Book wurde geschrieben.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): an \"\n\"introduction to using Rust on embedded devices without an operating system.\"\nmsgstr \"\"\n\"\\\\[Das eingebettete Rust-Buch\\\\] (https://doc.rust-lang.org/stable/embedded-\"\n\"book/): an Einführung in die Verwendung von Rust auf eingebetteten Geräten ohne \"\n\"Betriebssystem.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Inoffizielles Lernmaterial\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Eine kleine Auswahl an weiteren Guides und Tutorials für Rust:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): deckt Rust ab \"\n\"aus der Perspektive von Low-Level-C-Programmierern.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"\\\\[Rost für eingebettetes C Programmierer\\\\] (https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): deckt Rust ab die Perspektive von Entwicklern, die Firmware in C \"\n\"schreiben.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): covers \"\n\"the syntax of Rust using side-by-side comparisons with other languages such as \"\n\"C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rost für Profis](https://overexact.com/rust-for-professionals/): deckt die \"\n\"Syntax von Rust durch Side-by-Side-Vergleiche mit anderen Sprachen ab wie C, C+\"\n\"+, Java, JavaScript und Python.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): Über 100 hilfreiche \"\n\"Übungen Sie lernen Rost.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-material/\"\n\"index.html): a series of small presentations covering both basic and advanced \"\n\"part of the Rust language. Other topics such as WebAssembly, and async/await \"\n\"are also covered.\"\nmsgstr \"\"\n\"[Eisenlehre Material](https://ferrous-systems.github.io/teaching-material/index.\"\n\"html): a Reihe von kleinen Präsentationen, die sowohl den grundlegenden als \"\n\"auch den fortgeschrittenen Teil des Rostige Sprache. Andere Themen wie \"\n\"WebAssembly und async/await sind ebenfalls enthalten bedeckt.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-\"\n\"testing/): a self-paced workshop that goes beyond Rust's built-in testing \"\n\"framework. It covers `googletest`, snapshot testing, mocking as well as how to \"\n\"write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.microsoft.\"\n\"com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at new \"\n\"developers. The first is a set of 35 videos and the second is a set of 11 \"\n\"modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Anfängerserie bis Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) und [Machen Sie Ihre ersten Schritte mit Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): zwei Rust-Leitfäden für \"\n\"neue Entwickler. Die erste ist eine Reihe von 35 Videos und die Das zweite ist \"\n\"ein Satz von 11 Modulen, der die Rust-Syntax und grundlegende Konstrukte \"\n\"abdeckt.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.github.\"\n\"io/too-many-lists/): in-depth exploration of Rust's memory management rules, \"\n\"through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) for \"\n\"even more Rust books.\"\nmsgstr \"\"\n\"Weitere Informationen finden Sie im \\\\[Little Book of Rust Books\\\\] (https://\"\n\"lborb.github.io/book/). noch mehr Rust-Bücher.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a full \"\n\"list of useful resources.\"\nmsgstr \"\"\n\"Das Material hier baut auf den vielen großartigen Quellen der Rust-\"\n\"Dokumentation auf. Auf der Seite \\\\[andere Ressourcen\\\\] (other-resources.md) \"\n\"finden Sie eine vollständige Liste nützlicher Ressourcen Ressourcen.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Das Material von Comprehensive Rust ist unter den Bedingungen von Apache 2.0 \"\n\"lizenziert Lizenz finden Sie unter [`LICENSE`](../LICENSE) für Einzelheiten.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust by Example\"\nmsgstr \"Rost zum Beispiel\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/). Please see the `third_party/rust-\"\n\"by-example/` directory for details, including the license terms.\"\nmsgstr \"\"\n\"Einige Beispiele und Übungen wurden aus [Rust by Beispiel](https://doc.rust-\"\n\"lang.org/rust-by-example/). Bitte sehen Sie sich ... an `third_party/rust-by-\"\n\"example/`\\\\-Verzeichnis für Details, einschließlich der Lizenz Bedingungen.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"Rost auf Übung\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Einige Übungen wurden von \\\\[Rust on Übung\\\\] (https://exercism.org/tracks/\"\n\"rust). Bitte sehen Sie sich ... an `third_party/rust-on-exercism/`\\\\-\"\n\"Verzeichnis für Details, einschließlich der Lizenz Bedingungen.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"CXX\"\nmsgstr \"\\\\##CXX\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section uses \"\n\"an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Der Abschnitt [Interoperability with C++](android/interoperability/cpp.md) \"\n\"verwendet eine Bild von [CXX](https://cxx.rs/). Bitte sehen Sie sich das \"\n\"Verzeichnis `third_party/cxx/` an für Details, einschließlich der \"\n\"Lizenzbedingungen.\"\n\n#, fuzzy\n#~ msgid \"Static and Const\"\n#~ msgstr \"static & const\"\n\n#, fuzzy\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"Lebensdauern\"\n\n#, fuzzy\n#~ msgid \"String References\"\n#~ msgstr \"Hängende Referenzen\"\n\n#, fuzzy\n#~ msgid \"`FromIterator`\"\n#~ msgstr \"FromIterator\"\n\n#~ msgid \"Test Modules\"\n#~ msgstr \"Testmodule\"\n\n#, fuzzy\n#~ msgid \"`thiserror` and `anyhow`\"\n#~ msgstr \"`Von` und `Nach`\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Kontrollfluss\"\n\n#, fuzzy\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"Siehe [pattern matching](../pattern-matching.md) für weitere Details zu \"\n#~ \"Mustern in Rost.\"\n\n#~ msgid \"Arrow-Left\"\n#~ msgstr \"Pfeil-links\"\n\n#~ msgid \"Arrow-Right\"\n#~ msgstr \"Pfeil-rechts\"\n\n#~ msgid \"Ctrl + Enter\"\n#~ msgstr \"Strg + Eingabe\"\n\n#~ msgid \"s\"\n#~ msgstr \"s\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"Du kannst \"\n\n#, fuzzy\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` ein veränderlicher String-Puffer (mutable string buffer).\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"Ein Großteil der Rust-Syntax wird Ihnen aus C oder C++ bekannt sein:\"\n\n#, fuzzy\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"\"\n#~ \"Blöcke und Bereiche (scopes) werden durch geschweifte Klammern getrennt.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/* ... \"\n#~ \"*/`.\"\n#~ msgstr \"\"\n#~ \"Zeilenkommentare beginnen mit `//`, Blockkommentare werden mit `/* ... */` \"\n#~ \"begrenzt\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"Schlüsselwörter (keywords) wie `if` und `while` funktionieren gleich.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"Variablenzuweisung erfolgt mit `=`, Vergleich erfolgt mit `==`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"In diesem Fall brechen wir die äußere Schleife nach 3 Iterationen der \"\n#~ \"inneren Schleife.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"Array-Zuordnung und Zugriff:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"Tupel-Zuweisung und Zugriff:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"Arrays:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"Tupel:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n#~ \"and the only valid value of that type --- that is to say both the type and \"\n#~ \"its value are expressed as `()`. It is used to indicate, for example, that a \"\n#~ \"function or expression has no return value, as we'll see in a future slide.\"\n#~ msgstr \"\"\n#~ \"Das leere Tupel „()“ wird auch als „Einheitstyp“ (unit type) bezeichnet. Es \"\n#~ \"ist sowohl ein Typ als auch der einzige gültige Wert dieses Typs – das \"\n#~ \"heißt, sowohl der Typ als auch sein Wert werden als `()` ausgedrückt. Es \"\n#~ \"wird beispielsweise verwendet, um anzuzeigen, dass eine Funktion oder ein \"\n#~ \"Ausdruck keinen Rückgabewert hat, wie wir auf einer zukünftigen Folie sehen \"\n#~ \"werden.\"\n\n#, fuzzy\n#~ msgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\n#~ msgstr \"\"\n#~ \"Die Muster können einfache Werte sein, ähnlich wie `switch` in C und C++:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Match can be used as an expression. Just like `if`, each match arm must have \"\n#~ \"the same type. The type is the last expression of the block, if any. In the \"\n#~ \"example above, the type is `()`.\"\n#~ msgstr \"\"\n#~ \"Wie bei „if let“ muss jeder Match-Arm denselben Typ haben. Der Typ ist der \"\n#~ \"letzte Ausdruck des Blocks, falls vorhanden. Im obigen Beispiel ist der Typ \"\n#~ \"`()`.\"\n\n#, fuzzy\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"\"\n#~ \"Sie können Arrays, Tupel und Slices destrukturieren, indem Sie ihre Elemente \"\n#~ \"abgleichen:\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"Beide Funktionen müssen dabei nur mit 3 × 3-Matrizen arbeiten.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"functions:\"\n#~ msgstr \"\"\n#~ \"Kopiere den folgenden Code nach <https://play.rust-lang.org/> und \"\n#~ \"implementiere die Funktionen:\"\n\n#~ msgid \"Rust will statically forbid dangling references:\"\n#~ msgstr \"Rust verbietet hängende Referenzen statisch:\"\n\n#, fuzzy\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"Die `main`\\\\-Funktion ist der Einstiegspunkt des Programms.\"\n\n#, fuzzy\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"Werte haben feste Größen, die zur Kompilierzeit bekannt sind.\"\n\n#, fuzzy\n#~ msgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"Siehe [pattern matching](../pattern-matching.md) für weitere Details zu \"\n#~ \"Mustern in Rost.\"\n\n#~ msgid \"Niche Optimization\"\n#~ msgstr \"Nischenoptimierung\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n#~ \"allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"Eine „Box“ kann nicht leer sein, daher ist der Zeiger immer gültig und nicht \"\n#~ \"„null“. Das ermöglicht dem Compiler, das Speicherlayout zu optimieren:\"\n\n#, fuzzy\n#~ msgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\n#~ msgstr \"Frage: Was passiert, wenn Du `a[3]` änderst?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The question about modifying `a[3]` can spark an interesting discussion, but \"\n#~ \"the answer is that for memory safety reasons you cannot do it through `a` at \"\n#~ \"this point in the execution, but you can read the data from both `a` and `s` \"\n#~ \"safely. It works before you created the slice, and again after the \"\n#~ \"`println`, when the slice is no longer used.\"\n#~ msgstr \"\"\n#~ \"Die Frage nach einer Werteänderung durch `a[3]` kann eine interessante \"\n#~ \"Diskussion auslösen, aber die Antwort lautet: aus Gründen der \"\n#~ \"Speichersicherheit kannst Du dies nicht über `a` tun, nachdem Du ein Slice \"\n#~ \"erstellt hast. Allerdings kannst Du die Werte sowohl von `a` als auch von \"\n#~ \"`s` sicher lesen. Weitere Einzelheiten werden im Abschnitt „Ausleihenprüfer“ \"\n#~ \"(borrow checker) erläutert.\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Rust-Terminologie:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"\"\n#~ \"`&str` eine unveränderliche (immutable) Referenz auf einen String-Slice.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` ein veränderlicher String-Puffer (mutable string buffer).\"\n\n#~ msgid \"FromIterator\"\n#~ msgstr \"FromIterator\"\n\n#, fuzzy\n#~ msgid \"Rust and Cargo come with a simple unit test framework:\"\n#~ msgstr \"Rust und Cargo verfügen über ein einfaches Unit-Test-Framework:\"\n\n#, fuzzy\n#~ msgid \"Unit tests are supported throughout your code.\"\n#~ msgstr \"Integrationstests werden über das Verzeichnis „tests/“ unterstützt.\"\n\n#, fuzzy\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust hat eine eingebaute Unterstützung für Dokumentationstests:\"\n\n#~ msgid \"Luhn Algorithm\"\n#~ msgstr \"Luhn-Algorithmus\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n#~ \"anyhow/) crates are widely used to simplify error handling.\"\n#~ msgstr \"\"\n#~ \"Die Kiste [thiserror](https://docs.rs/thiserror/) ist eine beliebte Methode \"\n#~ \"zum Erstellen einer error enum wie auf der vorherigen Seite:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Actual error type inside of it can be extracted for examination if necessary.\"\n#~ msgstr \"\"\n#~ \"Der darin enthaltene tatsächliche Fehlertyp kann bei Bedarf zur Untersuchung \"\n#~ \"extrahiert werden.\"\n\n#, fuzzy\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"Kein undefiniertes Verhalten (undefined behavior) zur Laufzeit:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will attempt to call Rust from one of your own projects today. So try to \"\n#~ \"find a little corner of your code base where we can move some lines of code \"\n#~ \"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n#~ \"that parses some raw bytes would be ideal.\"\n#~ msgstr \"\"\n#~ \"Wir werden heute versuchen, Rust aus einem Ihrer eigenen Projekte anzurufen. \"\n#~ \"Versuchen Sie es also Finden Sie eine kleine Ecke Ihrer Codebasis, in die \"\n#~ \"wir einige Codezeilen verschieben können Rost. Je weniger Abhängigkeiten und \"\n#~ \"\\\"exotische\\\" Typen, desto besser. Etwas das parst einige rohe Bytes wäre \"\n#~ \"ideal.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"Fügen Sie „vendor_available: true“ hinzu, wenn Ihre AIDL-Datei von einer \"\n#~ \"Binärdatei des Anbieters verwendet wird Partition.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is a group exercise: We will look at one of the projects you work with \"\n#~ \"and try to integrate some Rust into it. Some suggestions:\"\n#~ msgstr \"\"\n#~ \"Für die letzte Übung schauen wir uns eines der Projekte an, mit denen Sie \"\n#~ \"arbeiten. Lassen Sie uns gruppiert euch und macht das gemeinsam. Einige \"\n#~ \"Vorschläge:\"\n\n#, fuzzy\n#~ msgid \"Call your AIDL service with a client written in Rust.\"\n#~ msgstr \"\"\n#~ \"Verschieben Sie eine Funktion aus Ihrem Projekt nach Rust und rufen Sie sie \"\n#~ \"auf.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"No solution is provided here since this is open-ended: it relies on someone \"\n#~ \"in the class having a piece of code which you can turn in to Rust on the fly.\"\n#~ msgstr \"\"\n#~ \"Hier wird keine Lösung bereitgestellt, da dies offen ist: Es hängt von \"\n#~ \"jemandem ab Die Klasse hat einen Code, den Sie spontan an Rust übergeben \"\n#~ \"können.\"\n\n#, fuzzy\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"Funktionen\"\n\n#, fuzzy\n#~ msgid \"Threads are all daemon threads, the main thread does not wait for them.\"\n#~ msgstr \"\"\n#~ \"Threads sind alle Daemon-Threads, der Haupt-Thread wartet nicht auf sie.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust uses the type system to enforce synchronization of shared data. This is \"\n#~ \"primarily done via two types:\"\n#~ msgstr \"\"\n#~ \"Rust verwendet das Typsystem, um die Synchronisierung gemeinsam genutzter \"\n#~ \"Daten zu erzwingen. Das ist hauptsächlich über zwei Arten:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T`: handles sharing between threads and takes care to \"\n#~ \"deallocate `T` when the last reference is dropped,\"\n#~ msgstr \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), Atomic \"\n#~ \"Reference Counted `T`: handhabt die gemeinsame Nutzung zwischen Threads und \"\n#~ \"sorgt dafür, dass `T` freigegeben wird, wenn die letzte Referenz gelöscht \"\n#~ \"wird,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n#~ \"mutually exclusive access to the `T` value.\"\n#~ msgstr \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): sorgt \"\n#~ \"für den sich gegenseitig ausschließenden Zugriff auf den `T`\\\\-Wert.\"\n\n#, fuzzy\n#~ msgid \"Let us practice our new concurrency skills with\"\n#~ msgstr \"Lassen Sie uns unsere neuen Nebenläufigkeitsfähigkeiten mit üben\"\n\n#, fuzzy\n#~ msgid \"Dining philosophers: a classic problem in concurrency.\"\n#~ msgstr \"\"\n#~ \"Multithreaded Link Checker: ein größeres Projekt, für das Sie Cargo \"\n#~ \"verwenden werden Abhängigkeiten herunterladen und dann parallel Links prüfen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n#~ \"rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"Sie benötigen auch eine Möglichkeit, Links zu finden. Dafür können wir \"\n#~ \"[`scraper`](https://docs.rs/scraper/) verwenden:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"Schließlich brauchen wir eine Möglichkeit, mit Fehlern umzugehen. Wir \"\n#~ \"verwenden [`thiserror`](https://docs.rs/thiserror/) für Das:\"\n\n#, fuzzy\n#~ msgid \"Concurrency Morning Exercise\"\n#~ msgstr \"Tag 3 Morgengymnastik\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](dining-philosophers.md))\"\n#~ msgstr \"([zurück zur Übung](dining-philosophers.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](link-checker.md))\"\n#~ msgstr \"([zurück zur Übung](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"Async Rust\"\n#~ msgstr \"Warum Rost?\"\n\n#, fuzzy\n#~ msgid \"Futures Control Flow\"\n#~ msgstr \"Kontrollfluss\"\n\n#, fuzzy\n#~ msgid \"Concurrency Afternoon Exercise\"\n#~ msgstr \"Tag 1 Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](dining-philosophers-async.md))\"\n#~ msgstr \"([zurück zur Übung](dining-philosophers.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](chat-app.md))\"\n#~ msgstr \"([zurück zur Übung](luhn.md))\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Ein kleines Beispiel\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Warum Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Kompilierzeitgarantien\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Laufzeitgarantien\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Moderne Merkmale\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Grundlegende Syntax\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String vs. str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Überladen\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Arrays und for-Schleifen\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for-Ausdrücke\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while-Ausdrücke\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop-Ausdrücke\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Varianteninhalte\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Größen von Aufzählungstypen\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let-Ausdrücke\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"while let-Ausdrücke\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Arrays destrukturieren\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Abgleichsbedingungen\"\n\n#, fuzzy\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Musterabgleich\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stapelspeicher vs. Haldenspeicher\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Stapelspeicher\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Manuelle Speicherverwaltung\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Gültigkeitsbereichbasierte Speicherverwaltung\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Automatische Speicherbereinigung\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Rust Speicherverwaltung\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Verschieben von String in Rust\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"Doppel-Freigabe-Fehler in modernem C++\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Verschieben in Funktionsaufrufen\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Kopieren und Klonen\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Geteiltes und einmaliges Ausleihen\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Feld Abkürzungs Syntax\"\n\n#, fuzzy\n#~ msgid \"Storing Books\"\n#~ msgstr \"`&str`\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option und Result\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Rekursive Datentypen\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iteratoren und Eigentümerschaft\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Generische Methoden\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Standardmethoden\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Wichtige Merkmale\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default Merkmal\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Operatoren: Add, Mul, ...\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"Eine einfache GUI-Bibliothek\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Punkte und Polygone\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Abfangen der Auflösung des Stapelspeichers\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Strukturierte Fehlerbehandlung\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Weitergabe von Fehlern mit ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Fehlertypen konvertieren\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Ableiten von Fehleraufzählungen\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Kontext zu Fehlern hinzufügen\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Tag 1 Morgens\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Tag 1 Nachmittags\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Tag 2 Morgens\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Tag 2 Nachmittags\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Tag 3 Morgens\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Tag 3 Nachmittags\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Hardwarenahes Rust: Morgens\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Nebenläufigkeit Morgens\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Nebenläufigkeit Nachmittags\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the standard \"\n#~ \"library.\"\n#~ msgstr \"\"\n#~ \"Tag 2: Zusammengesetzte Datentypen, Musterabgleich, die Standardbibliothek.\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Tag 3: Merkmale und Generika, Fehlerbehandlung, Testen, unsicheres Rust.\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"Die Idee für den ersten Tag ist, Rust _gerade genug_ zu zeigen, um über den \"\n#~ \"berühmten Ausleihenprüfer (borrow checker) sprechen zu können. Die Art und \"\n#~ \"Weise, wie Rust mit Speicher umgeht, ist ein wichtiges Merkmal und das \"\n#~ \"solltest Du den Kursteilnehmern direkt zeigen.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over the \"\n#~ \"schedule. We suggest splitting the day into two parts (following the slides):\"\n#~ msgstr \"\"\n#~ \"Wenn Du in einem Klassenzimmer unterrichtest, ist dies ein guter Ort, um \"\n#~ \"über den Zeitplan zu gehen. Wir empfehlen, den Tag in zwei Teile aufzuteilen \"\n#~ \"(nach den Folien):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Morgens: 9:00 bis 12:00 Uhr,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Nachmittag: 13:00 bis 16:00 Uhr.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Dies kannst Du natürlich bei Bedarf anpassen. Bitte achte darauf, Pausen \"\n#~ \"einzuplanen. Wir empfehlen jede Stunde eine Pause!\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Hier ein kleines Beispielprogramm in Rust:\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Der Code implementiert die Collatz-Vermutung: Es wird angenommen, dass die \"\n#~ \"Schleife immer enden wird, allerdings ist das noch nicht bewiesen. Ändere \"\n#~ \"den Code und spiele mit verschiedenen Eingaben.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime integer \"\n#~ \"overflow.\"\n#~ msgstr \"\"\n#~ \"Erkläre, dass alle Variablen statisch typisiert sind. Versuche, `i32` zu \"\n#~ \"entfernen um Typinferenz (type inference) auszulösen. Versuche es \"\n#~ \"stattdessen mit `i8` und löse dadurch einen Ganzzahlüberlauf zur Laufzeit \"\n#~ \"aus.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Ändere `let mut x` in `let x`, und bespreche den Compilerfehler.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match the \"\n#~ \"format string.\"\n#~ msgstr \"\"\n#~ \"Zeige, wie `print!` einen Kompilierungsfehler ausgibt, wenn die Argumente \"\n#~ \"nicht mit dem Format-String übereinstimmen.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Zeige, wie Du `{}` als Platzhalter verwenden musst, wenn Du einen Ausdruck \"\n#~ \"(Expression) drucken möchtest, der komplexer als nur eine einzelne Variable \"\n#~ \"ist.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Zeige den Kursteilnehmern die Standardbibliothek (standard library) und \"\n#~ \"zeige ihnen, wie sie nach `std::fmt` suchen welches die Regeln der \"\n#~ \"Formatierungs-Minisprache enthält. Es ist wichtig, dass die Kursteilnehmer \"\n#~ \"mit der Suche in der Standardbibliothek vertraut gemacht werden.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Kompilierzeit-Speichersicherheit.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Mangel in undefiniertem Laufzeitverhalten.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Moderne Sprachfunktionen.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Statische Speicherverwaltung zur Kompilierzeit:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Keine Speicherlecks (_meistens_, siehe Anmerkungen).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"Es ist möglich, Speicherlecks in (sicherem) Rust zu erzeugen. Einige \"\n#~ \"Beispiele sind:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get runtime-\"\n#~ \"initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Du kannst [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) verwenden, um einen Zeiger zu verlieren. Eine Nutzung \"\n#~ \"dieser könnte sein, um zur Laufzeit initialisierte statische Variablen in \"\n#~ \"Laufzeitgröße zu erhalten\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.\"\n#~ \"html) to make the compiler \\\"forget\\\" about a value (meaning the destructor \"\n#~ \"is never run).\"\n#~ msgstr \"\"\n#~ \"Du kannst [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.\"\n#~ \"html) verwenden, um den Compiler einen Wert \\\"vergessen\\\" zu lassen (was \"\n#~ \"bedeutet, dass der Destruktor niemals ausgeführt wird).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-lang.\"\n#~ \"org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Du kannst auch versehentlich einen \\\\[Referenzzyklus\\\\] mit `Rc` oder `Arc` \"\n#~ \"erstellen\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory leak \"\n#~ \"and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"In der Tat werden einige in Betracht ziehen, eine Sammlung (Collection) \"\n#~ \"unendlich  zu befüllen Rust schützt nicht vor sowelchen Speicherlecks \"\n#~ \"(memory leaks).\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood as \"\n#~ \"\\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"\\\"Keine Speicherlecks\\\" sollten somit verstanden werden als \\\"so gut wie \"\n#~ \"keine _versehentlichen_ Speicherlecks\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode (`cargo \"\n#~ \"build --release`).\"\n#~ msgstr \"\"\n#~ \"Ganzzahlüberlauf (integer overflow) wird über ein Flag zur Kompilierzeit \"\n#~ \"definiert. Die Optionen sind entweder ein kontrollierter Abbruch des \"\n#~ \"Programms (panic) oder eine Wrap-Around Semantik. Standardmäßig erhältst Du \"\n#~ \"einen Abbruch (panic) im Debug-Modus (`cargo build`) und ein Wrap-Around im \"\n#~ \"Release-Modus (`cargo build --release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not be \"\n#~ \"disabled directly with the `unsafe` keyword. However, `unsafe` allows you to \"\n#~ \"call functions such as `slice::get_unchecked` which does not do bounds \"\n#~ \"checking.\"\n#~ msgstr \"\"\n#~ \"Die Grenzüberprüfung (bounds checking) kann nicht mit einem Compiler-Flag \"\n#~ \"deaktiviert werden. Es kann auch nicht direkt mit dem Schlüsselwort „unsafe“ \"\n#~ \"deaktiviert werden. Jedoch kannst Du Funktionen wie `slice::get_unchecked` \"\n#~ \"mit `unsafe` aufrufen was keine Grenzenprüfung durchführt.\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust wurde mit vielen Erfahrungen aus den letzten 40 Jahren gebaut.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Sprachmerkmale\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Werkzeuge (Tools)\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to 'pay' \"\n#~ \"for higher-level programming constructs with memory or CPU. For example, \"\n#~ \"writing a loop using `for` should result in roughly the same low level \"\n#~ \"instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Kostenfreie Abstraktionen, ähnlich wie bei C++, bedeuten, dass Du für \"\n#~ \"Programmierkonstrukte auf höherer Ebene nicht mit Speicher oder CPU \"\n#~ \"„bezahlen“ musst. Beispielsweise sollte das Schreiben einer Schleife mit \"\n#~ \"`for` ungefähr zu denselben Low-Level-Anweisungen führen wie die Verwendung \"\n#~ \"des Konstrukts `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', also \"\n#~ \"known as 'sum types', which allow the type system to express things like \"\n#~ \"`Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Es kann erwähnenswert sein, dass Rust-Enums „algebraische Datentypen“ sind, \"\n#~ \"auch bekannt als „Summentypen“, die es dem Typsystem ermöglichen, Dinge wie \"\n#~ \"`Option<T>` und `Result<T, E>` auszudrücken.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with _actionable_ \"\n#~ \"feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Erinnere die Teilnehmer daran, die Fehler zu lesen – viele Entwickler haben \"\n#~ \"sich daran gewöhnt, lange Compiler-Ausgaben zu ignorieren. Der Rust-Compiler \"\n#~ \"ist deutlich gesprächiger als andere Compiler. Es liefert Ihnen oft \"\n#~ \"_umsetzbares_ Feedback, das Sie in Ihren Code einfach übernehmen können.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, Python, \"\n#~ \"and Go. Rust does not come with several things you might consider standard \"\n#~ \"and essential:\"\n#~ msgstr \"\"\n#~ \"Die Rust-Standardbibliothek ist im Vergleich zu Sprachen wie Java, Python \"\n#~ \"und Go klein. Rust bringt einige Dinge nicht mit, die Sie als normal \"\n#~ \"betrachten könnten:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"ein Zufallszahlengenerator, siehe aber [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"Unterstützung für SSL oder TLS, siehe jedoch [rusttls](https://docs.rs/\"\n#~ \"rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"Unterstützung für JSON, siehe jedoch [serde_json](https://docs.rs/\"\n#~ \"serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and perhaps \"\n#~ \"there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Der Grund dafür ist, dass die Funktionalität in der Standardbibliothek nicht \"\n#~ \"herausgenommen werden dürfen und daher sehr stabil sein muss. Für die obigen \"\n#~ \"Beispiele arbeitet die Rust-Gemeinschaft immer noch daran, die beste Lösung \"\n#~ \"zu finden – und vielleicht gibt es für einige dieser Dinge keine einzige \"\n#~ \"„beste Lösung“.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A consequence \"\n#~ \"of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust verfügt über einen integrierten Paketmanager in Form von Cargo, der das \"\n#~ \"Herunterladen und Kompilieren von Crates von Drittanbietern vereinfacht. \"\n#~ \"Dies hat zur Folge, dass die Standardbibliothek kleiner sein kann.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates to \"\n#~ \"find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Das Auffinden guter Kisten von Drittanbietern kann ein Problem sein. \"\n#~ \"Websites wie <https://lib.rs/> hilft Dir dabei, indem es Dir ermöglicht, \"\n#~ \"Gesundheitsmetriken für Kisten zu vergleichen, um eine gute und \"\n#~ \"vertrauenswürdige zu finden.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) ist eine gut unterstützte \"\n#~ \"LSP-Implementierung, die in wichtigen IDEs und Texteditoren verwendet wird.\"\n\n#, fuzzy\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"Unicode-Skalarwerte\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Wie C++ hat Rust Referenzen:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Wir müssen `ref_x` beim Zuweisen dereferenzieren, ähnlich wie bei C und C++-\"\n#~ \"Zeigern.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values over \"\n#~ \"their lifetime.\"\n#~ msgstr \"\"\n#~ \"Referenzen, die als `mut` deklariert sind, können über ihre Lebensdauer an \"\n#~ \"unterschiedliche Werte gebunden werden.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Eine Referenz \\\"leiht\\\" (borrows) sich den Wert, auf den sie sich bezieht, .\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust verfolgt die Lebensdauer aller Referenzen, um sicherzustellen, dass sie \"\n#~ \"lange genug leben\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` vs `str`\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Du kannst `&str`\\\\-Slices von `String` über `&` und optional eine \"\n#~ \"Bereichsauswahl (range selection) ausleihen.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Eine Rust-Version der berühmten [FizzBuzz](https://de.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) Interviewfrage:\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward declarations \"\n#~ \"nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"Wir beziehen uns in `main` auf eine unten beschriebene Funktion. Es sind \"\n#~ \"weder Forward-Deklarationen noch Header erforderlich.\"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"Der Bereichsausdruck (range expression) in der `for`\\\\-Schleife in \"\n#~ \"`print_fizzbuzz_to()` enthält `=n`, was dazu führt, dass die Obergrenze \"\n#~ \"einschlossen wird.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Alle Sprachelemente in Rust können mit der speziellen `///`\\\\-Syntax \"\n#~ \"dokumentiert werden.\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but in \"\n#~ \"real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Dieser Kurs enthält keine Rustdocs auf Folien, um Platz zu sparen, aber im \"\n#~ \"echten Code sollten Rustdoc-Kommentare vorhanden sein.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need not \"\n#~ \"be addressed here.\"\n#~ msgstr \"\"\n#~ \"Inner doc Kommentare werden später besprochen (auf der Seite zu Modulen) und \"\n#~ \"müssen hier nicht behandelt werden.\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Methoden sind Funktionen, die einem bestimmten Typ zugeordnet sind. Das \"\n#~ \"`self`\\\\-Argument einer Methode ist die Instanz des Typs, dem sie zugeordnet \"\n#~ \"ist:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Wir werden uns in der heutigen Übung und im morgigen Unterricht tiefer mit \"\n#~ \"Methoden befassen.\"\n\n#, fuzzy\n#~ msgid \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"\"\n#~ \"Füge einen `Rectangle::new`\\\\-Konstruktor hinzu und rufe diesen von `main` \"\n#~ \"aus auf:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Füge einen `Rectangle::new_square(width: u32)`\\\\-Konstruktor hinzu, um zu \"\n#~ \"veranschaulichen, dass Konstruktoren beliebige Parameter annehmen können.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Funktionsüberladung\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Überladen wird nicht unterstützt:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Akzeptiert immer eine feste Anzahl von Parametern.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Standardwerte werden nicht unterstützt:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"\"\n#~ \"Alle Aufrufstellen (call sites) haben die gleiche Anzahl von Argumenten.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Makros werden manchmal als Alternative verwendet.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Funktionsparameter können jedoch generisch sein:\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind of \"\n#~ \"limited polymorphism on argument types. We will see more details in a later \"\n#~ \"section.\"\n#~ msgstr \"\"\n#~ \"Bei Verwendung von Generika (generics) kann `Into<T>` der Standardbibliothek \"\n#~ \"eine Art eingeschränkten Polymorphismus für Argumenttypen bereitstellen. \"\n#~ \"Weitere Einzelheiten erfährst Du in einem späteren Abschnitt.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Tag 1: Übungen am Morgen\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"In diesen Übungen werden wir zwei Teile von Rust erkunden:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Implizite Konvertierungen zwischen Typen.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Arrays und `for`\\\\-Schleifen.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"Ein paar Dinge, die Du beim Lösen der Aufgaben beachten solltest:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.md) \"\n#~ \"for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Verwende nach Möglichkeit eine lokale Rust-Installation. Auf diese Weise \"\n#~ \"kannst Du Autovervollständigung in Deinem Editor erhalten. Weitere \"\n#~ \"Informationen findest Du auf der Seite: \\\\[Cargo verwenden\\\\].\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"Alternativ kannst du den Rust Spielplatz verwenden.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets lose \"\n#~ \"their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Die Code-Snippets sind absichtlich nicht editierbar: die Inline-Code-\"\n#~ \"Snippets verlieren Deine Änderungen, sobald Du die Seite verlässt.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust wendet nicht automatisch _implizite Konvertierungen_ zwischen Typen an \"\n#~ \"(\\\\[anders als C++[3](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Das kannst Du an einem Programm wie diesem sehen:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-lang.\"\n#~ \"org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-lang.org/\"\n#~ \"std/convert/trait.Into.html) traits to let us convert between them. The \"\n#~ \"`From<T>` trait has a single `from()` method and similarly, the `Into<T>` \"\n#~ \"trait has a single `into()` method. Implementing these traits is how a type \"\n#~ \"expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Alle Rust-Integer-Typen implementieren die [`From<T>`](https://doc.rust-lang.\"\n#~ \"org/std/convert/trait.From.html)\\\\- und [`Into<T>`](https://doc.rust-lang.\"\n#~ \"org/std/convert/trait.Into.html)\\\\-Merkmale (traits),  um zwischen ihnen \"\n#~ \"umzuwandeln. Das `From<T>`\\\\-Merkmal (trait) hat eine einzige `from()` \\\\-\"\n#~ \"Methode und ähnlicherweise hat das `Into<T>`\\\\-Merkmal auch nur eine einzige \"\n#~ \"`into()`\\\\-Methode. Durch die Implementierung dieser Merkmale (traits) \"\n#~ \"drückt ein Typ aus, zu welchen anderen Typen dieser umgewandelt werden kann.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> for \"\n#~ \"i16` implementation automatically create an implementation of `Into<i16> for \"\n#~ \"i8`.\"\n#~ msgstr \"\"\n#~ \"Die Standardbibliothek enthält eine Implementierung von `From<i8> for i16`, \"\n#~ \"was bedeutet dass wir eine Variable `x` vom Typ `i8` in ein `i16` durch \"\n#~ \"`i16::from(x)` umwandeln können.  Alternativ geht dies mit `x.into()`, denn \"\n#~ \"die `From<i8> for i16`\\\\-Implementierung  erstellt automatisch eine \"\n#~ \"`Into<i16> for i8`\\\\-Implementierung.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, so \"\n#~ \"it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"Dasselbe gilt für `From`\\\\-Implementierungen für Deine eigenen Typen. Es \"\n#~ \"reicht also aus, nur `From` zu implementieren, um automatisch eine \"\n#~ \"entsprechende `Into`\\\\-Implementierung zu erhalten.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"Führe das obige Programm aus und schau Dir den Compiler-Fehler an.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Aktualisiere den obigen Code, um `into()` für die Konvertierung zu verwenden.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/trait.\"\n#~ \"From.html) to see if `From<T>` is implemented for the pairs you check.\"\n#~ msgstr \"\"\n#~ \"Ändere die Typen von `x` und `y` in andere Typen (z. B. `f32`, `bool`, \"\n#~ \"`i128`), um zu sehen, welche Typen Du in welche anderen Typen konvertieren \"\n#~ \"kannst. Versuche, kleine Typen in große Typen umzuwandeln und umgekehrt. \"\n#~ \"Schau in der [Standardbibliotheksdokumentation](https://doc.rust-lang.org/\"\n#~ \"std/convert/trait.From.html) nach, ob `From<T>` für die von Dir überprüften \"\n#~ \"Paare implementiert sind.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Arrays und `for`\\\\-Schleifen\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Wir haben gesehen, dass ein Array wie folgt deklariert werden kann:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with `{:?}\"\n#~ \"`:\"\n#~ msgstr \"\"\n#~ \"Du kannst ein solches Array drucken (print), indem Du mit `{:?}` nach der \"\n#~ \"Debug-Darstellung fragst:\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Mit Rust kannst Du über Dinge wie Arrays und Ranges iterieren, indem Du \"\n#~ \"`for` verwendest:\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Bonus-Frage\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for your \"\n#~ \"argument and return types? Something like `&[&[i32]]` for a two-dimensional \"\n#~ \"slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Könntest Du den `&[i32]`\\\\-Anteilstyp anstelle von fest codierten 3 × 3-\"\n#~ \"Matrizen als Argument- und Rückgabetypen verwenden? Oder etwas wie \"\n#~ \"`&[&[i32]]` für einen zweidimensionalen Anteilstyp?  Warum oder warum nicht?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production quality \"\n#~ \"implementation.\"\n#~ msgstr \"\"\n#~ \"Teste die [`ndarray`\\\\-Kiste](https://docs.rs/ndarray/) für eine \"\n#~ \"produktionsfertige Implementierung.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"Die Lösung und die Antwort zum Bonusteil findest Du im Abschnitt [Lösung]\"\n#~ \"(solutions-morning.md#arrays-and-for-loops).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to conditionally \"\n#~ \"evaluate one of two blocks, but the blocks can have a value which then \"\n#~ \"becomes the value of the `if` expression. Other control flow expressions \"\n#~ \"work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Wie wir gesehen haben, ist `if` ein Ausdruck in Rust. Es ist bedingt gewohnt \"\n#~ \"einen von zwei Blöcken auswerten, aber die Blöcke können einen Wert haben, \"\n#~ \"der dann wird der Wert des `if`\\\\-Ausdrucks. Andere \"\n#~ \"Ablaufsteuerungsausdrücke funktionieren ähnlich in Rost.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is the \"\n#~ \"return value:\"\n#~ msgstr \"\"\n#~ \"Die gleiche Regel gilt für Funktionen: Der Wert des Funktionskörpers ist der \"\n#~ \"Rückgabewert:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"Der Zweck dieser Folie ist es zu zeigen, dass Blöcke in Rust einen Typ und \"\n#~ \"einen Wert haben.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is closely \"\n#~ \"related to the [`while let` loop](while-let-expressions.md). It will \"\n#~ \"automatically call `into_iter()` on the expression and then iterate over it:\"\n#~ msgstr \"\"\n#~ \"Der „for“-Ausdruck ist eng verwandt mit dem „while let“-Ausdruck. Es wird \"\n#~ \"Rufen Sie automatisch `into_iter()` für den Ausdruck auf und iterieren Sie \"\n#~ \"dann darüber:\"\n\n#, fuzzy\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Sie können hier wie gewohnt `break` und `continue` verwenden.\"\n\n#, fuzzy\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"Index-Iteration ist in Rust keine spezielle Syntax für genau diesen Fall.\"\n\n#, fuzzy\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"„(0..10)“ ist ein Bereich, der ein „Iterator“-Merkmal implementiert.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every other \"\n#~ \"element. \"\n#~ msgstr \"\"\n#~ \"„step_by“ ist eine Methode, die einen weiteren „Iterator“ zurückgibt, der \"\n#~ \"jedes andere Element überspringt.\"\n\n#, fuzzy\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"`loop`\\\\-Ausdrücke\"\n\n#, fuzzy\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"\"\n#~ \"Schließlich gibt es noch ein „loop“-Schlüsselwort, das eine Endlosschleife \"\n#~ \"erzeugt. Hier müssen Sie entweder `break` oder `return`, um die Schleife zu \"\n#~ \"stoppen:\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Aufgrund von Typ-Inferenz (type inference) ist `i32` optional. Wir werden \"\n#~ \"die Typen nach und nach immer öfter weglassen, je weiter der Kurs \"\n#~ \"fortschreitet.\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"Der folgende Code weist den Compiler an, in einen bestimmten generischen \"\n#~ \"Container zu kopieren, ohne dass jemals der enthaltene Typ explizit \"\n#~ \"angegeben wird. Der Unterstrich `_` wird dabei als Platzhalter verwendet:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-lang.\"\n#~ \"org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) bezieht sich auf den `FromIterator`, den [`HashSet`]\"\n#~ \"(https://doc.rust-lang.org/std/iter/trait.FromIterator.html) implementiert.\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Statische und konstante Variablen\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse memory \"\n#~ \"locations when shadowing an immutable variable in a scope, even if the type \"\n#~ \"does not change.\"\n#~ msgstr \"\"\n#~ \"Der folgende Code demonstriert, warum der Compiler Speicherorte nicht \"\n#~ \"einfach wiederverwenden kann, wenn er eine unveränderliche Variable in einem \"\n#~ \"Bereich verschattet, selbst wenn sich der Typ nicht ändert.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Diese Seite bietet einen Aufzählungstyp `CoinFlip` mit zwei Varianten \"\n#~ \"`Heads` und `Tail`. Beachten Sie bei der Verwendung von Varianten \"\n#~ \"möglicherweise den Namensraum.\"\n\n#, fuzzy\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"\"\n#~ \"In beiden werden zugehörige Funktionen innerhalb eines `impl`\\\\-Blocks \"\n#~ \"definiert.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then use \"\n#~ \"the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Sie können reichhaltigere Aufzählungen definieren, bei denen die Varianten \"\n#~ \"Daten enthalten. Sie können dann die verwenden `match`\\\\-Anweisung, um die \"\n#~ \"Daten aus jeder Variante zu extrahieren:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Rust-Aufzählungen sind dicht gepackt, wobei Einschränkungen aufgrund der \"\n#~ \"Ausrichtung berücksichtigt werden:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/match-\"\n#~ \"expr.html) is used to match a value against one or more patterns. In that \"\n#~ \"sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"Das Schlüsselwort „match“ wird verwendet, um einen Wert mit einem oder \"\n#~ \"mehreren Mustern abzugleichen. In In diesem Sinne funktioniert es wie eine \"\n#~ \"Reihe von `if let`\\\\-Ausdrücken:\"\n\n#, fuzzy\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"Das `_`\\\\-Muster ist ein Platzhaltermuster, das jedem Wert entspricht.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Es kann nützlich sein, zu zeigen, wie die Bindung funktioniert, indem Sie \"\n#~ \"zum Beispiel ein Platzhalterzeichen durch eine Variable ersetzen oder die \"\n#~ \"Anführungszeichen um `q` entfernen.\"\n\n#, fuzzy\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Sie können die Übereinstimmung anhand einer Referenz nachweisen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable patterns, \"\n#~ \"as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Dies könnte ein guter Zeitpunkt sein, um das Konzept der unwiderlegbaren \"\n#~ \"Muster anzusprechen, da der Begriff in Fehlermeldungen auftauchen kann.\"\n\n#, fuzzy\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Sie können `structs` auch destrukturieren:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Beim Abgleich können Sie einem Muster einen _Wächter_ hinzufügen. Dies ist \"\n#~ \"ein beliebiger boolescher Wert Ausdruck, der ausgeführt wird, wenn das \"\n#~ \"Muster übereinstimmt:\"\n\n#, fuzzy\n#~ msgid \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Sie können die im Muster definierten Variablen in Ihrem if-Ausdruck \"\n#~ \"verwenden.\"\n\n#, fuzzy\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Tag 1: Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Wir werden uns zwei Dinge ansehen:\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Luhn-Algorithmus\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Enums und Musterabgleich (pattern matching).\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Speicherverwaltung: Stack vs. Heap, manuelle Speicherverwaltung, \"\n#~ \"bereichsbasierte Speicherverwaltung und Speicherbereinigung (garbage \"\n#~ \"collection).\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Eigentum (ownership): Bewegungssemantik (move semantics), Kopieren und \"\n#~ \"Klonen (copy and cloning), Ausleihen (borrowing) und Lebensdauer (lifetimes).\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Strings und Iteratoren\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"\"\n#~ \"Lasst uns zunächst die Funktionsweise der Speicherverwaltung auffrischen.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"Stapel vs. Haufen\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Stapelspeicher vs. Haldenspeicher\"\n\n#, fuzzy\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Heap-Speicher können Sie selbst zuweisen und freigeben.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Wenn dies nicht sorgfältig durchgeführt wird, kann dies zu Abstürzen, \"\n#~ \"Fehlern, Sicherheitslücken und Speicherlecks führen.\"\n\n#, fuzzy\n#~ msgid \"C Example\"\n#~ msgstr \"\\\\##C Beispiel\"\n\n#, fuzzy\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"\"\n#~ \"Sie müssen `free` auf jedem Zeiger aufrufen, den Sie mit `malloc` zuweisen:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and `free`: \"\n#~ \"the pointer is lost and we cannot deallocate the memory. Worse, freeing the \"\n#~ \"pointer twice, or accessing a freed pointer can lead to exploitable security \"\n#~ \"vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"Speicherverlust, wenn die Funktion früh zwischen `malloc` und `free` \"\n#~ \"zurückkehrt: the Zeiger geht verloren und wir können den Speicher nicht \"\n#~ \"freigeben.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Mit Konstruktoren und Destruktoren können Sie sich in die Lebensdauer eines \"\n#~ \"Objekts einklinken.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object is \"\n#~ \"destroyed. The compiler guarantees that this happens, even if an exception \"\n#~ \"is raised.\"\n#~ msgstr \"\"\n#~ \"Indem Sie einen Zeiger in ein Objekt einschließen, können Sie Speicher \"\n#~ \"freigeben, wenn das Objekt vorhanden ist zerstört. Der Compiler garantiert, \"\n#~ \"dass dies geschieht, auch wenn es sich um eine Ausnahme handelt erzogen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Dies wird oft als _Ressourcenerwerb ist Initialisierung_ (RAII) bezeichnet \"\n#~ \"und gibt ihr klugen zeiger.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to memory \"\n#~ \"allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"Das `std::unique_ptr`\\\\-Objekt wird auf dem Stack allokiert und zeigt auf \"\n#~ \"auf dem Heap zugewiesener Speicher.\"\n\n#, fuzzy\n#~ msgid \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"Am Ende von `say_hello` wird der Destruktor `std::unique_ptr` ausgeführt.\"\n\n#, fuzzy\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"Der Destruktor gibt das `Person`\\\\-Objekt frei, auf das er zeigt.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Spezielle Move-Konstruktoren werden verwendet, wenn der Besitz an eine \"\n#~ \"Funktion übergeben wird:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Eine Alternative zur manuellen und bereichsbasierten Speicherverwaltung ist \"\n#~ \"der automatische Speicher Management:\"\n\n#, fuzzy\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"\"\n#~ \"Der Programmierer weist Speicher nie explizit zu oder gibt ihn nicht mehr \"\n#~ \"frei.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Ein Garbage Collector findet ungenutzten Speicher und gibt ihn für den \"\n#~ \"Programmierer frei.\"\n\n#, fuzzy\n#~ msgid \"Java Example\"\n#~ msgstr \"Java-Beispiel\"\n\n#, fuzzy\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"\"\n#~ \"Das `person`\\\\-Objekt wird nicht freigegeben, nachdem `sayHello` \"\n#~ \"zurückgegeben wird:\"\n\n#, fuzzy\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Speicherverwaltung in Rust\"\n\n#, fuzzy\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Die Speicherverwaltung in Rust ist eine Mischung:\"\n\n#, fuzzy\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Sicher und korrekt wie Java, aber ohne Garbage Collector.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"Bereichsbasiert wie C++, aber der Compiler erzwingt die vollständige \"\n#~ \"Einhaltung.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Ein Rust-Benutzer kann die richtige Abstraktion für die Situation auswählen, \"\n#~ \"einige haben sogar keine Kosten zur Laufzeit wie C.\"\n\n#, fuzzy\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Dies wird erreicht, indem _Eigentum_ explizit modelliert wird.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the potential \"\n#~ \"errors in C.\"\n#~ msgstr \"\"\n#~ \"Wenn Sie an dieser Stelle fragen, wie das geht, können Sie erwähnen, dass \"\n#~ \"dies in Rust normalerweise von RAII-Wrapper-Typen wie [Box](https://doc.rust-\"\n#~ \"lang.org/std/boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html) oder \"\n#~ \"[Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html) gehandhabt wird. \"\n#~ \"Diese kapseln den Besitz und die Speicherzuweisung auf verschiedene Weise \"\n#~ \"und verhindern die potenziellen Fehler in C.\"\n\n#, fuzzy\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Hier kann ein Destruktor laufen, um Ressourcen freizugeben.\"\n\n#, fuzzy\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"Es gibt immer _genau_ eine Variablenbindung, die einen Wert besitzt.\"\n\n#, fuzzy\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Die Heap-Daten von „s1“ werden für „s2“ wiederverwendet.\"\n\n#, fuzzy\n#~ msgid \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"\"\n#~ \"Wenn `s1` den Gültigkeitsbereich verlässt, passiert nichts (es wurde \"\n#~ \"verschoben).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a way \"\n#~ \"to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Wenn Schüler nach „derive“ fragen, reicht es zu sagen, dass dies eine \"\n#~ \"Möglichkeit ist, Code in Rust zu generieren zur Kompilierzeit. In diesem \"\n#~ \"Fall werden die Standardimplementierungen der Merkmale „Kopieren“ und \"\n#~ \"„Klonen“ generiert.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    let p = Point(p1.0 + p2.0, p1.1 + p2.1);\\n\"\n#~ \"    println!(\\\"&p.0: {:p}\\\", &p.0);\\n\"\n#~ \"    p\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"pub fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"&p3.0: {:p}\\\", &p3.0);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"Eine andere Möglichkeit, es zu erklären:\"\n\n#, fuzzy\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Ein geliehener Wert hat eine _Lebensdauer_:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Lesen Sie `&'einen Punkt` als \\\"einen geliehenen `Punkt`, der mindestens für \"\n#~ \"den gilt Lebenszeit `a`\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Zusätzlich zum Ausleihen ihrer Argumente kann eine Funktion einen geliehenen \"\n#~ \"Wert zurückgeben:\"\n\n#, fuzzy\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"„a“ ist ein generischer Parameter, er wird vom Compiler abgeleitet.\"\n\n#, fuzzy\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"Lebensdauern beginnen mit `'` und `'a` ist ein typischer Standardname.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"Der Teil _at least_ ist wichtig, wenn sich Parameter in unterschiedlichen \"\n#~ \"Geltungsbereichen befinden.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Setzen Sie den Arbeitsbereich zurück und ändern Sie die Funktionssignatur zu \"\n#~ \"`fn left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. Dies wird \"\n#~ \"nicht kompiliert, da die Beziehung zwischen den Lebensdauern „a“ und „b“ \"\n#~ \"unklar ist.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p3: &Point;\\n\"\n#~ \"    {\\n\"\n#~ \"        let p2: Point = Point(20, 20);\\n\"\n#~ \"        p3 = left_most(&p1, &p2);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"Eine andere Möglichkeit, es zu erklären:\"\n\n#, fuzzy\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"\"\n#~ \"Zwei Referenzen auf zwei Werte werden von einer Funktion ausgeliehen und die \"\n#~ \"Funktion kehrt zurück eine andere Referenz.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn left_most<'a, \"\n#~ \"'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will not compile \"\n#~ \"because the relationship between the lifetimes `'a` and `'b` is unclear.\"\n#~ msgstr \"\"\n#~ \"Es muss von einem dieser beiden Eingänge stammen (oder von einer globalen \"\n#~ \"Variablen).\"\n\n#, fuzzy\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"\"\n#~ \"Welches ist es? Der Compiler muss es wissen, damit die zurückgegebene \"\n#~ \"Referenz auf der Aufrufseite nicht verwendet wird länger als eine Variable, \"\n#~ \"von der die Referenz stammt.\"\n\n#, fuzzy\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"\"\n#~ \"Als nächstes beschreiben wir die Unterscheidung zwischen Methodenempfängern.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker rules, \"\n#~ \"and `self` is no exception. It isn't possible to reference a struct from \"\n#~ \"multiple locations and call a mutating (`&mut self`) method on it.\"\n#~ msgstr \"\"\n#~ \"Erwägen Sie, die Betonung auf „gemeinsam und unveränderlich“ und \"\n#~ \"„einzigartig und veränderlich“ zu legen. Diese Einschränkungen kommen immer \"\n#~ \"zusammen in Rust aufgrund der Borrow-Checker-Regeln, und `self` ist keine \"\n#~ \"Ausnahme. Es wird nicht möglich sein Verweisen Sie auf eine Struktur von \"\n#~ \"mehreren Stellen und rufen Sie eine Mutationsmethode (`&mut self`) darauf \"\n#~ \"auf.\"\n\n#, fuzzy\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"Alle vier Methoden hier verwenden einen anderen Methodenempfänger.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Sie können darauf hinweisen, wie sich das ändert, was die Funktion mit den \"\n#~ \"Variablenwerten machen kann und ob/wie sie wieder in `main` verwendet werden \"\n#~ \"kann.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` twice.\"\n#~ msgstr \"\"\n#~ \"Sie können den Fehler zeigen, der auftritt, wenn Sie versuchen, zweimal \"\n#~ \"„finish“ aufzurufen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables automatic \"\n#~ \"referencing and dereferencing when calling methods. Rust automatically adds \"\n#~ \"in the `&`, `*`, `muts` so that that object matches the method signature.\"\n#~ msgstr \"\"\n#~ \"Beachten Sie, dass, obwohl die Methodenempfänger unterschiedlich sind, die \"\n#~ \"nicht statischen Funktionen im Hauptteil auf die gleiche Weise aufgerufen \"\n#~ \"werden. Rust ermöglicht die automatische Referenzierung und Dereferenzierung \"\n#~ \"beim Methodenaufruf. Rust fügt automatisch die `&`, `*`, `muts` hinzu, \"\n#~ \"sodass dieses Objekt mit der Methodensignatur übereinstimmt.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Sie könnten darauf hinweisen, dass `print_laps` einen Vektor verwendet, der \"\n#~ \"iteriert wird. Am Nachmittag beschreiben wir Vektoren genauer.\"\n\n#, fuzzy\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Tag 2: Morgengymnastik\"\n\n#, fuzzy\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Wir werden Implementierungsmethoden in zwei Kontexten betrachten:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Wir werden morgen viel mehr über Strukturen und den Typ `Vec<T>` lernen. Zur \"\n#~ \"Zeit, Sie müssen nur einen Teil seiner API kennen:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Verwenden Sie dies, um eine Bibliotheksanwendung zu erstellen. Kopieren Sie \"\n#~ \"den folgenden Code nach <https://play.rust-lang.org/> und aktualisieren Sie \"\n#~ \"die Typen, damit es kompiliert wird:\"\n\n#, fuzzy\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Lösung](solutions-afternoon.md#designing-a-library)\"\n\n#, fuzzy\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"Zu den gängigen Wortschatztypen gehören:\"\n\n#, fuzzy\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` und `Ergebnis`\"\n\n#, fuzzy\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Die Typen stellen optionale Daten dar:\"\n\n#, fuzzy\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"`Option<&T>` hat im Vergleich zu `&T` keinen Speicherplatz-Overhead.\"\n\n#, fuzzy\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` gibt `Result<usize, usesize>` zurück.\"\n\n#, fuzzy\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Falls gefunden, enthält `Result::Ok` den Index, wo das Element gefunden \"\n#~ \"wurde.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should be \"\n#~ \"inserted.\"\n#~ msgstr \"\"\n#~ \"Andernfalls enthält `Result::Err` den Index, wo ein solches Element \"\n#~ \"eingefügt werden soll.\"\n\n#, fuzzy\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Box mit rekursiven Datenstrukturen\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and [`RefCell`]\"\n#~ \"(https://doc.rust-lang.org/std/cell/struct.RefCell.html) implement what Rust \"\n#~ \"calls _interior mutability:_ mutation of values in an immutable context.\"\n#~ msgstr \"Mit `Read` und `BufRead` können Sie über `u8`\\\\-Quellen abstrahieren:\"\n\n#, fuzzy\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Tag 2: Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Die Übungen für diesen Nachmittag konzentrieren sich auf Strings und \"\n#~ \"Iteratoren.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.html) \"\n#~ \"traits.\"\n#~ msgstr \"\"\n#~ \"Das Eigentumsmodell von Rust betrifft viele APIs. Ein Beispiel hierfür ist \"\n#~ \"die [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) und \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.html) \"\n#~ \"Züge.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. The \"\n#~ \"`Iterator` trait simply says that you can call `next` until you get `None` \"\n#~ \"back:\"\n#~ msgstr \"\"\n#~ \"Merkmale sind wie Schnittstellen: Sie beschreiben das Verhalten (Methoden) \"\n#~ \"für einen Typ. Der Das `Iterator`\\\\-Merkmal sagt einfach, dass Sie `next` \"\n#~ \"aufrufen können, bis Sie `None` zurückbekommen:\"\n\n#, fuzzy\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Sie verwenden diese Eigenschaft wie folgt:\"\n\n#, fuzzy\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"Welchen Typ gibt der Iterator zurück? Testen Sie Ihre Antwort hier:\"\n\n#, fuzzy\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Warum wird dieser Typ verwendet?\"\n\n#, fuzzy\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Welchen Typ gibt der Iterator wie zuvor zurück?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Jetzt, da wir sowohl „Iterator“ als auch „IntoIterator“ kennen, können wir \"\n#~ \"„for“-Schleifen bauen. Sie rufen `into_iter()` für einen Ausdruck auf und \"\n#~ \"iterieren über das Ergebnis Iterator:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for [`impl \"\n#~ \"IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl IntoIterator for \"\n#~ \"Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-\"\n#~ \"for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Experimentieren Sie mit dem obigen Code und konsultieren Sie dann die \"\n#~ \"Dokumentation für [`impl IntoIterator für &Vec<T>`](https://doc.rust-lang.\"\n#~ \"org/std/vec/struct.Vec.html#impl-IntoIterator-for-\"\n#~ \"%26%27a%20Vec%3CT%2C%20A%3E) und [`impl IntoIterator for Vec<T>`](https://\"\n#~ \"doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-for-\"\n#~ \"Vec%3CT%2C%20A%3E) um Ihre Antworten zu überprüfen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web server. \"\n#~ \"The server is configured with a number of _path prefixes_ which are matched \"\n#~ \"against _request paths_. The path prefixes can contain a wildcard character \"\n#~ \"which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"In dieser Übung implementieren Sie eine Routing-Komponente eines Webservers. \"\n#~ \"Der Der Server ist mit einer Reihe von _Pfadpräfixen_ konfiguriert, die \"\n#~ \"abgeglichen werden _Anfragepfade_. Die Pfadpräfixe können ein \"\n#~ \"Platzhalterzeichen enthalten, das entspricht einem vollständigen Segment. \"\n#~ \"Siehe die Unit-Tests unten.\"\n\n#, fuzzy\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Sie können einen generischen Typ in Ihrem `impl`\\\\-Block deklarieren:\"\n\n#, fuzzy\n#~ msgid \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Basierend auf den Aufrufseiten wird generischer Code in nicht generischen \"\n#~ \"Code umgewandelt:\"\n\n#, fuzzy\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"verhält sich so, als hättest du geschrieben\"\n\n#, fuzzy\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"Sie können den Compiler eine Reihe von Merkmalen ableiten lassen:\"\n\n#, fuzzy\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"Traits können Verhalten im Sinne anderer Trait-Methoden implementieren:\"\n\n#, fuzzy\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait` kann nicht mit der `::<>` Turbofish-Syntax verwendet werden.\\n\"\n#~ \"\\n\"\n#~ \"`impl Trait` ermöglicht es Ihnen, mit Typen zu arbeiten, die Sie nicht \"\n#~ \"benennen können.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work for \"\n#~ \"this particular function, as the type we expect as input is likely not what \"\n#~ \"`format!` returns. If we wanted to do the same via `: Display` syntax, we'd \"\n#~ \"need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Dieses Beispiel ist großartig, weil es `impl Display` zweimal verwendet. Es \"\n#~ \"hilft, das zu erklären nichts hier erzwingt, dass es _derselbe_ `impl \"\n#~ \"Display`\\\\-Typ ist. Wenn wir eine Single benutzten `T: Display`, es würde \"\n#~ \"die Einschränkung erzwingen, dass der Eingabe-`T`\\\\- und der Rückgabe-`T-Typ \"\n#~ \"derselbe Typ sind. Es würde für diese spezielle Funktion nicht \"\n#~ \"funktionieren, da der Typ, den wir als Eingabe erwarten, wahrscheinlich \"\n#~ \"nicht der Fall ist welches `format!`zurückgibt. Wenn wir dasselbe über die`: \"\n#~ \"Display\\\\`\\\\-Syntax machen wollten, bräuchten wir zwei unabhängige \"\n#~ \"generische Parameter.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"Wir werden uns nun einige der häufigsten Merkmale der Rust-\"\n#~ \"Standardbibliothek ansehen:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.html) \"\n#~ \"used in `for` loops,\"\n#~ msgstr \"`Iterator` und `IntoIterator` werden in `for`\\\\-Schleifen verwendet,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`](https://\"\n#~ \"doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"`Add`, `Mul`, ... wird zum Überladen von Operatoren verwendet, und\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: FromIterator<Self::\"\n#~ \"Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Iterator`\\\\-Implementierungen \\\\`fn collect\\n\"\n#~ \"\\n\"\n#~ \"(selbst) -> B Wo B: FromIterator<Self::Item>, Selbst: Sized'\"\n\n#, fuzzy\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Hinzufügen`, `Mul`, ...\"\n\n#, fuzzy\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Tag 3: Morgengymnastik\"\n\n#, fuzzy\n#~ msgid \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Wir werden Traits und Trait-Objekte einer klassischen GUI-Bibliothek \"\n#~ \"entwerfen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits and \"\n#~ \"trait objects.\"\n#~ msgstr \"\"\n#~ \"Lassen Sie uns eine klassische GUI-Bibliothek mit unserem neuen Wissen über \"\n#~ \"Traits und entwerfen Eigenschaftsobjekte.\"\n\n#, fuzzy\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"Wir werden eine Reihe von Widgets in unserer Bibliothek haben:\"\n\n#, fuzzy\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"„Fenster“: hat einen „Titel“ und enthält andere Widgets.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Button`: hat ein `Label` und eine Callback-Funktion, die aufgerufen wird, \"\n#~ \"wenn die Taste gedrückt wird.\"\n\n#, fuzzy\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`: hat ein `Label`.\"\n\n#, fuzzy\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"Die Widgets implementieren ein „Widget“-Merkmal, siehe unten.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und \"\n#~ \"füllen Sie die fehlenden aus `draw_into`\\\\-Methoden, sodass Sie das \"\n#~ \"`Widget`\\\\-Merkmal implementieren:\"\n\n#, fuzzy\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"Die Ausgabe des obigen Programms kann so einfach sein:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment](https://\"\n#~ \"doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting operators. In \"\n#~ \"particular, notice how you can pad with different characters (here a `'/'`) \"\n#~ \"and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Wenn Sie ausgerichteten Text zeichnen möchten, können Sie die verwenden \"\n#~ \"[fill/alignment](https://doc.rust-lang.org/std/fmt/index.html#fillalignment) \"\n#~ \"Formatierungsoperatoren. Beachten Sie insbesondere, wie Sie mit \"\n#~ \"verschiedenen auffüllen können Zeichen (hier ein `'/'`) und wie Sie die \"\n#~ \"Ausrichtung steuern können:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Mit solchen Ausrichtungstricks können Sie beispielsweise eine Ausgabe wie \"\n#~ \"diese erzeugen:\"\n\n#, fuzzy\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Polygonstruktur\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the code \"\n#~ \"below to <https://play.rust-lang.org/> and fill in the missing methods to \"\n#~ \"make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Wir werden eine \\\"Polygon\\\"-Struktur erstellen, die einige Punkte enthält. \"\n#~ \"Kopieren Sie den Code unten zu <https://play.rust-lang.org/> und füllen Sie \"\n#~ \"die fehlenden Methoden aus, um die Tests bestehen:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the key \"\n#~ \"part of the exercise is to specify those correctly. You don't have to modify \"\n#~ \"the tests.\"\n#~ msgstr \"\"\n#~ \"Da die Methodensignaturen in den Problembeschreibungen fehlen, ist der \"\n#~ \"Schlüsselteil der Übung ist es, diese richtig anzugeben.\"\n\n#, fuzzy\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Weitere interessante Teile der Übung:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Leiten Sie ein `Copy`\\\\-Merkmal für einige Strukturen ab, da die Methoden in \"\n#~ \"Tests ihre Argumente manchmal nicht ausleihen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be addable \"\n#~ \"via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Entdecken Sie, dass die Eigenschaft „Hinzufügen“ implementiert werden muss, \"\n#~ \"damit zwei Objekte über „+“ hinzugefügt werden können.\"\n\n#, fuzzy\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"Die Fehlerbehandlung in Rust erfolgt über einen expliziten Kontrollfluss:\"\n\n#, fuzzy\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"\"\n#~ \"Funktionen, die Fehler haben können, führen dies in ihrem Rückgabetyp auf,\"\n\n#, fuzzy\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Es gibt keine Ausnahmen.\"\n\n#, fuzzy\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Auffangen des Stapels beim Abwickeln\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when errors \"\n#~ \"are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Wir haben bereits die Aufzählung `Result` gesehen. Dies wird häufig \"\n#~ \"verwendet, wenn Fehler vorhanden sind erwartet im Rahmen des Normalbetriebs:\"\n\n#, fuzzy\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Propagieren von Fehlern mit `?`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"Der Try-Operator `?` wird verwendet, um Fehler an den Aufrufer \"\n#~ \"zurückzugeben. Es lässt dich drehen das gemeine\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement them.\"\n#~ msgstr \"\"\n#~ \"Es ist eine gute Praxis für alle Fehlertypen, `std::error::Error` zu \"\n#~ \"implementieren, was `Debug` und erfordert \\\"Anzeigen\\\". Es ist im \"\n#~ \"Allgemeinen hilfreich für sie, `Clone` und `Eq` zu implementieren, wo es \"\n#~ \"möglich ist, zu machen das Leben einfacher für Tests und Benutzer Ihrer \"\n#~ \"Bibliothek. In diesem Fall können wir das nicht so einfach tun, weil `io::\"\n#~ \"Error` implementiert sie nicht.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, and \"\n#~ \"optionally `Display` (if the `#[error(...)]` attributes are provided) and \"\n#~ \"`From` (if the `#[from]` attribute is added). It also works for structs.\"\n#~ msgstr \"\"\n#~ \"Das Ableitungsmakro von `thiserror` implementiert automatisch `std::error::\"\n#~ \"Error` und optional `Display` (wenn die `#[error(...)]`\\\\-Attribute \"\n#~ \"bereitgestellt werden) und `From` (wenn das `#[from]`\\\\-Attribut hinzugefügt \"\n#~ \"wird). Es funktioniert auch für Strukturen.\"\n\n#, fuzzy\n#~ msgid \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"Es wirkt sich nicht auf Ihre öffentliche API aus, was es gut für \"\n#~ \"Bibliotheken macht.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"Die weit verbreitete Kiste [anyhow](https://docs.rs/anyhow/) kann Ihnen beim \"\n#~ \"Hinzufügen helfen Kontextinformationen zu Ihren Fehlern und ermöglicht es \"\n#~ \"Ihnen, weniger zu haben benutzerdefinierte Fehlertypen:\"\n\n#, fuzzy\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Unit-Tests mit `#[test]` markieren:\"\n\n#, fuzzy\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"\"\n#~ \"Verwenden Sie \\\"Cargo Test\\\", um die Komponententests zu finden und \"\n#~ \"auszuführen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Unit-Tests werden oft in ein verschachteltes Modul eingefügt (Tests auf der \"\n#~ \"[Spielplatz](https://play.rust-lang.org/)):\"\n\n#, fuzzy\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Externer Code aufrufen\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. Calling \"\n#~ \"them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Funktionen aus anderen Sprachen könnten die Garantien von Rust verletzen. \"\n#~ \"Berufung sie ist somit unsicher:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::size_of_val;\\n\"\n#~ \"use std::slice;\\n\"\n#~ \"\\n\"\n#~ \"/// ...\\n\"\n#~ \"/// # Safety\\n\"\n#~ \"/// The type must have a defined representation and no padding.\\n\"\n#~ \"pub unsafe trait AsBytes {\\n\"\n#~ \"    fn as_bytes(&self) -> &[u8] {\\n\"\n#~ \"        unsafe {\\n\"\n#~ \"            slice::from_raw_parts(self as *const Self as *const u8, \"\n#~ \"size_of_val(self))\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// Safe because u32 has a defined representation and no padding.\\n\"\n#~ \"unsafe impl AsBytes for u32 {}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"/// ... /// # Sicherheit /// Der Typ muss eine definierte Darstellung haben \"\n#~ \"und darf nicht aufgefüllt werden. pub unsichere Eigenschaft AsBytes { fn \"\n#~ \"as_bytes(&self) -> &\\\\[u8\\\\] { unsicher { Slice::from_raw_parts(self als \"\n#~ \"\\\\*const Self als \\\\*const u8, size_of_val(self)) } } }\"\n\n#, fuzzy\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Tag 3: Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"\"\n#~ \"Lassen Sie uns einen sicheren Wrapper zum Lesen von Verzeichnisinhalten \"\n#~ \"erstellen!\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Nachdem Sie sich die Übung angesehen haben, können Sie sich die \"\n#~ \"bereitgestellte \\\\[Lösung\\\\] ansehen.\"\n\n#, fuzzy\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Auf den folgenden Seiten finden Sie Lösungen zu den Aufgaben.\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Habe keine falsche Scheu, fragen zu den Lösungen [auf GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions) zu stellen. Lass uns wissen wenn \"\n#~ \"Du eine andere oder bessere Lösung als die hier vorgestellte hast.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Tag 1 Morgengymnastik\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([zurück zur Übung](for-loops.md))\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a slice-\"\n#~ \"of-slices (`&[&[i32]]`) as the input type to transpose and thus make our \"\n#~ \"function handle any size of matrix. However, this quickly breaks down: the \"\n#~ \"return type cannot be `&[&[i32]]` since it needs to own the data you return.\"\n#~ msgstr \"\"\n#~ \"Es funktioniert ehrlich gesagt nicht so gut. Es scheint, als könnten wir ein \"\n#~ \"Slice-of-Slices (`&[&[i32]]`) als Eingabetyp für die Transponierung \"\n#~ \"verwenden und unsere Funktion so dazu bringen, jede Matrixgröße zu \"\n#~ \"handhaben. Dies bricht jedoch schnell zusammen: Der Rückgabetyp kann nicht \"\n#~ \"`&[&[i32]]` sein, da er die von Ihnen zurückgegebenen Daten besitzen muss.\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't work \"\n#~ \"out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Du kannst versuchen, so etwas wie `Vec<Vec<i32>>` zu verwenden, aber das \"\n#~ \"funktioniert auch nicht sehr gut: Es ist schwierig, `Vec<Vec<i32>>` in \"\n#~ \"`&[&[i32]] umzuwandeln. ` also kannst Du jetzt auch `pretty_print` nicht \"\n#~ \"einfach verwenden.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are of \"\n#~ \"the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Außerdem würde der Typ selbst nicht erzwingen, dass die untergeordneten \"\n#~ \"Slices dieselbe Länge haben, sodass eine solche Variable eine ungültige \"\n#~ \"Matrix enthalten könnte.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"Tag 1 Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([zurück zur Übung](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Musterabgleich\"\n\n#, fuzzy\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"Tag 2 Morgengymnastik\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Entwerfen einer Bibliothek\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([zurück zur Übung](book-library.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([zurück zur Übung](strings-iterators.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"Tag 3 Morgengymnastik\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([zurück zur Übung](simple-gui.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([zurück zur Übung](points-polygons.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"Tag 3 Nachmittagsübungen\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([zurück zur Übung](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Vergleich\"\n\n#~ msgid \"GitHub contributors\"\n#~ msgstr \"Github Beiträger\"\n\n#~ msgid \"GitHub stars\"\n#~ msgstr \"Github Sterne\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"Der Kurs geht in schnellem Tempo voran und deckt viele Themen ab:\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"\"\n#~ \"Tag 1: Rust Grundlagen, Eigentümerschaft (ownership) und der Ausleihenprüfer \"\n#~ \"(borrow checker).\"\n\n#~ msgid \"Concurrency\"\n#~ msgstr \"Nebenläufigkeit\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (empfohlen)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Du kannst den Anweisungen zur Installation von Cargo und des Rust-Compilers \"\n#~ \"sowie anderer Standard-Ökosystem-Tools mit dem Tool [rustup](https://rust-\"\n#~ \"analyzer.github.io/) folgen, das von der Rust Foundation verwaltet wird.\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"Paketmanager\"\n\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n\n#~ msgid \"\"\n#~ \"This will allow \\\\[rust-analyzer\\\\]\\\\[1\\\\] to jump to the definitions. We \"\n#~ \"suggest using [VS Code](https://code.visualstudio.com/) to edit the code \"\n#~ \"(but any LSP compatible editor works).\"\n#~ msgstr \"\"\n#~ \"Dadurch kann \\\\[rust-analyzer\\\\]\\\\[1\\\\] zu den Definitionen springen. Wir \"\n#~ \"empfehlen die Verwendung von [VS Code](https://code.visualstudio.com/), um \"\n#~ \"Code zu bearbeiten (aber jeder LSP-kompatible Editor funktioniert auch).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://www.\"\n#~ \"jetbrains.com/rust/). Please take note that as of January 2023 debugging \"\n#~ \"only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Einige Leute verwenden auch gerne die [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/)\\\\-Familie von IDEs, die eigene Code-Analysen durchführen, aber auch \"\n#~ \"eigene Einschränkungen haben. Wenn du diese IDEs bevorzugst, kannst du das \"\n#~ \"\\\\[Rust-Plugin\\\\] [5](https://www.jetbrains.com/rust/) installieren. Bitte \"\n#~ \"beachte, dass das Debuggen seit Januar 2023 nur auf der CLion-Version \"\n#~ \"funktioniert, welche Teil der JetBrains IDEA-Suite ist.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercises, you can look at the \\\\[solutions\\\\] provided.\"\n#~ msgstr \"\"\n#~ \"Nachdem Du Dir die Übungen angesehen hast, kannst Du Dir die \"\n#~ \"bereitgestellten \\\\[Lösungen\\\\] ansehen.\"\n\n#~ msgid \"\"\n#~ \"Note that since `println!` is a macro, `x` is not moved, even using the \"\n#~ \"function like syntax of `println!(\\\"x: {}\\\", x)`\"\n#~ msgstr \"\"\n#~ \"Beachte, dass, da `println!` ein Makro ist, `x` nicht verschoben (moved) \"\n#~ \"wird, selbst wenn die funktionsähnliche Syntax von `println!(\\\"x: {}\\\", x)` \"\n#~ \"verwendet wird.\"\n\n#~ msgid \"Global state is managed with static and constant variables.\"\n#~ msgstr \"\"\n#~ \"Der globale Status (global state) wird mit statischen und konstanten \"\n#~ \"Variablen verwaltet.\"\n\n#~ msgid \"You can declare compile-time constants:\"\n#~ msgstr \"Du kannst Kompilierzeitkonstanten deklarieren:\"\n\n#~ msgid \"You can also declare static variables:\"\n#~ msgstr \"Sie können auch statische Variablen deklarieren:\"\n\n#~ msgid \"\"\n#~ \"We will look at mutating static data in the [chapter on Unsafe Rust](../\"\n#~ \"unsafe.md).\"\n#~ msgstr \"\"\n#~ \"Wir werden uns im [Kapitel über unsicheres Rust](../unsafe.md) mit \"\n#~ \"mutierenden statischen Daten befassen.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you choose, \"\n#~ \"can be a single unique pointer, reference counted, or atomically reference \"\n#~ \"counted.\"\n#~ msgstr \"\"\n#~ \"Je nachdem, welche Abstraktion (oder Kombination von Abstraktionen) Sie \"\n#~ \"wählen, kann es sich um einen einzelnen eindeutigen Zeiger, eine \"\n#~ \"Referenzzählung oder eine atomare Referenzzählung handeln.\"\n\n#, fuzzy\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"Hier ist ein grober Vergleich der Speicherverwaltungstechniken.\"\n\n#, fuzzy\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Vorteile verschiedener Speicherverwaltungstechniken\"\n\n#, fuzzy\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Handbuch wie C:\"\n\n#, fuzzy\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Kein Laufzeitaufwand.\"\n\n#, fuzzy\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Automatisch wie Java:\"\n\n#, fuzzy\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"Komplett automatisch.\"\n\n#, fuzzy\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Sicher und korrekt.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Bereichsbasiert wie C++:\"\n\n#, fuzzy\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Teilautomatisch.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Vom Compiler erzwungener Geltungsbereich wie Rust:\"\n\n#, fuzzy\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Vom Compiler erzwungen.\"\n\n#, fuzzy\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Nachteile verschiedener Techniken zur Speicherverwaltung\"\n\n#, fuzzy\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Use-after-free.\"\n\n#, fuzzy\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Double-frees.\"\n\n#, fuzzy\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"Speicherlecks.\"\n\n#, fuzzy\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"Garbage Collection pausiert.\"\n\n#, fuzzy\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Destruktorverzögerungen.\"\n\n#, fuzzy\n#~ msgid \"Complex, opt-in by programmer.\"\n#~ msgstr \"Komplex, Opt-in durch Programmierer.\"\n\n#, fuzzy\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"Potenzial für die Nutzung nach dem Kostenlos.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Compiler-erzwungen und bereichsbasiert wie Rust:\"\n\n#, fuzzy\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Etwas Komplexität im Voraus.\"\n\n#, fuzzy\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Kann gültige Programme ablehnen.\"\n\n#, fuzzy\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"\"\n#~ \"Die Daten wurden von `s1` _verschoben_ und `s1` ist nicht mehr zugänglich.\"\n\n#, fuzzy\n#~ msgid \"A small book library,\"\n#~ msgstr \"Iteratoren und Besitz (schwer).\"\n\n#, fuzzy\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"Mehrere Strukturen und Aufzählungen für eine Zeichnungsbibliothek.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you need to mutate the data inside an `Rc`, you will need to wrap the \"\n#~ \"data in a type such as [`Cell` or `RefCell`](../concurrency/shared_state/arc.\"\n#~ \"md).\"\n#~ msgstr \"\"\n#~ \"Wenn Sie die Daten innerhalb eines „Rc“ mutieren müssen, müssen Sie die \"\n#~ \"Daten einschließen ein Typ wie [`Cell` oder `RefCell`](../concurrency/\"\n#~ \"shared_state/arc.md). Siehe [`Arc`](https://doc.rust-lang.org/std/sync/\"\n#~ \"struct.Mutex.html), wenn Sie sich in einem Multithreading befinden Kontext.\"\n\n#, fuzzy\n#~ msgid \"The module content can be omitted:\"\n#~ msgstr \"Der Modulinhalt kann weggelassen werden:\"\n\n#, fuzzy\n#~ msgid \"The `garden` module content is found at:\"\n#~ msgstr \"Die Inhalte des Moduls „Garten“ finden Sie unter:\"\n\n#, fuzzy\n#~ msgid \"`src/garden.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden.rs` (moderner Rust 2018-Stil)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/mod.rs` (älterer Rust 2015-Stil)\"\n\n#, fuzzy\n#~ msgid \"Similarly, a `garden::vegetables` module can be found at:\"\n#~ msgstr \"\"\n#~ \"In ähnlicher Weise kann ein `garden::vegetables`\\\\-Modul gefunden werden \"\n#~ \"unter:\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden/vegetables.rs` (moderner Rust 2018-Stil)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/vegetables/mod.rs` (älterer Rust 2015 Stil)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the following code to <https://play.rust-lang.org/> and implement the \"\n#~ \"function:\"\n#~ msgstr \"\"\n#~ \"Kopieren Sie den folgenden Code nach <https://play.rust-lang.org/> und \"\n#~ \"implementieren Sie die Funktion:\"\n\n#, fuzzy\n#~ msgid \"`move` closures only implement `FnOnce`.\"\n#~ msgstr \"`move`\\\\-Closures implementieren nur `FnOnce`.\"\n\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to re-\"\n#~ \"use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Hinweis:** Bitte ignoriere `// ANCHOR: label` und `// ANCHOR_END: label` \"\n#~ \"Kommentare, die Du in den Lösungen siehst. Sie sind da, um es zu ermöglichen \"\n#~ \"Teile der Lösungen als Aufgaben wiederverwenden.\"\n"
  },
  {
    "path": "po/el.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-01-24T13:24:49+01:00\\n\"\n\"PO-Revision-Date: 2023-08-25 13:24-0700\\n\"\n\"Last-Translator: root <andrikopoulos@google.com>\\n\"\n\"Language-Team: Greek <team@lists.gnome.gr>\\n\"\n\"Language: el\\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\"X-Generator: Poedit 3.3.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Καλώς ήρθατε στην Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Διεξαγωγή του μαθήματος\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Δομή Μαθήματος\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Συντομεύσεις πληκτρολογίου\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Μεταφράσεις\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Χρήση Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust Οικοσύστημα\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Δείγματα κώδικα\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Εκτέλεση Cargo τοπικά\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"1η μέρα: Πρωί\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"Καλως Ήρθατε\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Τι είναι η Rust;\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Μεταβλητές\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/strings.md\nmsgid \"Strings\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Συμπερασμός Τύπων\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/slices-and-lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md\n#: src/error-handling/solution.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Λύσεις\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Ροή ελέγχου\"\n\n#: src/SUMMARY.md src/control-flow-basics/conditionals.md\nmsgid \"Conditionals\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"Βρόχοι «για».\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"`break` and `continue`\"\nmsgstr \"«διάλειμμα» και «συνέχεια».\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Συναρτήσεις\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"1η μέρα: Απόγευμα\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"Array Iteration\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/match.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Αντιστοίχιση προτύπων\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"Αποδόμηση Απαριθμήσεων\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Αναφορές\"\n\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Αναφορές\"\n\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Κρεμασμένες αναφορές\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Δομές\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Δομές Τούπλας\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Απαριθμήσεις\"\n\n#: src/SUMMARY.md src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static and Const\"\nmsgstr \"static & const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"2η μέρα: Πρωί\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"Ροή ελέγχου\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Read και Write\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Μέθοδοι\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Χαρακτηριστικά\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"Εξάγωντας χαρακτηριστικά\"\n\n#: src/SUMMARY.md src/methods-and-traits/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Αντικείμενα Χαρακτηριστικών\"\n\n#: src/SUMMARY.md src/methods-and-traits/exercise.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Γενικευσεις\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Εξωτερικές Συναρτήσεις\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Γενικοί τύποι δεδομένων\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Περιορισμοί χαρακτηριστικών\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\n#, fuzzy\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"2η μέρα: Απόγευμα\"\n\n#: src/SUMMARY.md src/std-types.md\n#, fuzzy\nmsgid \"Standard Library Types\"\nmsgstr \"Στάνταρ Βιβλιοθήκη\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Στάνταρ Βιβλιοθήκη\"\n\n#: src/SUMMARY.md src/std-types/docs.md\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"Τεστ τεκμηρίωσης\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"Συμβολοσειρές\"\n\n#: src/SUMMARY.md src/std-types/vec.md\n#, fuzzy\nmsgid \"`Vec`\"\nmsgstr \"«Vec».\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"Ασκήσεις\"\n\n#: src/SUMMARY.md src/std-traits.md\n#, fuzzy\nmsgid \"Standard Library Traits\"\nmsgstr \"Στάνταρ Βιβλιοθήκη\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\n#, fuzzy\nmsgid \"Comparisons\"\nmsgstr \"Σύγκριση\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"Επαναληπτικοί\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"`From` and `Into`\"\nmsgstr \"«Από» και «Μέσα».\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\n#, fuzzy\nmsgid \"Casting\"\nmsgstr \"Τεστ\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"`Read` and `Write`\"\nmsgstr \"«Διαβάστε» και «Γράψτε».\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Κλεισίματα\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: ROT13\"\nmsgstr \"Ασκήσεις\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"3η μέρα: Πρωί\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Διαχείριση μνήμης\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Αυτόματη διαχείριση μνήμης\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Ιδιοκτησία\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Σημασιολογία μετακίνησης\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Σύνθετοι τύποι\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Drop`\"\nmsgstr \"Drop\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"«Κουτί».\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc`\"\nmsgstr \"«Rc».\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"3η μέρα: Απόγευμα\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Δανεισμός\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"Δανεισμός\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"Δανεισμός\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"Interior Mutability\"\nmsgstr \"Διαλειτουργικότητα\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Στατιστικά Υγείας\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes.md\n#, fuzzy\nmsgid \"Slices and Lifetimes\"\nmsgstr \"Διάρκειες\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Φέτες\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"String References\"\nmsgstr \"Κρεμασμένες αναφορές\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Διάρκειες σε κλήσεις συναρτήσεων\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Διάρκειες\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"Διάρκειες\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"4η μέρα: Πρωί\"\n\n#: src/SUMMARY.md src/iterators.md\n#, fuzzy\nmsgid \"Iterators\"\nmsgstr \"Επαναληπτικοί\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Iterator`\"\nmsgstr \"«Iterator».\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIterator`\"\nmsgstr \"«IntoIterator».\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`FromIterator`\"\nmsgstr \"FromIterator\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Δομικές Μονάδες\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Ιεραρχία συστήματος αρχείων\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Ορατότητα\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Τεστ\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Δομικές μονάδες τεστ\"\n\n#: src/SUMMARY.md src/testing/other.md\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"Επιπλέον Υλικό\"\n\n#: src/SUMMARY.md src/testing/useful-crates.md\nmsgid \"Useful Crates\"\nmsgstr \"Χρήσιμα Crates\"\n\n#: src/SUMMARY.md src/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Αλγόριθμος Luhn\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Afternoon\"\nmsgstr \"1η μέρα: Απόγευμα\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Πανικοί\"\n\n#: src/SUMMARY.md src/error-handling/try.md\n#, fuzzy\nmsgid \"Try Operator\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Έμμεσες μετατροπές\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"Το χαρακτηριστικό «Drop».\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"«Από» και «Μέσα».\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Χειρισμός δομημένου σφάλματος με «Αποτέλεσμα».\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Μη ασφαλής Rust\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe\"\nmsgstr \"Μη ασφαλής Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Αποαναφορά δεικτών\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Μεταβλητές στατικές μεταβλητές\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Σωματεία\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Κλήση μη ασφαλών συναρτήσεων\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Υλοποίηση μη ασφαλών χαρακτηριστικών\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Ασφαλές περιτύλιγμα FFI\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Προετοιμασία\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Κανόνες Κατασκευής\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Εκτελέσιμα\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Βιβλιοθήκες\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Διεπαφές\"\n\n#: src/SUMMARY.md\nmsgid \"Implementation\"\nmsgstr \"Υλοποίηση\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Εξυπηρετητής\"\n\n#: src/SUMMARY.md src/android/aidl/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Deploy\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Πελάτης\"\n\n#: src/SUMMARY.md src/android/aidl/changing.md\nmsgid \"Changing API\"\nmsgstr \"Αλλαγή API\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Καταγραφή\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Διαλειτουργικότητα\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Με C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Καλώντας C με Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Καλώντας Rust από C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Με C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"The Bridge Module\"\nmsgstr \"Δομικές μονάδες τεστ\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Rust Bridge\"\nmsgstr \"Rust Binaries\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Βαθμωτοί Τύποι\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"Rust Error Handling\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"C++ Error Handling\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Δημιουργία Android components με Rust.\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Building for Android: Rust\"\nmsgstr \"Δημιουργία Android components με Rust.\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Με Java\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"Ασκήσεις\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"Μη ασφαλής Rust\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Exercise\"\nmsgstr \"Ασκήσεις\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Interoperability with C++\"\nmsgstr \"Διαλειτουργικότητα με C\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Παραδείγματα\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"CXX Error Handling\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"Λύσεις\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Rust χωρίς λειτουργικό σύστημα: Πρωί;\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Μικρό Παράδειγμα\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Μικροεπεξεργαστές\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Crates υποστήριξης πλακετών\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Το μοτίβο Τύπου Κατάστασης\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Αποσφαλμάτωση\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Επιπλέον Projects\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Πυξίδα\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"Λύσεις\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Rust χωρίς λειτουργικό σύστημα: Απόγευμα\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Ας γράψουμε έναν οδηγό UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Επιπλέον Χαρακτηριστικά\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Ένας καλύτερος οδηγός UART\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Πολλαπλοί καταχωρητές\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Οδηγός\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Using It\"\nmsgstr \"Χρήση\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"Exceptions\"\nmsgstr \"Συναρτήσεις\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"`spin`\"\nmsgstr \"«στατικό».\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Οδηγός RTC\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Concurrency: Morning\"\nmsgstr \"Συγχρονισμός\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Νήματα\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"Νήματα με εμβέλεια\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Κανάλια\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Κανάλια χωρίς Όρια\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Κανάλια με Όρια\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"`Send` and `Sync`\"\nmsgstr \"«Αποστολή» και «Συγχρονισμός».\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"`Send`\"\nmsgstr \"«Αποστολή».\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`Sync`\"\nmsgstr \"`Συγχρονισμός`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Παραδείγματα\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"Κοινόχρηστα Δεδομένα\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`Arc`\"\nmsgstr \"«Τόξο».\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"`Mutex`\"\nmsgstr \"«Mutex».\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"Παράδειγμα\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Δείπνο με φιλόσοφους\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Έλεγχος συνδέσμων πολλαπλών νημάτων\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Συγχρονισμός\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/runtimes.md\n#, fuzzy\nmsgid \"Runtimes\"\nmsgstr \"Εγγυήσεις χρόνου εκτέλεσης\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Tasks\"\nmsgstr \"Καθήκοντα\"\n\n#: src/SUMMARY.md src/async/channels.md\n#, fuzzy\nmsgid \"Async Channels\"\nmsgstr \"Κανάλια\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"Ροή ελέγχου\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\n#, fuzzy\nmsgid \"Async Traits\"\nmsgstr \"Χαρακτηριστικά\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"Cancellation\"\nmsgstr \"Εγκατάσταση\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Κλείσιμο\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Ευχαριστήρια\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Επιπλέον Υλικό\"\n\n#: src/SUMMARY.md src/credits.md\n#, fuzzy\nmsgid \"Credits\"\nmsgstr \"Πιστώσεις\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Αυτό είναι ένα τετραήμερο μάθημα Rust που αναπτύχθηκε από την ομάδα Android. \"\n\"Το μάθημα καλύπτει το πλήρες φάσμα της Rust, από τη βασική σύνταξη έως τα \"\n\"προηγμένα θέματα όπως οι γενικευμένοι τύποι και διαχείριση σφαλμάτων. \"\n\"Περιλαμβάνει επίσης περιεχόμενο ειδικά για Android την τελευταία ημέρα.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Ο στόχος του μαθήματος είναι να σας διδάξει τη γλώσσα Rust. Υποθέτουμε ότι \"\n\"δεν ξέρετε τίποτα σχετικά με τη Rust και ελπίζουμε να:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\"Σας δώσουμε μια ολοκληρωμένη κατανόηση της σύνταξης και της γλώσσας Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Σας καταστήσουμε ικανούς να τροποποιείτε υπάρχοντα προγράμματα και να \"\n\"γράφετε νέα προγράμματα με τη Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Σας δείξουμε τους συνήθεις ιδιωματισμούς της Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Μη-Στόχοι\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Η Rust είναι μια μεγάλη γλώσσα και δεν θα μπορούμε να την καλύψουμε όλη σε \"\n\"λίγες μέρες. Μερικοί μη-στόχοι αυτού του μαθήματος είναι:\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Ανάπτυξη μακροεντολών, ανατρέξτε στο [Κεφάλαιο 19.5 στο Rust Book](https://\"\n\"doc.rust-lang.org/book/ch19-06-macros.html) και [Rust by Example](https://\"\n\"doc.rust-lang.org/rust-by-example/macros.html) αντ' αυτού.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Υποθέσεις\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Το μάθημα προϋποθέτει ότι γνωρίζετε ήδη πώς να προγραμματίζετε. Η Rust είναι \"\n\"γλώσσα με στατικό σύτημα τύπων και μερικές φορές θα κάνουμε συγκρίσεις με C \"\n\"και C++ για καλύτερη κατανόηση της προσέγγισης της Rust.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Εάν γνωρίζετε πώς να προγραμματίζετε σε μια γλώσσα με δυναμικό σύστημα τύπων \"\n\"όπως Python ή JavaScript, τότε θα μπορέσετε να ακολουθήσετε άνεση.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Αυτό είναι ένα παράδειγμα _σημειώσεων ομιλητή_. Θα τις χρησιμοποιήσουμε για \"\n\"να προσθέτουμε επιπλέον πληροφορίες στις διαφάνειες. Αυτές θα μπορούσαν να \"\n\"είναι βασικά σημεία που θα πρέπει να καλύψει ο εκπαιδευτής  καθώς και \"\n\"απαντήσεις σε συχνές ερωτήσεις που προκύπτουν στην τάξη.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Αυτή η σελίδα είναι για τον εκπαιδευτή του μαθήματος.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Ακολουθούν ορισμένες βασικές πληροφορίες σχετικά με τον τρόπο λειτουργίας \"\n\"του μαθήματος εσωτερικά στην Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Για να διεξάξετε το μάθημα, πρέπει:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Εξοικειωθείτε με το υλικό του μαθήματος. Έχουμε συμπεριλάβει σημειώσεις \"\n\"ομιλητών για να τονίσουμε τα βασικά σημεία (παρακαλούμε βοηθήστε μας \"\n\"συνεισφέροντας περισσότερες σημειώσεις ομιλητή!). Κατά την παρουσίαση, θα \"\n\"πρέπει να βεβαιωθείτε ότι ανοίγετε τις σημειώσεις του ομιλητή σε ένα \"\n\"αναδυόμενο παράθυρο (κάντε κλικ στο σύνδεσμο με ένα μικρό βέλος δίπλα στο \"\n\"\\\"Speaker Notes\\\"). Με αυτόν τον τρόπο έχετε μια καθαρή οθόνη για να \"\n\"παρουσιάσετε στην τάξη.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Αποφασίστε για τις ημερομηνίες. Επειδή το μάθημα είναι μεγάλο, σας \"\n\"συνιστούμε να προγραμματίσετε τις τέσσερις ημέρες σε δύο εβδομάδες. Οι \"\n\"προηγούμενοι συμμετέχοντες στο μάθημα θεωρούν χρήσιμο να υπάρχει ένα κενό \"\n\"στο μάθημα, καθώς τους βοηθά να επεξεργάζονται όλες τις πληροφορίες που τους \"\n\"δίνουμε.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Βρείτε ένα δωμάτιο αρκετά μεγάλο για όλους τους συμμετέχοντες. Προτείνουμε \"\n\"μέγεθος τάξης 15-20 ατόμων. Είναι αρκετά μικρό ώστε οι άνθρωποι να \"\n\"αισθάνονται άνετα να κάνουν ερωτήσεις - είναι επίσης αρκετά μικρό ώστε ένας \"\n\"εκπαιδευτής να έχει χρόνο να απαντήσει. Βεβαιωθείτε ότι το δωμάτιο έχει \"\n\"θρανία για εσάς και τους μαθητές: όλοι θα πρέπει να μπορείτε να καθίσετε και \"\n\"να εργάζεστε με τους φορητούς υπολογιστές σας. Συγκεκριμένα, θα γράψετε πολύ \"\n\"κώδικα ζωντανά ως εκπαιδευτής, επομένως ένα αναλόγιο δεν θα σας βοηθήσει \"\n\"πολύ.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Την ημέρα του μαθήματος, εμφανιστείτε στην αίθουσα νωρίς για να ρυθμίσετε τα \"\n\"πράγματα. Συνιστούμε την απευθείας παρουσίαση χρησιμοποιώντας την υπηρεσία \"\n\"mdbook που εκτελείται στον φορητό υπολογιστή σας (δείτε τις οδηγίες \"\n\"εγκατάστασης). Αυτό εξασφαλίζει βέλτιστη απόδοση χωρίς καθυστέρηση καθώς \"\n\"αλλάζετε σελίδες. Η χρήση του φορητού υπολογιστή σας θα σας επιτρέψει επίσης \"\n\"να διορθώσετε τυπογραφικά λάθη καθώς τα εντοπίζετε εσείς ή οι συμμετέχοντες \"\n\"στο μάθημα.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Αφήστε τους μαθητές να λύσουν τις ασκήσεις μόνοι τους ή σε μικρές ομάδες. \"\n\"Βεβαιωθείτε ότι τους ρωτάτε εάν έχουν κολλήσει ή εάν υπάρχει κάτι με το \"\n\"οποίο μπορείτε να βοηθήσετε. Όταν δείτε ότι πολλά άτομα έχουν το ίδιο \"\n\"πρόβλημα, αναφέρετέ το στην τάξη και προσφέρετε μια λύση, π.χ., δείχνοντας \"\n\"στους μαθητές πού να βρουν τις σχετικές πληροφορίες στην τυπική βιβλιοθήκη.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Αυτό ήταν! Καλή επιτυχία στη διεξαγωγή του μαθήματος! Ελπίζουμε ότι θα είναι \"\n\"τόσο διασκεδαστικό για εσάς όπως ήταν και για εμάς!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Παρακαλούμε [παρέχετε σχόλια](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) μετά το μάθημα, ώστε να συνεχίσουμε να βελτιώνουμε το υλικό. \"\n\"Θα θέλαμε να ακούσουμε τι πήγε καλά για εσάς και τι μπορεί να γίνει \"\n\"καλύτερα. Οι μαθητές σας είναι επίσης πολύ ευπρόσδεκτοι να [μας στείλουν \"\n\"σχόλια](https://github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust Binaries\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"Δομή Μαθήματος\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (3 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 55 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Δείτε το [pattern matching](../pattern-matching.md) για περισσότερες \"\n\"λεπτομέρειες σχετικά με τα μοτίβα στο Σκουριά.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Afternoon (3 hours, including breaks)\"\nmsgstr \"2η μέρα Απογευματινές Ασκήσεις\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 15 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Afternoon (2 hours, including breaks)\"\nmsgstr \"4η μέρα: Απόγευμα (Android)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Android\"\nmsgstr \"Rust Binaries\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Εάν δεν επιλέξετε τo κομμάτι του Android την 4η Ημέρα, θα χρειαστείτε ένα \"\n\"\\\\[AOSP checkout\\\\]\\\\[1\\\\]. Δημιουργήστε ένα checkout από το \\\\[αποθετήριο \"\n\"του μαθήματος\\\\]\\\\[2\\\\] στον ίδιο υπολογιστή και μετακινήστε τον κατάλογο \"\n\"`src/android/` στη ρίζα του AOSP checkout σας. Αυτό θα διασφαλίσει ότι το \"\n\"build system του Android βλέπει τα Αρχεία `Android.bp` κάτω από τον φάκελο \"\n\"`src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Βεβαιωθείτε ότι το \\\"adb sync\\\" λειτουργεί με τον εξομοιωτή ή την συσκευή \"\n\"σας και χτίστε όλα τα παραδείγματα του Android χρησιμοποιώντας το `src/\"\n\"android/build_all.sh`. Διαβάστε το script για να δείτε τις εντολές που \"\n\"εκτελεί και βεβαιωθείτε ότι λειτουργούν όταν τις εκτελείτε με το χέρι.\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust Binaries\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust χωρίς λειτουργικό σύστημα: Πρωί\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Concurrency in Rust\"\nmsgstr \"Συγχρονισμός\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Μορφή\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Το μάθημα σχεδιάστηκε να είναι διαδραστικό και συνιστούμε να αφήσετε τις \"\n\"ερωτήσεις να οδηγήσουν την κουβέντα γύρω από τη Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Υπάρχουν πολλές χρήσιμες συντομεύσεις πληκτρολογίου στο mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Βέλος-Αριστερά\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Μεταβείτε στην προηγούμενη σελίδα.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Βέλος-Δεξιά\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Μεταβείτε στην επόμενη σελίδα.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Εκτελέστε το δείγμα κώδικα υπό εστίαση.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Ενεργοποιήστε τη γραμμή αναζήτησης.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Το μάθημα έχουμε μεταφραστεί σε άλλες γλώσσες από ένα σύνολο εκπληκτικών \"\n\"εθελοντών:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Χρησιμοποιήστε την επιλογή γλώσσας στην πάνω-δεξιά γωνία για να αλλάξετε \"\n\"γλώσσα.\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"Incomplete Translations\"\nmsgstr \"Μεταφράσεις\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Εάν θέλετε να βοηθήσετε στη μεταγλώττιση δείτε τις οδηγίες μας για το πώςνα \"\n\"ξεκινήσετε. Οι μεταφράσεις οργανώνονται στον [issue tracker](https://github.\"\n\"com/google/comprehensive-rust/issues/282).\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Όταν αρχίσετε να διαβάζετε για το Rust, σύντομα θα συναντήσετε το [Cargo]\"\n\"(https://doc.rust-lang.org/cargo/), το τυπικό εργαλείο χρησιμοποιείται στο \"\n\"οικοσύστημα Rust για τη δημιουργία και εκτέλεση εφαρμογών Rust. Εδώ θέλουμε \"\n\"δώστε μια σύντομη επισκόπηση του τι είναι το Cargo και πώς ταιριάζει στο \"\n\"ευρύτερο οικοσύστημα και πώς ταιριάζει σε αυτή την εκπαίδευση.\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"Installation\"\nmsgstr \"Εγκατάσταση\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Μαζί με το cargo και το rustc, το Rustup θα εγκατασταθεί ως βοηθητικό \"\n\"πρόγραμμα γραμμής εντολών που μπορείτε να χρησιμοποιήσετε για να \"\n\"εγκαταστήσετε/εναλλάξετε αλυσίδες εργαλείων, να ρυθμίσετε τη διασταυρούμενη \"\n\"μεταγλώττιση κ.λπ.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Στο Debian/Ubuntu, μπορείτε να εγκαταστήσετε το Cargo και την πηγή Rust με\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Το οικοσύστημα της σκουριάς\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Το οικοσύστημα Rust αποτελείται από μια σειρά από εργαλεία, από τα οποία τα \"\n\"κυριότερα είναι:\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"«rustup»: το πρόγραμμα εγκατάστασης και ενημέρωσης της αλυσίδας εργαλείων \"\n\"Rust. Αυτό το εργαλείο χρησιμοποιείται για να εγκαταστήστε και ενημερώστε τα \"\n\"«rustc» και «cargo» όταν κυκλοφορήσουν νέες εκδόσεις του Rust. Επιπλέον, το \"\n\"\\\"rustup\\\" μπορεί επίσης να κατεβάσει τεκμηρίωση για το πρότυπο βιβλιοθήκη. \"\n\"Μπορείτε να εγκαταστήσετε πολλές εκδόσεις του Rust ταυτόχρονα και το \"\n\"\\\"rustup\\\". θα σας επιτρέψει να κάνετε εναλλαγή μεταξύ τους ανάλογα με τις \"\n\"ανάγκες.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md src/hello-world/hello-world.md\n#: src/tuples-and-arrays/tuples-and-arrays.md src/references/exclusive.md\n#: src/pattern-matching/destructuring.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md src/concurrency/threads.md\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"Key points:\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"Code Samples in This Training\"\nmsgstr \"Δείγματα κώδικα σε αυτήν την εκπαίδευση\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Για αυτήν την εκπαίδευση, θα εξερευνήσουμε κυρίως τη γλώσσα Rust μέσω \"\n\"παραδειγμάτων που μπορεί να εκτελεστεί μέσω του προγράμματος περιήγησής σας. \"\n\"Αυτό κάνει τη ρύθμιση πολύ πιο εύκολη και εξασφαλίζει μια συνεπή εμπειρία \"\n\"για όλους.\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Η εγκατάσταση Cargo εξακολουθεί να ενθαρρύνεται: θα σας διευκολύνει να το \"\n\"κάνετε γυμνάσια. Την τελευταία μέρα, θα κάνουμε μια μεγαλύτερη άσκηση που \"\n\"σας δείχνει πώς να το κάνετε εργαστείτε με εξαρτήσεις και για αυτό \"\n\"χρειάζεστε Cargo.\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Τα μπλοκ κώδικα σε αυτό το μάθημα είναι πλήρως διαδραστικά:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"You can use \"\nmsgstr \"Μπορείτε να χρησιμοποιήσετε το \"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \"\"\n\" για να εκτελέσετε τον κώδικα όταν η εστίαση βρίσκεται στο πλαίσιο κειμένου.\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Τα περισσότερα δείγματα κώδικα είναι επεξεργάσιμα όπως φαίνεται παραπάνω. \"\n\"Μερικά δείγματα κώδικα δεν είναι επεξεργάσιμα για διάφορους λόγους:\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Οι ενσωματωμένες παιδικές χαρές χάνουν την κατάστασή τους τη στιγμή που \"\n\"πλοηγείστε μακριά από τη σελίδα! Αυτός είναι ο λόγος που πρέπει οι μαθητές \"\n\"λύστε τις ασκήσεις χρησιμοποιώντας τοπική εγκατάσταση Rust ή μέσω του \"\n\"Παιδική χαρά.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Κωδικός λειτουργίας τοπικά με φορτίο\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Εάν θέλετε να πειραματιστείτε με τον κώδικα στο δικό σας σύστημα, τότε θα \"\n\"χρειαστείτε για να εγκαταστήσετε πρώτα το Rust. Κάντε αυτό ακολουθώντας τις \"\n\"[οδηγίες στο Rust Βιβλίο](https://doc.rust-lang.org/book/ch01-01-\"\n\"installation.html). Αυτό θα σας δώσει ένα λειτουργικό «rustc» και «cargo». \"\n\"Την εποχή του γράφοντας, η τελευταία σταθερή έκδοση Rust έχει αυτούς τους \"\n\"αριθμούς έκδοσης:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Εφόσον υπάρχει αυτό, ακολουθήστε αυτά τα βήματα για να δημιουργήσετε ένα \"\n\"δυαδικό αρχείο Rust από ένα από τα παραδείγματα αυτής της εκπαίδευσης:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Προσπαθήστε να ενθαρρύνετε τους συμμετέχοντες στην τάξη να εγκαταστήσουν το \"\n\"Cargo και χρησιμοποιήστε το α τοπικός συντάκτης. Θα τους κάνει τη ζωή πιο \"\n\"εύκολη αφού θα έχουν α κανονικό περιβάλλον ανάπτυξης.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Welcome to Day 1\"\nmsgstr \"Καλώς ήρθατε στην Ημέρα 1\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Αυτή είναι η πρώτη μέρα του Comprehensive Rust. Θα καλύψουμε πολύ έδαφος \"\n\"σήμερα:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Συμπερασμός Τύπων\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 3 hours\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Please remind the students that:\"\nmsgstr \"Υπενθυμίστε στους μαθητές ότι:\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Θα πρέπει να κάνουν ερωτήσεις όταν τις πάρουν, μην τις αποθηκεύσετε μέχρι το \"\n\"τέλος.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"Η τάξη προορίζεται να είναι διαδραστική και οι συζητήσεις ενθαρρύνονται πολύ!\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Ως εκπαιδευτής, θα πρέπει να προσπαθήσετε να διατηρήσετε τις συζητήσεις \"\n\"σχετικές, π.χ. κρατήστε τη σχετική με το πώς κάνει τα πράγματα ο Rust σε \"\n\"σχέση με κάποια άλλη γλώσσα. Μπορεί να είναι δύσκολο να βρεις τη σωστή \"\n\"ισορροπία, αλλά σφάλλησε να επιτρέψεις συζητήσεις αφού εμπλέκουν τους \"\n\"ανθρώπους πολύ περισσότερο από τη μονόδρομη επικοινωνία.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Οι ερωτήσεις πιθανότατα θα σημαίνουν ότι είμαστε για τα πράγματα πριν από \"\n\"τις διαφάνειες.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Αυτό είναι απολύτως εντάξει! Η επανάληψη είναι ένα σημαντικό μέρος της \"\n\"κλίσης. Θυμάμαι ότι οι διαφάνειες είναι απλώς μια υποστήριξη και είστε \"\n\"ελεύθεροι να τις παραλείψετε όπως εσείς αρέσει.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/slices-and-lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Η Rust είναι μια νέα γλώσσα προγραμματισμού που κυκλοφόρησε το 1.0 το 2015:\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Η Rust είναι μια στατικά μεταγλωττισμένη γλώσσα με παρόμοιο ρόλο με τη C++\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"Το \\\"rustc\\\" χρησιμοποιεί το LLVM ως backend του.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Το Rust υποστηρίζει πολλές [πλατφόρμες και αρχιτεκτονικές](https://doc.rust-\"\n\"lang.org/nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Το Rust χρησιμοποιείται για ένα ευρύ φάσμα συσκευών:\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"firmware and boot loaders,\"\nmsgstr \"υλικολογισμικό και φορτωτές εκκίνησης,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"smart displays,\"\nmsgstr \"έξυπνες οθόνες,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"mobile phones,\"\nmsgstr \"κινητά τηλέφωνα,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"desktops,\"\nmsgstr \"επιτραπέζιοι υπολογιστές,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"servers.\"\nmsgstr \"διακομιστές.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Η σκουριά ταιριάζει στην ίδια περιοχή με το C++:\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"High flexibility.\"\nmsgstr \"Υψηλή ευελιξία.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"High level of control.\"\nmsgstr \"Υψηλό επίπεδο ελέγχου.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"Μπορεί να μειωθεί σε πολύ περιορισμένες συσκευές όπως κινητά τηλέφωνα.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Δεν έχει χρόνο εκτέλεσης ή συλλογή σκουπιδιών.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Εστιάζει στην αξιοπιστία και την ασφάλεια χωρίς να θυσιάζει την απόδοση.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Ας μεταβούμε στο απλούστερο δυνατό πρόγραμμα Rust, ένα κλασικό Hello World \"\n\"πρόγραμμα:\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"What you see:\"\nmsgstr \"Τι βλέπεις:\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Οι συναρτήσεις εισάγονται με το «fn».\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Τα μπλοκ οριοθετούνται με σγουρά τιράντες όπως στο C και το C++.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Η λειτουργία «κύρια» είναι το σημείο εισόδου του προγράμματος.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"\"\n\"Το Rust έχει υγιεινές μακροεντολές, το «println!» είναι ένα παράδειγμα αυτού.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Οι συμβολοσειρές Rust έχουν κωδικοποίηση UTF-8 και μπορούν να περιέχουν \"\n\"οποιονδήποτε χαρακτήρα Unicode.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Αυτή η διαφάνεια προσπαθεί να κάνει τους μαθητές άνετα με τον κώδικα Rust. \"\n\"Θα δουν ένας τόνος από αυτό τις επόμενες τέσσερις ημέρες, οπότε ξεκινάμε \"\n\"μικρά με κάτι οικείο.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Μερικά μοναδικά σημεία πώλησης του Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No uninitialized variables.\"\nmsgstr \"Δεν υπάρχουν μη αρχικοποιημένες μεταβλητές.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No double-frees.\"\nmsgstr \"Χωρίς διπλό δωρεάν.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No use-after-free.\"\nmsgstr \"Καμία χρήση-μετά-δωρεάν.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Δεν υπάρχουν δείκτες «NULL».\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Όχι ξεχασμένα κλειδωμένα mutexes.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No data races between threads.\"\nmsgstr \"Δεν υπάρχουν αγώνες δεδομένων μεταξύ των νημάτων.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No iterator invalidation.\"\nmsgstr \"Χωρίς ακύρωση επαναληπτικού.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Η πρόσβαση σε πίνακα έχει επιλεγεί τα όρια.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Ορίζεται υπερχείλιση ακέραιου αριθμού.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Αριθμοί και αντιστοίχιση μοτίβων.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Generics.\"\nmsgstr \"Γενόσημα.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No overhead FFI.\"\nmsgstr \"Όχι γενικά FFI.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Αφαιρέσεις μηδενικού κόστους.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Great compiler errors.\"\nmsgstr \"Μεγάλα λάθη μεταγλωττιστή.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Ενσωματωμένος διαχειριστής εξαρτήσεων.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Built-in support for testing.\"\nmsgstr \"Ενσωματωμένη υποστήριξη για δοκιμές.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Εξαιρετική υποστήριξη πρωτοκόλλου διακομιστή γλώσσας.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Φροντίστε να ρωτήσετε την τάξη με ποιες γλώσσες έχουν εμπειρία. Σε συνάρτηση \"\n\"στην απάντηση μπορείτε να επισημάνετε διαφορετικά χαρακτηριστικά του Rust:\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Εμπειρία με Java, Go, Python, JavaScript...: Έχετε την ίδια ασφάλεια μνήμης \"\n\"όπως σε αυτές τις γλώσσες, συν ένα παρόμοιο γλωσσικό συναίσθημα υψηλού \"\n\"επιπέδου. Επιπλέον έχετε γρήγορη και προβλέψιμη απόδοση όπως C και C++ \"\n\"(χωρίς σκουπιδοσυλλέκτη) καθώς και πρόσβαση σε υλικό χαμηλού επιπέδου (σε \"\n\"περίπτωση που το χρειάζεστε)\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md src/testing.md src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Το Rust παρέχει ασφάλεια τύπου μέσω στατικής πληκτρολόγησης. Οι δεσμεύσεις \"\n\"μεταβλητών είναι αμετάβλητες κατά Προκαθορισμένο:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops.md\n#: src/control-flow-basics/break-continue.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Types\"\nmsgstr \"\"\n\"\\\\| | Τύποι | Κυριολεκτικά | \"\n\"\\\\|------------------------------------------------- \"\n\"-------------------------------------------------- --| \\\\| Υπογεγραμμένοι \"\n\"ακέραιοι αριθμοί | `i8`, `i16`, `i32`, `i64`, `i128`, `isize` | `-10`, `0`, \"\n\"`1_000`, `123i64` | \\\\| Ανυπόγραφοι ακέραιοι αριθμοί | «u8», «u16», «u32», \"\n\"«u64», «u128», «χρήση» | `0`, `123`, `10u16` | \\\\| Αριθμοί κινητής \"\n\"υποδιαστολής | `f32`, `f64` | `3,14`, `-10,0e20`, `2f32` | \\\\| Χορδές | \"\n\"`&str` | `\\\"foo\\\"`, `r#\\\"\\\\\\\\\\\"#` | \\\\| Βαθμωτές τιμές Unicode | `χαρ` | \"\n\"`'a', `'α'`, `'∞'`| | Συμβολοσειρές byte |`&\\\\[u8\\\\]`|`b\\\"abc\\\"`, `br#\\\" \\\" \"\n\"\\\"#\\\" | \\\\| Booleans | «μπουλ» | \\\"αληθές\\\", \\\"ψευδές\\\" |\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Literals\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`char`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"The types have widths as follows:\"\nmsgstr \"Οι τύποι έχουν πλάτη ως εξής:\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"Τα \\\"iN\\\", \\\"uN\\\" και \\\"fN\\\" έχουν πλάτος _N_ bit,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"Το \\\"isize\\\" και το \\\"usize\\\" είναι το πλάτος ενός δείκτη,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"Το \\\"char\\\" έχει πλάτος 32 bit,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"Το «bool» έχει πλάτος 8 bit.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\n#, fuzzy\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"\\\"String\\\" ένα μεταβλητό buffer συμβολοσειρών.\"\n\n#: src/types-and-values/strings.md\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\", \\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Το Rust θα εξετάσει πώς χρησιμοποιείται η μεταβλητή για να προσδιορίσει τον \"\n\"τύπο:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Αυτή η διαφάνεια δείχνει πώς ο μεταγλωττιστής Rust συμπεραίνει τύπους με \"\n\"βάση περιορισμούς που δίνονται από δηλώσεις και χρήσεις μεταβλητών.\\n\"\n\"\\n\"\n\"Είναι πολύ σημαντικό να τονίσουμε ότι οι μεταβλητές που δηλώνονται όπως αυτή \"\n\"δεν είναι κάποιου είδους δυναμικού \\\"οποιουδήποτε τύπου\\\" που μπορεί \"\n\"κρατήστε τυχόν δεδομένα. Ο κωδικός μηχανής που δημιουργείται από μια τέτοια \"\n\"δήλωση είναι πανομοιότυπος με τη ρητή δήλωση ενός τύπου. Ο μεταγλωττιστής \"\n\"κάνει τη δουλειά για εμάς και μας βοηθά να γράψουμε έναν πιο συνοπτικό \"\n\"κώδικα.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"Υλοποίηση\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md src/tuples-and-arrays.md src/borrowing.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\nmsgstr \"Μεγάλο μέρος της σύνταξης Rust θα σας είναι οικείο από τη C ή τη C++:\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"Blocks are delimited by curly braces.\"\nmsgstr \"Τα μπλοκ και τα πεδία οριοθετούνται με σγουρά τιράντες.\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"\"\n\"Line comments are started with `//`, block comments are delimited by `/* ... \"\n\"*/`.\"\nmsgstr \"\"\n\"Τα σχόλια γραμμής ξεκινούν με `//`, τα σχόλια αποκλεισμού οριοθετούνται από \"\n\"`/* ... */`.\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"Keywords like `if` and `while` work the same.\"\nmsgstr \"Λέξεις-κλειδιά όπως «αν» και «ενώ» λειτουργούν το ίδιο.\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\nmsgstr \"Η ανάθεση μεταβλητής γίνεται με `=`, η σύγκριση γίνεται με `==`.\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"`if` expressions\"\nmsgstr \"εκφράσεις \\\"αν\\\".\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Επιπλέον, μπορείτε να το χρησιμοποιήσετε ως έκφραση. Αυτό κάνει το ίδιο όπως \"\n\"παραπάνω:\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"εκφράσεις «ενώ».\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"Όπως και με το \\\"if\\\", υπάρχει μια παραλλαγή \\\"while let\\\" που ελέγχει \"\n\"επανειλημμένα μια τιμή σε σχέση με ένα μοτίβο:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`for`\"\nmsgstr \"Βρόχοι «για».\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values:\"\nmsgstr \"«Drop» που χρησιμοποιείται για τον ορισμό των καταστροφέων.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`loop`\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"«Drop» που χρησιμοποιείται για τον ορισμό των καταστροφέων.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"We will discuss iteration later; for now, just stick to range expressions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\\\"{result}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Εάν θέλετε να βγείτε νωρίς από έναν βρόχο, χρησιμοποιήστε το «διάλειμμα», \"\n\"εάν θέλετε να ξεκινήσετε αμέσως την επόμενη επανάληψη χρησιμοποιήστε \"\n\"«continue». Τόσο το \\\"continue\\\" και το \\\"break\\\" μπορούν προαιρετικά πάρτε \"\n\"ένα όρισμα ετικέτας που χρησιμοποιείται για να ξεφύγει από ένθετους βρόχους:\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\\\"x: {x}, i: {i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"In this case we break the outer loop after 3 iterations of the inner loop.\"\nmsgstr \"\"\n\"Σε αυτή την περίπτωση σπάμε τον εξωτερικό βρόχο μετά από 3 επαναλήψεις του \"\n\"εσωτερικού βρόχου.\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Μπλοκ\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Ένα μπλοκ στο Rust έχει μια τιμή και έναν τύπο: η τιμή είναι η τελευταία \"\n\"έκφραση του ΟΙΚΟΔΟΜΙΚΟ ΤΕΤΡΑΓΩΝΟ:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Εμβέλια και σκίαση\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Μπορείτε να σκιάζετε μεταβλητές, τόσο αυτές από εξωτερικά πεδία όσο και \"\n\"μεταβλητές από το ίδιο εύρος:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md src/std-traits/from-and-into.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Ο σκοπός αυτής της διαφάνειας είναι να δείξει ότι τα μπλοκ έχουν τύπο και \"\n\"τιμή στο Rust.\\n\"\n\"\\n\"\n\"Μπορείτε να δείξετε πώς αλλάζει η τιμή του μπλοκ αλλάζοντας την τελευταία \"\n\"γραμμή στο μπλοκ. Για παράδειγμα, προσθέτοντας/αφαιρώντας ένα ερωτηματικό ή \"\n\"χρησιμοποιώντας ένα «return».\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Ορισμός: Η σκίαση είναι διαφορετική από τη μετάλλαξη, γιατί μετά τη σκίαση \"\n\"υπάρχουν και οι δύο θέσεις μνήμης της μεταβλητής ταυτόχρονα. Και τα δύο \"\n\"είναι διαθέσιμα με το ίδιο όνομα, ανάλογα με το πού το χρησιμοποιείτε στον \"\n\"κωδικό.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Μια μεταβλητή σκίασης μπορεί να έχει διαφορετικό τύπο.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Η σκίαση φαίνεται ασαφής στην αρχή, αλλά είναι βολική για να κρατάτε τις \"\n\"τιμές μετά το «.unwrap()».\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Κάθε συνάρτηση έχει μια ενιαία υλοποίηση:\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"Λαμβάνει πάντα ένα ενιαίο σύνολο τύπων παραμέτρων.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"Η υπερφόρτωση χειριστή υλοποιείται μέσω χαρακτηριστικών στο `std::ops`:\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Καλως Ήρθατε\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n\"elements of an array have the same type, while tuples can accommodate \"\n\"different types. Both types have a size fixed at compile time.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Arrays\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[T; N]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[20, 30, 40]`, `[0; 3]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Tuples\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Array assignment and access:\"\nmsgstr \"Εκχώρηση πίνακα και πρόσβαση:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Tuple assignment and access:\"\nmsgstr \"Διπλή ανάθεση και πρόσβαση:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Arrays:\"\nmsgstr \"Πίνακες:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Tuples:\"\nmsgstr \"Πλειάδες:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"\"\n\"Η άδεια πλειάδα `()` είναι επίσης γνωστή ως \\\"τύπος μονάδας\\\". Είναι και \"\n\"τύπος, και η μόνη έγκυρη τιμή αυτού του τύπου - δηλαδή και ο τύπος και η \"\n\"τιμή του εκφράζονται ως «()». Χρησιμοποιείται για να υποδείξει, για \"\n\"παράδειγμα, ότι μια συνάρτηση ή Η έκφραση δεν έχει τιμή επιστροφής, όπως θα \"\n\"δούμε σε μια μελλοντική διαφάνεια.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\"Μπορείτε να το σκεφτείτε ως «κενό» που μπορεί να σας είναι οικείο από άλλους \"\n\"γλώσσες προγραμματισμού.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n\"and the only valid value of that type --- that is to say both the type and \"\n\"its value are expressed as `()`. It is used to indicate, for example, that a \"\n\"function or expression has no return value, as we'll see in a future slide.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"You can think of it as `void` that can be familiar to you from other \"\n\"programming languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"Η λέξη-κλειδί \\\"αντιστοιχία\\\" σάς επιτρέπει να αντιστοιχίσετε μια τιμή με \"\n\"ένα ή περισσότερα _patterns_. ο Οι συγκρίσεις γίνονται από πάνω προς τα κάτω \"\n\"και ο πρώτος αγώνας κερδίζει.\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"Τα μοτίβα μπορεί να είναι απλές τιμές, παρόμοια με το «switch» σε C και C++:\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be irrefutable, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Όπως το \\\"αν ας\\\", κάθε βραχίονας αγώνα πρέπει να έχει τον ίδιο τύπο. Ο \"\n\"τύπος είναι ο τελευταίος έκφραση του μπλοκ, εάν υπάρχει. Στο παραπάνω \"\n\"παράδειγμα, ο τύπος είναι `()`.\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/user-defined-types/named-structs.md\n#: src/user-defined-types/enums.md src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Key Points:\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\\\\<λεπτομέρειες>\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`|` as an `or`\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\"Θα μπορούσατε να επισημάνετε πώς χρησιμοποιούνται ορισμένοι συγκεκριμένοι \"\n\"χαρακτήρες όταν βρίσκονται σε ένα δίπλωμα ευρεσιτεχνίας\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"«|» ως «ή».\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`_` is a wild card\"\nmsgstr \"Το «..» μπορεί να επεκταθεί όσο χρειάζεται\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Οι προστατευτικοί αγώνες ως ξεχωριστό συντακτικό χαρακτηριστικό είναι \"\n\"σημαντικοί και απαραίτητοι.\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Μπορείτε να χρησιμοποιήσετε τις μεταβλητές που ορίζονται στο μοτίβο στην \"\n\"έκφραση if σας.\\n\"\n\"\\n\"\n\"Η συνθήκη που ορίζεται στο προστατευτικό ισχύει για κάθε έκφραση σε μοτίβο \"\n\"με ένα `|`.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Destructuring is a way of extracting data from a data structure by writing a \"\n\"pattern that is matched up to the data structure, binding variables to \"\n\"subcomponents of the data structure.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"You can destructure tuples and arrays by matching on their elements:\"\nmsgstr \"\"\n\"Μπορείτε να καταστρέψετε πίνακες, πλειάδες και φέτες ταιριάζοντας στα \"\n\"στοιχεία τους:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left of Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"below X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"first quadrant\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"Tell me about {triple:?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 1 and the rest were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"All elements were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Create a new array pattern using `_` to represent an element.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Add more values to the array.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Point out that how `..` will expand to account for different number of \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"Ποιος είναι ο τύπος της λέξης σε κάθε βρόχο;\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Χρησιμοποιήστε τα παραπάνω για να γράψετε μια συνάρτηση «pretty_print» που \"\n\"εκτυπώνει όμορφα έναν πίνακα και μια συνάρτηση \\\"transpose\\\" που θα \"\n\"μεταφέρει έναν πίνακα (μετατρέπει τις γραμμές σε στήλες):\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"\"\n\"Σκληρός κώδικας και των δύο συναρτήσεων για λειτουργία σε πίνακες 3 × 3.\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n\"εφαρμόστε το λειτουργίες:\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/references.md src/user-defined-types.md src/pattern-matching.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Η σκουριά θα απαγορεύσει στατικά τις κρέμονται αναφορές:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.count_ones()`). There is no need for an `->` operator like \"\n\"in C++.\"\nmsgstr \"\"\n\"Το Rust θα επαναφέρει αυτόματα σε ορισμένες περιπτώσεις, ιδιαίτερα κατά την \"\n\"επίκληση μεθόδους (δοκιμάστε το `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"Θα μιλήσουμε περισσότερο για δανεισμό όταν φτάσουμε στην ιδιοκτησία.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Φροντίστε να σημειώσετε τη διαφορά μεταξύ του \\\"let mut ref_x: &i32\\\" και \"\n\"του \\\"let ref_x: &mut i32\\\\`. Η πρώτη αντιπροσωπεύει μια μεταβλητή αναφορά \"\n\"στην οποία μπορεί να συνδεθεί διαφορετικές τιμές, ενώ η δεύτερη \"\n\"αντιπροσωπεύει μια αναφορά σε μια μεταβλητή τιμή.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Όπως η C και η C++, η Rust υποστηρίζει προσαρμοσμένες δομές:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Εάν έχετε ήδη μεταβλητές με τα σωστά ονόματα, τότε μπορείτε να δημιουργήσετε \"\n\"τις δόμηση χρησιμοποιώντας συντομογραφία:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Εάν τα ονόματα των πεδίων δεν είναι σημαντικά, μπορείτε να χρησιμοποιήσετε \"\n\"μια δομή πλειάδας:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Αυτό χρησιμοποιείται συχνά για περιτυλίγματα ενός πεδίου (που ονομάζονται \"\n\"νέοι τύποι):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Οι νέοι τύποι είναι ένας πολύ καλός τρόπος για να κωδικοποιήσετε πρόσθετες \"\n\"πληροφορίες σχετικά με την τιμή σε έναν πρωτόγονο τύπο, για παράδειγμα:\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Ο αριθμός μετριέται σε ορισμένες μονάδες: «Newtons» στο παραπάνω παράδειγμα.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Η τιμή πέρασε κάποια επικύρωση όταν δημιουργήθηκε, επομένως δεν χρειάζεται \"\n\"πλέον να την επικυρώνετε ξανά σε κάθε χρήση: «PhoneNumber(String)» ή \"\n\"«OddNumber(u32)».\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Η λέξη-κλειδί «enum» επιτρέπει τη δημιουργία ενός τύπου που έχει λίγους \"\n\"διαφορετικές παραλλαγές:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Οι απαριθμήσεις σάς επιτρέπουν να συλλέγετε ένα σύνολο τιμών κάτω από έναν \"\n\"τύπο\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\"Αυτή μπορεί να είναι μια καλή στιγμή για να συγκρίνετε Structs και Enums:\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"Και στα δύο, μπορείτε να έχετε μια απλή έκδοση χωρίς πεδία (μονάδα δομής) ή \"\n\"μια με διαφορετικούς τύπους πεδίων (ωφέλιμα φορτία παραλλαγής).\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Θα μπορούσατε ακόμη και να εφαρμόσετε τις διαφορετικές παραλλαγές ενός enum \"\n\"με ξεχωριστές δομές, αλλά τότε δεν θα ήταν του ίδιου τύπου όπως θα ήταν αν \"\n\"είχαν οριστεί όλες σε ένα enum.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"`const`\"\nmsgstr \"«const».\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Σύμφωνα με το [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html), αυτά ενσωματώνονται κατά τη χρήση.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"`static`\"\nmsgstr \"«στατικό».\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Καλώς ήρθατε στην Ημέρα 1\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Όπως σημειώνεται στο [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-\"\n\"const-vs-static.html), αυτά δεν είναι ενσωματωμένα κατά τη χρήση και έχουν \"\n\"μια πραγματική συσχετισμένη θέση μνήμης. Αυτό είναι χρήσιμο για μη ασφαλή \"\n\"και ενσωματωμένο κώδικα και η μεταβλητή ζει σε όλη την εκτέλεση του \"\n\"προγράμματος.\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"\"\n\"Αναφέρετε ότι το «const» συμπεριφέρεται σημασιολογικά παρόμοια με το \"\n\"«constexpr» της C++.\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"\"\n\"Το «static», από την άλλη πλευρά, μοιάζει πολύ περισσότερο με μια «const» ή \"\n\"μεταβλητή καθολική μεταβλητή στη C++.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Δεν είναι πολύ συνηθισμένο να χρειάζεται κάποιος μια σταθερά αξιολόγησης \"\n\"χρόνου εκτέλεσης, αλλά είναι χρήσιμο και ασφαλέστερο από τη χρήση στατικού.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Properties table:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static\"\nmsgstr \"«στατικό».\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Constant\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Has an address in memory\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"No (inlined)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"Η λειτουργία «κύρια» είναι το σημείο εισόδου του προγράμματος.\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Can be mutable\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (unsafe)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Evaluated at compile time\"\nmsgstr \"Οι τιμές έχουν σταθερά μεγέθη γνωστά κατά το χρόνο μεταγλώττισης.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Inlined wherever it is used\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Welcome to Day 2\"\nmsgstr \"Καλώς ήρθατε στην Ημέρα 2\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"Τώρα που είδαμε αρκετή ποσότητα Rust, θα συνεχίσουμε με:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Δείτε το [pattern matching](../pattern-matching.md) για περισσότερες \"\n\"λεπτομέρειες σχετικά με τα μοτίβα στο Σκουριά.\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"Δομές\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Τα μοτίβα μπορούν επίσης να χρησιμοποιηθούν για τη σύνδεση μεταβλητών σε \"\n\"μέρη των τιμών σας. Ετσι επιθεωρείτε τη δομή των τύπων σας. Ας ξεκινήσουμε \"\n\"με έναν απλό τύπο «enum»:\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Εδώ χρησιμοποιήσαμε τους βραχίονες για να _καταστρέψουμε_ την τιμή \"\n\"\\\"Αποτέλεσμα\\\". Κατά την πρώτη βραχίονα, το \\\"μισό\\\" είναι δεσμευμένο στην \"\n\"τιμή μέσα στην παραλλαγή \\\"Ok\\\". Στο δεύτερο χέρι, Το \\\"msg\\\" συνδέεται με \"\n\"το μήνυμα σφάλματος.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Η έκφραση `if`/`else` επιστρέφει έναν αριθμό που αργότερα αποσυσκευάζεται με \"\n\"ένα \\\"match\\\".\\n\"\n\"\\n\"\n\"Μπορείτε να δοκιμάσετε να προσθέσετε μια τρίτη παραλλαγή στον ορισμό enum \"\n\"και να εμφανίσετε τα σφάλματα κατά την εκτέλεση του κώδικα. Επισημάνετε τα \"\n\"σημεία όπου ο κώδικας σας είναι πλέον ανεξάντλητος και πώς ο μεταγλωττιστής \"\n\"προσπαθεί να σας δώσει συμβουλές.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Στο παραπάνω παράδειγμα, η πρόσβαση στο \\\"char\\\" στο \\\"KeyPress\\\" ή στο \"\n\"\\\"x\\\" και \\\"y\\\" στο \\\"Click\\\" λειτουργεί μόνο μέσα σε μια δήλωση \"\n\"\\\"ταιριάζουν\\\".\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`if let` expressions\"\nmsgstr \"εκφράσεις \\\"αν ας\\\".\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"εκφράσεις «ενώ ας».\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`match` expressions\"\nmsgstr \"«ταιριάζουν» εκφράσεις\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"εκφράσεις «ενώ ας».\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/googletest.md\n#: src/testing/solution.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Όπως και με το \\\"if\\\", υπάρχει μια παραλλαγή \\\"while let\\\" που ελέγχει \"\n\"επανειλημμένα μια τιμή σε σχέση με ένα μοτίβο:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Εδώ ο επαναλήπτης που επιστρέφεται από το `v.iter()` θα επιστρέψει ένα \"\n\"`Option<i32>` σε κάθε κλήση στο `επόμενο()`. Επιστρέφει \\\"Some(x)\\\" μέχρι να \"\n\"ολοκληρωθεί, μετά από αυτό θα γίνει επιστροφή «Κανένα». Το \\\"while let\\\" μας \"\n\"επιτρέπει να συνεχίσουμε να επαναλαμβάνουμε όλα τα στοιχεία.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"Σε αντίθεση με το \\\"match\\\", το \\\"if let\\\" δεν υποστηρίζει προστατευτικές \"\n\"ρήτρες για την αντιστοίχιση μοτίβων.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"Μια κοινή χρήση είναι ο χειρισμός των τιμών \\\"Μερικών\\\" όταν εργάζεστε με το \"\n\"\\\"Option\\\".\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"Σε αντίθεση με το \\\"match\\\", το \\\"if let\\\" δεν υποστηρίζει προστατευτικές \"\n\"ρήτρες για την αντιστοίχιση μοτίβων.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"εκφράσεις «ενώ ας».\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Επισημάνετε ότι ο βρόχος \\\"while let\\\" θα συνεχίσει να λειτουργεί όσο η τιμή \"\n\"ταιριάζει με το μοτίβο.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Θα μπορούσατε να ξαναγράψετε τον βρόχο «while let» ως άπειρο βρόχο με μια \"\n\"πρόταση if που διακόπτεται όταν δεν υπάρχει τιμή για ξετύλιγμα για το «iter.\"\n\"next()». Το \\\"while let\\\" παρέχει συντακτική ζάχαρη για το παραπάνω σενάριο.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Το Rust σάς επιτρέπει να συσχετίζετε λειτουργίες με τους νέους τύπους σας. \"\n\"Το κάνετε αυτό με ένα μπλοκ \\\"impl\\\":\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Το \\\"&self\\\" παραπάνω υποδεικνύει ότι η μέθοδος δανείζεται το αντικείμενο \"\n\"αμετάβλητα. Εκεί είναι άλλοι πιθανοί δέκτες για μια μέθοδο:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"«&self»: δανείζεται το αντικείμενο από τον καλούντα χρησιμοποιώντας ένα \"\n\"κοινόχρηστο και αμετάβλητο αναφορά. Το αντικείμενο μπορεί να χρησιμοποιηθεί \"\n\"ξανά μετά.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"\\\"&mut self\\\": δανείζεται το αντικείμενο από τον καλούντα χρησιμοποιώντας \"\n\"ένα μοναδικό και ευμετάβλητο αναφορά. Το αντικείμενο μπορεί να \"\n\"χρησιμοποιηθεί ξανά μετά.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"«self»: αναλαμβάνει την κυριότητα του αντικειμένου και το απομακρύνει από \"\n\"τον καλούντα. ο μέθοδος γίνεται ο ιδιοκτήτης του αντικειμένου. Το \"\n\"αντικείμενο θα απορριφθεί (κατανεμηθεί) όταν η μέθοδος επιστρέφει, εκτός εάν \"\n\"η ιδιοκτησία της είναι ρητά μεταδόθηκε.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Χωρίς δέκτη: αυτό γίνεται μια στατική μέθοδος στη δομή. Συνήθως \"\n\"χρησιμοποιείται σε δημιουργήστε κατασκευαστές που ονομάζονται «νέοι» κατά \"\n\"σύμβαση.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Βασικά σημεία:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Μπορεί να είναι χρήσιμη η εισαγωγή μεθόδων συγκρίνοντάς τες με συναρτήσεις.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Οι μέθοδοι καλούνται σε μια παρουσία ενός τύπου (όπως μια δομή ή ένα enum), \"\n\"η πρώτη παράμετρος αντιπροσωπεύει την παρουσία ως \\\"self\\\".\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"Οι προγραμματιστές μπορούν να επιλέξουν να χρησιμοποιήσουν μεθόδους για να \"\n\"επωφεληθούν από τη σύνταξη του δέκτη μεθόδων και να τους βοηθήσουν να \"\n\"διατηρηθούν πιο οργανωμένοι. Χρησιμοποιώντας μεθόδους μπορούμε να \"\n\"διατηρήσουμε όλο τον κώδικα υλοποίησης σε ένα προβλέψιμο μέρος.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"Επισημάνετε τη χρήση της λέξης-κλειδιού «self», ενός δέκτη μεθόδου.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Δείξτε ότι είναι ένας συντομευμένος όρος για το \\\"self:&Self\\\" και ίσως \"\n\"δείξετε πώς θα μπορούσε επίσης να χρησιμοποιηθεί το όνομα της δομής.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Εξηγήστε ότι το Self είναι ένα ψευδώνυμο τύπου για τον τύπο στον οποίο \"\n\"βρίσκεται το μπλοκ «impl» και μπορεί να χρησιμοποιηθεί αλλού στο μπλοκ.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Σημειώστε πώς χρησιμοποιείται ο εαυτός όπως και άλλες δομές και ο \"\n\"συμβολισμός κουκκίδων μπορεί να χρησιμοποιηθεί για αναφορά σε μεμονωμένα \"\n\"πεδία.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Πέρα από παραλλαγές στον «εαυτό», υπάρχουν επίσης [ειδικοί τύποι \"\n\"περιτυλίγματος](https://doc.rust-lang.org/reference/special-types-and-traits.\"\n\"html) επιτρέπεται να είναι τύποι δεκτών, όπως \\\"Box\\n\"\n\"\\n\"\n\"\\\".\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Το Rust σάς επιτρέπει να αφηρείτε τους τύπους με χαρακτηριστικά. Είναι \"\n\"παρόμοια με τις διεπαφές:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"Traits are implemented in an `impl <trait> for <type> { .. }` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Traits may specify pre-implemented (provided) methods and methods that users \"\n\"are required to implement themselves. Provided methods can rely on required \"\n\"methods. In this case, `greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\"Μπορείτε να το σκεφτείτε ως «κενό» που μπορεί να σας είναι οικείο από άλλους \"\n\"γλώσσες προγραμματισμού.\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Διάταξη μνήμης μετά την εκχώρηση «xs»:\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Τα χαρακτηριστικά μπορεί να προσδιορίζουν προ-εφαρμοσμένες (προεπιλεγμένες) \"\n\"μεθόδους και μεθόδους που απαιτείται από τους χρήστες να εφαρμόσουν οι \"\n\"ίδιοι. Οι μέθοδοι με προεπιλεγμένες υλοποιήσεις μπορούν να βασίζονται στις \"\n\"απαιτούμενες μεθόδους.\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"Οι τύποι που εφαρμόζουν ένα δεδομένο χαρακτηριστικό μπορεί να είναι \"\n\"διαφορετικών μεγεθών. Αυτό καθιστά αδύνατο να υπάρχουν πράγματα όπως το \\\"Vec\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\\\" στο παραπάνω παράδειγμα.\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\"Το \\\"dyn Greet\\\" είναι ένας τρόπος να πείτε στον μεταγλωττιστή έναν τύπο \"\n\"δυναμικού μεγέθους που υλοποιεί το \\\"Greet\\\".\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/closures.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md src/smart-pointers.md src/iterators.md src/error-handling.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Γενικά υποστήριξη σκουριάς, που σας επιτρέπει να αφαιρέσετε έναν αλγόριθμο \"\n\"(όπως ταξινόμηση) πάνω από τους τύπους που χρησιμοποιούνται στον αλγόριθμο.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Αυτή είναι μια αφαίρεση μηδενικού κόστους: παίρνετε ακριβώς το ίδιο \"\n\"αποτέλεσμα όπως αν είχατε κωδικοποίησαν τις δομές δεδομένων χωρίς την \"\n\"αφαίρεση.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\"Μπορείτε να χρησιμοποιήσετε γενικά για να αφαιρέσετε τον συγκεκριμένο τύπο \"\n\"πεδίου:\"\n\n#: src/generics/generic-data.md\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_Ε:_ Γιατί το `T` καθορίζεται δύο φορές στο `impl<T> Point<T> {}`; Δεν είναι \"\n\"περιττό;\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Αυτό συμβαίνει επειδή είναι μια γενική ενότητα υλοποίησης για γενικό τύπο. \"\n\"Είναι ανεξάρτητα γενικά.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Σημαίνει ότι αυτές οι μέθοδοι ορίζονται για οποιοδήποτε «T».\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Είναι δυνατό να γράψετε `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"Το \\\"Point\\\" εξακολουθεί να είναι γενικό και μπορείτε να χρησιμοποιήσετε το \"\n\"\\\"Point\\n\"\n\"\\n\"\n\"\\\", αλλά οι μέθοδοι σε αυτό το μπλοκ θα είναι διαθέσιμες μόνο για το \"\n\"\\\"Point\\n\"\n\"\\n\"\n\"\\\".\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Όταν εργάζεστε με γενόσημα, συχνά θέλετε να περιορίσετε τους τύπους. \"\n\"Μπορείτε να το κάνετε αυτό με \\\"T: Trait\\\" ή \\\"immpl Trait\\\":\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Καταργεί την υπογραφή της συνάρτησης εάν έχετε πολλές παραμέτρους.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Διαθέτει πρόσθετα χαρακτηριστικά που το κάνουν πιο ισχυρό.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Εάν κάποιος ρωτήσει, το επιπλέον χαρακτηριστικό είναι ότι ο τύπος στα \"\n\"αριστερά του \\\":\\\" μπορεί να είναι αυθαίρετος, όπως \\\"Επιλογή\\n\"\n\"\\n\"\n\"\\\".\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Παρόμοια με τα όρια χαρακτηριστικών, μια σύνταξη «impl Trait» μπορεί να \"\n\"χρησιμοποιηθεί στη συνάρτηση ορίσματα και τιμές επιστροφής:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"Η έννοια του «impl Trait» είναι λίγο διαφορετική στις διαφορετικές θέσεις.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Για μια παράμετρο, το \\\"impl Trait\\\" είναι σαν μια ανώνυμη γενική παράμετρος \"\n\"με δεσμευμένο χαρακτηριστικό.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Για έναν τύπο επιστροφής, σημαίνει ότι ο τύπος επιστροφής είναι κάποιος \"\n\"συγκεκριμένος τύπος που υλοποιεί το χαρακτηριστικό, χωρίς να ονομάσουμε τον \"\n\"τύπο. Αυτό μπορεί να είναι χρήσιμο όταν δεν θέλετε να εκθέσετε τον τύπο \"\n\"σκυροδέματος στο α δημόσιο API.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md src/memory-management.md src/slices-and-lifetimes.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Το Rust συνοδεύεται από μια τυπική βιβλιοθήκη που βοηθά στη δημιουργία ενός \"\n\"συνόλου κοινών τύπων χρησιμοποιείται από τη βιβλιοθήκη και τα προγράμματα \"\n\"της Rust. Με αυτόν τον τρόπο, δύο βιβλιοθήκες μπορούν να συνεργαστούν ομαλά \"\n\"γιατί και οι δύο χρησιμοποιούν τον ίδιο τύπο «String».\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\\\\<λεπτομέρειες>\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"Στην πραγματικότητα, το Rust περιέχει πολλά επίπεδα της τυπικής βιβλιοθήκης: \"\n\"«core», «alloc» και «std».\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"Ο «πυρήνας» περιλαμβάνει τους πιο βασικούς τύπους και λειτουργίες που δεν \"\n\"εξαρτώνται από το «libc», τον εκχωρητή ή ακόμη και η παρουσία ενός \"\n\"λειτουργικού συστήματος.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Το \\\"alloc\\\" περιλαμβάνει τύπους που απαιτούν καθολικό εκχωρητή σωρού, όπως \"\n\"\\\"Vec\\\", \\\"Box\\\" και \\\"Arc\\\".\\n\"\n\"\\n\"\n\"Οι εφαρμογές Embedded Rust χρησιμοποιούν συχνά μόνο «core» και μερικές φορές \"\n\"«alloc».\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Δείτε το [Rust Reference](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"«Read» και «Write» που χρησιμοποιούνται για IO,\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Συναρτήσεις\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"Η επιλογή «Επιλογή» και «Αποτέλεσμα» χρησιμοποιούνται ευρέως όχι μόνο στην \"\n\"τυπική βιβλιοθήκη.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Όπως και με την \\\"Επιλογή\\\", η επιτυχημένη τιμή βρίσκεται μέσα στο \"\n\"\\\"Αποτέλεσμα\\\", αναγκάζοντας τον προγραμματιστή να το κάνει το εξάγετε ρητά. \"\n\"Αυτό ενθαρρύνει τον έλεγχο σφαλμάτων. Στην περίπτωση που δεν πρέπει να \"\n\"συμβεί ποτέ λάθος, Το \\\"unwrap()\\\" ή το \\\"expect()\\\" μπορεί να κληθεί, και \"\n\"αυτό είναι επίσης ένα σήμα της πρόθεσης του προγραμματιστή.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"Η τεκμηρίωση «Αποτελέσματος» συνιστάται για ανάγνωση. Όχι κατά τη διάρκεια \"\n\"του μαθήματος, αλλά αξίζει να αναφερθεί. Περιέχει πολλές πρακτικές μεθόδους \"\n\"και λειτουργίες που βοηθούν τον προγραμματισμό λειτουργικού στυλ.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"\"\n\"Το \\\"Αποτέλεσμα\\\" είναι ο τυπικός τύπος για την υλοποίηση του χειρισμού \"\n\"σφαλμάτων, όπως θα δούμε την Ημέρα 3.\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"Συμβολοσειρές\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"Το [`String`](https://doc.rust-lang.org/std/string/struct.String.html) είναι \"\n\"το τυπικό buffer συμβολοσειρών UTF-8 που εκχωρείται σε σωρό:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"Το `String` υλοποιεί [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), που σημαίνει ότι μπορείτε να \"\n\"καλέσετε όλα Μέθοδοι `str` σε μια συμβολοσειρά.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"Το [`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) είναι το \"\n\"τυπικό buffer με δυνατότητα αλλαγής μεγέθους που εκχωρείται σε σωρό:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"Το `Vec` υλοποιεί το [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/\"\n\"vec/struct.Vec.html#deref-methods-%5BT%5D), που σημαίνει ότι μπορείτε να \"\n\"καλέσετε το slice μεθόδους σε ένα «Vec».\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Τυπικός χάρτης κατακερματισμού με προστασία από επιθέσεις HashDoS:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"«Διαβάστε» και «Γράψτε».\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Η υπερφόρτωση χειριστή υλοποιείται μέσω χαρακτηριστικών στο `std::ops`:\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\n#, fuzzy\nmsgid \"Discussion points:\"\nmsgstr \"Σημεία συζήτησης:\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Θα μπορούσατε να εφαρμόσετε το \\\"Add\\\" για το \\\"&Point\\\". Σε ποιες \"\n\"περιπτώσεις είναι χρήσιμο;\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Απάντηση: Το «Προσθήκη: Προσθήκη» καταναλώνει τον «εαυτό». Αν πληκτρολογήστε \"\n\"`T` για το οποίο είστε Η υπερφόρτωση του χειριστή δεν είναι «Αντιγραφή», θα \"\n\"πρέπει να εξετάσετε την υπερφόρτωση ο χειριστής για το «&T» επίσης. Αυτό \"\n\"αποφεύγει την περιττή κλωνοποίηση στο τοποθεσία κλήσης.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Γιατί το \\\"Έξοδος\\\" είναι συσχετισμένος τύπος; Θα μπορούσε να γίνει \"\n\"παράμετρος τύπου;\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Σύντομη απάντηση: Οι παράμετροι τύπου ελέγχονται από τον καλούντα, αλλά οι \"\n\"συσχετισμένοι τύποι (όπως \\\"Έξοδος\\\") ελέγχονται από τον υλοποιητή του a \"\n\"χαρακτηριστικό.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Οι τύποι εφαρμόζουν τα «Από» και «Μέσα» για να διευκολύνουν τις μετατροπές \"\n\"τύπων:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"Το \\\"Into\\\" υλοποιείται αυτόματα όταν υλοποιείται το \\\"From\\\":\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\\\\<λεπτομέρειες>\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Αυτός είναι ο λόγος για τον οποίο είναι σύνηθες να εφαρμόζετε μόνο το \"\n\"\\\"From\\\", καθώς ο τύπος σας θα λάβει επίσης την εφαρμογή \\\"Into\\\".\\n\"\n\"\\n\"\n\"Όταν δηλώνετε έναν τύπο εισόδου ορίσματος συνάρτησης όπως \\\"οτιδήποτε μπορεί \"\n\"να μετατραπεί σε \\\"Συμβολοσειρά\\\", ο κανόνας είναι αντίθετος, θα πρέπει να \"\n\"χρησιμοποιήσετε το \\\"Into\\\". Η συνάρτησή σας θα δέχεται τύπους που υλοποιούν \"\n\"το \\\"From\\\" και εκείνους που _only_ υλοποιούν το \\\"Into\\\".\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Χρησιμοποιώντας το \\\"Read\\\" και το \\\"BufRead\\\", μπορείτε να αφαιρέσετε τις \"\n\"πηγές \\\"u8\\\":\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Παρομοίως, το «Write» σάς επιτρέπει να κάνετε αφηρήσεις πάνω από τα νεροχύτα \"\n\"«u8»:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The `Default` Trait\"\nmsgstr \"Το χαρακτηριστικό «Drop».\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"Μπορείτε να εφαρμόσετε το χαρακτηριστικό «Iterator» στους δικούς σας τύπους:\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Τα κλεισίματα ή οι εκφράσεις λάμδα έχουν τύπους που δεν μπορούν να \"\n\"ονομαστούν. Ωστόσο, αυτοί εφαρμογή ειδικού [`Fn`](https://doc.rust-lang.org/\"\n\"std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnMut.html) και [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.\"\n\"html) χαρακτηριστικά:\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"Κλήση μη ασφαλών συναρτήσεων\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Ένα \\\"Fn\\\" ούτε καταναλώνει ούτε μεταλλάσσει τις καταγεγραμμένες τιμές ή \"\n\"ίσως δεν καταγράφει τίποτα απολύτως, επομένως μπορεί καλείται πολλές φορές \"\n\"ταυτόχρονα.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Ένα \\\"FnMut\\\" μπορεί να μεταλλάξει τις καταγεγραμμένες τιμές, ώστε να \"\n\"μπορείτε να το καλέσετε πολλές φορές αλλά όχι ταυτόχρονα.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Εάν έχετε ένα \\\"FnOnce\\\", μπορείτε να το καλέσετε μόνο μία φορά. Μπορεί να \"\n\"καταναλώσει καταγεγραμμένες τιμές.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"Το \\\"FnMut\\\" είναι ένας υποτύπος του \\\"FnOnce\\\". Το \\\"Fn\\\" είναι ένας \"\n\"υποτύπος των \\\"FnMut\\\" και \\\"FnOnce\\\". Δηλ. μπορείτε να χρησιμοποιήσετε ένα \"\n\"«FnMut» όπου ζητείται ένα «FnOnce» και μπορείτε να χρησιμοποιήσετε ένα «Fn» \"\n\"όπου ένα «FnMut» ή «FnOnce» καλείται.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"there\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"Καλώς ήρθατε στην Ημέρα 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Στοίβα: Συνεχής περιοχή μνήμης για τοπικές μεταβλητές.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Οι τιμές έχουν σταθερά μεγέθη γνωστά κατά το χρόνο μεταγλώττισης.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Εξαιρετικά γρήγορο: απλώς μετακινήστε έναν δείκτη στοίβας.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Εύκολο στη διαχείριση: ακολουθεί κλήσεις λειτουργιών.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Great memory locality.\"\nmsgstr \"Μεγάλη τοποθεσία μνήμης.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Η δημιουργία ενός \\\"String\\\" τοποθετεί δεδομένα σταθερού μεγέθους στη στοίβα \"\n\"και δυναμικά μεγέθη δεδομένα για το σωρό:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Παραδοσιακά, οι γλώσσες χωρίζονται σε δύο μεγάλες κατηγορίες:\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Πλήρης έλεγχος μέσω χειροκίνητης διαχείρισης μνήμης: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Πλήρης ασφάλεια μέσω αυτόματης διαχείρισης μνήμης κατά την εκτέλεση: Java, \"\n\"Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Η Rust προσφέρει ένα νέο μείγμα:\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Πλήρης έλεγχος _και_ ασφάλεια μέσω επιβολής χρόνου μεταγλώττισης της σωστής \"\n\"μνήμης διαχείριση.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Το κάνει αυτό με μια ρητή έννοια ιδιοκτησίας.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Όλες οι δεσμεύσεις μεταβλητών έχουν _scope_ όπου είναι έγκυρες και είναι \"\n\"σφάλμα χρησιμοποιήστε μια μεταβλητή εκτός του πεδίου εφαρμογής της:\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"Λέμε ότι η μεταβλητή _κατέχει_ την τιμή.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"Στο τέλος του εύρους, η μεταβλητή _αποτέθηκε_ και τα δεδομένα ελευθερώνονται.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Μια ανάθεση θα μεταβιβάσει την ιδιοκτησία μεταξύ μεταβλητών:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/memory-management/move.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"Η εκχώρηση του `s1` στο `s2` μεταβιβάζει την ιδιοκτησία.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Όταν το `s1` βγαίνει εκτός πεδίου εφαρμογής, δεν συμβαίνει τίποτα: δεν έχει \"\n\"ιδιοκτησία.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"Όταν το `s2` βγαίνει εκτός εύρους, τα δεδομένα συμβολοσειράς ελευθερώνονται.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before move to `s2`:\"\nmsgstr \"Πριν μεταβείτε στο `s2`:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After move to `s2`:\"\nmsgstr \"Μετά τη μετάβαση στο `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Όταν μεταβιβάζετε μια τιμή σε μια συνάρτηση, η τιμή εκχωρείται στη συνάρτηση \"\n\"παράμετρος. Αυτό μεταβιβάζει την ιδιοκτησία:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Φέτες\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Αναφέρετε ότι αυτό είναι το αντίθετο από τις προεπιλογές της C++, η οποία \"\n\"αντιγράφει με βάση την τιμή, εκτός και αν χρησιμοποιήσετε το `std::move` \"\n\"(και ορίζεται ο κατασκευαστής κίνησης!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Με την πρώτη κλήση στο \\\"say_hello\\\", ο \\\"main\\\" παραιτείται από την \"\n\"ιδιοκτησία του \\\"name\\\". Στη συνέχεια, το \\\"όνομα\\\" δεν μπορεί να \"\n\"χρησιμοποιηθεί πλέον στο \\\"κύριο\\\".\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"Η μνήμη σωρού που έχει εκχωρηθεί για το \\\"όνομα\\\" θα ελευθερωθεί στο τέλος \"\n\"της συνάρτησης \\\"say_hello\\\".\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"Το \\\"main\\\" μπορεί να διατηρήσει την ιδιοκτησία εάν μεταβιβάσει το \\\"name\\\" \"\n\"ως αναφορά (\\\"&name\\\") και εάν το \\\"say_hello\\\" αποδεχτεί μια αναφορά ως \"\n\"παράμετρο.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Εναλλακτικά, το \\\"main\\\" μπορεί να περάσει έναν κλώνο του \\\"name\\\" στην \"\n\"πρώτη κλήση (\\\"name.clone()\\\").\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Το Rust καθιστά δυσκολότερο από την C++ την ακούσια δημιουργία αντιγράφων \"\n\"καθιστώντας τη σημασιολογία κίνησης ως προεπιλογή και αναγκάζοντας τους \"\n\"προγραμματιστές να κάνουν τους κλώνους ξεκάθαρους.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Διπλές απελευθερώσεις μνήμης στη σύγχρονη C++\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Η σύγχρονη C++ το λύνει διαφορετικά:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Τα δεδομένα σωρού από το `s1` είναι διπλά και το `s2` αποκτά το δικό του \"\n\"ανεξάρτητο αντίγραφο.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Όταν τα «s1» και «s2» βγαίνουν εκτός πεδίου εφαρμογής, το καθένα \"\n\"απελευθερώνει τη δική του μνήμη.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before copy-assignment:\"\nmsgstr \"Πριν την αντιγραφή-ανάθεση:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After copy-assignment:\"\nmsgstr \"Μετά την αντιγραφή-ανάθεση:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Ενώ η σημασιολογία μετακίνησης είναι η προεπιλογή, ορισμένοι τύποι \"\n\"αντιγράφονται από προεπιλογή:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Αυτοί οι τύποι εφαρμόζουν το χαρακτηριστικό «Αντιγραφή».\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Μπορείτε να επιλέξετε τους δικούς σας τύπους για χρήση σημασιολογίας \"\n\"αντιγραφής:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\"Μετά την ανάθεση, τόσο το «p1» και το «p2» έχουν τα δικά τους δεδομένα.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"Μπορούμε επίσης να χρησιμοποιήσουμε το «p1.clone()» για να αντιγράψουμε ρητά \"\n\"τα δεδομένα.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Η αντιγραφή και η κλωνοποίηση δεν είναι το ίδιο πράγμα:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Η αντιγραφή αναφέρεται σε αντίγραφα bitwise περιοχών μνήμης και δεν \"\n\"λειτουργεί σε αυθαίρετα αντικείμενα.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Η αντιγραφή δεν επιτρέπει προσαρμοσμένη λογική (σε αντίθεση με τους \"\n\"κατασκευαστές αντιγραφής στη C++).\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Η κλωνοποίηση είναι μια πιο γενική λειτουργία και επιτρέπει επίσης \"\n\"προσαρμοσμένη συμπεριφορά με την εφαρμογή του χαρακτηριστικού «Κλωνοποίηση».\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\"Η αντιγραφή δεν λειτουργεί σε τύπους που εφαρμόζουν το χαρακτηριστικό «Drop».\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"In the above example, try the following:\"\nmsgstr \"Στο παραπάνω παράδειγμα, δοκιμάστε τα εξής:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Προσθέστε ένα πεδίο «String» στο «struct Point». Δεν θα μεταγλωττιστεί \"\n\"επειδή το \\\"String\\\" δεν είναι τύπος \\\"Αντιγραφή\\\".\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Καταργήστε το \\\"Copy\\\" από το χαρακτηριστικό \\\"derive\\\". Το σφάλμα \"\n\"μεταγλωττιστή βρίσκεται τώρα στο «println!» για το «p1».\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Δείξτε ότι λειτουργεί εάν αντ' αυτού κλωνοποιήσετε το \\\"p1\\\".\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"The `Drop` Trait\"\nmsgstr \"Το χαρακτηριστικό «Drop».\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Οι τιμές που εφαρμόζουν το \\\"Drop\\\" μπορούν να καθορίσουν τον κώδικα που θα \"\n\"εκτελείται όταν εξέρχονται από το πεδίο εφαρμογής:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Γιατί το «Drop::drop» δεν σημαίνει «self»;\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Σύντομη απάντηση: Εάν συνέβαινε, το `std::mem::drop` θα καλούνταν στο τέλος \"\n\"του το μπλοκ, με αποτέλεσμα μια άλλη κλήση στο «Drop::drop» και μια στοίβα \"\n\"ξεχείλισμα!\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Δοκιμάστε να αντικαταστήσετε το «drop(a)» με το «a.drop()».\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"Το [`Πλαίσιο`](https://doc.rust-lang.org/std/boxed/struct.Box.html) είναι \"\n\"ένας ιδιόκτητος δείκτης σε δεδομένα στο σωρό:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"Το \\\"Box\\n\"\n\"\\n\"\n\"\\\" υλοποιεί το \\\"Deref\\\\<Target = T>\\\", που σημαίνει ότι μπορείτε [μεθόδους \"\n\"κλήσης από το \\\"T\\\" απευθείας σε ένα \\\"Box\\n\"\n\"\\n\"\n\"\\\"](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-\"\n\"coercion).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Οι αναδρομικοί τύποι δεδομένων ή οι τύποι δεδομένων με δυναμικά μεγέθη \"\n\"πρέπει να χρησιμοποιούν ένα «Πλαίσιο»:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not compute a fixed size of the struct in memory \"\n\"(`List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. \"\n\"\\\"Recursive with indirection\\\" is a hint you might want to use a Box or \"\n\"reference of some kind, instead of storing a value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Εξειδικευμένη Βελτιστοποίηση\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\"Ένα «Πλαίσιο» δεν μπορεί να είναι κενό, επομένως ο δείκτης είναι πάντα \"\n\"έγκυρος και μη «μηδενικός». Αυτό επιτρέπει στον μεταγλωττιστή να \"\n\"βελτιστοποιήσει τη διάταξη της μνήμης:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"Το [`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) είναι ένας \"\n\"κοινόχρηστος δείκτης με μέτρηση αναφοράς. Χρησιμοποιήστε το όταν πρέπει να \"\n\"ανατρέξετε στα ίδια δεδομένα από πολλά μέρη:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"Όπως το `std::shared_ptr` της C++.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"Το `make_mut` στην πραγματικότητα κλωνοποιεί την εσωτερική τιμή εάν είναι \"\n\"απαραίτητο (\\\"clone-on-write\\\") και επιστρέφει μια μεταβλητή αναφορά.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Αντί να μεταβιβάζετε την ιδιοκτησία κατά την κλήση μιας συνάρτησης, μπορείτε \"\n\"να αφήσετε α συνάρτηση _borrow_ την τιμή:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\"Η συνάρτηση «προσθήκη» _δανείζεται_ δύο σημεία και επιστρέφει ένα νέο σημείο.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Ο καλών διατηρεί την κυριότητα των εισόδων.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Το Rust θέτει περιορισμούς στους τρόπους με τους οποίους μπορείτε να \"\n\"δανειστείτε τιμές:\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Μπορείτε να έχετε μία ή περισσότερες τιμές \\\"&T\\\" ανά πάσα στιγμή, _ή_\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Μπορείτε να έχετε ακριβώς μία τιμή «&mut T».\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Ο παραπάνω κώδικας δεν μεταγλωττίζεται επειδή το «a» δανείζεται ταυτόχρονα \"\n\"ως mutable (μέσω «c») και ως αμετάβλητο (μέσω «b»).\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Μετακινήστε τη δήλωση «println!» για το «b» πριν από το εύρος που εισάγει το \"\n\"«c» για να κάνετε μεταγλώττιση του κώδικα.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Μετά από αυτήν την αλλαγή, ο μεταγλωττιστής συνειδητοποιεί ότι το \\\"b\\\" \"\n\"χρησιμοποιείται μόνο πριν από το νέο μεταβλητό δάνειο του \\\"a\\\" έως το \"\n\"\\\"c\\\". Αυτό είναι ένα χαρακτηριστικό του ελεγκτή δανεισμού που ονομάζεται \"\n\"\\\"μη λεξιλογικές ζωές\\\".\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Κελλί<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Εργάζεστε για την εφαρμογή ενός συστήματος παρακολούθησης της υγείας. Ως \"\n\"μέρος αυτού, εσείς πρέπει να παρακολουθεί τα στατιστικά στοιχεία υγείας των \"\n\"χρηστών.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Θα ξεκινήσετε με ορισμένες αποκομμένες συναρτήσεις σε ένα μπλοκ \\\"impl\\\" \"\n\"καθώς και σε ένα \\\"User\\\". ορισμός κατασκευής. Ο στόχος σας είναι να \"\n\"εφαρμόσετε τις αποκομμένες μεθόδους στο Η δομή \\\"User\\\" ορίζεται στο μπλοκ \"\n\"\\\"impl\\\".\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n\"συμπληρώστε τον κωδικό που λείπει μέθοδοι:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md src/android/aidl/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices\"\nmsgstr \"Φέτες\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Μια φέτα σάς δίνει μια προβολή σε μια μεγαλύτερη συλλογή:\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Οι φέτες δανείζονται δεδομένα από τον τύπο σε φέτες.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"Ερώτηση: Τι θα συμβεί αν τροποποιήσετε το «a\\\\[3\\\\]»;\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Το `s` είναι μια αναφορά σε ένα κομμάτι του `i32`. Παρατηρήστε ότι ο τύπος \"\n\"`s` (`&[i32]`) δεν αναφέρει πλέον το μήκος του πίνακα. Αυτό μας επιτρέπει να \"\n\"κάνουμε υπολογισμούς σε φέτες διαφορετικών μεγεθών.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Οι φέτες δανείζονται πάντα από άλλο αντικείμενο. Σε αυτό το παράδειγμα, το \"\n\"«a» πρέπει να παραμείνει «ζωντανό» (στο πεδίο εφαρμογής) για τουλάχιστον όσο \"\n\"το κομμάτι μας.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Η ερώτηση σχετικά με την τροποποίηση του «a\\\\[3\\\\]» μπορεί να προκαλέσει μια \"\n\"ενδιαφέρουσα συζήτηση, αλλά η απάντηση είναι ότι για λόγους ασφαλείας της \"\n\"μνήμης δεν μπορείτε να το κάνετε μέσω του \\\"a\\\" αφού δημιουργήσετε ένα \"\n\"slice, αλλά μπορείτε να διαβάσετε τα δεδομένα από το \\\"a\\\" και το \\\"s\\\" με \"\n\"ασφάλεια. Περισσότερες λεπτομέρειες θα επεξηγηθούν στην ενότητα ελέγχου \"\n\"δανεισμού.\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"Rust terminology:\"\nmsgstr \"Ορολογία σκουριάς:\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"«&str» μια αμετάβλητη αναφορά σε ένα κομμάτι συμβολοσειράς.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"\\\"String\\\" ένα μεταβλητό buffer συμβολοσειρών.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"Η μακροεντολή «format!()» είναι ένας βολικός τρόπος για να δημιουργήσετε μια \"\n\"ιδιόκτητη συμβολοσειρά από δυναμικές τιμές. Το δέχεται την ίδια προδιαγραφή \"\n\"μορφής με το \\\"println!()\\\".\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Μπορείτε να δανειστείτε κομμάτια «&str» από το «String» μέσω του «&» και \"\n\"προαιρετικά επιλογής εύρους.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Για προγραμματιστές C++: σκεφτείτε το «&str» ως «const char\\\\*» από τη C++, \"\n\"αλλά αυτό που δείχνει πάντα σε μια έγκυρη συμβολοσειρά στη μνήμη. Το Rust \"\n\"«String» είναι ένα κατά προσέγγιση ισοδύναμο του «std::string» από τη C++ \"\n\"(κύρια διαφορά: μπορεί να περιέχει μόνο byte με κωδικοποίηση UTF-8 και δεν \"\n\"θα χρησιμοποιήσει ποτέ βελτιστοποίηση μικρής συμβολοσειράς).\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"Οι απαριθμήσεις σάς επιτρέπουν να συλλέγετε ένα σύνολο τιμών κάτω από έναν \"\n\"τύπο\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the the compiler does not know what lifetime to infer for \"\n\"`p3`. Looking inside the function body shows that it can only safely assume \"\n\"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, \"\n\"Rust requires explicit annotations of lifetimes on function arguments and \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Διάρκειες σε κλήσεις συναρτήσεων\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Διάρκειες ζωής σε δομές δεδομένων\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Εάν ένας τύπος δεδομένων αποθηκεύει δανεισμένα δεδομένα, πρέπει να \"\n\"σχολιάζεται με μια διάρκεια ζωής:\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"Στο παραπάνω παράδειγμα, ο σχολιασμός στο \\\"Highlight\\\" επιβάλλει ότι τα \"\n\"δεδομένα που βρίσκονται κάτω από το περιεχόμενο \\\"&str\\\" ζουν τουλάχιστον \"\n\"για όσο χρονικό διάστημα οποιοδήποτε στιγμιότυπο του \\\"Highlight\\\" που \"\n\"χρησιμοποιεί αυτά τα δεδομένα.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Εάν το «κείμενο» καταναλωθεί πριν από το τέλος της διάρκειας ζωής του \"\n\"«αλεπού» (ή του «σκύλου»), ο ελεγκτής δανείου κάνει ένα σφάλμα.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Οι τύποι με δανεικά δεδομένα αναγκάζουν τους χρήστες να παραμείνουν στα \"\n\"αρχικά δεδομένα. Αυτό μπορεί να είναι χρήσιμο για τη δημιουργία ελαφριών \"\n\"προβολών, αλλά γενικά τις καθιστά κάπως πιο δύσκολες στη χρήση.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Όταν είναι δυνατόν, κάντε τις δομές δεδομένων να κατέχουν απευθείας τα \"\n\"δεδομένα τους.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Ορισμένες δομές με πολλαπλές αναφορές στο εσωτερικό μπορεί να έχουν \"\n\"περισσότερους από έναν σχολιασμούς διάρκειας ζωής. Αυτό μπορεί να είναι \"\n\"απαραίτητο εάν υπάρχει ανάγκη να περιγραφούν σχέσεις διάρκειας ζωής μεταξύ \"\n\"των ίδιων των αναφορών, επιπλέον της διάρκειας ζωής της ίδιας της δομής. \"\n\"Είναι πολύ προηγμένες περιπτώσεις χρήσης.\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Καλώς ήρθατε στην Ημέρα 4\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"Σήμερα, θα καλύψουμε μερικά πιο προχωρημένα θέματα του Rust:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Τεστ\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Το χαρακτηριστικό \\\"Iterator\\\" σάς λέει πώς να _επανάληψη_ αφού \"\n\"δημιουργήσετε ένα επαναλήπτης. Το σχετικό χαρακτηριστικό «IntoIterator» σάς \"\n\"λέει πώς να δημιουργήσετε τον επαναλήπτη:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Η σύνταξη εδώ σημαίνει ότι κάθε υλοποίηση του «IntoIterator» πρέπει Δηλώστε \"\n\"δύο τύπους:\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\\\"Στοιχείο\\\": ο τύπος που επαναλαμβάνουμε, όπως \\\"i8\\\",\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\"«IntoIter»: ο τύπος «Iterator» που επιστρέφεται με τη μέθοδο «into_iter».\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Σημειώστε ότι το \\\"IntoIter\\\" και το \\\"Item\\\" είναι συνδεδεμένα: ο \"\n\"επαναλήπτης πρέπει να έχει το ίδιο Τύπος «Στοιχείο», που σημαίνει ότι \"\n\"επιστρέφει «Επιλογή\\\\<Στοιχείο>».\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"Το \\\"FromIterator\\\" σάς επιτρέπει να δημιουργήσετε μια συλλογή από ένα \"\n\"\\\"Iterator\\\".\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"«Iterator».\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Υπάρχουν επίσης υλοποιήσεις που σας επιτρέπουν να κάνετε καταπληκτικά \"\n\"πράγματα όπως η μετατροπή ενός \\\"Iterator\\\\<Item = Αποτέλεσμα\\\\<V, E>>\\\" σε \"\n\"ένα \\\"Result\\\\<Vec\\n\"\n\"\\n\"\n\", E>\\\".\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Μπορείτε να εφαρμόσετε το χαρακτηριστικό «Iterator» στους δικούς σας τύπους:\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και κάντε \"\n\"τις δοκιμές πέρασμα. Προσπαθήστε να αποφύγετε να εκχωρήσετε ένα «Vec» για τα \"\n\"ενδιάμεσα αποτελέσματά σας:\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Είδαμε πώς τα μπλοκ «impl» μας επιτρέπουν να λειτουργεί ο χώρος ονομάτων σε \"\n\"έναν τύπο.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"Ομοίως, το «mod» μας επιτρέπει τύπους και συναρτήσεις ονομάτων:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"Η ρίζα «κλουβί» βρίσκεται σε:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (για κλουβί βιβλιοθήκης)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (για δυαδικό κιβώτιο)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Οι ενότητες αποτελούν όριο απορρήτου:\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Τα στοιχεία της μονάδας είναι ιδιωτικά από προεπιλογή (αποκρύπτει τις \"\n\"λεπτομέρειες υλοποίησης).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Τα στοιχεία γονέα και αδελφών είναι πάντα ορατά.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Μονοπάτια\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Οι διαδρομές επιλύονται ως εξής:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"Ως απόλυτη διαδρομή:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\"Το \\\"crate::foo\\\" αναφέρεται στο \\\"foo\\\" στη ρίζα του τρέχοντος κιβωτίου,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"Το «bar::foo» αναφέρεται στο «foo» στο κιβώτιο «bar».\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Προετοιμασία\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Τεστ μονάδων\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Το Rust and Cargo συνοδεύεται από ένα απλό πλαίσιο δοκιμής μονάδας:\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Οι δοκιμές ενσωμάτωσης υποστηρίζονται μέσω του καταλόγου «tests/».\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Αυτό σας επιτρέπει να δοκιμάσετε ιδιωτικούς βοηθούς μονάδας.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"Το χαρακτηριστικό «#\\\\[cfg(test)\\\\]» είναι ενεργό μόνο όταν εκτελείτε \"\n\"«δοκιμή φορτίου».\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Τεστ ενσωμάτωσης\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Εάν θέλετε να δοκιμάσετε τη βιβλιοθήκη σας ως πελάτη, χρησιμοποιήστε μια \"\n\"δοκιμή ενοποίησης.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Δημιουργήστε ένα αρχείο «.rs» κάτω από το «tests/»:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Αυτές οι δοκιμές έχουν πρόσβαση μόνο στο δημόσιο API του κλουβιού σας.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Τεστ τεκμηρίωσης\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Το Rust έχει ενσωματωμένη υποστήριξη για δοκιμές τεκμηρίωσης:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Τα μπλοκ κώδικα στα σχόλια `///` εμφανίζονται αυτόματα ως κώδικας Rust.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\"Ο κώδικας θα μεταγλωττιστεί και θα εκτελεστεί ως μέρος της «δοκιμής φορτίου».\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Δοκιμάστε τον παραπάνω κώδικα στο [Rust Playground](https://play.rust-lang.\"\n\"org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/useful-crates.md\n#, fuzzy\nmsgid \"Rust comes with only basic support for writing tests.\"\nmsgstr \"Το Rust έχει ενσωματωμένη υποστήριξη για δοκιμές τεκμηρίωσης:\"\n\n#: src/testing/useful-crates.md\nmsgid \"Here are some additional crates which we recommend for writing tests:\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n\"library in the tradition of GoogleTest for C++.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n\"tests.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings strings \"\n\"are shown as a diff:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"GoogleTest is available for use in AOSP.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"The advice here is for Android (AOSP) where Mockall is the recommended \"\n\"mocking library. There are other [mocking libraries available on crates.io]\"\n\"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP \"\n\"services. The other mocking libraries work in a similar fashion as Mockall, \"\n\"meaning that they make it easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Αλγόριθμος Luhn\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"Ο [αλγόριθμος Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) \"\n\"χρησιμοποιείται για επικύρωση αριθμών πιστωτικών καρτών. Ο αλγόριθμος \"\n\"παίρνει μια συμβολοσειρά ως είσοδο και κάνει το παρακάτω για να επικυρώσετε \"\n\"τον αριθμό της πιστωτικής κάρτας:\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject number with less than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n\"συμπληρώστε τον κωδικό που λείπει λειτουργίες και μέθοδοι:\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 2 hours\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Το Rust θα προκαλέσει πανικό εάν συμβεί ένα μοιραίο σφάλμα κατά τη διάρκεια \"\n\"της εκτέλεσης:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Οι πανικοί αφορούν μη αναστρέψιμα και απροσδόκητα σφάλματα.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Οι πανικοί είναι συμπτώματα σφαλμάτων στο πρόγραμμα.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Χρησιμοποιήστε API που δεν προκαλούν πανικό (όπως \\\"Vec::get\\\") εάν το \"\n\"σφάλμα δεν είναι αποδεκτό.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"Από προεπιλογή, ένας πανικός θα προκαλέσει το ξετύλιγμα της στοίβας. Το \"\n\"ξετύλιγμα μπορεί να πιαστεί:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Αυτό μπορεί να είναι χρήσιμο σε διακομιστές που θα πρέπει να συνεχίσουν να \"\n\"εκτελούνται ακόμα και αν είναι μόνοι κολλάει το αίτημα.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Αυτό δεν λειτουργεί εάν το \\\"panic = \\\"abort\\\" έχει οριστεί στο \\\"Cargo.\"\n\"toml\\\".\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"στο πολύ πιο απλό\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Μπορούμε να το χρησιμοποιήσουμε για να απλοποιήσουμε τον κωδικό παράδοσης \"\n\"σφαλμάτων:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\"Η μεταβλητή \\\"username\\\" μπορεί να είναι είτε \\\"Ok(string)\\\" είτε \"\n\"\\\"Err(error)\\\".\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Χρησιμοποιήστε την κλήση `fs::write` για να δοκιμάσετε τα διαφορετικά \"\n\"σενάρια: κανένα αρχείο, κενό αρχείο, αρχείο με όνομα χρήστη.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process:Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"Η αποτελεσματική επέκταση του «?» είναι λίγο πιο περίπλοκη από ό,τι \"\n\"αναφέρθηκε προηγουμένως:\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"works the same as\"\nmsgstr \"λειτουργεί το ίδιο με\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Η κλήση \\\"From::from\\\" εδώ σημαίνει ότι προσπαθούμε να μετατρέψουμε τον τύπο \"\n\"σφάλματος στο τύπος που επιστρέφεται από τη συνάρτηση:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Δυναμικοί τύποι σφαλμάτων\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Μερικές φορές θέλουμε να επιτρέψουμε την επιστροφή οποιουδήποτε τύπου \"\n\"σφάλματος χωρίς να γράψουμε το δικό μας κάλυμμα enum όλες τις διαφορετικές \"\n\"δυνατότητες. Το `std::error::Error` το καθιστά εύκολο.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Αυτό εξοικονομεί κώδικα, αλλά παραιτείται από τη δυνατότητα καθαρής \"\n\"διαχείρισης διαφορετικών περιπτώσεων σφαλμάτων με διαφορετικό τρόπο το \"\n\"πρόγραμμα. Ως εκ τούτου, γενικά δεν είναι καλή ιδέα να χρησιμοποιήσετε το \"\n\"\\\"Box\\n\"\n\"\\n\"\n\"\\\" στο δημόσιο API ενός βιβλιοθήκη, αλλά μπορεί να είναι μια καλή επιλογή σε \"\n\"ένα πρόγραμμα όπου θέλετε απλώς να εμφανίσετε το μήνυμα σφάλματος κάπου.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Το κιβώτιο [thiserror](https://docs.rs/thiserror/) είναι ένας δημοφιλής \"\n\"τρόπος δημιουργίας enum σφαλμάτων όπως κάναμε στην προηγούμενη σελίδα:\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"Το \\\"anyhow::Error\\\" είναι ουσιαστικά ένα περιτύλιγμα γύρω από το \\\"Box\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"Το `ούτως ή άλλως::Αποτέλεσμα<V>` είναι ένα ψευδώνυμο τύπου για το \"\n\"\\\"Αποτέλεσμα\\\\<V, ούτως ή άλλως::Σφάλμα>\\\".\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"\\\". Ως τέτοιο και πάλι γενικά δεν είναι μια καλή επιλογή για το δημόσιο API \"\n\"μιας βιβλιοθήκης, αλλά χρησιμοποιείται ευρέως σε εφαρμογές.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"Ο πραγματικός τύπος σφάλματος στο εσωτερικό του μπορεί να εξαχθεί για \"\n\"εξέταση εάν είναι απαραίτητο.\\n\"\n\"\\n\"\n\"Η λειτουργικότητα που παρέχεται από το \\\"anyhow::Result\\n\"\n\"\\n\"\n\"\\\" μπορεί να είναι οικεία στους προγραμματιστές της Go, καθώς παρέχει \"\n\"παρόμοια μοτίβα χρήσης και εργονομία με το «(T, error)» από το Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Η γλώσσα Rust έχει δύο μέρη:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**Safe Rust:** ασφαλής μνήμη, δεν είναι δυνατή η απροσδιόριστη συμπεριφορά.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Μη ασφαλής σκουριά:** μπορεί να προκαλέσει απροσδιόριστη συμπεριφορά εάν \"\n\"παραβιάζονται προϋποθέσεις.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"Θα δούμε κυρίως ασφαλή Rust σε αυτό το μάθημα, αλλά είναι σημαντικό να το \"\n\"γνωρίζουμε τι είναι το Unsafe Rust.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Ο μη ασφαλής κώδικας είναι συνήθως μικρός και απομονωμένος και η ορθότητά \"\n\"του θα πρέπει να γίνεται προσεκτικά τεκμηριωμένη. Συνήθως είναι τυλιγμένο σε \"\n\"ένα ασφαλές στρώμα αφαίρεσης.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Το Unsafe Rust σάς δίνει πρόσβαση σε πέντε νέες δυνατότητες:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Αναφορά ακατέργαστων δεικτών.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Πρόσβαση ή τροποποίηση μεταβλητών στατικών μεταβλητών.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Πρόσβαση στα πεδία «ένωση».\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\"Καλέστε «μη ασφαλείς» συναρτήσεις, συμπεριλαμβανομένων των «εξωτερικών» \"\n\"συναρτήσεων.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Εφαρμόστε «μη ασφαλή» χαρακτηριστικά.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"Θα καλύψουμε εν συντομία τις μη ασφαλείς δυνατότητες στη συνέχεια. Για \"\n\"πλήρεις λεπτομέρειες, δείτε [Κεφάλαιο 19.1 στο βιβλίο της σκουριάς](https://\"\n\"doc.rust-lang.org/book/ch19-01-unsafe-rust.html) και το [Rustonomicon]\"\n\"(https://doc.rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Το Unsafe Rust δεν σημαίνει ότι ο κωδικός είναι εσφαλμένος. Σημαίνει ότι οι \"\n\"προγραμματιστές έχουν απενεργοποίησε τις δυνατότητες ασφαλείας του \"\n\"μεταγλωττιστή και πρέπει να γράψει τον σωστό κώδικα από τους εαυτούς τους. \"\n\"Σημαίνει ότι ο μεταγλωττιστής δεν επιβάλλει πλέον τους κανόνες ασφαλείας της \"\n\"μνήμης του Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"Η δημιουργία δεικτών είναι ασφαλής, αλλά η αποσύνδεσή τους απαιτεί \\\"μη \"\n\"ασφαλή\\\":\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Είναι καλή πρακτική (και απαιτείται από τον οδηγό στυλ Android Rust) να \"\n\"γράψετε ένα σχόλιο για το καθένα Μπλοκ \\\"μη ασφαλής\\\" που εξηγεί πώς ο \"\n\"κωδικός μέσα σε αυτό ικανοποιεί τις απαιτήσεις ασφαλείας του μη ασφαλούς \"\n\"λειτουργίες που κάνει.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"Στην περίπτωση των αποαναφορών δείκτη, αυτό σημαίνει ότι οι δείκτες πρέπει \"\n\"να είναι [_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), π.\"\n\"χ.:\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Ο δείκτης δεν πρέπει να είναι μηδενικός.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Ο δείκτης πρέπει να είναι _dereferenceable_ (εντός των ορίων ενός \"\n\"μεμονωμένου αντικειμένου).\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"Το αντικείμενο δεν πρέπει να έχει εκχωρηθεί.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Δεν πρέπει να υπάρχουν ταυτόχρονες προσβάσεις στην ίδια τοποθεσία.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Εάν ο δείκτης λήφθηκε με τη μετάδοση μιας αναφοράς, το υποκείμενο \"\n\"αντικείμενο πρέπει να είναι ζωντανό και όχι μπορεί να χρησιμοποιηθεί αναφορά \"\n\"για πρόσβαση στη μνήμη.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"Στις περισσότερες περιπτώσεις ο δείκτης πρέπει επίσης να είναι σωστά \"\n\"ευθυγραμμισμένος.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Είναι ασφαλές να διαβάσετε μια αμετάβλητη στατική μεταβλητή:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Ωστόσο, δεδομένου ότι μπορεί να προκύψουν αγώνες δεδομένων, δεν είναι \"\n\"ασφαλές να διαβάζετε και να γράφετε μεταβλητά στατικές μεταβλητές:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Η χρήση ενός μεταβλητού στατικού είναι γενικά κακή ιδέα, αλλά υπάρχουν \"\n\"ορισμένες περιπτώσεις όπου μπορεί να έχει νόημα σε κώδικα «no_std» χαμηλού \"\n\"επιπέδου, όπως η εφαρμογή ενός κατανεμητή σωρού ή η εργασία με ορισμένα C \"\n\"API.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Τα συνδικάτα είναι σαν τα enums, αλλά πρέπει να παρακολουθείτε μόνοι σας το \"\n\"ενεργό πεδίο:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Χωρίς απροσδιόριστη συμπεριφορά κατά το χρόνο εκτέλεσης:\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Οι ενώσεις χρειάζονται πολύ σπάνια στο Rust καθώς συνήθως μπορείτε να \"\n\"χρησιμοποιήσετε ένα enum. Περιστασιακά χρειάζονται για αλληλεπίδραση με API \"\n\"βιβλιοθήκης C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Εάν θέλετε απλώς να ερμηνεύσετε ξανά τα byte ως διαφορετικού τύπου, μάλλον \"\n\"θέλετε [`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) ή χρηματοκιβώτιο περιτύλιγμα όπως το κιβώτιο [`zerocopy`]\"\n\"(https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Κλήση μη ασφαλών συναρτήσεων\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Μια συνάρτηση ή μια μέθοδος μπορεί να επισημανθεί ως «μη ασφαλής» εάν έχει \"\n\"επιπλέον προϋποθέσεις πρέπει να τηρεί για την αποφυγή απροσδιόριστης \"\n\"συμπεριφοράς:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"Χωρίς απροσδιόριστη συμπεριφορά κατά το χρόνο εκτέλεσης:\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Υλοποίηση μη ασφαλών συναρτήσεων\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Μπορείτε να επισημάνετε τις δικές σας λειτουργίες ως \\\"μη ασφαλείς\\\" εάν \"\n\"απαιτούν συγκεκριμένες συνθήκες για να αποφευχθούν απροσδιόριστες η \"\n\"ΣΥΜΠΕΡΙΦΟΡΑ.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Αυτό είναι συνήθως ένα πρόβλημα μόνο για εξωτερικές συναρτήσεις που κάνουν \"\n\"πράγματα με δείκτες που μπορεί παραβιάζουν το μοντέλο μνήμης του Rust, αλλά \"\n\"γενικά οποιαδήποτε συνάρτηση C μπορεί να έχει απροσδιόριστη συμπεριφορά κάτω \"\n\"από οποιαδήποτε αυθαίρετες περιστάσεις.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"Στην πραγματικότητα δεν θα χρησιμοποιούσαμε δείκτες για αυτό, επειδή μπορεί \"\n\"να γίνει με ασφάλεια με αναφορές.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Σημειώστε ότι ο μη ασφαλής κωδικός επιτρέπεται σε μια μη ασφαλή συνάρτηση \"\n\"χωρίς μπλοκ \\\"μη ασφαλής\\\". Μπορούμε απαγορεύστε αυτό με \"\n\"\\\"#\\\\[deny(unsafe_op_in_unsafe_fn)\\\\]\\\". Δοκιμάστε να το προσθέσετε και \"\n\"δείτε τι θα συμβεί.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Υλοποίηση μη ασφαλών χαρακτηριστικών\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Όπως και με τις συναρτήσεις, μπορείτε να επισημάνετε ένα χαρακτηριστικό ως \"\n\"\\\"μη ασφαλές\\\", εάν η υλοποίηση πρέπει να είναι εγγυημένη συγκεκριμένες \"\n\"συνθήκες για την αποφυγή απροσδιόριστης συμπεριφοράς.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Για παράδειγμα, το κιβώτιο «zerocopy» έχει ένα μη ασφαλές χαρακτηριστικό που \"\n\"φαίνεται [κάτι σαν αυτό](https://docs.rs/zerocopy/latest/zerocopy/trait.\"\n\"AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Θα πρέπει να υπάρχει μια ενότητα «# Ασφάλεια» στο Rustdoc για το \"\n\"χαρακτηριστικό που εξηγεί τις απαιτήσεις για το χαρακτηριστικό που πρέπει να \"\n\"εφαρμοστεί με ασφάλεια.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"Η πραγματική ενότητα ασφάλειας για τα \\\"AsBytes\\\" είναι μάλλον μεγαλύτερη \"\n\"και πιο περίπλοκη.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\"Τα ενσωματωμένα χαρακτηριστικά «Αποστολή» και «Συγχρονισμός» δεν είναι \"\n\"ασφαλή.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Ασφαλές περιτύλιγμα FFI\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Το Rust έχει μεγάλη υποστήριξη για την κλήση συναρτήσεων μέσω μιας \"\n\"συνάρτησης _foreign διεπαφή_ (FFI). Θα το χρησιμοποιήσουμε για να \"\n\"δημιουργήσουμε ένα ασφαλές περιτύλιγμα για το `libc` συναρτήσεις που θα \"\n\"χρησιμοποιούσατε από το C για να διαβάσετε τα ονόματα αρχείων ενός καταλόγου.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Θα θελήσετε να συμβουλευτείτε τις σελίδες του εγχειριδίου:\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"«Read» και «Write» που χρησιμοποιούνται για IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Text processing in Rust\"\nmsgstr \"Μετακινημένες συμβολοσειρές στη Rust\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"«Read» και «Write» που χρησιμοποιούνται για IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"«Read» και «Write» που χρησιμοποιούνται για IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n\"συμπληρώστε τον κωδικό που λείπει λειτουργίες και μέθοδοι:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Το Rust υποστηρίζεται για ανάπτυξη εγγενούς πλατφόρμας στο Android. Αυτό \"\n\"σημαίνει ότι μπορείτε να γράψετε νέες υπηρεσίες λειτουργικού συστήματος στο \"\n\"Rust, καθώς και να επεκτείνετε υπάρχουσες υπηρεσίες.\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Θα προσπαθήσουμε να καλέσουμε τον Rust από ένα από τα δικά σας έργα σήμερα. \"\n\"Προσπάθησε λοιπόν βρείτε μια μικρή γωνία της βάσης του κώδικα όπου μπορούμε \"\n\"να μετακινήσουμε ορισμένες γραμμές κώδικα Σκουριά. Όσο λιγότερες εξαρτήσεις \"\n\"και «εξωτικοί» τύποι τόσο το καλύτερο. Κάτι που η ανάλυση ορισμένων \"\n\"ακατέργαστων byte θα ήταν ιδανική.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Θα χρησιμοποιήσουμε μια εικονική συσκευή Android για να δοκιμάσουμε τον \"\n\"κώδικά μας. Βεβαιωθείτε ότι έχετε πρόσβαση σε ένα ή δημιουργήστε ένα νέο με:\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Ανατρέξτε στο [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) για λεπτομέρειες.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Το σύστημα κατασκευής Android (Soong) υποστηρίζει το Rust μέσω μιας σειράς \"\n\"λειτουργικών μονάδων:\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"\"\n\"\\\\| Τύπος ενότητας | Περιγραφή | \"\n\"\\\\|------------------------------------------------- \"\n\"-------------------------------------------------- ---------------------| \"\n\"\\\\| `rust_binary` | Παράγει ένα Rust δυαδικό. | \\\\| `rust_library` | Παράγει \"\n\"μια βιβλιοθήκη Rust και παρέχει παραλλαγές «rlib» και «dylib». | \\\\| \"\n\"`rust_ffi` | Παράγει μια βιβλιοθήκη Rust C που μπορεί να χρησιμοποιηθεί από \"\n\"μονάδες «cc» και παρέχει τόσο στατικές όσο και κοινόχρηστες παραλλαγές. | \"\n\"\\\\| `rust_proc_macro` | Παράγει μια «proc-macro» βιβλιοθήκη Rust. Αυτά είναι \"\n\"ανάλογα με τα πρόσθετα μεταγλωττιστή. | \\\\| «δοκιμή_σκουριάς» | Παράγει ένα \"\n\"δυαδικό σύστημα δοκιμής Rust που χρησιμοποιεί την τυπική ζώνη δοκιμής Rust. \"\n\"| \\\\| `rust_fuzz` | Παράγει ένα Rust fuzz δυαδικό μόχλευσης «libfuzzer». | \"\n\"\\\\| `rust_protobuf` | Δημιουργεί πηγή και παράγει μια βιβλιοθήκη Rust που \"\n\"παρέχει μια διεπαφή για ένα συγκεκριμένο protobuf. | \\\\| `rust_bindgen` | \"\n\"Δημιουργεί πηγή και παράγει μια βιβλιοθήκη Rust που περιέχει δεσμεύσεις Rust \"\n\"σε βιβλιοθήκες C. |\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Στη συνέχεια θα δούμε τα «rust_binary» και «rust_library».\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"Rust Binaries\"\nmsgstr \"Rust Binaries\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Ας ξεκινήσουμε με μια απλή εφαρμογή. Στη ρίζα ενός ταμείου AOSP, \"\n\"δημιουργήστε τα ακόλουθα αρχεία:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\"Τώρα μπορείτε να δημιουργήσετε, να προωθήσετε και να εκτελέσετε το δυαδικό:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Rust Libraries\"\nmsgstr \"Βιβλιοθήκες Rust\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Χρησιμοποιείτε το \\\"rust_library\\\" για να δημιουργήσετε μια νέα βιβλιοθήκη \"\n\"Rust για Android.\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Εδώ δηλώνουμε μια εξάρτηση από δύο βιβλιοθήκες:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"'libgreeting', που ορίζουμε παρακάτω,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"«libtextwrap», το οποίο είναι ένα κιβώτιο που έχει ήδη πωληθεί \\\\[`εξωτερικά/\"\n\"σκουριά/κιβώτια/`\\\\]\\\\[κιβώτια\\\\].\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md src/android/aidl/implementation.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Δημιουργείτε, πιέζετε και τρέχετε το δυαδικό αρχείο όπως πριν:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Η [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) υποστηρίζεται στο Rust:\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Ο κώδικας σκουριάς μπορεί να καλέσει υπάρχοντες διακομιστές AIDL,\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Μπορείτε να δημιουργήσετε νέους διακομιστές AIDL στο Rust.\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"Διεπαφές AIDL\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Δηλώνετε το API της υπηρεσίας σας χρησιμοποιώντας μια διεπαφή AIDL:\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\"\n\"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n\"vendor partition.\"\nmsgstr \"\"\n\"Προσθέστε το \\\"vendor_available: true\\\" εάν το αρχείο AIDL σας \"\n\"χρησιμοποιείται από ένα δυαδικό αρχείο στον προμηθευτή χώρισμα.\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Υλοποίηση υπηρεσίας\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Μπορούμε τώρα να εφαρμόσουμε την υπηρεσία AIDL:\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Υλοποίηση υπηρεσίας\"\n\n#: src/android/aidl/implementation.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"Διακομιστής AIDL\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\"Τέλος, μπορούμε να δημιουργήσουμε έναν διακομιστή που εκθέτει την υπηρεσία:\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\"Μπορούμε τώρα να δημιουργήσουμε, να προωθήσουμε και να ξεκινήσουμε την \"\n\"υπηρεσία:\"\n\n#: src/android/aidl/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Σε άλλο τερματικό, ελέγξτε ότι η υπηρεσία εκτελείται:\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Μπορείτε επίσης να καλέσετε την υπηρεσία με «κλήση υπηρεσίας»:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"Πελάτης AIDL\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\"Τέλος, μπορούμε να δημιουργήσουμε έναν πελάτη Rust για τη νέα μας υπηρεσία.\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/client.md\nmsgid \"/// Connect to the BirthdayService.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Σημειώστε ότι ο πελάτης δεν εξαρτάται από το \\\"libbirthdayservice\\\".\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Δημιουργήστε, προωθήστε και εκτελέστε τον πελάτη στη συσκευή σας:\"\n\n#: src/android/aidl/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/changing.md\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Ας επεκτείνουμε το API με περισσότερη λειτουργικότητα: θέλουμε να \"\n\"επιτρέψουμε στους πελάτες να καθορίσουν α λίστα γραμμών για την κάρτα \"\n\"γενεθλίων:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Θα πρέπει να χρησιμοποιήσετε το κιβώτιο «log» για αυτόματη σύνδεση στο \"\n\"«logcat» (σε συσκευή) ή `stdout` (στον οικοδεσπότη):\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Δημιουργήστε, σπρώξτε και εκτελέστε το δυαδικό στη συσκευή σας:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Τα αρχεία καταγραφής εμφανίζονται στο `adb logcat`:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Το Rust έχει εξαιρετική υποστήριξη για διαλειτουργικότητα με άλλες γλώσσες. \"\n\"Αυτό σημαίνει ότι μπορείτε να:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Καλέστε τις λειτουργίες Rust από άλλες γλώσσες.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Κλήση συναρτήσεων γραμμένων σε άλλες γλώσσες από το Rust.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Όταν καλείτε συναρτήσεις σε μια ξένη γλώσσα, λέμε ότι χρησιμοποιείτε a _ξένη \"\n\"διεπαφή λειτουργίας_, επίσης γνωστή ως FFI.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Διαλειτουργικότητα με C\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Το Rust έχει πλήρη υποστήριξη για τη σύνδεση αρχείων αντικειμένων με μια \"\n\"σύμβαση κλήσης C. Ομοίως, μπορείτε να εξάγετε συναρτήσεις Rust και να τις \"\n\"καλέσετε από το C.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Μπορείτε να το κάνετε με το χέρι αν θέλετε:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Το είδαμε ήδη στο [Safe FFI Wrapper άσκηση](../../exercises/day-3/safe-ffi-\"\n\"wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Αυτό προϋποθέτει πλήρη γνώση της πλατφόρμας-στόχου. Δεν συνιστάται για \"\n\"παραγωγή.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"Θα εξετάσουμε καλύτερες επιλογές στη συνέχεια.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Χρήση Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Το εργαλείο [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) μπορεί να δημιουργήσει αυτόματα δεσμεύσεις από ένα αρχείο κεφαλίδας C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Πρώτα δημιουργήστε μια μικρή βιβλιοθήκη C:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Προσθέστε αυτό στο αρχείο σας «Android.bp»:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Δημιουργήστε ένα αρχείο κεφαλίδας περιτυλίγματος για τη βιβλιοθήκη (δεν \"\n\"απαιτείται αυστηρά σε αυτό παράδειγμα):\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Τώρα μπορείτε να δημιουργήσετε αυτόματα τις συνδέσεις:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Τέλος, μπορούμε να χρησιμοποιήσουμε τις συνδέσεις στο πρόγραμμα Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Τέλος, μπορούμε να εκτελέσουμε δοκιμές που δημιουργούνται αυτόματα για να \"\n\"διασφαλίσουμε ότι οι δεσμεύσεις λειτουργούν:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Calling Rust\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Η εξαγωγή λειτουργιών και τύπων Rust στο C είναι εύκολη:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Μπορούμε τώρα να το ονομάσουμε αυτό από ένα δυαδικό C:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"Το \\\"#\\\\[no_mangle\\\\]\\\" απενεργοποιεί τη συνήθη παραποίηση ονόματος του \"\n\"Rust, επομένως το σύμβολο που θα εξαχθεί θα είναι απλώς το όνομα του η \"\n\"λειτουργία. Μπορείτε επίσης να χρησιμοποιήσετε το `#[export_name = \"\n\"\\\"some_name\\\"]` για να καθορίσετε όποιο όνομα θέλετε.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"Το [CXX crate](https://cxx.rs/) καθιστά δυνατή την ασφαλή διαλειτουργικότητα \"\n\"μεταξύ του Rust και C++.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"Η συνολική προσέγγιση μοιάζει με αυτό:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"Γιατί Rust;\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Συναρτήσεις\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"Μη ασφαλής Rust\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Σκουριά από Παράδειγμα\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Παράδειγμα C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"Συμβολοσειρές\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"Συμβολοσειρές\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"«Vec».\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Δέκτης<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Κελλί<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Δέκτης<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Rust Binaries\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Διαλειτουργικότητα με Java\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Η Java μπορεί να φορτώσει κοινόχρηστα αντικείμενα μέσω του [Java Native \"\n\"Interface (JNI)](https://en.wikipedia.org/wiki/Java_Native_Interface). Το \"\n\"[`jni` crate](https://docs.rs/jni/) σας επιτρέπει να δημιουργήσετε μια \"\n\"συμβατή βιβλιοθήκη.\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Αρχικά, δημιουργούμε μια συνάρτηση Rust για εξαγωγή σε Java:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Τέλος, μπορούμε να καλέσουμε αυτή τη συνάρτηση από την Java:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Γειά σου Κόσμε!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\"Τέλος, μπορείτε να δημιουργήσετε, να συγχρονίσετε και να εκτελέσετε το \"\n\"δυαδικό:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Για την τελευταία άσκηση, θα δούμε ένα από τα έργα με τα οποία εργάζεστε. \"\n\"Αφήστε μας ομαδοποιήστε και κάντε αυτό μαζί. Μερικές προτάσεις:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Μετακινήστε μια συνάρτηση από το έργο σας στο Rust και καλέστε την.\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Δεν παρέχεται λύση εδώ, δεδομένου ότι αυτό είναι ανοιχτό: βασίζεται σε \"\n\"κάποιον μέσα η τάξη έχει ένα κομμάτι κώδικα που μπορείτε να μεταφέρετε στο \"\n\"Rust on the fly.\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust community typically uses `cargo` and libraries from [crates.io](https://\"\n\"crates.io/). Chromium is built using `gn` and `ninja` and a curated set of \"\n\"dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Ασκήσεις\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, by `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Κανόνες Κατασκευής\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Κανόνες Κατασκευής\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Παράδειγμα\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Σκουριά στην άσκηση\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Δείτε το [CXX tutorial](https://cxx.rs/tutorial.html) για ένα πλήρες \"\n\"παράδειγμα χρήσης αυτού.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Ενσωματωμένη υποστήριξη για δοκιμές.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Χειρισμός σφαλμάτων\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Διαλειτουργικότητα με C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Μερικές σημειώσεις:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"Βιβλιοθήκες\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Rust Οικοσύστημα\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Rust Οικοσύστημα\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"Συντομεύσεις πληκτρολογίου\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Δείτε το [Rust Reference](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Γενικευσεις\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Καλώς ήρθατε στην Comprehensive Rust 🦀\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"Συμβολοσειρές\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"Συντομεύσεις πληκτρολογίου\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"Σε άλλο τερματικό, ελέγξτε ότι η υπηρεσία εκτελείται:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"Αφού δείτε την άσκηση, μπορείτε να δείτε τη \\\\[λύση\\\\] που παρέχεται.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\"    // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Read compass data and log it to the serial port.\\n\"\n\"        // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"3η ημέρα Πρωινή άσκηση\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([επιστροφή στην άσκηση](for-loops.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"More traits\"\nmsgstr \"Χαρακτηριστικά\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"Χρήση Bindgen\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"Αφού δείτε την άσκηση, μπορείτε να δείτε τη \\\\[λύση\\\\] που παρέχεται.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Wait for 3 seconds.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Copyright 2023 Google LLC\\n\"\n\"//\\n\"\n\"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\"// you may not use this file except in compliance with the License.\\n\"\n\"// You may obtain a copy of the License at\\n\"\n\"//\\n\"\n\"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n\"//\\n\"\n\"// Unless required by applicable law or agreed to in writing, software\\n\"\n\"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\"// See the License for the specific language governing permissions and\\n\"\n\"// limitations under the License.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_exception_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"No pending interrupt\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"IRQ {intid:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: main\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: Flags\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Flags\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Framing error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Parity error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Break error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Overrun error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR: Registers\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Registers\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// ANCHOR: Uart\\n\"\n\"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// ANCHOR_END: Uart\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"CROSS_COMPILE\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-linux-gnu\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-none-elf\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"entry.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\\\"exceptions.S\\\"\"\nmsgstr \"Συναρτήσεις\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"idmap.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"empty\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".macro adr_l, reg:req, sym:req\\n\"\n\"\\tadrp \\\\reg, \\\\sym\\n\"\n\"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n\".endm\\n\"\n\"\\n\"\n\".macro mov_i, reg:req, imm:req\\n\"\n\"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n\".endm\\n\"\n\"\\n\"\n\".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n\".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n\".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n\"\\n\"\n\"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n\".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n\"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n\".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n\"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n\"fault instead. */\\n\"\n\".set .L_TCR_EPD1, 0x1 << 23\\n\"\n\"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n\".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are outer write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are inner write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n\"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n\".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n\".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n\"L_TCR_RGN_OWB\\n\"\n\".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n\"L_TCR_T0SZ_512\\n\"\n\"\\n\"\n\"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n\"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n\".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n\"/* Stage 1 data access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n\"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n\".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n\"/* Privileged Access Never is unchanged on taking an exception to EL1. */\\n\"\n\".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n\"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n\"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n\".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n\"28) | (0x1 << 29)\\n\"\n\".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n\"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n\".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n\"L_SCTLR_EL1_RES1\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic entry point for an image. It carries out the operations \"\n\"required to prepare the\\n\"\n\" * loaded image to be run. Specifically, it zeroes the bss section using \"\n\"registers x25 and above,\\n\"\n\" * prepares the stack, enables floating point, and sets up the exception \"\n\"vector. It preserves x0-x3\\n\"\n\" * for the Rust entry point, as these may contain boot parameters.\\n\"\n\" */\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"\\t/* Load and apply the memory management configuration, ready to enable MMU \"\n\"and caches. */\\n\"\n\"\\tadrp x30, idmap\\n\"\n\"\\tmsr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lmairval\\n\"\n\"\\tmsr mair_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Ltcrval\\n\"\n\"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n\"\\tbfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"\\tmsr tcr_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Ensure everything before this point has completed, then invalidate any \"\n\"potentially stale\\n\"\n\"\\t * local TLB entries before they start being used.\\n\"\n\"\\t */\\n\"\n\"\\tisb\\n\"\n\"\\ttlbi vmalle1\\n\"\n\"\\tic iallu\\n\"\n\"\\tdsb nsh\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this has completed.\\n\"\n\"\\t */\\n\"\n\"\\tmsr sctlr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Disable trapping floating point access in EL1. */\\n\"\n\"\\tmrs x30, cpacr_el1\\n\"\n\"\\torr x30, x30, #(0x3 << 20)\\n\"\n\"\\tmsr cpacr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Zero out the bss section. */\\n\"\n\"\\tadr_l x29, bss_begin\\n\"\n\"\\tadr_l x30, bss_end\\n\"\n\"0:\\tcmp x29, x30\\n\"\n\"\\tb.hs 1f\\n\"\n\"\\tstp xzr, xzr, [x29], #16\\n\"\n\"\\tb 0b\\n\"\n\"\\n\"\n\"1:\\t/* Prepare the stack. */\\n\"\n\"\\tadr_l x30, boot_stack_end\\n\"\n\"\\tmov sp, x30\\n\"\n\"\\n\"\n\"\\t/* Set up exception vector. */\\n\"\n\"\\tadr x30, vector_table_el1\\n\"\n\"\\tmsr vbar_el1, x30\\n\"\n\"\\n\"\n\"\\t/* Call into Rust code. */\\n\"\n\"\\tbl main\\n\"\n\"\\n\"\n\"\\t/* Loop forever waiting for interrupts. */\\n\"\n\"2:\\twfi\\n\"\n\"\\tb 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers with 18 \"\n\"instructions\\n\"\n\" * left.\\n\"\n\" *\\n\"\n\" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n\"respectively,\\n\"\n\" * which can be used as the first and second arguments of a subsequent \"\n\"call.\\n\"\n\" */\\n\"\n\".macro save_volatile_to_stack\\n\"\n\"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n\"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n\"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tstr x18, [sp, #8 * 18]\\n\"\n\"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\\n\"\n\"\\t * and still be able to unwind.\\n\"\n\"\\t */\\n\"\n\"\\tmrs x0, elr_el1\\n\"\n\"\\tmrs x1, spsr_el1\\n\"\n\"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Restores the volatile registers from the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers while still leaving \"\n\"18\\n\"\n\" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n\" * instructions to spare.\\n\"\n\" */\\n\"\n\".macro restore_volatile_from_stack\\n\"\n\"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n\"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tldr x18, [sp, #8 * 18]\\n\"\n\"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n\"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n\"\\tmsr elr_el1, x0\\n\"\n\"\\tmsr spsr_el1, x1\\n\"\n\"\\n\"\n\"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n\"\\tldp x0, x1, [sp], #8 * 24\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n\"doing\\n\"\n\" * the work, then switching back to SP0 before returning.\\n\"\n\" *\\n\"\n\" * Switching to SPx and calling the Rust handler takes 16 instructions. To\\n\"\n\" * restore and return we need an additional 16 instructions, so we can \"\n\"implement\\n\"\n\" * the whole handler within the allotted 32 instructions.\\n\"\n\" */\\n\"\n\".macro current_exception_sp0 handler:req\\n\"\n\"\\tmsr spsel, #1\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\tmsr spsel, #0\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n\"volatile\\n\"\n\" * registers, then returns.\\n\"\n\" *\\n\"\n\" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n\" * non-volatile registers.\\n\"\n\" *\\n\"\n\" * Saving state and jumping to the Rust handler takes 15 instructions, and\\n\"\n\" * restoring and returning also takes 15 instructions, so we can fit the \"\n\"whole\\n\"\n\" * handler in 30 instructions, under the limit of 32.\\n\"\n\" */\\n\"\n\".macro current_exception_spx handler:req\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n\".global vector_table_el1\\n\"\n\".balign 0x800\\n\"\n\"vector_table_el1:\\n\"\n\"sync_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_cur_spx:\\n\"\n\"\\tcurrent_exception_spx sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_spx:\\n\"\n\"\\tcurrent_exception_spx serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_64:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_64:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_64:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_64:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_32:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_32:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_32:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_32:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n\".set .L_TT_TYPE_PAGE,  0x3\\n\"\n\".set .L_TT_TYPE_TABLE, 0x3\\n\"\n\"\\n\"\n\"/* Access flag. */\\n\"\n\".set .L_TT_AF, 0x1 << 10\\n\"\n\"/* Not global. */\\n\"\n\".set .L_TT_NG, 0x1 << 11\\n\"\n\".set .L_TT_XN, 0x3 << 53\\n\"\n\"\\n\"\n\".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n\".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n\"shareable\\n\"\n\"\\n\"\n\".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n\".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n\"\\n\"\n\".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n\".global idmap\\n\"\n\".align 12\\n\"\n\"idmap:\\n\"\n\"\\t/* level 1 */\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n\"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n\"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```ld\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/*\\n\"\n\" * Code will start running at this symbol which is placed at the start of \"\n\"the\\n\"\n\" * image.\\n\"\n\" */\\n\"\n\"ENTRY(entry)\\n\"\n\"\\n\"\n\"MEMORY\\n\"\n\"{\\n\"\n\"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n\"}\\n\"\n\"\\n\"\n\"SECTIONS\\n\"\n\"{\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the code.\\n\"\n\"\\t */\\n\"\n\"\\t.init : ALIGN(4096) {\\n\"\n\"\\t\\ttext_begin = .;\\n\"\n\"\\t\\t*(.init.entry)\\n\"\n\"\\t\\t*(.init.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.text : {\\n\"\n\"\\t\\t*(.text.*)\\n\"\n\"\\t} >image\\n\"\n\"\\ttext_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together read-only data.\\n\"\n\"\\t */\\n\"\n\"\\t.rodata : ALIGN(4096) {\\n\"\n\"\\t\\trodata_begin = .;\\n\"\n\"\\t\\t*(.rodata.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.got : {\\n\"\n\"\\t\\t*(.got)\\n\"\n\"\\t} >image\\n\"\n\"\\trodata_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the read-write data including .bss at the end which\\n\"\n\"\\t * will be zero'd by the entry code.\\n\"\n\"\\t */\\n\"\n\"\\t.data : ALIGN(4096) {\\n\"\n\"\\t\\tdata_begin = .;\\n\"\n\"\\t\\t*(.data.*)\\n\"\n\"\\t\\t/*\\n\"\n\"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n\"\\t\\t * bytes long.\\n\"\n\"\\t\\t */\\n\"\n\"\\t\\t. = ALIGN(32);\\n\"\n\"\\t\\tdata_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n\"\\tbin_end = .;\\n\"\n\"\\n\"\n\"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n\"\\t.bss : ALIGN(16)  {\\n\"\n\"\\t\\tbss_begin = .;\\n\"\n\"\\t\\t*(.bss.*)\\n\"\n\"\\t\\t*(COMMON)\\n\"\n\"\\t\\t. = ALIGN(16);\\n\"\n\"\\t\\tbss_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n\"\\t\\tboot_stack_begin = .;\\n\"\n\"\\t\\t. += 40 * 4096;\\n\"\n\"\\t\\t. = ALIGN(4096);\\n\"\n\"\\t\\tboot_stack_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t. = ALIGN(4K);\\n\"\n\"\\tPROVIDE(dma_region = .);\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Remove unused sections from the image.\\n\"\n\"\\t */\\n\"\n\"\\t/DISCARD/ : {\\n\"\n\"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n\"\\t\\t*(.gnu.hash)\\n\"\n\"\\t\\t*(.hash)\\n\"\n\"\\t\\t*(.interp)\\n\"\n\"\\t\\t*(.eh_frame_hdr)\\n\"\n\"\\t\\t*(.eh_frame)\\n\"\n\"\\t\\t*(.note.gnu.build-id)\\n\"\n\"\\t}\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"# Copyright 2023 Google LLC\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"$(shell uname -s)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"aarch64-linux-gnu\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"stdio -display none -kernel $< -s\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"cargo clean\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rust χωρίς λειτουργικό σύστημα Απόγευμα\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([επιστροφή στην άσκηση](luhn.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Καλώς ήρθατε στην Comprehensive Rust 🦀\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Το Rust έχει πλήρη υποστήριξη για ταυτόχρονη χρήση νημάτων λειτουργικού \"\n\"συστήματος με mutexes και καναλιών.\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Το σύστημα τύπου Rust παίζει σημαντικό ρόλο στη δημιουργία πολλών σφαλμάτων \"\n\"συγχρονισμού μεταγλώττιση χρονικών σφαλμάτων. Αυτό αναφέρεται συχνά ως \"\n\"_ατρόμητος συγχρονισμός_ αφού εσείς μπορεί να βασιστεί στον μεταγλωττιστή \"\n\"για να διασφαλίσει την ορθότητα κατά το χρόνο εκτέλεσης.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Τα νήματα σκουριάς λειτουργούν παρόμοια με τα νήματα σε άλλες γλώσσες:\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"Τα νήματα είναι όλα νήματα δαίμονα, το κύριο νήμα δεν τα περιμένει.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Οι πανικοί των νημάτων είναι ανεξάρτητοι ο ένας από τον άλλο.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Οι πανικοί μπορούν να μεταφέρουν ένα ωφέλιμο φορτίο, το οποίο μπορεί να \"\n\"αποσυμπιεστεί με το «downcast_ref».\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Notice that the thread is stopped before it reaches 10 --- the main thread \"\n\"is not waiting.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Trigger a panic in the thread, notice how this doesn't affect `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"panic payload. This is a good time to talk about [`Any`](https://doc.rust-\"\n\"lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Τα κανονικά νήματα δεν μπορούν να δανειστούν από το περιβάλλον τους:\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Ωστόσο, μπορείτε να χρησιμοποιήσετε ένα [νήμα εμβέλειας](https://doc.rust-\"\n\"lang.org/std/thread/fn.scope.html) για αυτό:\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\\\\<λεπτομέρειες>\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Ο λόγος για αυτό είναι ότι όταν ολοκληρωθεί η συνάρτηση `thread::scope`, όλα \"\n\"τα νήματα είναι εγγυημένα ότι θα ενωθούν, ώστε να μπορούν να επιστρέψουν τα \"\n\"δεδομένα που έχουν δανειστεί.\\n\"\n\"\\n\"\n\"Ισχύουν οι κανονικοί κανόνες δανεισμού Rust: μπορείτε είτε να δανειστείτε \"\n\"μεταλλάξιμα με ένα νήμα ή αμετάβλητα με οποιονδήποτε αριθμό νημάτων.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Τα κανάλια Rust έχουν δύο μέρη: ένα \\\"Αποστολέας\\n\"\n\"\\n\"\n\"\\\" και ένα \\\"Δέκτης\\n\"\n\"\\n\"\n\"\\\". Τα δύο μέρη συνδέονται μέσω του καναλιού, αλλά βλέπετε μόνο τα τελικά \"\n\"σημεία.\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"Το «mpsc» σημαίνει Multi-Producer, Single-Consumer. Το \\\"Sender\\\" και το \"\n\"\\\"SyncSender\\\" υλοποιούν το \\\"Clone\\\" (έτσι μπορείτε να δημιουργήσετε \"\n\"πολλούς παραγωγούς) αλλά ο «Δέκτης» όχι.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"Το \\\"send()\\\" και το \\\"recv()\\\" επιστρέφουν \\\"Αποτέλεσμα\\\". Εάν επιστρέψουν \"\n\"\\\"Err\\\", σημαίνει το αντίστοιχο \\\"Αποστολέας\\\" ή Ο \\\"δέκτης\\\" πέφτει και το \"\n\"κανάλι είναι κλειστό.\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Λαμβάνετε ένα απεριόριστο και ασύγχρονο κανάλι με `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"Τα περιορισμένα και τα σύγχρονα κανάλια κάνουν το \\\"send\\\" να μπλοκάρει το \"\n\"τρέχον νήμα:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Πώς γνωρίζει η Rust ότι απαγορεύει την κοινόχρηστη πρόσβαση σε όλα τα \"\n\"νήματα; Η απάντηση είναι σε δύο χαρακτηριστικά:\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[\\\"Αποστολή\\\"](https://doc.rust-lang.org/std/marker/trait.Send.html): ένας \"\n\"τύπος \\\"T\\\" είναι \\\"Αποστολή\\\" εάν είναι ασφαλές να μετακινήσετε ένα \\\"T\\\" \"\n\"σε ένα νήμα Όριο.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[\\\"Συγχρονισμός\\\"](https://doc.rust-lang.org/std/marker/trait.Sync.html): \"\n\"ένας τύπος \\\"T\\\" είναι \\\"Συγχρονισμός\\\" εάν είναι ασφαλές να μετακινήσετε \"\n\"ένα \\\"&T\\\" σε ένα νήμα Όριο.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"Η \\\"Αποστολή\\\" και η \\\"Συγχρονισμός\\\" είναι [μη ασφαλή χαρακτηριστικά](../\"\n\"unsafe/unsafe-traits.md). Ο μεταγλωττιστής θα τα παράγει αυτόματα για τους \"\n\"τύπους σας εφόσον περιέχουν μόνο τύπους «Αποστολή» και «Συγχρονισμός». \"\n\"Μπορείτε επίσης να τα εφαρμόσετε χειροκίνητα όταν το κάνετε να ξέρεις ότι \"\n\"ισχύει.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Κάποιος μπορεί να σκεφτεί αυτά τα χαρακτηριστικά ως δείκτες ότι ο τύπος έχει \"\n\"ορισμένες ιδιότητες ασφαλείας νήματος.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"Μπορούν να χρησιμοποιηθούν στους γενικούς περιορισμούς ως φυσιολογικά \"\n\"χαρακτηριστικά.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Ένας τύπος `T` είναι [`Αποστολή`](https://doc.rust-lang.org/std/marker/trait.\"\n\"Send.html) εάν είναι ασφαλές να μετακινήσετε μια τιμή `T` σε άλλο νήμα.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"Το αποτέλεσμα της μετακίνησης ιδιοκτησίας σε άλλο νήμα είναι ότι οι \"\n\"_destructors_ θα εκτελεστούν σε αυτό το νήμα. Το ερώτημα λοιπόν είναι πότε \"\n\"μπορείτε να εκχωρήσετε μια τιμή σε ένα νήμα και να το διαθέσει σε άλλο.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Ένας τύπος `T` είναι [`Συγχρονισμός`](https://doc.rust-lang.org/std/marker/\"\n\"trait.Sync.html) εάν είναι ασφαλής η πρόσβαση σε μια τιμή `T` από πολλαπλές \"\n\"νήματα ταυτόχρονα.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Πιο συγκεκριμένα, ο ορισμός είναι:\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\"Το \\\"T\\\" είναι \\\"Συγχρονισμός\\\" εάν και μόνο εάν το \\\"&T\\\" είναι \"\n\"\\\"Αποστολή\\\".\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Αυτή η δήλωση είναι ουσιαστικά ένας συνοπτικός τρόπος για να πούμε ότι εάν \"\n\"ένας τύπος είναι ασφαλής ως προς το νήμα για κοινόχρηστη χρήση, είναι επίσης \"\n\"ασφαλές για το νήμα να μεταβιβάζονται οι αναφορές του στα νήματα.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Αυτό συμβαίνει επειδή εάν ένας τύπος είναι Sync σημαίνει ότι μπορεί να \"\n\"κοινοποιηθεί σε πολλά νήματα χωρίς τον κίνδυνο φυλών δεδομένων ή άλλων \"\n\"προβλημάτων συγχρονισμού, επομένως είναι ασφαλές να τον μετακινήσετε σε άλλο \"\n\"νήμα. Μια αναφορά στον τύπο είναι επίσης ασφαλής να μετακινηθεί σε άλλο \"\n\"νήμα, επειδή τα δεδομένα που παραπέμπει είναι προσβάσιμα από οποιοδήποτε \"\n\"νήμα με ασφάλεια.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"«Αποστολή + Συγχρονισμός».\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"Οι περισσότεροι τύποι που συναντάτε είναι «Αποστολή + Συγχρονισμός»:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Οι γενικοί τύποι είναι συνήθως «Αποστολή + Συγχρονισμός» όταν οι παράμετροι \"\n\"τύπου είναι «Αποστολή + Συγχρονισμός».\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Αποστολή + !Συγχρονισμός`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Αυτοί οι τύποι μπορούν να μετακινηθούν σε άλλα νήματα, αλλά δεν είναι \"\n\"ασφαλείς για νήματα. Τυπικά λόγω της εσωτερικής μεταβλητότητας:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"`mpsc::Αποστολέας<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Δέκτης<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Κελλί<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Αποστολή + Συγχρονισμός`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Αυτοί οι τύποι είναι ασφαλείς για νήμα, αλλά δεν μπορούν να μετακινηθούν σε \"\n\"άλλο νήμα:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: Χρησιμοποιεί πρωτόγονα επιπέδου λειτουργικού συστήματος που \"\n\"πρέπει να κατανεμηθούν στο νήμα που τα δημιούργησε.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Αποστολή + !Συγχρονισμός`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Αυτοί οι τύποι δεν είναι ασφαλείς για νήμα και δεν μπορούν να μετακινηθούν \"\n\"σε άλλα νήματα:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"`Rc<T>`: κάθε «Rc\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"» έχει μια αναφορά σε ένα «RcBox\\n\"\n\"\\n\"\n\"», το οποίο περιέχει ένα μη ατομική μέτρηση αναφοράς.\\n\"\n\"\\n\"\n\"`*const T`, `*mut T`: Το Rust υποθέτει ότι οι ακατέργαστοι δείκτες μπορεί να \"\n\"έχουν ειδικούς ζητήματα ταυτόχρονης ύπαρξης.\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\"Το Rust χρησιμοποιεί το σύστημα τύπων για να επιβάλει το συγχρονισμό των \"\n\"κοινόχρηστων δεδομένων. Αυτό είναι γίνεται κυρίως μέσω δύο τύπων:\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), η ατομική \"\n\"αναφορά μετράται ως \\\"T\\\": χειρίζεται την κοινή χρήση μεταξύ νημάτων και \"\n\"φροντίζει να κατανείμει το \\\"T\\\" όταν απορριφθεί η τελευταία αναφορά,\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n\"εξασφαλίζει αμοιβαία αποκλειστική πρόσβαση στην τιμή \\\"T\\\".\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"Το [`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) επιτρέπει \"\n\"την κοινόχρηστη πρόσβαση μόνο για ανάγνωση μέσω της μεθόδου \\\"clone\\\" του:\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"Το \\\"Arc\\\" σημαίνει \\\"Atomic Reference Counted\\\", μια ασφαλής έκδοση νημάτων \"\n\"του \\\"Rc\\\" που χρησιμοποιεί ατομική επιχειρήσεις.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"Το \\\"Arc\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"\\\" υλοποιεί το \\\"Clone\\\" είτε το κάνει το \\\"T\\\" είτε όχι. Εφαρμόζει \"\n\"«Αποστολή» και «Συγχρονισμός» αν «T». τα εφαρμόζει και τα δύο.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Το \\\"Arc::clone()\\\" έχει το κόστος των ατομικών λειτουργιών που εκτελούνται, \"\n\"αλλά μετά από αυτό η χρήση του Το \\\"T\\\" είναι δωρεάν.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\"Προσοχή στους κύκλους αναφοράς, το «Arc» δεν χρησιμοποιεί συλλέκτη \"\n\"σκουπιδιών για να τους εντοπίσει.\\n\"\n\"\\n\"\n\"Το `std::sync::Weak` μπορεί να βοηθήσει.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) \"\n\"διασφαλίζει την αμοιβαία εξαίρεση _και_ επιτρέπει τη μεταβλητή πρόσβαση στο \"\n\"\\\"T\\\" πίσω από μια διεπαφή μόνο για ανάγνωση:\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Παρατηρήστε πώς έχουμε μια κουβέρτα [`impl<T: Send> Sync for Mutex<T>`]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-for-\"\n\"Mutex%3CT%3E) εκτέλεση.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\\\\<λεπτομέρειες>\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Το \\\"Mutex\\\" στο Rust μοιάζει με μια συλλογή με ένα μόνο στοιχείο - τα \"\n\"προστατευμένα δεδομένα.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Δεν είναι δυνατό να ξεχάσετε να αποκτήσετε το mutex πριν αποκτήσετε πρόσβαση \"\n\"στα προστατευμένα δεδομένα.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"Μπορείτε να πάρετε ένα «&mut T» από ένα «&Mutex\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\"» παίρνοντας την κλειδαριά. Το «MutexGuard» διασφαλίζει ότι το Το \\\"&mut T\\\" \"\n\"δεν ξεπερνά την κλειδαριά που κρατιέται.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Το \\\"Mutex\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"\\\" υλοποιεί και το \\\"Send\\\" και το \\\"Sync\\\" εάν το \\\"T\\\" υλοποιεί το \"\n\"\\\"Send\\\".\\n\"\n\"\\n\"\n\"Ένα αντίστοιχο κλείδωμα ανάγνωσης-εγγραφής - «RwLock».\\n\"\n\"\\n\"\n\"Γιατί το «lock()» επιστρέφει ένα «Αποτέλεσμα»;\\n\"\n\"\\n\"\n\"Εάν το νήμα που συγκρατούσε το \\\"Mutex\\\" πανικοβλήθηκε, το \\\"Mutex\\\" γίνεται \"\n\"\\\"δηλητηριασμένο\\\" για να σηματοδοτήσει ότι τα δεδομένα που προστατεύει \"\n\"ενδέχεται να είναι σε ασυνεπή κατάσταση. Κλήση «lock()» σε ένα \"\n\"δηλητηριασμένο mutex αποτυγχάνει με ένα [`PoisonError`](https://doc.rust-\"\n\"lang.org/std/sync/struct.PoisonError.html). Μπορείτε να καλέσετε το \"\n\"«into_inner()» στο σφάλμα για να ανακτήσετε τα δεδομένα Ανεξάρτητα.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Ας δούμε τα \\\"Arc\\\" και \\\"Mutex\\\" σε δράση:\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"Το \\\"v\\\" είναι τυλιγμένο και σε \\\"Arc\\\" και \\\"Mutex\\\", επειδή οι ανησυχίες \"\n\"τους είναι ορθογώνιες.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Το τύλιγμα ενός \\\"Mutex\\\" σε ένα \\\"Arc\\\" είναι ένα συνηθισμένο μοτίβο για \"\n\"κοινή χρήση μεταβλητής κατάστασης μεταξύ των νημάτων.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"Το `v: Το Arc<_>` πρέπει να κλωνοποιηθεί ως `v2` για να μπορέσει να \"\n\"μετακινηθεί σε άλλο νήμα. Η σημείωση \\\"move\\\" προστέθηκε στην υπογραφή λάμδα.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Τα μπλοκ εισάγονται για να περιορίσουν όσο το δυνατόν περισσότερο το πεδίο \"\n\"εφαρμογής του \\\"LockGuard\\\".\\n\"\n\"\\n\"\n\"Πρέπει ακόμα να αποκτήσουμε το «Mutex» για να εκτυπώσουμε το «Vec» μας.\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"Ας εξασκήσουμε τις νέες μας δεξιότητες συγχρονισμού με\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"\"\n\"Έλεγχος συνδέσμων πολλαπλών νημάτων: ένα μεγαλύτερο έργο στο οποίο θα \"\n\"χρησιμοποιήσετε το Cargo κατεβάστε τις εξαρτήσεις και, στη συνέχεια, ελέγξτε \"\n\"τους συνδέσμους παράλληλα.\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Το πρόβλημα των φιλοσόφων τραπεζαρίας είναι ένα κλασικό πρόβλημα ταυτόχρονα:\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Πέντε φιλόσοφοι δειπνούν μαζί στο ίδιο τραπέζι. Κάθε φιλόσοφος έχει το δικό \"\n\"του δική σου θέση στο τραπέζι. Ανάμεσα σε κάθε πιάτο υπάρχει ένα πιρούνι. Το \"\n\"πιάτο που σερβίρεται είναι ένα είδος σπαγγέτι που τρώγεται με δύο πιρούνια. \"\n\"Κάθε φιλόσοφος μπορεί μόνο εναλλάξ σκεφτείτε και τρώτε. Επιπλέον, ένας \"\n\"φιλόσοφος μπορεί να φάει μόνο τους μακαρόνια όταν έχουν και αριστερό και \"\n\"δεξί πιρούνι. Έτσι θα μόνο δύο πιρούνια να είναι διαθέσιμοι όταν οι δύο \"\n\"κοντινότεροι γείτονές τους σκέφτονται και δεν τρώνε. Μετά ένας μεμονωμένος \"\n\"φιλόσοφος τελειώνει το φαγητό, θα βάλει κάτω και τα δύο πιρούνια.\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Θα χρειαστείτε μια τοπική [Εγκατάσταση φορτίου](../../cargo/running-locally.\"\n\"md) για αυτή η άσκηση. Αντιγράψτε τον παρακάτω κώδικα στο αρχείο \\\\`src/main.\"\n\"rs, συμπληρώστε τα κενά, και ελέγξτε ότι το «cargo run» δεν είναι αδιέξοδο:\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Ας χρησιμοποιήσουμε τις νέες γνώσεις μας για να δημιουργήσουμε έναν έλεγχο \"\n\"συνδέσμων πολλαπλών νημάτων. Θα έπρεπε ξεκινήστε από μια ιστοσελίδα και \"\n\"ελέγξτε ότι οι σύνδεσμοι στη σελίδα είναι έγκυροι. Θα έπρεπε ελέγξτε \"\n\"αναδρομικά άλλες σελίδες στον ίδιο τομέα και συνεχίστε να το κάνετε αυτό \"\n\"μέχρι να τελειώσει οι σελίδες έχουν επικυρωθεί.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Για αυτό, θα χρειαστείτε ένα πρόγραμμα-πελάτη HTTP όπως το \"\n\"\\\\[`reqwest`\\\\]\\\\[1\\\\]. Δημιούργησε ένα νέο Έργο φορτίου και το «ζήτησε» ως \"\n\"εξάρτηση με:\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Εάν η «προσθήκη φορτίου» αποτύχει με «σφάλμα: δεν υπάρχει τέτοια υποεντολή», \"\n\"τότε επεξεργαστείτε το Αρχείο «Cargo.toml» με το χέρι. Προσθέστε τις \"\n\"εξαρτήσεις που αναφέρονται παρακάτω.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\"Θα χρειαστείτε επίσης έναν τρόπο να βρείτε συνδέσμους. Μπορούμε να \"\n\"χρησιμοποιήσουμε το \\\\[`scraper`\\\\]\\\\[2\\\\] για αυτό:\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\"Τέλος, θα χρειαστούμε κάποιο τρόπο χειρισμού των σφαλμάτων. Χρησιμοποιούμε \"\n\"\\\\[`αυτό το σφάλμα`\\\\]\\\\[3\\\\] για ότι:\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Οι κλήσεις \\\"cargo add\\\" θα ενημερώσουν το αρχείο \\\"Cargo.toml\\\" ώστε να \"\n\"έχει την εξής μορφή:\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Τώρα μπορείτε να κάνετε λήψη της αρχικής σελίδας. Δοκιμάστε με ένα μικρό \"\n\"site όπως π.χ `https://www.google.org/`.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Το αρχείο `src/main.rs` θα πρέπει να μοιάζει κάπως έτσι:\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Εκτελέστε τον κώδικα στο `src/main.rs` με\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Χρησιμοποιήστε νήματα για να ελέγξετε τους συνδέσμους παράλληλα: στείλτε τις \"\n\"διευθύνσεις URL που θα ελεγχθούν στο a κανάλι και αφήστε μερικά νήματα να \"\n\"ελέγξουν τις διευθύνσεις URL παράλληλα.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Επεκτείνετε αυτό για να εξαγάγετε αναδρομικά συνδέσμους από όλες τις σελίδες \"\n\"του τομέας `www.google.org`. Βάλτε ένα ανώτατο όριο 100 σελίδων περίπου έτσι \"\n\"ώστε να μην καταλήξετε να αποκλειστείτε από τον ιστότοπο.\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"3η ημέρα Πρωινή άσκηση\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([επιστροφή στην άσκηση](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Έλεγχος συνδέσμων πολλαπλών νημάτων\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([επιστροφή στην άσκηση](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md\n#, fuzzy\nmsgid \"Async Rust\"\nmsgstr \"Γιατί Rust;\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"What is the return type of an async call?\"\nmsgstr \"Ποιος είναι ο τύπος της λέξης σε κάθε βρόχο;\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\n#, fuzzy\nmsgid \"Futures Control Flow\"\nmsgstr \"Ροή ελέγχου\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are not yet supported in the stable channel ([An \"\n\"experimental feature exists in nightly and should be stabilized in the mid \"\n\"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n\"nightly.html))\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"provides a workaround through a macro:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Δείπνο με φιλόσοφους\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Θα χρειαστείτε μια τοπική [Εγκατάσταση φορτίου](../../cargo/running-locally.\"\n\"md) για αυτή η άσκηση. Αντιγράψτε τον παρακάτω κώδικα στο αρχείο \\\\`src/main.\"\n\"rs, συμπληρώστε τα κενά, και ελέγξτε ότι το «cargo run» δεν είναι αδιέξοδο:\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Two binaries\"\nmsgstr \"Rust Binaries\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"Διεξαγωγή του μαθήματος\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"1η ημέρα Απογευματινές Ασκήσεις\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([επιστροφή στην άσκηση](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// Add a delay before picking the second fork to allow the execution\\n\"\n\"        // to transfer to another task\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"            // somewhere. This will swap the forks without deinitializing\\n\"\n\"            // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([επιστροφή στην άσκηση](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Σας ευχαριστούμε που πήρατε το Comprehensive Rust 🦀!_ Ελπίζουμε να σας \"\n\"άρεσε και να ήταν χρήσιμο.\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Διασκεδάσαμε πολύ όταν συνδυάσαμε το μάθημα. Το μάθημα δεν είναι τέλειο, \"\n\"οπότε αν εντοπίσατε λάθη ή έχετε ιδέες για βελτιώσεις, παρακαλούμε μπείτε \"\n\"[επικοινωνήστε μαζί μας στο GitHub](https://github.com/google/comprehensive-\"\n\"rust/discussions). Θα αγαπούσαμε να ακούσω από σένα.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 3 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Other Rust Resources\"\nmsgstr \"Άλλοι πόροι σκουριάς\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Η κοινότητα του Rust έχει δημιουργήσει έναν πλούτο υψηλής ποιότητας και \"\n\"δωρεάν πόρων Σε σύνδεση.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Official Documentation\"\nmsgstr \"Επίσημη Τεκμηρίωση\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Το έργο Rust φιλοξενεί πολλούς πόρους. Αυτά καλύπτουν το Rust γενικά:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): το \"\n\"κανονικό δωρεάν βιβλίο για το Rust. Καλύπτει αναλυτικά τη γλώσσα και \"\n\"περιλαμβάνει α λίγα έργα για να κατασκευάσουν οι άνθρωποι.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): καλύπτει τη \"\n\"σκουριά σύνταξη μέσω μιας σειράς παραδειγμάτων που παρουσιάζουν διαφορετικές \"\n\"κατασκευές. Ωρες ωρες περιλαμβάνει μικρές ασκήσεις όπου σας ζητείται να \"\n\"αναπτύξετε τον κώδικα στο παραδείγματα.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): πλήρης τεκμηρίωση \"\n\"του η τυπική βιβλιοθήκη για το Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): ένα ημιτελές \"\n\"βιβλίο που περιγράφει το μοντέλο της γραμματικής και της μνήμης Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\"Περισσότεροι εξειδικευμένοι οδηγοί που φιλοξενούνται στον επίσημο ιστότοπο \"\n\"της Rust:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): καλύπτει το μη \"\n\"ασφαλές Rust, συμπεριλαμβανομένης της εργασίας με ακατέργαστους δείκτες και \"\n\"της διεπαφής με άλλες γλώσσες (FFI).\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"καλύπτει το νέο μοντέλο ασύγχρονου προγραμματισμού που εισήχθη μετά το Το \"\n\"Rust Book γράφτηκε.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"εισαγωγή στη χρήση του Rust σε ενσωματωμένες συσκευές χωρίς λειτουργικό \"\n\"σύστημα.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Ανεπίσημο Εκπαιδευτικό Υλικό\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Μια μικρή επιλογή άλλων οδηγών και οδηγών για το Rust:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): καλύπτει το \"\n\"Rust από την οπτική γωνία των προγραμματιστών χαμηλού επιπέδου C.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Προγραμματιστές](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): καλύπτει το Rust από η προοπτική των προγραμματιστών που \"\n\"γράφουν υλικολογισμικό σε C.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust για επαγγελματίες](https://overexact.com/rust-for-professionals/): \"\n\"καλύπτει τη σύνταξη του Rust χρησιμοποιώντας συγκρίσεις δίπλα-δίπλα με άλλες \"\n\"γλώσσες όπως C, C++, Java, JavaScript και Python.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ ασκήσεις για \"\n\"βοήθεια μαθαίνεις Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Σιδήρου Διδασκαλία Υλικό](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): α σειρά μικρών παρουσιάσεων που καλύπτουν τόσο βασικό \"\n\"όσο και προχωρημένο μέρος του Γλώσσα σκουριάς. Άλλα θέματα όπως το \"\n\"WebAssembly και το async/wait είναι επίσης σκεπαστός.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) και [Κάντε τα πρώτα σας βήματα με Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): δύο Οδηγοί Rust που \"\n\"απευθύνονται σε νέους προγραμματιστές. Το πρώτο είναι ένα σύνολο 35 βίντεο \"\n\"και το Το δεύτερο είναι ένα σύνολο 11 ενοτήτων που καλύπτει τη σύνταξη του \"\n\"Rust και τις βασικές δομές.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Δείτε το [Little Book of Rust Books](https://lborb.github.io/book/) για \"\n\"ακόμα περισσότερα βιβλία Rust.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Το υλικό εδώ βασίζεται στις πολλές σπουδαίες πηγές τεκμηρίωσης του Rust. \"\n\"Δείτε τη σελίδα στο [other resources](other-resources.md) για μια πλήρη \"\n\"λίστα χρήσιμων πόροι.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Το υλικό του Comprehensive Rust έχει άδεια χρήσης σύμφωνα με τους όρους του \"\n\"Apache 2.0 άδεια, ανατρέξτε στην ενότητα [`ΑΔΕΙΑ`](../LICENSE) για \"\n\"λεπτομέρειες.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust by Example\"\nmsgstr \"Σκουριά από Παράδειγμα\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Ορισμένα παραδείγματα και ασκήσεις έχουν αντιγραφεί και προσαρμοστεί από το \"\n\"[Rust by Παράδειγμα](https://doc.rust-lang.org/rust-by-example/). Παρακαλώ \"\n\"δείτε το Κατάλογος `third_party/rust-by-example/` για λεπτομέρειες, \"\n\"συμπεριλαμβανομένης της άδειας χρήσης όροι.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"Σκουριά στην άσκηση\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Ορισμένες ασκήσεις έχουν αντιγραφεί και προσαρμοστεί από το [Rust on Άσκηση]\"\n\"(https://exercism.org/tracks/rust). Παρακαλώ δείτε το Κατάλογος `third_party/\"\n\"rust-on-exercism/` για λεπτομέρειες, συμπεριλαμβανομένης της άδειας όροι.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Η ενότητα [Διαλειτουργικότητα με C++](android/interoperability/cpp.md) \"\n\"χρησιμοποιεί ένα εικόνα από [CXX](https://cxx.rs/). Δείτε τον κατάλογο \"\n\"`third_party/cxx/` για λεπτομέρειες, συμπεριλαμβανομένων των όρων άδειας.\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Μικρό Παράδειγμα\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Γιατί Rust;\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Εγγυήσεις Χρόνου Μεταγλώττισης\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Εγγυήσεις χρόνου εκτέλεσης\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Σύγχρονα Χαρακτηριστικά\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Βασική Σύνταξη\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String vs str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Υπερφόρτωση\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Πίνακες και βρόχοι for\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"Eκφράσεις if\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"Εκφράσεις for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"Εκφράσεις while\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"Εκφράσεις loop\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Περιεχόμενο Παραλλαγών\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Μέγεθος Απαριθμήσεων\"\n\n#, fuzzy\n#~ msgid \"Novel Control Flow\"\n#~ msgstr \"Ροή ελέγχου\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"Εκφράσεις if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"Εκφράσεις while let\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"Εκφράσεις match\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"Αποδόμηση Δομών\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Αποδόμηση Πινάκων\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Φύλακες Αντιστοιχίσεων\"\n\n#, fuzzy\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Αντιστοίχιση προτύπων\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Στοίβα και Σωρός\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Μνήμη στοίβας\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Χειροκίνητη διαχείριση μνήμης\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Διαχείριση μνήμης βάσει εμβέλιας\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Συλλογή σκουπιδιών\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Διαχείριση μνήμης στη Rust\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Σύγκριση\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Μετακινημένες συμβολοσειρές στη Rust\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Μετακινήσεις σε κλήσεις συναρτήσεων\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Αντιγραφή και κλωνοποίηση\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Κοινόχρηστα και μοναδικά δάνεια\"\n\n#, fuzzy\n#~ msgid \"Storing Books\"\n#~ msgstr \"Συμβολοσειρές\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iterators και ιδιοκτησία\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Συντομευμένο συντακτικό πεδίων\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"Δέκτης Μεθόδων\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option και Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Αναδρομικοί τύποι δεδομένων\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Συμβολοσειρές και Επαναλήπτες\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Γενικές Μέθοδοι\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Μονομορφοποίηση\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Προ-υλοποιημένες μέθοδοι\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"impl Trait\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Σημαντικά Χαρακτηριστικά\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From και Into\"\n\n#, fuzzy\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Add, Mul, ...\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"Μια απλή βιβλιοθήκη GUI\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Σημεία και Πολύγωνα\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Πιάνοντας ξετυλίγματα στοίβας\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Δομημένη διαχείριση σφαλμάτων\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Διάδοση σφαλμάτων με ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Μετατροπή τύπων σφαλμάτων\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Εξαγωγή απαριθμήσεων σφαλμάτων\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Προσθήκη περιεχομένου στα σφάλματα\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send και Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"1η ημέρα Πρωί\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"1η μέρα Απόγευμα\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"2η ημέρα Πρωί\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"2η μέρα Απόγευμα\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"3η ημέρα Πρωί\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"3η μέρα Απόγευμα\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Rust χωρίς λειτουργικό σύστημα: Πρωί\"\n\n#, fuzzy\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Συγχρονισμός\"\n\n#, fuzzy\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Συγχρονισμός\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"Το μάθημα έχει γρήγορο ρυθμό και καλύπτει:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"Ημέρα 2: Σύνθετοι τύποι δεδομένων, ταίριασμα προτύπων, τυπική βιβλιοθήκη.\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Ημέρα 3: Χαρακτηριστικά και γενικοί τύποι, χειρισμός σφαλμάτων, τεστ, μη \"\n#~ \"ασφαλής Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Αυτό θα επιτρέψει στον \\\\[rust-analyzer\\\\]\\\\[1\\\\] να μεταβεί στους \"\n#~ \"ορισμούς. Προτείνουμε τη χρήση [VS Code](https://code.visualstudio.com/) \"\n#~ \"για να επεξεργαστείτε τον κώδικα (αλλά κάθε πρόγραμμα επεξεργασίας \"\n#~ \"συμβατό με LSP λειτουργεί).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Σε μερικούς ανθρώπους αρέσει επίσης να χρησιμοποιούν την οικογένεια IDE \"\n#~ \"[JetBrains](https://www.jetbrains.com/clion/), που κάνουν τη δική τους \"\n#~ \"ανάλυση αλλά έχουν τις δικές τους ανταλλαγές. Εάν τα προτιμάτε, μπορείτε \"\n#~ \"να εγκαταστήσετε το [Rust Plugin](https://www.jetbrains.com/rust/). \"\n#~ \"Λάβετε υπόψη ότι από τον Ιανουάριο του 2023 ο εντοπισμός σφαλμάτων \"\n#~ \"λειτουργεί μόνο στην έκδοση CLion της σουίτας JetBrains IDEA.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"Η ιδέα για την πρώτη μέρα είναι να δείξουμε _αρκετά_ Rust για να μπορέσει \"\n#~ \"να μιλήσει για το περίφημο δάνειο πούλι. Ο τρόπος με τον οποίο η Rust \"\n#~ \"χειρίζεται τη μνήμη είναι ένα σημαντικό χαρακτηριστικό και αυτό θα πρέπει \"\n#~ \"να το δείξουμε αμέσως στους μαθητές.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Εάν το διδάσκετε σε μια τάξη, αυτό είναι ένα καλό μέρος για να το δείτε \"\n#~ \"πρόγραμμα. Προτείνουμε να χωρίσετε την ημέρα σε δύο μέρη (ακολουθώντας \"\n#~ \"τις διαφάνειες):\"\n\n#, fuzzy\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Πρωί: 9:00 έως 12:00,\"\n\n#, fuzzy\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Απόγευμα: 13:00 έως 16:00.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Μπορείτε φυσικά να το προσαρμόσετε όπως απαιτείται. Φροντίστε να \"\n#~ \"συμπεριλάβετε διαλείμματα, προτείνουμε ένα διάλειμμα κάθε ώρα!\"\n\n#, fuzzy\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Ακολουθεί ένα μικρό παράδειγμα προγράμματος στο Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Ο κώδικας υλοποιεί την εικασία Collatz: πιστεύεται ότι ο βρόχος θα πάντα \"\n#~ \"τελειώνει, αλλά αυτό δεν έχει ακόμη αποδειχθεί. Επεξεργαστείτε τον κώδικα \"\n#~ \"και παίξτε με διαφορετικά εισροές.\"\n\n#, fuzzy\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Συγκεντρώστε την ασφάλεια της μνήμης χρόνου.\"\n\n#, fuzzy\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Έλλειψη απροσδιόριστης συμπεριφοράς χρόνου εκτέλεσης.\"\n\n#, fuzzy\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Χαρακτηριστικά σύγχρονης γλώσσας.\"\n\n#, fuzzy\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Διαχείριση στατικής μνήμης κατά το χρόνο μεταγλώττισης:\"\n\n#, fuzzy\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Δεν υπάρχουν διαρροές μνήμης (_κυρίως_, βλέπε σημειώσεις).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"Είναι δυνατό να προκληθούν διαρροές μνήμης στο (ασφαλές) Rust. Μερικά \"\n#~ \"παραδείγματα είναι:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να χρησιμοποιήσετε το [`Box::leak`](https://doc.rust-lang.org/\"\n#~ \"std/boxed/struct.Box.html#method.leak) για να διαρρεύσετε έναν δείκτη. \"\n#~ \"Μια χρήση αυτού θα μπορούσε να λάβετε στατικές μεταβλητές με αρχικοποίηση \"\n#~ \"χρόνου εκτέλεσης και στατικές μεταβλητές μεγέθους χρόνου εκτέλεσης\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να χρησιμοποιήσετε το [`std::mem::forget`](https://doc.rust-lang.\"\n#~ \"org/std/mem/fn.forget.html) για να κάνετε τον μεταγλωττιστή να \"\n#~ \"\\\"ξεχάσει\\\" μια τιμή (που σημαίνει ότι ο καταστροφέας δεν εκτελείται \"\n#~ \"ποτέ).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Μπορείτε επίσης να δημιουργήσετε κατά λάθος έναν \\\\[κύκλο αναφοράς\\\\] με \"\n#~ \"\\\"Rc\\\" ή «Τόξο».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"Στην πραγματικότητα, ορισμένοι θα εξετάσουν το ενδεχόμενο να συμπληρώσουν \"\n#~ \"άπειρα μια συλλογή ως ανάμνηση διαρροή και η Rust δεν προστατεύει από \"\n#~ \"αυτά.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Για τους σκοπούς αυτού του μαθήματος, θα πρέπει να γίνει κατανοητό το \"\n#~ \"\\\"No memory leaks\\\". ως \\\"Σχεδόν καμία _τυχαία_ διαρροή μνήμης\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"Η υπερχείλιση ακέραιου αριθμού ορίζεται μέσω μιας επισήμανσης χρόνου \"\n#~ \"μεταγλώττισης. Οι επιλογές είναι είτε ένας πανικός (ένα ελεγχόμενο crash \"\n#~ \"του προγράμματος) είτε να αναδιπλωθεί σημασιολογία. Από προεπιλογή, \"\n#~ \"λαμβάνετε πανικό στη λειτουργία εντοπισμού σφαλμάτων (\\\"κατασκευή \"\n#~ \"φορτίου\\\") και περιτύλιξη σε λειτουργία απελευθέρωσης («κατασκευή φορτίου \"\n#~ \"--απελευθέρωση»).\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"Το Rust κατασκευάζεται με όλη την εμπειρία που αποκτήθηκε τα τελευταία 40 \"\n#~ \"χρόνια.\"\n\n#, fuzzy\n#~ msgid \"Language Features\"\n#~ msgstr \"Χαρακτηριστικά γλώσσας\"\n\n#, fuzzy\n#~ msgid \"Tooling\"\n#~ msgstr \"Εργαλεία\"\n\n#, fuzzy\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Όπως η C++, το Rust έχει αναφορές:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Πρέπει να μην αναφέρουμε το «ref_x» κατά την ανάθεση σε αυτό, παρόμοια με \"\n#~ \"τους δείκτες C και C++.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"Οι αναφορές που δηλώνονται ως «mut» μπορούν να δεσμευτούν σε διαφορετικές \"\n#~ \"τιμές κατά τη διάρκεια της ζωής τους.\"\n\n#, fuzzy\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Μια αναφορά λέγεται ότι \\\"δανείζεται\\\" την τιμή στην οποία αναφέρεται.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Το Rust παρακολουθεί τη διάρκεια ζωής όλων των αναφορών για να \"\n#~ \"διασφαλίσει ότι ζουν πολύ αρκετά.\"\n\n#, fuzzy\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` vs `str`\"\n\n#, fuzzy\n#~ msgid \"We can now understand the two string types in Rust:\"\n#~ msgstr \"Μπορούμε τώρα να κατανοήσουμε τους δύο τύπους χορδών στο Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Μια έκδοση Rust της περίφημης ερώτησης συνέντευξης [FizzBuzz](https://en.\"\n#~ \"wikipedia.org/wiki/Fizz_buzz):\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Το Rust έχει μεθόδους, είναι απλώς λειτουργίες που σχετίζονται με έναν \"\n#~ \"συγκεκριμένο τύπο. ο Το πρώτο όρισμα μιας μεθόδου είναι ένα παράδειγμα \"\n#~ \"του τύπου με το οποίο σχετίζεται:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Θα εξετάσουμε πολύ περισσότερο τις μεθόδους στη σημερινή άσκηση και στην \"\n#~ \"αυριανή τάξη.\"\n\n#, fuzzy\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Λειτουργία Υπερφόρτωση\"\n\n#, fuzzy\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Η υπερφόρτωση δεν υποστηρίζεται:\"\n\n#, fuzzy\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Λαμβάνει πάντα έναν σταθερό αριθμό παραμέτρων.\"\n\n#, fuzzy\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Οι προεπιλεγμένες τιμές δεν υποστηρίζονται:\"\n\n#, fuzzy\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Όλοι οι ιστότοποι κλήσεων έχουν τον ίδιο αριθμό ορισμάτων.\"\n\n#, fuzzy\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Οι μακροεντολές χρησιμοποιούνται μερικές φορές ως εναλλακτική λύση.\"\n\n#, fuzzy\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Ωστόσο, οι παράμετροι συνάρτησης μπορεί να είναι γενικές:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"Όταν χρησιμοποιείτε γενικά, το 'Into\\n\"\n#~ \"\\n\"\n#~ \"' της τυπικής βιβλιοθήκης μπορεί να παρέχει ένα είδος περιορισμένου \"\n#~ \"πολυμορφισμός σε τύπους επιχειρημάτων. Θα δούμε περισσότερες λεπτομέρειες \"\n#~ \"σε επόμενη ενότητα.\"\n\n#, fuzzy\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Ημέρα 1: Πρωινές ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"Σε αυτές τις ασκήσεις, θα εξερευνήσουμε δύο μέρη του Rust:\"\n\n#, fuzzy\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Σιωπηρές μετατροπές μεταξύ τύπων.\"\n\n#, fuzzy\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"\"\n#~ \"Μερικά πράγματα που πρέπει να λάβετε υπόψη κατά την επίλυση των ασκήσεων:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιήστε μια τοπική εγκατάσταση Rust, εάν είναι δυνατόν. Με αυτόν \"\n#~ \"τον τρόπο μπορείτε να αποκτήσετε αυτόματη συμπλήρωση στον επεξεργαστή \"\n#~ \"σας. Δείτε τη σελίδα σχετικά με το [Using Cargo](../../cargo.md) για \"\n#~ \"λεπτομέρειες κατά την εγκατάσταση του Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Τα αποσπάσματα κώδικα δεν είναι επεξεργάσιμα επίτηδες: τα ενσωματωμένα \"\n#~ \"αποσπάσματα κώδικα χάνονται την κατάστασή τους εάν απομακρυνθείτε από τη \"\n#~ \"σελίδα.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Το Rust δεν θα εφαρμόσει αυτόματα _implicit conversions_ μεταξύ των τύπων \"\n#~ \"([σε αντίθεση με C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Μπορείτε να το δείτε σε ένα πρόγραμμα όπως αυτό:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Όλοι οι τύποι ακέραιου αριθμού Rust εφαρμόζουν τα [`From<T>`](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.From.html) και [`Into<T>`](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.Into.html) χαρακτηριστικά για να μας \"\n#~ \"αφήσουν να μετατρέψουμε μεταξύ τους. Το χαρακτηριστικό \\\"From\\n\"\n#~ \"\\n\"\n#~ \"\\\" έχει ένα μόνο \\\"from()\\\". μέθοδο και παρομοίως, το χαρακτηριστικό \"\n#~ \"«Into\\n\"\n#~ \"\\n\"\n#~ \"» έχει μία μόνο μέθοδο «into()». Η εφαρμογή αυτών των χαρακτηριστικών \"\n#~ \"είναι ο τρόπος με τον οποίο ένας τύπος εκφράζει ότι μπορεί να μετατραπεί \"\n#~ \"σε άλλου τύπου.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"Η τυπική βιβλιοθήκη έχει μια υλοποίηση του «From\\n\"\n#~ \"\\n\"\n#~ \" για i16», που σημαίνει ότι μπορούμε να μετατρέψουμε μια μεταβλητή «x» \"\n#~ \"τύπου «i8» σε «i16» καλώντας `i16::from(x)`. Ή, απλούστερα, με `x.\"\n#~ \"into()`, επειδή `From<i8> για i16` υλοποίηση δημιουργεί αυτόματα μια \"\n#~ \"υλοποίηση του «Into\\n\"\n#~ \"\\n\"\n#~ \" για i8».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"Το ίδιο ισχύει και για τις δικές σας υλοποιήσεις «Από» για τους δικούς \"\n#~ \"σας τύπους, έτσι είναι αρκεί για να εφαρμοστεί μόνο το \\\"From\\\" για να \"\n#~ \"ληφθεί αυτόματα μια αντίστοιχη υλοποίηση \\\"Into\\\".\"\n\n#, fuzzy\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"\"\n#~ \"Αλλάξτε τους τύπους \\\"x\\\" και \\\"y\\\" σε άλλα πράγματα (όπως \\\"f32\\\", \"\n#~ \"\\\"bool\\\", `i128`) για να δείτε ποιους τύπους μπορείτε να μετατρέψετε σε \"\n#~ \"ποιους άλλους τύπους. Δοκιμάστε μετατροπή μικρών τύπων σε μεγάλους τύπους \"\n#~ \"και το αντίστροφο. Ελεγξε το [τυπική τεκμηρίωση βιβλιοθήκης](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.From.html) για να δείτε εάν το \\\"From\"\n\n#, fuzzy\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\\\" έχει εφαρμοστεί για τα ζευγάρια που ελέγχετε.\"\n\n#, fuzzy\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Πίνακες και βρόχοι «για».\"\n\n#, fuzzy\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Είδαμε ότι ένας πίνακας μπορεί να δηλωθεί ως εξής:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να εκτυπώσετε έναν τέτοιο πίνακα ζητώντας την αναπαράστασή του \"\n#~ \"για τον εντοπισμό σφαλμάτων με \\\"{:?}\\\":\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Το Rust σάς επιτρέπει να επαναλαμβάνετε πράγματα όπως πίνακες και εύρη \"\n#~ \"χρησιμοποιώντας το \\\"για\\\". λέξη-κλειδί:\"\n\n#, fuzzy\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Ερώτηση μπόνους\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Θα μπορούσατε να χρησιμοποιήσετε φέτες \\\"&\\\\[i32\\\\]\\\" αντί για σκληρούς \"\n#~ \"κωδικοποιημένους πίνακες 3 × 3 για όρισμα και τύποι επιστροφής; Κάτι σαν \"\n#~ \"\\\"&\\\\[&\\\\[i32\\\\]\\\\]\\\" για ένα δισδιάστατο φέτα φέτες. Γιατί ή γιατί όχι?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Δείτε το [`ndarray` crate](https://docs.rs/ndarray/) για ποιότητα \"\n#~ \"παραγωγής εκτέλεση.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"Η λύση και η απάντηση στην ενότητα μπόνους είναι διαθέσιμες στο Ενότητα \"\n#~ \"[Λύση](solutions-morning.md#arrays-and-for-loops).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Όπως είδαμε, το «αν» είναι μια έκφραση στο Rust. Χρησιμοποιείται υπό \"\n#~ \"όρους αξιολογήστε ένα από τα δύο μπλοκ, αλλά τα μπλοκ μπορεί να έχουν μια \"\n#~ \"τιμή που στη συνέχεια γίνεται την τιμή της έκφρασης «αν». Άλλες εκφράσεις \"\n#~ \"ροής ελέγχου λειτουργούν παρόμοια στο Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"Ο ίδιος κανόνας χρησιμοποιείται για τις συναρτήσεις: η τιμή του σώματος \"\n#~ \"συνάρτησης είναι το επιστρεφόμενη τιμή:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"Βασικά σημεία:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"Η έκφραση \\\"for\\\" σχετίζεται στενά με την έκφραση \\\"while let\\\". Θα καλεί \"\n#~ \"αυτόματα το «into_iter()» στην έκφραση και, στη συνέχεια, επαναλαμβάνει \"\n#~ \"πάνω από αυτήν:\"\n\n#, fuzzy\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να χρησιμοποιήσετε το «διάλειμμα» και το «συνέχεια» εδώ ως \"\n#~ \"συνήθως.\"\n\n#, fuzzy\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\\\\<λεπτομέρειες>\"\n\n#, fuzzy\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"\"\n#~ \"Η επανάληψη ευρετηρίου δεν είναι ειδική σύνταξη στο Rust για αυτήν την \"\n#~ \"περίπτωση.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"Το \\\"(0..10)\\\" είναι μια περιοχή που υλοποιεί ένα χαρακτηριστικό \"\n#~ \"\\\"Iterator\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Το \\\"step_by\\\" είναι μια μέθοδος που επιστρέφει έναν άλλο \\\"Iterator\\\" \"\n#~ \"που παραλείπει κάθε άλλο στοιχείο.\"\n\n#, fuzzy\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"εκφράσεις «βρόχου».\"\n\n#, fuzzy\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"\"\n#~ \"Τέλος, υπάρχει μια λέξη-κλειδί «βρόχος» που δημιουργεί έναν ατελείωτο \"\n#~ \"βρόχο. Εδώ πρέπει είτε \\\"break\\\" είτε \\\"return\\\" για να σταματήσει ο \"\n#~ \"βρόχος:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Λόγω συμπερασμάτων τύπου, το «i32» είναι προαιρετικό. Σταδιακά θα \"\n#~ \"δείχνουμε τους τύπους όλο και λιγότερο όσο προχωρά ο τύπος.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"Ο ακόλουθος κώδικας λέει στον μεταγλωττιστή να αντιγράψει σε ένα \"\n#~ \"συγκεκριμένο γενικό κοντέινερ χωρίς ποτέ ο κώδικας να προσδιορίζει ρητά \"\n#~ \"τον τύπο που περιέχεται, χρησιμοποιώντας το «\\\\_» ως σύμβολο κράτησης \"\n#~ \"θέσης:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"Το [`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) βασίζεται στο `FromIterator`, το οποίο \"\n#~ \"\\\\[`HashSet`\\\\](https:/ /doc.rust-lang.org/std/iter/trait.FromIterator.\"\n#~ \"html) υλοποιεί.\"\n\n#, fuzzy\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Στατικές και σταθερές μεταβλητές\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"Ο ακόλουθος κώδικας δείχνει γιατί ο μεταγλωττιστής δεν μπορεί απλώς να \"\n#~ \"επαναχρησιμοποιήσει θέσεις μνήμης όταν σκιάζει μια αμετάβλητη μεταβλητή \"\n#~ \"σε ένα εύρος, ακόμα κι αν ο τύπος δεν αλλάξει.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Αυτή η σελίδα προσφέρει έναν τύπο \\\"CoinFlip\\\" με δύο παραλλαγές \"\n#~ \"\\\"Heads\\\" και \\\"Tail\\\". Μπορείτε να σημειώσετε τον χώρο ονομάτων όταν \"\n#~ \"χρησιμοποιείτε παραλλαγές.\"\n\n#, fuzzy\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"\"\n#~ \"Και στις δύο, οι συσχετισμένες συναρτήσεις ορίζονται μέσα σε ένα μπλοκ \"\n#~ \"«impl».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να ορίσετε πλουσιότερους αριθμούς όπου οι παραλλαγές μεταφέρουν \"\n#~ \"δεδομένα. Στη συνέχεια, μπορείτε να χρησιμοποιήσετε το Δήλωση \"\n#~ \"«ταιριάσματος» για εξαγωγή των δεδομένων από κάθε παραλλαγή:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"Το \\\"match\\\" επιθεωρεί ένα κρυφό πεδίο διάκρισης στο \\\"enum\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"Το \\\"WebEvent::Click { ... }\\\" δεν είναι ακριβώς το ίδιο με το \"\n#~ \"\\\"WebEvent::Click(Click)\\\" με ένα ανώτερο επίπεδο \\\"struct Click \"\n#~ \"{ ... }\\\". Η ενσωματωμένη έκδοση δεν μπορεί να εφαρμόσει χαρακτηριστικά, \"\n#~ \"για παράδειγμα.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Οι σκουριές συσκευάζονται σφιχτά, λαμβάνοντας υπόψη τους περιορισμούς \"\n#~ \"λόγω ευθυγράμμισης:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"Η λέξη-κλειδί \\\"αντιστοιχία\\\" χρησιμοποιείται για την αντιστοίχιση μιας \"\n#~ \"τιμής με ένα ή περισσότερα μοτίβα. Σε Με αυτή την έννοια, λειτουργεί σαν \"\n#~ \"μια σειρά από εκφράσεις «αν ας»:\"\n\n#, fuzzy\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"\"\n#~ \"Το μοτίβο `_` είναι ένα μοτίβο μπαλαντέρ που ταιριάζει με οποιαδήποτε \"\n#~ \"τιμή.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"Το \\\"1..=5\\\" αντιπροσωπεύει ένα εύρος που περιλαμβάνει\"\n\n#, fuzzy\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Το `_` είναι μπαλαντέρ\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Μπορεί να είναι χρήσιμο να δείξετε πώς λειτουργεί το δεσμευτικό, για \"\n#~ \"παράδειγμα αντικαθιστώντας έναν χαρακτήρα μπαλαντέρ με μια μεταβλητή ή \"\n#~ \"αφαιρώντας τα εισαγωγικά γύρω από το `q`.\\n\"\n#~ \"\\n\"\n#~ \"Μπορείτε να επιδείξετε την αντιστοίχιση σε μια αναφορά.\\n\"\n#~ \"\\n\"\n#~ \"Αυτή μπορεί να είναι μια καλή στιγμή για να αναδείξετε την έννοια των \"\n#~ \"αδιαμφισβήτητων προτύπων, καθώς ο όρος μπορεί να εμφανίζεται σε μηνύματα \"\n#~ \"λάθους.\"\n\n#, fuzzy\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Μπορείτε επίσης να καταστρέψετε «structs»:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Κατά την αντιστοίχιση, μπορείτε να προσθέσετε ένα _guard_ σε ένα μοτίβο. \"\n#~ \"Αυτό είναι ένα αυθαίρετο Boolean έκφραση που θα εκτελεστεί εάν το μοτίβο \"\n#~ \"ταιριάζει:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Δεν είναι ίδια με την ξεχωριστή έκφραση «αν» μέσα στο βραχίονα του αγώνα. \"\n#~ \"Μια έκφραση `if` μέσα στο μπλοκ διακλάδωσης (μετά από `=>`) εμφανίζεται \"\n#~ \"μετά την επιλογή του βραχίονα αντιστοίχισης. Η αποτυχία της συνθήκης \"\n#~ \"\\\"αν\\\" μέσα σε αυτό το μπλοκ δεν θα οδηγήσει σε άλλους βραχίονες της \"\n#~ \"αρχικής έκφρασης «ταιριάσματος» που εξετάζεται.\"\n\n#, fuzzy\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Ημέρα 1: Απογευματινές Ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Θα δούμε δύο πράγματα:\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Αλγόριθμος Luhn\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Αριθμοί και αντιστοίχιση μοτίβων.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"function.\"\n#~ msgstr \"\"\n#~ \"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n#~ \"εφαρμόστε το λειτουργίες:\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Συμβολοσειρές και Επαναλήπτες\"\n\n#, fuzzy\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"\"\n#~ \"Αρχικά, ας ανανεώσουμε τον τρόπο λειτουργίας της διαχείρισης μνήμης.\"\n\n#, fuzzy\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"The Stack vs The Heap\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Στοίβα και Σωρός\"\n\n#, fuzzy\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Εκχωρείτε και εκχωρείτε τη μνήμη σωρού μόνοι σας.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Εάν δεν γίνει με προσοχή, αυτό μπορεί να οδηγήσει σε σφάλματα, σφάλματα, \"\n#~ \"ευπάθειες ασφαλείας και διαρροές μνήμης.\"\n\n#, fuzzy\n#~ msgid \"C Example\"\n#~ msgstr \"Γ Παράδειγμα\"\n\n#, fuzzy\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"\"\n#~ \"Πρέπει να καλείτε \\\"δωρεάν\\\" σε κάθε δείκτη που εκχωρείτε με το \"\n#~ \"\\\"malloc\\\":\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"Η μνήμη διαρρέει εάν η συνάρτηση επιστρέψει νωρίς μεταξύ \\\"malloc\\\" και \"\n#~ \"\\\"free\\\": το Ο δείκτης χάνεται και δεν μπορούμε να εκχωρήσουμε τη μνήμη.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Οι κατασκευαστές και οι καταστροφείς σάς επιτρέπουν να κολλήσετε στη \"\n#~ \"διάρκεια ζωής ενός αντικειμένου.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Τυλίγοντας έναν δείκτη σε ένα αντικείμενο, μπορείτε να ελευθερώσετε μνήμη \"\n#~ \"όταν το αντικείμενο βρίσκεται καταστράφηκε από. Ο μεταγλωττιστής εγγυάται \"\n#~ \"ότι αυτό συμβαίνει, ακόμα κι αν υπάρχει εξαίρεση ανυψώθηκε.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Αυτό συχνά ονομάζεται _απόκτηση πόρων είναι αρχικοποίηση_ (RAII) και \"\n#~ \"δίνει έξυπνοι δείκτες.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"Το αντικείμενο `std::unique_ptr` εκχωρείται στη στοίβα και δείχνει σε \"\n#~ \"μνήμη που εκχωρείται στο σωρό.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"Στο τέλος του «say_hello», θα εκτελεστεί ο καταστροφέας «std::unique_ptr».\"\n\n#, fuzzy\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"\"\n#~ \"Ο καταστροφέας ελευθερώνει το αντικείμενο «Person» στο οποίο δείχνει.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Οι ειδικοί κατασκευαστές μετακίνησης χρησιμοποιούνται όταν μεταβιβάζεται \"\n#~ \"η ιδιοκτησία σε μια συνάρτηση:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Μια εναλλακτική λύση στη χειροκίνητη διαχείριση μνήμης και τη διαχείριση \"\n#~ \"μνήμης βάσει εύρους είναι η αυτόματη μνήμη διαχείριση:\"\n\n#, fuzzy\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"Ο προγραμματιστής ποτέ δεν εκχωρεί ή εκχωρεί μνήμη ρητά.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Ένας συλλέκτης σκουπιδιών βρίσκει αχρησιμοποίητη μνήμη και την εκχωρεί \"\n#~ \"στον προγραμματιστή.\"\n\n#, fuzzy\n#~ msgid \"Java Example\"\n#~ msgstr \"Παράδειγμα Java\"\n\n#, fuzzy\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"\"\n#~ \"Το αντικείμενο \\\"person\\\" δεν εκχωρείται μετά την επιστροφή του \"\n#~ \"\\\"sayHello\\\":\"\n\n#, fuzzy\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Διαχείριση μνήμης σε Rust\"\n\n#, fuzzy\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Η διαχείριση μνήμης στο Rust είναι ένας συνδυασμός:\"\n\n#, fuzzy\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Ασφαλές και σωστό όπως η Java, αλλά χωρίς σκουπιδοσυλλέκτη.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"Ανάλογα με το ποια αφαίρεση (ή συνδυασμό αφαιρέσεων) επιλέγετε, μπορεί να \"\n#~ \"είναι ένας μοναδικός δείκτης, να μετράται η αναφορά ή να μετράται ατομικά \"\n#~ \"η αναφορά.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"Βασίζεται στο πεδίο εφαρμογής όπως η C++, αλλά ο μεταγλωττιστής επιβάλλει \"\n#~ \"την πλήρη συμμόρφωση.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Ένας χρήστης του Rust μπορεί να επιλέξει τη σωστή αφαίρεση για την \"\n#~ \"κατάσταση, μερικοί μάλιστα δεν έχουν κόστος κατά τη διάρκεια εκτέλεσης \"\n#~ \"όπως το C.\"\n\n#, fuzzy\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Αυτό το επιτυγχάνει διαμορφώνοντας ρητά την _ownership_.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Εάν ρωτήσετε πώς σε αυτό το σημείο, μπορείτε να αναφέρετε ότι στο Rust \"\n#~ \"αυτό συνήθως αντιμετωπίζεται από τύπους περιτυλίγματος RAII όπως [Box]\"\n#~ \"(https://doc.rust-lang.org/std/boxed/struct.Box.html), [Vec](https://doc.\"\n#~ \"rust-lang.org/std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/\"\n#~ \"std/rc/struct.Rc.html) ή [Arc](https://doc.rust-lang.org/std/sync/struct.\"\n#~ \"Arc.html). Αυτά ενσωματώνουν την ιδιοκτησία και την εκχώρηση μνήμης με \"\n#~ \"διάφορα μέσα και αποτρέπουν τα πιθανά σφάλματα στο C.\"\n\n#, fuzzy\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"Ακολουθεί μια πρόχειρη σύγκριση των τεχνικών διαχείρισης μνήμης.\"\n\n#, fuzzy\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Πλεονεκτήματα Διαφορετικών Τεχνικών Διαχείρισης Μνήμης\"\n\n#, fuzzy\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Εγχειρίδιο όπως C:\"\n\n#, fuzzy\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Χωρίς επιβάρυνση χρόνου εκτέλεσης.\"\n\n#, fuzzy\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Αυτόματο όπως Java:\"\n\n#, fuzzy\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"Εντελώς αυτόματο.\"\n\n#, fuzzy\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Ασφαλές και σωστό.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Βασισμένο σε πεδίο εφαρμογής όπως η C++:\"\n\n#, fuzzy\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Μερικώς αυτόματο.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Βασισμένο σε εύρος με επιβολή μεταγλωττιστή όπως το Rust:\"\n\n#, fuzzy\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Επιβάλλεται από τον μεταγλωττιστή.\"\n\n#, fuzzy\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Μειονεκτήματα των διαφορετικών τεχνικών διαχείρισης μνήμης\"\n\n#, fuzzy\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Χρήση-μετά-δωρεάν.\"\n\n#, fuzzy\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Διπλό δωρεάν.\"\n\n#, fuzzy\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"Διαρροές μνήμης.\"\n\n#, fuzzy\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"Παύσεις αποκομιδής σκουπιδιών.\"\n\n#, fuzzy\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Καθυστερήσεις καταστροφέων.\"\n\n#, fuzzy\n#~ msgid \"Complex, opt-in by programmer (on C++).\"\n#~ msgstr \"Σύνθετο, συμμετοχή από προγραμματιστή.\"\n\n#, fuzzy\n#~ msgid \"Potential runtime overhead\"\n#~ msgstr \"Χωρίς επιβάρυνση χρόνου εκτέλεσης.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Επιβάλλεται από μεταγλωττιστή και βασίζεται σε εύρος όπως το Rust:\"\n\n#, fuzzy\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Κάποια εκ των προτέρων πολυπλοκότητα.\"\n\n#, fuzzy\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Μπορεί να απορρίψει έγκυρα προγράμματα.\"\n\n#, fuzzy\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Ένας καταστροφέας μπορεί να τρέξει εδώ για να ελευθερώσει πόρους.\"\n\n#, fuzzy\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"\"\n#~ \"Υπάρχει πάντα _exactly_ μία δέσμευση μεταβλητής που κατέχει μια τιμή.\"\n\n#, fuzzy\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Τα δεδομένα σωρού από το `s1` επαναχρησιμοποιούνται για το `s2`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"\"\n#~ \"Όταν το `s1` βγαίνει εκτός πεδίου εφαρμογής, δεν συμβαίνει τίποτα (έχει \"\n#~ \"μετακινηθεί από).\"\n\n#, fuzzy\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"Διπλές απελευθερώσεις μνήμης στη σύγχρονη C++\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Εάν οι μαθητές ρωτήσουν για το «derive», αρκεί να πούμε ότι αυτός είναι \"\n#~ \"ένας τρόπος δημιουργίας κώδικα στο Rust την ώρα της μεταγλώττισης. Σε \"\n#~ \"αυτήν την περίπτωση δημιουργούνται οι προεπιλεγμένες υλοποιήσεις των \"\n#~ \"χαρακτηριστικών «Αντιγραφή» και «Κλωνοποίηση».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    let p = Point(p1.0 + p2.0, p1.1 + p2.1);\\n\"\n#~ \"    println!(\\\"&p.0: {:p}\\\", &p.0);\\n\"\n#~ \"    p\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"pub fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"&p3.0: {:p}\\\", &p3.0);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"Ένας άλλος τρόπος να το εξηγήσετε:\"\n\n#, fuzzy\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Μια δανεισμένη αξία έχει _διάρκεια ζωής_:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Διαβάστε το '&'a Point' ως \\\"ένα δανεικό \\\"Point\\\" που ισχύει τουλάχιστον \"\n#~ \"για το διάρκεια ζωής «α»».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Εκτός από τον δανεισμό των ορισμάτων της, μια συνάρτηση μπορεί να \"\n#~ \"επιστρέψει μια δανεισμένη τιμή:\"\n\n#, fuzzy\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"\"\n#~ \"Το `'a` είναι μια γενική παράμετρος, συνάγεται από τον μεταγλωττιστή.\"\n\n#, fuzzy\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"\"\n#~ \"Οι διάρκειες ζωής ξεκινούν με \\\"\\\"\\\" και το \\\"a\\\" είναι ένα τυπικό \"\n#~ \"προεπιλεγμένο όνομα.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"Το τμήμα _τουλάχιστον_ είναι σημαντικό όταν οι παράμετροι βρίσκονται σε \"\n#~ \"διαφορετικά πεδία.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Επαναφέρετε τον χώρο εργασίας και αλλάξτε την υπογραφή της συνάρτησης σε \"\n#~ \"`fn left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. Αυτό \"\n#~ \"δεν θα μεταγλωττιστεί επειδή η σχέση μεταξύ των χρόνων ζωής \\\"a\\\" και \"\n#~ \"\\\"b\\\" είναι ασαφής.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p3: &Point;\\n\"\n#~ \"    {\\n\"\n#~ \"        let p2: Point = Point(20, 20);\\n\"\n#~ \"        p3 = left_most(&p1, &p2);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"Ένας άλλος τρόπος να το εξηγήσετε:\"\n\n#, fuzzy\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"\"\n#~ \"Δύο αναφορές σε δύο τιμές δανείζονται από μια συνάρτηση και η συνάρτηση \"\n#~ \"επιστρέφει άλλη αναφορά.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"Πρέπει να προέρχεται από μία από αυτές τις δύο εισόδους (ή από μια \"\n#~ \"καθολική μεταβλητή).\"\n\n#, fuzzy\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"\"\n#~ \"Ποιο είναι απ 'όλα? Ο μεταγλωττιστής πρέπει να γνωρίζει, επομένως στον \"\n#~ \"ιστότοπο κλήσης δεν χρησιμοποιείται η επιστρεφόμενη αναφορά για \"\n#~ \"περισσότερο από μια μεταβλητή από την οποία προήλθε η αναφορά.\"\n\n#, fuzzy\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Ημέρα 2: Πρωινές ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Θα εξετάσουμε την εφαρμογή μεθόδων σε δύο πλαίσια:\"\n\n#, fuzzy\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"Πολλαπλές δομές και αριθμοί για μια βιβλιοθήκη σχεδίων.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Θα μάθουμε πολλά περισσότερα για τις δομές και τον τύπο `Vec<T>` αύριο. \"\n#~ \"Προς το παρόν, απλά πρέπει να γνωρίζετε μέρος του API του:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιήστε αυτό για να δημιουργήσετε μια εφαρμογή βιβλιοθήκης. \"\n#~ \"Αντιγράψτε τον παρακάτω κωδικό στο <https://play.rust-lang.org/> και \"\n#~ \"ενημερώστε τους τύπους για να γίνει μεταγλώττιση:\"\n\n#, fuzzy\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"\"\n#~ \"\\\\<λεπτομέρειες>\\n\"\n#~ \"\\n\"\n#~ \"[Λύση](solutions-afternoon.md#designing-a-library)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Το μοντέλο ιδιοκτησίας του Rust επηρεάζει πολλά API. Ένα παράδειγμα αυτού \"\n#~ \"είναι το [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n#~ \"html) και [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.\"\n#~ \"IntoIterator.html) χαρακτηριστικά.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"Τα γνωρίσματα είναι σαν διεπαφές: περιγράφουν τη συμπεριφορά (μέθοδοι) \"\n#~ \"για έναν τύπο. ο Το χαρακτηριστικό «Iterator» λέει απλώς ότι μπορείτε να \"\n#~ \"καλέσετε «επόμενο» μέχρι να λάβετε πίσω το «Κανένα»:\"\n\n#, fuzzy\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Χρησιμοποιείτε αυτό το χαρακτηριστικό ως εξής:\"\n\n#, fuzzy\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"\"\n#~ \"Ποιος είναι ο τύπος που επιστρέφει ο επαναλήπτης; Δοκιμάστε την απάντησή \"\n#~ \"σας εδώ:\"\n\n#, fuzzy\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Γιατί χρησιμοποιείται αυτός ο τύπος;\"\n\n#, fuzzy\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Όπως και πριν, ποιος είναι ο τύπος που επιστρέφει ο επαναλήπτης;\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Τώρα που γνωρίζουμε και τα δύο \\\"Iterator\\\" και \\\"IntoIterator\\\", \"\n#~ \"μπορούμε να δημιουργήσουμε βρόχους \\\"for\\\". Καλούν «into_iter()» σε μια \"\n#~ \"έκφραση και επαναλαμβάνεται πάνω από το αποτέλεσμα επαναλήπτης:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Πειραματιστείτε με τον παραπάνω κώδικα και, στη συνέχεια, συμβουλευτείτε \"\n#~ \"την τεκμηρίωση για [`impl IntoIterator για &Vec<T>`](https://doc.rust-\"\n#~ \"lang.org/std/vec/struct.Vec.html#impl-IntoIterator-for-\"\n#~ \"%26%27a%20Vec%3CT%2C%20A%3E) και [`impl IntoIterator for Vec<T>`](https://\"\n#~ \"doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-for-\"\n#~ \"Vec%3CT%2C%20A%3E) για να ελέγξετε τις απαντήσεις σας.\"\n\n#, fuzzy\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"\"\n#~ \"Αυτή μπορεί να είναι μια καλή στιγμή για να δείξετε πώς το \\\"&self\\\" \"\n#~ \"διαφέρει από το \\\"self\\\" τροποποιώντας τον κώδικα και προσπαθώντας να \"\n#~ \"εκτελέσετε το say_hello δύο φορές.\\n\"\n#~ \"\\n\"\n#~ \"Στη συνέχεια περιγράφουμε τη διάκριση μεταξύ των δεκτών μεθόδων.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"\\\\<λεπτομέρειες>\\n\"\n#~ \"\\n\"\n#~ \"Εξετάστε το ενδεχόμενο να δώσετε έμφαση στο \\\"κοινόχρηστο και \"\n#~ \"αμετάβλητο\\\" και στο \\\"μοναδικό και μεταβλητό\\\". Αυτοί οι περιορισμοί \"\n#~ \"έρχονται πάντα μαζί στο Rust λόγω των κανόνων του ελεγκτή δανείου, και το \"\n#~ \"\\\"self\\\" δεν αποτελεί εξαίρεση. Δεν θα είναι δυνατόν Αναφέρετε μια δομή \"\n#~ \"από πολλές τοποθεσίες και καλέστε μια μέθοδο μεταλλάξεως (`&mut self`) σε \"\n#~ \"αυτήν.\"\n\n#, fuzzy\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"\\\\<λεπτομέρειες>\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"Βασικά σημεία:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Και οι τέσσερις μέθοδοι εδώ χρησιμοποιούν διαφορετικό δέκτη μεθόδου.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να επισημάνετε πώς αλλάζει αυτό που μπορεί να κάνει η συνάρτηση \"\n#~ \"με τις τιμές των μεταβλητών και εάν/πώς μπορεί να χρησιμοποιηθεί ξανά στο \"\n#~ \"\\\"main\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Μπορείτε να επιδείξετε το σφάλμα που εμφανίζεται όταν προσπαθείτε να \"\n#~ \"καλέσετε το \\\"finish\\\" δύο φορές.\\n\"\n#~ \"\\n\"\n#~ \"Σημειώστε ότι παρόλο που οι δέκτες της μεθόδου είναι διαφορετικοί, οι μη \"\n#~ \"στατικές συναρτήσεις ονομάζονται με τον ίδιο τρόπο στο κύριο σώμα. Το \"\n#~ \"Rust επιτρέπει την αυτόματη αναφορά και αποαναφορά κατά την κλήση \"\n#~ \"μεθόδων. Το Rust προσθέτει αυτόματα τα \\\"&\\\", \\\"\\\\*\\\", \\\"muts\\\", έτσι \"\n#~ \"ώστε αυτό το αντικείμενο να ταιριάζει με την υπογραφή της μεθόδου.\\n\"\n#~ \"\\n\"\n#~ \"Μπορείτε να επισημάνετε ότι το \\\"print_laps\\\" χρησιμοποιεί ένα διάνυσμα \"\n#~ \"που επαναλαμβάνεται. Περιγράφουμε διανύσματα με περισσότερες λεπτομέρειες \"\n#~ \"το απόγευμα.\"\n\n#, fuzzy\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Ημέρα 2: Απογευματινές Ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Οι ασκήσεις για σήμερα το απόγευμα θα επικεντρωθούν σε έγχορδα και \"\n#~ \"επαναλήπτες.\"\n\n#, fuzzy\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"Οι συνήθεις τύποι λεξιλογίου περιλαμβάνουν:\"\n\n#, fuzzy\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"«Επιλογή» και «Αποτέλεσμα».\"\n\n#, fuzzy\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Οι τύποι αντιπροσωπεύουν προαιρετικά δεδομένα:\"\n\n#, fuzzy\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"Το \\\"Option\\\\<&T>\\\" έχει μηδενικό χώρο σε σύγκριση με το \\\"&T\\\".\"\n\n#, fuzzy\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"Η \\\"δυαδική_αναζήτηση\\\" επιστρέφει \\\"Αποτέλεσμα\\\\<χρήση, χρήση>\\\".\"\n\n#, fuzzy\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Εάν βρεθεί, το «Αποτέλεσμα::Οκ» διατηρεί το ευρετήριο όπου βρίσκεται το \"\n#~ \"στοιχείο.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"Διαφορετικά, το \\\"Αποτέλεσμα::Σφάλμα\\\" περιέχει το ευρετήριο όπου θα \"\n#~ \"πρέπει να εισαχθεί ένα τέτοιο στοιχείο.\"\n\n#, fuzzy\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Πλαίσιο με αναδρομικές δομές δεδομένων\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιώντας το \\\"Read\\\" και το \\\"BufRead\\\", μπορείτε να αφαιρέσετε \"\n#~ \"τις πηγές \\\"u8\\\":\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"Σε αυτήν την άσκηση, υλοποιείτε ένα στοιχείο δρομολόγησης ενός διακομιστή \"\n#~ \"web. ο Ο διακομιστής έχει ρυθμιστεί με έναν αριθμό προθεμάτων _διαδρομών_ \"\n#~ \"με τα οποία αντιστοιχίζονται _αίτημα μονοπατιών_. Τα προθέματα διαδρομής \"\n#~ \"μπορούν να περιέχουν έναν χαρακτήρα μπαλαντέρ που αντιστοιχεί σε ένα \"\n#~ \"πλήρες τμήμα. Δείτε τις δοκιμές μονάδας παρακάτω.\"\n\n#, fuzzy\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Μπορείτε να δηλώσετε έναν γενικό τύπο στο μπλοκ `impl`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Ο γενικός κώδικας μετατρέπεται σε μη γενικό κώδικα βάσει των τοποθεσιών \"\n#~ \"κλήσεων:\"\n\n#, fuzzy\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"συμπεριφέρεται σαν να έγραψες\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"    println!(\\\"{} {}\\\", std::mem::size_of::<Dog>(), std::mem::size_of::\"\n#~ \"<Cat>());\\n\"\n#~ \"    println!(\\\"{} {}\\\", std::mem::size_of::<&Dog>(), std::mem::size_of::\"\n#~ \"<&Cat>());\\n\"\n#~ \"    println!(\\\"{}\\\", std::mem::size_of::<&dyn Pet>());\\n\"\n#~ \"    println!(\\\"{}\\\", std::mem::size_of::<Box<dyn Pet>>());\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"Στο παράδειγμα, τα «κατοικίδια» κρατούν δείκτες λίπους σε αντικείμενα που \"\n#~ \"υλοποιούν το «Χαιρετισμός». Ο δείκτης λίπους αποτελείται από δύο \"\n#~ \"στοιχεία, έναν δείκτη προς το πραγματικό αντικείμενο και έναν δείκτη στον \"\n#~ \"πίνακα εικονικής μεθόδου για την υλοποίηση «Greet» του συγκεκριμένου \"\n#~ \"αντικειμένου.\"\n\n#, fuzzy\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να αφήσετε τον μεταγλωττιστή να αντλήσει έναν αριθμό \"\n#~ \"χαρακτηριστικών:\"\n\n#, fuzzy\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"Τα χαρακτηριστικά μπορούν να εφαρμόσουν τη συμπεριφορά σε σχέση με άλλες \"\n#~ \"μεθόδους χαρακτηριστικών:\"\n\n#, fuzzy\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"Το \\\"impl Trait\\\" δεν μπορεί να χρησιμοποιηθεί με τη σύνταξη \\\"::\\\\<\\\\>\\\" \"\n#~ \"turbo fish.\\n\"\n#~ \"\\n\"\n#~ \"Το \\\"impl Trait\\\" σάς επιτρέπει να εργάζεστε με τύπους που δεν μπορείτε \"\n#~ \"να ονομάσετε.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Αυτό το παράδειγμα είναι υπέροχο, επειδή χρησιμοποιεί το \\\"immpl \"\n#~ \"Display\\\" δύο φορές. Βοηθά να το εξηγήσω τίποτα εδώ δεν επιβάλλει ότι \"\n#~ \"είναι _ο ίδιος_ τύπος \\\"impl Display\\\". Αν χρησιμοποιούσαμε ένα μονό «T: \"\n#~ \"Εμφάνιση», θα επιβάλει τον περιορισμό ότι η είσοδος «T» και η επιστροφή \"\n#~ \"του τύπου «T» είναι του ίδιου τύπου. Δεν θα λειτουργούσε για τη \"\n#~ \"συγκεκριμένη λειτουργία, καθώς ο τύπος που περιμένουμε ως είσοδο είναι \"\n#~ \"πιθανό να μην είναι τι «μορφή!» επιστρέφει. Αν θέλαμε να κάνουμε το ίδιο \"\n#~ \"μέσω της σύνταξης `: Display`, θα χρειαζόμασταν δύο ανεξάρτητες γενικές \"\n#~ \"παραμέτρους.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"Θα δούμε τώρα μερικά από τα πιο κοινά χαρακτηριστικά της βασικής \"\n#~ \"βιβλιοθήκης Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"«Iterator» και «IntoIterator» που χρησιμοποιούνται σε βρόχους «for»,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"Τα \\\"From\\\" και \\\"Into\\\" χρησιμοποιούνται για τη μετατροπή τιμών,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"«Read» και «Write» που χρησιμοποιούνται για IO,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"«Προσθήκη», «Mul», ... χρησιμοποιείται για υπερφόρτωση χειριστή και\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"Το «Iterator» υλοποιεί `fn collect<B>(self) -> B που Β: \"\n#~ \"FromIterator<Self::Item>, Self: Μέγεθος`\"\n\n#, fuzzy\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"\\\"Προσθήκη\\\", \\\"Mul\\\", ...\"\n\n#, fuzzy\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Ημέρα 3: Πρωινές ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Θα σχεδιάσουμε μια κλασική βιβλιοθήκη GUI χαρακτηριστικά και αντικείμενα \"\n#~ \"χαρακτηριστικών.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects.\"\n#~ msgstr \"\"\n#~ \"Ας σχεδιάσουμε μια κλασική βιβλιοθήκη GUI χρησιμοποιώντας τις νέες μας \"\n#~ \"γνώσεις για τα χαρακτηριστικά και γνωρίσματα αντικειμένων.\"\n\n#, fuzzy\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"Θα έχουμε έναν αριθμό γραφικών στοιχείων στη βιβλιοθήκη μας:\"\n\n#, fuzzy\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"«Παράθυρο»: έχει «τίτλο» και περιέχει άλλα γραφικά στοιχεία.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"«Κουμπί»: έχει μια «ετικέτα» και μια λειτουργία επανάκλησης που καλείται \"\n#~ \"όταν το πατιέται το κουμπί.\"\n\n#, fuzzy\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"\\\"Ετικέτα\\\": έχει \\\"ετικέτα\\\".\"\n\n#, fuzzy\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"\"\n#~ \"Τα γραφικά στοιχεία θα εφαρμόσουν ένα χαρακτηριστικό «Γραφικό στοιχείο», \"\n#~ \"δείτε παρακάτω.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/>, \"\n#~ \"συμπληρώστε τον κωδικό που λείπει Μέθοδοι \\\"draw_into\\\", ώστε να \"\n#~ \"εφαρμόσετε το χαρακτηριστικό \\\"Widget\\\":\"\n\n#, fuzzy\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"\"\n#~ \"Η έξοδος του παραπάνω προγράμματος μπορεί να είναι κάτι απλό όπως αυτό:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Εάν θέλετε να σχεδιάσετε στοιχισμένο κείμενο, μπορείτε να χρησιμοποιήσετε \"\n#~ \"το [fill/alignment](https://doc.rust-lang.org/std/fmt/index.\"\n#~ \"html#fillalignment) τελεστές μορφοποίησης. Ειδικότερα, παρατηρήστε πώς \"\n#~ \"μπορείτε να γεμίσετε διαφορετικά χαρακτήρες (εδώ ένα `'/'`) και πώς \"\n#~ \"μπορείτε να ελέγξετε τη στοίχιση:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιώντας τέτοια κόλπα ευθυγράμμισης, μπορείτε για παράδειγμα να \"\n#~ \"παράγετε έξοδο όπως αυτό:\"\n\n#, fuzzy\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Πολυγωνική κατασκευή\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Θα δημιουργήσουμε μια δομή «Πολύγωνο» που περιέχει μερικά σημεία. \"\n#~ \"Αντιγράψτε τον παρακάτω κωδικό στο <https://play.rust-lang.org/> και \"\n#~ \"συμπληρώστε τις μεθόδους που λείπουν για να το κάνετε οι δοκιμές περνούν:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Δεδομένου ότι οι υπογραφές της μεθόδου λείπουν από τις δηλώσεις \"\n#~ \"προβλημάτων, το βασικό μέρος της άσκησης είναι να τα προσδιορίσετε σωστά.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"Άλλα ενδιαφέροντα μέρη της άσκησης:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Εξάγετε ένα χαρακτηριστικό «Αντιγραφή» για ορισμένες δομές, καθώς στις \"\n#~ \"δοκιμές οι μέθοδοι μερικές φορές δεν δανείζονται τα επιχειρήματά τους.\\n\"\n#~ \"\\n\"\n#~ \"Ανακαλύψτε ότι το χαρακτηριστικό «Προσθήκη» πρέπει να εφαρμοστεί για δύο \"\n#~ \"αντικείμενα που μπορούν να προστεθούν μέσω του «+».\"\n\n#, fuzzy\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"Ο χειρισμός σφαλμάτων στο Rust γίνεται χρησιμοποιώντας ρητή ροή ελέγχου:\"\n\n#, fuzzy\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"\"\n#~ \"Οι συναρτήσεις που μπορεί να έχουν σφάλματα το αναφέρουν στον τύπο \"\n#~ \"επιστροφής τους,\"\n\n#, fuzzy\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Δεν υπάρχουν εξαιρέσεις.\"\n\n#, fuzzy\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Αλίευση της στοίβας Ξετύλιγμα\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Έχουμε ήδη δει τον αριθμό «Αποτέλεσμα». Αυτό χρησιμοποιείται ευρέως όταν \"\n#~ \"υπάρχουν σφάλματα αναμένεται ως μέρος της κανονικής λειτουργίας:\"\n\n#, fuzzy\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Σφάλματα διάδοσης με το \\\"?\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"Ο τελεστής δοκιμής `?` χρησιμοποιείται για την επιστροφή σφαλμάτων στον \"\n#~ \"καλούντα. Σας αφήνει να στρίψετε το κοινό\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"Είναι καλή πρακτική για όλους τους τύπους σφαλμάτων να εφαρμόζουν το \"\n#~ \"\\\"std::error::Error\\\", το οποίο απαιτεί \\\"Debug\\\" και 'Εμφάνιση'. Είναι \"\n#~ \"γενικά χρήσιμο γι 'αυτούς να εφαρμόσουν το \\\"Clone\\\" και το \\\"Eq\\\" όπου \"\n#~ \"είναι δυνατόν ευκολότερη ζωή για τα τεστ και τους καταναλωτές της \"\n#~ \"βιβλιοθήκης σας. Σε αυτή την περίπτωση δεν μπορούμε εύκολα να το κάνουμε, \"\n#~ \"γιατί Το `io::Error` δεν τα υλοποιεί.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"Η μακροεντολή εξαγωγής \\\"thiserror\\\" εφαρμόζει αυτόματα το \\\"std::error::\"\n#~ \"Error\\\" και προαιρετικά το \\\"Display\\\" (εάν παρέχονται τα χαρακτηριστικά \"\n#~ \"\\\"#\\\\[σφάλμα(...)\\\\]\\\") και \\\"Από\\\" (αν προστεθεί το χαρακτηριστικό \"\n#~ \"\\\"#\\\\[από\\\\]\\\". Λειτουργεί επίσης για δομές.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"Δεν επηρεάζει το δημόσιο API σας, κάτι που το κάνει καλό για βιβλιοθήκες.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"Το ευρέως χρησιμοποιούμενο κιβώτιο [anyhow](https://docs.rs/anyhow/) \"\n#~ \"μπορεί να σας βοηθήσει να προσθέσετε πληροφορίες για τα λάθη σας και σας \"\n#~ \"επιτρέπει να έχετε λιγότερα προσαρμοσμένοι τύποι σφαλμάτων:\"\n\n#, fuzzy\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Επισημάνετε τις δοκιμές μονάδας με «#\\\\[test\\\\]»:\"\n\n#, fuzzy\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιήστε τη «δοκιμή φορτίου» για να βρείτε και να εκτελέσετε τις \"\n#~ \"δοκιμές μονάδας.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Οι δοκιμές μονάδας τοποθετούνται συχνά σε μια ένθετη ενότητα (εκτελέστε \"\n#~ \"δοκιμές στο [Παιδική χαρά](https://play.rust-lang.org/)):\"\n\n#, fuzzy\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Κλήση εξωτερικού κωδικού\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Λειτουργίες από άλλες γλώσσες ενδέχεται να παραβιάζουν τις εγγυήσεις του \"\n#~ \"Rust. Κλήση είναι επομένως ανασφαλείς:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::size_of_val;\\n\"\n#~ \"use std::slice;\\n\"\n#~ \"\\n\"\n#~ \"/// ...\\n\"\n#~ \"/// # Safety\\n\"\n#~ \"/// The type must have a defined representation and no padding.\\n\"\n#~ \"pub unsafe trait AsBytes {\\n\"\n#~ \"    fn as_bytes(&self) -> &[u8] {\\n\"\n#~ \"        unsafe {\\n\"\n#~ \"            slice::from_raw_parts(self as *const Self as *const u8, \"\n#~ \"size_of_val(self))\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// Safe because u32 has a defined representation and no padding.\\n\"\n#~ \"unsafe impl AsBytes for u32 {}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"///... /// # Ασφάλεια /// Ο τύπος πρέπει να έχει καθορισμένη αναπαράσταση \"\n#~ \"και χωρίς γέμιση. μη ασφαλές χαρακτηριστικό παμπ AsBytes { fn \"\n#~ \"as_bytes(&self) -> &\\\\[u8\\\\] { μη ασφαλές { slice::from_raw_parts(self as \"\n#~ \"\\\\*const Self as \\\\*const u8, size_of_val(self)) } } }\"\n\n#, fuzzy\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Ημέρα 3: Απογευματινές Ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"\"\n#~ \"Ας δημιουργήσουμε ένα ασφαλές περιτύλιγμα για την ανάγνωση περιεχομένου \"\n#~ \"καταλόγου!\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Αφού δείτε την άσκηση, μπορείτε να δείτε τη \\\\[λύση\\\\] που παρέχεται.\"\n\n#, fuzzy\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Θα βρείτε λύσεις στις ασκήσεις στις επόμενες σελίδες.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Μη διστάσετε να κάνετε ερωτήσεις σχετικά με τις λύσεις [on GitHub]\"\n#~ \"(https://github.com/google/comprehensive-rust/discussions). Ενημέρωσέ μας \"\n#~ \"εάν έχετε διαφορετική ή καλύτερη λύση από αυτή που παρουσιάζεται εδώ.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Σημείωση:** Αγνοήστε τα \\\"// ANCHOR: label\\\" και \\\"// ANCHOR_END: \"\n#~ \"label\\\" σχόλια που βλέπετε στις λύσεις. Είναι εκεί για να το κάνουν \"\n#~ \"δυνατό επαναχρησιμοποιήστε μέρη των λύσεων ως ασκήσεις.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Πρωινές ασκήσεις 1ης ημέρας\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](for-loops.md))\"\n\n#, fuzzy\n#~ msgid \"Bonus question\"\n#~ msgstr \"Ερώτηση μπόνους\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Ειλικρινά δεν λειτουργεί τόσο καλά. Μπορεί να φαίνεται ότι θα μπορούσαμε \"\n#~ \"να χρησιμοποιήσουμε ένα slice-of-slices (`&[&[i32]]`) ως τύπο εισόδου για \"\n#~ \"να μεταφέρουμε και έτσι να κάνουμε τη συνάρτησή μας να χειρίζεται \"\n#~ \"οποιοδήποτε μέγεθος πίνακα. Ωστόσο, αυτό αναλύεται γρήγορα: ο τύπος \"\n#~ \"επιστροφής δεν μπορεί να είναι \\\"&\\\\[&\\\\[i32\\\\]\\\\]\\\", καθώς πρέπει να \"\n#~ \"είναι κάτοχος των δεδομένων που επιστρέφετε.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να επιχειρήσετε να χρησιμοποιήσετε κάτι σαν `Vec<Vec<i32>>`, \"\n#~ \"αλλά ούτε αυτό λειτουργεί πολύ καλά: είναι δύσκολο να μετατρέψετε από \"\n#~ \"`Vec<Vec<i32>>` σε \\\\`&\\\\[&\\\\[i32\\\\]\\\\] Έτσι τώρα δεν μπορείτε να \"\n#~ \"χρησιμοποιήσετε εύκολα ούτε το \\\"pretty_print\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Επιπλέον, ο ίδιος ο τύπος δεν θα επιβάλλει ότι οι θυγατρικές φέτες έχουν \"\n#~ \"το ίδιο μήκος, επομένως μια τέτοια μεταβλητή θα μπορούσε να περιέχει έναν \"\n#~ \"μη έγκυρο πίνακα.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"1η ημέρα Απογευματινές Ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Αντιστοίχιση προτύπων\"\n\n#, fuzzy\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"2η ημέρα Πρωινές ασκήσεις\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Σχεδιασμός Βιβλιοθηκών\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](book-library.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](strings-iterators.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"3η ημέρα Πρωινή άσκηση\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](simple-gui.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](points-polygons.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"3η ημέρα Απογευματινές Ασκήσεις\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([επιστροφή στην άσκηση](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Day 4 Morning\"\n#~ msgstr \"4η ημέρα Πρωί\"\n\n#~ msgid \"Build workflow\"\n#~ msgstr \"Ροή εργασίας κατασκευής\"\n\n#~ msgid \"GitHub contributors\"\n#~ msgstr \"Συνεργάτες GitHub\"\n\n#~ msgid \"GitHub stars\"\n#~ msgstr \"Αστέρια GitHub\"\n\n#~ msgid \"On Day 4, we will cover Android-specific things such as:\"\n#~ msgstr \"\"\n#~ \"Την 4η Ημέρα, θα καλύψουμε πράγματα που αφορούν συγκεκριμένα το Android, \"\n#~ \"όπως:\"\n\n#~ msgid \"AIDL servers and clients.\"\n#~ msgstr \"Εξυπηρετητές και πελάτες AIDL.\"\n\n#~ msgid \"Interoperability with C, C++, and Java.\"\n#~ msgstr \"Διαλειτουργικότητα με C, C++ και Java.\"\n\n#~ msgid \"\"\n#~ \"It is important to note that this course does not cover Android \"\n#~ \"**application**  development in Rust, and that the Android-specific parts \"\n#~ \"are specifically about writing code for Android itself, the operating \"\n#~ \"system. \"\n#~ msgstr \"\"\n#~ \"Είναι σημαντικό να σημειωθεί ότι αυτό το μάθημα δεν καλύπτει την \"\n#~ \"ανάπτυξη**εφαρμογών** Android σε Rust. Το κομμάτι του μαθήματος που αφορά \"\n#~ \"τοAndroid έχει να κάνει με ανάπτυξη κώδικα για το ίδιο το Android, ως \"\n#~ \"λειτουργικό σύστημα.\"\n\n#~ msgid \"\"\n#~ \"Learn how to use async Rust --- we'll only mention async Rust when \"\n#~ \"covering traditional concurrency primitives. Please see [Asynchronous \"\n#~ \"Programming in Rust](https://rust-lang.github.io/async-book/) instead for \"\n#~ \"details on this topic.\"\n#~ msgstr \"\"\n#~ \"Χρήση async Rust --- θα αναφέρουμε στην async Rust μόνο όταν καλύψουμε τα \"\n#~ \"παραδοσιακά δομικά στοιχεία συγχρονισμού. Δείτε και [Ασύγχρονος \"\n#~ \"Προγραμματισμός σε Rust](https://rust-lang.github.io/async-book/) για \"\n#~ \"λεπτομέρειες για αυτό το θέμα.\"\n\n#~ msgid \"\"\n#~ \"Select your topic for the afternoon of the fourth day. This may be based \"\n#~ \"on the audience you expect, or on your own expertise.\"\n#~ msgstr \"\"\n#~ \"Επιλέξτε το θέμα σας για το απόγευμα της τέταρτης ημέρας. Αυτό μπορεί να \"\n#~ \"βασίζεται στο κοινό που περιμένετε ή στη δική σας εμπειρία.\"\n\n#~ msgid \"\"\n#~ \"Prepare anything you need to have available for the afternoon of day 4.\"\n#~ msgstr \"Ετοιμάστε οτιδήποτε χρειάζεστε για το απόγευμα της 4ης ημέρας.\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"Ημέρα 1: Βασική Rust, ιδιοκτησία και ο έλεγχος δανείων.\"\n\n#~ msgid \"Day 4: Concurrency in Rust and seeing Rust in action.\"\n#~ msgstr \"Ημέρα 4: Συγχρονισμός στη Rust. Rust στην πράξη.\"\n\n#~ msgid \"Day 4\"\n#~ msgstr \"Ημέρα 4η\"\n\n#~ msgid \"\"\n#~ \"The afternoon of the fourth day should cover a topic of your choice. \"\n#~ \"Include the topic in the announcement of the course, so that participants \"\n#~ \"know what to expect.\"\n#~ msgstr \"\"\n#~ \"Το απόγευμα της τέταρτης ημέρας μπορεί να καλύψει ένα θέμα τηςαρεσκείας \"\n#~ \"σας. Σημειώστε το θέμα που επιλέξατε στην ανακοίνωση του μαθήματος ώστε \"\n#~ \"οισυμμετέχοντες να ξέρουν τι να περιμένουν.\"\n\n#~ msgid \"\"\n#~ \"This phase of the course is a chance for participants to see Rust in \"\n#~ \"action on a codebase they might be familiar with. You can choose from the \"\n#~ \"topics already defined here, or plan your own.\"\n#~ msgstr \"\"\n#~ \"Αυτή η φάση του μαθήματος είναι μια ευκαιρία για τους συμμετέχοντες να \"\n#~ \"δουν τη Rust στην πράξη, σε ένα πρότζεκτ με το οποίο μπορεί να είναι ήδη \"\n#~ \"εξοικειωμένοι. Μπορείτε να διαλέξετε θέματα που έχουμε ήδη προετοιμάσει, \"\n#~ \"ή κάτι δικό σας.\"\n\n#~ msgid \"Some topics need additional preparation:\"\n#~ msgstr \"Κάποια θέματα απαιτούν επιπλέον προετοιμασία.\"\n\n#, fuzzy\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (Συνιστάται)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Μπορείτε να ακολουθήσετε τις οδηγίες για την εγκατάσταση του \"\n#~ \"μεταγλωττιστή φορτίου και σκουριάς, μεταξύ άλλων τυπικών εργαλείων \"\n#~ \"οικοσυστήματος με το εργαλείο [rustup](https://rust-analyzer.github.io/), \"\n#~ \"το οποίο διατηρείται από το Rust Foundation.\"\n\n#, fuzzy\n#~ msgid \"Package Managers\"\n#~ msgstr \"Διαχειριστές πακέτων\"\n\n#, fuzzy\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    fizzbuzz_to(20);   // Defined below, no forward declaration needed\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // Corner case, early return\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // The last expression in a block is the return \"\n#~ \"value\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn fizzbuzz(n: u32) -> () {  // No return value means returning the unit \"\n#~ \"type `()`\\n\"\n#~ \"    match (is_divisible_by(n, 3), is_divisible_by(n, 5)) {\\n\"\n#~ \"        (true,  true)  => println!(\\\"fizzbuzz\\\"),\\n\"\n#~ \"        (true,  false) => println!(\\\"fizz\\\"),\\n\"\n#~ \"        (false, true)  => println!(\\\"buzz\\\"),\\n\"\n#~ \"        (false, false) => println!(\\\"{n}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn fizzbuzz_to(n: u32) {  // `-> ()` is normally omitted\\n\"\n#~ \"    for i in 1..=n {\\n\"\n#~ \"        fizzbuzz(i);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn fizzbuzz(n: u32) -> () { // Χωρίς επιστροφή τιμής σημαίνει επιστροφή \"\n#~ \"του τύπου μονάδας `()` αντιστοίχιση (is_divisible_by(n, 3), \"\n#~ \"is_divisible_by(n, 5)) { (αληθινό, αληθινό) => println!(\\\"fizzbuzz\\\"), \"\n#~ \"(αληθές, λάθος) => println!(\\\"fizz\\\"), (ψευδές, αληθές) => println!\"\n#~ \"(\\\"buzz\\\"), (ψεύτικο, ψευδές) => println!(\\\"{n}\\\"), } }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"After looking at the exercises, you can look at the \\\\[solutions\\\\] \"\n#~ \"provided.\"\n#~ msgstr \"\"\n#~ \"Αφού δείτε τις ασκήσεις, μπορείτε να δείτε τις \\\\[λύσεις\\\\] που \"\n#~ \"παρέχονται.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that since `println!` is a macro, `x` is not moved, even using the \"\n#~ \"function like syntax of `println!(\\\"x: {}\\\", x)`\"\n#~ msgstr \"\"\n#~ \"Σημειώστε ότι επειδή το \\\"println!\\\" είναι μακροεντολή, το \\\"x\\\" δεν \"\n#~ \"μετακινείται, ακόμη και χρησιμοποιώντας τη συνάρτηση όπως η σύνταξη του \"\n#~ \"\\\"println!(\\\"x: {}\\\", x)\\\"\"\n\n#, fuzzy\n#~ msgid \"Global state is managed with static and constant variables.\"\n#~ msgstr \"\"\n#~ \"Η διαχείριση της παγκόσμιας κατάστασης γίνεται με στατικές και σταθερές \"\n#~ \"μεταβλητές.\"\n\n#, fuzzy\n#~ msgid \"You can declare compile-time constants:\"\n#~ msgstr \"Μπορείτε να δηλώσετε σταθερές χρόνου μεταγλώττισης:\"\n\n#, fuzzy\n#~ msgid \"You can also declare static variables:\"\n#~ msgstr \"Μπορείτε επίσης να δηλώσετε στατικές μεταβλητές:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will look at mutating static data in the [chapter on Unsafe Rust](../\"\n#~ \"unsafe.md).\"\n#~ msgstr \"\"\n#~ \"Θα εξετάσουμε τη μετάλλαξη στατικών δεδομένων στο \\\\[κεφάλαιο για την Μη \"\n#~ \"ασφαλή σκουριά\\\\] (../unsafe.md).\"\n\n#, fuzzy\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"Δυνατότητα χρήσης-μετά-δωρεάν.\"\n\n#, fuzzy\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"\"\n#~ \"Τα δεδομένα _μετακινήθηκαν_ από το `s1` και το `s1` δεν είναι πλέον \"\n#~ \"προσβάσιμο.\"\n\n#, fuzzy\n#~ msgid \"A small book library,\"\n#~ msgstr \"Iterators και ιδιοκτησία (σκληρό).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`mut self`: same as above, but while the method owns the object, it can \"\n#~ \"mutate it too. Complete ownership does not automatically mean mutability.\"\n#~ msgstr \"\"\n#~ \"`mut self`: όπως παραπάνω, αλλά ενώ η μέθοδος κατέχει το αντικείμενο, \"\n#~ \"μπορεί μεταλλάξτε το και εσείς. Η πλήρης ιδιοκτησία δεν σημαίνει αυτόματα \"\n#~ \"μεταβλητότητα.\"\n\n#, fuzzy\n#~ msgid \"You use `if` very similarly to how you would in other languages:\"\n#~ msgstr \"\"\n#~ \"Χρησιμοποιείτε το \\\"if\\\" πολύ παρόμοια με αυτό που θα κάνατε σε άλλες \"\n#~ \"γλώσσες:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to match a value against a pattern, you can use `if let`:\"\n#~ msgstr \"\"\n#~ \"Εάν θέλετε να ταιριάξετε μια τιμή με ένα μοτίβο, μπορείτε να \"\n#~ \"χρησιμοποιήσετε το «αν επιτρέπεται»:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`if let` can be more concise than `match`, e.g., when only one case is \"\n#~ \"interesting. In contrast, `match` requires all branches to be covered.\"\n#~ msgstr \"\"\n#~ \"Το «αν ας» μπορεί να είναι πιο συνοπτικό από το «ταίριασμα», π.χ., όταν \"\n#~ \"μόνο μία περίπτωση είναι ενδιαφέρουσα. Αντίθετα, το \\\"match\\\" απαιτεί να \"\n#~ \"καλύπτονται όλοι οι κλάδοι.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"For the similar use case consider demonstrating a newly stabilized [`let \"\n#~ \"else`](https://github.com/rust-lang/rust/pull/93628) feature.\"\n#~ msgstr \"\"\n#~ \"Για παρόμοια περίπτωση χρήσης, εξετάστε το ενδεχόμενο να επιδείξετε μια \"\n#~ \"νέα σταθεροποιημένη λειτουργία [`let else`](https://github.com/rust-lang/\"\n#~ \"rust/pull/93628).\"\n\n#, fuzzy\n#~ msgid \"The `while` keyword works very similar to other languages:\"\n#~ msgstr \"Η λέξη-κλειδί \\\"while\\\" λειτουργεί πολύ παρόμοια με άλλες γλώσσες:\"\n\n#, fuzzy\n#~ msgid \"`for` expressions\"\n#~ msgstr \"εκφράσεις «για».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you need to mutate the data inside an `Rc`, you will need to wrap the \"\n#~ \"data in a type such as [`Cell` or `RefCell`](../concurrency/shared_state/\"\n#~ \"arc.md).\"\n#~ msgstr \"\"\n#~ \"Εάν πρέπει να μεταλλάξετε τα δεδομένα μέσα σε ένα \\\"Rc\\\", θα πρέπει να \"\n#~ \"τυλίξετε τα δεδομένα μέσα έναν τύπο όπως [`Cell` ή `RefCell`](../\"\n#~ \"concurrency/shared_state/arc.md). Ανατρέξτε στο [`Arc`](https://doc.rust-\"\n#~ \"lang.org/std/sync/struct.Mutex.html) εάν βρίσκεστε σε ένα multi-threaded \"\n#~ \"συμφραζόμενα.\"\n\n#, fuzzy\n#~ msgid \"Like C++'s `std::shared_ptr`.\"\n#~ msgstr \"\"\n#~ \"Το \\\"clone\\\" είναι φθηνό: δημιουργεί έναν δείκτη στην ίδια κατανομή και \"\n#~ \"αυξάνει το πλήθος αναφοράς.\"\n\n#, fuzzy\n#~ msgid \"The module content can be omitted:\"\n#~ msgstr \"Το περιεχόμενο της ενότητας μπορεί να παραλειφθεί:\"\n\n#, fuzzy\n#~ msgid \"The `garden` module content is found at:\"\n#~ msgstr \"Το περιεχόμενο της ενότητας «garden» βρίσκεται στη διεύθυνση:\"\n\n#, fuzzy\n#~ msgid \"`src/garden.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden.rs` (μοντέρνο στυλ Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/mod.rs` (παλαιότερο στυλ Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"Similarly, a `garden::vegetables` module can be found at:\"\n#~ msgstr \"\"\n#~ \"Ομοίως, μια ενότητα «garden:: λαχανικά» μπορεί να βρεθεί στη διεύθυνση:\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden/vegetables.rs` (μοντέρνο στυλ Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/vegetables/mod.rs` (παλαιότερο στυλ Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the following code to <https://play.rust-lang.org/> and implement \"\n#~ \"the function:\"\n#~ msgstr \"\"\n#~ \"Αντιγράψτε τον παρακάτω κώδικα στο <https://play.rust-lang.org/> και \"\n#~ \"εφαρμόστε το λειτουργία:\"\n\n#, fuzzy\n#~ msgid \"`move` closures only implement `FnOnce`.\"\n#~ msgstr \"Τα κλεισίματα «μετακίνησης» εφαρμόζουν μόνο το «FnOnce».\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We've seen how a function can take arguments which implement a trait:\"\n#~ msgstr \"\"\n#~ \"Είδαμε πώς μια συνάρτηση μπορεί να λάβει ορίσματα που υλοποιούν ένα \"\n#~ \"χαρακτηριστικό:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"However, how can we store a collection of mixed types which implement \"\n#~ \"`Display`?\"\n#~ msgstr \"\"\n#~ \"Ωστόσο, πώς μπορούμε να αποθηκεύσουμε μια συλλογή μικτών τύπων που \"\n#~ \"υλοποιούν το \\\"Display\\\";\"\n\n#, fuzzy\n#~ msgid \"For this, we need _trait objects_:\"\n#~ msgstr \"Για αυτό, χρειαζόμαστε _trait αντικείμενα_:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Similarly, you need a trait object if you want to return different types \"\n#~ \"implementing a trait:\"\n#~ msgstr \"\"\n#~ \"Ομοίως, χρειάζεστε ένα αντικείμενο χαρακτηριστικών εάν θέλετε να \"\n#~ \"επιστρέψετε διαφορετικές τιμές υλοποίηση ενός χαρακτηριστικού:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/\"\n#~ \"std/ffi/) module, particular for [`CStr`](https://doc.rust-lang.org/std/\"\n#~ \"ffi/struct.CStr.html) and [`CString`](https://doc.rust-lang.org/std/ffi/\"\n#~ \"struct.CString.html) types which are used to hold NUL-terminated strings \"\n#~ \"coming from C. The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) \"\n#~ \"also has a very useful chapter about FFI.\"\n#~ msgstr \"\"\n#~ \"Θα θέλετε επίσης να περιηγηθείτε στη λειτουργική μονάδα [`std::ffi`]\"\n#~ \"(https://doc.rust-lang.org/std/ffi/), ειδικά για το [`CStr`](https://doc.\"\n#~ \"rust-lang.org/std/ffi/struct.CStr.html) και τύπους [`CString`](https://\"\n#~ \"doc.rust-lang.org/std/ffi/struct.CString.html) που χρησιμοποιούνται για \"\n#~ \"τη διατήρηση συμβολοσειρών με τερματισμό NUL που προέρχονται από Γ. Το \"\n#~ \"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) έχει επίσης ένα \"\n#~ \"πολύ χρήσιμο κεφάλαιο για το FFI.\"\n\n#, fuzzy\n#~ msgid \"Fearless Concurrency\"\n#~ msgstr \"Ατρόμητος Συγχρονισμός\"\n\n#, fuzzy\n#~ msgid \"Day 4 Morning Exercise\"\n#~ msgstr \"4η ημέρα Πρωινή άσκηση\"\n"
  },
  {
    "path": "po/es.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-07-19T19:45:30Z\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\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=1; plural=0;\\n\"\n\"X-Generator: Poedit 3.4.2\\n\"\n\"X-Poedit-Bookmarks: -1,304,-1,-1,-1,-1,-1,-1,-1,-1\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Te damos la bienvenida a Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Desarrollo del curso\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Estructura del curso\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Combinaciones de teclas\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Traducciones\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Usando Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Ecosistema Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Ejemplos de Código\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Ejecutar Cargo a nivel local\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Día 1: mañana\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Te damos la bienvenida\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hola, Mundo\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"¿Qué es Rust?\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Ventajas de Rust\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Tipos y valores\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variables\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Valores\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Aritmética\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Inferencia de tipos\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Ejercicio: Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Solución\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Básicos de Control de Flujo\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Expresiones `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Bucles\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` y `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Etiquetas\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Bloques y ámbitos\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Ámbitos y _Shadowing_\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funciones\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Macros\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Ejercicio: secuencia de Collatz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Día 1: Tarde\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Tuplas y arrays\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Arrays\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Tuplas\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Iteración de Arreglos (_Arrays_)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Patrones y Desestructuración\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Ejercicio: arrays anidados\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"Referencias\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Enums compartidas\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Referencias exclusivas\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Slices: `&[T]`\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Cadenas de texto (_Strings_)\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Ejercicio: geometría\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Tipos definidos por el usuario\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"Estructuras con nombre\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Estructuras de tuplas\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Enumeraciones\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"Estático\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Const (constantes)\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Aliases de tipo\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Ejercicio: eventos de ascensor\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Día 2: Mañana\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Correspondencia de Patrones\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Correspondencia de Valores\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"Desestructurando Structs\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Desestructurando Enums\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Control de Flujo _Let_\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Ejercicio: evaluación de expresiones\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Métodos y Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Métodos\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Implementación de Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Supertraits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Tipos de datos asociados\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Derivación de Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Ejercicio: registro genérico\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Día 2: tarde\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Genéricos\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Funciones genéricas\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Tipos de Datos Genéricos\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Traits Genéricos\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Trait Bounds\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Ejercicio: `min` genérico\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Tipos de la Biblioteca Estándar\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Biblioteca estándar\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Documentación\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec` (_Vectores_)\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Ejercicio: Contador\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Traits de la biblioteca estándar\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Comparaciones\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Operadores\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` e `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Probando\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` y `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, sintaxis de actualización de structs\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Cierres\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Ejercicio: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Día 3: Mañana\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Manejo de Memoria\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Revisión de la memoria de programas\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Métodos de Gestión de Memoria\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Ownership\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Semántica de movimiento\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"Trait `Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Tipos Copy\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"Trait `Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Ejercicio: Constructores\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Punteros inteligentes\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Objetos Trait Poseídos\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Ejercicio: Árbol binario\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Día 3: Tarde\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Préstamos (_Borrowing_)\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Emprestar (_borrow_) un valor\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Verificación de Préstamos\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Errores de Préstamo\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Mutabilidad Interior\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Ejercicio: Estadísticas de Salud\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Duraciones de vida\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Anotaciones de duración de vida\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Elisión de duración de vida\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Duraciones de vida de estructuras (_structs_)\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Ejercicio: Análisis de Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Día 4: Mañana\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Iteradores\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Ejercicio: Encadenamiento de métodos del iterador\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Módulos\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Jerarquía del sistema de archivos\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Visibilidad\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Ejercicio: Módulos para una biblioteca GUI\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Probando\"\n\n#: src/SUMMARY.md src/testing.md\nmsgid \"Test Modules\"\nmsgstr \"Módulos de Pruebas\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Otros tipos de pruebas\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Lints de compiladores y Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Ejercicio: Algoritmo de Luhn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Día 4: Tarde\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Manejo de Errores\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Pánicos\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Operador `Try` (Intentar)\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Conversiones `Try` (Intentar)\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Trait `Error`\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` y `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Ejercicio: Reescribir con `Result`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Unsafe Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"Unsafe\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Dereferenciación de Punteros Sin Formato\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Variables Estáticas Mutables\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Uniones\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Funciones Inseguras (_Unsafe_)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Implementación de Traits Unsafe (Inseguras)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Ejercicio: Envoltorio de FFI\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Configurar\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Reglas de Compilación (Build)\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Binarios\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Biblioteca\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Tutorial de Servicio de Cumpleaños\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Interfaz\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"API de Servicios\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Servicio\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Servidor\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Despliegue\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Cliente\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Cambio de API\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Actualizando Implementaciones\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"Tipos AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Tipos Primitivos\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Tipos Array\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Enviando Objectos\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"Variables\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Enviando Archívos\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Simulaciones\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Almacenamiento de registros\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interoperabilidad\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Con C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Llamar a C con Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Llamar a Rust desde C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Con C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"El Modulo Puente (_Bridge_)\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust Bridge (_Puente_)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"C++ generado\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"Bridge en C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Tipos de datos compartidos\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Enums compartidos\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Manejo de Errores en Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Manejo de Errores en C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Tipos adicionales\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Compilar en Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Compilar en Android: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Compilar en Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Con Java\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/android/morning.md src/exercises/bare-metal/morning.md\n#: src/exercises/bare-metal/afternoon.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Ejercicios\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Comparación de los ecosistemas de Chromium y Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Política\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Código inseguro\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Depender de código de Rust desde Chromium C++\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Ejercicio\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Biblioteca `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Reglas GN para pruebas de Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"Macro `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperabilidad con C++\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Ejemplos\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Limitaciones de CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Manejo de Errores en CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Manejo de Errores: Ejemplo QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Manejo de Errores: Ejemplo PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Usar CXX en Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Añadir crates de terceros\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Configurar Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Configurar `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Descargar crates\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Generar reglas de compilación `gn`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Resolución de problemas\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Compilar secuencias de comandos que generan código\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\"Compilar secuencias de comandos que compilan C++ o llevan a cabo acciones \"\n\"arbitrarias\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Depender de un crate\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Revisiones y auditorías\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Comprobaciones en el código fuente de Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Mantener los crates actualizados\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Poner en práctica todo lo aprendido: ejercicio\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Soluciones de Ejercicios\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal: mañana\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Un Pequeño Ejemplo\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Microcontroladores\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO sin procesar\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"Crates HAL\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Crates de Soporte de Placa\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"El Patrón de Tipo de Estado\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` y `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Depuración\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Otros proyectos\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Brújula\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Soluciones\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: tarde\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Procesadores de aplicaciones\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Iniciación a Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Ensamblador en línea\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Escribir un controlador UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Más traits\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Un controlador UART mejor\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Varios registros\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Conductor\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Cómo usarlo\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Excepciones\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Crates útiles\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Controlador RTC\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concurrencia: mañana\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Hilos\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Hilos Simples\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Hilos con ámbito\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Canales\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Transmisores y Receptores\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Canales sin límites\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Canales delimitados\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` y `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"Traits de Marcador\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Ejemplos\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Estado compartido\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Ejemplo\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"La cena de los filósofos\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Comprobador de enlaces multihilo\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concurrencia: tarde\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Conceptos básicos de Async\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Future\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Runtimes (Tiempos de Ejecución)\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Tasks\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Canales y Control de Flujo\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Canales asíncronos\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Unir\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Seleccionar\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Inconvenientes\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Bloqueo del ejecutor\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Traits asíncronos\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Cancelación\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Aplicación de chat de difusión\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Conclusiones\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"¡Gracias!\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Glosario\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Otros recursos\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Créditos\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Flujo de trabajo](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[Colaboradores de GitHub](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![Estrellas de GitHub](https://img.\"\n\"shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n\"(https://github.com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Este es un curso gratuito de Rust desarrollado por el equipo de Android en \"\n\"Google. El curso abarca el espectro completo de Rust, desde la sintaxis \"\n\"básica hasta temas avanzados como genéricos y el manejo de errores.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"La última versión del curso se puede encontrar en <https://google.github.io/\"\n\"comprehensive-rust/>. Si lo estás leyendo en otro lugar, consulta allí para \"\n\"obtener actualizaciones.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"Este curso está disponible en otros idiomas. Seleccione su idioma preferido \"\n\"en la esquina superior a la derecha, o navega a la página de [Tradduciones]\"\n\"(Translations](running-the-course/translations.md) para una lista de todas \"\n\"las traducciones disponibles.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\"Este curso tambien está disponible [como un PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"El objetivo del curso es enseñarte Rust. Suponemos que no sabes nada sobre \"\n\"Rust y esperamos lograr lo siguiente:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Darte un entendimiento comprensivo de la sintaxis y lenguaje Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"Permitirte modificar programas de Rust y escribir otros nuevos.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Enseñarte idiomática propia de Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"Llamamos a los cuatro primeros días del curso Fundamentos de Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Basándonos en esto, te invitamos a profundizar en uno o más temas \"\n\"especializados:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): un curso de medio día sobre el uso de Rust en el \"\n\"desarrollo de la plataforma Android (AOSP). En él se incluye la \"\n\"interoperabilidad con C, C++ y Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](../chromium.md): una clase de medio día sobre el uso de Rust \"\n\"dentro del navegador Chromium. Incluye interoperabilidad con C++ y como \"\n\"incorporar bibliotecas de tercer partido (\\\"crates\\\") en Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare Metal](bare-metal.md): una clase de un día sobre el uso de Rust para \"\n\"el desarrollo bare-metal (insertado). Se tratarán tanto los \"\n\"microcontroladores como los procesadores de aplicaciones.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concurrencia](concurrency.md): una clase de un día sobre concurrencia en \"\n\"Rust. Abordaremos tanto la concurrencia clásica (programación interrumpible \"\n\"mediante hilos y exclusiones mutuas), como la concurrencia async / await \"\n\"(multitarea cooperativa mediante traits future).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Objetivos que no trataremos\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust es un lenguaje muy amplio y no podremos abarcarlo todo en unos pocos \"\n\"días. Algunos de los objetivos que no se plantean en este curso son los \"\n\"siguientes:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Aprender a desarrollar macros: consulta el [capítulo 19.5 del Libro de Rust ]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) y [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Suposiciones\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"El curso presupone que ya sabes programar. Rust es un lenguaje estáticamente \"\n\"tipado y, a veces, haremos comparaciones con C y C++ para explicarlo mejor o \"\n\"contrastar nuestro enfoque.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Si sabes programar en un lenguaje dinámicamente tipado, como Python o \"\n\"JavaScript, podrás seguir el ritmo sin problema.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Este es un ejemplo de una _nota del orador_. Las utilizaremos para añadir \"\n\"información adicional a las diapositivas. Puede tratarse de puntos clave que \"\n\"el instructor debería tratar, así como de respuestas a preguntas frecuentes \"\n\"que surgen en clase.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Esta página está dirigida al instructor del curso.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"A continuación, te ofrecemos información general sobre cómo se ha \"\n\"desarrollado el curso en Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"Normalmente impartimos las clases de 09:00 a 16:00, con una pausa para \"\n\"almorzar de una hora. Esto deja 3 horas para la clase de la mañana y 3 horas \"\n\"para la clase de la tarde. Ambas sesiones incluyen varias pausas y tiempo \"\n\"para que los estudiantes completen los ejercicios.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Antes de impartir el curso, te recomendamos hacer lo siguiente:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Familiarízate con el material del curso. Hemos incluido notas del orador \"\n\"para destacar los puntos clave (ayúdanos a añadir más notas de este tipo). \"\n\"Cuando hagas una presentación, asegúrate de abrir las notas del orador en \"\n\"una ventana emergente (haz clic en el enlace que tiene una pequeña flecha \"\n\"junto a \\\"Notas del orador\\\"). De esta manera, tendrás una pantalla \"\n\"despejada para mostrar a la clase.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Decide bien las fechas. Dado que el curso dura cuatro días, te recomendamos \"\n\"que repartas los días a lo largo de dos semanas. Los participantes del curso \"\n\"han dicho que les resulta útil hacer pausas durante el curso, ya que les \"\n\"ayuda a procesar toda la información que les proporcionamos.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Busca una sala con capacidad suficiente para los participantes presenciales. \"\n\"Recomendamos una sala para entre 15 y 25 personas. Es el tamaño ideal para \"\n\"que los alumnos se sientan cómodos haciendo preguntas y para que el profesor \"\n\"tenga tiempo de responderlas. Asegúrate de que en la sala haya _mesas_ para \"\n\"ti y para los alumnos: todos necesitaréis sentaros y trabajar con vuestros \"\n\"portátiles. Además, como instructor, programarás mucho en directo, por lo \"\n\"que un atril no te resultará muy útil.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"El mismo día del curso, llega con antelación a la clase para preparar todo \"\n\"lo necesario. Te recomendamos que realices la presentación directamente \"\n\"desde `mdbook serve` en tu portátil (consulta las \\\\[instrucciones de \"\n\"instalación\\\\]\\\\[3\\\\]). Así conseguirás un rendimiento óptimo y que no haya \"\n\"demoras al pasar de una página a otra. También podrás corregir las erratas a \"\n\"medida que tú o los participantes del curso las detectéis.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Deja que los alumnos resuelvan los ejercicios por sí mismos o en pequeños \"\n\"grupos. Solemos dedicar entre 30 y 45 minutos a los ejercicios por la mañana \"\n\"y por la tarde (incluido el tiempo para revisar las soluciones). Asegúrate \"\n\"de preguntar a los asistentes si les está costando hacerlo o si hay algo en \"\n\"lo que puedas ayudarles. Cuando veas que varias personas tienen el mismo \"\n\"problema, coméntalo delante de la clase y ofrece una solución. Por ejemplo, \"\n\"enséñales dónde encontrar la información importante en la biblioteca \"\n\"estándar.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Eso es todo. ¡Buena suerte con el curso, y esperamos que te diviertas tanto \"\n\"como nosotros!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Después, [envíanos un comentario](https://github.com/google/comprehensive-\"\n\"rust/discussions/86) para que podamos seguir mejorando  el curso. Estaremos \"\n\"encantados de que nos cuentes qué aspectos destacarías y qué se puede \"\n\"mejorar. Tus alumnos también pueden [enviarnos sus sugerencias](https://\"\n\"github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Fundamentos de Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Los primeros cuatro días forman los [Fundamentos de Rust](../welcome-day-1.\"\n\"md). ¡Los días son muy intensos y cubrimos mucho terreno!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Horario del curso:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"Día 1 por la mañana (2 horas y 5 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"Sección\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Duration\"\nmsgstr \"Duración\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"5 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"15 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-4.md\nmsgid \"40 minutes\"\nmsgstr \"40 minutos\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"Día 1 por la tarde (2 horas y 35 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"35 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md\n#: src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"55 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"50 minutos\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Día 2 por la mañana (2 horas y 10 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md\n#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"3 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"1 hour\"\nmsgstr \"1 hora\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"Día 2 por la tarde (3 horas y 15 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"45 minutos\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"1 hora y 10 minutos\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"Día 3 por la mañana (2 horas y 20 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"Día 3 por la tarde (1 hora y 55 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"Día 4 por la mañana (2 horas y 40 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"Día 4 por la tarde (2 horas y 15 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"1 hora y 5 minutos\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Información más detallada\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Además de la clase de 4 días sobre los fundamentos de Rust, abordamos \"\n\"algunos temas más especializados:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust en Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Rust en Android](../android.md) es un curso de medio día sobre el uso de \"\n\"Rust para el desarrollo de la plataforma Android. En él se incluye la \"\n\"interoperabilidad con C, C++ y Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Necesitarás [conseguir el AOSP](https://source.android.com/docs/setup/\"\n\"download/downloading). Descarga el [repositorio del curso](https://github.\"\n\"com/google/comprehensive-rust) en el mismo ordenador y mueve el directorio \"\n\"`src/android/` a la raíz del AOSP. De esta forma, el sistema de compilación \"\n\"de Android verá los archivos `Android.bp` en `src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Asegúrate que `adb sync` funciona con tu emulador o en un dispositivo físico \"\n\"y haz pre-build en todos los ejemplos de Android usando `src/android/\"\n\"build_all.sh`. Lee el script para ver los comandos que corren y asegúrate \"\n\"que funcionan cuando lo corres a mano.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust en Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"[Rust en Chromium](../chromium.md) es una clase en profundidad de medio día \"\n\"sobre el uso de Rust como parte del navegador Chromium. Incluye el uso de \"\n\"Rust en el sistema de compilación `gn` de Chromium e incorpora bibliotecas \"\n\"de terceros (\\\"crates\\\") e interoperabilidad en C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Deberás poder compilar Chromium: [recomendamos] una compilación de \"\n\"depuración de componentes (../chromium/setup.md) por cuestiones de \"\n\"velocidad, pero cualquier compilación funcionará de forma correcta. \"\n\"Asegúrate de que puedes ejecutar el navegador Chromium que has compilado.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Bare Metal Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Bare Metal Rust](../bare-metal.md) es una clase de un día sobre cómo usar \"\n\"Rust para el desarrollo bare-metal (insertado). Se tratarán tanto \"\n\"microcontroladores como procesadores de aplicaciones.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Para la parte de los microcontroladores, necesitarás comprar con antelación \"\n\"la segunda versión de la placa programable [BBC micro:bit](https://microbit.\"\n\"org/). Todo el mundo deberá instalar una serie de paquetes, tal como se \"\n\"describe en la [página de bienvenida](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Concurrencia en Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Concurrencia en profundidad](../concurrency.md) es una clase de un día \"\n\"sobre la concurrencia clásica y la concurrencia `async`/`await`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Necesitarás configurar un nuevo crate, y descargar y preparar las \"\n\"dependencias. A continuación, podrás copiar y pegar los ejemplos en `src/\"\n\"main.rs` para experimentar con ellos:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Mañana (3 horas y205 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"30 minutos\"\n\n#: src/running-the-course/course-structure.md src/methods-and-traits.md\n#: src/std-types.md src/memory-management.md src/borrowing.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"20 minutos\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"Send y Sync\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Por la tarde (3 horas y 20 minutos, incluidos los descansos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Formato\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"El curso está diseñado para ser muy interactivo, por lo que te recomendamos \"\n\"que dejes que las preguntas guíen el aprendizaje de Rust.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Existen varias combinaciones de teclas útiles en mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"<kbd>Arrow-Left</kbd>: Navegar a la página anterior.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"<kbd>Arrow-Right</kbd>: Navegar a la siguiente página.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Ctrl + Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"<kbd>Ctrl + Enter</kbd>: Ejecutar el código de ejemplo seleccionado.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"<kbd>s</kbd>: Activar la barra de búsqueda.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"El curso se ha traducido a otros idiomas gracias a grupo de maravillosos \"\n\"voluntarios:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Portugués Brasileño](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"por [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) y \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Chino (simplificado)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"por [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK) y [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Chino (tradicional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"por [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen) y [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[Japonés](https://google.github.io/comprehensive-rust/ja/) por [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) y \"\n\"[@kantasv](https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Coreano](https://google.github.io/comprehensive-rust/ko/) por [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), y [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Español](https://google.github.io/comprehensive-rust/es/) por [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[Ucranio](https://google.github.io/comprehensive-rust/uk/) por [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam), y [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Cambia el idioma con el seleccionador situado en la esquina superior derecha.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Traducciones Incompletas\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Hay muchas traducciones todavía en curso. A continuación, incluimos enlaces \"\n\"a las traducciones más actualizadas:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[Árabe](https://google.github.io/comprehensive-rust/es/) por [@younies]\"\n\"(https://github.com/younies)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Bengalí](https://google.github.io/comprehensive-rust/bn/) por [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Francés](https://google.github.io/comprehensive-rust/fr/) por [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen), y \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Alemán](https://google.github.io/comprehensive-rust/de/) por [@Throvn]\"\n\"(https://github.com/Throvn) y [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Italiano](https://google.github.io/comprehensive-rust/it/) por \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) y [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\"La lista completa de traducciones con su estado corriente también esta \"\n\"disponible [a partir de su ultima actualización](https://google.github.io/\"\n\"comprehensive-rust/translation-report.html) o [sincronizado a la versión mas \"\n\"reciente del curso](https://google.github.io/comprehensive-rust/synced-\"\n\"translation-report.html).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Si quieres ayudar en esta iniciativa, consulta [nuestras instrucciones]\"\n\"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) \"\n\"para empezar. Las traducciones se coordinan en la [herramienta de \"\n\"seguimiento de incidencias](https://github.com/google/comprehensive-rust/\"\n\"issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Cuando empieces a informarte sobre Rust, conocerás [Cargo](https://doc.rust-\"\n\"lang.org/cargo/), la herramienta estándar que se utiliza en el ecosistema de \"\n\"Rust para crear y ejecutar sus aplicaciones. En este artículo, te ofrecemos \"\n\"una breve descripción de lo que es Cargo, cómo se integra en el ecosistema \"\n\"más amplio y cómo encaja en esta formación.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Instalación\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Sigue las instrucciones que se indican en <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Esto te dará la herramienta de compilación Cargo (`cargo`) y el compilador \"\n\"Rust (`rustc`). También obtendrás `rustup`, una utilidad de línea de \"\n\"comandos que puedes utilizar para instalar diferentes versiones del \"\n\"compilador.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Después de instalar Rust, debes configurar tu editor o IDE para utilizar \"\n\"Rust. La mayoría de los editores lo hacen con [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), que ofrece funciones de autocompletado y salto a la \"\n\"definición para [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs) y [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), entre otros. También hay \"\n\"disponible otro IDE denominado [RustRover](https://www.jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"En Debian o Ubuntu, también puedes instalar Cargo, el código fuente de Rust \"\n\"y [el formateador de Rust](https://github.com/rust-lang/rustfmt) a través de \"\n\"`apt`. Sin embargo, solo podrás conseguir una versión de Rust obsoleta que \"\n\"podría dar lugar a comportamientos inesperados. El comando es el siguiente:\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"En macOS, puedes usar [Homebrew](https://brew.sh/) para instalar Rust, pero \"\n\"esto podría proveer una versión anticuada. Por lo tanto, es recomendad \"\n\"instalar Rust del sitio oficial.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"El ecosistema de Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"El ecosistema de Rust se compone de varias herramientas, entre las que se \"\n\"incluyen las siguientes:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: el compilador de Rust que convierte archivos `.rs` en binarios y \"\n\"otros formatos intermedios.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: herramienta de compilación y gestión de dependencias de Rust. Cargo \"\n\"sabe cómo descargar dependencias, que normalmente se alojan en <https://\"\n\"crates.io>, y las transfiere a `rustc` al crear el proyecto. Cargo también \"\n\"incorpora un ejecutor de pruebas que se utiliza para realizar pruebas \"\n\"unitarias.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: el instalador y actualizador de cadenas de herramientas de Rust. \"\n\"Esta herramienta se utiliza para instalar y actualizar `rustc` y `cargo` \"\n\"cuando se lanzan nuevas versiones de Rust. Además, `rustup` también puede \"\n\"descargar documentación de la biblioteca estándar. Puedes tener varias \"\n\"versiones de Rust instaladas a la vez y `rustup` te permitirá cambiar de una \"\n\"a otra según lo necesites.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Puntos clave:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust cuenta con un programa de lanzamiento rápido en el que se publica una \"\n\"nueva versión cada seis semanas. Las nuevas versiones mantienen la \"\n\"retrocompatibilidad con las versiones anteriores, además de habilitar nuevas \"\n\"funciones.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Hay tres canales de lanzamiento: \\\"stable\\\", \\\"beta\\\" y \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Las funciones nuevas se prueban en \\\"nightly\\\", y \\\"beta\\\" es lo que se \"\n\"convierte en \\\"estable\\\" cada seis semanas.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Las dependencias también pueden resolverse desde \\\\[registros\\\\] \"\n\"alternativos, git, carpetas, etc.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust también tiene varias \\\\[ediciones\\\\]: la más actual es Rust 2021. Las \"\n\"ediciones anteriores son Rust 2015 y Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Las ediciones pueden introducir cambios de incompatibilidad con versiones \"\n\"anteriores en el lenguaje.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Para evitar que se rompa el código, las ediciones son opcionales: selecciona \"\n\"la edición para tu crate a través del archivo `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Para evitar la división del ecosistema, los compiladores de Rust pueden \"\n\"mezclar el código escrito para distintas ediciones.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Hay que mencionar que es bastante raro utilizar el compilador directamente y \"\n\"no a través de `cargo` (la mayoría de los usuarios nunca lo hacen).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Vale la pena mencionar que Cargo en sí es una herramienta extremadamente \"\n\"poderosa e integral.  Es capaz de hacer muchas cosas avanzadas y no \"\n\"limitadas a:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Estructura del proyecto/paquete\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"Manejo/Cache de Dependencias de Desarrollo y de Runtime\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[Instalación global](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"También es extensible con plugins de subcomandos (como [cargo clippy]\"\n\"(https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Consulta más información en el [libro oficial de Cargo](https://doc.rust-\"\n\"lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Código de ejemplo en esta formación\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"En esta formación, aprenderemos el lenguaje Rust principalmente con ejemplos \"\n\"que podrás ejecutar con tu navegador. De este modo, la configuración es \"\n\"mucho más sencilla y se asegura una experiencia homogénea para todos.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Se recomienda instalar Cargo, ya que facilitará la realización de los \"\n\"ejercicios. El último día realizaremos un ejercicio más largo en el que se \"\n\"mostrará cómo trabajar con dependencias, y para eso se necesita Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Los bloques de código de este curso son totalmente interactivos:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"¡Edítame!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"You can use <kbd>Ctrl + Enter</kbd> to execute the code when focus is in the \"\n\"text box.\"\nmsgstr \"\"\n\"Puedes usar <kbd>Ctrl + Enter</kbd> para ejecutar el código cuando el cursor \"\n\"esté en el cuadro de texto.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"La mayoría de los códigos de ejemplo se pueden editar, como se muestra \"\n\"arriba, pero hay algunos que no se pueden editar por varios motivos:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Los playgrounds insertados no pueden ejecutar pruebas unitarias. Copia y \"\n\"pega el código y ábrelo en la página del playground para mostrar pruebas \"\n\"unitarias.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Los playgrounds insertados pierden su estado en cuanto sales e de la página. \"\n\"Por este motivo, los alumnos deben resolver los ejercicios con una versión \"\n\"local de Rust o a través del playground.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Ejecutar código de forma local con Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Si quieres experimentar con el código en tu propio sistema, primero tendrás \"\n\"que instalar Rust. Para ello, sigue las [instrucciones del Libro de Rust]\"\n\"(https://doc.rust-lang.org/book/ch01-01-installation.html). De este modo, \"\n\"obtendrás un  `rustc` y un `cargo` que funcionen. En el momento de escribir \"\n\"esto, la última versión estable de Rust tiene estos números de versión:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"También puedes usar cualquier versión posterior, ya que Rust mantiene la \"\n\"retrocompatibilidad.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Una vez hecho lo anterior, sigue estos pasos para compilar un binario de \"\n\"Rust a partir de uno de los ejemplos de la formación:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Haz clic en el botón \\\"Copiar en el portapapeles\\\" del ejemplo que quieras \"\n\"copiar.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Usa `cargo new exercise` para crear un directorio `exercise/` para tu código:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Ve a `exercise/` y usa `cargo run` para compilar y ejecutar tu binario:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Sustituye el código de plantilla en `src/main.rs` con tu propio código. Por \"\n\"ejemplo, usando el ejemplo de la página anterior, haz que `src/main.rs` \"\n\"tenga el siguiente aspecto:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"Usa `cargo run` para hacer build y ejecutar tu binario actualizado:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Comprueba que no haya errores en el proyecto con `cargo check`. Compílalo \"\n\"sin ejecutarlo con `cargo build`. Encontrarás la salida en `target/debug/` \"\n\"para una versión de depuración normal. Usa `cargo build --release` para \"\n\"generar una compilación de lanzamiento optimizada en `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Edita `Cargo.toml` para añadir dependencias a tu proyecto. Cuando ejecutes \"\n\"comandos `cargo`, se descargarán y compilarán automáticamente las \"\n\"dependencias que falten.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Anima a los participantes de la clase a instalar Cargo y utilizar un editor \"\n\"local. Les facilitará mucho las cosas, ya que dispondrán de un entorno de \"\n\"desarrollo normal.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Te damos la bienvenida al Día 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Este es el primer día de Comprehensive Rust. Hoy trataremos muchos temas:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Sintaxis básica Rust: variables, scalar y tipos compuestos, enums, structs,  \"\n\"references, funciones, y métodos.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Inferencia de tipos.\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"Construcciones de flujos de control: bucles, condicionales, etc.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"Tipos definidos por el usuario: estructuras y enumeraciones.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\"Emparejamiento de Patrones: desestructuración de enums, structs y arrays.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Horario\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 5 minutos. Esta sesión contiene:\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Recuerda a los alumnos lo siguiente:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Deben hacer las preguntas cuando surgen, no las guarden hasta el final.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"El curso está diseñado para ser muy interactivo, ¡las discusiones son muy \"\n\"recomendadas!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Como instructor, debes intentar llevar discusiones relevantes, por ejemplo, \"\n\"mantener relación de cómo Rust hace las cosas vs otros lenguajes. Puede \"\n\"costar encontrar un balance adecuado, pero generalmente permite las \"\n\"discusiones ya que captan la atención de la gente mas que los discursos \"\n\"unidireccionales.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Las preguntas deberían ser sobre cosas acerca del contenido de los slides.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Esto está perfecto! Repetir es una parte importante del aprendizaje. \"\n\"Recuerda que los slides son solo un soporte y tienes libertad de saltearlos \"\n\"cuando quieras.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"El objetivo del primer día es mostrar los aspectos \\\"básicos\\\" de Rust que \"\n\"podrían tener paralelismos inmediatos con otros lenguajes de programación. A \"\n\"lo largo del curso se estudiarán los aspectos más avanzados de Rust.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Si estás impartiendo el curso en un aula, este un buen lugar para repasar el \"\n\"calendario. Debes tener en cuenta que hay un ejercicio al final de cada \"\n\"parte, seguido de una pausa. Organiza las sesiones de forma que se explique \"\n\"la solución del ejercicio después de la pausa. Las horas que se indican son \"\n\"una sugerencia para que el curso se ciña al horario establecido. ¡No dudes \"\n\"en modificar el calendario y hacer los cambios que consideres necesarios!\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 15 minutos y contiene:\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"Diapositiva\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"10 minutos\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"2 minutos\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust es un nuevo lenguaje de programación que lanzó su versión [1.0 en el \"\n\"2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust es un lenguaje compilado estático similar a C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` usa LLVM como backend.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust es compatible con muchas [plataformas y arquitecturas](https://doc.rust-\"\n\"lang.org/nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust se utiliza en una gran variedad de dispositivos:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware y cargadores de inicio,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"pantallas inteligentes,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"teléfonos móviles,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"ordenadores,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"servidores.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust satisface las mismas necesidades que C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Gran flexibilidad.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Nivel alto de control.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Se puede reducir verticalmente a dispositivos muy limitados, como los \"\n\"microcontroladores.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"No tiene _runtime_ ni _garbage collection_.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Se centra en la fiabilidad y la seguridad sin sacrificar el rendimiento.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Estas son algunas de las ventajas competitivas de Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_Seguridad de la memoria durante el tiempo de compilación:_ se evitan clases \"\n\"completas de errores de memoria durante el tiempo de compilación\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"No hay variables no inicializadas.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"No hay errores double free.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"No hay errores use-after-free.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"No hay punteros `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"No se olvidan las exclusiones mutuas bloqueadas.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"No hay condiciones de carrera de datos entre hilos.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"No se invalidan los iteradores.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_No hay comportamientos indefinidos en el tiempo de ejecución:_ es decir, \"\n\"una instrucción de Rust nunca queda sin especificar\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Se comprueban los límites de acceso a los arrays.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Se define el desbordamiento de enteros (_panic_ o _wrap-around_).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_Características de los lenguajes modernos:_ es tan expresivo y ergonómico \"\n\"como los lenguajes de nivel superior\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enumeraciones (_Enums_) y coincidencia de patrones.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Genéricos.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"Sin _overhead_ de FFI.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Abstracciones sin coste.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Excelentes errores de compilación.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Gestor de dependencias integrado.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Asistencia integrada para pruebas.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Compatibilidad excelente con el protocolo del servidor de lenguaje.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"No le dediques mucho tiempo a este punto. Todos estos aspectos se tratarán \"\n\"de forma más detallada más adelante.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Asegúrate de preguntar a la clase en qué lenguajes tienen experiencia. \"\n\"Dependiendo de la respuesta puedes destacar diferentes características de \"\n\"Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Experiencia con C o C++: Rust elimina una clase completa de _errores de \"\n\"runtime_ mediante el _borrow checker_. Obtienes un rendimiento similar al de \"\n\"C y C++, pero no tienes problemas de seguridad en la memoria. Además, \"\n\"obtienes un lenguaje moderno con elementos como la coincidencia de patrones \"\n\"y la gestión de dependencias integrado.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Experiencia con Java, Go, Python, JavaScript, etc.: Consigues la misma \"\n\"seguridad de memoria que en éstos lenguajes, además de una experiencia \"\n\"similar a la de un lenguaje de alto nivel. También consigues un rendimiento \"\n\"rápido y predecible como en C y C++ (sin recolector de memoria residual), \"\n\"así como acceso a hardware de bajo nivel (si lo necesitas).\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"El [playground de Rust](https://play.rust-lang.org/) ofrece una forma \"\n\"sencilla de ejecutar programas cortos de Rust y es la base de los ejemplos y \"\n\"ejercicios de este curso. Prueba a ejecutar el programa \\\"hello-world\\\" con \"\n\"el que empieza. Incluye algunas funciones útiles:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"En \\\"Tools\\\", usa la opción `rustfmt` para dar formato al código de forma \"\n\"\\\"estándar\\\".\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust cuenta con dos \\\"perfiles\\\" principales para generar código: Debug \"\n\"(comprobaciones adicionales del tiempo de ejecución, menor optimización) y \"\n\"Release (menos comprobaciones del tiempo de ejecución y mayor optimización). \"\n\"Puedes acceder a ellos haciendo clic en \\\"Debug\\\", en la parte superior.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Si te interesa, utiliza la opción \\\"ASM\\\" en \\\"...\\\" para ver el código de \"\n\"ensamblado que se ha generado.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Cuando sea la hora del descanso, anima a los asistentes a abrir el \"\n\"playground para que experimenten un poco. Hazles saber que pueden mantener \"\n\"la pestaña abierta y probar cosas durante el resto del curso. Resulta \"\n\"especialmente útil para los participantes con un nivel avanzado que quieran \"\n\"obtener más información sobre las optimizaciones o el ensamblaje generado de \"\n\"Rust.\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 40 minutos y contiene:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"Vamos a hablar del programa Rust más simple, un clásico Hola Mundo:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hola, 🌍\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Lo que ves:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Las funciones se introducen con `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Los bloques se delimitan con llaves, como en C y C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"La función `main` es el punto de entrada del programa.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust tiene macros higiénicas, como por ejemplo `println!`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Las cadenas de Rust están codificadas en UTF-8 y pueden contener caracteres \"\n\"Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Con esta diapositiva se intenta que los alumnos se sientan cómodos con el \"\n\"código de Rust. En los próximos tres días lo verán mucho, así que \"\n\"empezaremos con algo reconocible.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust es muy similar a otros lenguajes, como C, C++ o Java. Es imperativo y \"\n\"no intenta reinventar las cosas a menos que sea absolutamente necesario.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust es moderno y totalmente compatible con sistemas como Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust utiliza macros en situaciones en las que se desea un número variable de \"\n\"argumentos (sin [sobrecarga](basic-syntax/functions-interlude.md) de \"\n\"funciones).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Que las macros sean 'higiénicas' significa que no capturan \"\n\"accidentalmenteidentificadores del ámbito en el que se utilizan. En \"\n\"realidad, las macros de Rust solo son [parcialmente higiénicas](https://\"\n\"veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust es un lenguaje multiparadigma. Por ejemplo, cuenta con [funciones de \"\n\"programación orientadas a objetos](https://doc.rust-lang.org/book/ch17-00-\"\n\"oop.html) y, aunque no es un lenguaje funcional, incluye una serie de \"\n\"[conceptos funcionales](https://doc.rust-lang.org/book/ch13-00-functional-\"\n\"features.html).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust ofrece seguridad de tipos mediante tipado estático. Los enlaces a \"\n\"variables son hechos con `let`:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Elimina el comentario de `x = 20` para demostrar que las variables son \"\n\"inmutables de forma predeterminada. Añade la palabra clave `mut` para que se \"\n\"puedan hacer cambios.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"En este ejemplo, `i32` es el tipo de la variable. Se debe conocer durante el \"\n\"tiempo de compilación, pero la inferencia de tipos (véase más adelante) \"\n\"permite al programador omitirla en muchos casos.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"A continuación, se muestran algunos tipos integrados básicos, así como la \"\n\"sintaxis de los valores literales de cada tipo.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Tipos\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Literales\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Enteros con signo\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Enteros sin signo\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Números de coma flotante\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Valores escalares Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Booleanos\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Los tipos tienen la siguiente anchura:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN`, and `fN` son _N_ bits de capacidad,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` y `usize` tienen el ancho de un puntero,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` tiene un tamaño de 32 bits,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` tiene 8 bits de ancho.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Hay algunas sintaxis que no se han mostrado anteriormente:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Todos guiones bajos en los números pueden no utilizarse, ya que solo sirven \"\n\"para facilitar la lectura. Por lo tanto, `1_000` se puede escribir como \"\n\"`1000` (o `10_00`), y `123_i64` se puede escribir como `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"resultado: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"Es la primera vez que vemos una función distinta a `main`, pero el \"\n\"significado debería quedar claro: utiliza tres números enteros y devuelve \"\n\"uno. Más adelante, hablaremos sobre las funciones con más profundidad.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\"La aritmética es muy similar a otros idiomas, al igual que su precedencia.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"¿Qué pasa con el desbordamiento de enteros? En C y C++, el desbordamiento de \"\n\"números enteros _con signo_ no está definido, y podría tener diferentes \"\n\"resultados en diferentes plataformas o compiladores. En Rust sí está \"\n\"definido.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Cambia el `i32` a `i16` para observar un desbordamiento de un número entero, \"\n\"lo que da error (pánico) en una versión de depuración, pero lo envuelve en \"\n\"una compilación de lanzamiento. Hay otras opciones disponibles, como el \"\n\"desbordamiento, la saturación y el acarreo, a las que se accede mediante la \"\n\"sintaxis del método, por ejemplo, `(a * b).saturating_add(b * c).\"\n\"saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"De hecho, el compilador detectará si existe un desbordamiento de expresiones \"\n\"constantes, por ello el ejemplo requiere una función independiente.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust consultará cómo se _usa_ la variable para determinar el tipo:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Esta diapositiva muestra cómo el compilador de Rust infiere tipos basándose \"\n\"en restricciones proporcionadas por declaraciones y usos de variables.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Es muy importante subrayar que las variables que se declaran así no son de \"\n\"un \\\"tipo cualquiera\\\" dinámico que pueda contener cualquier dato. El código \"\n\"máquina generado por tal declaración es idéntico a la declaración explícita \"\n\"de un tipo. El compilador hace el trabajo por nosotros y nos ayuda a \"\n\"escribir código más conciso.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Cuando ningún elemento restringe el tipo de un literal entero, Rust lo \"\n\"define de forma predeterminada como `i32`. A veces aparece como `{integer}` \"\n\"en los mensajes de error. Del mismo modo, los literales de punto flotante se \"\n\"definen como `f64` de forma predeterminada.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ERROR: no hay implementación para `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"La secuencie de Fibonacci empieza con `[0, 1]`. Para n>1, el número de \"\n\"Fibonacci en la posición n se calcula de forma recursiva como la suma de los \"\n\"números de Fibonacci n-1 y n-2.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"Escribe una función `fib(n)` que calcule el número n de Fibonacci. ¿Cuándo \"\n\"da error pánico esta función?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// El caso base.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Implementar esto\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// El caso recursivo.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"if Expressions\"\nmsgstr \"Expresiones if\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"4 minutos\"\n\n#: src/control-flow-basics.md\nmsgid \"break and continue\"\nmsgstr \"`break` y `continue`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Expresiones `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Puedes usar [expresiones `if`](https://doc.rust-lang.org/reference/\"\n\"expressions/if-expr.html#if-expressions) de la misma forma que en otros \"\n\"lenguajes:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"cero!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"muy grande\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"enorme\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Además, puedes utilizar `if` como expresión. La última expresión de cada \"\n\"bloque se convierte en el valor de la expresión `if`:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"pequeño\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"grande\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"tamaño del número: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Dado que `if` es una expresión y debe tener un tipo concreto, ambos de sus \"\n\"bloques de ramas deben tener el mismo tipo. En el segundo ejemplo, muestra \"\n\"lo que sucede al añadir `;` después de `\\\"small\\\"`.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"Cuando se utiliza `if` en una expresión, esta debe tener un `;` para \"\n\"separarla de la siguiente instrucción. Elimina `;` antes de `println!` para \"\n\"ver el error del compilador.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"Hay tres palabras clave de bucle en Rust: `while`, `loop` y `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"Bucles `while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"La [palabra clave `while`](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops) es muy similar a la de otros lenguajes y \"\n\"ejecuta el cuerpo del bucle mientras que la condición sea valida.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"x final: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"El [bucle `for`](https://doc.rust-lang.org/std/keyword.for.html) itera sobre \"\n\"rangos de valores o las entradas de una colección:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"Los bucles `for` utilizan un concepto llamado \\\"iteradores\\\" para iterar \"\n\"sobre diferentes tipos de rangos/colecciones. Los iteradores serán \"\n\"discutidos en mas detalle mas adelante.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"Ten en cuenta que el bucle `for` solo se itera a `4`. Muestra la sintaxis \"\n\"`1..=5` para un intervalo inclusivo.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"El [bucle `loop`](https://doc.rust-lang.org/std/keyword.loop.html) repite \"\n\"hasta encontrar un `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Si quieres iniciar inmediatamente la siguiente iteración, usa [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Si quieres salir de un bucle antes de que termine, usa [`break`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#break-expressions). Para \"\n\"`loop`, este puede tomar una expresión opcional que se vuelve el valor de la \"\n\"expresión `loop`.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"De forma opcional, tanto `continue` como `break` pueden utilizar un \"\n\"argumento de etiqueta para interrumpir los bucles anidados:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elementos travesados: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"Ten en cuenta que `loop` es la única construcción de bucle que devuelve un \"\n\"valor no trivial. Esto se debe a que es inevitable que se introduzca al \"\n\"menos una vez (a diferencia de los bucles `while` y `for`).\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Bloques\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"En Rust, un bloque contiene una secuencia de expresiones rodeados por llaves \"\n\"`{}`. Cada bloque tiene el tipo y valor de la última expresión del bloque:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Si la última expresión termina con `;`, el tipo y el valor resultante será \"\n\"`()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Puedes mostrar cómo cambia el valor del bloque cambiando su última línea. \"\n\"Por ejemplo, añade o quita un punto y coma, o utiliza la expresión `return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"El ámbito de una variable se limita al bloque que la contiene.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Puedes sombrear variables, tanto las de ámbitos externos como las del propio \"\n\"ámbito:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"antes: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hola\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"ámbito interno: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"sombreado en el ámbito interno: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"después: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"Para demostrar que el ámbito de una variable está limitado, añade una `b` en \"\n\"el bloque interno del último ejemplo y, a continuación, intenta acceder a \"\n\"ella desde fuera de ese bloque.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Definición: _Shadowing_ (sombreado) es distinto de la mutación, ya que \"\n\"después de sombrear las ubicaciones de memoria de las dos variables existen \"\n\"al mismo tiempo. Ambas están disponibles bajo el mismo nombre, en función de \"\n\"dónde se utiliza en el código.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Una variable sombreada puede tener un tipo diferente.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Al principio, el sombreado no es fácil, pero resulta útil para conservar \"\n\"valores después de `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Los parámetros de declaración van seguidos de un tipo (al contrario que en \"\n\"algunos lenguajes de programación) y, a continuación, de un tipo de \"\n\"resultado devuelto.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"La última expresión del cuerpo de una función (o de cualquier bloque) se \"\n\"convierte en el valor devuelto. Basta con omitir el carácter `;` al final de \"\n\"la expresión. La palabra clave `return` puede ser utilizado para devolver \"\n\"valores antes del fin de la función, pero la sintaxis de \\\"valor desnudo\\\" \"\n\"es idiomático al fin de una función.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Algunas funciones no devuelven ningún valor, devuelven el \\\"tipo unitario\\\", \"\n\"`()`. El compilador deducirá esto si se omite el tipo de retorno `-> ()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\"El sobrecargo de funciones no existe en Rust -- cada función tiene una única \"\n\"implementación.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Siempre toma un número fijo de parámetros. No se admiten argumentos \"\n\"predeterminados. Las macros se pueden utilizar para admitir funciones \"\n\"variádicas.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Siempre se utiliza un solo conjunto de tipos de parámetros. Estos tipos \"\n\"pueden ser genéricos, lo cual discutiremos mas tarde.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Las macros se amplían a código de Rust durante la compilación y pueden \"\n\"adoptar un número variable de argumentos. Se distinguen por utilizar un \"\n\"símbolo `!` al final. La biblioteca estándar de Rust incluye una serie de \"\n\"macros útiles.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` imprime una linea a la salida estándar (\\\"standard \"\n\"output\\\"), aplicando el formato descrito en [`std::fmt`](https://doc.rust-\"\n\"lang.org/std/fmt/index.html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` funciona igual que `println!`, pero devuelve el \"\n\"resultado en forma de cadena.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` registra el valor de la expresión y lo devuelve.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` marca un fragmento de código como no implementado todavía. Si se \"\n\"ejecuta, activará un error pánico.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` marca un fragmento de código como inaccesible. Si se \"\n\"ejecuta, activará un error pánico.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"El objetivo de esta sección es mostrar que existen estos elementos útiles y \"\n\"cómo usarlos. Por qué se definen como macros y a qué se expanden no es muy \"\n\"importante.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"En el curso no se imparte la definición de macros, pero en una sección \"\n\"posterior se describirá el uso de las macros de derivación.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\"La [secuencia de Collatz](https://es.wikipedia.org/wiki/\"\n\"Conjetura_de_Collatz) se define de la siguiente manera, para n<sub>1</sub> \"\n\"arbitrario mayor que cero:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"Si _n<sub>i</sub>_es 1, la secuencia termina en _n<sub>i</sub>_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"Si _n<sub>i</sub>_ es par, _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\"Si _n<sub>i</sub>_ es impar, _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"Por ejemplo, empezando con _n<sub>1</sub>_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"3 es impar, entonces _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"10 is par, entonces _n<sub>3</sub>_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"5 es impar, entonces _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"16 es par, entonces _n<sub>5</sub>_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"8 es par, entonces _n<sub>6</sub>_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"44 es par, entonces _n<sub>7</sub>_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"2 es par, entonces _n<sub>8</sub>_ = 1; and\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"la secuencia finaliza.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Escribe una función para calcular la longitud de la secuencia de Collatz \"\n\"para un número `n` inicial dado.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\"/// Determina la longitud de la secuencia de Collatz que empieza por `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Longitud: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Te damos la bienvenida\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 35 minutos. Contiene:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 35 minutos. Contiene:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Un valor del tipo array `[T; N]` contiene `N` (una constante en tiempo de \"\n\"compilación) elementos del mismo tipo `T`. Ten en cuenta que la longitud del \"\n\"array es _parte de su tipo), lo que significa que `[u8; 3]` y `[u8; 4]` se \"\n\"consideran dos tipos diferentes. Los slices, que tienen un tamaño \"\n\"determinado al tiempo de ejecución, serán discutidos mas tarde.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"Prueba a acceder a un array que esté fuera de los límites. Los accesos a los \"\n\"arrays se comprueban en el tiempo de ejecución. Rust suele optimizar estas \"\n\"comprobaciones y se pueden evitar utilizando Rust inseguro.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Podemos usar literales para asignar valores a arrays.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"El macro de impresión `println!` solicita la implementación de depuración \"\n\"con el parámetro de formato `?`: `{}` ofrece la salida predeterminada y `{:?}\"\n\"` ofrece la salida de depuración. Tipos como números enteros y cadenas \"\n\"implementan la salida de depuración. Esto significan que tenemos que usar la \"\n\"salida de depuración en este caso.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Si se añade `#`, por ejemplo `{a:#?}`, se da formato al texto para facilitar \"\n\"la lectura.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Al igual que los arrays, las tuplas tienen una longitud fija.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Las tuplas agrupan valores de diferentes tipos en un tipo compuesto.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Se puede acceder a los campos de una tupla por el punto y el índice del \"\n\"valor, por ejemplo, `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"La tupla vacía `()` es llamado el \\\"tipo de unidad\\\" y significa la ausencia \"\n\"de un valor de retorno, parecido a `void` en otros lenguajes.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\"La instrucción `for` permite iterar sobre arrays, pero no sobre tuplas.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Esta función usa el trait `IntoIterator`, pero aún no lo hemos estudiado.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"La macro `assert_ne!` es nueva. También existen las macros `assert_eq!` y \"\n\"`assert!`. Estas variantes siempre se comprueban mientras las variantes de \"\n\"solo depuración, como `debug_assert!`, no compilan nada en las compilaciones \"\n\"de lanzamiento.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"Cuando uno trabaja con tuplas y otros valores estructurados, es común querer \"\n\"extraer valores interiores a variables locales. Uno puede manualmente \"\n\"acceder los valores interiores:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"left: {left}, right: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"Rust también provee la coincidencia de patrones para destructurar un valor \"\n\"en sus partes constituyentes:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Los patrones usados aquí son \\\"irrefutables\\\", es decir que el compilador \"\n\"puede estáticamente verificar que el valor a la derecha del `=` tiene la \"\n\"misma estructura que el patrón.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Un nombre de variable es un patrón irrefutable que siempre coincide con \"\n\"cualquier valor, así que también podemos usar `let` para declarar una sola \"\n\"variable.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Los patrones también se pueden usar en los condicionales, dejando que la \"\n\"comparación de igualdad y el desestructuramiento ocurren al mismo tiempo. \"\n\"Esta forma de coincidencia de patrones sera discutido mas a fondo mas tarde.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Edita los ejemplos anteriores para enseñar el error de compilador cuando el \"\n\"patrón no coincide con el valor.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Los arrays pueden contener otros arrays:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"¿Cuál es el tipo de esta variable?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Usa el método anterior para escribir una función `transpose` que transpone \"\n\"una matriz (convierte filas en columnas):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Copia el siguiente fragmento de código en <https://play.rust-lang.org/> e \"\n\"implementa la función. Esta función solo opera sobre matrices 3x3.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: borra esto cuando termines de implementarlo.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- el comentario hace que rustfmt añade una nueva línea\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matriz: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"traspuesto: {:#?}\\\"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 55 minutos. Contiene:\"\n\n#: src/references.md\nmsgid \"Slices: &\\\\[T\\\\]\"\nmsgstr \"Slices: &\\\\[T\\\\]\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"Una referencia ofrece una forma de acceder a otro valor sin asumir la \"\n\"responsabilidad del valor. También se denomina \\\"préstamo\\\". Las referencias \"\n\"compartidas son de solo lectura y los datos a los que se hace referencia no \"\n\"pueden cambiar.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"Una referencia compartida a un tipo `T` tiene el tipo `&T`. Se crea un valor \"\n\"de referencia con el operador `&`. El operador `*` \\\"desreferencia\\\" una \"\n\"referencia, dando lugar a su valor.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust prohibirá estáticamente las referencias colgantes:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"Se dice que una referencia \\\"toma prestado\\\" el valor al que hace \"\n\"referencia. Este es un buen modelo para los estudiantes que no están \"\n\"familiarizados con los punteros, ya que el código puede usar la referencia \"\n\"para acceder al valor, pero este sigue \\\"perteneciendo\\\" a la variable \"\n\"original. En el curso hablaremos con más profundidad sobre la propiedad el \"\n\"tercer día.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"Las referencias se implementan como punteros y una ventaja clave es que \"\n\"pueden ser mucho más pequeñas del elemento al que apuntan. Los participantes \"\n\"que estén familiarizados con C o C++ reconocerán las referencias como \"\n\"punteros. A lo largo del curso, hablaremos sobre cómo Rust evita los errores \"\n\"de seguridad en la memoria derivados del uso de punteros sin formato.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"Rust no crea referencias automáticamente, `&` siempre es obligatorio.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust realizará una desreferencia automática en algunos casos, en especial al \"\n\"invocar métodos (prueba `ref_x.count_ones()`). No hay necesidad para un \"\n\"operador `->` como en C++.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"En este ejemplo, `r` es mutable para que se pueda reasignar (`r = &b`). \"\n\"Debes tener en cuenta que se vuelve a enlazar `r` para que haga referencia a \"\n\"otro elemento. Es distinto de C++, donde la asignación a una referencia \"\n\"modifica el valor referenciado.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"Una referencia compartida no permite modificar el valor al que hace \"\n\"referencia, incluso aunque el valor sea mutable. Prueba con `*r = 'X'`.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust hace un seguimiento del tiempo de vida de todas las referencias para \"\n\"asegurarse de que duran lo suficiente. En Rust seguro no se dan referencias \"\n\"colgantes. `x_axis` devolvería una referencia a `point`, pero `point` se \"\n\"desasignará cuando se devuelva la función, por lo que no se compilará.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"Más adelante hablaremos de los préstamos cuando lleguemos a la parte de \"\n\"propiedad.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"Las referencias exclusivas, también denominadas referencias mutables, \"\n\"permiten cambiar el valor al que hacen referencia. Tienen el tipo `&mut T`.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"Exclusivo\\\" significa que solo se puede utilizar esta referencia para \"\n\"acceder al valor. No pueden existir otras referencias (compartidas o \"\n\"exclusivas) al mismo tiempo y no se puede acceder al valor de referencia \"\n\"mientras exista la referencia exclusiva. Prueba a ejecutar un `&point.0` o a \"\n\"cambiar `point.0` mientras `x_coord` está activo.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Ten en cuenta la diferencia entre `let mut x_coord: &i32` y `let x_coord: \"\n\"&mut i32`. La primera representa una referencia mutable que se puede \"\n\"vincular a distintos valores, mientras que la segunda representa una \"\n\"referencia a un valor mutable.\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Slices\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Un _slice_ ofrece una visión de una colección más amplia:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Los slices toman prestados datos del tipo slice.\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\"Pregunta: ¿Qué ocurre si se modifica `a[3]` justo antes de imprimir `s`?\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Creamos un slice tomando prestado `a` y especificando entre paréntesis los \"\n\"índices de inicio y de fin.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Si el slice comienza en el índice 0, la sintaxis de rango de Rust nos \"\n\"permite eliminar el índice inicial, lo que significa que `&a[0..a.len()]` y \"\n\"`&a[..a.len()]` son idénticos.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Lo mismo ocurre con el último índice, por lo que `&a[2..a.len()]` y \"\n\"`&a[2..]` son idénticos.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Para crear fácilmente un slice del array completo, podemos usar `&a[..]`.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` es una referencia a un slice de `i32`s. Ten en cuenta que el tipo de `s` \"\n\"(`&[i32]`) ya no menciona la longitud del array. Esto nos permite realizar \"\n\"cálculos en slices de diferentes tamaños.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Los slices siempre tienen préstamos de otros objetos. En este ejemplo, `a` \"\n\"tiene que permanecer \\\"vivo\\\" (en el ámbito) al menos durante el tiempo que \"\n\"dure el slice.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"La cuestión sobre la modificación de `a[3]` puede suscitar un debate \"\n\"interesante, pero la respuesta es que, por razones de seguridad de memoria, \"\n\"no se puede hacer mediante `a` en este punto de la ejecución, pero sí se \"\n\"pueden leer los datos de `a` y `s` de forma segura. Funciona antes de crear \"\n\"el slice y después de `println`, cuando el slice ya no se utiliza.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Ahora podemos entender los dos tipos de cadenas de Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"`&str` es un slice de bytes codificados en UTF-8, parecido a `&[u8]`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\"`String` es un buffer adueñado de bytes codificados en UTF-8, parecido a \"\n\"`Vec<T>`.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"mundo\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"¡Hola \\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` introduce un slice de cadena, que es una referencia inmutable a los \"\n\"datos de cadena codificados en UTF-8 y almacenados en un bloque de memoria. \"\n\"Los literales de cadena (`\\\"Hello\\\"`) se almacenan en el binario del \"\n\"programa.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"El tipo `String` de Rust es un envoltorio que rodea a un vector de bytes. \"\n\"Como sucede con `Vec<T>`, tiene propietario.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Al igual que ocurre con muchos otros tipos, `String::from()` crea una cadena \"\n\"a partir de un literal de cadena. `String::new()` crea una cadena vacía a la \"\n\"que se pueden añadir datos de cadena mediante los métodos `push()` y \"\n\"`push_str()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"La macro `format!()` es una forma práctica de generar una cadena propia a \"\n\"partir de valores dinámicos. Acepta la misma especificación de formato que \"\n\"`println!()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"Puedes tomar prestados slices `&str` de `String` a través de `&` y, de forma \"\n\"opcional, la selección de intervalos. Si seleccionas un intervalo de bytes \"\n\"que no esté alineado con los límites de caracteres, la expresión activará un \"\n\"pánico. El iterador `chars` itera sobre los caracteres y se aconseja esta \"\n\"opción a intentar definir los límites de los caracteres correctamente.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Para los programadores de C++: piensa en `&str` como el `const char*` de C+\"\n\"+, pero uno que siempre apunta a una cadena válida en la memoria. El \"\n\"`String` de Rust es parecido a `std::string` de C++ (la diferencia principal \"\n\"es que solo puede contener bytes codificados en UTF-8 y nunca utilizará una \"\n\"optimización de cadena pequeña).\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"Los literales de cadenas de bytes te permiten crear un valor `&[u8]` \"\n\"directamente:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Las cadenas sin formato te permiten crear un valor `&str` con los escapes \"\n\"inhabilitados: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Puedes insertar comillas dobles con \"\n\"la misma cantidad de `#` a cada lado de ellas:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"Crearemos algunas funciones de utilidad para la geometría tridimensional \"\n\"representando un punto como `[f64;3]`. Debes decidir las firmas de las \"\n\"funciones.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Calcula la magnitud de un vector sumando los cuadrados de sus \"\n\"coordenadas\\n\"\n\"// y sacando la raíz cuadrada. Usa el método `sqrt()` para calcular la raíz \"\n\"cuadrada\\n\"\n\"//, como `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Normaliza un vector calculando su magnitud y dividiendo todas\\n\"\n\"// sus coordenadas entre esa magnitud.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// Usa `main` para comprobar lo que has hecho.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitud de un vector unitario: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitud de {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitud de {v:?} después de la normalización: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Calcula la magnitud del vector dado.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// Cambia la magnitud del vector a 1.0 sin cambiar su dirección.\\n\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 50 minutos. Contiene:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Al igual que C y C++, Rust admite estructuras (struct) personalizadas:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} tiene {} años\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"Puntos Clave:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Las estructuras funcionan como en C o en C++.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"Al igual que en C++, y a diferencia de C, no se necesita typedef para \"\n\"definir un tipo.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"A diferencia de C++, no existe ninguna herencia entre las estructuras.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"Puede que sea un buen momento para indicar a los alumnos que existen \"\n\"diferentes tipos de estructuras.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"Las estructuras de tamaño cero, como `struct Foo;`, se pueden utilizar al \"\n\"implementar un trait en algún tipo en cuyo valor no quieres almacenar datos.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"La siguiente diapositiva presentará las estructuras de tuplas, que se \"\n\"utilizan cuando los nombres de los campos no son importantes.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Si ya dispones de variables con los nombres adecuados, puedes crear la \"\n\"estructura con un método abreviado.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"La sintaxis `..avery` nos permite copiar la mayoría de los campos de la \"\n\"estructura anterior sin tener que escribirlos explícitamente. Siempre debe \"\n\"ser el último elemento.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Si los nombres de los campos no son importantes, puedes utilizar una \"\n\"estructura de tuplas:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Esto se suele utilizar para envoltorios de campo único (denominados \"\n\"newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Pregunta a un científico aeroespacial de la NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Los newtypes son una buena forma de codificar información adicional sobre el \"\n\"valor de un tipo primitivo, por ejemplo:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"El número se mide en algunas unidades: `Newtons` en el ejemplo anterior.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"El valor ha pasado alguna validación cuando se ha creado, por lo que ya no \"\n\"tendrás que volver a validarlo cada vez que lo uses: `PhoneNumber(String)` u \"\n\"`OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Demuestra cómo se añade un valor `f64` a un tipo `Newtons` accediendo al \"\n\"campo único del newtype.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Por lo general, a Rust no le gustan los elementos no explícitos, como el \"\n\"desenvolvimiento automático o, por ejemplo, el uso de booleanos como enteros.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"El día 3 (genéricos), se explicará la sobrecarga del operador.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"El ejemplo es una sutil referencia al fracaso de la sonda [Mars Climate \"\n\"Orbiter](https://es.wikipedia.org/wiki/Mars_Climate_Orbiter).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"La palabra clave `enum` permite crear un tipo que tiene diferentes variantes:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Variante simple\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Variante de tupla\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Variante de struct\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"En este turno: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Las enumeraciones te permiten colectar un conjunto de valores en un solo \"\n\"tipo.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` es un tipo con variantes. Hay dos valores de `Direction`: \"\n\"`Direction::Left` y `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` es un tipo con tres variantes. Además de las cargas útiles, \"\n\"Rust almacenará un discriminante para saber qué variante se encuentra en un \"\n\"valor `PlayerMove` en el tiempo de ejecución.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\"Este es un buen momento para comparar las estructuras y las enumeraciones:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"En ambas puedes tener una versión sencilla sin campos (estructura unitaria) \"\n\"o una versión con distintos tipos de campos (variantes con carga útil).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Incluso podrías implementar las distintas variantes de una enumeración con \"\n\"estructuras diferentes, pero entonces no serían del mismo tipo como lo \"\n\"serían si estuvieran todas definidas en una enumeración.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust usa muy poco espacio para almacenar el discriminante.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\"Si es necesario, almacena un número entero del tamaño más pequeño requerido\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"Si los valores de la variante permitidos no cubren todos los patrones de \"\n\"bits, se utilizarán patrones de bits no válidos para codificar el \"\n\"discriminante (la \\\"optimización de nicho\\\"). Por ejemplo, `Option<&u8>` \"\n\"almacena un puntero en un número entero o `NULL` para la variante `None`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"Puedes controlar el discriminante si es necesario (por ejemplo, para \"\n\"asegurar la compatibilidad con C):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"Sin `repr`, el tipo discriminante ocupa 2 bytes, debido a que 10001 se cabe \"\n\"en 2 bytes.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/smart-pointers/box.md\n#: src/borrowing/shared.md src/error-handling/result.md\nmsgid \"More to Explore\"\nmsgstr \"Más información\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"Rust cuenta con varias optimizaciones que puede utilizar para hacer que las \"\n\"enums ocupen menos espacio.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Optimización de puntero nulo: para [algunos tipos](https://doc.rust-lang.org/\"\n\"std/option/#representation), Rust asegura que `size_of::<T>()` es igual a \"\n\"`size_of::<Option<T> >()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Fragmento de código de ejemplo si quieres mostrar cómo puede ser la \"\n\"representación bit a bit en la práctica. Es importante tener en cuenta que \"\n\"el compilador no ofrece garantías con respecto a esta representación, por lo \"\n\"tanto es totalmente inseguro.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"Las variables estáticas vivirán durante toda la ejecución del programa y, \"\n\"por lo tanto, no se moverán:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Bienvenide a RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Tal y como se indica en el libro [Rust RFC Book](https://rust-lang.github.io/\"\n\"rfcs/0246-const-vs-static.html), estas no son insertadas y tienen una \"\n\"ubicación de memoria real asociada. Esto resulta útil para código insertado \"\n\"y no seguro. Además, la variable continúa durante toda la ejecución del \"\n\"programa. Cuando un valor de ámbito global no tiene ningún motivo para \"\n\"necesitar identidad de objeto, se suele preferir `const`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"Por su parte, `static` se parece a una variable global mutable en C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` proporciona la identidad del objeto: una dirección en la memoria y \"\n\"en el estado que requieren los tipos con mutabilidad interior, como \"\n\"`Mutex<T>`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"Dado que se puede acceder a las variables `static` desde cualquier hilo, \"\n\"deben ser `Sync`. Mutabilidad interior es posible a través de un [`Mutex`]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Mutex.html), atómico o parecido.\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"Datos locales al hilo se pueden crear con el macro `std::thread_local`.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"Las variables constantes se evalúan en tiempo de compilación y sus valores \"\n\"se insertan donde sean utilizados:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Según el libro [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), se insertan cuando se utilizan.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"Sólo se pueden llamar a las funciones marcadas como `const` en tiempo de \"\n\"compilación para generar valores `const`. Sin embargo, las funciones `const` \"\n\"se pueden llamar en _runtime_.\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"Menciona que `const` se comporta semánticamente de forma similar a \"\n\"`constexpr` de C++\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"No es muy habitual que se necesite una constante evaluada en _runtime_, pero \"\n\"es útil y más seguro que usar una estática.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"Un alias de tipo crea un nombre para otro tipo. Ambos tipos se pueden \"\n\"utilizar indistintamente.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// Los alias resultan de más utilidad con tipos largos y complejos:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"Los programadores de C verán un parecido con `typedef`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"Crearemos una estructura de datos para representar un evento en un sistema \"\n\"de control de ascensores. Debes definir los tipos y las funciones para crear \"\n\"varios eventos. Usa `#[derive(Debug)]` para permitir que se aplique el \"\n\"formato `{:?}` a los tipos.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"Para hacer este ejercicio solo es necesario crear y rellenar estructuras de \"\n\"datos de forma que `main` se ejecute sin errores. En la siguiente parte del \"\n\"curso veremos cómo extraer datos de estas estructuras.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// Un evento en el sistema de ascensores al que debe reaccionar el \"\n\"controlador.\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TAREAS: añadir variantes obligatorias\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// Un sentido de la marcha.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// El ascensor ha llegado a la planta indicada.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// Las puertas del ascensor se han abierto.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// Las puertas del ascensor se han cerrado.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// Se ha pulsado el botón direccional de un ascensor en la planta \"\n\"indicada.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// Se ha pulsado el botón de una planta en el ascensor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\"\\\"Un pasajero de la planta baja ha pulsado el botón para ir hacia arriba: \"\n\"{:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"El ascensor ha llegado a la planta baja: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"Las puertas del ascensor se han abierto: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"Un pasajero ha pulsado el botón de la tercera planta: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"Las puertas del ascensor se han cerrado: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"El ascensor ha llegado a la tercera planta: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// Se ha pulsado un botón.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// El ascensor ha llegado a la planta indicada.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// Las puertas del ascensor se han abierto.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// Las puertas del ascensor se han cerrado.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// Una planta se representa como un número entero.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// Un botón accesible para el usuario.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// Un botón para el ascensor en la planta indicada.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// Un botón de planta de la cabina del ascensor.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Te damos la bienvenida al día 2\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Ahora que ya sabemos bastante sobre Rust, continuaremos con un enfoque en el \"\n\"sistema de tipos de Rust:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\"Coincidencia de Patrones: desestructuración de enums, structs y arrays.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Métodos: asociar funciones a tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Traits: comportamientos que comparten varios tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Genéricos: parametrizar tipos en otros tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Tipos y traits de bibliotecas estándar: un recorrido por la amplia \"\n\"biblioteca estándar de Rust.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 10 minutos. Contiene:\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\n#: src/error-handling.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 1 hora. Contiene:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"La palabra clave `match` te permite comparar un valor con uno o varios \"\n\"_patrones_. Las comparaciones se hacen de arriba a abajo y el primer patrón \"\n\"que coincida gana.\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"Los patrones pueden ser valores simples, del mismo modo que `switch` en C y \"\n\"C++:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Salir\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Desplazarse\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Introducción de números\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Minúscula: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Otro\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"`_` es un patrón comodín que coincide con cualquier valor. Las expresiones \"\n\"_deben_ ser exhuastivas, lo que significa que deben tener en cuenta todas \"\n\"las posibilidades, por lo que `_` a menudo se usa como un caso final que \"\n\"atrapa todo.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Match puede ser usado como una expresión. Al igual que con `if let`, cada \"\n\"brazo de coincidencia debe ser del mismo tipo. El tipo es la última \"\n\"expresión del bloque, si la hay. En el ejemplo anterior, el tipo es `()`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"Una variable del patrón (en este ejemplo, `key`) creará un enlace que se \"\n\"puede usar dentro del brazo de coincidencia.\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\"Un protección de coincidencia hace que la expresión coincida únicamente si \"\n\"se cumple la condición.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"Puedes señalar cómo se usan algunos caracteres concretos en un patrón\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` como `or`\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` puede ampliarse tanto como sea necesario\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` representa un rango inclusivo\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` es un comodín\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Las guardas de coincidencia, como característica sintáctica independiente, \"\n\"son importantes y necesarios cuando queremos expresar de forma concisa ideas \"\n\"más complejas de lo que permitirían los patrones por sí solos.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"No son lo mismo que una expresión `if` independiente dentro del brazo de \"\n\"coincidencias. Una expresión `if` dentro del bloque de ramas (después de \"\n\"`=>`) se produce tras seleccionar el brazo de coincidencias. Si no se cumple \"\n\"la condición `if` dentro de ese bloque, no se tienen en cuenta otros brazos \"\n\"de la expresión `match` original.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"La condición definida en el guarda se aplica a todas las expresiones de un \"\n\"patrón con un `|`.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Structs\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\"Al igual que las tuplas, las estructuras se pueden desestructurar con la \"\n\"coincidencia:\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, se han ignorado otros campos\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\"Cambia los valores literales de `foo` para que coincidan con los demás \"\n\"patrones.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"Añade un campo nuevo a `Foo` y realiza los cambios necesarios en el patrón.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"La diferencia entre una captura y una expresión constante puede ser difícil \"\n\"de detectar. Prueba a cambiar el `2` del segundo brazo por una variable y \"\n\"observa que no funciona. Cámbialo a `const` y verás que vuelve a funcionar.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"Al igual que las tuplas, las enumeraciones también se pueden desestructurar \"\n\"con la coincidencia:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Los patrones también se pueden usar para enlazar variables a partes de los \"\n\"valores. Así es como se inspecciona la estructura de tus tipos. Empecemos \"\n\"con un tipo `enum` sencillo:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"no se puede dividir {n} en dos partes iguales\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} dividido entre dos es {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"se ha producido un error: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Aquí hemos utilizado los brazos para _desestructurar_ el valor de `Result`. \"\n\"En el primer brazo, `half` está vinculado al valor que hay dentro de la \"\n\"variante `Ok`. En el segundo, `msg` está vinculado al mensaje de error.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"La expresión `if`/`else` devuelve una enumeración que más tarde se \"\n\"descomprime con `match`.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Puedes probar a añadir una tercera variante a la definición de la \"\n\"enumeración y mostrar los errores al ejecutar el código. Señala los lugares \"\n\"en los que tu código está ahora incompleto y explica cómo el compilador \"\n\"intenta dar sugerencias.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Solo se puede acceder a los valores de las variantes de enumeración una vez \"\n\"que coincidan con el patrón.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Demuestra lo que pasa cuando la búsqueda no es exhaustiva. Ten en cuenta la \"\n\"ventaja que ofrece el compilador de Rust al confirmar que se gestionan todos \"\n\"los casos.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\"Guarda el resultado de `divide_in_two` en la variable `result` y hazlo \"\n\"coincidir mediante `match` en un bucle. No se compilará porque se utilizará \"\n\"`msg` cuando coincida. Para solucionarlo, haz coincidir `&result` en lugar \"\n\"de `result`. De esta forma, `msg` se convertirá en una referencia y no se \"\n\"utilizará. Esta [\\\"ergonomía de coincidencia\\\"](https://rust-lang.github.io/\"\n\"rfcs/2005-match-ergonomics.html) apareció en Rust 2018. Si quieres que sea \"\n\"compatible con las versiones anteriores de Rust, sustituye `msg` por `ref \"\n\"msg` en el patrón.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust tiene algunas construcciones de control de flujo que difieren de otros \"\n\"lenguajes. Se utilizan para el patrón de coincidencia:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"Expresiones `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"Expresiones `let else`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"Expresiones `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"La [expresión `if let`][(https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) te permite ejecutar código diferente en \"\n\"función de si un valor coincide con un patrón:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"Horas de sueño: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"En el caso habitual de coincidencia con un patrón y retorno de la función, \"\n\"utiliza [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). El caso \\\"else\\\" debe divergir (`return`, `break` o pánico; \"\n\"cualquier acción es válida menos colocarlo al final del bloque).\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"se ha obtenido None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"se ha encontrado una cadena vacía\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"no es un dígito hexadecimal\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"resultado: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Al igual que con `if let`, hay una variante [`while let`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#predicate-pattern-loops) que \"\n\"prueba repetidamente un valor con respecto a un patrón:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Aquí, [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) devolverá `Some(c)` hasta que la cadena este vacía, \"\n\"cuando empezara a devolver `None`. `while let` nos permite seguir iterando a \"\n\"través de todos los elementos.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"A diferencia de `match`, `if let` no tiene que cubrir todas las ramas, \"\n\"pudiendo así conseguir que sea más conciso que `match`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"Un uso habitual consiste en gestionar valores `Some` al trabajar con \"\n\"`Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"A diferencia de `match`, `if let` no admite cláusulas guardia para la \"\n\"coincidencia de patrones.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"Las instrucciones `if-let` se pueden apilar, tal y como se muestra. La \"\n\"construcción `let-else` permite aplanar este código anidado. Reescribe esta \"\n\"rara versión para que los participantes puedan ver la transformación.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"La versión reescrita es la siguiente:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Señala que el bucle `while let` seguirá funcionando siempre que el valor \"\n\"coincida con el patrón.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Puedes reescribir el bucle `while let` como un ciclo infinito con una \"\n\"instrucción if que rompe el bucle si `name.pop()` no devuelve un valor para \"\n\"desenvolver. `while let` proporciona azúcar sintáctico para la situación \"\n\"anterior.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\"Vamos a escribir un sencillo evaluador recursivo de expresiones aritméticas.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"El tipo `Box` es un puntero inteligente y lo veremos con detalle más \"\n\"adelante en el curso. Una expresión puede \\\"estar delimitada\\\" con `Box::\"\n\"new`, tal como se observa en las pruebas. Para evaluar una expresión \"\n\"delimitada, usa el operador de desreferencia (`*`) para \\\"eliminar la \"\n\"delimitación\\\": `eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"Algunas expresiones no se pueden evaluar y devuelven un error. El tipo \"\n\"estándar [`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.\"\n\"Result.html) es una enumeración que representa un valor correcto \"\n\"(`Ok(Value)`) o un error (`Err(String)`). Más adelante hablaremos de este \"\n\"tipo en profundidad.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"Copia y pega el código en el playground de Rust y comienza a implementar \"\n\"`eval`. El producto final debe superar las pruebas. Recomendamos utilizar \"\n\"`todo!()` y hacer las pruebas para superar todas las pruebas de forma \"\n\"individual. También puedes saltarte una prueba de forma temporal con \"\n\"`#[ignore]`:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"Si terminas antes, prueba a escribir una prueba que dé como resultado la \"\n\"división entre cero o un desbordamiento de números enteros. ¿Cómo podrías \"\n\"gestionarlo con `Result` en vez de con un pánico?\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// Operación que se puede llevar a cabo en dos subexpresiones.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// Una expresión en forma de árbol.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// Operación en dos subexpresiones.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// Un valor literal\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"división entre cero\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust te permite asociar funciones a los nuevos tipos. Para ello, usa un \"\n\"bloque `impl`:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// No hay receptor, método estático\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Acceso exclusivo de lectura/escritura prestado a self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Acceso compartido y de solo lectura prestado a self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Se han registrado {} vueltas de {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Vuelta {idx}: {lap} s\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"// Propiedad exclusiva de self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"La carrera {} ha terminado. Duración total de la vuelta: {}.\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Gran Premio de Mónaco\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"El argumento `self` denomina el \\\"receiver\\\" (receptor) - el objeto sobre \"\n\"cual el método actuará. Hay varios receivers comunes para un método:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: toma prestado el objeto del llamador utilizando una referencia \"\n\"compartida e inmutable. El objeto se puede volver a utilizar después.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: toma prestado el objeto del llamador mediante una referencia \"\n\"única y mutable. El objeto se puede volver a utilizar después.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: asume el _ownership_ del objeto y lo aleja del llamador. El método \"\n\"se convierte en el propietario del objeto. El objeto se eliminará (es decir, \"\n\"se anulará la asignación) cuando el método devuelva un resultado, a menos \"\n\"que se transmita su _ownership_ de forma explícita. El _ownership_ completa \"\n\"no implica automáticamente una mutabilidad.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\"`mut self`: igual que lo anterior, pero el método puede mutar el objeto.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Sin receptor: se convierte en un método estático de la estructura. \"\n\"Normalmente se utiliza para crear constructores que se suelen denominar \"\n\"`new`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Puede resultar útil presentar los métodos comparándolos con funciones.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Se llama a los métodos en una instancia de un tipo (como un estructura o una \"\n\"enumeración) y el primer parámetro representa la instancia como `self`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Los desarrolladores pueden optar por utilizar métodos para aprovechar la \"\n\"sintaxis de los receptores de métodos y para ayudar a mantenerlos más \"\n\"organizados. Mediante el uso de métodos podemos mantener todo el código de \"\n\"implementación en un lugar predecible.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Señala el uso de la palabra clave `self`, el receptor de un método.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Indica que se trata de un término abreviado de `self: Self` y tal vez \"\n\"muestra cómo se podría utilizar también el nombre de la estructura.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Explica que `Self` es un tipo de alias para el tipo en el que está el bloque \"\n\"`impl` y que se puede usar en cualquier parte del bloque.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Ten en cuenta que se puede usar `self` como otras estructuras y que la \"\n\"notación de puntos puede utilizarse para referirse a campos concretos.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Puede ser un buen momento para mostrar la diferencia entre `&self` y `self` \"\n\"modificando el código e intentando ejecutar `finish` dos veces.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Además de las variantes `self`, también hay [tipos de envoltorios especiales]\"\n\"(https://doc.rust-lang.org/reference/special-types-and-traits.html) que \"\n\"pueden ser tipos de receptor, como `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust te permite abstraer sobre tipos con _traits_. Son similares a las \"\n\"interfaces:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"/// Devuelve una frase de esta mascota.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// Imprime un saludo a la mascota en una salida estándar.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"Un trait define una serie de métodos que los tipos deben tener para \"\n\"implementar el trait.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"En la sección de \\\"Genéricos\\\" a seguir, veremos como construir \"\n\"funcionalidad que es genérico sobre todos los tipos implementando un trait.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"¡Eres una monada! ¿Cómo te llamas? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"¡Guau, me llamo {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"Para implementar `Trait` para un tipo `Type`, utiliza un bloque `impl Trait \"\n\"for Type { .. }`.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"A diferencia de los interfases de Go, tener los métodos adecuados no es \"\n\"suficiente: un tipo `Cat` con un método `talk()` no satisface `Pet` \"\n\"automáticamente al menos que este en un bloque `impl Pet`.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Los _traits_ pueden especificar implementaciones predeterminadas de algunos \"\n\"métodos. Implementaciones predeterminadas pueden usar todos los métodos de \"\n\"un trait (incluso los métodos que los usuarios deben implementar ellos \"\n\"mismos). En este caso, `greet` es predeterminado y utiliza `talk`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"Un trait puede requerir que los tipos que lo implementan también implementen \"\n\"otros traits, llamados _supertraits_. Aquí, cualquier tipo implementando \"\n\"`Pet` también debe implementar `Animal`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} tiene {} piernas\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"Algunas veces esto es llamado \\\"herencia de traits\\\", pero los estudiantes \"\n\"no deben esperar que esto se comporte como la herencia OO (object-oriented). \"\n\"Solo especifica un requerimiento adicional sobre las implementaciones de un \"\n\"trait.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"Tipos asociados son tipos guarda-espacio que han sido proveídos por la \"\n\"implementación del trait.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"Tipos asociados también son llamados \\\"tipos de salida\\\". La observación \"\n\"clave es que el implementador, no el ejecutor, escoge este tipo.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"Muchos traits de la biblioteca estándar tienen tipos asociados, incluyendo \"\n\"operadores aritméticos y `Iterator`.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Los traits compatibles se pueden implementar de forma automática en los \"\n\"tipos personalizados de la siguiente manera:\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// El trait predeterminado añade el constructor `default`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// El trait clonado añade el método `clone`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\"// El trait Debug permite que sea compatible con imprimir con `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} contra {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"La derivación se implementa con macros y muchos crates ofrecen macros de \"\n\"derivación útiles para añadir funciones. Por ejemplo, `serde` puede derivar \"\n\"la compatibilidad con la serialización para una struct con \"\n\"`#[derive(Serialize)]`.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Ejercicio: trait de registro\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"Vamos a diseñar una sencilla utilidad de registro mediante un trait `Logger` \"\n\"con un método `log`. El código que podría registrar su progreso puede usar \"\n\"`&impl Logger`. En las pruebas, esta acción colocaría mensajes en el archivo \"\n\"de registro de la prueba, mientras que en una compilación de producción \"\n\"enviaría los mensajes a un servidor de registro.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"Sin embargo, el elemento `StderrLogger` que aparece a continuación registra \"\n\"todos los mensajes, independientemente de su verbosidad. Tu tarea es \"\n\"escribir un tipo `VerbosityFilter` que ignore los mensajes que superen el \"\n\"máximo de verbosidad.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"Este es un patrón común: una struct que envuelve una implementación de \"\n\"traits e implementa ese mismo trait, añadiendo comportamiento en el proceso. \"\n\"¿Qué otros tipos de envoltorios pueden ser útiles en una utilidad de \"\n\"registro?\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Registra un mensaje con el nivel de verbosidad determinado.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosidad={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"Para tu información\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Oh, oh\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TAREA: Define e implementa `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\"/// Registra solo los mensajes que cumplan el nivel de verbosidad \"\n\"determinado.\\n\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Incluyendo descansos de 10 minutos, esta sesión debería durar unas 3 horas y \"\n\"15 minutos. Contiene:\"\n\n#: src/generics.md src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 45 minutos. Contiene:\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Trait\"\n\n#: src/generics.md\nmsgid \"dyn Trait\"\nmsgstr \"Traits dyn\"\n\n#: src/generics.md\nmsgid \"Exercise: Generic min\"\nmsgstr \"Ejercicio: `min` genérico\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust admite el uso de genéricos, lo que permite abstraer los algoritmos o \"\n\"las estructuras de datos (como el ordenamiento o un árbol binario) sobre los \"\n\"tipos utilizados o almacenados.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// Elige `even` u `odd` en función de si `n` es par o impar.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"número elegido: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"tupla elegida: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"perro\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"gato\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\"Rust infiere un tipo para T en función de los tipos de los argumentos y del \"\n\"valor devuelto.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"Es similar a las plantillas de C++, pero Rust compila de forma parcial la \"\n\"función genérica de forma inmediata, por lo que debe ser válida para todos \"\n\"los tipos que coincidan con las restricciones. Por ejemplo, prueba a \"\n\"modificar `pick` para que devuelva `even + odd` si `n == 0`. Aunque solo se \"\n\"use la instanciación `pick` con números enteros, Rust seguirá considerando \"\n\"que no es válida. En cambio, C++ lo permitiría.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Código genérico es convertido en código no genérico basada en los sitios de \"\n\"ejecución .Se trata de una abstracción sin coste: se obtiene exactamente el \"\n\"mismo resultado que si se hubiesen programado de forma manual las \"\n\"estructuras de datos sin la abstracción.\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"Puedes usar genéricos para abstraer el tipo de campo concreto:\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} y {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coordenadas: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_P:_ ¿Por qué `T` se especifica dos veces en `impl<T> Point<T> {}`? ¿No es \"\n\"redundante?\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Esto se debe a que es una sección de implementación genérica para un tipo \"\n\"genérico. Son genéricos de forma independiente.\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Significa que estos métodos están definidos para cualquier `T`.\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Es posible escribir `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` sigue siendo genérico y puedes usar `Point<f64>`, pero los métodos \"\n\"de este bloque solo estarán disponibles para `Point<u32>`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"Prueba a declarar una nueva variable `let p = Punto { x: 5, y: 10.0 };`. \"\n\"Actualiza el código para permitir que haya puntos que tengan elementos de \"\n\"diferentes tipos con dos variables de tipo, por ejemplo, `T` y `U`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\"Los traits también pueden ser genéricos, como los tipos y las funciones. Los \"\n\"parámetros de un trait obtienen tipos concretos cuando es usado.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"Convertido del numero entero: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"Convertido del bool: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\\\"{from_int:?}, {from_bool:?}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\"El trait `From` sera discutido mas tarde, pero su definición en [la \"\n\"documentación `std`](https://doc.rust-lang.org/std/convert/trait.From.html) \"\n\"es simple.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"Las implementaciones del trait no necesitan cubrir todos los parámetros de \"\n\"tipo posibles. Aquí, `Foo::from(\\\"hello\\\")` no compilaría porque no hay una \"\n\"implementación `From<&str>` para `Foo`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"Tipos genéricos toman tipos como entradas, mientras tipos asociados son \"\n\"tipos de salida. Un trait puede tener varias implementaciones para \"\n\"diferentes tipos de entrada.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"De hecho, Rust requiere que a lo más solo una implementación de un trait \"\n\"coincida con cualquier tipo T. A diferencia de otros lenguajes, Rust no \"\n\"tiene una heurística para escoger la coincidencia \\\"más especifica\\\". Hay \"\n\"trabajo corriente para implementar esta heurística, llamado [especialización]\"\n\"(https://rust-lang.github.io/rfcs/1210-impl-specialization.html).\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Cuando se trabaja con genéricos, a menudo se prefiere que los tipos \"\n\"implementen algún trait, de forma que se pueda llamar a los métodos de este \"\n\"trait.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Puedes hacerlo con `T: Trait` o `impl Trait`:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"Prueba a crear un `NonClonable` y pásalo a `duplicable`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"Si se necesitan varios traits, usa `+` para unirlos.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Muestra una cláusula `where` para que los alumnos la encuentren al leer el \"\n\"código.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Despeja la firma de la función si tienes muchos parámetros.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Tiene funciones adicionales para que sea más potente.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Si alguien pregunta, la función adicional es que el tipo que está a la \"\n\"izquierda de \\\":\\\" puede ser arbitrario, como `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"Ten en cuenta que Rust (todavía) no admite especialización. Por ejemplo, \"\n\"dado el `duplicate`, original, no es válido añadir un `duplicate(a: u32)` \"\n\"especializado.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"De forma similar a los límites de _traits_, se puede usar la sintaxis `impl \"\n\"Trait` en argumentos de funciones y valores devueltos:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Azúcar sintáctico para:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"depurable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"`impl Trait` te deja trabajar con tipos que no puedes nombrar. El \"\n\"significado de `impl Trait` es un poco diferente dependiendo de su posición.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"En el caso de los parámetros, `impl Trait` es como un parámetro genérico \"\n\"anónimo con un límite de trait.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"En el caso de un tipo de resultado devuelto, significa que este es un tipo \"\n\"concreto que implementa el trait, sin nombrar el tipo. Esto puede ser útil \"\n\"cuando no quieres exponer el tipo concreto en una API pública.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"La inferencia es más complicada en la posición de retorno. Una función que \"\n\"devuelve `impl Foo` elige el tipo concreto que devuelve, sin escribirlo en \"\n\"el código fuente. Una función que devuelve un tipo genérico como \"\n\"`collect<B>() -> B` puede devolver cualquier tipo que cumpla `B`, y es \"\n\"posible que el llamador tenga que elegir uno, como con `let x: Vec<_> = foo.\"\n\"collect()` o con la sintaxis turbofish, `foo.collect::<Vec<_>>()`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"¿Cuál es el tipo de `debuggable`? Prueba con `let debuggable: () = ..` para \"\n\"ver lo que muestra el mensaje de error.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\"En adición a ser usados para despacho estático con genéricos, los traits \"\n\"también se pueden usar para despacho dinámico/tipo-borrado con objetos de \"\n\"trait:\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"¡Miau!\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"// Utiliza genéricos y despacho estático.\\n\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Hola, quien eres? {}\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"// Utiliza borradura de tipos y despacho dinámico.\\n\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\"Genéricos, incluyendo `impl Trait`, utilizan monomorphización para crear una \"\n\"instancia especializada de la funcionan para cada tipo con el cual el \"\n\"genérico es instanciando. Esto significa que llamar un método de trait \"\n\"dentro de una función generica todavía usa despacho estático, ya que el \"\n\"compilador tiene todo la información necesaria para determinar el tipo cuya \"\n\"implementación debería de usar.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\"`dyn Trait` utiliza despacho dinámico con una [tabla virtual de metodos]\"\n\"(https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). Esto \"\n\"significa que solo hay una sola version de `fn dynamic` que es utilizado \"\n\"independientemente del tipo de `Pet` que es proveído.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\"Cuando uno usa `dyn Trait`, el objeto trait necesita estar detrás algún tipo \"\n\"de indirección. En este caso es una referencia, pero tipos de puntador \"\n\"inteligentes como `Box` también pueden ser usados (demostraremos este \"\n\"durante el día 3).\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\"Durante el tiempo de ejecución, un `&dyn Pet` es representado como un \"\n\"\\\"puntador gordo\\\", es decir un par de dos puntadores: Un puntador apunta al \"\n\"objeto concreto que implementa `Pet`, y el otra apunta al vtable para la \"\n\"implementación del trait para ese tipo. Cuando uno llama el método `talk` \"\n\"sobre `&dyn Pet`, el compilador busca el puntador de función para `talk` en \"\n\"el vtable y ejecuta la función, pasando el puntador al `Dog` o `Cat` a esa \"\n\"función. El compilador no necesita saber el tipo concreto del `Pet` para \"\n\"hacer esto.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\"Un `dyn Trait` es considerado ser \\\"tipo-borrado\\\", ya que no tenemos \"\n\"información sobre el tipo concreto del objeto al tiempo de compilación.\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"En este breve ejercicio, implementarás una función `min` genérica que \"\n\"determina el mínimo de dos valores mediante el trait [`Ord`](https://doc.\"\n\"rust-lang.org/stable/std/cmp/trait.Ord.html).\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TAREA: implementar la función `min` usada en `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"'7'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"adios\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"murciélago\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"armadillo\\\"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"Enseña a los estudiantes el trait [`Ord`](https://doc.rust-lang.org/stable/\"\n\"std/cmp/trait.Ord.html) y el enum [`Ordering`](https://doc.rust-lang.org/\"\n\"stable/std/cmp/enum.Ordering.html).\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Opción\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"Resultado\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"Vec\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Dedica un tiempo a revisar las páginas de la documentación de cada una de \"\n\"las diapositivas de esta sección para destacar algunos de los métodos que \"\n\"más se usan.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust viene con una biblioteca estándar que ayuda a establecer un conjunto de \"\n\"tipos comunes que se usan en la biblioteca y los programas de Rust. De esta \"\n\"forma, dos bibliotecas pueden funcionar juntas sin problemas, puesto que \"\n\"ambas utilizan el mismo tipo `String`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"De hecho, Rust contiene varias capas de la biblioteca estándar: `core`, \"\n\"`alloc` y `std`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` incluye los tipos y funciones más básicos que no dependen de `libc`, \"\n\"de un _allocator_ (asignador de memoria) ni de la presencia de un sistema \"\n\"operativo.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` incluye tipos que requieren un _allocator_ de _heap_ global, como \"\n\"`Vec`, `Box` y `Arc`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Las aplicaciones embebidas en Rust menudo solo usan `core` y a algunas veces \"\n\"`alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust incluye una amplia documentación. Por ejemplo:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Todos los detalles sobre [bucles](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"Tipos primitivos como [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"Tipos de la biblioteca estándar como [`Option`](https://doc.rust-lang.org/\"\n\"stable/std/option/enum.Option.html) o [`BinaryHeap`](https://doc.rust-lang.\"\n\"org/stable/std/collections/struct.BinaryHeap.html).\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"De hecho, puedes documentar tu propio código:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Determina si el primer argumento es divisible por el segundo argumento.\\n\"\n\"///\\n\"\n\"/// Si el segundo es cero, el resultado será false.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"El contenido se trata como Markdown. Todos los crates de la biblioteca de \"\n\"Rust publicados se documentan automáticamente\\n\"\n\" en [`docs.rs`](https://docs.rs) mediante la herramienta \\n\"\n\"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html). Es \"\n\"propio\\n\"\n\"documentar todos los elementos públicos de una API usando este patrón.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Para documentar un elemento desde dentro (por ejemplo, dentro de un módulo), \"\n\"utiliza `//!` o `/*! .. */`, denominado como \\\"comentarios internos del \"\n\"documento\\\":\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Este módulo contiene funciones relacionadas con la divisibilidad de \"\n\"números enteros.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Muestra a los alumnos los documentos generados para el crate `rand` en \"\n\"<https://docs.rs/rand>.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Ya hemos visto algunos usos de `Option<T>`. Almacena un valor de tipo `T` o \"\n\"nada. Por ejemplo, [`String::find`](https://doc.rust-lang.org/stable/std/\"\n\"string/struct.String.html#method.find) devuelve un `Option<usize>`.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"buscar {position:?} devuelto\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"No se ha encontrado el carácter\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` se usa en muchos contextos, no solo en la biblioteca estándar.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` devolverá el valor en un elemento `Option` o un error pánico. \"\n\"`expect` funciona de forma similar, pero muestra un mensaje de error.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"Puedes obtener un pánico en None, pero no puedes olvidarte \\\"de forma \"\n\"accidental\\\" de seleccionar None.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"Es habitual usar `unwrap`/`expect` por todas partes, pero el código de \"\n\"producción suele gestionar `None` de una forma más adecuada.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"La \\\"optimización de nicho\\\" significa que `Option<T>` a menudo tiene el \"\n\"mismo tamaño en memoria que `T`.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` es parecido a `Option`, pero indica si una operación se ha \"\n\"completado de forma correcta o ha fallado, cada una con un tipo diferente. \"\n\"Es genérico: `Result<T, E>` donde `T` es usado en el variante `Ok` y `E` en \"\n\"el variante `Err`.\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Querido diario: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"No se ha podido leer el contenido del archivo\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"No se ha podido abrir el diario: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Al igual que con `Option`, el valor correcto se encuentra dentro de \"\n\"`Result`, lo que obliga al desarrollador a extraerlo de forma explícita. \"\n\"Esto fomenta la comprobación de errores. En el caso de que nunca se produzca \"\n\"un error, se puede llamar a `unwrap()` o a `expect()`, y esto también es una \"\n\"señal de la intención del desarrollador.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"La documentación sobre `Result` es una lectura recomendada. Aunque no se vea \"\n\"durante este curso, merece la pena mencionarlo. Contiene muchos métodos y \"\n\"funciones prácticos que ayudan a seguir un estilo de programación funcional.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` es el tipo estándar para implementar la gestión de errores, tal y \"\n\"como veremos el día 4.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) es el \"\n\"búfer de cadena ampliable UTF-8 estándar:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hola\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: longitud = {}, capacidad = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: longitud= {}, capacidad = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: longitud = {}, número de caracteres = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementa \\\\[`Deref<Target = str>`\\\\]\\\\[2\\\\], lo que significa que \"\n\"puedes llamar a todos los métodos `str` en una `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` devuelve una nueva cadena vacía. Usa `String::with_capacity` \"\n\"cuando sepas cuántos datos quieres guardar.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` devuelve el tamaño de `String` en bytes (que puede ser \"\n\"diferente de su longitud en caracteres).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` devuelve un iterador sobre los caracteres reales. Ten en \"\n\"cuenta que un `char` puede ser diferente de lo que un humano consideraría un \"\n\"\\\"caracter\\\", debido a los [grupos de grafemas](https://docs.rs/unicode-\"\n\"segmentation/latest/unicode_segmentation/struct.Graphemes.html).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"Cuando la gente se refiere a una cadena, pueden estar hablando de `&str` o \"\n\"de `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Cuando un tipo implementa `Deref<Target = T>`, el compilador te permite \"\n\"llamar a métodos de forma transparente desde `T`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"Todavía no hemos abordado el trait `Deref`, por lo que en este momento esto \"\n\"explica principalmente la estructura de la barra lateral de la documentación.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` implementa `Deref<Target = str>`, que le proporciona acceso \"\n\"transparente a los métodos de `str`.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"Escribe y compara `let s3 = s1.deref();` y `let s3 = &*s1;`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` se implementa como un envoltorio alrededor de un vector de bytes. \"\n\"Muchas de las operaciones que ves como compatibles con vectores también lo \"\n\"son con `String`, pero con algunas garantías adicionales.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"Compara las diferentes formas de indexar `String`:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"A un carácter mediante `s3. chars().nth(i).unwrap()`, donde `i` está dentro \"\n\"o fuera de los límites.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"A una cadena secundaria mediante `s3[0..4]`, donde el slice está en los \"\n\"límites de caracteres o no.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Muchos tipos pueden ser convertidos a una cadena con el método [`to_string`]\"\n\"(https://doc.rust-lang.org/std/string/trait.ToString.html#tymethod.\"\n\"to_string). Este trait es automáticamente implementado para cualquier tipo \"\n\"que implemente `Display`, entonces cualquier objeto que pueda ser formateado \"\n\"también puede ser convertido a una cadena.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) es el búfer \"\n\"estándar redimensionable asignado al _heap_:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: longitud= {}, capacidad = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: longitud= {}, capacidad = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Macro canónica para inicializar un vector con elementos.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Conserva solo los elementos pares.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Elimina los duplicados consecutivos.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementa [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), lo que significa que puedes llamar a \"\n\"métodos slice en un `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` es un tipo de colección, junto con `String` y `HashMap`. Los datos que \"\n\"contiene se almacenan en el _heap_. Esto significa que no es necesario \"\n\"conocer el tamaño de los datos durante la compilación. Puede aumentar o \"\n\"disminuir durante la ejecución.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"Ten en cuenta que `Vec<T>` también es un tipo genérico, pero no tienes que \"\n\"especificar `T` de forma explícita. Como siempre sucede con la inferencia de \"\n\"tipos de Rust, `T` se estableció durante la primera llamada a `push`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` es una macro canónica para usarla en lugar de `Vec::new()` y \"\n\"admite que se añadan elementos iniciales al vector.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Para indexar el vector, se utiliza `[` `]`, pero entrará en pánico si se \"\n\"sale de los límites. También se puede usar `get` para obtener una `Option`. \"\n\"La función `pop` eliminará el último elemento.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"Se estudiarán los slices el tercer día del curso. Por ahora, los \"\n\"participantes solo necesitan saber que un valor del tipo `Vec` también da \"\n\"acceso a todos los métodos de slice documentados.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Mapa hash estándar con protección frente a ataques HashDoS:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Las aventuras de Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Los cuentos de los hermanos Grimm\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Orgullo y prejuicio\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Los miserables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\"\\\"Tenemos información acerca de {} libros, pero no de Los miserables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Las aventuras de Alicia en el país de las maravillas\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} páginas\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} es desconocido.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Utiliza el método .entry() para insertar un valor si no se encuentra \"\n\"ningún resultado.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"`HashMap` no se ha explicado en el preludio y debe conocerse.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Prueba las siguientes líneas de código. La primera línea comprobará si un \"\n\"libro está incluido en el hashmap y, si no, devolverá un valor alternativo. \"\n\"La segunda línea insertará el valor alternativo en el hashmap si el libro no \"\n\"se encuentra.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter y la piedra filosofal\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"Los juegos del hambre\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\"A diferencia de `vec!`, por desgracia no hay ninguna macro estándar de \"\n\"`hashmap!`.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Sin embargo, desde la versión 1.56 de Rust, HashMap implementa [`From<[(K, \"\n\"V); N]>`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.\"\n\"html#impl-From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%, que \"\n\"nos permite inicializar fácilmente un mapa hash a partir de un _array_ \"\n\"literal:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"HashMap también se puede crear a partir de cualquier `Iterator` que genere \"\n\"tuplas de pares clave-valor.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"Mostraremos `HashMap<String, i32>` y evitaremos utilizar `&str` para que los \"\n\"ejemplos sean más sencillos. Por supuesto, se pueden usar las referencias en \"\n\"las colecciones, pero pueden dar problemas con el _borrow checker_.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"Prueba a eliminar `to_string()` del ejemplo anterior para ver si aún sigue \"\n\"compilando. ¿Dónde crees que podríamos encontrar problemas?\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"Este tipo tiene varios tipos de devolución \\\"específicos del método\\\", como \"\n\"`std::collections::hash_map::Keys`. Estos tipos a menudo aparecen en las \"\n\"búsquedas de la documentación de Rust. Muestra a los estudiantes la \"\n\"documentación de este tipo y el enlace útil de vuelta al método `keys`.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"En este ejercicio habrá una estructura de datos muy sencilla y la \"\n\"convertirás en genérica. Utiliza un [`std::collections::HashMap`](https://\"\n\"doc.rust-lang.org/stable/std/collections/struct.HashMap.html) para hacer un \"\n\"seguimiento de los valores se han visto y cuántas veces ha aparecido cada \"\n\"uno.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"La versión inicial de `Counter` está codificada para que solo funcione con \"\n\"los valores `u32`. Haz que struct y sus métodos sean genéricos sobre el tipo \"\n\"de valor del que se está haciendo un seguimiento, de manera que `Counter` \"\n\"pueda hacer el seguimiento de cualquier tipo de valor.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Si te sobra tiempo, prueba a usar el método [`entry`](https://doc.rust-lang.\"\n\"org/stable/std/collections/struct.HashMap.html#method.entry) para reducir a \"\n\"la mitad el número de búsquedas de hash que se necesita para implementar el \"\n\"método `count`.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter cuenta el número de veces que se ha visto cada valor de tipo T.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Crea un nuevo Counter.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Cuenta una repetición del valor dado.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Devuelve el número de veces que se ha visto el valor dado.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"se han visto {} valores iguales a {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"manzana\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"naranja\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"se han visto {} manzanas\\\"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"\"\n\"Esta sección tiene una duración aproximada de 1 hora y 10 minutos. Contiene:\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From e Into\"\n\n#: src/std-traits.md\nmsgid \"Read and Write\"\nmsgstr \"Read y Write\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"Default, sintaxis de actualización de structs\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Al igual que con los tipos de biblioteca estándar, dedica tiempo a revisar \"\n\"la documentación de cada trait.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\"Esta parte es larga, por lo que recomendamos tomar un descanso al llegar a \"\n\"la mitad.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Estos traits permiten comparar valores. Se pueden derivar todos los traits \"\n\"de los tipos que contengan campos que implementen estos traits.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` y `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` es una relación de equivalencia parcial, con el método requerido \"\n\"`eq` y el método proporcionado `ne`. Los operadores `==` y `!=` llamarán a \"\n\"estos métodos.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` es una relación de equivalencia completa (reflexiva, simétrica y \"\n\"transitiva) e implica `PartialEq`. Las funciones que requieren una \"\n\"equivalencia total usan `Eq` como límite del trait.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` y `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` define un orden parcial, con un método `partial_cmp`. Se usa \"\n\"para implementar los operadores `<`, `<=`, `>=` y `>`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` es un orden total en el que `cmp` devuelve `Ordering`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` se puede implementar entre diferentes tipos, pero `Eq` no, ya \"\n\"que es reflexivo:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"En la práctica, es habitual derivar estos traits, aunque no se suelen \"\n\"implementar.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"La sobrecarga de operadores se implementa mediante _traits_ en [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"Cuestiones de debate:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"¿En qué situaciones sería útil implementar `Add` para `&Point`?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Respuesta: `Add:add` consume a `self`. Si el tipo `T` para el que se \"\n\"sobrecarga el operador no es `Copy`, deberías plantearte también sobrecargar \"\n\"el operador para `&T`. Así se evita la clonación innecesaria en el sitio de \"\n\"la llamada.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"¿Por qué `Output` es un tipo asociado? ¿Se podría convertir en un parámetro \"\n\"tipo del método?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Respuesta corta: el llamador controla los parámetros tipo de la función, \"\n\"pero los tipos asociados (como `Output`) son controlados por el \"\n\"implementador de un trait.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"Se podría implementar `Add` para dos tipos distintos; por ejemplo, `impl \"\n\"Add<(i32, i32)> for Point` añadiría una tupla a un `Point`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Los tipos implementan [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) y [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) \"\n\"para facilitar las conversiones de tipos:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) se \"\n\"implementa automáticamente cuando se implementa [`From`](https://doc.rust-\"\n\"lang.org/std/convert/trait.From.html):\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Por eso se suele implementar solo `From`, ya que el tipo ya habrá \"\n\"implementado también `Into`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Cuando se declara un tipo de entrada de argumento de función como \"\n\"\\\"cualquier elemento que se pueda convertir en `String`\\\", la regla es la \"\n\"contraria y se debe usar `Into`. La función aceptará tipos que implementen \"\n\"`From` y aquellos que _solo_ implementen `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust no tiene conversiones de tipo _implícitas_, pero admite conversiones \"\n\"explícitas con `as`. Por lo general, se definen según la semántica de C.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"ya que u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"ya que i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"ya que u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"Los resultados de `as` se definen _siempre_ en Rust y son coherentes en \"\n\"todas las plataformas. Es posible que no coincida con tu idea de cambiar el \"\n\"signo o convertirlo a otro de menor tamaño. Consulta los documentos y/o \"\n\"pregunta si tienes cualquier duda.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"La conversión con `as` es una herramienta relativamente precisa y fácil de \"\n\"usar de forma incorrecta. Puede ser una fuente de pequeños errores, ya que \"\n\"los futuros trabajos de mantenimiento cambian los tipos que se usan o los \"\n\"intervalos de valores de los tipos. Las conversiones se utilizan únicamente \"\n\"cuando se quiere indicar un truncamiento incondicional (por ejemplo, \"\n\"seleccionando los 32 bits inferiores de un `u64` con `as u32`, \"\n\"independientemente del elemento que se encontrase en los bits altos).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"En el caso de las conversiones que no sean falibles (por ejemplo, `u32` a \"\n\"`u64`), se recomienda utilizar `From` o `Into` en lugar de `as` para \"\n\"confirmar que la conversión es precisamente infalible. En el caso de las \"\n\"conversiones falibles, `TryFrom` y `TryInto` están disponibles cuando \"\n\"necesitas gestionar conversiones que se ajustan de forma diferente a las que \"\n\"no lo hacen.\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"Plantéate hacer una pausa después de esta diapositiva.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` es similar a una conversión estática de C++. En general, se desaconseja \"\n\"el uso de `as` en los casos en los que puedan perderse datos, o al menos se \"\n\"recomienda dejar un comentario explicativo.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Esto es habitual al convertir números enteros a `usize` para usarlos como \"\n\"índice.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Usando [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) y \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), se puede \"\n\"abstraer sobre fuentes `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"líneas en el slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"líneas en el archivo: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"De forma similar, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.\"\n\"html) te permite abstraer sobre fuentes `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Registrado: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"El trait `Default`\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"El trait [`Default`](https://doc.rust-lang.org/std/default/trait.Default.\"\n\"html) produce un valor predeterminado para un tipo.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Ya está configurado.\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Se puede implementar directamente o se puede derivar a través de \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"Una implementación derivada producirá un valor en el que todos los campos \"\n\"tendrán sus valores predeterminados.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Esto significa que todos los tipos de la estructura también deberán \"\n\"implementar `Default`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Los tipos estándar de Rust suelen implementar `Default` con valores \"\n\"razonables (por ejemplo, `0`, `\\\"\\\"`, etc.).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\"La inicialización parcial de estructuras funciona bien con los valores \"\n\"predeterminados.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"La biblioteca estándar de Rust tiene en cuenta que los tipos pueden \"\n\"implementar `Default` y, por ello, proporciona métodos prácticos que lo \"\n\"utilizan.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"la sintaxis `..` se denomina [sintaxis de actualización de estructuras]\"\n\"(https://doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-\"\n\"instances-from-other-instances-with-struct-update-syntax).\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Los cierres o expresiones lambda tienen tipos que no pueden nombrarse. Sin \"\n\"embargo, implementan _traits_ especiales [`Fn`](https://doc.rust-lang.org/\"\n\"std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnMut.html) y [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.\"\n\"html):\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\\\"Llamado función sobre {input}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Un `Fn` (por ejemplo, `add_3`) no consume ni modifica los valores \"\n\"capturados, o quizá  no captura nada en absoluto. Se puede llamar varias \"\n\"veces al mismo tiempo.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Un `FnMut` (por ejemplo, `accumulate`) puede modificar los valores \"\n\"capturados. Se puede llamar varias veces, pero no de forma simultánea.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Si tienes un `FnOnce` (por ejemplo, `multiply_sum`), solo puedes llamarlo \"\n\"una vez. Puede consumir valores capturados.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` es un subtipo de `FnOnce`, mientras que `Fn` es un subtipo de \"\n\"`FnMut` y `FnOnce`. Es decir, puedes utilizar un `FnMut` siempre que se \"\n\"llame a un `FnOnce`, y puedes usar un `Fn` siempre que se llame a un `FnMut` \"\n\"o a un `FnOnce`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"Cuando defines una función que admite un closure, debes usar `FnOnce` si es \"\n\"posible (es decir, se llama una vez) o, en su defecto, `FnMut`. En último \"\n\"lugar estaría `Fn`. De esta forma, se ofrece la máxima flexibilidad al \"\n\"llamador.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"Por el contrario, cuando tienes un cierre (closure), lo más flexible que \"\n\"puedes tener es `Fn` (se puede transmitir en todas partes), a continuación \"\n\"`FnMut` y, por último, `FnOnce`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\"El compilador también infiere `Copy` (por ejemplo, `add_3`) y `Clone` (por \"\n\"ejemplo, `multiply_sum`), dependiendo de lo que capture el cierre.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\"De forma predeterminada, los cierres capturan, si pueden, por referencia. La \"\n\"palabra clave `move` hace que capturen por valor.\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"¿Qué\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Greg\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"En este ejemplo, implementaremos el algoritmo de cifrado clásico [\\\"ROT13\\\"]\"\n\"(https://en.wikipedia.org/wiki/ROT13). Copia este código en el playground e \"\n\"implementa los bits que faltan. Rota únicamente los caracteres alfabéticos \"\n\"ASCII para asegurarte de que el resultado sigue siendo válido en UTF-8.\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Implementa el trait `Read` para `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"¿Qué ocurre si encadenas dos instancias `RotDecoder` y cada una de ellas \"\n\"rota 13 posiciones?\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Te damos la Bienvenida al Día 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"Hoy trataremos los siguientes puntos:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Gestión de la memoria, _lifetimes_ y el _borrow checker_: cómo garantiza \"\n\"Rust la seguridad de la memoria.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"Punteros inteligentes: tipos de punteros de biblioteca estándar.\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 20 minutos. Contiene:\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/memory-management.md\nmsgid \"Drop\"\nmsgstr \"`Drop`\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"Los programas asignan memoria de dos formas:\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"_Stack_: Zona de memoria continua para las variables locales.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Los valores tienen tamaños fijos conocidos en tiempo de compilación.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Muy rápida: mueve el _stack pointer_.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Fácil de gestionar: sigue las llamadas de funciones.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Excelente localidad de memoria.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"_Heap_: almacenamiento de valores fuera de las llamadas de funciones.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Los valores tienen tamaños dinámicos determinados en _runtime_.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Ligeramente más lento que el _stack_: requiere cierta trazabilidad.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"No se puede asegurar la localidad de la memoria.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Al crear un `String`, los metadatos de tamaño fijo se colocan en la _stack_ \"\n\"y los datos de tamaño dinámico (la cadena real) en el _heap_:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Menciona que un `String` está respaldado por un `Vec`, por lo que tiene \"\n\"capacidad y longitud y, si es mutable, puede crecer mediante reasignación en \"\n\"el _heap_.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Si los alumnos lo preguntan, puedes mencionar que la memoria subyacente \"\n\"recibe una asignación de _heap_ mediante el [Asignador del Sistema](https://\"\n\"doc.rust-lang.org/std/alloc/struct.System.html) y que se pueden implementar \"\n\"asignadores personalizados mediante el [_Allocator API_](https://doc.rust-\"\n\"lang.org/std/alloc/index.html).\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Podemos inspeccionar la disposición de la memoria con código `unsafe`. Sin \"\n\"embargo, debes señalar que esto no es seguro.\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"mundo\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// ¡NO HAGÁIS ESTO EN CASA! Solo con fines educativos.\\n\"\n\"    // La cadena no proporciona garantías sobre su diseño, por lo que podría \"\n\"desencadenar\\n\"\n\"    // un comportamiento indefinido.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacidad = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Tradicionalmente, los lenguajes se dividen en dos grandes categorías:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Control total a través de la gestión manual de la memoria: C, C++, Pascal, \"\n\"etc.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"El programador decide cuándo asignar o liberar memoria del montículo.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"El programador debe determinar si un puntero aún apunta a una memoria válida.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"Los estudios demuestran que los programadores cometen errores.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Seguridad total mediante la gestión automática de la memoria en _runtime_: \"\n\"Java, Python, Go, Haskell, etc.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"Un sistema de tiempo de ejecución asegura que la memoria no se libera hasta \"\n\"que ya no se pueda hacer referencia a ella.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\"Normalmente se implementa con un contador de referencias, la recolección de \"\n\"elementos no utilizados o RAII.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust ofrece una mezcla de ambas:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Control completo _y_ seguridad completa gracias a que el compilador se \"\n\"encarga del manejo correcto de la memoria.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\"Para ello, se utiliza un concepto de _ownership_ (propiedad) explícito.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"El objetivo de esta diapositiva es ayudar a los estudiantes de otros \"\n\"lenguajes a entender mejor Rust.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C debe gestionar el montículo de forma manual con `malloc` y `free`. Entre \"\n\"los errores habituales se incluyen olvidarse de llamar a `free`, llamarlo \"\n\"varias veces para el mismo puntero o desreferenciar un puntero después de \"\n\"que se haya liberado la memoria a la que apunta.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++ tiene herramientas como los punteros inteligentes (`unique_ptr` y \"\n\"`shared_ptr`) que aprovechan las garantías del lenguaje sobre la llamada a \"\n\"destructores para garantizar que la memoria se libere cuando se devuelva una \"\n\"función. Sin embargo, es fácil hacer un uso inadecuado de estas herramientas \"\n\"y crear errores similares a los de C.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java, Go y Python utilizan el recolector de elementos no utilizados para \"\n\"identificar la memoria a la que ya no se puede acceder y descartarla. Esto \"\n\"asegura que se pueda desreferenciar cualquier puntero, de forma que se \"\n\"eliminan los errores use-after-free y otros tipos de errores. Sin embargo, \"\n\"el recolector de elementos no utilizados tiene un coste de tiempo de \"\n\"ejecución y es difícil ajustarlo adecuadamente.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"El modelo de propiedad y préstamo de Rust puede, en muchos casos, permitir \"\n\"obtener el rendimiento de C, con operaciones asignadas y libres donde se \"\n\"necesiten y sin coste. También proporciona herramientas similares a los \"\n\"punteros inteligentes de C++. Si es necesario, hay disponibles otras \"\n\"opciones, como el recuento de referencias, e incluso hay crates de terceros \"\n\"que admiten la recolección de elementos no utilizados del tiempo de \"\n\"ejecución (estos elementos no se tratan en esta clase).\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Todos los enlaces a variables tienen un _ámbito_ donde son válidos y se \"\n\"produce un error cuando se usan fuera de él:\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"Decimos que el valor _pertenece_ a la variable. Cada valor en Rust tiene \"\n\"exactamente un dueño en todo tiempo.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"Al final del ámbito, la variable _se elimina_ y los datos se liberan. Un \"\n\"destructor puede correr en este momento para librar recursos.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"Los participantes que estén familiarizados con las implementaciones de \"\n\"recolección de elementos no utilizados sabrán que este tipo de recolector \"\n\"comienza con un conjunto de \\\"raíces\\\" para buscar toda la memoria \"\n\"disponible. El principio de \\\"propietario único\\\" de Rust es una idea \"\n\"similar.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Una asignación transferirá su _ownership_ entre variables:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"¡Hola!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"La asignación de `s1` a `s2` transfiere el _ownership_.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Cuando `s1` queda fuera del ámbito, no ocurre nada: no le pertenece nada.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"Cuando `s2` sale del ámbito, los datos de la cadena se liberan.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"Antes de mover a `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"Después de mover a `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Cuando pasas un valor a una función, el valor se asigna al parámetro de la \"\n\"función. Esta acción transfiere el _ownership_:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Hola {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Menciona que es lo contrario de los valores predeterminados de C++, que se \"\n\"copian por valor, a menos que utilices `std::move` (y que el constructor de \"\n\"movimiento esté definido).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"Es únicamente el ownership el que se mueve. Si se genera algún código \"\n\"máquina para manipular los datos en sí, se trata de una cuestión de \"\n\"optimización, y esas copias se optimizan de forma agresiva.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"Los valores simples (como los enteros) se pueden marcar como `Copy` \"\n\"(consulta las diapositivas posteriores).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"En Rust, la clonación es explícita (usando `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"En el ejemplo de `say_hello`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Con la primera llamada a `say_hello`, `main` deja de tener el _ownership_ de \"\n\"`name`. Después, ya no se podrá usar `name` dentro de `main`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"La memoria de _heap_ asignada a `name` se liberará al final de la función \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"main` podrá conservar el _ownership_ si pasa`name` como referencia (`&name`) \"\n\"y si `say_hello` acepta una referencia como parámetro.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Por otro lado, `main` puede pasar un clon de `name` en la primera llamada \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust hace que resulte más difícil que en C++ crear copias por error al \"\n\"definir la semántica de movimiento como predeterminada y al obligar a los \"\n\"programadores a clonar sólo de forma explícita.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Copias Defensivas en C++ Moderno\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"La versión moderna de C++ soluciona este problema de forma diferente:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Duplica los datos en s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Los datos de la _stack_ de `s1` se duplican y `s2` obtiene su propia copia \"\n\"independiente.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Cuando `s1` y `s2` salen del ámbito, cada uno libera su propia memoria.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"Antes de la asignación de copias:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"Después de la asignación de copia:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++ ha tomado una decisión algo distinta a Rust. Puesto que `=` copia los \"\n\"datos, los datos de cadena deben clonarse. De lo contrario, obtendríamos un \"\n\"error double free si alguna de las cadenas saliera fuera del ámbito.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ también tiene [`std::move`](https://en.cppreference.com/w/cpp/utility/\"\n\"move), que se usa para indicar cuándo se puede mover un valor. Si el ejemplo \"\n\"hubiera sido `s2 = std::move(s1)`, no se llevaría a cabo ninguna asignación \"\n\"de montículo. Después del movimiento, `s1` tendría un estado válido, pero no \"\n\"especificado. A diferencia de Rust, el programador puede seguir utilizando \"\n\"`s1`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"A diferencia de Rust, en C++ se puede ejecutar código arbitrario con `=` \"\n\"según el tipo que se vaya a copiar o mover.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"Cuando _queramos_ hacer una copia de un valor, podemos hacerlo con el trait \"\n\"`Clone`.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"La función de `Clone` es poder encontrar fácilmente dónde se producen las \"\n\"asignaciones al heap. Busca a `.clone()` y algunos otros como `vec!` o `Box::\"\n\"new`.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"Es habitual \\\"clonar para salir\\\" de los problemas con el verificador de \"\n\"préstamos y volver más tarde para optimizar esos clones.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` generalmente realiza una copia a fondo del valor. Por ejemplo, si \"\n\"clonas un array, todos los elementos del array tambien son clonados.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"El comportamiento de `clone` es definido por el usuario, entonces puede \"\n\"realizar lógica personalizada de clonación si es necesario.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Aunque la semántica de movimiento es la opción predeterminada, algunos tipos \"\n\"se copian de forma predeterminada:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Estos tipos implementan el trait `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Puedes habilitar tus propios tipos para que usen la semántica de copia:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\"Después de la asignación, tanto `p1` como `p2` tienen sus propios datos.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"También podemos utilizar `p1.clone()` para copiar los datos de forma \"\n\"explícita.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Copiar y clonar no es lo mismo:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Copiar hace referencia a las copias bit a bit de regiones de memoria y no \"\n\"funciona en cualquier objeto.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Copiar no permite lógica personalizada (a diferencia de los constructores de \"\n\"copias de C++).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Clonar es una operación más general y que permite un comportamiento \"\n\"personalizado implementando el trait `Clone`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"Copiar no funciona en los tipos que implementan el trait `Drop`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"En el ejemplo anterior, prueba lo siguiente:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Añade un campo `String` a `struct Point`. No se compilará porque `String` no \"\n\"es de tipo `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Elimina `Copy` del atributo `derive`. El error del compilador se encuentra \"\n\"ahora en `println!` para `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Demuestra que funciona si clonas `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\"Referencias compartidas son `Copy`/`Clone`, pero referencias mutables no lo \"\n\"son. Esto es porque Rust requiere que las referencias mutables sean \"\n\"exclusivas. Esto significa que es valido hacer una copia de una referencia \"\n\"compartida, pero hacer lo mismo para una referencia mutable violaría las \"\n\"reglas de préstamo de Rust.\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"El Trait `Drop`\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Los valores que implementan [`Drop`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Drop.html) pueden especificar el código que se ejecutará cuando salgan del \"\n\"ámbito:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Suprimiendo {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Saliendo del bloque B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Saliendo del bloque A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Saliendo de la página principal\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\"Ten en cuenta que `std::mem::drop` no es igual que `std::ops::Drop::drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"Los valores se suprimen automáticamente cuando salen del ámbito.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"Cuando se elimina un valor, si implementa `std::ops::Drop`, se llamará a su \"\n\"implementación `Drop::drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"También se suprimirán todos sus campos, independientemente de si implementa \"\n\"o no `Drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` es solo una función vacía que toma cualquier valor. Es \"\n\"importante saber que toma la propiedad del valor, por lo que se descarta al \"\n\"final de su ámbito. Se trata de una forma sencilla de suprimir los valores \"\n\"de forma explícita antes que si se salen de su ámbito.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"Esta acción puede ser útil para los objetos que trabajan con `drop`, como \"\n\"liberando bloqueos, cerrando archivos, etc.\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"¿Por qué `Drop::drop` no acepta `self`?\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Respuesta corta: si lo hiciera, `std::mem::drop` sería llamado al final del \"\n\"bloque, lo que daría como resultado otra llamada a `Drop::drop`, ¡y un \"\n\"desbordamiento del _stack_!\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Prueba a sustituir `drop(a)` por `a.drop()`.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"En este ejemplo, implementaremos un tipo de datos complejo que posee todos \"\n\"sus datos. Utilizaremos el \\\"patrón de compilación\\\" para permitir la \"\n\"compilación de un nuevo valor parte por parte mediante funciones prácticas.\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"Rellena las partes que faltan.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// Una representación de un paquete de software.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Devuelve una representación de este paquete como una dependencia para \"\n\"usarla\\n\"\n\"    /// en la compilación de otros paquetes.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// Un compilador para un Package. Usa `build()` para crear el `Package`.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Define la versión del paquete.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Define los autores del paquete.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Añade una dependencia adicional.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\"/// Define el idioma. Si no se define, el idioma predeterminado será None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"registro: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"Box<T>\"\nmsgstr \"Box<T>\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) es un puntero \"\n\"propio de datos en el _heap_:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"cinco: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementa `Deref<Target = T>`, lo que significa que puedes [llamar \"\n\"a métodos desde `T` directamente en un `Box<T>`](https://doc.rust-lang.org/\"\n\"std/ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Los tipos de datos recursivos o los tipos de datos con tamaños dinámicos \"\n\"deben utilizar un `Box`:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// Una lista no vacía: el primer elemento y el resto de la lista.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// Una lista vacía.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` es igual que `std::unique_ptr` en C++, salvo que está asegurado que no \"\n\"será nulo.\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Un `Box` puede resultar útil en los siguientes casos:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"tiene un tipo cuyo tamaño no se conoce durante la compilación, pero el \"\n\"compilador de Rust quiere saber el tamaño exacto.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"quieres transferir la propiedad (\\\"ownership\\\") de una gran cantidad de \"\n\"datos. Para evitar que se copien grandes cantidades de datos en el _stack_, \"\n\"almacena los datos del _heap_ en un `Box` para que solo se mueva el puntero.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"Si no utilizamos `Box` e intentamos insertar un `List` directamente dentro \"\n\"de `List`, el compilador no podría calcular un tamaño fijo de la estructura \"\n\"en la memoria (`List` tendría un tamaño infinito).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` resuelve este problema, ya que tiene el mismo tamaño que un puntero \"\n\"normal y solo apunta al siguiente elemento de la `List` en el _heap_.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Elimina `Box` de la definición de la lista y muestra el error del \"\n\"compilador. El mensaje \\\"recursivo con indirección\\\" es una sugerencia de \"\n\"que debes usar un Box o referencia de algún tipo en lugar de almacenar un \"\n\"valor directamente.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Optimización de la Memoria\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\"Aunque `Box` se parece a `std::unique_ptr` en C++, no puede ser vació o \"\n\"nulo. Esto hace `Box` uno de los tipos que permite que el compilador \"\n\"optimice el almacenaje de ciertas enumeraciones.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\"Por ejemplo, `Option<Box<T>>` tiene el mismo tamaño que `Box<T>`, ya que el \"\n\"compilador usa el valor nulo para discriminar variantes en vez de usar una \"\n\"etiqueta explicita ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.\"\n\"org/std/option/#representation)):\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\\\"Solo box\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\\\"Box opcional\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\\\"Tamaño de just_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\\\"Tamaño de optional_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\\\"Tamaño de none: {}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) es un puntero \"\n\"compartido de referencia contada. Utilízalo cuando necesites hacer \"\n\"referencia a los mismos datos desde varios lugares:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Consulta [`Arc`](../concurrency/shared_state/arc.md) y [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) si te encuentras en un contexto \"\n\"multihilo.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Puedes _degradar_ un puntero compartido en un puntero [`Weak`](https://doc.\"\n\"rust-lang.org/std/rc/struct.Weak.html) para crear ciclos que se abandonarán.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"El recuento de `Rc` asegura que el valor que contiene sea válido mientras \"\n\"haya referencias.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"`Rc` en Rust es como `std::shared_ptr` en C++.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` es simple: crea un puntero en la misma asignación y aumenta el \"\n\"recuento de referencias. No hace clones completos y, por lo general, se \"\n\"puede ignorar cuando se buscan problemas de rendimiento en el código.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` clona el valor interno si es necesario (\\\"copiar al escribir\\\") y \"\n\"devuelve una referencia mutable.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Comprueba el recuento de referencias con `Rc::strong_count`.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` ofrece un objeto _de referencia contada debil_ para crear \"\n\"ciclos que que se borraran propiamente (probablemente en combinación con \"\n\"`RefCell`).\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\"Previamente vimos que objetos de trait se pueden usar con referencias, e.g. \"\n\"`&dyn Pet`. También podemos usar objetos de trait con punteros inteligentes \"\n\"como `Box` para crear objetos de trait con dueño: `Box<dyn Pet>`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Diseño de la memoria después de asignar `pets`:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Los tipos que implementan un trait pueden tener diferentes tamaños. Esto \"\n\"hace imposible tener elementos como `Vec<dyn Pet>` en el ejemplo anterior.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` es una forma de indicar al compilador un tipo de tamaño dinámico \"\n\"que implementa `Pet`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"En este ejemplo, `pets` es alocado sobre el stack y los datos del vector \"\n\"sobre el heap. Los dos elementos del vector son _punteros gordos_:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"Un puntero gordo es un puntero de tamaño doble. Tiene dos componentes: un \"\n\"puntero al objeto y un puntero a la [tabla virtual de métodos](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) para la implementación de \"\n\"`Pet` de ese objeto.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"Los datos para el `Dog` llamado Fido son los campos `name` y `age`. El `Cat` \"\n\"tiene un campo `lives`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"Compara estas salidas en el ejemplo anterior:\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"Un árbol binario es una estructura de datos de tipo árbol en la que cada \"\n\"nodo tiene dos elementos secundarios (izquierda y derecha). Crearemos un \"\n\"árbol en el que cada nodo almacene un valor. Para un nodo N dado, todos los \"\n\"nodos del subárbol izquierdo de N contienen valores más pequeños, mientras \"\n\"que todos los nodos del subárbol derecho de N contendrán valores de mayor \"\n\"tamaño.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\"Implementa los siguientes tipos para superar las pruebas correspondientes.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\"Ejercicio adicional: implementar un iterador sobre un árbol binario que \"\n\"devuelva los valores en orden.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// Un nodo del árbol binario.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// Un subárbol posiblemente vacío.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// Contenedor que almacena un conjunto de valores mediante un árbol \"\n\"binario.\\n\"\n\"///\\n\"\n\"/// Si se añade el mismo valor varias veces, solo se almacena una vez.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// Implementa `new`, `insert`, `len` y `has` para `Subtree`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// No es un elemento único.\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de una horas y 55 minutos. Contiene:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"En lugar de transferir el _ownership_ (posesión) al llamar a una función, \"\n\"puedes permitir que una función _tome prestado_ el valor:\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"La función `add` _toma prestados_ dos puntos y devuelve uno nuevo.\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"El llamador conserva el _ownership_ de las entradas.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"En esta diapositiva se repasará el material de las referencias desde día 1 y \"\n\"se ampliará un poco para incluir los argumentos de las funciones y los \"\n\"valores devueltos.\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"Notas sobre la devolución de resultados de la _stack_:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"Demuestra que la instrucción de retorno de `add` es barato porque el \"\n\"compilador puede eliminar la operación de copia. Cambia el código anterior \"\n\"para imprimir las direcciones de la _stack_ y ejecutarlas en el [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"o consulta el ensamblador en [Godbolt](https://rust.godbolt.org/). En el \"\n\"nivel de optimización \\\"DEBUG\\\", las direcciones deberían cambiar. Sin \"\n\"embargo, deberían mantenerse igual modificar la configuración \\\"RELEASE\\\":\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\"El compilador Rust puede hacer enlineamiento automático que puede ser \"\n\"deshabilitado al nivel de una función con `#[inline(never)]`.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\"Una vez deshabilitado, la dirección impresa cambiara en todos los niveles de \"\n\"optimización. Mirando en Godbolt o Playground, uno puede ver que en este \"\n\"caso el valor de retorno dependen del ABI, e.g. en amd64 los dos i32 que \"\n\"constituyen el punto son regresados en 2 registros (eax y edx).\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"El _borrow checker_ de Rust limita las formas en que se pueden tomar \"\n\"prestados valores. Para un dado valor, en cualquier tiempo:\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Puedes tener uno o varios valores `&T`, _o_\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Solo puedes tener exactamente una referencia exclusiva al valor.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"Ten en cuenta que el requisito es que las referencias que están en conflicto \"\n\"no _se encuentren_ en el mismo punto. No importa en el lugar en el que se \"\n\"desreferencie la referencia.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"El código anterior no se compila porque `a` se toma prestada como mutable (a \"\n\"través de `c`) y como inmutable (a través de `b`) al mismo tiempo.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Mueve la instrucción `println!` de `b` antes del ámbito que introduce `c` \"\n\"para que el código compile.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Después de ese cambio, el compilador se da cuenta de que `b` solo se usa \"\n\"antes del nuevo préstamo mutable de `a` a través de `c`. Se trata de una \"\n\"función del verificador de préstamos denominada \\\"tiempo de vida no léxico\\\".\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"La restricción de referencia exclusiva es bastante sólida. Rust la utiliza \"\n\"para asegurarse de que no se produzcan data races. Rust también _se basa_ en \"\n\"esta restricción para optimizar el código. Por ejemplo, el valor de una \"\n\"referencia compartida se puede almacenar en caché de forma segura en un \"\n\"registro durante el tiempo de vida de dicha referencia.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"El verificador de préstamos está diseñado para adaptarse a muchos patrones \"\n\"comunes, como tomar referencias exclusivas en diferentes campos de un struct \"\n\"al mismo tiempo. Sin embargo, hay algunas situaciones en las que \\\"no lo \"\n\"entiende del todo\\\", lo que suele dar lugar a \\\"conflictos con el \"\n\"comprobador de préstamos.\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\"Como un ejemplo concreto de como estas reglas de préstamo previenen errores \"\n\"de memoria, considera el caso de modificar una colección cuando existen \"\n\"referencias a sus elementos:\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"{elem}\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"Considera este caso parecido de invalidación de iterador:\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\"En ambos casos, añadir elementos a la colección puede invalidar referencias \"\n\"pre-existentes a los elementos de la colección si es necesario realizar \"\n\"reasignación.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"En algunas situaciones, es necesario modificar los datos subyacentes a una \"\n\"referencia compartida (de solo lectura). Por ejemplo, una estructura de \"\n\"datos compartida puede contar con una caché interna y pretender actualizarla \"\n\"con métodos de solo lectura.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"El patrón \\\"mutabilidad interior\\\" permite el acceso exclusivo (mutable) \"\n\"desde una referencia compartida. La biblioteca estándar ofrece varias formas \"\n\"de hacerlo y, al mismo tiempo, garantiza la seguridad, normalmente mediante \"\n\"una comprobación del tiempo de ejecución.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"// Nota que `cell` NO es declarado como mutable.\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\"// Esto causa un error al tiempo de ejecución.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{cell:?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\"`Cell` envuelve un valor y permite obtenerlo o definirlo, incluso con una \"\n\"referencia compartida a `Cell`. Sin embargo, no permite obtener referencias \"\n\"al valor. Como no hay referencias, las reglas de préstamos no pueden \"\n\"quebrantarse.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"Lo más importante de esta diapositiva es que Rust ofrece formas _seguras_ de \"\n\"modificar los datos subyacentes a una referencia compartida. Hay varias \"\n\"formas de garantizar la seguridad, como `RefCell` y `Cell`.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` implementa las reglas de préstamos habituales de Rust (varias \"\n\"referencias compartidas o una única referencia exclusiva) con una \"\n\"comprobación del tiempo de ejecución. En este caso, todos los préstamos son \"\n\"muy cortos y nunca se solapan, por lo que las comprobaciones siempre se \"\n\"llevan a cabo de forma correcta.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\"El bloque extra en el ejemplo `RefCell` existe para terminar el préstamo \"\n\"creado por la llamada a `borrow_mut` antes de que imprimimos cal celda. \"\n\"Intentando imprimir una celda `RefCell` solo enseña el mensaje \"\n\"`\\\"{borrowed}\\\"`.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` es un medio más sencillo de garantizar la seguridad: tiene un método \"\n\"`set` que utiliza `&self`. No es necesario comprobar el tiempo de ejecución, \"\n\"pero sí es necesario transferir los valores, lo que puede tener su propio \"\n\"coste.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\"Ambos `RefCell` y `Cell` son `!Sync`, que significa que `&RefCell` y `&Cell` \"\n\"no pueden ser pasados entre hilos. Esto previene que dos hilos intenten \"\n\"acceder la celda al mismo tiempo.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Estás trabajando en la implementación de un sistema de monitorización de \"\n\"salud. Por ello, debes realizar un seguimiento de las estadísticas de salud \"\n\"de los usuarios.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Comenzarás con algunas funciones stub en un bloque `impl`, así como con una \"\n\"definición de estructura `User`. Tu objetivo es implementar métodos en el \"\n\"`struct` `User` definida en el bloque `impl`.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Copia el fragmento de código que aparece más abajo en la página a <https://\"\n\"play.rust-lang.org/> y rellena el método que falta:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Actualiza las estadísticas de un usuario en función de las mediciones \"\n\"obtenidas durante una consulta médica\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"Me llamo {} y tengo {} años\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"Una referencia tiene un valor de _tiempo de vida_ que no debe \\\"superar\\\" el \"\n\"valor al que hace referencia. El verificador de préstamos se encarga de \"\n\"comprobarlo.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"El tiempo de vida puede ser implícito, como hemos visto hasta ahora, pero \"\n\"también explícito, como es el caso de `&'a Point` y `&'document str`. Los \"\n\"tiempos de vida empiezan por `'` y `'a` es el nombre predeterminado que se \"\n\"suele usar. Lee `&'a Point` como \\\"un `Point` prestado que es válido al \"\n\"menos durante el tiempo de vida `a`\\\".\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"Los tiempos de vida siempre son inferidos por el compilador: no es posible \"\n\"asignar un tiempo de vida manualmente. Las anotaciones explicitas de tiempo \"\n\"de vida crean restricciones cuando hay ambigüedad; el compilador verifica \"\n\"que hay una solución válida.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"Los tiempos de vida se vuelven más complejos cuando se tiene en cuenta la \"\n\"transferencia y devolución de valores a las funciones.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// ¿Cuál es el tiempo de vida de p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"En este ejemplo, el compilador no conoce el tiempo de vida que se debe \"\n\"inferir para `p3`. Al examinar el cuerpo de la función, se puede suponer con \"\n\"seguridad que el tiempo de vida de `p3` es menor que`p1` y `p2`. Sin \"\n\"embargo, como sucede con los tipos, Rust requiere anotaciones explícitas de \"\n\"los tiempos de vida en los argumentos de las funciones y los valores \"\n\"devueltos.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"Añade `'a` correctamente a `left_most`:\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"Por tanto, \\\"dado p1 y p2, que superan el tiempo de vida de `'a`, el valor \"\n\"devuelto tiene una duración de al menos `'a`.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"De forma habitual, los tiempos de vida se pueden omitir, tal como se \"\n\"describe en la siguiente diapositiva.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Tiempos de Vida en Llamadas a Función\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"El tiempo de vida de los argumentos de las funciones y los valores devueltos \"\n\"se deben especificar de manera completa, pero Rust permite que se puedan \"\n\"eludir en la mayoría de los casos con [unas reglas sencillas](https://doc.\"\n\"rust-lang.org/nomicon/lifetime-elision.html). Esto no es inferencia -- solo \"\n\"es un atajo de sintaxis.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\"A cada argumento que no tenga una anotación de tiempo de vida se le \"\n\"proporciona uno.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"Si solo hay un tiempo de vida de un argumento, se le asigna a todos los \"\n\"valores devueltos que no estén anotados.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"Si existen varios tiempos de vida de argumentos, pero el primero es para \"\n\"`self`, ese tiempo de vida se asigna a todos los valores devueltos que no \"\n\"estén anotados.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\"En este ejemplo, `cab_distance` se ha suprimido sin que suponga un problema.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"La función `nearest` proporciona otro ejemplo de una función con múltiples \"\n\"referencias en sus argumentos que requiere una anotación explícita.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"Prueba a ajustar la firma para \\\"mentir\\\" sobre los tiempos de vida \"\n\"devueltos:\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"No se hará la compilación, lo que demuestra que el compilador comprueba la \"\n\"validez de las anotaciones. Debes tener en cuenta que este no es el caso de \"\n\"los punteros sin formato (inseguros), y es uno de los motivos por los que se \"\n\"cometen errores con Rust inseguro.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"Puede que los participantes pregunten cuándo se deben usar los tiempos de \"\n\"vida. Los préstamos de Rust _siempre_ tienen tiempos de vida. En la mayoría \"\n\"de las ocasiones, la omisión y la inferencia de tipos hacen que no sea \"\n\"necesario escribirlos. En casos más complicados, las anotaciones de tiempos \"\n\"de vida pueden ayudar a resolver la ambigüedad. A menudo, sobre todo cuando \"\n\"se llevan a cabo prototipos, resulta más fácil trabajar únicamente con datos \"\n\"propios, clonando valores siempre que sea necesario.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Tiempos de vida en estructuras de datos\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Si un tipo de datos almacena datos prestados, se debe anotar con tiempo de \"\n\"vida:\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"¡Adiós, {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\"\\\"El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba \"\n\"el saxofón detrás del palenque de paja.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"En el ejemplo anterior, la anotación en `Highlight` hace que los datos \"\n\"subyacentes a la `&str` contenida tengan al menos la misma duración que \"\n\"cualquier instancia de `Highlight` que utilice esos datos.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Si `text` se consume antes de que acabe el tiempo de vida de `fox` (o \"\n\"`dog`), el _borrow checker_ (verificador de préstamos) muestra un error.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Los tipos con datos prestados (_borrowed_) obligan a los usuarios a \"\n\"conservar los datos originales. Esto puede ser útil para crear vistas \"\n\"ligeras aunque, por lo general, hace que sean un poco más difíciles de usar.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Siempre que sea posible, haz que las estructuras de datos sean propietarias \"\n\"directas de sus datos.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Algunas estructuras con varias referencias dentro pueden tener más de una \"\n\"anotación de tiempo de vida. Esto puede ser necesario si hay que describir \"\n\"las relaciones de tiempo de vida entre las propias referencias, además del \"\n\"tiempo de vida de la propia estructura. Estos son casos prácticos muy \"\n\"avanzados.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"En este ejercicio, vas a compilar un analizador para la [codificación \"\n\"binaria de protobuf](https://protobuf.dev/programming-guides/encoding/). No \"\n\"hay nada de lo que preocuparse, es más sencillo de lo que parece. En este \"\n\"ejemplo se muestra un patrón de análisis muy habitual que consiste en \"\n\"transferir fracciones de datos. Los datos subyacentes nunca se copian.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"Para poder llevar a cabo un análisis completo de un mensaje de protobuf, es \"\n\"necesario conocer los tipos de campos, indexados por el número de campo. Se \"\n\"suelen proporcionar en un archivo `proto`. En este ejercicio, codificaremos \"\n\"esa información en declaraciones `match` en funciones a las que se llama \"\n\"para cada campo.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"Usaremos el proto que sigue:\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"Un mensaje proto se codifica como una serie de campos, uno detrás del otro. \"\n\"Cada uno se implementa como una \\\"etiqueta\\\" seguida del valor. La etiqueta \"\n\"contiene un número de campo (por ejemplo, `2` para el campo `id` de un \"\n\"mensaje de `Person`) y un tipo de wire que define cómo se debe definir la \"\n\"carga útil a partir del flujo de bytes.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"Los números enteros, incluida la etiqueta, se representan con una \"\n\"codificación de longitud variable denominada VARINT. A continuación puedes \"\n\"consultar la definición de `parse_varint`. El código dado también define \"\n\"retrollamadas para gestionar los campos `Person` y `PhoneNumber`, así como \"\n\"analizar un mensaje en una serie de llamadas a dichas retrollamadas.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"Ahora solo tienes que implementar la función `parse_field` y el trait \"\n\"`ProtoMessage` para `Person` y `PhoneNumber`.\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// Tipo de wire como se observa en el wire.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// Varint WireType indica que el valor es un único VARINT.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64,  -- no es necesario para este ejercicio\\n\"\n\"    /// El Len WireType indica que el valor es una longitud representada \"\n\"como\\n\"\n\"    /// VARINT seguida exactamente de ese número de bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\"/// El WireType I32 indica que el valor es de 4 bytes en\\n\"\n\"    /// el orden little endian que contiene un número entero con signo de 32 \"\n\"bits.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// Valor de un campo, escrito en función del tipo de wire.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- no es necesario para este ejercicio\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// Campo que contiene el número de campo y su valor.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64, no es necesario para este ejercicio\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\\\"Tipo de wire no válido: {value}\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\\\"Cadena era esperado ser un campo `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\\\"Cadena no válida\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\\\"Bytes eran esperados ser un campo `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\\\"`u64` era esperado ser un campo `Varint`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `i32` to be an `I32` field\\\"\"\nmsgstr \"\\\"`i32` era esperado ser un campo `I32`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Analiza un VARINT, que devuelve el valor analizado y los bytes \"\n\"restantes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\\\"No hay suficientes bytes para un varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// Este es el último byte de VARINT, así que conviértelo en\\n\"\n\"            // u64 y haz que lo devuelva.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// Un número mayor de 7 bytes no es válido.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\\\"Demasiados bytes para un varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Convierte una etiqueta en un número de campo y un WireType.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Analiza un campo y haz que devuelva los bytes restantes.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"En función del tipo de wire, crea un campo que utilice todos los bytes \"\n\"necesarios.\\\"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"Devuelve el campo y los bytes que no se hayan utilizado.\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Analiza un mensaje de los datos proporcionados, llamando a `T::\"\n\"add_field` para cada campo\\n\"\n\"/// del mensaje.\\n\"\n\"///\\n\"\n\"/// Se utilizan todos los datos introducidos.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TAREA: implementar ProtoMessage para Person y PhoneNumber.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\"En este ejercicio hay varios casos en los cuales la lección del protobuf \"\n\"puede fallar, e.g. si intentas leer un `i32` cuando hay menos de 4 bytes \"\n\"restantes en el buffer de datos. Normalmente usaríamos el enum `Result`, \"\n\"pero para simplificar el ejercicio inducimos pánico si ocurre un error. En \"\n\"el día 4 cubriremos el manejo de errores en Rust en mas detall\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\\\"len no es un `usize` valido\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"EOF inesperado\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"// Desenvuelve el error porque `value` tiene 4 bytes.\\n\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// salta todos los demás pasos\\n\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"Bienvenido al Día 4\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"Hoy vamos a tratar algunos temas relacionados con la construcción de \"\n\"aplicaciones de grande escala en Rust:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"Iteradores: información detallada sobre el trait `Iterator`.\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"Módulos y visibilidad.\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"Probando.\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\"Gestión de errores: _panics_ (pánicos), `Result` y el operador _try_ `?`.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\"Rust inseguro: una vía de escape en las situaciones en las que no puedes \"\n\"expresarte en Rust seguro.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 40 minutos. Contiene:\"\n\n#: src/iterators.md\nmsgid \"Iterator\"\nmsgstr \"Iterador (Iterator)\"\n\n#: src/iterators.md\nmsgid \"IntoIterator\"\nmsgstr \"`IntoIterator`\"\n\n#: src/iterators.md src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"El trait [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html) permite iterar valores en una colección. Requiere un método `next` y \"\n\"proporciona muchos otros métodos. Muchos tipos de bibliotecas estándar \"\n\"implementan `Iterator` y también está a nuestro alcance:\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"El trait `Iterator` implementa muchas operaciones comunes de programación \"\n\"funcional en colecciones (por ejemplo, `map`, `filter`, `reduce`, etc.). \"\n\"Este es el trait que te permite encontrar toda la documentación sobre ellas. \"\n\"En Rust, estas funciones deberían generar un código tan eficiente como las \"\n\"implementaciones imperativas equivalentes.\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` es el trait que hace que los bucles funcionen. Se implementa \"\n\"a través de tipos de colecciones, como `Vec<T>`, y de referencias a ellas, \"\n\"como `&Vec<T>` y `&[T]`. Los rangos también lo implementan. Esta es la razón \"\n\"por la que se puede iterar sobre un vector con `for i in some_vec { .. }`, \"\n\"pero `some_vec.next()` no existe.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"El trait `Iterator` te indica cómo _iterar_ una vez que has creado un \"\n\"iterador. El trait relacionado [`IntoIterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.IntoIterator.html) indica cómo crear un iterador para un \"\n\"tipo. Es usado automáticamente por los bucles `for`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"punto = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Haz clic para leer la documentación para `IntoIterator`. Cada implementación \"\n\"de `IntoIterator` debe declarar dos tipos:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: el tipo sobre el que iteramos, como `i8`,\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: el tipo `Iterator` devuelto por el método `into_iter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Ten en cuenta que `IntoIter` y `Item` están vinculados: el iterador debe \"\n\"tener el mismo tipo de `Item`, lo que significa que devuelve `Option<Item>`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\"En el ejemplo se itera sobre todas las combinaciones de las coordenadas x e \"\n\"y.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"Prueba a iterar sobre la cuadrícula dos veces en `main`. ¿Por qué no \"\n\"funciona? Ten en cuenta que `IntoIterator::into_iter` tiene la propiedad de \"\n\"`self`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"Soluciona este problema implementando `IntoIterator` para `&Grid` y \"\n\"almacenando una referencia a `Grid` en `GridIter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"Lo mismo puede ocurrir con los tipos de biblioteca estándar: `for e in \"\n\"some_vector` adquirirá la propiedad de `some_vector` e iterará sobre los \"\n\"elementos propios de ese vector. En su lugar, puedes utilizar `for e in \"\n\"&some_vector` para iterar sobre referencias a elementos de `some_vector`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"permite construir una colección a partir de un [`Iterator`](https://doc.rust-\"\n\"lang.org/std/iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator` implementa\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"Hay dos formas de especificar `B` en este método:\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"Con \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, tal como se \"\n\"muestra. La forma abreviada de `_` que se utiliza aquí permite que Rust \"\n\"infiera el tipo de los elementos `Vec`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"Con inferencia de tipos: `let prime_squares: Vec<_> = some_iterator.\"\n\"collect()`. Reescribe el ejemplo para usar esta opción.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Existen implementaciones básicas de `FromIterator` para `Vec`, `HashMap`, \"\n\"etc. También existen implementaciones mas especializadas que te dejan hacer \"\n\"cosas padres como convertir un `Iterator<Item = Result<V, E>>` a un \"\n\"`Result<Vec<V>, E>`.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"En este ejercicio, necesitaras encontrar y usar métodos del trait \"\n\"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) para \"\n\"implementar una calculación compleja.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Copia el siguiente fragmento de código en la página <https://play.rust-lang.\"\n\"org/> y haz que las pruebas sucedan sin error. Usa una expresión de iterador \"\n\"y `collect` para construir el valor devuelto.\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calcula las diferencias entre los elementos de `values` offset por \"\n\"offset,\\n\"\n\"/// envolviendo de esta forma los elementos desde el final de `values` hasta \"\n\"el principio.\\n\"\n\"///\\n\"\n\"/// El elemento `n` del resultado es `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use, super, self\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Hemos visto cómo los bloques `impl` nos permiten asignar espacios de nombres \"\n\"de funciones a un tipo.\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"Del mismo modo, `mod` nos permite asignar espacios de nombres a funciones y \"\n\"tipos:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"En el módulo foo\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"En el módulo bar\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Los paquetes ofrecen funciones e incluyen un archivo `Cargo.toml` que \"\n\"describe cómo compilar un paquete de más de un crate.\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Los crates son un árbol de módulos, donde un crate binario crea un \"\n\"ejecutable y un crate de biblioteca compila una biblioteca.\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\"Los módulos definen la organización y el ámbito, y son el centro de esta \"\n\"sección.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\"Omitir el contenido del módulo hará que Rust lo busque en otro archivo:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"Esto indica que el contenido del módulo `garden` se encuentra en `src/garden.\"\n\"rs`. Del mismo modo, el módulo `garden::vegetables` se encuentra en `src/\"\n\"garden/vegetables.rs`.\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"La raíz de `crate` está en:\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (para un crate de biblioteca)\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (para un crate binario)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"Los módulos definidos en archivos también se pueden documentar mediante \"\n\"\\\"comentarios internos del documento\\\". En ellos se indica el elemento que \"\n\"los contiene, en este caso, un módulo.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! Este módulo implementa el jardín, incluida una germinación de alto \"\n\"rendimiento.\\n\"\n\"//!\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Vuelve a exportar los tipos de este módulo.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Siembra los paquetes de semilla determinados.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Cosecha el producto en el jardín que esté listo.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"Antes de Rust 2018, los módulos debían ubicarse en `module/mod.rs` en lugar \"\n\"de en `module.rs`. Esta alternativa sigue existiendo en las ediciones \"\n\"posteriores a 2018.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"El principal motivo de introducir `filename.rs` en lugar de `filename/mod.\"\n\"rs` se debe a que si muchos archivos llamados `mod.rs` puede ser difícil \"\n\"distinguirlos en IDEs.\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"Un anidamiento más profundo puede usar carpetas, incluso si el módulo \"\n\"principal es un archivo:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"El lugar donde Rust buscará los módulos se puede cambiar con una directiva \"\n\"del compilador:\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"Esto resulta útil, por ejemplo, si deseas colocar pruebas de un módulo en un \"\n\"archivo denominado `some_module_test.rs`, similar a la convención en Go.\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Los módulos marcan el límite de la privacidad:\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Los elementos del módulo son privados de forma predeterminada (se ocultan \"\n\"los detalles de implementación).\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Los elementos superiores y los del mismo nivel siempre están visibles.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"Es decir, si un elemento está visible en el módulo `foo`, se verá en todos \"\n\"los elementos descendientes de `foo`.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Haz que los módulos sean públicos con la palabra clave `pub`.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"Además, hay especificadores `pub(...)` avanzados para restringir el ámbito \"\n\"de la visibilidad pública.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Consulta el libro [Rust Reference](https://doc.rust-lang.org/reference/\"\n\"visibility-and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"Configurar la visibilidad de `pub(crate)` es un patrón común.\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\"Aunque es menos frecuente, se puede dar visibilidad a una ruta específica.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"En cualquier caso, se debe dar visibilidad a un módulo antecedente (y a \"\n\"todos sus descendientes).\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"Un módulo puede incluir símbolos de otro módulo en el ámbito con `use`. \"\n\"Normalmente, se ve algo como esto en la parte superior de cada módulo:\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Rutas\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Las rutas se resuelven de la siguiente manera:\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"Como ruta relativa:\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` o `self::foo` hacen referencia a `foo` en el módulo corriente,\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` hace referencia a `foo` en el módulo superior.\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"Como ruta absoluta:\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` hace referencia a `foo` en la raíz del crate corriente,\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` hace referencia a `foo` en el crate `bar`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"Es habitual \\\"volver a exportar\\\" los símbolos en una ruta más corta. Por \"\n\"ejemplo, el archivo `lib.rs` de nivel superior de un crate puede hacer que\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"haciendo que `DiskStorage` y `NetworkStorage` estén disponibles para otros \"\n\"crates con una ruta corta y práctica.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"La mayoría de las veces, únicamente deben ser `use` los elementos que \"\n\"aparecen en un módulo. Sin embargo, un trait debe encontrarse dentro del \"\n\"ámbito para llamar a cualquier método de ese trait, incluso aunque ya haya \"\n\"un tipo que implemente dicho trait dentro del ámbito. Por ejemplo, para usar \"\n\"el método `read_to_string` en un tipo que implemente el trait `Read`, debes \"\n\"usar std::io::Read`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"La instrucción `use` puede tener un comodín: `use std::io::*`. No se \"\n\"recomienda su uso porque no está claro qué elementos se importan y cuáles \"\n\"podrían cambiar con el tiempo.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"En este ejercicio, vas a reorganizar una pequeña implementación de una \"\n\"biblioteca GUI. Esta biblioteca define un trait `Widget` y algunas \"\n\"implementaciones de dicho trait, así como una función `main`.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"Es habitual colocar cada tipo o conjunto de tipos que estén estrechamente \"\n\"relacionados en su propio módulo, por lo que cada tipo de widget debe tener \"\n\"su propio módulo.\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"Configuración de Cargo\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"El playground de Rust solo admite un archivo, por lo que tendrás que crear \"\n\"un proyecto de Cargo en tu sistema de archivos local:\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"Edita el archivo `src/main.rs` resultante para añadir instrucciones `mod` y \"\n\"añade archivos adicionales en el directorio `src`.\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"Fuente\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\"A continuación, se muestra la implementación de la biblioteca GUI en un solo \"\n\"módulo:\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Ancho natural de `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Coloca el widget en un búfer.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Coloca el widget en una salida estándar.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Añade 4 espacios de relleno para los bordes\\n\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TAREAS: Cambia draw_into para devolver Result<(), std::fmt::Error>. A \"\n\"continuación, utiliza el\\n\"\n\"        // operator ? en lugar de .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// añade un poco de espacio de relleno\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Demo de la GUI de Rust 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"Esta es una demo de la GUI con poco texto.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Haz clic aquí\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"Anima a los participantes a dividir el código de un modo que les parezca \"\n\"natural para que se familiaricen con las declaraciones `mod`, `use` y `pub`. \"\n\"Después, comenta qué tipo de organización es más idiomática.\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: window-width\\n\"\n\"        // Añade 4 espacios de relleno para los bordes\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TAREA: después de saber cómo gestionar los errores, puedes cambiar\\n\"\n\"        // draw_into para devolver Result<(), std::fmt::Error>. A \"\n\"continuación, usa\\n\"\n\"        // el operator ? en lugar de .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Pruebas Unitarias\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust y Cargo incluyen un sencillo framework para pruebas unitarias:\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Las pruebas unitarias se admiten en todo el código.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\"Las pruebas de integración se admiten a través del directorio `tests/`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"Las pruebas se marcan con `#[test]`. Las pruebas unitarias se suelen incluir \"\n\"en un módulo `tests` anidado en el que se utiliza `#[cfg(test)]` para \"\n\"compilarlas únicamente cuando se compilan las pruebas.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Hola, mundo\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Esto permite realizar pruebas unitarias de los ayudantes privados.\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"El atributo `#[cfg(test)]` solo está activo cuando se ejecuta `cargo test`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"Haz las pruebas en el playground para ver los resultados.\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Pruebas de Integración\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Si quieres probar tu biblioteca como cliente, haz una prueba de integración.\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Crea un archivo `.rs` en `tests/`:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Estas pruebas solo tienen acceso a la API pública de tu crate.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Pruebas de Documentación\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust cuenta con asistencia integrada para pruebas de documentación:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// Acorta una cadena según la longitud proporcionada.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hola, mundo\\\", 5), \\\"Hola\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hola, mundo\\\", 20), \\\"Hola, mundo\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Los bloques de código en los comentarios `///` se ven automáticamente como \"\n\"código de Rust.\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"El código se compilará y ejecutará como parte de `cargo test`.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"Si añades `#` al código, se ocultará de los documentos, pero se seguirá \"\n\"compilando o ejecutando.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Prueba el código anterior en el [playground de Rust](https://play.rust-lang.\"\n\"org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"El compilador de Rust crea mensajes de error muy buenos, así como lints \"\n\"integrados útiles. [Clippy](https://doc.rust-lang.org/clippy/) ofrece aún \"\n\"más lints, organizados en grupos que se pueden habilitar por proyecto.\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"Es probable que X encaje en una u16, ¿no? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"Ejecuta el código de ejemplo y analiza el mensaje de error. También se ven \"\n\"lints, pero no se mostrarán una vez que se compile el código. Ve al \"\n\"playground para ver los lints.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"Después de resolver los lints, ejecuta `clippy` en el playground para \"\n\"mostrar advertencias de Clippy. Clippy cuenta con una amplia documentación \"\n\"sobre sus lints y añade otros nuevos continuamente (incluidos los de \"\n\"denegación de forma predeterminada).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"Ten en cuenta que los errores o las advertencias con `help: ...` se pueden \"\n\"corregir con `cargo fix` o con el editor que uses.\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algoritmo de Luhn\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"El [algoritmo de Luhn](https://es.wikipedia.org/wiki/Luhn_algorithm) se usa \"\n\"para validar números de tarjetas de crédito. El algoritmo toma una cadena \"\n\"como entrada y hace lo siguiente para validar el número de la tarjeta de \"\n\"crédito:\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"\"\n\"Ignora todos los espacios. Rechaza los números con menos de dos dígitos.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"De derecha a izquierda, duplica cada dos cifras: en el caso del número \"\n\"`1234`, se duplica el `3` y el `1`. En el caso del número `98765`, se \"\n\"duplica el `6` y el `8`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Después de duplicar un dígito, se suman los dígitos si el resultado es mayor \"\n\"a 9. Por tanto, si duplicas `7`, pasará a ser `14`, lo cual pasará a ser `1 \"\n\"+4 = 5`.\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Suma todos los dígitos, no duplicados y duplicados.\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\"El número de la tarjeta de crédito es válido si la suma termina en `0`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"El código proporcionado ofrece una implementación errónea del algoritmo de \"\n\"Luhn, junto con dos pruebas unitarias básicas que confirman que la mayor \"\n\"parte del algoritmo se ha implementado correctamente.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Copia el fragmento de código que aparece más abajo en la página a <https://\"\n\"play.rust-lang.org/> y escribe pruebas adicionales para descubrir y arreglar \"\n\"errores en la implementación proveída.\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// Esta es la versión con errores que aparece en el problema.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// Esta es la solución, que pasará todas las siguientes pruebas.\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"¿Es {cc_number} un número de tarjeta de crédito válido? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"sí\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"no\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 15 minutos. Contiene:\"\n\n#: src/error-handling.md\nmsgid \"Error Trait\"\nmsgstr \"Trait `Error`\"\n\n#: src/error-handling.md\nmsgid \"thiserror and anyhow\"\nmsgstr \"`thiserror` y `anyhow`\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"Ejercicio: reescribir con Result\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust gestiona los errores críticos con un \\\"pánico\\\".\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"Rust activará un _panic_ si se produce un error grave en _runtime_:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Los _panics_ se usan para errores irrecuperables e inesperados.\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Los _panics_ son un síntoma de que hay fallos en el programa.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\"Los fallos del tiempo de ejecución, como las comprobaciones de límites \"\n\"fallidas, pueden causar un pánico\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"Las aserciones (como `assert!`) causan un pánico cuando fallan\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"Los pánicos con fines específicos pueden usar la macro `panic!`.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"Cuando se produce un pánico, se \\\"desenrolla\\\" la pila y se eliminan los \"\n\"valores como si las funciones hubieran devuelto un resultado.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Utiliza API que no activen _panics_ (como `Vec::get`) si no se admiten \"\n\"fallos.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"De forma predeterminada, el _panic_ hará que la _stack_ se desenrolle. El \"\n\"proceso de desenrrollado se puede detectar:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"No hay ningún problema.\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"¡Vaya!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\"El catching no es habitual, por lo que recomendamos no implementar \"\n\"excepciones con `catch_unwind`!\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Esto puede ser útil en los servidores que deben seguir ejecutándose aunque \"\n\"una sola solicitud falle.\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"No funciona si `panic = 'abort'` está definido en `Cargo.toml`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\"El mecanismo primario para el manejo de errores en Rust es el enum [`Result`]\"\n\"(https://doc.rust-lang.org/stable/std/result/enum.Result.html), que vimos \"\n\"brevemente al discutir los tipos de la biblioteca estándar.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\"`Result` tiene dos variantes: `Ok`, que contiene el valor de éxito; y `Err`, \"\n\"que contiene un valor de error de algún tipo.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\"La signatura de tipo de una función indica si puede producir un error, en \"\n\"este caso devolverá un valor `Result`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\"Como con `Option`, no hay manera de olvidarse de manejar un error: no puedes \"\n\"acceder el valor de éxito o el valor de error sin hacer coincidencia de \"\n\"patrones sobre el `Result` para ver que variante tienes. Métodos como \"\n\"`unwrap` hacen que sea mas fácil escribir código rápido-y-sucio que no \"\n\"maneja errores de una forma robusta, pero esto significa que siempre puedes \"\n\"ver en tu código donde no estas manejando errores de la manera propia.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\"Podria ayudar comparar el manejo de errores en Rust con las convenciones de \"\n\"manejo de errores de otros lenguajes que conocen los estudiantes.\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"Muchos lenguajes usan excepciones, e.g. C++, Java, Python.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"En la mayoria\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"Los errores de tiempo de ejecución, como los de fallo en la conexión o de \"\n\"archivo no encontrado, se gestionan con el tipo `Result`, pero hacer \"\n\"coincidir este tipo en todas las llamadas puede ser complicado. El operador \"\n\"try `?` se utiliza para devolver errores al llamador. Te permite convertir \"\n\"lo habitual\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"en algo mucho más sencillo:\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"Podemos utilizarlo para simplificar el código de gestión de errores:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"nombre de usuario o error: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"Simplifica la función `read_username` para usar `?`.\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"La variable `username` puede ser `Ok(string)` o `Err(error)`.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Utiliza la llamada a `fs::write` para probar las distintas situaciones: sin \"\n\"archivo, archivo vacío o archivo con nombre de usuario.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"Ten en cuenta que `main` puede devolver un `Result<(), E>` siempre que \"\n\"implemente `std::process:Termination`. En la práctica, esto significa que \"\n\"`E` implementa `Debug`. El ejecutable imprimirá la variante `Err` y \"\n\"devolverá un estado de salida distinto a cero si se produce un error.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"La expansión efectiva de `?` es un poco más complicada de lo que se ha \"\n\"indicado anteriormente:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"funciona igual que\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Aquí la llamada a `From::from` significa que intentamos convertir el tipo de \"\n\"error al tipo que devuelve la función:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"Error IO: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"No se ha encontrado ningún nombre de usuario en {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"El operador `?` debe devolver un valor compatible con el tipo de resultado \"\n\"devuelto de la función. En `Result`, significa que los tipos de error deben \"\n\"ser compatibles. Una función que devuelve `Result<T, ErrorOuter>` solo puede \"\n\"usar `?` en un valor del tipo `Result<U, ErrorInner>` si `ErrorOuter` y \"\n\"`ErrorInner` son del mismo tipo o si `ErrorOuter` implementa `. \"\n\"From<ErrorInner>`.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"Una alternativa habitual a la implementación `From` es `Result::map_err`, \"\n\"sobre todo si la conversión solo se produce en un lugar.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"No hay ningún requisito de compatibilidad para `Option`. Una función que \"\n\"devuelve `Option<T>` puede usar el operador `?` en `Option<U>` para tipos \"\n\"arbitrarios de `T` y `U`.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"Una función que devuelve `Result` no puede usar `?` en `Option` y viceversa. \"\n\"Sin embargo, `Option::ok_or` convierte `Option` en `Result`, mientras que \"\n\"`Result::ok` convierte `Result` en `Option`.\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Tipos de Errores Dinámicos\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"A veces, queremos permitir que se devuelva cualquier tipo de error sin \"\n\"escribir nuestra propia _enum_ que cubra todas las posibilidades. `std::\"\n\"error::Error` facilita este proceso.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Recuento: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Error: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"La función `read_count` puede devolver `std::io::Error` (de las operaciones \"\n\"de archivos) o `std::num::ParseIntError` (de `String::parse`).\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Esto permite ahorrar código, pero no da la posibilidad de gestionar \"\n\"eficazmente los distintos casos de error en el programa. Por lo general, no \"\n\"es una buena idea utilizar `Box<dyn Error>` en la API pública de una \"\n\"biblioteca, pero puede ser una buena opción en un programa en el que solo \"\n\"quieras mostrar el mensaje de error en alguna parte.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\"Asegúrate de implementar el trait `std::error::Error` al definir un tipo de \"\n\"error personalizado para que pueda tener una estructura box. Sin embargo, si \"\n\"necesitas el atributo `no_std`, ten en cuenta que el trait `std::error::\"\n\"Error` de momento solo es compatible con `no_std` en [nightly](https://\"\n\"github.com/rust-lang/rust/issues/103765).\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Uno de los métodos más populares para crear una _enum_ (enumeración) de \"\n\"errores es el crate [thiserror](https://docs.rs/thiserror/), como hicimos en \"\n\"la página anterior:\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\"`thiserror` se suele usar en bibliotecas para crear tipos de errores \"\n\"personalizados que implementan `From<T>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\"Las aplicaciones suelen utilizar `anyhow` para gestionar errores en \"\n\"funciones, como añadir información contextual a los errores.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"No se ha encontrado ningún nombre de usuario en {0}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"No se ha podido abrir {path}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"No se ha podido leer\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Nombre de usuario: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Error: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror`\"\nmsgstr \"`Error`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"La macro de derivación `Error` la proporciona `thiserror` y ofrece muchos \"\n\"atributos útiles para definir los tipos de error de forma compacta.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"El trait `std::error::Error` se deriva automáticamente.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"El mensaje de `#[error]` se usa para derivar el trait `Display`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` es básicamente un envoltorio alrededor de `Box<dyn Error>`. \"\n\"Como tal, no suele ser una buena elección para la API pública de una \"\n\"biblioteca, pero se usa con frecuencia en aplicaciones.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`anyhow::Result<V>` es un alias de tipo para `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"El tipo de error real que contiene se puede extraer para analizarlo si es \"\n\"necesario.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"La funcionalidad proporcionada por `anyhow::Result<T>` puede resultar \"\n\"familiar a los desarrolladores de Go, ya que ofrece patrones de uso y \"\n\"ergonomía similares a `(T, error)` de Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` es un trait implementado para los tipos estándar `Result` \"\n\"y `Option`. Se necesita `use anyhow::Context` para habilitar `.context()` y \"\n\"`.with_context()` en esos tipos.\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"A continuación, se implementa un analizador muy sencillo para un lenguaje de \"\n\"expresiones. Sin embargo, para gestionar los errores, utiliza pánicos. \"\n\"Reescribe este texto para utilizar la gestión de errores idiomática y \"\n\"propagar los errores a un instrucción de retorno desde `main`. No dudes en \"\n\"usar `thiserror` y `anyhow`.\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"CONSEJO: empieza por corregir la gestión de errores en la función `parse`. \"\n\"Cuando funcione correctamente, actualiza `Tokenizer` para implementar \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` y gestiónalo en el analizador.\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// Un operador aritmético.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// Un token en el lenguaje expresión.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// Una expresión en el lenguaje de la expresión.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// Una referencia a una variable.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// Un número literal.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// Una operación binaria.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Carácter inesperado {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Fin de entrada inesperado\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"Número entero de 32 bits no válido'\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Token inesperado: {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// Analiza la operación binaria, si procede.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Carácter inesperado '{0}' en la entrada\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Error del tokenizador: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Token inesperado: {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Número no válido\\\"\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 1 hora y 5 minutos.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"El lenguaje Rust tiene dos partes:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**_Safe_ Rust:** memoria segura, sin posibilidad de comportamiento \"\n\"indefinido.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**_Unsafe_ Rust:** puede activar un comportamiento no definido si se \"\n\"infringen las condiciones previas.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"En este curso, casi todo lo que veremos es _Safe_ Rust, aunque es importante \"\n\"saber qué es _Unsafe_ Rust.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Por lo general, el código inseguro es pequeño y está aislado, y su \"\n\"corrección debe estar bien documentada. Suele estar envuelto en una capa de \"\n\"abstracción segura.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Rust inseguro te permite acceder a cinco nuevas funciones:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Desreferenciar punteros sin formato.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Acceder o modificar variables estáticas mutables.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"Acceder a los campos `union`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"Llamar a funciones `unsafe`, incluidas las funciones `extern`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementar traits `unsafe`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"A continuación, hablaremos brevemente sobre las funciones que no son \"\n\"seguras. Para obtener más información, consulta el [capítulo 19.1 del Libro \"\n\"de Rust](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html) y el \"\n\"documento [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"_Unsafe_ Rust no significa que el código sea incorrecto. Significa que los \"\n\"desarrolladores han desactivado las funciones de seguridad del compilador y \"\n\"que tienen que escribir el código correcto por su cuenta. Significa que el \"\n\"compilador ya no aplica las reglas de seguridad de memoria de Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"La creación de punteros es un proceso seguro, pero para anular las \"\n\"referencias, es necesario utilizar `unsafe`:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"¡cuidado!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// Es seguro porque r1 y r2 se han obtenido a partir desde referencias y, \"\n\"por lo tanto,\\n\"\n\"    // se garantiza que no son nulos y que están alineados correctamente. \"\n\"Los objetos subyacentes\\n\"\n\"    // a las referencias de las que se han obtenido están activos\\n\"\n\"    // en el bloque inseguro y no se puede acceder a ellos ni a través de \"\n\"las \\n\"\n\"    // referencias ni simultáneamente a través de otros punteros.\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 es: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"oh, oh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 es: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// NO ES SEGURO. NO HAGAS ESTO.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Se recomienda (y es obligatorio en la guía de estilo Rust de Android) \"\n\"escribir un comentario para cada bloque `unsafe` explicando cómo el código \"\n\"que contiene cumple los requisitos de seguridad de las operaciones inseguras \"\n\"que realiza.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"En el caso de la desreferenciación de punteros, significa que los punteros \"\n\"deben ser [_válidos_](https://doc.rust-lang.org/std/ptr/index.html#safety), \"\n\"por ejemplo:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"El puntero no puede ser nulo.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"El puntero debe ser _desreferenciable_ (dentro de los límites de un único \"\n\"objeto asignado).\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"El objeto no debe haberse desasignado.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"No debe haber accesos simultáneos a la misma ubicación.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Si el puntero se ha obtenido enviando una referencia, el objeto subyacente \"\n\"debe estar activo y no puede utilizarse ninguna referencia para acceder a la \"\n\"memoria.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"En la mayoría de los casos, el puntero también debe estar alineado \"\n\"adecuadamente.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"En la sección \\\"INSEGURO\\\" se muestra un ejemplo de un tipo común de error \"\n\"comportamiento indefinido: `*r1` tiene el tiempo de vida `'static`, por lo \"\n\"que `r3` tiene el tipo `&'static String` y, por lo tanto, su duración es \"\n\"mayor que la de `s`. Para crear una referencia a partir de un puntero hay \"\n\"que tener _mucho cuidado_.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Es seguro leer una variable estática inmutable:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"¡Hola, mundo!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Sin embargo, dado que pueden producirse carreras de datos, no es seguro leer \"\n\"y escribir variables estáticas mutables:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"CONTADOR: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"Este programa es seguro porque tiene un único hilo. Sin embargo, el \"\n\"compilador de Rust es conservador y asumirá lo peor. Prueba a eliminar \"\n\"`unsafe` y observa cómo el compilador explica que cambiar un elemento \"\n\"estático desde varios hilos es un comportamiento indefinido.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"No suele ser buena idea usar una variable estática mutable, pero en algunos \"\n\"casos puede encajar en código `no_std` de bajo nivel, como implementar una \"\n\"asignación de _heap_ o trabajar con algunas APIs C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Las uniones son como _enums_ (enumeraciones), pero eres tú quien debe hacer \"\n\"el seguimiento del campo activo:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// ¡Comportamiento indefinido!\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Las uniones raramente son necesarias en Rust, ya que se suele utilizar una \"\n\"_enum_. A veces se necesitan para interactuar con APIs de biblioteca C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Si solo quieres reinterpretar los bytes como otro tipo, probablemente te \"\n\"interese [`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) o una envoltura segura, como el crate [`zerocopy`](https://\"\n\"crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Llamar Funciones Unsafe (Inseguras)\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Una función o método se puede marcar como `unsafe` si tiene condiciones \"\n\"previas adicionales que debes mantener para evitar un comportamiento \"\n\"indefinido:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// Es seguro porque los índices están en el orden correcto, dentro de los \"\n\"límites del\\n\"\n\"    // el slice de la cadena, y se encuentran en los límites de la secuencia \"\n\"de UTF-8.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"recuento de caracteres: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Valor absoluto de -3 según C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Si no se mantiene el requisito de codificación UTF-8, se verá afectada la \"\n\"seguridad de la memoria.\\n\"\n\"    // println!(\\\"emoji: {}\\\", no seguro { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"recuento de caracteres: {}\\\", count_chars(no seguro {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Escribir Funciones Unsafe (Inseguras)\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Puedes marcar tus propias funciones como `unsafe` si requieren condiciones \"\n\"concretas para evitar un comportamiento indefinido.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Cambia los valores a los que apuntan los punteros proporcionados.\\n\"\n\"///\\n\"\n\"/// # Seguridad\\n\"\n\"///\\n\"\n\"/// Los punteros deben ser válidos y estar alineados adecuadamente.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Esto solo suele suponer un problema para las funciones externas que hacen \"\n\"cosas con punteros que pueden infringir el modelo de memoria de Rust pero, \"\n\"en general, cualquier función C puede tener un comportamiento indefinido \"\n\"bajo cualquier circunstancia arbitraria.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"En este ejemplo, `\\\"C\\\"` es la ABI.; [también hay otras ABI disponibles]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"En realidad, no usaríamos punteros para este caso porque se puede hacer de \"\n\"forma segura con referencias.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Ten en cuenta que el código inseguro se admite en una función insegura sin \"\n\"un bloque `unsafe`. Podemos prohibirlo con \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Prueba a añadirlo para ver qué ocurre.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Implementación de Traits Unsafe (Inseguras) \"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Al igual que con las funciones, puedes marcar un trait como `unsafe` si la \"\n\"implementación debe asegurar condiciones concretas para evitar un \"\n\"comportamiento indefinido.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Por ejemplo, el crate `zerocopy` tiene un trait inseguro, [que se parece a \"\n\"esto](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Seguridad\\n\"\n\"/// El tipo debe tener una representación definida y no tener espacio de \"\n\"relleno.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"// Es seguro porque u32 tiene una representación definida y no tiene espacio \"\n\"de relleno.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Debería haber una sección `# Safety` en el Rustdoc para el trait explicando \"\n\"los requisitos para que el trait pueda implementarse de forma segura.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"La sección de seguridad actual de `AsBytes` es bastante más larga y \"\n\"complicada.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Los traits integrados `Send` y `Sync` no son seguros.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Envoltorio de FFI Seguro\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust ofrece una gran asisencia para llamar a funciones a través de una \"\n\"_interfaz de función externa_ (FFI). Usaremos esto para crear un envoltorio \"\n\"seguro para las funciones `libc` que usarías desde C para leer los nombres \"\n\"de archivo de un directorio.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Consulta las páginas del manual:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"También te recomendamos que consultes el módulo [`std::ffi`](https://doc.\"\n\"rust-lang.org/std/ffi/). Ahí encontrarás una serie de tipos de cadena que \"\n\"necesitas para el ejercicio:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"Codificación\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"Uso\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) y [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"Procesar textos en Rust\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) y [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"Terminado en NUL\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"Comunicarse con funciones C\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) y [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"Específico del SO\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"Comunicarse con el SO\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"Realizarás conversiones entre todos estos tipos:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"De `&str` a `CString`: debes asignar espacio para un carácter final `\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\"De `CString` a `*const i8`: necesitas un puntero para llamar a funciones C,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"De `*const i8` a `&CStr`: necesitas algo que pueda encontrar el carácter \"\n\"final `\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"De `&CStr` a `&[u8]`: un slice de bytes es la interfaz universal para \"\n\"\\\"algunos datos desconocidos\\\".\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"De `&[u8]` a `&OsStr`: `&OsStr` es un paso hacia `OsString`, usa [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) para crearlo.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"De `OsStr` a `OsString`: debes clonar los datos en `&OsStr` para poder \"\n\"devolverlo y llamar a `readdir` de nuevo.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"El [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) también tiene un \"\n\"capítulo muy útil sobre FFI.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Copia el fragmento de código que aparece más abajo en la página <https://\"\n\"play.rust-lang.org/> y rellena los métodos y funciones que faltan:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Tipo opaco. Consulta https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Diseño según la página del manual de Linux para readdir(3), donde ino_t \"\n\"y\\n\"\n\"    // off_t se resuelven de acuerdo con las definiciones de\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}. .\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Diseño según la página del manual de macOS de dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// Consulta https://github.com/rust-lang/libc/issues/414 y la sección sobre\\n\"\n\" // _DARWIN_FEATURE_64_BIT_INODE en la página del manual de macOS de \"\n\"stat(2).\\n\"\n\" //\\n\"\n\" // \\\" Las plataformas que existían antes de que estas actualizaciones \"\n\"estuvieran disponibles\\\" hacen referencia\\n\"\n\" // a macOS (en lugar de iOS, WearOS, etc.) en Intel y PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Llama a opendir y devuelve un valor Ok si ha funcionado,\\n\"\n\"        // de lo contrario, devuelve Err con un mensaje.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"// Sigue llamando a readdir hasta se obtenga un puntero NULL.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Llama a closedir según sea necesario.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"archivos: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Ruta no válida: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SEGURIDAD: path.as_ptr() no puede ser NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"No se ha podido abrir {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Sigue llamando a readdir hasta que se obtenga un puntero NULL.\\n\"\n\"        // SEGURIDAD: self.dir nunca es NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// Hemos llegado al final del directorio.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// SEGURIDAD: dirent no es NULL y dirent.d_name es NULL\\n\"\n\"        // finalizado.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SEGURIDAD: self.dir no es NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"No se ha podido cerrar {:?}.\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Hay un carácter no codificado en UTF-8 en la ruta\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Te Damos la Bienvenida a Rust en Android\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust es compatible con el desarrollo de plataformas nativas en Android. Esto \"\n\"significa que puedes escribir nuevos servicios del sistema operativo en \"\n\"Rust, así como ampliar los que ya existen.\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Hoy intentaremos llamar a Rust desde un proyecto personal. Intenta encontrar \"\n\"una pequeña esquina de tu código base donde podamos mover algunas líneas de \"\n\"código a Rust. Cuantas menos dependencias y tipos \\\"exóticos\\\" tenga, mejor. \"\n\"Lo ideal sería algo que analizara bytes sin procesar.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"El orador puede mencionar cualquiera de los siguientes aspectos, debido al \"\n\"aumento del uso de Rust en Android:\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"Ejemplo de servicio: [DNS over HTTP](https://security.googleblog.com/2022/07/\"\n\"dns-over-http3-in-android.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"Bibliotecas: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"Controladores de kernel: [Binder](https://lore.kernel.org/rust-for-\"\n\"linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"Firmware: [firmware de pKVM](https://security.googleblog.com/2023/10/bare-\"\n\"metal-rust-in-android.html)\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Utilizaremos un dispositivo Android virtual para probar el código. Asegúrate \"\n\"de que tienes acceso a uno o créalo con:\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Consulta el [Codelab para desarrolladores de Android](https://source.android.\"\n\"com/docs/setup/start) para obtener más información.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish es un dispositivo Android de referencia diseñado para funcionar \"\n\"en ordenadores genéricos Linux. También tenemos previsto ofrecer \"\n\"compatibilidad con MacOS.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"La imagen del sistema de Cuttlefish mantiene una alta fidelidad a los \"\n\"dispositivos reales y es el emulador ideal para ejecutar muchos casos \"\n\"prácticos de Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"El sistema de compilación de Android (Soong) es compatible con Rust a través \"\n\"de una serie de módulos:\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"Tipo de módulo\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"Descripción\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Produce un binario de Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Produce una biblioteca de Rust y proporciona las variantes `rlib` y `dylib`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Produce una biblioteca de Rust C que pueden usar los módulos `cc` y \"\n\"proporciona variantes estáticas y compartidas.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Produce una biblioteca de Rust `proc-macro`. Son similares a complementos \"\n\"del compilador.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Produce un binario de prueba de Rust que utiliza el agente de prueba \"\n\"estándar de Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Produce un binario de fuzz de Rust que aprovecha `libfuzzer`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Genera código fuente y produce una biblioteca Rust que proporciona una \"\n\"interfaz para un protobuf en particular.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Genera código fuente y produce una biblioteca de Rust que contiene enlaces \"\n\"de Rust a bibliotecas de C.\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"A continuación, hablaremos de `rust_binary` y `rust_library`.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"Otros elementos que puede mencionar el orador:\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo no está optimizado para los repositorios en varios lenguajes y también \"\n\"descarga paquetes de Internet.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"Por razones de cumplimiento y rendimiento, Android debe tener crates en \"\n\"estructura de árbol. También debe existir interoperabilidad con el código C, \"\n\"C++ y Java. Soong cumple estos requisitos.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong tiene muchas similitudes con Bazel, que es la variante de código \"\n\"abierto de Blaze (se utiliza en google3).\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\"Está previsto hacer la transición de [Android](https://source.android.com/\"\n\"docs/setup/build/bazel/introduction), [ChromeOS](https://chromium.\"\n\"googlesource.com/chromiumos/bazel/) y [Fuchsia](https://source.android.com/\"\n\"docs/setup/build/bazel/introduction) a Bazel.\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\"Aprender reglas de compilación similares a Bazel es útil para todos los \"\n\"desarrolladores del SO de Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"Dato curioso: los datos de Star Trek son un Android de tipo Soong.\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Binarios de Rust\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Empecemos con una sencilla aplicación. Desde la raíz de un AOSP revisado, \"\n\"crea los siguientes archivos:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Demo de Rust.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Imprime un saludo en una salida estándar.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"¡Saludos de parte Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Ahora puedes compilar, insertar y ejecutar el binario:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Bibliotecas de Rust\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"Crea una biblioteca de Rust para Android con `rust_library`.\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Aquí declaramos una dependencia en dos bibliotecas:\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, que definimos más abajo.\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, que es un crate ya incluido en [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Es necesario para evitar errores de enlace dinámico.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Biblioteca de saludos.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Saluda a `name`.\\n\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\"```text\\n\"\n\"Hello Bob, it is very\\n\"\n\"nice to meet you!\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Puedes compilar, insertar y ejecutar el binario como antes:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"El [lenguaje de definición de la interfaz de Android (AIDL)](https://\"\n\"developer.android.com/guide/components/aidl) es compatible con Rust:\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\"El código de Rust puede llamar a servidores AIDL que ya se hayan creado.\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Puedes crear servidores de AIDL en Rust.\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfaces de AIDL\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"La API de tu servicio se declara mediante una interfaz de AIDL:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Birthday service interface. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Generate a Happy Birthday message. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust no está habilitado de forma predeterminada\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"Rust generado:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"Implementación del servicio\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Ahora podemos implementar el servicio de AIDL:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// Implementación del método HelloWorld::hello.\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Feliz cumpleaños, {name}, te han caído {years} años\\\".\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"Servidor de AIDL\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Por último, podemos crear un servidor que exponga el servicio:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Servicio de felicitación cumpleaños.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Punto de entrada del servicio de felicitación cumpleaños.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"No se ha podido registrar el servicio\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// Para evitar errores de enlaces dinámicos.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Ahora podemos crear, insertar e iniciar el servicio:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Comprueba que el servicio funciona en otra terminal:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"También puedes llamar al servicio con `service call`:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"Cliente de AIDL\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\"Por último, podemos crear un cliente de Rust para nuestro nuevo servicio.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Llama al servicio de felicitación cumpleaños.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\"\\\"No se ha podido conectar con el servicio de felicitación de cumpleaños.\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// Call the service.\\n\"\nmsgstr \"/// Llama al servicio de felicitación cumpleaños.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Ten en cuenta que el cliente no depende de `libbirthdayservice`.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Compila, inserta y ejecuta el cliente en tu dispositivo:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Ampliemos la API con más funciones. Queremos que los clientes puedan indicar \"\n\"una lista de líneas para la tarjeta de cumpleaños:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rust by Example\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`bool`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Note that bytes are signed.\"\nmsgstr \"// Un número mayor de 7 bytes no es válido.\\n\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"Descripción\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"Slices: `&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementación de la interfaz de AIDL de `IBirthdayService`.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementación de la interfaz de AIDL de `IBirthdayService`.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"/// Llama al servicio de felicitación cumpleaños.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"Hola {name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Longitud no válida\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"Pruebas en Android\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\"Basándonos en [Pruebas](../testing.md), ahora veremos cómo funcionan las pruebas \"\n\"unitarias en AOSP. Usa el módulo `rust_test` para tus pruebas unitarias:\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libleftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libleftpad_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_testing/src/lib.rs_:\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Biblioteca de relleno a la izquierda.\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Rellena `s` a la izquierda hasta `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"  foo\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foobar\\\"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"Ahora puedes ejecutar la prueba con\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"La salida se ve así:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\"Observa que solo mencionas la raíz del crate de la biblioteca. Las pruebas se \"\n\"encuentran de forma recursiva en módulos anidados.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"El crate [GoogleTest](https://docs.rs/googletest/) permite realizar aserciones de \"\n\"prueba flexibles utilizando _matchers_:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"Si cambiamos el último elemento a `\\\"!\\\"`, la prueba dará error y aparecerá \"\n\"un mensaje de error estructurado que señala cuál es el fallo:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest no forma parte de Rust Playground, por lo que debes llevar a cabo \"\n\"este ejemplo en un entorno local. Usa `cargo add googletest` para añadirlo \"\n\"rápidamente a un proyecto de Cargo que ya tengas.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"La línea `use googletest::prelude::*;` importa una serie de [macros y tipos \"\n\"habituales](https://docs.rs/googletest/latest/googletest/prelude/index.html).\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), a self-guided Rust course: it provides a guided introduction to \"\n\"the library, with exercises to help you get comfortable with `googletest` \"\n\"macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"Una característica especialmente útil es que las discrepancias en cadenas de \"\n\"varias líneas se muestran como un diff:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Se ha encontrado la seguridad de la memoria,\\\\n\\\\\\n\"\n\" la potente escritura de Rust guía el camino,\\\\n\\\\\\n\"\n\" protege el código que vayas a escribir.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Se ha encontrado seguridad en la memoria,\\\\n\\\\\\n\"\n\" el divertido sentido del humor de Rust guía el camino,\\\\n\\\\\\n\"\n\" protege el código que vayas a escribir.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"muestra un diff con colores (colores que no se muestran aquí):\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"El crate es un puerto de Rust de [GoogleTest para C++](https://google.github.\"\n\"io/googletest/).\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"[Mockall](https://docs.rs/mockall/) es una biblioteca que se usa para hacer \"\n\"simulaciones. Debes refactorizar tu código para usar traits, con los que \"\n\"podrás hacer simulaciones:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"Mockall es la biblioteca de simulación recomendada en Android (AOSP). Hay \"\n\"otras [bibliotecas de simulación disponibles en crates.io](https://crates.io/keywords/mock), \"\n\"particularmente en el área de simulación de servicios HTTP. Las demás \"\n\"bibliotecas de simulación funcionan de manera similar a Mockall, lo que \"\n\"significa que facilitan la obtención de una implementación simulada de un \"\n\"trait determinado.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"Ten en cuenta que las simulaciones son algo _polémicas_, ya que te permiten \"\n\"aislar por completo una prueba de sus dependencias. El resultado inmediato \"\n\"es una ejecución de pruebas más rápida y estable. Por otro lado, las \"\n\"simulaciones se pueden configurar de forma incorrecta y devuelven un \"\n\"resultado diferente del que se obtendría con las dependencias reales.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"Si es posible, te recomendamos que uses las dependencias reales. Por \"\n\"ejemplo, muchas bases de datos te permiten configurar un backend en la \"\n\"memoria. Es decir, en tus pruebas obtendrás el comportamiento correcto y, \"\n\"además, son rápidas y se limpiarán de forma automática tras las pruebas.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"Del mismo modo, muchos frameworks web te permiten iniciar un servidor en \"\n\"proceso que se vincula a un puerto aleatorio en `localhost`. Siempre es \"\n\"mejor utilizar esta opción en lugar de simular el framework, ya que te ayuda \"\n\"a hacer pruebas con el código en el entorno real.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall no forma parte de Rust Playground, por lo que debes ejecutar este \"\n\"ejemplo en un entorno local. Usa `cargo add modelall` para añadir de forma \"\n\"rápida Mockall a un proyecto de Cargo.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall tiene muchas más funciones. En concreto, puedes configurar \"\n\"expectativas en función de los argumentos. Aquí utilizamos el ejemplo para \"\n\"simular un gato que tiene hambre 3 horas después de que le hayan dado de \"\n\"comer:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"Puedes utilizar `.times(n)` para limitar el número de veces que se puede \"\n\"llamar a un método de simulación a `n`. Si no se cumple, la simulación \"\n\"activará un pánico automáticamente cuando se elimine.\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Utiliza el crate `log` para que se registre automáticamente en `logcat` (en \"\n\"el dispositivo) o `stdout` (en el host):\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Demo de registros de Rust.\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Registra un saludo.\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Iniciando programa.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Todo es correcto.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Se ha producido un error.\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Compila, inserta y ejecuta el binario en tu dispositivo:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Los registros se muestran en `adb logcat`:\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust admite sin problemas la interoperabilidad con otros lenguajes. Esto \"\n\"significa que puedes hacer lo siguiente:\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Llamar a funciones de Rust desde otros lenguajes.\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Llamar a funciones escritas en otros lenguajes desde Rust.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Cuando llamas a funciones en otro lenguaje, se dice que estás usando una \"\n\"_interfaz de función externa_, también denominada FFI.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperabilidad con C\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust admite vincular archivos de objetos con una convención de llamada de C. \"\n\"Del mismo modo, puedes exportar funciones de Rust y llamarlas desde C.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Si quieres, puedes hacerlo de forma manual:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Ya lo hemos visto en el ejercicio [Envoltorio de FFI seguro](../../exercises/\"\n\"day-3/safe-ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Esto supone un conocimiento completo de la plataforma objetivo. No se \"\n\"recomienda para producción.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"A continuación, estudiaremos otras opciones mejores.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"Uso de Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"La herramienta [bindgen](https://rust-lang.github.io/rust-bindgen/\"\n\"introduction.html) puede generar automáticamente enlaces desde un archivo de \"\n\"encabezado de C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"En primer lugar, crea una biblioteca de C pequeña:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| ¡Feliz cumpleaños, %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| ¡Enhorabuena por cumplir %i años!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Añade lo siguiente a tu archivo `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Crea un archivo de encabezado de envoltorio para la biblioteca (no es \"\n\"estrictamente necesario en este ejemplo):\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Ahora puedes generar automáticamente los enlaces:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Por último, podemos utilizar los enlaces de nuestro programa de Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Demo de Bindgen.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Por último, podemos ejecutar pruebas generadas automáticamente para \"\n\"comprobar que los enlaces funcionan:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"ninguno\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Archivo generado, se omite la ejecución de lint\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"Llamar a Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Es fácil exportar las funciones y los tipos de Rust a C:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Demo de FFI de Rust.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analiza los números.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"¡x ({x}) es el menor!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) probablemente sea mayor que x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Ahora podemos llamarlo desde un binario de C:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"\\\"#\\\\[no_mangle\\\\]\\\" inhabilita la modificación de nombres habitual de Rust, \"\n\"por lo que el símbolo exportado será el nombre de la función. También puedes \"\n\"utilizar `#[export_name = \\\"some_name\\\"]` para especificar el nombre que \"\n\"quieras.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"El [crate CXX](https://cxx.rs/) permite una interoperabilidad segura entre \"\n\"Rust y C++.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"El enfoque general es el siguiente:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX se basa en una descripción de las firmas de la función que se mostrarán \"\n\"de un lenguaje a otro. Proporcionas esta descripción mediante bloques \"\n\"externos en un módulo de Rust anotado con la macro de atributo `#[cxx::\"\n\"bridge]`.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Estructuras compartidas con campos visibles para ambos lenguajes.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Tipos y firmas de Rust expuestos a C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// Tipos y firmas de C++ y expuestos a Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"Bridge se declara generalmente en un módulo `ffi` dentro del crate.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"A partir de las declaraciones que se han hecho en el módulo bridge, CXX \"\n\"generará definiciones de funciones o tipos de Rust y C++ que coincidan para \"\n\"exponer esos elementos a ambos lenguajes.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"Para ver el código de Rust generado, usa [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) para ver la macro de procedimiento desplegada. En la \"\n\"mayoría de los ejemplos, se utilizaría `cargo expand ::ffi` para desplegar \"\n\"únicamente el módulo `ffi` (aunque esta acción no se aplica a los proyectos \"\n\"de Android).\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"Para ver el código C++ generado, consulta `target/cxxbridge`.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Declaraciones Bridge en Rust\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Tipo opaco\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Método en `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Funciones\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"Elementos declarados en los elementos de referencia `extern de \\\"Rust\\\" que \"\n\"se encuentran dentro del ámbito del módulo superior.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"El generador de código CXX utiliza las secciones `extern de \\\"Rust\\\"` para \"\n\"generar un archivo de encabezado de C++ que contenga las declaraciones de C+\"\n\"+ correspondientes. El encabezado generado tiene la misma ruta que el \"\n\"archivo de origen de Rust que contiene el patrón bridge, excepto con la \"\n\"extensión de archivo .rs.h.\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\"Los resultados son (aproximadamente) los que se muestran a continuación en C+\"\n\"+:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"Declaraciones Bridge en C++\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\"Los resultados son (aproximadamente) los que se muestran a continuación en \"\n\"Rust:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"El programador no tiene que asegurar que las firmas que ha introducido son \"\n\"precisas. CXX lleva a cabo aserciones estáticas en las que las firmas se \"\n\"corresponden exactamente con lo que se declara en C++.\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"Los bloques `unsafe extern` permiten declarar funciones de C++ que se pueden \"\n\"llamar de forma segura desde Rust.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"Solo se admiten enums tipo C (unidad).\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"Un número limitado de traits es compatible con `#[derive()]` en los tipos \"\n\"compartidos. La función correspondiente también se genera para el código C+\"\n\"+; por ejemplo, si derivas `Hash`, también genera una implementación de \"\n\"`std::hash` para el tipo de C++ correspondiente.\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Rust generado:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"C++ generado:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"En Rust, el código generado para las enums compartidas es en realidad una \"\n\"estructura que envuelve un valor numérico. Esto se debe a que no es un \"\n\"comportamiento indefinido en C++ para que una clase de enum contenga un \"\n\"valor distinto de todas las variantes enumeradas y nuestra representación en \"\n\"Rust debe tener el mismo comportamiento.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 requiere una profundidad > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Correcto.\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\"Las funciones de Rust que devuelven `Result` se convierten en excepciones en \"\n\"C++.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"La excepción que se genera siempre será del tipo `rust::Error`, que muestra \"\n\"principalmente una forma de obtener la cadena del mensaje de error. El \"\n\"mensaje de error procede de la implementación `Display` del tipo de error.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"Si un pánico pasa de Rust a C++, el proceso siempre finalizará \"\n\"inmediatamente.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"Las funciones de C++ declaradas para devolver un `Result` detectarán \"\n\"cualquier excepción en C++ y la devolverán como un valor `Err` a la función \"\n\"de llamada de Rust.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"Si se produce una excepción desde una función externa de \\\"C++\\\" no \"\n\"declarada por el bridge de CXX para devolver `Result`, el programa llamará a \"\n\"`std::terminate` de C++. El comportamiento equivale a la misma excepción que \"\n\"se genera mediante una función `noexcept`de C++.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Ejemplo en C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"CxxString\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"Estos tipos se pueden utilizar en los campos de estructura compartidas y en \"\n\"los argumentos e instrucciones de retorno de las funciones externas.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"Ten en cuenta que `String` de Rust no se cruza directamente con `std::\"\n\"string`. Puede haber varios motivos:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\"`std::string` no mantiene la invariante de UTF-8 que requiere `String`.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"Los dos tipos tienen diseños diferentes en la memoria y, por lo tanto, no se \"\n\"pueden transferir directamente entre lenguajes.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` requiere constructores de movimiento que no coincidan con la \"\n\"semántica de movimiento de Rust, por lo que `std::string` no se puede \"\n\"transferir a Rust mediante un valor.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Rust en Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"Crea un `cc_library_static` para compilar la biblioteca de C++, incluidos el \"\n\"encabezado y el archivo de origen generados por CXX.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"Señala que `libcxx_test_bridge_header` y `libcxx_test_bridge_code` son las \"\n\"dependencias de los enlaces de C++ generados por CXX. En la siguiente \"\n\"diapositiva veremos cómo se configuran.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"Ten en cuenta que también debes depender de la biblioteca `cxx-bridge-\"\n\"header` para obtener definiciones de CXX habituales.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"Los documentos completos sobre el uso de CXX en Android se pueden encontrar \"\n\"en [los documentos de Android](https://source.android.com/docs/setup/build/\"\n\"rust/building-rust-modules/android-rust-patterns#rust-cpp-interop-using-\"\n\"cxx). Puedes compartir ese enlace con la clase para que los participantes \"\n\"sepan dónde pueden buscar estas instrucciones de ahora en adelante.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"Crea dos genrule, una para generar el encabezado de CXX y otra para generar \"\n\"el archivo de origen de CXX. Luego se usarán como entradas a \"\n\"`cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Genera un encabezado de C++ que contenga los enlaces de C++\\n\"\n\"// a las funciones exportadas de Rust en lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Genera el código C++ al que llama Rust.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"La herramienta `cxxbridge` es una herramienta independiente que genera el \"\n\"lado C++ del módulo de bridge. Se incluye en Android y está disponible como \"\n\"herramienta de Soong.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"Por convención, si el archivo de origen de Rust es `lib.rs`, el archivo de \"\n\"encabezado se llamará `lib.rs.h` y el archivo de origen, `lib.rs.cc`. Sin \"\n\"embargo, esta convención en cuanto a la nomenclatura no es obligatoria.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\"Crea un `rust_binary` que dependa de `libcxx` y de tu `cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"Interoperabilidad con Java\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java puede cargar objetos compartidos a través de la [interfaz nativa de \"\n\"Java (JNI)](https://es.wikipedia.org/wiki/Java_Native_Interface). [El crate \"\n\"`jni`](https://docs.rs/jni/) permite crear una biblioteca compatible.\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"En primer lugar, creamos una función de Rust para exportar a Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Demo de FFI de Java.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// Implementación del método HelloWorld::hello.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"¡Hola, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Por último, podemos llamar a esta función desde Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"Ahora puedes compilar, sincronizar y ejecutar el binario:\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Este es un ejercicio de grupo: escogeremos uno de los proyectos con los que \"\n\"se esté trabajando e intentaremos integrar Rust en él. Algunas sugerencias:\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Llama a tu servicio de AIDL con un cliente escrito en Rust.\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Mueve una función desde tu proyecto a Rust y llámala.\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Aquí la solución es abierta, ya que depende de que alguno de los asistentes \"\n\"tenga un fragmento de código que se pueda convertir en Rust sobre la marcha.\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Te Damos la Bienvenida a Rust en Chromium\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Rust es compatible con bibliotecas de terceros en Chromium, con código \"\n\"pegamento propio para conectar Rust y el código de C++ de Chromium ya \"\n\"existente.\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"Hoy vamos a llamar a Rust para que haga algo divertido con las cadenas. Si \"\n\"tienes una esquina del código donde se muestra una cadena UTF8 al usuario, \"\n\"no dudes en seguir estas instrucciones en tu parte del código base en lugar \"\n\"de la parte exacta de la que hablamos.\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"Asegúrate de que puedes compilar y ejecutar Chromium. Cualquier plataforma y \"\n\"conjunto de marcas de compilación es apto, siempre que tu código sea \"\n\"relativamente reciente (posición de commit 1223636 en adelante, \"\n\"correspondiente a noviembre del 2023):\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"(Se recomienda una versión de depuración de componentes para que el tiempo \"\n\"de iteración sea más rápido. Esta es la opción predeterminada).\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"Consulta [cómo compilar Chromium](https://www.chromium.org/developers/how-\"\n\"tos/get-the-code/) si aún no lo has hecho. Advertencia: el proceso de \"\n\"configuración para compilar Chromium puede tardar.\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"Se recomienda que tengas instalado Visual Studio Code.\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"Información sobre los ejercicios\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"Esta parte del curso consta de una serie de ejercicios que se complementan \"\n\"entre sí. Las iremos repartiendo a lo largo del curso en lugar de hacerlos \"\n\"todo al final. Si no tienes tiempo para completar una parte concreta, no te \"\n\"preocupes, podrás ponerte al día en la siguiente clase.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"La comunidad de Rust suele usar `cargo` y bibliotecas de [crates.io](https://\"\n\"crates.io/). Chromium se compila usando `gn` y `ninja`, además de un \"\n\"conjunto seleccionado de dependencias.\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"A la hora de escribir código en Rust, hay disponibles varias opciones:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"Usar `gn` y `ninja` con la ayuda de las plantillas de `//build/rust/*.gni` \"\n\"(por ejemplo, `rust_static_library`, que veremos más adelante). Se usan la \"\n\"cadena de herramientas y los crates auditados de Chromium.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"Usar `cargo`, pero [restringiendo el uso de la cadena de herramientas y los \"\n\"crates auditados de Chromium](https://chromium.googlesource.com/chromium/src/\"\n\"+/refs/heads/main/docs/rust.md#Using-cargo).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"Usa `cargo` con una [cadena de herramientas](https://rustup.rs/) o [crates \"\n\"descargados de Internet](https://crates.io/).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"A partir de ahora, nos centraremos en `gn` y `ninja`, ya que así es como se \"\n\"puede compilar el código de Rust en el navegador Chromium. De igual forma, \"\n\"Cargo es una parte importante del ecosistema de Rust y deberías conservarlo \"\n\"en tu caja de herramientas.\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"Ejercicio rápido\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"Formad grupos pequeños para:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"Hacer una lluvia de ideas sobre situaciones en las que `cargo` pueda ofrecer \"\n\"ventajas y evaluar el perfil de riesgo.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"Debatir en qué herramientas, bibliotecas y grupos de personas hay que \"\n\"confiar al usar `gn` y `ninja`, `cargo` offline, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"Pide a los participantes que eviten mirar las notas del orador antes de \"\n\"completar el ejercicio. Suponiendo que todas las personas que hacen el curso \"\n\"están en la misma sala, pídeles que hablen en grupos pequeños de 3 a 4 \"\n\"personas.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"Notas y sugerencias relacionadas con la primera parte del ejercicio \"\n\"(\\\"situaciones en las que Cargo puede ofrecer ventajas\\\"):\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"Es genial que al escribir una herramienta o crear prototipos de una parte de \"\n\"Chromium se pueda acceder al extenso ecosistema de bibliotecas crates.io. \"\n\"Hay un crate para casi cualquier cosa y suelen ser muy fáciles de usar \"\n\"(`clap` para el análisis de la línea de comandos, `serde` para la \"\n\"serialización y deserialización a/desde varios formatos, `itertools` para \"\n\"trabajar con iteradores, etc.).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"`cargo` permite probar una biblioteca fácilmente (solo hay que añadir una \"\n\"línea a `Cargo.toml` y empezar a escribir el código).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"Merece la pena comparar cómo la CPAN ayudó a que `perl` fuera una opción \"\n\"popular o compararlo con `python` + `pip`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"La experiencia de desarrollo no solo es agradable gracias a las herramientas \"\n\"principales de Rust (por ejemplo, al usar `rustup` para cambiar a una \"\n\"versión diferente de `rustc` cuando se prueba un crate que necesita \"\n\"funcionar en nightly, stable actual y antiguas versiones de stable), sino \"\n\"también a un ecosistema de herramientas de terceros (por ejemplo, Mozilla \"\n\"proporciona `cargo vet` para optimizar y compartir auditorías de seguridad; \"\n\"el crate `criterion` ofrece un método optimizado para ejecutar comparativas).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"`cargo` permite añadir fácilmente una herramienta mediante `cargoinstall --\"\n\"locked cargo-vet`.\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\"Merece la pena compararlo con las extensiones de Chrome o con las de VScode.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"Ejemplos generales y genéricos de proyectos en los que `cargo` puede ser la \"\n\"opción más adecuada:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"Sorprendentemente, Rust se está volviendo cada vez más popular en el sector \"\n\"por su función de escritura de herramientas de línea de comandos. La \"\n\"amplitud y la ergonomía de las bibliotecas son similares a las de Python, \"\n\"pero son más sólidas (gracias al sistema de tipos enriquecido) y funcionan \"\n\"más rápido (como lenguaje compilado en lugar de interpretado).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"Para participar en el ecosistema de Rust, es necesario usar herramientas \"\n\"estándar de Rust, como Cargo. Las bibliotecas que quieran recibir \"\n\"contribuciones externas y actuar fuera de Chromium (por ejemplo, en entornos \"\n\"de desarrollo de Bazel o Android/Soong) deberían utilizar Cargo.\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\"Ejemplos de proyectos relacionados con Chromium que se basan en `cargo`\\\\:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient` (experimentado en otras partes de Google que ha dado \"\n\"lugar a PRs con mejoras de rendimiento).\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"Bibliotecas de fuentes, como `font-types`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"La herramienta `gnrt` (la veremos más adelante en el curso), que depende de \"\n\"`clap` para el análisis de la línea de comandos y de `toml` para los \"\n\"archivos de configuración.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"Aclaración: una razón principal para usar `cargo` es que `gn` no está \"\n\"disponible al compilar e iniciar la biblioteca estándar de Rust cuando se \"\n\"compila su cadena de herramientas.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` usa la copia de Chromium de `cargo` y `rustc`. `gnrt` depende \"\n\"de las bibliotecas de terceros descargadas de Internet. `run_gnrt.py` pide a \"\n\"`cargo` que solo se permita el contenido `--locked` a través de `Cargo.lock`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"Los participantes pueden tratar de identificar si los siguientes elementos \"\n\"son de confianza implícita o explícita:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (el compilador de Rust), que a su vez depende de las bibliotecas \"\n\"LLVM, el compilador Clang, las fuentes `rustc` (obtenidas de GitHub y \"\n\"revisadas por el equipo de compilación de Rust), y el compilador binario de \"\n\"Rust descargado para el bootstrapping.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup` (merece la pena destacar que `rustup` se desarrolla en la misma \"\n\"organización que `rustc`, https://github.com/rust-lang/).\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`, `rustfmt`, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"Varias infraestructuras internas (bots que compilan `rustc`, sistemas para \"\n\"distribuir la cadena de herramientas precompiladas a los ingenieros de \"\n\"Chromium, etc.)\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"Herramientas de Cargo, como `cargo audit`, `cargo vet`, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"Bibliotecas de Rust incluidas en `//third_party/rust` (auditoría de \"\n\"security@chromium.org).\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\"Otras bibliotecas de Rust (algunas de nicho, otras bastante populares y de \"\n\"uso común).\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Política de Chromium Rust\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium aún no permite usar Rust propio, excepto en casos excepcionales, \"\n\"según lo aprobado por [Area Tech Leads](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:ATL_OWNERS).\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"La política de Chromium sobre bibliotecas de terceros se describe [aquí]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#rust). Se permite el uso de Rust para bibliotecas \"\n\"de terceros en algunos casos, incluido si son la mejor opción en cuanto al \"\n\"rendimiento o seguridad.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"Muy pocas bibliotecas de Rust exponen directamente una API de C o C++, por \"\n\"lo que casi todas estas bibliotecas necesitarán una pequeña parte de código \"\n\"pegamento propio.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"El código pegamento propio de Rust para un crate de terceros concreto \"\n\"normalmente debe guardarse en `third_party/rust/<crate>/<version>/wrapper`.\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"Por este motivo, el curso de hoy se centrará en los siguientes temas:\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"Incorporación de bibliotecas Rust de terceros (\\\"crates\\\").\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\"Escribir código pegamento para poder usar esos crates desde Chromium C++.\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\"Si esta política cambia con el tiempo, el curso irá evolucionando para \"\n\"adaptarse al cambio.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"Reglas de Compilación (_Build_)\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"El código de Rust se suele compilar con `cargo`. Chromium se compila con \"\n\"`gn` y `ninja` para aumentar la eficiencia. Sus reglas estáticas permiten el \"\n\"máximo paralelismo. Rust no es una excepción.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"Añadir código de Rust a Chromium\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"En algunos archivos `BUILD.gn` de Chromium, declara una \"\n\"`rust_static_library`:\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"También puedes añadir `deps` en otros segmentos de Rust. Más adelante, lo \"\n\"usaremos en función del código de terceros.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"Debes especificar _tanto_ la raíz del crate _como_ una lista completa de \"\n\"recursos. `crate_root` es el archivo proporcionado al compilador de Rust que \"\n\"representa el archivo raíz de la unidad de compilación, que suele ser `lib.\"\n\"rs`. `sources` es una lista completa de todos los archivos de origen que \"\n\"necesita `ninja` para determinar cuándo es necesario compilar de nuevo.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(No existe `source_set` en Rust porque un crate completo ya es una unidad de \"\n\"compilación. Una `static_library` es la unidad más pequeña).\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"Puede que los participantes se pregunten por qué necesitamos una plantilla \"\n\"gn en vez de usar [la compatibilidad integrada de gn para las bibliotecas \"\n\"estáticas de Rust](https://gn.googlesource.com/gn/+/main/docs/reference.\"\n\"md#func_static_library). La respuesta es que esta plantilla es compatible \"\n\"con la interoperabilidad de CXX, las funciones de Rust y las pruebas \"\n\"unitarias, algunas de las cuales usaremos más adelante.\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"Incluir código de Rust `unsafe`\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"El código de Rust inseguro está prohibido en `rust_static_library` de forma \"\n\"predeterminada, por lo que no se podrá compilar. Si necesitas código de Rust \"\n\"inseguro, añade `allow_unsafe = true` al elemento de destino de gn. (Más \"\n\"adelante en el curso veremos circunstancias en las que es necesario hacerlo).\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\"Solo tienes que añadir el elemento de destino que aparece arriba a los \"\n\"`deps` de algún elemento de destino de Chromium C++.\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Los tipos se omiten en el código de Rust, lo que hace que un buen IDE sea \"\n\"aún más útil para C++. El código de Visual Studio funciona bien con Rust en \"\n\"Chromium. Para utilizarlo, haz lo siguiente:\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"Asegúrate de que VSCode tenga la extensión `rust-analyzer`, no versiones \"\n\"anteriores de compatibilidad con Rust.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"`gn gen out/Debug --export-rust-project` (o el equivalente en tu directorio \"\n\"de salida).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"Una demo de algunas de las funciones de anotación de código y exploración de \"\n\"rust-analyzer puede ser útil si los asistentes se muestran escépticos por \"\n\"los IDE.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"Los siguientes pasos pueden servir de ayuda con la demo (aunque puedes usar \"\n\"un fragmento de Rust relacionado con Chromium que te resulte más familiar):\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"Abre `components/qr_code_generator/qr_code_generator_ffi_glue.rs`.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"Coloca el cursor sobre la llamada `QrCode::new` (aproximadamente en la línea \"\n\"26) en \\\\`qr_code_generator_ffi_glue.rs.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"Demo **mostrar la documentación** (enlaces típicos: vscode = ctrl ki; vim/\"\n\"CoC = K).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"Demo **ir a la definición** (enlaces típicos: vscode = F12; vim/CoC = gd) \"\n\"(Esta acción te llevará a `//third_party/rust/.../qr_code-.../src/lib.rs`).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"Demo **esquema** y desplázate hasta el método `QrCode::with_bits` (en la \"\n\"línea 164. El esquema se encuentra en el panel del explorador de archivos de \"\n\"vscode. Enlaces típicos de vim/CoC = espacio o).\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"Demo **anotaciones de tipos** (hay varios ejemplos en el método `QrCode::\"\n\"with_bits`).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"Es necesario destacar que hay que volver a ejecutar `gn gen ... --export-\"\n\"rust-project` después de editar los archivos `BUILD.gn` (lo haremos varias \"\n\"veces a lo largo de los ejercicios de esta sesión).\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"Ejercicio de reglas de compilación\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"En tu compilación de Chromium, añade un nuevo elemento de destino de Rust a \"\n\"`//ui/base/build.gn` que contenga lo siguiente:\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**Importante:** Ten en cuenta que `no_mangle` en este caso se considera un \"\n\"tipo de inseguridad según el compilador de Rust, por lo que tendrás que \"\n\"permitir código inseguro en el elemento de destino `gn`.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"Añade este nuevo elemento de destino de Rust como una dependencia de `//ui/\"\n\"base:base`. Declara esta función en la parte superior de `ui/base/resource/\"\n\"resource_bundle.cc` (más adelante veremos cómo se puede automatizar mediante \"\n\"herramientas de generación de enlaces):\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"Llama a esta función desde algún lugar de `ui/base/resource/resource_bundle.\"\n\"cc`. Recomendamos hacerlo en la parte superior de `ResourceBundle::\"\n\"RSMangleLocalizedString`. Compila y ejecuta Chromium y asegúrate de que se \"\n\"imprima \\\"¡Rust te manda un saludo!\\\" muchas veces.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"Si usas VSCode, ahora debes configurar Rust para que funcione correctamente \"\n\"en VSCode. Nos será útil en ejercicios posteriores. Si lo has completado \"\n\"correctamente, podrás hacer clic con el botón derecho y pulsar \\\"Ir a la \"\n\"definición\\\" en `println!`.\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"Dónde obtener ayuda\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"Opciones disponibles de la [plantilla gn `rust_static_library`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"Información sobre [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"Información sobre [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"Información sobre el interruptor [`--export-rust-project`](https://gn.\"\n\"googlesource.com/gn/+/main/docs/reference.md#compilation-database) de gn\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[Cómo instalar rust-analyzer en VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"Este ejemplo no es habitual porque se reduce al lenguaje de \"\n\"interoperabilidad con el mínimo común denominador, C. Tanto C++ como Rust \"\n\"pueden declarar y llamar de forma nativa funciones ABI de C. Más adelante, \"\n\"conectaremos C++ directamente con Rust.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"`allow_unsafe = true` es obligatorio porque `#[no_mangle]` podría permitir \"\n\"que Rust genere dos funciones con el mismo nombre, y Rust ya no puede \"\n\"asegurar que se llame a la correcta.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"Si necesitas un ejecutable puro de Rust, también puedes hacerlo con la \"\n\"plantilla gn `rust_executable`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"La comunidad de Rust suele crear las pruebas unitarias en un módulo situado \"\n\"en el mismo archivo fuente que el código que se está probando. Este tema ya \"\n\"se ha tratado [antes](../testing.md) en el curso y tiene este aspecto:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"En Chromium colocamos las pruebas unitarias en un archivo fuente \"\n\"independiente y continuamos con esta práctica con Rust. De esta forma, las \"\n\"pruebas se pueden encontrar de forma coherente y se evita volver a crear \"\n\"archivos `.rs` (en la configuración `test`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\"Esta acción genera las siguientes opciones para probar el código de Rust en \"\n\"Chromium:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"Pruebas nativas de Rust (es decir, `#[test]`). No se recomienda hacerlas \"\n\"fuera de `//third_party/rust`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"Pruebas `gtest` escritas en C++ y ejercicios con Rust mediante llamadas de \"\n\"FFI. Suficiente cuando el código de Rust es solo una capa fina de FFI y las \"\n\"pruebas unitarias existentes proporcionan suficiente cobertura para la \"\n\"función.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"Pruebas `gtest` creadas en Rust y usando el crate en prueba a través de su \"\n\"API pública (mediante `pub mod for_testing { ... }` si es necesario). Este \"\n\"es el tema de las siguientes diapositivas.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"Menciona que los bots de Chromium deberían hacer pruebas nativas de Rust de \"\n\"crates de terceros tarde o temprano. (Estas pruebas rara vez son necesarias, \"\n\"solo después de añadir o actualizar crates de terceros).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"Algunos ejemplos pueden ayudarte a ilustrar cuándo se debe usar `gtest` de C+\"\n\"+ o `gtest` de Rust:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR cuenta con muy pocas funciones en la capa de Rust propia (solo es un \"\n\"código pegamento de FFI) y, por lo tanto, utiliza las pruebas unitarias de C+\"\n\"+ existentes para probar la implementación de C++ y la de Rust \"\n\"(parametrizando las pruebas de modo que habiliten o inhabiliten Rust \"\n\"mediante un `ScopedFeatureList`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"La integración hipotética/WIP de PNG puede necesitar una implementación \"\n\"segura en memoria de las transformaciones de píxeles que proporciona \"\n\"`libpng` pero que faltan en el crate `png`, como por ejemplo, RGBA => BGRA o \"\n\"corrección gamma. Dicha función puede beneficiarse de pruebas independientes \"\n\"creadas en Rust.\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"La biblioteca [`rust_gtest_interop`](https://chromium.googlesource.com/\"\n\"chromium/src/+/main/testing/rust_gtest_interop/README.md) permite hacer lo \"\n\"siguiente:\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"Usar una función de Rust como caso de prueba `gtest` (con el atributo \"\n\"`#[gtest(...)]`).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"Usar `expect_eq!` y macros similares (similares a `assert_eq!`, pero sin que \"\n\"se produzcan pánicos o sin finalizar la prueba cuando la aserción falle).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Ejemplo:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"La forma más sencilla de compilar pruebas `gtest` de Rust es añadirlas a un \"\n\"binario de prueba que ya contenga pruebas creadas en C++. Por ejemplo:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"La creación de pruebas de Rust en una `static_library` independiente también \"\n\"funciona, pero es necesario declarar manualmente la dependencia en las \"\n\"bibliotecas de compatibilidad:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"Después de añadir `:my_rust_lib` a GN `deps`, tenemos que aprender a \"\n\"importar y usar `my_rust_lib` desde `my_rust_lib_unittest.rs`. No hemos \"\n\"proporcionado un `crate_name` explícito para `my_rust_lib`, por lo que el \"\n\"nombre del crate se calcula en función de la ruta y el nombre de destino \"\n\"completos. Por suerte, podemos evitar trabajar con un nombre tan poco \"\n\"práctico usando la macro `chromium::import!` del crate `chromium` importado \"\n\"automáticamente:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\"En un segundo plano, la macro se expande a algo parecido a lo siguiente:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"Puedes obtener más información en [el comentario del documento](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) de la macro `chromium::import`.\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"`rust_static_library` permite especificar un nombre explícito mediante la \"\n\"propiedad `crate_name`, pero no se recomienda hacerlo. El motivo es porque \"\n\"el nombre del crate debe ser único en todo el mundo. crates.io garantiza la \"\n\"exclusividad de sus nombres de crate, de modo que los elementos de destino \"\n\"de GN `cargo_crate` (generados por la herramienta `gnrt` que se explican en \"\n\"una sección posterior) usan nombres de crate cortos.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"Ejercicio de pruebas\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"¡Vamos a hacer otro ejercicio!\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"En tu compilación de Chromium:\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"Añade una función que se pueda probar junto a `hello_from_rust`. Aquí tienes \"\n\"algunas sugerencias: añadir dos números enteros recibidos como argumentos, \"\n\"calcular el enésimo número de la serie Fibonacci, sumar los enteros en un \"\n\"slice, etc.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\"Añade un archivo `..._unittest.rs` independiente con una prueba de la nueva \"\n\"función.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"Añade las nuevas pruebas a `BUILD.gn`.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\"Compila las pruebas, ejecútalas y comprueba que la nueva prueba funciona.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"La comunidad de Rust ofrece muchas opciones para la interoperabilidad de C++ \"\n\"y Rust, y continuamente se están desarrollando nuevas herramientas. \"\n\"Actualmente, Chromium usa la herramienta CXX.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"Describe todos los límites de tu lenguaje en un lenguaje de definición de \"\n\"interfaz (que se parece mucho a Rust) y, a continuación, las herramientas \"\n\"CXX generarán declaraciones de funciones y tipos tanto en Rust como en C++.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Consulta el [tutorial de CXX](https://cxx.rs/tutorial.html) para ver un \"\n\"ejemplo completo de su uso.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"Aclara el diagrama. Explica que, en segundo plano, esto hace lo mismo que \"\n\"hemos hecho antes. Señala que automatizar el proceso supone las siguientes \"\n\"ventajas:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"La herramienta asegura que C++ y Rust coincidan (por ejemplo, se producen \"\n\"errores de compilación si `#[cxx::bridge]` no coincide con las definiciones \"\n\"de C++ o Rust reales, pero con enlaces manuales no sincronizados, se \"\n\"obtendría un comportamiento no definido)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"La herramienta automatiza la generación de thunks FFI (funciones pequeñas, \"\n\"compatibles con la ABI de C y gratuitas) para funciones que no son de C (por \"\n\"ejemplo, habilitar llamadas de FFI en métodos de Rust o C++. Los enlaces \"\n\"manuales requerirían la creación manual de estas funciones gratuitas de \"\n\"nivel superior).\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\"La herramienta y la biblioteca pueden gestionar un conjunto de tipos \"\n\"principales, como por ejemplo:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` se puede transferir a través del límite de FFI, aunque no garantiza \"\n\"ningún diseño concreto de ABI o de memoria. Con los enlaces manuales, `std::\"\n\"span<T>` y `&[T]` se tienen que desestructurar manualmente y compilarlos a \"\n\"partir de un puntero y una longitud. Esto suele acarrear errores, ya que \"\n\"cada lenguaje representa los slices vacíos de forma ligeramente distinta.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"Los punteros inteligentes como `std::unique_ptr<T>`, `std::shared_ptr<T>` o \"\n\"`Box` se admiten de forma nativa. Con los enlaces manuales, sería necesario \"\n\"pasar punteros sin formato compatibles con ABI de C, lo que aumentaría los \"\n\"riesgos de tiempo de vida y de seguridad en la memoria.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"Los tipos `rust::String` y `CxxString` entienden y mantienen las diferencias \"\n\"en la representación de cadenas en los distintos lenguajes (por ejemplo, \"\n\"`rust::String::lossy` puede crear una cadena de Rust a partir de una entrada \"\n\"que no sea UTF8 y `rust::String::: c_str` puede terminar una cadena con un \"\n\"carácter nulo).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"CXX necesita que se declare todo el límite de C++ o Rust en los módulos \"\n\"`cxx::bridge` del código fuente `.rs`.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\"// Las definiciones de los tipos y las funciones de Rust se colocan aquí\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"Señala lo siguiente:\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"Aunque parece un `mod` de Rust habitual, la macro de procedimiento `#[cxx::\"\n\"bridge]` es capaz de desempeñar tareas complejas. El código generado es \"\n\"bastante más sofisticado, aunque aun así da como resultado un `mod` llamado \"\n\"`ffi` en el código.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Compatibilidad nativa con `std::unique_ptr` de C++ en Rust.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Compatibilidad nativa con los slices de Rust en C++.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"Llamadas de C++ a Rust y tipos de Rust (en la parte superior).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"Llamadas de Rust a C++ y tipos de C++ (en la parte inferior).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**Error común**: _Parece_ que Rust está analizando un encabezado de C++, \"\n\"pero no es así. Rust nunca interpreta este encabezado, sino que simplifica \"\n\"`#include`d en el código C++ generado para ayudar a los compiladores de C++.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"Muestra la correspondencia entre [los tipos de Rust y C++](https://cxx.rs/\"\n\"bindings.html):\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX se adapta básicamente a los casos en los que:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\"La interfaz de Rust-C++ es lo suficientemente sencilla como para se pueda \"\n\"declarar por completo.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"Solo estás usando los tipos compatibles de forma nativa con CXX, como `std::\"\n\"unique_ptr`, `std::string` o `&[u8]`, entre otros.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"Tiene muchas limitaciones, por ejemplo, la falta de compatibilidad con el \"\n\"tipo `Option` de Rust.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"Estas restricciones nos limitan a usar Rust en Chromium solo para \\\"nodos \"\n\"hoja\\\" muy aislados, en lugar de para la interoperabilidad arbitraria de \"\n\"Rust-C++. Si te planteas un caso práctico de Rust en Chromium, un buen punto \"\n\"de partida es hacer un borrador de los enlaces de CXX para el límite del \"\n\"lenguaje para ver si te parece lo suficientemente sencillo.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\"También debes hablar de algunos de los otros aspectos delicados con CXX, \"\n\"como los siguientes:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\"Su gestión de errores se basa en las excepciones de C++ (como se muestra en \"\n\"la siguiente diapositiva).\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"Los punteros de función no son muy fáciles de usar.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"La [compatibilidad con `Result<T,E>`](https://cxx.rs/binding/result.html) de \"\n\"CXX se basa en excepciones de C++, por lo que no podemos usarlo en Chromium. \"\n\"Alternativas:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"La parte `T` de `Result<T, E>` puede:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"Devolverse a través de parámetros externos (por ejemplo, mediante `&mut T`). \"\n\"Esto requiere que `T` se pueda transferir a través del límite de FFI. Por \"\n\"ejemplo, `T` tiene que ser:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"Un tipo primitivo (como `u32` o `usize`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"Un tipo compatible de forma nativa con `cxx` (como `UniquePtr<T>`) que tiene \"\n\"un valor predeterminado adecuado para usarlo en caso de fallo (_a diferencia \"\n\"de_ `Box<T>`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"Mantenerse en el lado de Rust y mostrarse mediante referencia. Esto puede \"\n\"ser necesario cuando `T` es un tipo de Rust, que no se puede transmitir \"\n\"mediante el límite de FFI ni se puede almacenar en `UniquePtr<T>`.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"La parte `E` de `Result<T, E>` puede:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"Devolverse como un valor booleano (por ejemplo, `true` representa el éxito y \"\n\"`false` representa el error).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"En teoría, es posible conservar los detalles de los errores, pero hasta \"\n\"ahora no se ha necesitado en la práctica.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Manejo de Errores en CXX: Ejemplo de QR\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"El generador de código QR es [un ejemplo](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:components/qr_code_generator/\"\n\"qr_code_generator_ffi_glue.rs;l=13-18;\"\n\"drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) en el que el valor booleano se \"\n\"utiliza para comunicar que el resultado es correcto o no, y dónde se puede \"\n\"transmitir el resultado correcto a través del límite de FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"Puede que los participantes sientan curiosidad acerca de la semántica del \"\n\"resultado de salida `out_qr_size`. No se trata del tamaño del vector, sino \"\n\"del tamaño del código QR (y admitimos que es un poco redundante, ya que se \"\n\"trata de la raíz cuadrada del tamaño del vector).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"Cabe destacar la importancia de inicializar `out_qr_size` antes de llamar a \"\n\"la función de Rust. La creación de una referencia de Rust que apunte a una \"\n\"memoria no inicializada tiene como resultado un comportamiento indefinido (a \"\n\"diferencia de C++, cuando solo el acto de desreferenciar la memoria resulta \"\n\"en comportamiento indefinido).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Si los participantes preguntan por `Pin`, explica por qué CXX lo necesita \"\n\"para referencias mutables a datos de C++. Los datos de C++ no se pueden \"\n\"mover como los datos de Rust, ya que pueden contener punteros de \"\n\"autorreferencia.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Manejo de Errores\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Un prototipo de un decodificador PNG ilustra lo que se puede hacer cuando el \"\n\"resultado correcto no se puede transmitir a través del límite de FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// Esto devuelve un equivalente de `Result<PngReader<'a>,\\n\"\n\"        /// ()>`, compatible con FFI.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// Enlaces de C++ para el tipo `crate::png::ResultOfPngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// Enlaces de C++ para el tipo `crate::png::PngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` y `ResultOfPngReader` son tipos de Rust. Los objetos de estos \"\n\"tipos no pueden cruzar el límite de FFI sin la indirección de un `Box<T>`. \"\n\"No se puede tener un `out_parameter: &mut PngReader`, ya que CXX no permite \"\n\"que C++ almacene objetos de Rust por valor.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"Este ejemplo ilustra que, aunque CXX no es compatible con plantillas ni \"\n\"genéricos arbitrarios, podemos transmitirlos a través de los límites de FFI \"\n\"si los especializamos de forma manual o los monomorfizamos en un tipo no \"\n\"genérico. En el ejemplo, `ResultOfPngReader` es un tipo no genérico que \"\n\"redirige los métodos adecuados de `Result<T, E>` (por ejemplo, a `is_err`, \"\n\"`unwrap` o `as_mut`).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"Usar cxx en Chromium\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"En Chromium, definimos un `#[cxx::bridge] mod` independiente para cada nodo \"\n\"hoja en el que queremos usar Rust. Normalmente hay uno por cada \"\n\"`rust_static_library`. Solo tienes que añadir\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"al elemento `rust_static_library` que ya tengas junto con `crate_root` y \"\n\"`sources`.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\"Los encabezados de C++ se generarán en una ubicación razonable, por lo que \"\n\"puedes simplemente incluir\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"Encontrarás algunas funciones de utilidad en `//base` para convertir a y \"\n\"desde los tipos de Chromium C++ en tipos CXX de Rust y viceversa. Por \"\n\"ejemplo, [`SpanToRustSlice`](https://source.chromium.org/chromium/chromium/\"\n\"src/+/main:base/containers/span_rust.h;l=21).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"Los participantes pueden preguntarse: \\\"¿por qué sigue siendo necesario \"\n\"`allow_unsafe = true`?\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"La respuesta es que ningún código de C o C++ es \\\"seguro\\\" según los \"\n\"estándares normales de Rust. Si se llama a C o C++ desde Rust, se pueden \"\n\"llevar a cabo acciones arbitrarias en la memoria y se puede poner en peligro \"\n\"la seguridad de los propios diseños de datos de Rust. La presencia de \"\n\"_demasiadas_ palabras clave `unsafe` en la interoperabilidad de C o C++ \"\n\"puede perjudicar la relación señal-ruido de dicha palabra clave, algo \"\n\"[polémico](https://steveklabnik.com/writing/the-cxx-debate). No obstante, en \"\n\"términos estrictos, introducir código externo en un binario de Rust puede \"\n\"provocar un comportamiento inesperado desde el punto de vista de Rust.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"La respuesta exacta se encuentra en el diagrama de la parte superior de \"\n\"[esta página](../Interop-with-cpp.md): en segundo plano, CXX genera \"\n\"funciones de Rust `unsafe` y `extern \\\"C\\\"`, igual que hicimos de forma \"\n\"manual en la sección anterior.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Ejercicio: Interoperabilidad con C++\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"Primera parte\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"En el archivo de Rust que has creado anteriormente, añade un `#[cxx::\"\n\"bridge]`, que especifica una sola función, denominada `hello_from_rust`, a \"\n\"la que se llamará desde C++, sin parámetros y sin devolver ningún valor.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"Modifica la función `hello_from_rust` anterior para eliminar `extern \\\"C\\\"` \"\n\"y `#[no_mangle]`. Ahora es solo una función estándar de Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"Modifica el elemento de destino de `gn` para compilar estos enlaces.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"En el código C++, elimina la declaración de `hello_from_rust`. En su lugar, \"\n\"incluye el archivo de encabezado que se ha generado.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"Compila y ejecuta.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"Segunda parte\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"Se recomienda jugar un poco con CXX, ya que nos ayuda a pensar en la \"\n\"flexibilidad que tiene Rust en Chromium.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"Algunas cosas que probar:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"Vuelve a llamar a C++ desde Rust. Necesitarás lo siguiente:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"Un archivo de encabezado adicional que puedes `include!` desde tu `cxx::\"\n\"bridge`. Deberás declarar la función de C++ en el nuevo archivo de \"\n\"encabezado.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"Un bloque `unsafe` para llamar a una función de este tipo, o bien \"\n\"especificar la palabra clave `unsafe` en el `#[cxx::bridge]`, [como se \"\n\"describe aquí](https://cxx.rs/extern-c++.html#functions-and-member-\"\n\"functions).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"Es posible que también tengas que incluir `#include \\\"third_party/rust/cxx/\"\n\"v1/crate/include/cxx.h\\\"`\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"Transfiere una cadena de C++ desde C++ a Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"Pasa una referencia a un objeto de C++ en Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Obtén de forma intencional las firmas de la función de Rust que no coincidan \"\n\"con el `#[cxx::bridge]` y familiarízate con los errores que veas.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Obtén de forma intencional las firmas de la función de C++ que no coincidan \"\n\"con el `#[cxx::bridge]` y familiarízate con los errores que veas.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"Transfiere un `std::unique_ptr` de algún tipo de C++ a Rust, para que a Rust \"\n\"le pertenezca algún objeto de C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"Crea un objeto de Rust y transmítelo a C++ para que sea su propietario. \"\n\"(Nota: necesitas utilizar un `Box`).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"Declara algunos métodos en un tipo de C++. Llámalos desde Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"Declara algunos métodos en un tipo de Rust. Llámalos desde C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"Tercera parte\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"Ahora que conoces los puntos fuertes y las limitaciones de la \"\n\"interoperabilidad de CXX, piensa en un par de casos prácticos de Rust en \"\n\"Chromium en los que la interfaz sea bastante sencilla. Haz un boceto sobre \"\n\"cómo definirías esa interfaz.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\"Muestra la correspondencia entre [los tipos de Rust y C++](https://cxx.rs/\"\n\"bindings.html):\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"La [plantilla gn `rust_static_library`](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"Estas son algunas de las preguntas que pueden surgir:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"Veo un problema al inicializar una variable de tipo X con el tipo Y, donde X \"\n\"e Y son tipos de funciones. Esto se debe a que la función de C++ no coincide \"\n\"exactamente con la declaración de `cxx::bridge`.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"Parece que puedo convertir libremente referencias de C++ en referencias de \"\n\"Rust. ¿Eso no supone ningún riesgo de comportamiento indefinido? En el caso \"\n\"de los tipos _opacos_ de CXX, no, porque su tamaño es cero. Sí supondría un \"\n\"problema de comportamiento indefinido en el caso de los tipos triviales de \"\n\"CXX, aunque el diseño de CXX hace que sea bastante difícil crear un ejemplo \"\n\"así.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Las bibliotecas de Rust se llaman \\\"crates\\\" y se encuentran en [crates.io]\"\n\"(https://crates.io). _Es habitual_ que los crates de Rust dependen los unos \"\n\"de otros.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Propiedad\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"Biblioteca C++\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"Crate de Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"Sistema de compilación\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"Muchos\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Consistente: `Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"Tamaño habitual de la biblioteca\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"Grande\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"Pequeño\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"Dependencias transitivas\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"Pocos\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"Para un ingeniero de Chromium, existen ventajas e inconvenientes:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"Todos los crates usan un sistema de compilación común, así que podemos \"\n\"automatizar su inclusión en Chromium...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"... pero los crates suelen tener dependencias transitivas, por lo que es \"\n\"probable que tengas que introducir varias bibliotecas.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"Hablaremos sobre los siguientes temas:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"Cómo colocar un crate en el árbol de código fuente de Chromium.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"Cómo aplicarle reglas de compilación `gn`.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"Cómo auditar su código fuente para obtener la seguridad suficiente.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"Configurar el archivo `Cargo.toml` para añadir crates\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium tiene un único conjunto de dependencias directas de crate \"\n\"gestionadas de forma centralizada. Se gestionan mediante un único elemento \"\n\"[`Cargo.toml`](https://source.chromium.org/chromium/chromium/src/+/main:\"\n\"third_party/rust/chromium_crates_io/Cargo.toml):\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"Al igual que con cualquier otro archivo `Cargo.toml`, puedes especificar \"\n\"[más información sobre las dependencias](https://doc.rust-lang.org/cargo/\"\n\"reference/specifying-dependencies.html). Lo más habitual es que se \"\n\"especifiquen las funciones `features` que se quieran habilitar en el crate.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"Al añadir un crate a Chromium, a menudo será necesario proporcionar \"\n\"información adicional en un archivo adicional, `gnrt_config.toml`, que \"\n\"veremos a continuación.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"Junto a `Cargo.toml`, se encuentra [`gnrt_config.toml`](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/gnrt_config.toml). Contiene extensiones específicas de \"\n\"Chromium para la gestión de crates.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"Si añades un nuevo crate, debes especificar al menos el atributo `group`. \"\n\"Puede ser uno de los siguientes:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"Por ejemplo:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"En función del diseño del código fuente del crate, es posible que también \"\n\"tengas que usar este archivo para especificar dónde se pueden encontrar los \"\n\"archivos `LICENSE`.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"Más adelante, veremos otros elementos que tendrás que configurar en este \"\n\"archivo para solucionar los problemas.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"La herramienta `gnrt` puede descargar crates y generar reglas `BUILD.gn`.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"Para empezar, descarga el crate de esta forma:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"Aunque la herramienta `gnrt` forma parte del código fuente de Chromium, al \"\n\"ejecutar este comando, se descargarán y ejecutarán sus dependencias desde \"\n\"`crates.io`. Consulta [la sección anterior](../cargo.md) sobre la decisión \"\n\"de seguridad.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"Este comando `vendor` puede descargar los siguientes elementos:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"Tu crate\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"Dependencias directas y transitivas.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"Nuevas versiones de otros crates, según lo requiera `cargo` para resolver el \"\n\"conjunto completo de crates que requiere Chromium.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium mantiene parches para algunos crates, que se conservan en `//\"\n\"third_party/rust/chromium_crates_io/patches`. Se volverán a aplicar \"\n\"automáticamente pero, si no se puede aplicar el parche, es posible que \"\n\"tengas que realizar una acción manual.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\"Una vez que hayas descargado el crate, genera los archivos `BUILD.gn` como \"\n\"se indica a continuación:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"Ahora, ejecuta `git status`. Deberías encontrar lo siguiente:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"Al menos un nuevo código fuente de crate en `third_party/rust/\"\n\"chromium_crates_io/vendor`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"Al menos un nuevo `BUILD.gn` en `third_party/rust/<crate name>/v<major \"\n\"semver version>`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"Un archivo `README.chromium` adecuado.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"La \\\"versión semver mayor\\\" es un [número de versión \\\"semver\\\" de Rust]\"\n\"(https://doc.rust-lang.org/cargo/reference/semver.html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\"Analiza la situación con detalle, sobre todo los elementos generados en \"\n\"`third_party/rust`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"Habla un poco sobre el semver y, concretamente, sobre la forma en que \"\n\"Chromium permite que existan varias versiones incompatibles de un crate. No \"\n\"es una situación recomendable, pero a veces es necesaria en el ecosistema de \"\n\"Cargo.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"Si la compilación falla, puede deberse a un `build.rs`, programas que llevan \"\n\"a cabo acciones arbitrarias durante la compilación. Esto difiere de los \"\n\"diseños de `gn` y `ninja`, que tienen como objetivo crear reglas de \"\n\"compilación estáticas y deterministas para maximizar el paralelismo y la \"\n\"repetibilidad de las compilaciones.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"Algunas acciones `build.rs` son admitidas automáticamente, pero otras deben \"\n\"llevar a cabo alguna acción:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"efecto de scripts de compilación\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"Compatible con nuestras plantillas de gn\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"Acciones que debes llevar a cabo\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"Comprobar la versión de rustc para activar y desactivar funciones\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"Sí\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"Ninguno\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"Comprobar la plataforma o la CPU para activar y desactivar funciones\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"Generar código\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"Sí: especificar en `gnrt_config.toml`\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"Compilar en C o C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"No\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"Poner un parche\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"Otras acciones arbitrarias\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"Por suerte, la mayoría de los crates no contienen scripts de compilación y \"\n\"la mayoría de estos scripts de compilación solo llevan a cabo dos acciones \"\n\"principales.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"Si `ninja` se queja de que faltan archivos, comprueba `build.rs` para ver si \"\n\"escribe archivos de código fuente.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"Si es así, modifica [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) \"\n\"para añadir `build-script-outputs` al crate. Si se trata de una dependencia \"\n\"transitiva, de la que el código Chromium no debería depender de forma \"\n\"directa, añade también `allow-first-party-usage=false`. En ese archivo ya \"\n\"hay varios ejemplos:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"A continuación, vuelve a ejecutar [`gnrt.py -- gen`](../generating-gn-build-\"\n\"rules.md) para generar de nuevo los archivos `build.gn` e informar al ninja \"\n\"de que este archivo de salida concreto se usa como entrada en los pasos de \"\n\"compilación posteriores.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"Algunos crates usan el crate [`cc`](https://crates.io/crates/cc) para \"\n\"compilar y vincular bibliotecas de C y C++. Otros crates analizan C y C++ \"\n\"mediante [`bindgen`](https://crates.io/crates/bindgen) en sus scripts de \"\n\"compilación. Estas acciones no se pueden llevar a cabo en un contexto de \"\n\"Chromium, ya que nuestro sistema de compilación gn, ninja y LLVM es muy \"\n\"específico a la hora de expresar las relaciones entre las acciones de \"\n\"compilación.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"Por lo tanto, las opciones son las siguientes:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"Evitar estos crates.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"Aplicar un parche al crate.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"Los parches deben guardarse en `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>`, como los [parches para el crate `cxx`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/\"\n\"cxx/), y `gnrt` lo aplicará automáticamente cada vez que actualice el crate.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"Una vez que se ha añadido un crate de terceros y se han generado reglas de \"\n\"compilación, utilizar un crate es sencillo. Busca tu elemento de destino \"\n\"`rust_static_library` y añade un `dep` en el `:lib` dentro del crate.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"Específicamente:\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"Auditoría de Crates de Terceros\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"Añadir nuevas bibliotecas está sujeto a las [políticas](https://chromium.\"\n\"googlesource.com/chromium/src/+/refs/heads/main/docs/rust.md#Third_party-\"\n\"review) estándar de Chromium, pero también a la revisión de seguridad. Como \"\n\"puede que no solo incluyas un único crate sino también dependencias \"\n\"transitivas, es posible que haya mucho código que revisar. Por otro lado, el \"\n\"código de Rust seguro puede tener efectos secundarios negativos limitados. \"\n\"¿Cómo se revisa?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"Con el tiempo, Chromium intentará adoptar un proceso basado en [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"Mientras tanto, se debe hacer lo siguiente para cada nuevo crate:\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"Entender por qué se usa cada crate. ¿Cuál es la relación entre los crates? \"\n\"Si el sistema de compilación de cada crate contiene un archivo `build.rs` o \"\n\"macros de procedimiento, averigua para qué sirven. ¿Son compatibles con la \"\n\"forma en la que se compila normalmente Chromium?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"Comprobar que cada crate tenga un mantenimiento razonable.\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"Usar `cd third-party/rust/chromium_crates_io; cargo audit` para comprobar si \"\n\"existen vulnerabilidades (primero se tiene que usar `cargo install cargo-\"\n\"audit`, lo que, irónicamente, implica descargar muchas dependencias de \"\n\"Internet[2](../cargo.md)).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"Asegúrate de que cualquier código `unsafe` sea adecuado para la [Regla de \"\n\"dos](https://chromium.googlesource.com/chromium/src/+/main/docs/security/\"\n\"rule-of-2.md#unsafe-code-in-safe-languages).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"Comprobar si se usan las APIs `fs` o `net`.\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"Leer todo el código con suficiente profundidad para comprobar si hay algo \"\n\"fuera de lugar que pueda haberse insertado de forma malintencionada. (Es \"\n\"imposible hacerlo perfecto, ya que, a menudo, hay demasiado código).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"Estas son solo algunas directrices, trabaja con revisores de \"\n\"`security@chromium.org` para determinar la forma adecuada de utilizar los \"\n\"crates.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"Comprobar crates en el código fuente de Chromium\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` debe revelar lo siguiente:\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"Código del crate en `//third_party/rust/chromium_crates_io`.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"Metadatos (`BUILD.gn` y `README.chromium`) en `//third_party/rust/<crate>/\"\n\"<version>`.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"Añade también un archivo `OWNERS` en esta última ubicación.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"Deberías llevar todo esto, junto con los cambios de `Cargo.toml` y \"\n\"`gnrt_config.toml`, al repositorio de Chromium.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**Importante**: Debes usar `git add -f`, de lo contrario, los archivos `.\"\n\"gitignore` pueden provocar que se omitan algunos archivos.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"Si lo haces, es posible que veas que las comprobaciones presubmit no se han \"\n\"completado porque incluyen lenguaje no inclusivo. Esto se debe a que los \"\n\"datos de crate de Rust suelen incluir nombres de ramas en git y muchos \"\n\"proyectos siguen empleando terminología no inclusiva. Por lo tanto, puede \"\n\"que debas ejecutar lo siguiente:\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"Como PROPIETARIO de cualquier dependencia de Chromium de terceros, [se \"\n\"espera que la actualices con las correcciones de seguridad](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#add-\"\n\"owners). La idea es que pronto automaticemos esto para los crates de Rust, \"\n\"pero por ahora sigue siendo tu responsabilidad, igual que cualquier otra \"\n\"dependencia de terceros.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"Añade [uwuify](https://crates.io/crates/uwuify) a Chromium para desactivar \"\n\"las [funciones predeterminadas] del crate (https://doc.rust-lang.org/cargo/\"\n\"reference/features.html#the-default-feature). Supongamos que el crate se \"\n\"usará en el envío de Chromium, pero no para gestionar entradas no fiables.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(En el siguiente ejercicio, usaremos uwuify de Chromium, pero puedes \"\n\"saltarte este paso y hacerlo ahora si quieres. También puedes crear un nuevo \"\n\"[destino `rust_executable`](https://source.chromium.org/chromium/chromium/\"\n\"src/+/main:build/rust/rust_executable.gni) que utilice `uwuify`).\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\"Los participantes tendrán que descargar muchas dependencias transitivas.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"Estos son los crates que se necesitan:\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"Por ejemplo:\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"Si los alumnos se descargan más datos, seguramente habrán olvidado \"\n\"desactivar las funciones predeterminadas.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"Gracias a [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) por este crate.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"Poner en práctica todo lo aprendido: ejercicio\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"En este ejercicio, vas a añadir una función de Chromium completamente nueva \"\n\"que pondrá en práctica todo lo que hemos aprendido.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"Resumen de la gestión de productos\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"Se ha descubierto una comunidad de hadas que habita en una selva tropical \"\n\"remota. Es importante que les enviemos la versión Chromium para hadas lo \"\n\"antes posible.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"El requisito es traducir todas las cadenas de la IU de Chromium al idioma de \"\n\"las hadas.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"No hay tiempo para obtener las traducciones adecuadas pero, por suerte, el \"\n\"lenguaje de las hadas se parece mucho al inglés y hay un crate de Rust que \"\n\"hace las traducciones.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"De hecho, ya [importamos ese crate en el ejercicio anterior](https://crates.\"\n\"io/crates/uwuify).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"(Obviamente, las traducciones reales de Chrome requieren mucha atención y \"\n\"diligencia. No envíes nada de esto).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"Pasos\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"Modifica `ResourceBundle::RSMangleLocalizedString` para que traduzca todas \"\n\"las cadenas antes de que se muestren. En esta compilación especial de \"\n\"Chromium, siempre se debe hacer esto independientemente de la configuración \"\n\"de `mangle_localized_strings_`.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"Si has hecho correctamente los ejercicios, habrás creado Chrome para hadas.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 y UTF8. Los alumnos deben tener en cuenta que las cadenas de Rust \"\n\"siempre son UTF8. Probablemente decidirán que es mejor hacer la conversión \"\n\"en C++ usando `base::UTF16ToUTF8` y viceversa.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"Si los participantes deciden hacer la conversión en Rust, deberán tener en \"\n\"cuenta [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), la gestión de errores y los [tipos \"\n\"compatibles con CXX que pueden transferir un gran número de u16s](https://\"\n\"cxx.rs/binding/slice.html).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Los alumnos pueden diseñar el límite de C++ o Rust de varias formas \"\n\"diferentes, por ejemplo, tomando y devolviendo cadenas por valor o colocando \"\n\"una referencia mutable en una cadena. Si se utiliza una referencia mutable, \"\n\"es probable que CXX indique que se debe usar [`Pin`](https://doc.rust-lang.\"\n\"org/std/pin/). Puede que debas explicar qué hace `Pin` y, a continuación, \"\n\"explicar por qué CXX lo necesita para referencias mutables a datos de C++. \"\n\"La respuesta es que los datos de C++ no se pueden mover como los datos de \"\n\"Rust, ya que pueden contener punteros de autorreferencia.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"El elemento de destino de C++ que contiene `ResourceBundle::\"\n\"MaybeMangleLocalizedString` deberá depender de un elemento \"\n\"`rust_static_library`. Seguramente los alumnos ya lo hayan hecho.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"`rust_static_library` deberá depender de `//third_party/rust/uwuify/v0_2:\"\n\"lib`.\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"Las soluciones a los ejercicios de Chromium están en [esta serie de listas \"\n\"de cambios](https://chromium-review.googlesource.com/c/chromium/src/\"\n\"+/5096560).\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Te damos la bienvenida a Bare Metal Rust\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Este es un curso independiente de un día sobre Rust bare-metal, dirigido a \"\n\"personas que están familiarizadas con los conceptos básicos de Rust (tal vez \"\n\"después de completar el curso Comprehensive Rust). Lo ideal sería que \"\n\"también tuvieran experiencia con la programación bare-metal en otros \"\n\"lenguajes, como C.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Hoy vamos a hablar de Rust \\\"bare-metal\\\": ejecutar código de Rust sin un \"\n\"sistema operativo. Se dividirá en varias partes:\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"¿Qué es `no_std` en Rust?\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Escribir firmware para microcontroladores.\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"Escribir código bootloader o kernel para procesadores de aplicaciones.\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Algunos crates útiles para el desarrollo de Rust bare-metal.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"En la parte del curso dedicada a los microcontroladores, utilizaremos la \"\n\"versión 2 de [BBC micro:bit](https://microbit.org/) como ejemplo. Es una \"\n\"[placa de desarrollo](https://tech.microbit.org/hardware/) basada en el \"\n\"microcontrolador Nordic nRF51822 con algunos LED y botones, un acelerómetro \"\n\"y una brújula conectados mediante I2C y un depurador SWD integrado.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Para empezar, instala algunas de las herramientas que necesitarás más \"\n\"adelante. En gLinux o Debian:\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"Permite a los usuarios del grupo `plugdev` acceder al programador micro:bit:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"En MacOS:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slices, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` y todas las funciones relacionadas con punteros habituales\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` and `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` y el resto de `fs`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` y el resto de `io`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` y el resto de `thread`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` depende de RNG.\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` vuelve a exportar el contenido de `core` y `alloc`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Un programa `no_std` mínimo\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"Se compilará en un binario vacío.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\"`std` proporciona un controlador de _panic_; sin no hay, debemos \"\n\"proporcionar uno nuestro.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"También puede proporcionarlo otro crate, como `panic-halt`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"Dependiendo del objetivo, es posible que tengas que compilar con `panic = \"\n\"\\\"abort\\\"` para evitar un error sobre `eh_personality`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"Ten en cuenta que no hay `main` ni ningún otro punto de entrada; depende de \"\n\"ti definir un punto de entrada propio. Esto suele implicar una secuencia de \"\n\"comandos de enlazador y algún código de ensamblado de forma que todo esté \"\n\"preparado para que se ejecute el código de Rust.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Para utilizar `alloc`, debes implementar un [asignador global (de _heap_)]\"\n\"(https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// Es seguro porque `HEAP` solo se usa aquí y solo se llama una vez a \"\n\"`entry`.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Proporciona al asignador algo de memoria para asignar.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\"// Ahora podemos llevar a cabo acciones que requieran la asignación de \"\n\"montículo.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` es un crate de terceros que implementa un _buddy \"\n\"system allocator_ (una técnica de asignación de memoria) básico. Hay otros \"\n\"crates disponibles, pero también puedes escribir el tuyo propio o conectarte \"\n\"a tu asignador.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"El parámetro const de `LockedHeap` es el orden máximo del asignador. Es \"\n\"decir, en este caso, puede asignar regiones de hasta 2\\\\*\\\\*32 bytes.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"Si algún crate del árbol de dependencias depende de `alloc`, debes tener \"\n\"exactamente un asignador global definido en el binario. Esto se suele hacer \"\n\"en el crate binario de nivel superior.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"`extern crate panic_halt as _` es necesario para asegurar que el crate \"\n\"`panic_halt` esté vinculado y así podamos obtener su controlador de _panic_.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\"Este ejemplo se compilará pero no se ejecutará, ya que no cuenta con un \"\n\"punto de entrada.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"El crate `cortex_m_rt` proporciona (entre otras cosas) un controlador de \"\n\"reinicio para microcontroladores Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"A continuación, veremos cómo se accede a los periféricos con niveles de \"\n\"abstracción cada vez mayores.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"La macro `cortex_m_rt::entry` requiere que la función tenga el tipo `fn() -\"\n\"> !`, ya que no tiene sentido devolver resultados al controlador de reinicio.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Ejecuta el ejemplo con `cargo embed --bin minimal`.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"La mayoría de los microcontroladores acceden a los periféricos a través de E/\"\n\"S asignada a la memoria. Vamos a probar a encender un LED en nuestro micro:\"\n\"bit:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// Dirección de periférico del puerto GPIO 0\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// Offset de periféricos GPIO\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// Campos PIN_CNF\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configura los pines 21 y 28 de GPIO 0 como salidas push-pull.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// Es seguro porque los punteros dirigen a registros de control de \"\n\"periféricos válidos y\\n\"\n\"    // no existe ningún alias.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Define el pin 28 bajo y 21 alto para encender el LED.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"El pin 21 de GPIO 0 está conectado a la primera columna de la matriz de LED \"\n\"y el pin 28 a la primera fila.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"Ejecuta el ejemplo con:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Crates de Acceso Periférico\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) genera, en su gran mayoría, \"\n\"envoltorios seguros de Rust para periféricos asignados a la memoria a partir \"\n\"de archivos [CMSIS-SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.\"\n\"html).\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"Los archivos SVD (System View Description) son archivos XML que suelen \"\n\"proporcionar los proveedores de silicio y que describen el mapa de memoria \"\n\"del dispositivo.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Se organizan por periférico, registro, campo y valor, con nombres, \"\n\"descripciones y direcciones, etc.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"Los archivos SVD suelen tener errores y estar incompletos, por lo que \"\n\"existen varios proyectos que aplican parches a los errores, añaden detalles \"\n\"que faltan y publican los crates generados.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` proporciona la tabla de vectores, entre otras cosas.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Si instalas `cargo install cargo-binutils` puedes ejecutar `cargo objdump --\"\n\"bin pac -- -d --no-show-raw-insn` para ver el binario resultante.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"Crates HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"[Los crates HAL](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) de muchos microcontroladores incluyen envoltorios \"\n\"alrededor de varios periféricos. Por lo general, implementan traits de \"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Crea un envoltorio HAL para el puerto GPIO 0.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low` y `set_high` son métodos del trait `OutputPin` de `embedded_hal`.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Hay crates HAL para muchos dispositivos Cortex-M y RISC-V, incluidos varios \"\n\"microcontroladores STM32, GD32, nRF, NXP, MSP430, AVR y PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"Crates de compatibilidad de placa\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Los crates de compatibilidad de placa proporcionan un nivel adicional de \"\n\"envoltorio a una placa específica para mayor comodidad.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"En este caso, el crate de compatibilidad de placa proporciona solo nombres \"\n\"más útiles y un poco de inicialización.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"El crate también puede incluir controladores para algunos dispositivos \"\n\"integrados fuera del propio microcontrolador .\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` incluye un controlador sencillo para la matriz de LED.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"El patrón de tipo de estado\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Error, se ha movido.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Error, se ha movido.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"Los pines no implementan `Copy` ni `Clone`, por lo que solo puede haber una \"\n\"instancia de cada uno. Cuando se quita un pin de la estructura del puerto, \"\n\"nadie más puede usarlo.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"Si cambias la configuración de un pin, se consumirá la instancia del pin \"\n\"anterior y no podrás seguir usando la instancia previa.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"El tipo de un valor indica el estado en el que se encuentra: por ejemplo, en \"\n\"este caso, el estado de configuración de un pin de GPIO. De esta manera, se \"\n\"codifica la máquina de estados en el sistema de tipos, asegurando así que no \"\n\"se use un pin de cierta forma sin antes configurarlo correctamente. Las \"\n\"transiciones de estado ilegales se detectan durante el tiempo de compilación.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Puedes llamar a `is_high` en un pin de entrada y a `set_high` en un pin de \"\n\"salida, pero no al revés.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"Muchos crates HAL siguen este patrón.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"El crate [`embedded-hal`](https://crates.io/crates/embedded-hal) proporciona \"\n\"una serie de traits que cubren los periféricos habituales de los \"\n\"microcontroladores.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"Es entonces cuando otros crates implementan [controladores](https://github.\"\n\"com/rust-embedded/awesome-embedded-rust#driver-crates) en función de estos \"\n\"traits. Por ejemplo, un controlador de acelerómetro podría necesitar una \"\n\"implementación de bus I2C o SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Hay implementaciones para muchos microcontroladores, así como otras \"\n\"plataformas como Linux en Raspberry Pi.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"El crate [`embedded-hal`](https://crates.io/crates/embedded-hal) proporciona \"\n\"una serie de traits que cubren los periféricos habituales de los \"\n\"microcontroladores.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"El crate [`embedded-hal`](https://crates.io/crates/embedded-hal) proporciona \"\n\"una serie de traits que cubren los periféricos habituales de los \"\n\"microcontroladores.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) es un conjunto de herramientas de depuración \"\n\"integradas muy útil, como OpenOCD, pero mejor integrado.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \" y JTAG a través de comprobaciones CMSIS-DAP, ST-Link y J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\"Stub de GDB y servidor de Microsoft DAP (protocolo de adaptador de \"\n\"depuración)\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Integración de Cargo\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\" y conectar GDB. Se configura mediante un archivo `Embed.toml` en el \"\n\"directorio del proyecto.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) es \"\n\"un protocolo estándar de Arm mediante USB que permite que un depurador en \"\n\"circuito acceda al puerto de acceso de depuración CoreSight de varios \"\n\"procesadores Cortex de Arm. Es lo que utiliza el depurador integrado en el \"\n\"BBC micro:bit\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link es una gama de depuradores en circuito de ST Microelectronics. J-\"\n\"Link es una gama de SEGGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"El puerto de acceso de depuración suele ser una interfaz JTAG de 5 pines o \"\n\"una SWD de 2 pines.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs es una biblioteca que puedes integrar en tus propias herramientas.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[El protocolo de adaptador de depuración de Microsoft](https://microsoft.\"\n\"github.io/debug-adapter-protocol/) permite que VSCode y otros IDEs depuren \"\n\"el código que se ejecuta en cualquier microcontrolador compatible.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed es un binario compilado con la biblioteca probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"TTR (transferencias en tiempo real) es un mecanismo para transferir datos \"\n\"entre el host de depuración y el objetivo a través de una serie de búferes \"\n\"circulares.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"Embed.toml:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"En un terminal en `src/bare-metal/microcontrollers/examples/`:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"En otro terminal del mismo directorio:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"En gLinux o Debian:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"En GDB, prueba a ejecutar:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"Otros proyectos\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Concurrencia en tiempo real basada en interrupciones\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"Gestión de recursos compartidos, envío de mensajes, programación de tareas, \"\n\"cola del temporizador, etc.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"Ejecutores `async` con prioridades, temporizadores, redes, USB, etc.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS centrado en la seguridad con programación interrumpible y \"\n\"compatibilidad con la unidad de protección de memoria.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"RTOS de microkernel de Oxide Computer Company con protección de memoria, \"\n\"controladores sin privilegios, IPC, etc.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Enlaces para FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Algunas plataformas tienen implementaciones `std`, como [esp-idf](https://\"\n\"esp-rs.github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC se puede considerar un RTOS o un framework de concurrencia.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"No incluye ningún HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Usa el NVIC (controlador de interrupción virtual anidado) Cortex‐M para la \"\n\"programación en lugar de un kernel propio.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"Solo Cortex-M.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"Google utiliza TockOS en el microcontrolador Haven para las llaves de \"\n\"seguridad Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS está escrito principalmente en C, pero hay enlaces de Rust para \"\n\"aplicaciones de escritura.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Leeremos la dirección desde una brújula I2C, y registraremos las lecturas en \"\n\"un puerto serie.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Después de realizar los ejercicios, puedes consultar las [soluciones]\"\n\"(solutions-morning.md) correspondientes.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Leeremos la dirección desde una brújula I2C, y registraremos las lecturas en \"\n\"un puerto serie. Si tienes tiempo, prueba a mostrarlo también en los LED o \"\n\"usa los botones de alguna forma.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"Sugerencias:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Consulta la documentación sobre los crates [`lsm303agr`](https://docs.rs/\"\n\"lsm303agr/latest/lsm303agr/) y [`microbit-v2`](https://docs.rs/microbit-v2/\"\n\"latest/microbit/), así como [el hardware de micro:bit](https://tech.microbit.\"\n\"org/hardware/).\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\"La unidad de medición inercial LSM303AGR está conectada al bus I2C interno.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI es otro nombre para I2C, por lo que el periférico I2C maestro se llama \"\n\"TWIM.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"El controlador LSM303AGR necesita algo que implemente  el trait \"\n\"`embedded_hal::blocking::i2c::WriteRead`. La estructura [`microbit::hal::\"\n\"Twim`](https://docs.rs/microbit-v2/latest/microbit/hal/struct.Twim.html) \"\n\"implementa esto.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"Tienes una estructura [`microbit::Board`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/struct.Board.html) con campos para los distintos pines y \"\n\"periféricos.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"También puedes consultar la \\\\[hoja de datos nRF52833\\\\][nRF52833 datasheet]\"\n\"(https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) si quieres, \"\n\"pero no debería ser necesario para este ejercicio.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Descarga la [plantilla de ejercicio](../../comprehensive-rust-exercises.zip) \"\n\"y busca los siguientes archivos en el directorio `compass`.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"`src/main.rs`:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Cargo.toml` (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Embed.toml` (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"`.cargo/config.toml` (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Consulta la salida de serie en Linux con:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"En Mac OS debería ser algo como lo siguiente (el nombre del dispositivo \"\n\"puede ser algo diferente):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Pulsa Ctrl+A Ctrl+Q para salir de Picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Rust Bare Metal: Ejercicio de la Mañana\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([volver al ejercicio](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configura el puerto serie.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Usa el temporizador del sistema como proveedor de retrasos.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Configura el controlador de I2C y la unidad de medición inercial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Configurando IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Configura la pantalla y el temporizador.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Listo.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Lee los datos de la brújula y regístralos en el puerto serie.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// Si se pulsa el botón A, cambia al siguiente modo y haz que parpadeen \"\n\"brevemente todos los LED\\n\"\n\"        // activados.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"Procesadores de aplicaciones\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Hasta ahora hemos hablado de microcontroladores, como la serie Cortex‐M de \"\n\"Arm. Ahora vamos a probar a escribir algo para Cortex-A. Para simplificar, \"\n\"solo trabajaremos con la placa ['virt'](https://qemu-project.gitlab.io/qemu/\"\n\"system/arm/virt.html) aarch64 de QEMU.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"En términos generales, los microcontroladores no tienen un MMU ni varios \"\n\"niveles de privilegio (niveles de excepción en las CPU de Arm, anillos en \"\n\"x86), mientras que los procesadores de aplicaciones sí los tienen.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU permite emular varias máquinas o modelos de placa diferentes para cada \"\n\"arquitectura. La placa \\\"virt\\\" no se corresponde con ningún hardware real \"\n\"concreto, pero está diseñada exclusivamente para máquinas virtuales.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\"Antes de que podamos empezar a ejecutar código de Rust, tenemos que hacer \"\n\"alguna inicialización.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"Es lo mismo que en C: inicializar el estado del procesador, poner a cero el \"\n\"BSS y configurar el puntero de la _stack_.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"El BSS (símbolo de inicio del bloque, por motivos históricos) es la parte \"\n\"del objeto que contiene variables asignadas de forma estática que se \"\n\"inicializan a cero. Se omiten en la imagen para evitar malgastar espacio con \"\n\"ceros. El compilador asume que el cargador se encargará de ponerlos a cero.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"Es posible que el BSS ya esté a cero, dependiendo de cómo se inicialice la \"\n\"memoria y cómo se cargue la imagen, aunque se pone igualmente a cero para \"\n\"estar seguros.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"Necesitamos habilitar la MMU y la caché antes de leer o escribir memoria. Si \"\n\"no lo hacemos, sucederá lo siguiente:\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"Los accesos no alineados fallarán. Compilamos el código Rust para el \"\n\"objetivo `aarch64-unknown-none`, que define `+strict-align` para evitar que \"\n\"el compilador genere accesos no alineados. En este caso debería estar bien, \"\n\"pero no tiene por qué ser así en general.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"Si se estuviera ejecutando en una máquina virtual, podría provocar problemas \"\n\"de coherencia en la caché. El problema es que la máquina virtual accede a la \"\n\"memoria directamente con la caché inhabilitada, mientras que el host cuenta \"\n\"con alias que se pueden almacenar en caché en la misma memoria. Incluso si \"\n\"el host no accede explícitamente a la memoria, los accesos especulativos \"\n\"pueden provocar que se llene la caché, haciendo que los cambios de uno u \"\n\"otro se pierdan cuando se borre la caché o cuando la máquina virtual la \"\n\"habilite. (La caché está codificada por dirección física, no por VA ni IPA).\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"Para simplificar, solo se utiliza una tabla de páginas codificada (consulta \"\n\"`idmap.S`) que mapea la identidad del primer GiB de espacio de direcciones \"\n\"para dispositivos, el siguiente GiB para DRAM y otro GiB más para más \"\n\"dispositivos. Esto coincide con la disposición de memoria que utiliza QEMU.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"También configuramos el vector de excepción (`vbar_el1`), del que veremos \"\n\"más contenido en próximas dipositivas.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"Todos los ejemplos de esta tarde se ejecutarán en el nivel de excepción 1 \"\n\"(EL1). Si necesitas ejecutar en un nivel de excepción diferente, deberás \"\n\"modificar `entry.S` según corresponda.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"Ensamblaje integrado\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"A veces necesitamos usar el ensamblador para hacer cosas que no son posibles \"\n\"con código Rust. Por ejemplo, hacer un \"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// Es seguro porque solo utiliza los registros declarados y no\\n\"\n\"    // hace nada con la memoria.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Si realmente quieres hacer esto, utiliza el crate [`smccc`](https://crates.\"\n\"io/crates/smccc) que tiene envoltorios para todas estas funciones).\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI es la interfaz de coordinación de estado de alimentación de Arm, un \"\n\"conjunto estándar de funciones para gestionar los estados de alimentación \"\n\"del sistema y de la CPU, entre otras cosas. Lo implementan el firmware EL3 y \"\n\"los hipervisores en muchos sistemas.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"La sintaxis `0 => _` significa inicializar el registro a 0 antes de ejecutar \"\n\"el código de ensamblaje integrado e ignorar su contenido después. \"\n\"Necesitamos utilizar `inout` en lugar de `in` porque la llamada podría \"\n\"alterar el contenido de los registros.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Esta función `main` debe ser `#[no_mangle]` y `extern \\\"C\\\"`, ya que se \"\n\"llama desde nuestro punto de entrada en `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` son los valores de los registros `x0`–`x3`, que el bootloader \"\n\"utiliza habitualmente para pasar elementos al árbol de dispositivos, como un \"\n\"puntero. De acuerdo con la convención de llamadas estándar de aarch64 (que \"\n\"es lo que `extern \\\"C\\\"` usa), los registros `x0`–`x7` se utilizan para los \"\n\"primeros ocho argumentos que se pasan a una función, de modo que `entry.S` \"\n\"no tiene que hacer nada especial, salvo asegurarse de que no cambia estos \"\n\"registros.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Ejecuta el ejemplo en QEMU con `make qemu_psci` en `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Acceso a la memoria volátil para MMIO\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"Se puede usar `pointer::read_volatile` y `pointer::write_volatile`.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"Nunca retengas una referencia.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!` permite obtener campos de estructuras sin crear una referencia \"\n\"intermedia.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Acceso volátil: las operaciones de lectura o escritura pueden tener efectos \"\n\"secundarios, por lo que se debe evitar que el compilador o el hardware las \"\n\"reordene, duplique u omita.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"Normalmente, si escribes y luego lees (por ejemplo, a través de una \"\n\"referencia mutable), el compilador puede suponer que el valor leído es el \"\n\"mismo que el que se acaba de escribir, sin molestarse si quiera en leer \"\n\"realmente la memoria.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Algunos crates para el acceso volátil al hardware sí mantienen referencias, \"\n\"aunque no es seguro. Siempre que exista una referencia, el compilador puede \"\n\"desreferenciarla.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"Utiliza la macro `addr_of!` para obtener punteros de campos de estructuras a \"\n\"partir de un puntero en la estructura.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"Vamos a escribir un controlador de UART\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"La máquina \\\"virt\\\" de QEMU tiene una UART [PL011]https://developer.arm.com/\"\n\"documentation/ddi0183/g), así que vamos a escribir un controlador para ella.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Controlador mínimo para un UART PL011.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Construye una instancia nueva del controlador de UART para un \"\n\"dispositivo PL011 en la\\n\"\n\"    /// dirección base proporcionada.\\n\"\n\"    ///\\n\"\n\"    /// # Seguridad\\n\"\n\"    ///\\n\"\n\"    /// La dirección base debe apuntar a los 8 registros de control MMIO de \"\n\"un \\n\"\n\"    /// dispositivo PL011, que debe asignarse al espacio de direcciones del \"\n\"proceso\\n\"\n\"    /// como memoria del dispositivo y no tener ningún otro alias.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Escribe un solo byte en el UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Espera hasta que haya espacio en el búfer de TX.\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Es seguro porque sabemos que la dirección base apunta a los registros\\n\"\n\"        // de control de un dispositivo PL011 que está asignado \"\n\"correctamente.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Escribe en el búfer de TX.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Espera hasta que el UART esté libre.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Ten en cuenta que `Uart::new` no es seguro, mientras que los otros métodos \"\n\"sí lo son. Esto se debe a que mientras que el llamador de `Uart::new` \"\n\"asegure que se cumplan sus requisitos de seguridad (es decir, que solo haya \"\n\"una instancia del controlador para una UART determinada y que nada más \"\n\"asigne alias a su espacio de direcciones), siempre es más seguro llamar a \"\n\"`write_byte` más adelante, ya que podemos asumir\\\\ las condiciones previas \"\n\"necesarias.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Podríamos haberlo hecho al revés (haciendo que `new` fuese seguro y \"\n\"`write_byte` no seguro), pero\\\\sería mucho menos cómodo de usar, ya que cada \"\n\"lugar que llamase a `write_byte` tendría que pensar en la seguridad\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Este es un patrón común para escribir envoltorios seguros de código \"\n\"inseguro: mover la carga de la prueba de seguridad de un gran número de \"\n\"lugares a otro más pequeño.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"Más traits\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Hemos derivado el trait `Debug`. También sería útil implementar algunos \"\n\"traits más.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Es seguro porque solo contiene un puntero a la memoria del dispositivo,\\n\"\n\"// a la que se puede acceder desde cualquier contexto.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"Implementar `Write` nos permite utilizar las macros `write!` y `writeln!` \"\n\"con nuestro tipo `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Ejecuta el ejemplo en QEMU con `make qemu_minimal` en `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"Un controlador UART mejor\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"En realidad, PL011 tiene [muchos registros más](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), por lo que \"\n\"añadir desplazamientos para crear punteros que les permita acceder a ellos \"\n\"da lugar a errores y dificulta la lectura. Además, algunos de ellos son \"\n\"campos de bits a los que estaría bien acceder de forma estructurada.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"Desplazamiento\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"Nombre de registro\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"Ancho\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"También hay algunos registros de ID que se han omitido para abreviar.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"El crate [`bitflags`](https://crates.io/crates/bitflags) resulta útil para \"\n\"trabajar con bitflags.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Marcas del registro de marcas de UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Borra para enviar.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Conjunto de datos listo.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Detección del portador de datos.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART está transmitiendo datos.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// El FIFO de recepción está vacío\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// El FIFO de transmisión está completo.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// El FIFO de recepción está completo.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// El FIFO de transmisión está vacío.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Indicador de anillo.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"La macro `bitflags!` crea un newtype, como `Flags(u16)`, junto con un montón \"\n\"de implementaciones de métodos para obtener y definir _flags_ (banderas).\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"Varios registros\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Podemos utilizar una estructura para representar la disposición de la \"\n\"memoria de los registros de UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) indica al compilador que ordene los campos de la estructura \"\n\"siguiendo las mismas reglas que en C. Esto es necesario para que nuestra \"\n\"estructura tenga un diseño predecible, ya que la representación \"\n\"predeterminada de Rust permite que el compilador (entre otras cosas) \"\n\"reordene los campos como crea conveniente.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\"Ahora vamos a utilizar la nueva estructura de `Registers` en nuestro \"\n\"controlador.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Controlador para un UART PL011.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Es seguro porque sabemos que self.registers apunta\\n\"\n\"        // a los registros de control de un dispositivo PL011 que está \"\n\"asignado correctamente.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Lee y devuelve un byte pendiente o `None` si no se ha recibido nada\\n\"\n\"    ///.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Es seguro porque sabemos que self.registers apunta\\n\"\n\"        // a los registros de control de un dispositivo PL011 que está \"\n\"asignado correctamente.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TAREA: Comprueba si hay condiciones de error en los bits 8 a 11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Fíjate en el uso de `addr_of!` y `addr_of_mut!` para llevar punteros a \"\n\"campos individuales sin crear una referencia intermedia. Sería una acción \"\n\"insegura.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"Uso\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Vamos a crear un pequeño programa con nuestro controlador para escribir en \"\n\"la consola serie y compartir los bytes entrantes.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Dirección base del UART de PL011 principal.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Es seguro porque `PL011_BASE_ADDRESS` es la dirección base de un \"\n\"dispositivo PL011\\n\"\n\"    // y ninguna más accede a ese intervalo de direcciones.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"¡Adiós!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Al igual que en el ejemplo de [ensamblaje integrado](../inline-assembly.md), \"\n\"esta función `main` se llama desde nuestro código de punto de entrada en \"\n\"`entry.S`. Consulta las notas del orador para obtener más información.\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Ejecuta el ejemplo en QEMU con `make qemu` en `src/bare-metal/aps/examples`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Estaría bien poder utilizar las macros de registro del crate [`log`](https://\"\n\"crates.io/crates/log). Podemos hacerlo implementando el trait `Log`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Inicia el registro de UART.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"La desenvoltura en `log` es segura porque inicializamos `LOGGER` antes de \"\n\"llamar a `set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Debemos inicializar el registrador antes de utilizarlo.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Ten en cuenta que nuestro controlador de _panic_ ahora ya puede registrar la \"\n\"información de los pánicos.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Ejecuta el ejemplo en QEMU con `make qemu_logger` en `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 define una tabla de vectores de excepción con 16 entradas, para 4 \"\n\"tipos de excepciones (synchronous, IRQ, FIQ, SError) desde 4 estados (EL \"\n\"actual con SP0, EL actual con SPx, EL inferior con AArch64 y EL inferior con \"\n\"AArch32). Implementamos esto en el ensamblaje para guardar los registros \"\n\"volátiles en la _stack_ antes de llamar al código de Rust:\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\"EL significa nivel de excepción (por sus siglas en inglés); todos nuestros \"\n\"ejemplos de esta tarde se ejecutan en EL1.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"Para simplificar, no distinguimos entre SP0 y SPx para las excepciones del \"\n\"EL actual, ni entre AArch32 y AArch64 para las excepciones de EL inferiores.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"En este ejemplo, nos limitaremos a registrar la excepción y a apagarla, ya \"\n\"que no esperamos que se produzca ninguna.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"Podríamos pensar en los controladores de excepciones y en nuestro contexto \"\n\"de ejecución principal como si fueran hilos diferentes. [`Send` y `Sync`]\"\n\"(../../concurrency/send-sync.md) controlarán lo que podemos compartir entre \"\n\"ellos, igual que con los hilos. Por ejemplo, si queremos compartir algún \"\n\"valor entre los controladores de excepciones y el resto del programa, y es \"\n\"`Send`en vez de `Sync`, necesitaremos envolverlo en un `Mutex`, por ejemplo, \"\n\"y ponerlo en un estático.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot sin la C\\\".\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Compatible con x86, aarch64 y RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"Depende de LinuxBoot en lugar de tener controladores propios.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Tutorial del SO de Rust en RaspberryPi][Rust RaspberryPi OS tutorial]\"\n\"(https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"Inicialización, controlador de UART, bootloader sencillo, JTAG, niveles de \"\n\"excepción, gestión de excepciones, tablas de páginas, etc.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"Algunas dudas sobre el mantenimiento de la caché y la inicialización en \"\n\"Rust, aunque no es precisamente un buen ejemplo para copiar en código de \"\n\"producción.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Análisis estático para determinar el uso máximo de la _stack_.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"El tutorial del sistema operativo en RaspberryPi ejecuta código de Rust \"\n\"antes de que la MMU y las cachés se habiliten. De este modo, se leerá y \"\n\"escribirá memoria (por ejemplo, la _stack_). Sin embargo:\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"Sin la MMU y la caché, los accesos no alineados fallarán. Se compila con \"\n\"`aarch64-unknown-none`, que define `+strict-align` para evitar que el \"\n\"compilador genere accesos no alineados. Debería estar bien, pero no tiene \"\n\"por qué ser así, en general.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"Si se estuviera ejecutando en una máquina virtual, podría provocar problemas \"\n\"de coherencia en la caché. El problema es que la máquina virtual accede a la \"\n\"memoria directamente con la caché inhabilitada, mientras que el host cuenta \"\n\"con alias que se pueden almacenar en caché en la misma memoria. Incluso si \"\n\"el host no accede explícitamente a la memoria, los accesos especulativos \"\n\"pueden provocar que se llene la caché, haciendo que los cambios de uno u \"\n\"otro se pierdan. De nuevo, es correcto en este caso particular (si se \"\n\"ejecuta directamente en el hardware sin hipervisor) pero, por lo general, no \"\n\"es un buen patrón.\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Crates Útiles\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"A continuación, repasaremos algunos crates que resuelven ciertos problemas \"\n\"comunes en la programación bare-metal.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"El crate [`zerocopy`](https://docs.rs/zerocopy/) (de Fuchsia) proporciona \"\n\"traits y macros para realizar conversiones seguras entre secuencias de bytes \"\n\"y otros tipos.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"No es adecuado para MMIO (ya que no utiliza lecturas y escrituras \"\n\"volátiles), pero puede ser útil para trabajar con estructuras compartidas \"\n\"con hardware (por ejemplo, mediante DMA) o enviadas a través de alguna \"\n\"interfaz externa.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` se puede implementar en tipos en los que cualquier patrón de \"\n\"bytes es válido, por lo que se puede convertir de forma segura a partir de \"\n\"una secuencia de bytes que no es fiable.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Si se intenta derivar `FromBytes` para estos tipos, se produciría un error, \"\n\"pues `RequestType` no utiliza todos los valores u32 posibles como \"\n\"discriminantes y, por tanto, todos los patrones de bytes son válidos.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` tiene tipos para primitivos numéricos conscientes del \"\n\"orden de bytes.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Ejecuta el ejemplo con `cargo run` en `src/bare-metal/useful-crates/zerocopy-\"\n\"example/`. (No se ejecutará en  el playground debido a la dependencia del \"\n\"crate).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"El crate [`aarch64-paging`](https://crates.io/crates/aarch64-paging) permite \"\n\"crear tablas de páginas de acuerdo con la arquitectura del sistema de \"\n\"memoria virtual AArch64.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Crea una tabla de páginas con mapeado de identidades.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"// Asigna una región de 2 MiB de memoria como de solo lectura.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Configura `TTBR0_EL1` para activar la tabla de páginas.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Por ahora, solo es compatible con EL1, pero debería ser sencillo añadir \"\n\"compatibilidad con otros niveles de excepción.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Se utiliza en Android para el [Firmware de Máquina Virtual Protegida]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:packages/\"\n\"modules/Virtualization/pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"No hay una forma sencilla de ejecutar este ejemplo, ya que debe hacerse en \"\n\"hardware real o en QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"es un crate de terceros que implementa un asignador básico del sistema \"\n\"buddy. Se puede utilizar tanto para [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"implementando [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html), de forma que puedas usar el crate `alloc` estándar (tal y \"\n\"como vimos [antes](../alloc.md)), o para asignar otro espacio de \"\n\"direcciones. Por ejemplo, podríamos querer asignar espacio MMIO para los \"\n\"registros de dirección base (BAR) de PCI:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"Los BAR de PCI siempre tienen una alineación igual a su tamaño.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Ejecuta el ejemplo con `cargo run` en `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (No se ejecutará en el playground debido a la \"\n\"dependencia del crate).\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"A veces, se necesita algo que se pueda cambiar de tamaño, como `Vec`, pero \"\n\"sin asignación de _heap_. [`tinyvec`](https://crates.io/crates/tinyvec) \"\n\"ofrece un vector respaldado por un array o slice, que se podría asignar \"\n\"estáticamente o en la _stack_, y que hace un seguimiento de cuántos \"\n\"elementos se usan, entrando en _panic_ si intentas utilizar más elementos de \"\n\"los asignados.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` requiere que el tipo de elemento implemente `Default` para la \"\n\"inicialización.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"El playground de Rust incluye `tinyvec`, por lo que este ejemplo se \"\n\"ejecutará bien aunque esté insertado.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` y el resto de los primitivos de sincronización de `std::\"\n\"sync` no están disponibles en `core` o `alloc`. ¿Cómo podemos gestionar la \"\n\"sincronización o la mutabilidad interior para, por ejemplo, compartir el \"\n\"estado entre diferentes CPUs?\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"El crate [`spin`](https://crates.io/crates/spin) proporciona equivalentes \"\n\"basados en spinlocks de muchos de estos primitivos.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"Intenta evitar interbloqueos si usas bloqueos en los controladores de las \"\n\"interrupciones.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` también cuenta con una implementación de exclusión mutua de bloqueo \"\n\"de tickets; equivalentes de `RwLock`, `Barrier` y `Once` de `std::sync`, y \"\n\"`Lazy` para inicialización perezosa\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"El crate [`once_cell`](https://crates.io/crates/once_cell) también tiene \"\n\"algunos tipos útiles de inicialización tardía con un enfoque ligeramente \"\n\"distinto al de `spin::once::Once`.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"El playground de Rust incluye `spin`, por lo que este ejemplo se ejecutará \"\n\"bien aunque está insertado.\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Para compilar un binario de Rust bare-metal en AOSP, tienes que usar una \"\n\"regla `rust_ffi_static` de Soong para crear tu código Rust y, seguidamente, \"\n\"un `cc_binary` con una secuencia de comandos de enlazador para producir el \"\n\"binario en sí. Por último, un `raw_binary` para convertir el ELF en un \"\n\"binario sin formato que pueda ejecutarse.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"En el caso de las máquinas virtuales que se ejecutan con crosvm en aarch64, \"\n\"la biblioteca [vmbase](https://android.googlesource.com/platform/packages/\"\n\"modules/Virtualization/+/refs/heads/master/vmbase/) proporciona una \"\n\"secuencia de comandos de enlazador y valores predeterminados útiles para las \"\n\"reglas de compilación, además de un punto de entrada, registro de la consola \"\n\"UART y mucho más.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"La macro `main!` indica tu función principal, que se llama desde el punto de \"\n\"entrada `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"El punto de entrada `vmbase` gestiona la inicialización de la consola y \"\n\"emite PSCI_SYSTEM_OFF para apagar la máquina virtual si tu función principal \"\n\"devuelve un resultado.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\"Escribiremos un controlador para el dispositivo de reloj en tiempo real \"\n\"PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Luego de ver los ejercicios, puedes ver las [soluciones](solutions-afternoon.\"\n\"md) que se brindan.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"Controlador RTC\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"La máquina virtual aarch64 de QEMU tiene un reloj en tiempo real [PL031]\"\n\"(https://developer.arm.com/documentation/ddi0224/c) en 0x9010000. En este \"\n\"ejercicio, debes escribir un controlador para el reloj.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"Úsalo para imprimir la hora en la consola serie. Puedes usar el crate \"\n\"[`chrono`](https://crates.io/crates/chrono) para dar formato a la fecha y la \"\n\"hora.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"Utiliza el registro de coincidencias y el estado de interrupción sin formato \"\n\"para esperar hasta un momento dado, por ejemplo, un adelanto de 3 segundos. \"\n\"(Llama a [`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/fn.\"\n\"spin_loop.html) dentro d+el bucle).\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"_Ampliación si hay tiempo:_ habilita y gestiona la interrupción que genera \"\n\"la coincidencia de RTC. Puedes usar el controlador que se proporciona con el \"\n\"crate [`arm-gic`](https://docs.rs/arm-gic/) para configurar el controlador \"\n\"de interrupciones genérico (GIC) de Arm.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\"Utiliza la interrupción de RTC, que está conectada al GIC como `IntId::\"\n\"spi(2)`.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"Después de habilitar la interrupción, puedes poner el núcleo en suspensión \"\n\"mediante `arm_gic::wfi()`, lo que hará que entre en suspensión hasta que \"\n\"reciba una interrupción.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Descarga la [plantilla de ejercicio](../../comprehensive-rust-exercises.zip) \"\n\"y busca en el directorio `rtc` los siguientes archivos.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"`src/exceptions.rs` (solo se debería cambiar esto en la tercera parte del \"\n\"ejercicio):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/logger.rs_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_ (no debería ser necesario cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Ejecuta el código en QEMU con `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rust Bare Metal: Tarde\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([volver al ejercicio](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Direcciones base de GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Dirección base de PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// IRQ que utiliza PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// Es seguro porque `GICD_BASE_ADDRESS` y `GICR_BASE_ADDRESS` son las \"\n\"direcciones base\\n\"\n\"    // de un distribuidor y un redistribuidor GICv3 respectivamente,\\n\"\n\"    // y ningún otro elemento tiene acceso a esos intervalos de \"\n\"direcciones.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Es seguro porque `PL031_BASE_ADDRESS` es la dirección base de un \"\n\"dispositivo PL031\\n\"\n\"    // y ningún otro elemento puede acceder a ese intervalo de direcciones.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Espera 3 segundos, sin interrupciones.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Esperando a {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Espera finalizada\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Espera otros 3 segundos a que se produzca una interrupción.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Registro de datos\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Registro de coincidencias\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Registro de cargas\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Registro de control\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Interrumpe Mask Set o Clear register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Estado de interrupción sin procesar\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Estado de interrupción enmascarada\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Interrumpir registro de limpieza\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Controlador para un reloj en tiempo real PL031.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Crea una instancia nueva del controlador RTC para un dispositivo PL031 \"\n\"en la\\n\"\n\"    /// dirección base proporcionada.\\n\"\n\"    ///\\n\"\n\"    /// # Seguridad\\n\"\n\"    ///\\n\"\n\"    /// El objeto la dirección base debe apuntar a los registros de control \"\n\"MMIO de un dispositivo\\n\"\n\"    /// PL031, que debe asignarse al espacio de direcciones del proceso\\n\"\n\"    /// como memoria del dispositivo y no tener ningún otro alias.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Lee el valor de RTC actual.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Es seguro porque sabemos que self.registers apunta\\n\"\n\"        // a los registros de control de un dispositivo PL031 que está \"\n\"asignado correctamente.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Escribe un valor de coincidencia. Cuando el valor de RTC coincida, se \"\n\"generará una interrupción\\n\"\n\"    /// (si está habilitada).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Devuelve en función de si el registro de coincidencias coincide con el \"\n\"valor de RTC,\\n\"\n\"    /// si la interrupción está habilitada o no.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Devuelve si hay una interrupción pendiente.\\n\"\n\"    ///\\n\"\n\"    /// Solo debe ser true si `matched` devuelve true y\\n\"\n\"    /// la interrupción está enmascarada.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Define o borra la máscara de interrupción.\\n\"\n\"    ///\\n\"\n\"    /// Si la máscara es true, se habilita la interrupción; Si es false,\\n\"\n\"    /// se inhabilita la interrupción.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Borra una interrupción pendiente, si la hubiera.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Es seguro porque solo contiene un puntero a la memoria del dispositivo,\\n\"\n\"// a la que se puede acceder desde cualquier contexto.\\n\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Te Damos la Bienvenida a Concurrencia en Rust\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust es totalmente compatible con la concurrencia mediante hilos del SO con \"\n\"exclusiones mutuas y canales.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"El sistema de tipos de Rust desempeña un papel importante al hacer que \"\n\"muchos errores de concurrencia sean errores en tiempo de compilación. A \"\n\"menudo, esto se conoce como _concurrencia sin miedo_, ya que puedes confiar \"\n\"en el compilador para asegurar la corrección en el tiempo de ejecución.\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Contando con los descansos de 10 minutos, la duración prevista de la sesión \"\n\"es de unas 2 horas y 20 minutos.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 20 minutos.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Los hilos de Rust funcionan de forma similar a los de otros lenguajes:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Recuento en el hilo: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Hilo principal: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\"Los hilos son todos hilos daemon, y el hilo principal no espera por ellos.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Los pánicos de los hilos son independientes entre sí.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Los pánicos pueden transportar una carga útil, que se puede desempaquetar \"\n\"con `downcast_ref`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"Ejecuta el ejemplo con:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) se usa \"\n\"para construir una instancia predeterminada de un tipo.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"Utiliza `let handle = thread::spawn(...)` y, después, `handle.join()` para \"\n\"esperar a que el hilo termine.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"Sin embargo, puedes usar un [hilo con ámbito](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html) para lo siguiente:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"Usa el valor devuelto `Result` de `handle.join.()` para acceder a la carga \"\n\"útil del pánico. Este es un buen momento para hablar sobre [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"Activa un pánico en el hilo y observa cómo esto no afecta a `main`.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Usa el valor devuelto `Result` de `handle.join.()` para acceder a la carga \"\n\"útil del pánico. Este es un buen momento para hablar sobre [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Los hilos normales no pueden tomar nada prestado de su entorno:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Sin embargo, puedes usar un [hilo con ámbito](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html) para lo siguiente:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"La razón es que, cuando se completa la función `thread::scope`, se asegura \"\n\"que todos los hilos están unidos, por lo que pueden devolver datos prestados.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Se aplican las reglas normales de préstamo de Rust: un hilo puede tomar \"\n\"datos prestados de manera mutable o cualquier número de hilos puede tomar \"\n\"datos prestados de manera inmutable.\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"Esta sección tiene una duración aproximada de 20 minutos.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Los canales de Rust tienen dos partes: `Sender<T>` y `Receiver<T>`. Las dos \"\n\"partes están conectadas a través del canal, pero solo se ven los puntos \"\n\"finales.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Recibido: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` son las siglas de Multi-Producer, Single-Consumer (multiproductor, \"\n\"consumidor único.) `Sender` y `SyncSender` implementan `Clone` (es decir, \"\n\"puedes crear varios productores), pero `Receiver` no.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` y `recv()` devuelven `Result`. Si devuelven `Err`, significa que el \"\n\"homólogo `Sender` o `Receiver` se ha eliminado y el canal se ha cerrado.\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Se obtiene un canal asíncrono y sin límites con `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Mensaje {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: mensaje enviado {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: completado\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Principal: ha recibido {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"Con canales limitados (síncronos), `send` puede bloquear el hilo:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"Al llamar a `send`, se bloqueará el hilo hasta que haya espacio suficiente \"\n\"en el canal para el mensaje nuevo. El hilo se puede bloquear de forma \"\n\"indefinida si no hay nadie que lea el canal.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"Si se cierra el canal, se anulará la llamada a `send` y se producirá un \"\n\"error (por eso devuelve `Result`). Un canal se cierra cuando se elimina el \"\n\"receptor.\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\"Un canal delimitado con un tamaño de cero se denomina \\\"canal rendezvous\\\". \"\n\"Cada envío bloqueará el hilo actual hasta que otro hilo llame a `read`.\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"Send\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"Sync\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"¿Cómo sabe Rust que debe prohibir el acceso compartido entre hilos? La \"\n\"respuesta está en dos traits:\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): un tipo `T` \"\n\"es `Send` si es seguro mover un `T` entre los límites de un hilo.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): un tipo `T` \"\n\"es `Sync` si es seguro mover un `&T` entre los límites de un hilo.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"`Send` y `Sync` son [traits inseguros](../unsafe/unsafe-traits.md). El \"\n\"compilador los derivará automáticamente a tus tipos siempre que solo \"\n\"contengan los tipos `Send` y `Sync`. También puedes implementarlos de forma \"\n\"manual cuando sepas que es válido.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Se podría pensar en estos traits como marcadores que indican que el tipo \"\n\"tiene ciertas propiedades de seguridad en hilos.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"Se pueden utilizar en las restricciones genéricas como traits normales.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Un tipo `T` es [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.\"\n\"html) si es seguro mover un valor `T` a otro hilo.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"El efecto de mover la propiedad a otro hilo es que los _destructores_ se \"\n\"ejecutarán en ese hilo. Por tanto, la cuestion es cuándo se puede asignar un \"\n\"valor a un hilo y desasignarlo en otro.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"Por ejemplo, solo se puede acceder a una conexión a la biblioteca SQLite \"\n\"desde un único hilo.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Un tipo `T` es [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.\"\n\"html) si es seguro acceder a un valor `T` desde varios hilos al mismo tiempo.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"En concreto, la definición es la siguiente:\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` es `Sync` únicamente si `&T` es `Send`.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Esta instrucción es, básicamente, una forma resumida de indicar que, si un \"\n\"tipo es seguro para los hilos en uso compartido, también lo es para pasar \"\n\"referencias de él a través de los hilos.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Esto se debe a que, si el tipo es Sync, significa que se puede compartir \"\n\"entre múltiples hilos sin el riesgo de que haya carreras de datos u otros \"\n\"problemas de sincronización, por lo que es seguro moverlo a otro hilo. \"\n\"También es seguro mover una referencia al tipo a otro hilo, ya que se puede \"\n\"acceder de forma segura a los datos a los que hace referencia desde \"\n\"cualquier hilo.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"La mayoría de los tipos que encuentras son `Send + Sync`:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, etc.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, etc.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, etc.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\"`Arc<T>`: explícitamente seguro para los hilos mediante el recuento atómico \"\n\"de referencias.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\"`Mutex<T>`: explícitamente seguro para los hilos mediante bloqueo interno.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\"`AtomicBool`, `AtomicU8`, etc.: utiliza instrucciones atómicas especiales.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Los tipos genéricos suelen ser `Send + Sync` cuando los parámetros del tipo \"\n\"son `Send + Sync`.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Estos tipos se pueden mover a otros hilos, pero no son seguros para los \"\n\"hilos. Normalmente, esto se debe a la mutabilidad interior:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Estos tipos son seguros para los hilos _(thread safe)_, pero no se pueden \"\n\"mover a otro hilo:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: utiliza primitivos de nivel SO que se deben desasignar en \"\n\"el hilo que los creó.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Estos tipos no son seguros para los hilos y no se pueden mover a otros hilos:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: cada `Rc<T>` tiene una referencia a un `RcBox<T>`, que contiene un \"\n\"recuento de referencias no atómico.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust asume que los punteros sin procesar pueden tener \"\n\"consideraciones especiales de concurrencia.\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) permite el \"\n\"acceso compartido de solo lectura a través de `Arc::clone`:\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` son las siglas de \\\"Atomic Reference Counted\\\" (recuento atómico de \"\n\"referencias), una versión de `Rc` segura para los hilos que utiliza \"\n\"operaciones atómicas.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementa `Clone`, independientemente de si `T` lo hace o no. \"\n\"Implementa `Send` y `Sync` si `T` implementa ambos.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` tiene el coste de las operaciones atómicas que se ejecutan; \"\n\"después el uso de `T` es libre.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Hay que prestar atención a los ciclos de referencia, ya que `Arc` no usa un \"\n\"recolector de memoria residual para detectarlos.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` puede resultar útil.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) asegura \"\n\"la exclusión mutua _y_ permite un acceso mutable a `T` a través de una \"\n\"interfaz de solo lectura:\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Fíjate en cómo tenemos una implementación general de [`impl<T: Send> Sync \"\n\"for Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-\"\n\"Sync-for-Mutex%3CT%3E).\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` en Rust parece una colección con un solo elemento: los datos \"\n\"protegidos.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"No es posible olvidarse de adquirir la exclusión mutua antes de acceder a \"\n\"los datos protegidos.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Puedes obtener un `&mut T` de `Mutex<T>` mediante el bloqueo. El \"\n\"`MutexGuard` asegura que `&mut T` no dure más tiempo que el bloqueo que se \"\n\"ha aplicado.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implementa tanto `Send` como `Sync` únicamente si `T` implementa \"\n\"`Send`.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Un equivalente de bloqueo de lectura y escritura: `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"¿Por qué `lock()` devuelve un `Result`? \"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Si el hilo que contiene `Mutex` entra en pánico, `Mutex` se \\\"envenena\\\" \"\n\"para indicar que los datos que protegía pueden estar en un estado \"\n\"incoherente. Llamar a `lock()` en una exclusión mutua envenenada da el error \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"Puedes llamar a `into_inner()` en el error para recuperar los datos de todos \"\n\"modos.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Veamos cómo funcionan `Arc` y `Mutex`:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// usar std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"Solución posible:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"Puntos a destacar:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` se envuelve tanto en `Arc` como en `Mutex`, porque sus preocupaciones \"\n\"son ortogonales.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Envolver un `Mutex` en un `Arc` es un patrón habitual para compartir el \"\n\"estado mutable entre hilos.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` se debe clonar como `v2` antes de poder moverlo a otro hilo. Ten \"\n\"en cuenta que `move` se ha añadido a la firma lambda.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Se introducen bloqueos para limitar al máximo el ámbito de `LockGuard`.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"El problema de la cena de los filósofos es un problema clásico de \"\n\"concurrencia:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Cinco filósofos cenan juntos en la misma mesa. Cada filósofo tiene su propio \"\n\"sitio en ella. Hay un tenedor entre cada plato. El plato que van a degustar \"\n\"es una especie de espaguetis que hay que comer con dos tenedores. Los \"\n\"filósofos solo pueden pensar y comer alternativamente. Además, solo pueden \"\n\"comer sus espaguetis cuando disponen de un tenedor a la izquierda y otro a \"\n\"la derecha. Por tanto, los dos tenedores solo estarán disponibles cuando su \"\n\"dos vecinos más cercanos estén pensando y no comiendo. Cuando un filósofo \"\n\"termina de comer, deja los dos tenedores en la mesa.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Para realizar este ejercicio necesitarás una \\\\[instalación local de \"\n\"Cargo\\\\] (../../cargo/running-locally.md). Copia el fragmento de código que \"\n\"aparece más abajo en un archivo denominado `src/main.rs`, rellena los \"\n\"espacios en blanco y comprueba que `cargo run` no presenta interbloqueos:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"¡Eureka! ¡{} tiene una nueva idea!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Recoge los tenedores...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} está comiendo...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"Crates HAL\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hipatia\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Platón\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristóteles\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pitágoras\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Crea tenedores\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Crea filósofos\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// Haz que cada uno de ellos piense y coma 100 veces\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Expresa sus reflexiones\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Puedes usar el siguiente archivo `Cargo.toml`:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Utilicemos nuestros nuevos conocimientos para crear un comprobador de \"\n\"enlaces multihilo. Debería empezar en una página web y comprobar que los \"\n\"enlaces de la página son válidos. Debería consultar otras páginas del mismo \"\n\"dominio y seguir haciéndolo hasta que todas las páginas se hayan validado.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"Crea un proyecto de Cargo y añade las siguientes dependencias:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Si `cargo add` da `error: no such subcommand`, edita el archivo `Cargo.toml` \"\n\"de forma manual. Añade las dependencias que se indican más abajo.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Las llamadas a `cargo add` actualizarán el archivo `Cargo.toml` para que \"\n\"tenga este aspecto:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Ya puedes descargar la página de inicio. Prueba con un sitio pequeño, como \"\n\"`https://www.google.org/`.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"El archivo `src/main.rs` debería tener un aspecto similar a este:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"Error de solicitud: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"respuesta HTTP incorrecta: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Comprobando {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"En {base_url:#}: {href:?} ignorado, no se puede analizar: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Enlaces: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"No se han podido extraer los enlaces: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Ejecuta el código en `src/main.rs` con\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Comprueba los enlaces en paralelo con los hilos: envía las URLs que se van a \"\n\"comprobar a un canal y deja que varios hilos comprueben las URLs en paralelo.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Amplía esta opción para extraer enlaces de todas las páginas del dominio \"\n\"`www.google.org`. Define un límite máximo de 100 páginas para que el sitio \"\n\"no te bloquee.\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} está intentando comer\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// Para evitar un interbloqueo, tenemos que romper la simetría\\n\"\n\"        // en algún lugar. De este modo, se cambiarán los tenedores sin \"\n\"desinicializar\\n\"\n\"        // ninguno de ellos.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"Comprobador de Enlaces\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"/// Determina si se deben extraer los enlaces de la página indicada.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Marca la página indicada como visitada y devuelve false si ya se había\\n\"\n\"    /// visitado anteriormente.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// Se ha descartado el remitente. No se enviarán más comandos.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Se ha producido un error de rastreo: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"URLs incorrectas: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"\\\"Async\\\" es un modelo de concurrencia en el que se ejecutan varias tareas \"\n\"al mismo tiempo. Se ejecuta cada una de ellas hasta que se bloquea y, a \"\n\"continuación, se cambia a otra tarea que está lista para progresar. El \"\n\"modelo permite ejecutar un mayor número de tareas en un número limitado de \"\n\"hilos. Esto se debe a que la sobrecarga por tarea suele ser muy baja y los \"\n\"sistemas operativos proporcionan primitivos para identificar de forma \"\n\"eficiente las E/S que pueden continuar.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"La operación asíncrona de Rust se basa en \\\"valores futuros\\\", que \"\n\"representan el trabajo que puede completarse más adelante. Los futuros se \"\n\"\\\"sondean\\\" hasta que indican que se han completado.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"Los futuros se sondean mediante un tiempo de ejecución asíncrono y hay \"\n\"disponibles varios tiempos de ejecución diferentes.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python tiene un modelo similar en su `asyncio`. Sin embargo, su tipo \"\n\"`Future` está basado en retrollamadas y no se sondea. Los programas \"\n\"asíncronos de Python requieren un \\\"bucle\\\", similar a un tiempo de \"\n\"ejecución en Rust.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"`Promise` de JavaScript es parecido, pero también se basa en retrollamadas. \"\n\"El tiempo de ejecución del lenguaje implementa el bucle de eventos, por lo \"\n\"que muchos de los detalles de la resolución de Promise están ocultos.\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"async / await\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"En general, el código asíncrono de Rust se parece mucho al código secuencial \"\n\"\\\"normal\\\":\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"El recuento es: ¡{i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"Ten en cuenta que este es un ejemplo simplificado para mostrar la sintaxis. \"\n\"No hay ninguna operación de larga duración ni concurrencia real.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"¿Cuál es el tipo de resultado devuelto de una llamada asíncrona?\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"Consulta el tipo con `let future: () = async_main(10);` en `main` .\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"La palabra clave \\\"async\\\" es azúcar sintáctico. El compilador sustituye el \"\n\"tipo de resultado devuelto por un futuro. \"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"No se puede hacer que `main` sea asíncrono sin dar instrucciones adicionales \"\n\"al compilador sobre cómo usar el futuro devuelto.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"Se necesita un ejecutor para ejecutar el código asíncrono. `block_on` \"\n\"bloquea el hilo hasta que se complete el futuro proporcionado. \"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` espera de forma asíncrona la finalización de otra operación. A \"\n\"diferencia de `block_on`, `.await` no bloquea el hilo.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"`.await` solo se puede usar dentro de una función `async` (o bloqueo; estos \"\n\"se verán más tarde). \"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) es un \"\n\"trait implementado por objetos que representan una operación que puede que \"\n\"aún no se haya completado. Se puede sondear un futuro y `poll` devuelve un \"\n\"[`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"Una función asíncrona devuelve `impl Future`. También es posible (aunque no \"\n\"es habitual) implementar `Future` para tus propios tipos. Por ejemplo, el \"\n\"`JoinHandle` devuelto por `tokio::spawn` implementa `Future` para permitir \"\n\"que se una a él.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"La palabra clave `.await`, aplicada a un futuro, provoca que la función \"\n\"asíncrona se detenga hasta que dicho futuro esté listo y, a continuación, se \"\n\"evalúa su salida.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"Los tipos `Future` y `Polll` se implementan exactamente como se indica. Haz \"\n\"clic en los enlaces para mostrar las implementaciones en los documentos.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"No trataremos `Pin` ni `Context`, ya que nos centraremos en escribir código \"\n\"asíncrono en lugar de compilar nuevos primitivos asíncronos. Brevemente:\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"`Context` permite que un futuro se programe a sí mismo para que se vuelva a \"\n\"sondear cuando se produzca un evento.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` asegura que el futuro no se mueva en la memoria, de forma que los \"\n\"punteros en ese futuro siguen siendo válidos. Esto es necesario para que las \"\n\"referencias sigan siendo válidas después de `.await`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"Un _runtime_ ofrece asistencia para realizar operaciones de forma asíncrona \"\n\"(un _reactor_) y es responsable de ejecutar futuros (un _ejecutor_). Rust no \"\n\"cuenta con un tiempo de ejecución \\\"integrado\\\", pero hay varias opciones \"\n\"disponibles:\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/): eficaz, con un ecosistema bien desarrollado de \"\n\"funciones, como [Hyper](https://hyper.rs/) para HTTP o [Tonic](https://\"\n\"github.com/hyperium/tonic) para usar gRPC.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/): se trata de un \\\"std para async\\\" e incluye \"\n\"un tiempo de ejecución básico en `async::task`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/): sencillo y ligero.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"Varias aplicaciones de mayor tamaño tienen sus propios tiempos de ejecución. \"\n\"Por ejemplo, [Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/\"\n\"main/src/lib/fuchsia-async/src/lib.rs) ya tiene uno.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"Ten en cuenta que, de los tiempos de ejecución enumerados, el playground de \"\n\"Rust solo admite Tokio. El playground tampoco permite ningún tipo de E/S, \"\n\"por lo que la mayoría de elementos asíncronos interesantes no se pueden \"\n\"ejecutar. en él.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"Los futuros son \\\"inertes\\\", ya que no realizan ninguna acción (ni siquiera \"\n\"iniciar una operación de E/S) a menos que haya un ejecutor que los sondee. \"\n\"Muy diferente de las promesas de JavaScript, por ejemplo, que se ejecutan \"\n\"hasta su finalización, aunque nunca se utilicen.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio ofrece lo siguiente: \"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"Un tiempo de ejecución multihilo para ejecutar código asíncrono.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"Una versión asíncrona de la biblioteca estándar.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"Un amplio ecosistema de bibliotecas.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Recuento en la tarea: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Tarea principal: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"Con la macro `tokio::main`, podemos hacer que `main` sea asíncrono.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"La función `spawn` crea una \\\"tarea\\\" simultánea.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"Nota: `spawn` utiliza un `Future`, no se llama a `.await` en `count_to`.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**Más información:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"¿Por qué `count_to` no suele llegar a 10? Se trata de un ejemplo de \"\n\"cancelación asíncrona. `tokio::spawn` devuelve un controlador que puede \"\n\"esperarse hasta que termine.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"Prueba `count_to(10).await` en lugar de usar spawn.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"Intenta esperar a la correción de la tarea de `tokio::spawn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust tiene un sistema de tareas, que es una forma de hilo ligero.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"Una tarea tiene un solo futuro de nivel superior que el ejecutor sondea para \"\n\"hacer que progrese. El futuro puede tener uno o varios futuros anidados que \"\n\"su método `poll` sondea, lo que se corresponde con una pila de llamadas. La \"\n\"concurrencia dentro de una tarea es posible mediante el sondeo de varios \"\n\"futuros secundarios , como una carrera de un temporizador y una operación de \"\n\"E/S.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"escuchando en el puerto {}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"conexión de {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"¿Quién eres?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"error de socket\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"¡Gracias por llamar, {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"Copia este ejemplo en el archivo `src/main.rs` que has preparado y ejecútalo \"\n\"desde ahí.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"Prueba a conectarte mediante una herramienta de conexión TCP como [nc]\"\n\"(https://www.unix.com/man-page/linux/1/nc/) o [telnet](https://www.unix.com/\"\n\"man-page/linux/1/telnet/).\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"Pide a los alumnos que vean cuál sería el estado del servidor de ejemplo con \"\n\"algunos clientes conectados. ¿Qué tareas hay? ¿Cuáles son sus futuros?\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"Esta es la primera vez que vemos un bloque `async`. Es similar a un cierre, \"\n\"pero no acepta argumentos. Su valor devuelto es un futuro, similar a `async \"\n\"fn`. \"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"Refactoriza el bloque asíncrono en una función y mejora la gestión de \"\n\"errores con `?`.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"Varios crates admiten canales asíncronos. Por ejemplo, `tokio`:\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Se han recibido {count} pings hasta el momento.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler completo\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"No se ha podido enviar el ping.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Se han enviado {} pings hasta ahora.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Se ha producido un error en la tarea del controlador de ping.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\"Cambia el tamaño del canal a `3` y comprueba cómo afecta a la ejecución.\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\"En general, la interfaz es similar a los canales `sync`, tal como se ha \"\n\"visto ver en la [clase de la mañana](concurrency/channels.md).\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"Prueba a quitar la llamada a `std::mem::drop`. ¿Qué sucede? ¿Por qué?\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"El crate [Flume](https://docs.rs/flume/latest/flume/) tiene canales que \"\n\"implementan `sync` y `async`,`send` y `recv`. Esto puede resultar práctico \"\n\"para aplicaciones complejas con tareas de E/S y tareas pesadas de \"\n\"procesamiento de CPU.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"Es preferible trabajar con canales `async` por la capacidad de combinarlos \"\n\"con otros `future` para poder crear un flujo de control complejo.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"Una operación join espera hasta que todos los futuros estén listos y \"\n\"devuelve una colección de sus resultados. Es similar a `Promise.all` en \"\n\"JavaScript o `asyncio.gather` en Python.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"En el caso de varios futuros de tipos distintos, puedes utilizar `std::\"\n\"future::join!`, pero debes saber cuántos futuros tendrás en el tiempo de \"\n\"compilación. Esto se encuentra actualmente en el crate `futures`, que pronto \"\n\"se estabilizará en `std::future`.\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"El riesgo que supone 'join' es que puede que uno de los futuros no se \"\n\"resuelva nunca, causando que el programa se bloquee. \"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"También puedes combinar `join_all` con `join!`, por ejemplo, para unir todas \"\n\"las solicitudes a un servicio HTTP, así como una consulta a la base de \"\n\"datos. Prueba a añadir un tokio::time::sleep`al futuro mediante`futures::\"\n\"join!`. No se trata de un tiempo de espera (para eso se requiere `select!`, \"\n\"que se explica en el siguiente capítulo), sino que muestra `join!\\\\`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"Una operación select espera hasta que un conjunto de futuros esté listo y \"\n\"responde al resultado de ese futuro. En JavaScript, esto es similar a \"\n\"`Promise.race`. En Python, se compara con `asyncio.wait(task_set, \"\n\"return_when=asyncio.FIRST_COMPLETED)`.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"Al igual que en el caso de una instrucción _match_, el cuerpo de `select!` \"\n\"tiene una serie de brazos, cada uno de los cuales tiene la forma `pattern = \"\n\"future => statement`. Cuando `future` está listo, la instrucción se ejecuta \"\n\"con las variables de `pattern` vinculadas al resultado de `future`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"No se ha podido enviar el gato.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"No se ha podido enviar el perro.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"No se ha podido recibir el ganador\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"El ganador es {winner:?}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"En este ejemplo, tenemos una carrera entre un gato y un perro. \"\n\"`first_animal_to_finish_race` escucha a ambos canales y elige el que llegue \"\n\"primero. Como el perro tarda 50 ms, gana al gato, que tarda 500 ms.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\"En este ejemplo, puedes usar canales `oneshot`, ya que se supone que solo \"\n\"recibirán un `send`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\"Prueba a añadir un límite a la carrera y demuestra cómo se seleccionan \"\n\"distintos tipos de futuros.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"Ten en cuenta que `select!` elimina las ramas sin coincidencias, cancelando \"\n\"así sus futuros. Es más fácil de usar cuando cada ejecución de `select!` \"\n\"crea futuros.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\"También puedes enviar `&mut future` en lugar del futuro en sí, pero esto \"\n\"podría provocar problemas, como se explica más adelante en la diapositiva \"\n\"sobre pines.\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"Async/await ofrece una abstracción práctica y eficiente para la programación \"\n\"asíncrona simultánea. Sin embargo, el modelo async/await de Rust también \"\n\"viene acompañado de errores y footguns. En este capítulo veremos algunos de \"\n\"ellos:\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"Fijar\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"Bloqueo del ejecutor\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"La mayoría de los tiempos de ejecución asíncronos solo permiten que las \"\n\"tareas de E/S se ejecuten de forma simultánea. Esto significa que las tareas \"\n\"que bloquean la CPU bloquearán el ejecutor e impedirán que se ejecuten otras \"\n\"tareas. Una solución alternativa y sencilla es utilizar métodos asíncronos \"\n\"equivalentes siempre que sea posible.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"future {id} ha dormido {duration_ms} min, terminó después de {} ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"Ejecuta el código y comprueba que las suspensiones se producen de forma \"\n\"consecutiva y no simultánea.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"La versión `\\\"current_thread\\\"` reúne todas las tareas en un solo hilo. Esto \"\n\"consigue que el efecto sea más obvio, pero el error sigue estando presente \"\n\"en la versión multihilo.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"Cambia `std::thread::sleep` a `tokio::time::sleep`. y espera su resultado.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"Otra solución sería `tokio::task::spawn_blocking`, que genera un hilo real y \"\n\"transforma su controlador en un futuro sin bloquear el ejecutor.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"No debes pensar en las tareas como hilos del sistema operativo. No se \"\n\"asignan 1 a 1 y la mayoría de los ejecutores permitirán que se ejecuten \"\n\"muchas tareas en un solo hilo del sistema operativo. Esta situación es \"\n\"especialmente problemática cuando se interactúa con otras bibliotecas a \"\n\"través de FFI, donde dicha biblioteca puede depender del almacenamiento \"\n\"local de hilos o puede asignarse a hilos específicos del sistema operativo \"\n\"(por ejemplo, CUDA). En estos casos es preferible usar `tokio::task::\"\n\"spawn_blocking`.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"Utiliza las exclusión mutuas de sincronización con cuidado. Si mantienes una \"\n\"exclusión mutua sobre un `.await`, puede que se bloquee otra tarea y que \"\n\"esta se esté ejecutando en el mismo hilo.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"Los bloques y las funciones asíncronos devuelven tipos que implementan el \"\n\"trait `Future`. El tipo devuelto es el resultado de una transformación del \"\n\"compilador que convierte las variables locales en datos almacenados en el \"\n\"futuro.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"Algunas de estas variables pueden dirigir punteros a otras variables \"\n\"locales. Por este motivo, el futuro nunca debería trasladarse a otra \"\n\"ubicación de memoria, ya que esta acción invalidaría esos punteros.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"Para evitar que el tipo futuro se mueva en la memoria, solo se puede sondear \"\n\"mediante un puntero fijado. `Pin` es un envoltorio que rodea a una \"\n\"referencia y que no permite todas las operaciones que moverían la instancia \"\n\"a la que apunta a otra ubicación de memoria.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// Un elemento de trabajo. En este caso, solo se duerme durante un tiempo \"\n\"determinado y responde\\n\"\n\"// con un mensaje en el canal `respond_on`.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// Un trabajador que espera trabajo en una cola y lo ejecuta.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Simula que trabaja.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"no se ha podido enviar la respuesta\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: informar del número de iteraciones cada 100 ms\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"// Un solicitante que pide trabajo y espera a que se complete.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"no se ha podido enviar en la cola de trabajo\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"no se ha podido esperar la respuesta\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"resultado del trabajo de la iteración {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"Puede que reconozcas esto como un ejemplo del patrón actor. Los actores \"\n\"suelen llamar a `select!` en un bucle.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\"Esta sección es un resumen de algunas de las lecciones anteriores, así que \"\n\"tómate tu tiempo .\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"Si añade un `_ = sleep(Duration::from_millis(100)) => { println!(..) }` a \"\n\"`select!`, nunca se ejecutará. ¿Por qué?\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\"En su lugar, añade un `timeout_fut` que contenga ese futuro fuera de `loop`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"Continuará sin funcionar. Sigue los errores del compilador y añade `&mut` a \"\n\"`timeout_fut` en `select!` para ir despejando el problema. A continuación, \"\n\"usa `Box::pin`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\"Se puede compilar, pero una vez que vence el tiempo de espera, aparece \"\n\"`Poll::Ready` en cada iteración (un futuro fusionado podría resultar útil). \"\n\"Actualiza para restablecer `timeout_fut` cada vez que expire.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box se asigna en el montículo. En algunos casos, `std::pin::pin!` (solo si \"\n\"se ha estabilizado recientemente, con código antiguo que suele utilizar \"\n\"`tokio::pin!`) también es una opción, pero difícil de utilizar en un futuro \"\n\"que se reasigna.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"Otra alternativa es no utilizar `pin`, sino generar otra tarea que se \"\n\"enviará a un canal de `oneshot` cada 100 ms.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"Los datos que contienen punteros a sí mismos se denominan autoreferenciales. \"\n\"Normalmente, el verificador de préstamos de Rust evitaría que se movieran \"\n\"los datos de autorreferencia, ya que las referencias no pueden tener una \"\n\"duración mayor que la de los datos a los que apuntan. Sin embargo, el \"\n\"verificador de préstamos no verifica la transformación del código de las \"\n\"funciones y los bloques asíncronos.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` es un envoltorio que rodea a una referencia. No se puede mover un \"\n\"objeto desde su lugar mediante un puntero fijado. Sin embargo, sí se puede \"\n\"mover mediante un puntero no fijado.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"El método `poll` del trait `Future` utiliza `Pin<&mut Self>` en lugar de \"\n\"`&mut Self` para hacer referencia a la instancia. Por eso solo se puede \"\n\"llamar desde un puntero fijado.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"El crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"proporciona una solución mediante una macro:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"ejecutando todos los sleepers…\\\".\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"ha dormido {} ms\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` es fácil de usar, pero ten en cuenta que utiliza asignaciones \"\n\"de montículos para conseguirlo. Esta asignación de montículo tiene una \"\n\"sobrecarga de rendimiento.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"Los problemas de compatibilidad del lenguaje con `async trait` son muy \"\n\"complejos y no vale la pena describirlos en profundidad. Niko Matsakis lo \"\n\"explica muy bien en [esta publicación](https://smallcultfollowing.com/\"\n\"babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/), por si te interesa \"\n\"investigar más a fondo.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"Prueba a crear una estructura que entre en suspensión durante un periodo \"\n\"aleatorio y añádela a Vec.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"Si eliminas un futuro, no se podrá volver a sondear. Este fenómeno se \"\n\"denomina _cancelación_ y puede producirse en cualquier momento de `await`. \"\n\"Hay que tener cuidado para asegurar que el sistema funcione correctamente, \"\n\"incluso cuando se cancelen los futuros. Por ejemplo, no debería sufrir \"\n\"interbloqueos o perder datos.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"UTF-8\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"El compilador no ayuda con la seguridad de la cancelación. Debes leer la \"\n\"documentación de la API y tener en cuenta el estado de tu `async fn`.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"A diferencia de `panic` y `?`, la cancelación forma parte del flujo de \"\n\"control normal (en contraposición a la gestión de errores).\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"En el ejemplo se pierden partes de la cadena.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"Cuando la rama `tick()` termina primero, se eliminan `next()` y su `buf`.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\"`LinesReader` se puede configurar para que no se cancele marcando `buf` como \"\n\"parte del _struct_:\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// prefijo buf y bytes con self.\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) es a prueba de cancelaciones, ya que registra si una marca \"\n\"se ha 'entregado'.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) es a prueba de cancelaciones porque o \"\n\"devuelve los datos o no los lee.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) es similar al ejemplo y _no está_ \"\n\"configurado a prueba de cancelaciones. Consulta su documentación para \"\n\"obtener información detallada y alternativas.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"La Cena de Filósofos --- Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"See [dining philosophers](concurrency/sync-exercises/dining-philosophers.md) \"\n\"for a description of the problem.\"\nmsgstr \"\"\n\"Consulta la descripción del problema en la sección sobre [la cena de \"\n\"filósofos](dining-philosophers.md).\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Como antes, necesitarás una [instalación local de Cargo](../../cargo/running-\"\n\"locally.md) para realizar el ejercicio. Copia el fragmento de código que \"\n\"aparece más abajo en un archivo denominado `src/main.rs`, rellena los \"\n\"espacios en blanco y comprueba que `cargo run` no presenta interbloqueos:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Hazles pensar y comer\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"Dado que esta vez usas async, necesitarás una dependencia `tokio`. Puedes \"\n\"usar el siguiente `Cargo.toml`:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"Además, ten en cuenta que esta vez tienes que utilizar `Mutex` y el módulo \"\n\"`mpsc` del crate `tokio`.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"¿Puedes conseguir que tu implementación tenga un solo hilo? \"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"En este ejercicio, queremos usar nuestros nuevos conocimientos para \"\n\"implementar una aplicación de chat de difusión. Disponemos de un servidor de \"\n\"chat al que los clientes se conectan y publican sus mensajes. El cliente lee \"\n\"los mensajes de usuario de la entrada estándar y los envía al servidor. El \"\n\"servidor del chat transmite cada mensaje que recibe a todos los clientes.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"Para ello, usaremos \\\\[un canal en abierto](https://docs.rs/tokio/latest/\"\n\"tokio/sync/broadcast/fn.channel.html) en el servidor y [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) para la comunicación entre el cliente y \"\n\"el servidor.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"Crea un proyecto de Cargo y añade las siguientes dependencias:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.38.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.3\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"Las APIs necesarias\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"Necesitarás las siguientes funciones de `tokio` y [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/). Dedica unos minutos a familiarizarte \"\n\"con la API. \"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implementado por `WebSocketStream`: \"\n\"permite enviar mensajes de forma asíncrona a través de un flujo Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implementado por `WebsocketStream`: permite \"\n\"enviar mensajes de forma asíncrona a través de un flujo Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): para la lectura asíncrona de mensajes de usuario de \"\n\"la entrada estándar.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): para suscribirse a un canal en abierto.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"Dos binarios\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"Normalmente, en un proyecto de Cargo, solo puedes tener un archivo binario y \"\n\"un archivo `src/main.rs`. En este proyecto, se necesitan dos binarios, uno \"\n\"para el cliente y otro para el servidor. Puedes convertirlos en dos \"\n\"proyectos de Cargo independientes, pero los incluiremos en un solo proyecto \"\n\"de Cargo con dos binarios. Para que funcione, el código del cliente y del \"\n\"servidor deben aparecer en `src/bin` (consulta la [documentación](https://\"\n\"doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries)). \"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"Copia el fragmento de código del servidor y del cliente que aparecen más \"\n\"abajo en `src/bin/server.rs` y `src/bin/client.rs`, respectivamente. Tu \"\n\"tarea es completar estos archivos como se describe a continuación. \"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"`src/bin/server.rs`:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\"// TODO: Para obtener una pista, consulta la descripción de la tarea a \"\n\"continuación.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"escuchando en el puerto 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"Nueva conexión de {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Envuelve el flujo TCP sin procesar en un websocket.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"Ejecutar los binarios\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"Ejecuta el servidor con:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"y el cliente con:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"Implementa la función `handle_connection` en `src/bin/server.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"Sugerencia: usa `tokio::select!` para realizar dos tareas simultáneamente en \"\n\"un bucle continuo. Una tarea recibe mensajes del cliente y los transmite. La \"\n\"otra envía los mensajes que recibe el servidor al cliente.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"Completa la función principal en `src/bin/client.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"Sugerencia: al igual que antes, usa `tokio::select!` en un bucle continuo \"\n\"para realizar dos tareas simultáneamente: (1) leer los mensajes del usuario \"\n\"desde la entrada estándar y enviarlos al servidor, y (2) recibir mensajes \"\n\"del servidor y mostrárselos al usuario.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"Opcional: cuando termines, cambia el código para difundir mensajes a todos \"\n\"los clientes, excepto al remitente.\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// Los bloqueos se eliminan aquí\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\"// tx se elimina aquí, por lo que no tenemos que eliminarlo explícitamente \"\n\"más tarde.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Aquí tienes una reflexión: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Te damos la bienvenida al chat. Escribe un mensaje\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"Sugerencia: al igual que antes, usa `tokio::select!` en un bucle continuo \"\n\"para realizar dos tareas simultáneamente: (1) leer los mensajes del usuario \"\n\"desde la entrada estándar y enviarlos al servidor, y (2) recibir mensajes \"\n\"del servidor y mostrárselos al usuario.\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"Del cliente {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Bucle continuo para enviar y recibir mensajes simultáneamente.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"Del servidor: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Gracias por realizar el curso Comprehensive Rust 🦀._ Esperamos que te haya \"\n\"gustado y que te haya resultado útil.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Nos lo hemos pasado muy bien preparando el curso. Sabemos que no es \"\n\"perfecto, así que si has detectado algún error o tienes ideas para \"\n\"mejorarlo, [ponte en contacto con nosotros en GitHub](https://github.com/\"\n\"google/comprehensive-rust/discussions). Nos encantaría saber tu opinión.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"A continuación, se incluye un glosario con el objetivo de ofrecer una breve \"\n\"definición de algunos términos de Rust. En el caso de las traducciones, \"\n\"también sirve para relacionar el término con el original en inglés.\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"asignar:  \\n\"\n\"Asignación dinámica de memoria en [el montículo](Memory-management/stack-vs-\"\n\"heap.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"argumento:  \\n\"\n\"Información que se transmite a una función o método.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Rust Bare-metal:  \\n\"\n\"desarrollo de Rust de bajo nivel, a menudo desplegado en un sistema sin \"\n\"sistema operativo. Consulta [Bare-metal Rust](bare-metal.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"bloque:  \\n\"\n\"Consulta [bloques](control-flow/blocks.md) y _ámbito_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"borrow (_omar prestado_):  \\n\"\n\"Consulta [Borrowing (Préstamos)](ownership/borrowing.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"borrow checker (_comprobador de préstamos_):  \\n\"\n\"la parte del compilador de Rust que comprueba que todos los préstamos sean \"\n\"válidos.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"llave:  \\n\"\n\"`{` and `}`. Delimitan _bloques_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"compilar  \\n\"\n\"El proceso de conversión de código fuente en código ejecutable o en un \"\n\"programa utilizable.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"Llamar:  \\n\"\n\"invocar o ejecutar una función o método.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"Canal:  \\n\"\n\"se utiliza para enviar mensajes [entre hilos](concurrency/channels.md) de \"\n\"forma segura.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"el conjunto de cursos que se describen aquí se denomina Comprehensive Rust \"\n\"🦀.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"Simultaneidad:  \\n\"\n\"ejecución de varias tareas o procesos al mismo tiempo.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Simultaneidad en Rust:  \\n\"\n\"consulta [Simultaneidad en Rust](concurrency.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"Constante:  \\n\"\n\" valor que no cambia durante la ejecución de un programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"Flujo de control:  \\n\"\n\"el orden en el que se ejecutan las instrucciones individuales en un programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"Fallo:  \\n\"\n\"fallo o finalización de un programa de forma inesperada y sin gestionar.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"Enumeración:  \\n\"\n\"tipo de dato que contiene una de varias constantes con nombre, posiblemente \"\n\"con una tupla o estructura asociada.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"Error:  \\n\"\n\"condición o resultado inesperado que se desvía del comportamiento esperado.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"Gestión de errores:  \\n\"\n\"el proceso de gestionar y responder a los errores que se producen durante la \"\n\"ejecución del programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"Ejercicio:  \\n\"\n\"una tarea o problema diseñado para practicar y poner a prueba las \"\n\"habilidades de programación.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"Función:  \\n\"\n\"bloque de código reutilizable que lleva a cabo una tarea específica.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"Recolector de elementos no utilizados:  \\n\"\n\"mecanismo que libera automáticamente la memoria que ocupan objetos que ya no \"\n\"se utilizan.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"Genéricos:  \\n\"\n\"una función que permite escribir código con marcadores de posición para los \"\n\"tipos, lo que permite reutilizar código con distintos tipos de datos.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"Inmutable:  \\n\"\n\"que no se puede cambiar después de crearse.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"Prueba de integración:  \\n\"\n\"tipo de prueba que verifica las interacciones entre diferentes partes o \"\n\"componentes de un sistema.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"Palabra clave:  \\n\"\n\"palabra reservada en un lenguaje de programación que tiene un significado \"\n\"específico y que no se puede utilizar como identificador.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"Biblioteca:  \\n\"\n\"una colección de rutinas o código precompilados que pueden utilizar los \"\n\"programas.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"Macro:  \\n\"\n\"las macros de Rust se pueden reconocer por llevar `!` en el nombre. Las \"\n\"macros se utilizan cuando las funciones normales no son suficientes. Un \"\n\"ejemplo típico es `format!`, que utiliza un número variable de argumentos \"\n\"que no es compatible con las funciones de Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"Función `main`:  \\n\"\n\"los programas de Rust empiezan a ejecutarse con la función `main`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"Coincidencia:  \\n\"\n\"construcción de flujo de control en Rust que permite la coincidencia de \"\n\"patrones con el valor de una expresión.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"Pérdida de memoria:  \\n\"\n\"situación en la que un programa no libera memoria que ya no se necesita, lo \"\n\"que provoca un aumento gradual en el uso de memoria.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"Método:  \\n\"\n\"una función asociada a un objeto o a un tipo en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"Módulo:  \\n\"\n\"espacio de nombres que contiene definiciones, como funciones, tipos o \"\n\"traits, para organizar el código en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"Mover:  \\n\"\n\"la transferencia de la propiedad de un valor de una variable a otra en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"Mutable:  \\n\"\n\"una propiedad en Rust que permite que se modifiquen las variables después de \"\n\"que se hayan declarado.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"Propiedad:  \\n\"\n\"el concepto de Rust que define qué parte del código es responsable de \"\n\"gestionar la memoria asociada a un valor.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"Pánico:  \\n\"\n\"condición de error irrecuperable en Rust que provoca la finalización del \"\n\"programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"Parámetro:  \\n\"\n\" valor que se transfiere a una función o método cuando se llama.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"Patrón:  \\n\"\n\"una combinación de valores, literales o estructuras que se pueden comparar \"\n\"con una expresión de Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"Carga útil:  \\n\"\n\"los datos o la información que transporta un mensaje, evento o estructura de \"\n\"datos.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"Programa:  \\n\"\n\"conjunto de instrucciones que un ordenador puede ejecutar para llevar a cabo \"\n\"una tarea específica o resolver un problema concreto.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"Lenguaje de programación:  \\n\"\n\"un sistema formal que se utiliza para comunicar instrucciones a un \"\n\"ordenador, como Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"Receptor:  \\n\"\n\"el primer parámetro de un método de Rust que representa la instancia en la \"\n\"que se llama al método.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"Recuento de referencias:  \\n\"\n\"técnica de gestión de la memoria en la que se hace un seguimiento del número \"\n\"de referencias a un objeto y se desasigna cuando el recuento llega a cero.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"Retorno:  \\n\"\n\"una palabra clave de Rust que se utiliza para indicar el valor que se \"\n\"devuelve de una función.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"lenguaje de programación de sistemas que se centra en la seguridad, el \"\n\"rendimiento y la simultaneidad.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Aspectos básicos de Rust:  \\n\"\n\"contenido del día 1 al día 3 de este curso.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust en Android:  \\n\"\n\"consulta [Rust en Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Rust en Chromium:  \\n\"\n\"consulta [Rust en Chromium](chromium.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"Seguro:  \\n\"\n\"se refiere al código que cumple las reglas de propiedad y préstamos de Rust, \"\n\"lo que evita errores relacionados con la memoria.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"Ámbito:  \\n\"\n\"la región de un programa en la que una variable es válida y se puede \"\n\"utilizar.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"Biblioteca estándar:  \\n\"\n\"una colección de módulos que proporcionan funciones esenciales en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"Static:  \\n\"\n\"una palabra clave de Rust que se utiliza para definir variables o elementos \"\n\"estáticos con un tiempo de vida `'static`.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\"String o cadena:  \\n\"\n\"tipo de datos que almacena datos de texto. Consulta [`String` vs `str`]\"\n\"(basic-syntax/string-slices.html) para obtener más información.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"Struct:  \\n\"\n\"tipo de datos compuestos de Rust que agrupa variables de diferentes tipos \"\n\"bajo un mismo nombre.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"Prueba:  \\n\"\n\"módulo de Rust que contiene funciones que comprueban que otras funciones \"\n\"sean correctas.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"Hilo:  \\n\"\n\"una secuencia de ejecución independiente en un programa que permite la \"\n\"ejecución simultánea.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"Seguridad en hilos:  \\n\"\n\"la propiedad de un programa que asegura un comportamiento correcto en un \"\n\"entorno multihilo.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"Trait:  \\n\"\n\"conjunto de métodos definidos para un tipo desconocido que proporciona una \"\n\"forma de lograr el polimorfismo en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"Límite del trait:  \\n\"\n\"una abstracción en la que puedes requerir que los tipos implementen algunos \"\n\"traits de tu interés.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"Tupla:  \\n\"\n\"tipo de datos compuestos que contiene variables de diferentes tipos. Los \"\n\"campos de tuplas no tienen nombre y se accede a ellos por sus números \"\n\"ordinales.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"Tipo:  \\n\"\n\"una clasificación que especifica qué operaciones se pueden llevar a cabo en \"\n\"valores de una clase concreta en Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"Inferencia de tipos:  \\n\"\n\"capacidad del compilador de Rust para deducir el tipo de una variable o \"\n\"expresión.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"Comportamiento indefinido:  \\n\"\n\"acciones o condiciones en Rust que no tienen ningún resultado especificado, \"\n\"lo que a menudo provoca un comportamiento impredecible del programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"Unión:  \\n\"\n\"tipo de datos que puede contener valores de distintos tipos, pero solo de \"\n\"uno en uno.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"Prueba unitaria:  \\n\"\n\"Rust incluye asistencia integrada para llevar a cabo pruebas unitarias de \"\n\"pequeño tamaño y pruebas de integración de mayor tamaño. Consulta la página \"\n\"[Pruebas unitarias](testing/unit-tests.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"Tipo de unidad:  \\n\"\n\"tipo que no contiene datos, escrito como una tupla sin miembros.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"Inseguro:  \\n\"\n\"el subconjunto de Rust que te permite activar un _comportamiento \"\n\"indefinido_. Consulta [Rust inseguro](unsafe.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"Variable:  \\n\"\n\"una ubicación de la memoria que almacena datos. Las variables son válidas en \"\n\"un _ámbito_\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Otros recursos de Rust\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"La comunidad de Rust ha creado una gran cantidad de recursos online sin \"\n\"coste y de gran calidad.\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"Documentación oficial\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"El proyecto Rust cuenta con muchos recursos. Estos tratan sobre Rust en \"\n\"general:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): el libro \"\n\"canónico sobre Rust sin coste alguno. Trata el lenguaje de forma detallada e \"\n\"incluye algunos proyectos que los usuarios pueden compilar.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust by Example](https://doc.rust-lang.org/rust-by-example/): trata la \"\n\"sintaxis de Rust a través de una serie de ejemplos que muestran distintas \"\n\"construcciones. A veces incluye pequeños ejercicios en los que se te pide \"\n\"que amplíes el código de los ejemplos.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[La biblioteca estándar de Rust](https://doc.rust-lang.org/std/): \"\n\"documentación completa de la biblioteca estándar de Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): un libro \"\n\"incompleto que describe la gramática y el modelo de memoria de Rust.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Consulta guías más especializadas en el sitio oficial de Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): trata de Rust \"\n\"inseguro, incluido cómo trabajar con punteros sin formato e interactuar con \"\n\"otros lenguajes (FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"incluye el nuevo modelo de programación asíncrona que se introdujo después \"\n\"de que se escribiera el libro de Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"una introducción sobre el uso de Rust en dispositivos integrados sin sistema \"\n\"operativo.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Material de formación no oficial\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Una pequeña selección de otras guías y tutoriales sobre Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): trata Rust \"\n\"desde la perspectiva de los programadores de C de bajo nivel.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): explica Rust desde la perspectiva de los desarrolladores que \"\n\"escriben _firmware_ en C.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust for professonals](https://overexact.com/rust-for-professionals/): \"\n\"trata la sintaxis de Rust comparándola con otros lenguajes, como C, C++, \"\n\"Java, JavaScript y Python.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): más de 100 ejercicios \"\n\"para aprender Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): una serie de pequeñas presentaciones que cubren tanto \"\n\"la parte básica como la parte más avanzada del lenguaje Rust. También se \"\n\"tratan otros temas como WebAssembly y async/await.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): a self-paced workshop that goes beyond Rust's \"\n\"built-in testing framework. It covers `googletest`, snapshot testing, \"\n\"mocking as well as how to write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/es/shows/beginners-\"\n\"series-to-rust/) y [Take your first steps with Rust](https://docs.microsoft.\"\n\"com/es/learn/paths/rust-first-steps/): dos guías de Rust dirigidas a nuevos \"\n\"desarrolladores. La primera es un conjunto de 35 vídeos y la segunda es un \"\n\"conjunto de 11 módulos que cubren la sintaxis y las construcciones básicas \"\n\"de Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): exploración detallada de las reglas de gestión \"\n\"de la memoria de Rust a través de la implementación de algunos tipos \"\n\"diferentes de estructuras de listas.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Consulta [The Little Book of Rust Books](https://lborb.github.io/book/) para \"\n\"ver más libros de Rust.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Este material se basa en las numerosas fuentes de documentación sobre Rust. \"\n\"Consulta la página de [otros recursos](other-resources.md) para ver una \"\n\"lista completa de recursos útiles.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"El material de Comprehensive Rust está sujeto a los términos de la licencia \"\n\"Apache 2.0. Para obtener más información, consulta [`LICENSE`](https://\"\n\"github.com/google/comprehensive-rust/blob/main/LICENSE).\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Algunos ejemplos y ejercicios se han copiado y adaptado del libro [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Consulta el directorio \"\n\"`third_party/rust-by-example/` para obtener más información, incluidos los \"\n\"términos de la licencia.\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Se han copiado y adaptado algunos ejercicios del recurso [Rust on Exercism]\"\n\"(https://exercism.org/tracks/rust). Consulta el directorio `third_party/rust-\"\n\"on-exercism/` para obtener más información, incluidos los términos de la \"\n\"licencia.\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"En la sección [Interoperabilidad con C++](android/Interop/cpp.md) se usa una \"\n\"imagen de [CXX](https://cxx.rs/). Consulta el directorio `third_party/cxx/` \"\n\"para obtener más información, incluidos los términos de la licencia.\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"Condicionales\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"Estático y Constantes (_Static y Const_)\"\n\n#, fuzzy\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"Tiempos de vida\"\n\n#, fuzzy\n#~ msgid \"String References\"\n#~ msgstr \"Referencias colgantes\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Control de Flujo\"\n\n#~ msgid \"Day 1 Morning (3 hours, including breaks)\"\n#~ msgstr \"Día 1 por la mañana (3 horas, incluidos los descansos)\"\n\n#~ msgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Bienvenida](../welcome-day-1.md) (5 minutos)\"\n\n#~ msgid \"[Hello, World](../hello-world.md) (20 minutes)\"\n#~ msgstr \"[Hola, mundo](../hello-world.md) (20 minutos)\"\n\n#~ msgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Tipos y valores](../types-and-values.md) (1 hora y 5 minutos)\"\n\n#~ msgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\n#~ msgstr \"\"\n#~ \"[Aspectos básicos del flujo de control](../control-flow-basics.md) (1 \"\n#~ \"hora)\"\n\n#~ msgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\n#~ msgstr \"[Tuplas y arrays](../tuples-and-arrays.md) (1 hora)\"\n\n#~ msgid \"[References](../references.md) (50 minutes)\"\n#~ msgstr \"[Referencias](../references.md) (50 minutos)\"\n\n#~ msgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tipos definidos por el usuario](../user-definition-types.md) (50 minutos)\"\n\n#~ msgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](../welcome-day-2.md) (3 minutos)\"\n\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[Coincidencia de patrones](../pattern-matching.md) (50 minutos)\"\n\n#~ msgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[Métodos y traits](../methods-and-traits.md) (55 minutos)\"\n\n#~ msgid \"[Generics](../generics.md) (45 minutes)\"\n#~ msgstr \"[Genéricos](../generics.md) (45 minutos)\"\n\n#~ msgid \"Day 2 Afternoon (3 hours, including breaks)\"\n#~ msgstr \"Día 2 por la tarde (3 horas, incluidos los descansos)\"\n\n#~ msgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tipos de bibliotecas estándar](../std-types.md) (1 hora y 10 minutos)\"\n\n#~ msgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Traits de biblioteca estándar](../std-traits.md) (1 hora y 40 minutos)\"\n\n#~ msgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](../welcome-day-3.md) (3 minutos)\"\n\n#~ msgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Gestión de la memoria](../memory-management.md) (1 hora y 10 minutos)\"\n\n#, fuzzy\n#~ msgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[Iteradores](../iterators.md) (45 minutos)\"\n\n#~ msgid \"[Borrowing](../borrowing.md) (1 hour)\"\n#~ msgstr \"[Préstamos](../borrowing.md) (1 hora)\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Slices y tiempos de vida](../slices-and-lifetimes.md) (1 hora y 10 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](../welcome-day-4.md) (3 minutos)\"\n\n#~ msgid \"[Iterators](../iterators.md) (45 minutes)\"\n#~ msgstr \"[Iteradores](../iterators.md) (45 minutos)\"\n\n#~ msgid \"[Modules](../modules.md) (40 minutes)\"\n#~ msgstr \"[Módulos](../modules.md) (40 minutos)\"\n\n#~ msgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Pruebas](../testing.md) (1 hora y 5 minutos)\"\n\n#~ msgid \"Day 4 Afternoon (2 hours, including breaks)\"\n#~ msgstr \"Día 4 por la tarde (2 horas, incluidos los descansos)\"\n\n#~ msgid \"[Error Handling](../error-handling.md) (45 minutes)\"\n#~ msgstr \"[Gestión de errores](../error-handling.md) (45 minutos)\"\n\n#~ msgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Rust inseguro](../unsafe-rust.md) (1 hora y 5 minutos)\"\n\n#~ msgid \"Arrow-Left\"\n#~ msgstr \"Flecha izquierda\"\n\n#~ msgid \"Arrow-Right\"\n#~ msgstr \"Flecha derecha\"\n\n#~ msgid \"Ctrl + Enter\"\n#~ msgstr \"Ctrl + Intro\"\n\n#~ msgid \"s\"\n#~ msgstr \"s\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"Puedes usar \"\n\n#~ msgid \"In this session:\"\n#~ msgstr \"En esta sesión:\"\n\n#~ msgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Bienvenida](./welcome-day-1.md) (5 minutos)\"\n\n#~ msgid \"[Hello, World](./hello-world.md) (20 minutes)\"\n#~ msgstr \"[Hola, mundo](./hello-world.md) (20 minutos)\"\n\n#~ msgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Tipos y valores](./types-and-values.md) (1 hora y 5 minutos)\"\n\n#~ msgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\n#~ msgstr \"\"\n#~ \"[Aspectos básicos del flujo de control](./control-flow-basics.md) (1 hora)\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 3 hours\"\n#~ msgstr \"\"\n#~ \"Contando con los descansos de 10 minutos, la duración prevista de la \"\n#~ \"sesión es de unas 3 horas.\"\n\n#~ msgid \"In this segment:\"\n#~ msgstr \"En esta parte se abordarán los siguientes temas:\"\n\n#~ msgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\n#~ msgstr \"[¿Qué es Rust?](./hello-world/what-is-rust.md) (10 minutos)\"\n\n#~ msgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\n#~ msgstr \"[Hola, mundo](./hello-world/hello-world.md) (5 minutos)\"\n\n#~ msgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\n#~ msgstr \"[Ventajas de Rust](./hello-world/benefits.md) (3 minutos)\"\n\n#~ msgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\n#~ msgstr \"[Playground](./hello-world/playground.md) (2 minutos)\"\n\n#~ msgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\n#~ msgstr \"[Variables](./types-and-values/variables.md) (5 minutos)\"\n\n#~ msgid \"[Values](./types-and-values/values.md) (10 minutes)\"\n#~ msgstr \"[Valores](./types-and-values/values.md) (10 minutos)\"\n\n#~ msgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\n#~ msgstr \"[Aritmética](./types-and-values/arithmetic.md) (5 minutos)\"\n\n#~ msgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\n#~ msgstr \"[Cadenas](./types-and-values/strings.md) (10 minutos)\"\n\n#~ msgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\n#~ msgstr \"[Inferencia de tipos](./types-and-values/inference.md) (5 minutos)\"\n\n#~ msgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\n#~ msgstr \"[Ejercicio: Fibonacci](./types-and-values/exercise.md) (30 minutos)\"\n\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"En Rust hay dos tipos para representar cadenas, de los que hablaremos con \"\n#~ \"detenimiento más adelante. Ambos tipos _siempre_ almacenan cadenas \"\n#~ \"codificadas en UTF-8.\"\n\n#, fuzzy\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` es un búfer de cadena mutable.\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"\"\n#~ \"`&str`: es una cadena de solo lectura. Los literales de cadena son de \"\n#~ \"este tipo.\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"frase final: {}\\\"\"\n\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"En esta diapositiva se presentan las cadenas. Más adelante hablaremos de \"\n#~ \"todo lo relacionado con este tema, pero esta información es suficiente \"\n#~ \"para que se puedan usar cadenas en las diapositivas y ejercicios que \"\n#~ \"vienen a continuación.\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"\"\n#~ \"La codificación UTF-8 no válida en una cadena tiene comportamiento \"\n#~ \"indefinido y no es compatible con Rust seguro.\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String` es un tipo definido por el usuario con un constructor (`::\"\n#~ \"new()`) y métodos como `s.push_str(..)`.\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"La `&` en `&str` indica que se trata de una referencia. Más adelante \"\n#~ \"hablaremos de las referencias, por el momento solo es necesario saber que \"\n#~ \"`&str` es una unidad que significa \\\"cadena de solo lectura\\\".\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"La línea marcada como comentario se indexa en la cadena por posición de \"\n#~ \"byte. `12..13` no termina en el límite de un carácter, por lo que el \"\n#~ \"programa da error. Ajusta el intervalo en función del mensaje de error.\"\n\n#~ msgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\n#~ msgstr \"[Condicionales](./control-flow-basics/conditionals.md) (5 minutos)\"\n\n#~ msgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\n#~ msgstr \"[Bucles](./control-flow-basics/loops.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[break y continue](./control-flow-basics/break-continue.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Bloques y ámbitos (scopes)](./control-flow-basics/blocks-and-scopes.md) \"\n#~ \"(10 minutos)\"\n\n#~ msgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\n#~ msgstr \"[Funciones](./control-flow-basics/functions.md) (3 minutos)\"\n\n#~ msgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\n#~ msgstr \"[Macros](./control-flow-basics/macros.md) (2 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: secuencia de Collatz](./control-flow-basics/exercise.md) (30 \"\n#~ \"minutos)\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"\"\n#~ \"Gran parte de la sintaxis de Rust te resultará familiar de C, C++ o Java:\"\n\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"Los bloques están delimitados por llaves.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"Los comentarios de línea empiezan por `//`, mientras que los comentarios \"\n#~ \"de bloque están delimitados por `/* ... */`.\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"Palabras clave como `if` y `while` funcionan igual.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"\"\n#~ \"La asignación de variables se realiza con `=` y la comparación con `==`.\"\n\n#~ msgid \"\"\n#~ \"We will discuss iteration later; for now, just stick to range expressions.\"\n#~ msgstr \"\"\n#~ \"Hablaremos de la iteración más adelante. Por el momento, céntrate en las \"\n#~ \"expresiones de intervalo.\"\n\n#~ msgid \"\\\"{result}\\\"\"\n#~ msgstr \"\\\"{result}\\\"\"\n\n#~ msgid \"\\\"x: {x}, i: {i}\\\"\"\n#~ msgstr \"\\\"x: {x}, i: {i}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"En este caso, detenemos el bucle exterior tras tres iteraciones del bucle \"\n#~ \"interno.\"\n\n#, fuzzy\n#~ msgid \"1\"\n#~ msgstr \"12\"\n\n#~ msgid \" greater than zero:\"\n#~ msgstr \" mayor que cero:\"\n\n#~ msgid \"If _n\"\n#~ msgstr \"Si _n\"\n\n#~ msgid \"i\"\n#~ msgstr \"i\"\n\n#~ msgid \"_.\"\n#~ msgstr \"_.\"\n\n#~ msgid \"_ is even, then _n\"\n#~ msgstr \"_ es par, entonces _n\"\n\n#~ msgid \"i+1\"\n#~ msgstr \"i+1\"\n\n#~ msgid \" = n\"\n#~ msgstr \" = n\"\n\n#~ msgid \" / 2_.\"\n#~ msgstr \" / 2_.\"\n\n#~ msgid \"_ is odd, then _n\"\n#~ msgstr \"_ es impar, entonces _n\"\n\n#~ msgid \" = 3 * n\"\n#~ msgstr \" = 3 * n\"\n\n#~ msgid \" + 1_.\"\n#~ msgstr \" + 1_.\"\n\n#~ msgid \"_ = 3:\"\n#~ msgstr \"_ = 3:\"\n\n#~ msgid \"3 is odd, so _n\"\n#~ msgstr \"3 es impar, por lo que _n\"\n\n#, fuzzy\n#~ msgid \"2\"\n#~ msgstr \"12\"\n\n#~ msgid \"_ = 3 * 3 + 1 = 10;\"\n#~ msgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#~ msgid \"10 is even, so _n\"\n#~ msgstr \"10 es par, por lo que _n\"\n\n#~ msgid \"_ = 10 / 2 = 5;\"\n#~ msgstr \"_ = 10 / 2 = 5;\"\n\n#~ msgid \"5 is odd, so _n\"\n#~ msgstr \"5 es impar, por lo que _n\"\n\n#~ msgid \"_ = 3 * 5 + 1 = 16;\"\n#~ msgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#~ msgid \"16 is even, so _n\"\n#~ msgstr \"16 es par, por lo que _n\"\n\n#~ msgid \"5\"\n#~ msgstr \"5\"\n\n#~ msgid \"_ = 16 / 2 = 8;\"\n#~ msgstr \"_ = 16 / 2 = 8;\"\n\n#~ msgid \"8 is even, so _n\"\n#~ msgstr \"8 es par, por lo que _n\"\n\n#~ msgid \"_ = 8 / 2 = 4;\"\n#~ msgstr \"_ = 8 / 2 = 4;\"\n\n#~ msgid \"4 is even, so _n\"\n#~ msgstr \"4 es par, por lo que _n\"\n\n#~ msgid \"7\"\n#~ msgstr \"7\"\n\n#~ msgid \"_ = 4 / 2 = 2;\"\n#~ msgstr \"_ = 4 / 2 = 2;\"\n\n#~ msgid \"2 is even, so _n\"\n#~ msgstr \"2 es par, por lo que _n\"\n\n#~ msgid \"_ = 1; and\"\n#~ msgstr \"_ = 1; y\"\n\n#~ msgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\n#~ msgstr \"[Tuplas y arrays](./tuples-and-arrays.md) (1 hora)\"\n\n#~ msgid \"[References](./references.md) (50 minutes)\"\n#~ msgstr \"[Referencias](./references.md) (50 minutos)\"\n\n#~ msgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tipos definidos por el usuario](./user-definition-types.md) (50 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tuplas y arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutos)\"\n\n#~ msgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\n#~ msgstr \"[Iteración de arrays](./tuples-and-arrays/iteration.md) (3 minutos)\"\n\n#~ msgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Coincidencia de patrones](./tuples-and-arrays/match.md) (10 minutos)\"\n\n#~ msgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Desestructuración](./tuples-and-arrays/destructuring.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: Arrays anidados](./tuples-and-arrays/exercise.md) (30 minutos)\"\n\n#~ msgid \"\"\n#~ \"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n#~ \"elements of an array have the same type, while tuples can accommodate \"\n#~ \"different types. Both types have a size fixed at compile time.\"\n#~ msgstr \"\"\n#~ \"Las tuplas y los arrays son los primeros tipos \\\"compuestos\\\" que hemos \"\n#~ \"estudiado. Todos los elementos de un array tienen el mismo tipo, mientras \"\n#~ \"que las tuplas admiten distintos tipos. Ambos tipos tienen un tamaño fijo \"\n#~ \"durante el tiempo de compilación.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"Asignación y acceso a arrays:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"Asignación y acceso a tuplas:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"Arrays:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"Tuplas:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"La tupla vacía `()` también se conoce como \\\"tipo unitario\\\". Es a la vez \"\n#~ \"un tipo y el único valor válido de ese tipo, es decir, tanto el tipo como \"\n#~ \"su valor se expresan como `()`. Se usa para indicar, por ejemplo, que una \"\n#~ \"función o expresión no tiene valor de retorno, como veremos en una \"\n#~ \"diapositiva posterior.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"Podríamos pensar en ello como `void`, que quizá resulte familiar de otros \"\n#~ \"lenguajes de programación.\"\n\n#~ msgid \"\"\n#~ \"Destructuring is a way of extracting data from a data structure by \"\n#~ \"writing a pattern that is matched up to the data structure, binding \"\n#~ \"variables to subcomponents of the data structure.\"\n#~ msgstr \"\"\n#~ \"La desestructuración es una forma de extraer datos de una estructura de \"\n#~ \"datos al escribir un patrón que coincida con la estructura de datos, es \"\n#~ \"decir, enlazando variables a los subcomponentes de dicha estructura.\"\n\n#, fuzzy\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"\"\n#~ \"Puedes desestructurar arrays, tuplas y slices haciendo coincidir sus \"\n#~ \"elementos:\"\n\n#~ msgid \"\\\"on Y axis\\\"\"\n#~ msgstr \"\\\"en el eje Y\\\"\"\n\n#~ msgid \"\\\"on X axis\\\"\"\n#~ msgstr \"\\\"en el eje X\\\"\"\n\n#~ msgid \"\\\"left of Y axis\\\"\"\n#~ msgstr \"\\\"a la izquierda del eje Y\\\"\"\n\n#~ msgid \"\\\"below X axis\\\"\"\n#~ msgstr \"\\\"debajo del eje X\\\"\"\n\n#~ msgid \"\\\"first quadrant\\\"\"\n#~ msgstr \"\\\"primer cuadrante\\\"\"\n\n#~ msgid \"\\\"Tell me about {triple:?}\\\"\"\n#~ msgstr \"\\\"Dame información sobre {triple:?}\\\"\"\n\n#~ msgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n#~ msgstr \"\\\"El primero es 0, y = {y}, z = {z}\\\"\"\n\n#~ msgid \"\\\"First is 1 and the rest were ignored\\\"\"\n#~ msgstr \"\\\"El primero es 1 y el resto se ha ignorado\\\"\"\n\n#~ msgid \"\\\"All elements were ignored\\\"\"\n#~ msgstr \"\\\"Se han ignorado todos los elementos\\\"\"\n\n#, fuzzy\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"Crea un patrón con `_` para representar un elemento. \"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"Añade más valores al array.\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"\"\n#~ \"Señala cómo `..` se expandirá para representar un número distinto de \"\n#~ \"elementos.\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"\"\n#~ \"Muestra las coincidencias de tail con los patrones `[.., b]` y `[a@..,b]`.\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"Codifica ambas funciones para que operen con matrices de 3 × 3.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"functions:\"\n#~ msgstr \"\"\n#~ \"Copia el siguiente fragmento de código en <https://play.rust-lang.org/> e \"\n#~ \"implementa las funciones:\"\n\n#~ msgid \"[Shared References](./references/shared.md) (10 minutes)\"\n#~ msgstr \"[Referencias compartidas](./references/shared.md) (10 minutos)\"\n\n#~ msgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\n#~ msgstr \"[Referencias exclusivas](./references/included.md) (10 minutos)\"\n\n#~ msgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\n#~ msgstr \"[Ejercicio: geometría](./references/exercise.md) (30 minutos)\"\n\n#~ msgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Estructuras con nombre](./user-undefined-types/named-structs.md) (10 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Estructuras de tuplas](./user-definition-types/tuple-structs.md) (10 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\n#~ msgstr \"[Enums](./user-undefined-types/enums.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Variables Static y Const](./user-definition-types/static-and-const.md) \"\n#~ \"(5 minutos)\"\n\n#~ msgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\n#~ msgstr \"[Alias de tipo](./user-definition-types/aliases.md) (2 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: Eventos de ascensor](./user-definition-types/exercise.md) (15 \"\n#~ \"minutos)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"Las variables estáticas y constantes son dos formas diferentes de crear \"\n#~ \"valores de ámbito global que no se pueden mover ni reasignar durante la \"\n#~ \"ejecución del programa. \"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"Tabla de Propiedades:\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"Tiene una dirección en la memoria\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"No (insertado)\"\n\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"Vive durante toda la ejecución del programa\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"Puede ser mutable\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"Sí (inseguro)\"\n\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"Evaluado en tiempo de compilación\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"Sí (inicializado en tiempo de compilación)\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"Insertado dondequiera que se utilice\"\n\n#~ msgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](./welcome-day-2.md) (3 minutos)\"\n\n#~ msgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[Coincidencia de patrones](./pattern-matching.md) (50 minutos)\"\n\n#~ msgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[Métodos y traits](./methods-and-traits.md) (55 minutos)\"\n\n#~ msgid \"[Generics](./generics.md) (45 minutes)\"\n#~ msgstr \"[Genéricos](./generics.md) (45 minutos)\"\n\n#~ msgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Desestructuración](./pattern-matching/destructuring.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Control de Flujo con `let`](./pattern-matching/let-control-flow.md) (10 \"\n#~ \"minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: evaluación de expresiones](./pattern-matching/exercise.md) \"\n#~ \"(30 minutos)\"\n\n#~ msgid \"`match` expressions\"\n#~ msgstr \"Expresiones `match`\"\n\n#~ msgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\n#~ msgstr \"[Métodos](./methods-and-traits/methods.md) (10 minutos)\"\n\n#~ msgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\n#~ msgstr \"[Traits](./methods-and-traits/traits.md) (10 minutos)\"\n\n#~ msgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\n#~ msgstr \"[Derivación](./methods-and-traits/deriving.md) (5 minutos)\"\n\n#~ msgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Objetos de Trait](./methods-and-traits/trait-objects.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: registrador genérico](./methods-and-traits/exercise.md) (20 \"\n#~ \"minutos)\"\n\n#~ msgid \"\"\n#~ \"Trait objects allow for values of different types, for instance in a \"\n#~ \"collection:\"\n#~ msgstr \"\"\n#~ \"Los objetos de _traits_ permiten valores de diferentes tipos, por \"\n#~ \"ejemplo, en una colección:\"\n\n#~ msgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\n#~ msgstr \"[Funciones genéricas](./generics/generic-functions.md) (5 minutos)\"\n\n#~ msgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\n#~ msgstr \"[Tipos de datos genéricos](./generics/generic-data.md) (15 minutos)\"\n\n#~ msgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\n#~ msgstr \"[Límites de traits](./generics/trait-bounds.md) (10 minutos)\"\n\n#~ msgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\n#~ msgstr \"[impl Trait](./generics/impl-trait.md) (5 minutos)\"\n\n#~ msgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\n#~ msgstr \"[Ejercicio: min genérico](./generics/exercise.md) (10 minutos)\"\n\n#~ msgid \"// fn set_x(&mut self, x: T)\\n\"\n#~ msgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#~ msgid \"/// Return true if self is less than other.\\n\"\n#~ msgstr \"/// Devuelve true si el valor de self es menor que el de other.\\n\"\n\n#~ msgid \"\\\"Shapiro\\\"\"\n#~ msgstr \"\\\"Shapiro\\\"\"\n\n#~ msgid \"\\\"Baumann\\\"\"\n#~ msgstr \"\\\"Baumann\\\"\"\n\n#~ msgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tipos de bibliotecas estándar](./std-types.md) (1 hora y 10 minutos)\"\n\n#~ msgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Traits de biblioteca estándar](./std-traits.md) (1 hora y 40 minutos)\"\n\n#~ msgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\n#~ msgstr \"[Biblioteca estándar](./std-types/std.md) (3 minutos)\"\n\n#~ msgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\n#~ msgstr \"[Documentación](./std-types/docs.md) (5 minutos)\"\n\n#~ msgid \"[Option](./std-types/option.md) (10 minutes)\"\n#~ msgstr \"[Option (Opción)](./std-types/option.md) (10 minutos)\"\n\n#~ msgid \"[Result](./std-types/result.md) (10 minutes)\"\n#~ msgstr \"[Result (Resultado)](./std-types/result.md) (10 minutos)\"\n\n#~ msgid \"[String](./std-types/string.md) (10 minutes)\"\n#~ msgstr \"[String (Cadena de texto)](./std-types/string.md) (10 minutos)\"\n\n#~ msgid \"[Vec](./std-types/vec.md) (10 minutes)\"\n#~ msgstr \"[Vec (Vectores)](./std-types/vec.md) (10 minutos)\"\n\n#~ msgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\n#~ msgstr \"[HashMap](./std-types/hashmap.md) (10 minutos)\"\n\n#~ msgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\n#~ msgstr \"[Ejercicio: contador](./std-types/exercise.md) (10 minutos)\"\n\n#~ msgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\n#~ msgstr \"[Comparaciones](./std-traits/comparisons.md) (10 minutos)\"\n\n#~ msgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\n#~ msgstr \"[Operadores](./std-traits/operators.md) (10 minutos)\"\n\n#~ msgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\n#~ msgstr \"[From e Into](./std-traits/from-and-into.md) (10 minutos)\"\n\n#~ msgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\n#~ msgstr \"[Conversiones](./std-traits/casting.md) (5 minutos)\"\n\n#~ msgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\n#~ msgstr \"[Read y Write](./std-traits/read-and-write.md) (10 minutos)\"\n\n#~ msgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Default, sintaxis de actualización de structs](./std-traits/default.md) \"\n#~ \"(5 minutos)\"\n\n#~ msgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\n#~ msgstr \"[Cierres](./std-traits/closures.md) (20 minutos)\"\n\n#~ msgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\n#~ msgstr \"[Ejercicio: ROT13](./std-traits/exercise.md) (30 minutos)\"\n\n#~ msgid \"This segment should take about 1 hour and 40 minutes\"\n#~ msgstr \"Esta sección tiene una duración aproximada de 1 hora y 40 minutos.\"\n\n#~ msgid \"\\\"there\\\"\"\n#~ msgstr \"\\\"pasa?\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](./welcome-day-3.md) (3 minutos)\"\n\n#~ msgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Gestión de la memoria](./Memory-management.md) (1 hora y 10 minutos)\"\n\n#, fuzzy\n#~ msgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[Punteros inteligentes](./smart-pointers.md) (55 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Revisión de la memoria del programa](./Memory-management/review.md) (5 \"\n#~ \"minutos)\"\n\n#~ msgid \"\"\n#~ \"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Estrategias para la gestión de la memoria](./Memory-manageme t/\"\n#~ \"approaches.md) (10 minutos)\"\n\n#~ msgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\n#~ msgstr \"[Ownership](./Memory-management/ownership.md) (5 minutos)\"\n\n#~ msgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\n#~ msgstr \"[Semántica de movimiento](./Memory-management/move.md) (10 minutos)\"\n\n#~ msgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\n#~ msgstr \"[Clonar](./Memory-management/clone.md) (2 minutos)\"\n\n#~ msgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\n#~ msgstr \"[Copiar tipos](./Memory-management/copy-types.md) (5 minutos)\"\n\n#~ msgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\n#~ msgstr \"[Drop](./Memory-management/drop.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: tipo de compilador](./Memory-management/exercise.md) (20 \"\n#~ \"minutos)\"\n\n#~ msgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n#~ msgstr \"\\\"ptr = {ptr:#x}, longitud = {len}, capacidad = {capacity}\\\"\"\n\n#~ msgid \"[Box\"\n#~ msgstr \"[Box\"\n\n#~ msgid \"](./smart-pointers/box.md) (10 minutes)\"\n#~ msgstr \"](./smart-pointers/box.md) (10 minutos)\"\n\n#~ msgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\n#~ msgstr \"[Rc](./smart-pointers/rc.md) (5 minutos)\"\n\n#~ msgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: árbol binario](./smart-pointers/exercise.md) (30 minutos)\"\n\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. \"\n#~ \"This allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"`Box` no puede estar vacío, por lo que el puntero siempre es válido y no \"\n#~ \"`null`. Esto permite que el compilador optimice el diseño de la memoria:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    list                    :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                          Heap\\n\"\n#~ \".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - - -.\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \":    \"\n#~ \"list                 :     :                                               :\\n\"\n#~ \":   +------+----+----+    :     :    +------+----+----+    +------+----\"\n#~ \"+----+   :\\n\"\n#~ \":   | Cons | 1  | o--+----+-----+--->| Cons | 2  | o--+--->| Nil  | // \"\n#~ \"| // |   :\\n\"\n#~ \":   +------+----+----+    :     :    +------+----+----+    +------+----\"\n#~ \"+----+   :\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"[Borrowing](./borrowing.md) (1 hour)\"\n#~ msgstr \"[Préstamos](./borrowing.md) (1 hora)\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Slices y tiempos de vida](./slices-and-lifetimes.md) (1 hora y 10 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\n#~ msgstr \"[Tomar prestado un valor](./borrowing/shared.md) (10 minutos)\"\n\n#~ msgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\n#~ msgstr \"[Comprobación de préstamos](./borrowing/borrowck.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Mutabilidad interior](./borrowing/interior-mutability.md) (10 minutos)\"\n\n#~ msgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: estadísticas de salud](./borrowing/exercise.md) (30 minutos)\"\n\n#~ msgid \"The Rust compiler can do return value optimization (RVO).\"\n#~ msgstr \"\"\n#~ \"El compilador de Rust puede hacer la optimización del valor devuelto \"\n#~ \"(RVO).\"\n\n#~ msgid \"\"\n#~ \"In C++, copy elision has to be defined in the language specification \"\n#~ \"because constructors can have side effects. In Rust, this is not an issue \"\n#~ \"at all. If RVO did not happen, Rust will always perform a simple and \"\n#~ \"efficient `memcpy` copy.\"\n#~ msgstr \"\"\n#~ \"En C++, la elisión de copia tiene que definirse en la especificación del \"\n#~ \"lenguaje, ya que los constructores pueden tener efectos secundarios. En \"\n#~ \"Rust, esto no supone ningún problema. Si no hay RVO, Rust siempre \"\n#~ \"realizará una copia `memcpy` simple y eficiente.\"\n\n#~ msgid \"\\\"graph: {root:#?}\\\"\"\n#~ msgstr \"\\\"gráfico: {root:#?}\\\"\"\n\n#~ msgid \"\\\"graph sum: {}\\\"\"\n#~ msgstr \"\\\"suma de gráfico: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"`Rc` only allows shared (read-only) access to its contents, since its \"\n#~ \"purpose is to allow (and count) many references. But we want to modify \"\n#~ \"the value, so we need interior mutability.\"\n#~ msgstr \"\"\n#~ \"`Rc` solo permite el acceso compartido (de solo lectura) a su contenido, \"\n#~ \"ya que su objetivo es permitir (y contar) muchas referencias. Ya que \"\n#~ \"nuestro objetivo modificar el valor, necesitamos utilizar la mutabilidad \"\n#~ \"interna.\"\n\n#~ msgid \"\"\n#~ \"Demonstrate that reference loops can be created by adding `root` to \"\n#~ \"`subtree.children`.\"\n#~ msgstr \"\"\n#~ \"Demuestra que se pueden crear bucles de referencia añadiendo `root` a \"\n#~ \"`subtree.children`.\"\n\n#~ msgid \"\"\n#~ \"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n#~ \"`self.value` and calls the same method on its children. This will panic \"\n#~ \"in the presence of the reference loop, with `thread 'main' panicked at \"\n#~ \"'already borrowed: BorrowMutError'`.\"\n#~ msgstr \"\"\n#~ \"Para demostrar un pánico en tiempo de ejecución, añade un `fn inc(&mut \"\n#~ \"self)` que incremente `self.value` y llame al mismo método en sus hijos. \"\n#~ \"Esto entrará en pánico en presencia del bucle de referencia, con `thread \"\n#~ \"'main' panicked at 'already borrowed: BorrowMutError'`.\"\n\n#~ msgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\n#~ msgstr \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutos)\"\n\n#~ msgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Referencias de cadenas](./slices-and-lifetimes/str.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) \"\n#~ \"(10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Anotaciones de tiempos de vida](./slices-and-lifetimes/lifetime-\"\n#~ \"annotations.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Omisión de tiempos de vida](./slices-and-lifetimes/lifetime-elision.md) \"\n#~ \"(5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Tiempos de vida de structs](./slices-and-lifetimes/struct-lifetimes.md) \"\n#~ \"(5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: análisis de Protobuf](./slices-and-lifetimes/exercise.md) (30 \"\n#~ \"minutos)\"\n\n#~ msgid \"\"\n#~ \"We can now understand the two string types in Rust: `&str` is almost like \"\n#~ \"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\n#~ msgstr \"\"\n#~ \"Ahora podemos entender los dos tipos de cadenas de Rust: `&str` es muy \"\n#~ \"parecida a `&[char]`, pero almacena sus datos en una codificación de \"\n#~ \"longitud variable (UTF-8).\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Terminología de Rust:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str` es una referencia inmutable a un slice de una cadena.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` es un búfer de cadena mutable.\"\n\n#~ msgid \"\\\"Unexpected wire-type)\\\"\"\n#~ msgstr \"\\\"Tipo de wire inesperado)\\\"\"\n\n#~ msgid \"\\\"Invalid string (not UTF-8)\\\"\"\n#~ msgstr \"\\\"Cadena no válida (no es UTF‐8)\\\"\"\n\n#~ msgid \"b\\\"hello\\\"\"\n#~ msgstr \"n\\\"hola\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Bienvenida](./welcome-day-4.md) (3 minutos)\"\n\n#~ msgid \"[Iterators](./iterators.md) (45 minutes)\"\n#~ msgstr \"[Iteradores](./iterators.md) (45 minutos)\"\n\n#~ msgid \"[Modules](./modules.md) (40 minutes)\"\n#~ msgstr \"[Módulos](./modules.md) (40 minutos)\"\n\n#~ msgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\n#~ msgstr \"[Iterator](./iterators/iterator.md) (5 minutos)\"\n\n#~ msgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\n#~ msgstr \"[IntoIterator](./iterators/intoiterator.md) (5 minutos)\"\n\n#~ msgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\n#~ msgstr \"[FromIterator](./iterators/fromiterator.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: encadenamiento de métodos del iterador](./iterators/exercise.\"\n#~ \"md) (30 minutos)\"\n\n#~ msgid \"[Modules](./modules/modules.md) (5 minutes)\"\n#~ msgstr \"[Módulos](./modules/modules.md) (5 minutos)\"\n\n#~ msgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Jerarquía del sistema de archivos](./modules/filesystem.md) (5 minutos)\"\n\n#~ msgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\n#~ msgstr \"[Visibilidad](./modules/visible.md) (5 minutos)\"\n\n#~ msgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\n#~ msgstr \"[use, super, self](./modules/paths.md) (10 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: módulos para una biblioteca GUI](./modules/exercise.md) (15 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\n#~ msgstr \"[Módulos de pruebas](./testing/unit-tests.md) (5 minutos)\"\n\n#~ msgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\n#~ msgstr \"[Otros tipos de pruebas](./testing/other.md) (10 minutos)\"\n\n#~ msgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\n#~ msgstr \"[Crates útiles](./testing/useful-crates.md) (3 minutos)\"\n\n#~ msgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\n#~ msgstr \"[GoogleTest](./testing/googletest.md) (5 minutos)\"\n\n#~ msgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\n#~ msgstr \"[Simulación](./testing/mocking.md) (5 minutos)\"\n\n#~ msgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\n#~ msgstr \"[Lints de compilador y Clippy](./testing/lints.md) (5 minutos)\"\n\n#~ msgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\n#~ msgstr \"[Ejercicio: Algoritmo de Luhn](./testing/exercise.md) (30 minutos)\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust solo incluye asistencia básica para las pruebas de escritura.\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"\"\n#~ \"A continuación, se indican algunos crates adicionales que recomendamos \"\n#~ \"para escribir pruebas:\"\n\n#~ msgid \"\"\n#~ \"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n#~ \"library in the tradition of GoogleTest for C++.\"\n#~ msgstr \"\"\n#~ \"[googletest](https://docs.rs/googletest): biblioteca completa de aserción \"\n#~ \"de pruebas en la tradición de GoogleTest para C++.\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"\"\n#~ \"[proptest](https://docs.rs/proptest): pruebas basadas en propiedades para \"\n#~ \"Rust.\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"\"\n#~ \"[rstest](https://docs.rs/rstest): asistencia para _fixtures_ y pruebas \"\n#~ \"parametrizadas.\"\n\n#~ msgid \"This just scratches the surface, there are many builtin matchers.\"\n#~ msgstr \"Esto es solo el comienzo, existen muchos matchers integrados.\"\n\n#~ msgid \"GoogleTest is available for use in AOSP.\"\n#~ msgstr \"GoogleTest se puede utilizar en AOSP.\"\n\n#~ msgid \"[Error Handling](./error-handling.md) (45 minutes)\"\n#~ msgstr \"[Gestión de errores](./error-handling.md) (45 minutos)\"\n\n#~ msgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Rust inseguro](./unsafe-rust.md) (1 hora y 5 minutos)\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 2 hours\"\n#~ msgstr \"\"\n#~ \"Contando con los descansos de 10 minutos, la duración prevista de la \"\n#~ \"sesión es de unas 2 horas.\"\n\n#~ msgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\n#~ msgstr \"[Pánicos](./error-handling/panics.md) (3 minutos)\"\n\n#~ msgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\n#~ msgstr \"[Operador Try](./error-handling/try.md) (5 minutos)\"\n\n#~ msgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\n#~ msgstr \"[Conversiones Try](./error-handling/try-conversions.md) (5 minutos)\"\n\n#~ msgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\n#~ msgstr \"[Trait Error](./error-handling/error.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[thiserror y anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: reescribir con Result](./error-handling/exercise.md) (20 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\n#~ msgstr \"[Inseguro](./unsafe-rust/unsafe.md) (5 minutos)\"\n\n#~ msgid \"\"\n#~ \"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Desreferenciar punteros sin formato](./unsafe-rust/dereferencing.md) (10 \"\n#~ \"minutos)\"\n\n#~ msgid \"\"\n#~ \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Variables estáticas mutables](./unsafe-rust/mutable-static.md) (5 \"\n#~ \"minutos)\"\n\n#~ msgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\n#~ msgstr \"[Uniones](./unsafe-rust/unions.md) (5 minutos)\"\n\n#~ msgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Funciones inseguras](./unsafe-rust/unsafe-functions.md) (5 minutos)\"\n\n#~ msgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\n#~ msgstr \"[Traits inseguros](./unsafe-rust/unsafe-traits.md) (5 minutos)\"\n\n#~ msgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ejercicio: envoltorio de FFI](./unsafe-rust/exercise.md) (30 minutos)\"\n\n#, fuzzy\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"No hay comportamientos indefinidos en _runtime_:\"\n\n#~ msgid \"// Safe because ...\\n\"\n#~ msgstr \"// Es seguro porque ...\\n\"\n\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"Añade `vendor_available: true` si un binario de la partición del \"\n#~ \"proveedor utiliza tu archivo de AIDL.\"\n\n#~ msgid \"/// Connect to the BirthdayService.\\n\"\n#~ msgstr \"/// Conecta con el servicio de felicitación de cumpleaños.\\n\"\n\n#~ msgid \"\"\n#~ \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\n#~ msgstr \"\"\n#~ \"// SEGURIDAD: es seguro llamar a `print_card` con un puntero `card` \"\n#~ \"válido.\\n\"\n\n#~ msgid \"ADC\"\n#~ msgstr \"ADC\"\n\n#~ msgid \"I2C, SPI, UART, CAN\"\n#~ msgstr \"I2C, SPI, UART, CAN\"\n\n#~ msgid \"RNG\"\n#~ msgstr \"RNG\"\n\n#~ msgid \"Timers\"\n#~ msgstr \"Temporizadores\"\n\n#~ msgid \"Watchdogs\"\n#~ msgstr \"Watchdogs\"\n\n#~ msgid \"\"\n#~ \"There is work in progress on an `async` version of `embedded-hal`, but it \"\n#~ \"isn't stable yet.\"\n#~ msgstr \"\"\n#~ \"Se está trabajando en una versión `async` de `embedded-hal`, pero aún no \"\n#~ \"es estable.\"\n\n#~ msgid \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Configura el controlador I2C y la unidad de medición inercial.\\n\"\n#~ \"    // TAREA\\n\"\n\n#~ msgid \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Lee datos de la brújula y regístralos en el puerto serie.\\n\"\n#~ \"        // TAREA\\n\"\n\n#~ msgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\n#~ msgstr \"\"\n#~ \"// TAREA: crear una instancia del controlador RTC e imprimir la hora \"\n#~ \"actual.\\n\"\n\n#~ msgid \"// TODO: Wait for 3 seconds.\\n\"\n#~ msgstr \"// TAREA: esperar 3 segundos.\\n\"\n\n#~ msgid \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ msgstr \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Con licencia Apache, versión 2.0 (la \\\"Licencia\\\");\\n\"\n#~ \"// Este archivo solo se puede utilizar según lo estipulado en la \"\n#~ \"Licencia.\\n\"\n#~ \"// Puedes obtener una copia de la Licencia en\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Salvo que lo exija la legislación aplicable o se haya acordado por \"\n#~ \"escrito, el software\\n\"\n#~ \"// distribuido bajo la Licencia se distribuye \\\"TAL CUAL\\\",\\n\"\n#~ \"// SIN GARANTÍAS NI CONDICIONES DE NINGÚN TIPO, ya sean explícitas o \"\n#~ \"implícitas.\\n\"\n#~ \"// Consulta la Licencia para saber los permisos y las limitaciones \"\n#~ \"aplicables a cada idioma\\n\"\n#~ \"//.\\n\"\n\n#~ msgid \"\\\"sync_exception_current\\\"\"\n#~ msgstr \"\\\"sync_exception_current\\\"\"\n\n#~ msgid \"\\\"irq_current\\\"\"\n#~ msgstr \"\\\"irq_current\\\"\"\n\n#~ msgid \"\\\"No pending interrupt\\\"\"\n#~ msgstr \"\\\"No hay interrupciones pendientes\\\"\"\n\n#~ msgid \"\\\"IRQ {intid:?}\\\"\"\n#~ msgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#~ msgid \"\\\"fiq_current\\\"\"\n#~ msgstr \"\\\"fiq_current\\\"\"\n\n#~ msgid \"\\\"serr_current\\\"\"\n#~ msgstr \"\\\"serr_current\\\"\"\n\n#~ msgid \"\\\"sync_lower\\\"\"\n#~ msgstr \"\\\"sync_lower\\\"\"\n\n#~ msgid \"\\\"irq_lower\\\"\"\n#~ msgstr \"\\\"irq_lower\\\"\"\n\n#~ msgid \"\\\"fiq_lower\\\"\"\n#~ msgstr \"\\\"fiq_lower\\\"\"\n\n#~ msgid \"\\\"serr_lower\\\"\"\n#~ msgstr \"\\\"serr_lower\\\"\"\n\n#~ msgid \"// ANCHOR: main\\n\"\n#~ msgstr \"// ANCHOR: main\\n\"\n\n#~ msgid \"// ANCHOR: Flags\\n\"\n#~ msgstr \"// ANCHOR: Flags\\n\"\n\n#~ msgid \"// ANCHOR_END: Flags\\n\"\n#~ msgstr \"// ANCHOR_END: Flags\\n\"\n\n#~ msgid \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n#~ msgstr \"\"\n#~ \"/// Marcas del registro de estado de recepción de UART/Registro de \"\n#~ \"borrado de errores.\\n\"\n\n#~ msgid \"/// Framing error.\\n\"\n#~ msgstr \"/// Error de encuadre.\\n\"\n\n#~ msgid \"/// Parity error.\\n\"\n#~ msgstr \"/// Error de paridad.\\n\"\n\n#~ msgid \"/// Break error.\\n\"\n#~ msgstr \"/// Error de break.\\n\"\n\n#~ msgid \"/// Overrun error.\\n\"\n#~ msgstr \"/// Error de desbordamiento.\\n\"\n\n#~ msgid \"// ANCHOR: Registers\\n\"\n#~ msgstr \"// ANCHOR: Registers\\n\"\n\n#~ msgid \"// ANCHOR_END: Registers\\n\"\n#~ msgstr \"// ANCHOR_END: Registers\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Controlador para un UART PL011.\\n\"\n\n#~ msgid \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n#~ msgstr \"\"\n#~ \"/// Crea una instancia nueva del controlador UART para un dispositivo \"\n#~ \"PL011 en la\\n\"\n#~ \"    /// dirección base proporcionada.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Seguridad\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// El objeto la dirección base debe apuntar a los registros de \"\n#~ \"control MMIO de un dispositivo\\n\"\n#~ \"    /// PL011, que debe asignarse al espacio de direcciones del proceso\\n\"\n#~ \"    /// como memoria del dispositivo y no tener ningún otro alias.\\n\"\n\n#~ msgid \"// ANCHOR_END: Uart\\n\"\n#~ msgstr \"// ANCHOR_END: Uart\\n\"\n\n#~ msgid \"\\\"linux\\\"\"\n#~ msgstr \"\\\"linux\\\"\"\n\n#~ msgid \"\\\"CROSS_COMPILE\\\"\"\n#~ msgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"\\\"aarch64-linux-gnu\\\"\"\n\n#~ msgid \"\\\"aarch64-none-elf\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#~ msgid \"\\\"entry.S\\\"\"\n#~ msgstr \"\\\"entry.S\\\"\"\n\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"\\\"exceptions.S\\\"\"\n\n#~ msgid \"\\\"idmap.S\\\"\"\n#~ msgstr \"\\\"idmap.S\\\"\"\n\n#~ msgid \"\\\"empty\\\"\"\n#~ msgstr \"\\\"empty\\\"\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic entry point for an image. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Es un punto de entrada genérico para una imagen. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* Access flag. */\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* Not global. */\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n#~ \"shareable\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* level 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* Access flag. */\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* Not global. */\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n#~ \"shareable\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* level 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"# Copyright 2023 Google LLC\"\n#~ msgstr \"# Copyright 2023 Google LLC\"\n\n#~ msgid \"$(shell uname -s)\"\n#~ msgstr \"$(shell uname -s)\"\n\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-linux-gnu\"\n\n#~ msgid \"stdio -display none -kernel $< -s\"\n#~ msgstr \"stdio -display none -kernel $< -s\"\n\n#~ msgid \"cargo clean\"\n#~ msgstr \"cargo clean\"\n\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 --- the main \"\n#~ \"thread is not waiting.\"\n#~ msgstr \"\"\n#~ \"Observa que el hilo se detiene antes de llegar a 10; el hilo principal no \"\n#~ \"está esperando.\"\n\n#~ msgid \"\"\n#~ \"Rust uses the type system to enforce synchronization of shared data. This \"\n#~ \"is primarily done via two types:\"\n#~ msgstr \"\"\n#~ \"Rust utiliza el sistema de tipos para implementar la sincronización de \"\n#~ \"los datos compartidos. Esto se hace principalmente a través de dos tipos:\"\n\n#~ msgid \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T`: handles sharing between threads and takes care to \"\n#~ \"deallocate `T` when the last reference is dropped,\"\n#~ msgstr \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), recuento \"\n#~ \"atómico de referencias `T`: gestiona el uso compartido entre hilos y se \"\n#~ \"encarga de desasignar `T` cuando se elimina la última referencia.\"\n\n#~ msgid \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"ensures mutually exclusive access to the `T` value.\"\n#~ msgstr \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"asegura el acceso mutuamente excluyente al valor `T`.\"\n\n#~ msgid \"Let us practice our new concurrency skills with\"\n#~ msgstr \"Vamos a practicar nuestras nuevas habilidades de concurrencia con\"\n\n#~ msgid \"Dining philosophers: a classic problem in concurrency.\"\n#~ msgstr \"La cena de los filósofos: un problema clásico de concurrencia.\"\n\n#~ msgid \"\"\n#~ \"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n#~ \"download dependencies and then check links in parallel.\"\n#~ msgstr \"\"\n#~ \"El comprobador de enlaces multihilo: un proyecto más grande donde \"\n#~ \"utilizarás Cargo para descargar dependencias y luego comprobar los \"\n#~ \"enlaces en paralelo.\"\n\n#~ msgid \"\"\n#~ \"For this, you will need an HTTP client such as [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency \"\n#~ \"with:\"\n#~ msgstr \"\"\n#~ \"Para ello, necesitarás un cliente HTTP como [`reqwest`](https://docs.rs/\"\n#~ \"reqwest/). Crea un proyecto de Cargo y aplica `reqwest` como una \"\n#~ \"dependencia con:\"\n\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://\"\n#~ \"docs.rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"También necesitarás una forma de encontrar enlaces. Podemos usar \"\n#~ \"[`scraper`](https://docs.rs/scraper/) para eso:\"\n\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"Por último, necesitaremos algún método para gestionar los errores. Para \"\n#~ \"ello, usaremos [`thiserror`](https://docs.rs/thiserror/):\"\n\n#~ msgid \"Concurrency Morning Exercise\"\n#~ msgstr \"Concurrencia: Ejercicios de la Mañana\"\n\n#~ msgid \"([back to exercise](dining-philosophers.md))\"\n#~ msgstr \"([volver al ejercicio](dining-philosophers.md))\"\n\n#~ msgid \"([back to exercise](link-checker.md))\"\n#~ msgstr \"([volver al ejercicio](link-checker.md))\"\n\n#~ msgid \"Async Rust\"\n#~ msgstr \"Async en Rust\"\n\n#~ msgid \"Futures Control Flow\"\n#~ msgstr \"Flujo de Control de Futuros\"\n\n#~ msgid \"\"\n#~ \"Futures can be combined together to produce concurrent compute flow \"\n#~ \"graphs. We have already seen tasks, that function as independent threads \"\n#~ \"of execution.\"\n#~ msgstr \"\"\n#~ \"Los futuros pueden combinarse para producir gráficos de flujo de \"\n#~ \"computación simultáneos. Ya hemos visto tareas que funcionan como hilos \"\n#~ \"de ejecución independientes.\"\n\n#~ msgid \"[Join](control-flow/join.md)\"\n#~ msgstr \"[Join](control-flow/join.md)\"\n\n#~ msgid \"[Select](control-flow/select.md)\"\n#~ msgstr \"[Select](control-flow/select.md)\"\n\n#~ msgid \"Pitfalls of async/await\"\n#~ msgstr \"Inconvenientes de async/await\"\n\n#~ msgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\n#~ msgstr \"[Bloqueo del ejecutor](pitfalls/blocking-executor.md)\"\n\n#~ msgid \"[Pin](pitfalls/pin.md)\"\n#~ msgstr \"[Pin](pitfalls/pin.md)\"\n\n#~ msgid \"[Async Traits](pitfalls/async-traits.md)\"\n#~ msgstr \"[Traits asíncronos](pitfalls/async-traits.md)\"\n\n#~ msgid \"[Cancellation](pitfalls/cancellation.md)\"\n#~ msgstr \"[Cancelación](pitfalls/cancellation.md)\"\n\n#~ msgid \"\"\n#~ \"Async methods in traits are not yet supported in the stable channel ([An \"\n#~ \"experimental feature exists in nightly and should be stabilized in the \"\n#~ \"mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-\"\n#~ \"trait-nightly.html))\"\n#~ msgstr \"\"\n#~ \"Los métodos asíncronos en traits todavía no son compatibles con el canal \"\n#~ \"estable. ([Existe una característica experimental en nightly que debería \"\n#~ \"estabilizarse a medio plazo.](https://blog.rust-lang.org/inside-\"\n#~ \"rust/2022/11/17/async-fn-in-trait-nightly.html))\"\n\n#~ msgid \"\"\n#~ \"To practice your Async Rust skills, we have again two exercises for you:\"\n#~ msgstr \"\"\n#~ \"Para practicar tus habilidades con async de Rust, tenemos otros dos \"\n#~ \"nuevos ejercicios:\"\n\n#~ msgid \"\"\n#~ \"Dining philosophers: we already saw this problem in the morning. This \"\n#~ \"time you are going to implement it with Async Rust.\"\n#~ msgstr \"\"\n#~ \"La cena de los filósofos: ya hemos visto este problema por la mañana. \"\n#~ \"Esta vez vas a implementarlo con async de Rust.\"\n\n#~ msgid \"\"\n#~ \"A Broadcast Chat Application: this is a larger project that allows you \"\n#~ \"experiment with more advanced Async Rust features.\"\n#~ msgstr \"\"\n#~ \"Una aplicación de chat de difusión: se trata de un proyecto más grande \"\n#~ \"que te permite experimentar con características más avanzadas de async de \"\n#~ \"Rust.\"\n\n#~ msgid \"Concurrency Afternoon Exercise\"\n#~ msgstr \"Concurrencia: Ejercicios de la Tarde\"\n\n#~ msgid \"([back to exercise](dining-philosophers-async.md))\"\n#~ msgstr \"([volver al ejercicio](dining-philosophers-async.md))\"\n\n#~ msgid \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n#~ msgstr \"\"\n#~ \"// Añade un retraso antes de elegir el segundo tenedor para permitir la \"\n#~ \"ejecución\\n\"\n#~ \"        // para transferir a otra tarea\\n\"\n\n#~ msgid \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n#~ msgstr \"\"\n#~ \"// Para evitar un interbloqueo, tenemos que romper la simetría\\n\"\n#~ \"            // en algún lugar. De este modo, se cambiarán los tenedores \"\n#~ \"sin desinicializar\\n\"\n#~ \"            // ninguno de ellos.\\n\"\n\n#~ msgid \"([back to exercise](chat-app.md))\"\n#~ msgstr \"([volver al ejercicio](chat-app.md))\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Pequeño ejemplo\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"¿Por qué Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Garantías en Tiempo de Compilación\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Garantías en Runtime (Tiempo de Ejecución)\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Funcionalidades Modernas\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Sintaxis básica\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String o str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Sobrecarga\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Arrays y Loops for\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"expresiones for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"expresiones while\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break y continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"Expresiones loop\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Payloads Variantes\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Tamaños de Enum\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"expresiones if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"expresiones while let\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"expresiones match\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Desestructurando Arrays\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Guardas de Match\"\n\n#, fuzzy\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Correspondencia de Patrones\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Memoria de la Pila (_Stack_)\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Manejo Manual de Memoria\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Manejo de Memoria basado en Scope (ámbitos)\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Recolección de memoria residual\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Manejo de la Memoria en Rust\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Cadenas movidas en Rust\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"Double free en código C++ moderno\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Movimientos en llamadas de función\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Copiar y clonar\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Préstamos compartidos y únicos\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Sintaxis abreviada de campos\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"Almacenar libros\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option y Result\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Tipos de datos recursivos\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iteradores y Ownership (Propiedad)\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Cadenas e Iteradores\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Métodos Genéricos\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Monomorfización\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Métodos por Default\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Traits Importantes\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Operadores: Add, Mul, ….\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"Una Biblioteca GUI sencilla\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Puntos y Polígonos\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Catching Stack Unwinding\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Manejo de Errores Estructurado\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Propagación de Errores con ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Conversión de Tipos de Errores\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Derivación de Enums de Error\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Añadir Contexto a los Errores\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"probe-rs, cargo-embed\"\n#~ msgstr \"probe-rs, cargo-embed\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"girar\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Día 1: mañana\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Día 1: tarde\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Día 2: mañana\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Día 2: tarde\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Día 3: mañana\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Día 3: tarde\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Rust Bare Metal: mañana\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Concurrencia: mañana\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Concurrencia: tarde\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"\"\n#~ \"Día 1: Rust Básico, sintaxis, control de flujo, creación y consumo de \"\n#~ \"valores.\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"Día 2: Gestión de memoria, _ownership_ (propiedad), tipos de datos \"\n#~ \"compuestos y la biblioteca estándar.\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Día 3: Genéricos, _traits_, gestión de errores, pruebas y _unsafe_ \"\n#~ \"(inseguro) Rust.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Recomendamos usar [VS Code](https://code.visualstudio.com/) para editar \"\n#~ \"el código (aunque cualquier editor compatible con LSP funciona con [rust-\"\n#~ \"analyzer](https://rust-analyzer.github.io/)).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"A algunos compañeros también les gusta usar la familia [JetBrains]\"\n#~ \"(https://www.jetbrains.com/clion/) de IDEs, que hacen sus propios \"\n#~ \"análisis, pero también tienen inconvenientes. Si lo prefieres, puedes \"\n#~ \"instalar el [Rust Plugin](https://www.jetbrains.com/rust/). Ten en cuenta \"\n#~ \"que, a partir de enero del 2023, la depuración solo funciona en la \"\n#~ \"versión CLion del paquete de JetBrains IDEA.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hola Mundo!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/ejercicio`\\n\"\n#~ \"Modifícame!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Control de flujo: `if`, `if let`, `while`, `while let`, `break`, y \"\n#~ \"`continue`.\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"La idea del primer día es mostrar _lo suficiente_ de Rustcomo para poder \"\n#~ \"hablar del famoso _borrow checker_. La forma en que Rust gestiona la \"\n#~ \"memoria es una característica importante y debemos mostrarla a los \"\n#~ \"estudiantes desde el principio.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Si estás impartiendo el curso en un aula, este es un buen lugar para \"\n#~ \"repasar el calendario. Te recomendamos que dividas el día en dos partes \"\n#~ \"(siguiendo las diapositivas):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Mañana: 9:00 to 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Tarde: de 13:00 a 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Por supuesto, puedes ajustar las horas según lo necesites. No olvides \"\n#~ \"incluir pausas, recomendamos hacer un descanso cada hora.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hola 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"A continuación, se muestra un pequeño programa de ejemplo de Rust:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Punto de entrada del programa\\n\"\n#~ \"    let mut x: i32 = 6;  // Variable mutable vinculante\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro para printing, como printf\\n\"\n#~ \"    while x != 1 {       // Sin paréntesis alrededor de las expresiones\\n\"\n#~ \"        if x % 2 == 0 {  // Operaciones matemáticas como en otros \"\n#~ \"lenguajes\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"El código implementa la conjetura de Collatz: se cree que el bucle \"\n#~ \"terminará siempre, pero aún no se ha demostrado. Edita el código y prueba \"\n#~ \"con diferentes entradas.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Explica que todas las variables están tipadas estáticamente. Prueba a \"\n#~ \"quitar `i32` para activar la inferencia de tipos. Prueba con `i8` y \"\n#~ \"provoca un desbordamiento de enteros en _runtime_.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Cambia `let mut x` por `let x` y discute el error del compilador.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Muestra cómo `print!` da un error de compilación si los argumentos no \"\n#~ \"coinciden con la cadena de formato.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Muestra cómo se debe usar `{}` como marcador de posición para poder \"\n#~ \"imprimir una expresión más compleja que una sola variable.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Muestra a los alumnos la biblioteca estándar y cómo buscar `std::fmt`, \"\n#~ \"que tiene las reglas del mini-lenguaje de formato. Es importante que los \"\n#~ \"alumnos se familiaricen con la búsqueda en la biblioteca estándar.\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"En un shell, `rustup doc std::fmt` abrirá un navegador en la \"\n#~ \"documentación local de std::fmt.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Seguridad de la memoria en tiempo de compilación.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Ausencia de comportamientos indefinidos en _runtime_.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Características de lenguajes modernos.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Gestión estática de la memoria en tiempo de compilación:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"No hay pérdidas de memoria (_casi siempre_, consulta las notas).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"Es posible producir pérdidas de memoria en (_safe_) Rust. Estos son \"\n#~ \"algunos ejemplos:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Puedes usar [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) para perder un puntero. Esto podría usarse para obtener \"\n#~ \"variables estáticas iniciadas y medidas en _runtime_.\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Puedes usar [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) para que el compilador \\\"olvide\\\" un valor (lo que significa \"\n#~ \"que el destructor nunca se ejecuta).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"También puedes crear por accidente una [referencia circular](https://doc.\"\n#~ \"rust-lang.org/book/ch15-06-reference-cycles.html) con `Rc` o `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"De hecho, algunos consideran que poblar de forma infinita una colección \"\n#~ \"es una fuga de memoria y Rust no protege de ellas.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"En este curso, \\\"sin pérdidas de memoria\\\" debe entenderse como\\n\"\n#~ \" \\\"casi ninguna pérdida de memoria _accidental_\\\".\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"El overflow en Integer es definido vía un _flag_ en tiempo de \"\n#~ \"compilación. Las opciones son alertas panic (un crash controlado del \"\n#~ \"programa) o una semántica de _wrap-around_. Por defecto, obtienes el \"\n#~ \"alerta en modo depuración (`cargo build`) y _wrap-around_ en el modo \"\n#~ \"release (`cargo build —\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"La comprobación de límites no se puede deshabilitar con una bandera de \"\n#~ \"compilador. Tampoco se puede inhabilitar directamente con la palabra \"\n#~ \"clave `unsafe`. Sin embargo, `unsafe` te permite llamar a funciones como \"\n#~ \"`slice::get_unchecked`, que no realiza comprobaciones de límites.\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"Rust se ha creado a partir de toda la experiencia obtenida en las últimas \"\n#~ \"décadas.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Características del Lenguaje\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Herramientas\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Las abstracciones sin coste, similares a las de C++, significan que no \"\n#~ \"tienes que 'pagar' por construcciones de programación de alto nivel con \"\n#~ \"memoria o CPU. Por ejemplo, escribir un bucle utilizando `for` debería \"\n#~ \"dar como resultado prácticamente las mismas instrucciones de bajo nivel \"\n#~ \"que con la construcción `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Merece la pena mencionar que los enums de Rust son tipos de datos \"\n#~ \"algebraicos, también denominados 'tipos suma', que permiten al sistema de \"\n#~ \"tipos expresar cosas como `Option<T>` y `Result<T, E>`.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Recuerda a los alumnos que lean los errores, ya que muchos \"\n#~ \"desarrolladores se han acostumbrado a ignorar los largos resultados del \"\n#~ \"compilador. El compilador de Rust es mucho más comunicativo que otros. A \"\n#~ \"menudo, te proporcionará sugerencias _prácticas_, que puedes copiar y \"\n#~ \"pegar en tu código.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"La biblioteca estándar de Rust es pequeña en comparación con la de \"\n#~ \"lenguajes como Java, Python o Go. Rust no incluye elementos que se \"\n#~ \"podrían considerar estándar o esenciales:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"\"\n#~ \"un generador de números aleatorios, pero consulta [rand](https://docs.rs/\"\n#~ \"rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"compatibilidad con SSL o TLS, pero consulta [rusttls](https://docs.rs/\"\n#~ \"rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"Compatibilidad con JSON, pero consulta [serde_json](https://docs.rs/\"\n#~ \"serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"La razón es que la funcionalidad de la biblioteca estándar no puede \"\n#~ \"desaparecer, por lo que tiene que ser muy estable. En los ejemplos \"\n#~ \"anteriores, la comunidad de Rust todavía está trabajando para encontrar \"\n#~ \"la mejor solución, y puede que no exista una única \\\"mejor solución\\\" \"\n#~ \"para algunas de estas cuestiones.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust incluye un gestor de paquetes integrado con la forma de Cargo, lo \"\n#~ \"que hace que resulte sencillo descargar y compilar crates de terceros. \"\n#~ \"Como consecuencia, la biblioteca estándar puede ser más pequeña.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Encontrar buenos crates de terceros puede ser un problema. Sitios como \"\n#~ \"<https://lib.rs/> te ayudan a comparar métricas de salud de crates para \"\n#~ \"encontrar uno bueno y fiable.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) es una implementación \"\n#~ \"de LSP bien respaldada y utilizada en los principales IDE y editores de \"\n#~ \"texto.\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Al igual que C++, Rust tiene referencias:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Debemos desreferenciar `ref_x` al asignarle un valor, de forma similar a \"\n#~ \"los punteros de C y C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"Las referencias que se declaran como `mut` se pueden vincular a distintos \"\n#~ \"valores durante su tiempo de vida.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Se dice que una referencia \\\"toma prestado\\\" el valor al que hace \"\n#~ \"referencia.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust hace un seguimiento del tiempo de vida de todas las referencias para \"\n#~ \"asegurarse de que duran lo suficiente.\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` o `str`\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Puedes tomar prestados slices `&str` desde `String` mediante `&` y, si \"\n#~ \"quieres, puedes seleccionar rangos.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Una versión de Rust de la famosa pregunta de la entrevista de [FizzBuzz]\"\n#~ \"(https://es.wikipedia.org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"En `main` hacemos referencia a una función escrita más abajo. No se \"\n#~ \"necesitan declaraciones de redirección ni encabezados. \"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"La expresión de rango del bucle `for` en `print_fizzbuzz_to()` contiene \"\n#~ \"`=n`, lo que hace que incluya el límite superior.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Todos los elementos del lenguaje de Rust se pueden documentar con la \"\n#~ \"sintaxis especial `///`.\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Este curso no incluye diapositivas sobre rustdoc para ahorrar espacio, \"\n#~ \"pero deben aparecer en el código real.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"Los comentarios internos de los documentos se tratarán más adelante (en \"\n#~ \"la página de módulos), no es necesario tratarlos aquí.\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"Los comentarios de rustdoc pueden contener fragmentos de código que \"\n#~ \"podemos ejecutar y probar utilizando `cargo test`. Hablaremos de esto en \"\n#~ \"la [sección de pruebas](../testing/doc-tests.html).\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Los métodos son funciones asociadas a un tipo. El argumento `self` de un \"\n#~ \"método es una instancia del tipo al que está asociada:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Abordaremos en mayor profundidad los métodos en el ejercicio de hoy y en \"\n#~ \"la clase de mañana.\"\n\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"\"\n#~ \"Añade un método estático denominado `Rectangle::new` y llámalo desde \"\n#~ \"`main`:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"Aunque _técnicamente_ Rust no tiene constructores personalizados, los \"\n#~ \"métodos estáticos se utilizan habitualmente para inicializar estructuras, \"\n#~ \"pero no es obligatorio. El constructor real, `Rectangle { width, height }\"\n#~ \"`, podría llamarse directamente. Consulta el [Rustnomicon](https://doc.\"\n#~ \"rust-lang.org/nomicon/constructors.html).\"\n\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Añade un constructor `Rectangle::square(width: u32)` para mostrar que \"\n#~ \"esos métodos estáticos puede utilizar parámetros arbitrarios.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Sobrecarga de funciones\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"No se admite la sobrecarga:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Siempre se utiliza un número fijo de parámetros.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"No se admiten valores predeterminados:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Todos los sitios de llamada tienen el mismo número de argumentos.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"A veces, se utilizan macros como alternativa.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Sin embargo, los parámetros de función pueden ser genéricos:\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"Cuando se utilizan genéricos, el `Into<T>` de la biblioteca estándar \"\n#~ \"puede proporcionar una especie de polimorfismo limitado en los tipos de \"\n#~ \"argumentos. Veremos más información al respecto en una sección posterior.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Día 1: ejercicios de la mañana\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"En estos ejercicios, estudiaremos dos partes de Rust:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Conversiones implícitas entre tipos.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Arrays y bucles `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"Ten en cuenta lo siguiente a la hora de resolver los ejercicios:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Si es posible, utiliza una instalación local de Rust. De esta forma, \"\n#~ \"podrás autocompletar datos en tu editor. Consulta la página sobre \\\\[cómo \"\n#~ \"usar Cargo\\\\] para obtener más información sobre cómo instalar Rust.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"También puedes usar el playground de Rust.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Los fragmentos de código no son editables a propósito: los que están \"\n#~ \"insertados pierden su estado si se sale de la página.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust no aplicará automáticamente _conversiones implícitas_ entre tipos \"\n#~ \"([a diferencia de C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Puedes ver un ejemplo de esto en el siguiente \"\n#~ \"programa:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Todos los tipos de enteros de Rust implementan los traits [`From<T>`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.From.html) y [`Into<T>`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) para permitirnos \"\n#~ \"realizar conversiones entre ellos. El trait `From<T>` tiene un único \"\n#~ \"método `from()` y, del mismo modo, el trait `Into<T>` tiene un único \"\n#~ \"método `into()`. Un tipo expresa que se puede convertir en otro tipo \"\n#~ \"implementando estos traits.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"La biblioteca estándar implementa `From<i8> for i16`, lo que significa \"\n#~ \"que podemos convertir una variable `x` del tipo `i8` a `i16` llamando a  \"\n#~ \"`i16::from(x)`. O, más sencillo, con `x.into()`, ya que la implementación \"\n#~ \"de `From<i8> for i16` crea automáticamente una implementación de \"\n#~ \"`Into<i16> for i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"Lo mismo se aplica a tus implementaciones `From` para tus propios tipos, \"\n#~ \"por lo que basta con implementar `From` para obtener la respectiva \"\n#~ \"implementación `Into` de forma automática.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"Ejecuta el programa anterior y observa el error del compilador.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Actualiza el código anterior para usar `into()` y realizar la conversión.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Cambia los tipos de `x` e `y` a otros elementos (por ejemplo, `f32`, \"\n#~ \"`bool`, `i128`) para ver qué tipos puedes convertir. Prueba a convertir \"\n#~ \"tipos pequeños en tipos grandes y viceversa. Consulta la [documentación \"\n#~ \"de la biblioteca estándar](https://doc.rust-lang.org/std/convert/trait.\"\n#~ \"From.html) para comprobar si se ha implementado `From<T>` en los pares \"\n#~ \"que elijas.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Arrays y bucles`for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Hemos visto que un array se puede declarar de la siguiente manera:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Puedes imprimir dicho array solicitando su representación de depuración \"\n#~ \"con `{:?}`:\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust te permite iterar sobre elementos como arrays y rangos usando la \"\n#~ \"palabra clave `for`:\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Pregunta Extra\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"¿Se podrían usar slices `&[i32]` en lugar de matrices de 3 × 3 \"\n#~ \"predefinidas en el código para tus argumentos y tipos de resultados \"\n#~ \"devueltos? Por ejemplo, `&[&[i32]]` para un slice de slices de dos \"\n#~ \"dimensiones. ¿Por qué? ¿Por qué no?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Consulta el [crate `ndarray`](https://docs.rs/ndarray/) para obtener una \"\n#~ \"implementación con calidad de producción.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"La solución y la respuesta a la pregunta extra están disponibles en la \"\n#~ \"sección [soluciones](solutions-morning.md#arrays-and-for-loops).\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"El uso de la referencia `&array` dentro de `for n in &array` es una vista \"\n#~ \"previa sutil de los problemas de propiedad que se tratarán más tarde por \"\n#~ \"la tarde.\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"Sin el `&`...\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"El bucle habría sido uno que consume el array. Este es un cambio \"\n#~ \"[introducido en la edición de 2021](https://doc.rust-lang.org/edition-\"\n#~ \"guide/rust-2021/IntoIterator-for-arrays.html).\"\n\n#~ msgid \"\"\n#~ \"An implicit array copy would have occurred.  Since `i32` is a copy type, \"\n#~ \"then `[i32; 3]` is also a copy type.\"\n#~ msgstr \"\"\n#~ \"Se habría producido una copia implícita del array. Dado que `i32` es un \"\n#~ \"tipo de copia, `[i32; 3]` también es un tipo de copia.\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Como hemos visto, `if` es una expresión de Rust. Se utiliza para realizar \"\n#~ \"una evaluación condicional de uno de los dos bloques, aunque estos pueden \"\n#~ \"tener un valor que acaba convirtiéndose en el valor de la expresión `if`. \"\n#~ \"Otras expresiones del flujo de control funcionan de forma similar en Rust.\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"Se utiliza la misma regla para las funciones: el valor del cuerpo de la \"\n#~ \"función es el valor devuelto:\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"El objetivo de esta diapositiva es mostrar que los bloques tienen un tipo \"\n#~ \"y un valor en Rust. \"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"El [bucle `for`](https://doc.rust-lang.org/std/keyword.for.html) está \"\n#~ \"estrechamente relacionado con el [bucle `while let`](while-let-\"\n#~ \"expressions.md). Llamará automáticamente a `into_iter()` en la expresión \"\n#~ \"y después iterará sobre ella:\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Aquí puedes usar `break` y `continue` como de costumbre.\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"La iteración de índices no es una sintaxis especial en Rust para ese caso.\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` es un rango que implementa un `Iterator` trait.\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` es un método que devuelve otro `Iterator` que salta cada otro \"\n#~ \"elemento.\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Modifica los elementos del vector y explica los errores del compilador. \"\n#~ \"Cambia el vector `v` para que sea mutable y el bucle `for x in v.\"\n#~ \"iter_mut()`.\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"Expresiones `loop`\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"Por último, la [palabra clave `loop`](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) crea un bucle infinito.\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"Para detener el bucle, debes usar `break` o `return`:\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"\"\n#~ \"Interrumpe `loop` con un valor (por ejemplo, `break 8`) e imprímelo.\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Debido a la inferencia de tipos, `i32` es opcional. A medida que avance \"\n#~ \"el curso, iremos mostrando cada vez menos los tipos.\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"El siguiente fragmento de código le indica al compilador que copie en un \"\n#~ \"determinado contenedor genérico sin que el código especifique \"\n#~ \"explícitamente el tipo contenido utilizando `_` como marcador de posición:\"\n\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) se basa en [`FromIterator`](https://doc.rust-lang.\"\n#~ \"org/std/iter/trait.FromIterator.html), que implementa [`HashSet`](https://\"\n#~ \"doc.rust-lang.org/std/collections/struct.HashSet.html#impl-\"\n#~ \"FromIterator%3CT%3E-for-HashSet%3CT,+S%3E).\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Variables Estáticas y Constantes\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"El siguiente fragmento de código demuestra por qué el compilador no puede \"\n#~ \"reutilizar ubicaciones de memoria cuando sombrea una variable inmutable \"\n#~ \"en un ámbito, incluso si el tipo no cambia.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    // Implementation based on https://xkcd.com/221/\\n\"\n#~ \"    4  // Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum CoinFlip {\\n\"\n#~ \"    Heads,\\n\"\n#~ \"    Tails,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn flip_coin() -> CoinFlip {\\n\"\n#~ \"    let random_number = generate_random_number();\\n\"\n#~ \"    if random_number % 2 == 0 {\\n\"\n#~ \"        return CoinFlip::Heads;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        return CoinFlip::Tails;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"You got: {:?}\\\", flip_coin());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    // Implementation based on https://xkcd.com/221/\\n\"\n#~ \"    4  // Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum CoinFlip {\\n\"\n#~ \"    Heads,\\n\"\n#~ \"    Tails,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn flip_coin() -> CoinFlip {\\n\"\n#~ \"    let random_number = generate_random_number();\\n\"\n#~ \"    if random_number % 2 == 0 {\\n\"\n#~ \"        return CoinFlip::Heads;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        return CoinFlip::Tails;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"You got: {:?}\\\", flip_coin());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"En esta página se ofrece el tipo de enumeración `CoinFlip` (tirar moneda) \"\n#~ \"con dos variantes: `Heads` (cara) y `Tails` (cruz). Puede que veas el \"\n#~ \"espacio de nombres cuando utilices variantes.\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"\"\n#~ \"En ambos casos, las funciones asociadas se definen en un bloque `impl`.\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Puedes definir enumeraciones más completas en las que las variantes \"\n#~ \"contienen datos. Después, puedes usar la instrucción `match` para extraer \"\n#~ \"los datos de cada variante:\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"La expresión se coteja con los patrones de arriba abajo. No hay ningún \"\n#~ \"sistema de respaldo, como en C o C++.\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"La expresión de coincidencia tiene un valor. El valor es la última \"\n#~ \"expresión en el brazo de coincidencia que se ha ejecutado.\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"Empezando por la parte superior, buscaremos el patrón que coincide con el \"\n#~ \"valor y, a continuación, ejecutaremos el fragmento de código que sigue a \"\n#~ \"la flecha. Cuando encontremos una coincidencia, pararemos. \"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` inspecciona un campo discriminante oculto en `enum`.\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"\"\n#~ \"Se puede obtener el discriminante llamando a `std::mem::discriminant()`.\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"Esto resulta útil si, por ejemplo, se implementa `PartialEq` en \"\n#~ \"estructuras en las que la comparación de valores de campos no afecta a la \"\n#~ \"igualdad.\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` no es exactamente lo mismo que `WebEvent::\"\n#~ \"Click(Click)` con un nivel superior `struct Click { ... }`. La versión \"\n#~ \"insertada no puede implementar traits, por ejemplo.\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Las enumeraciones de Rust son densamente empaquetadas, ya que tienen en \"\n#~ \"cuenta las restricciones debidas a la alineación:\"\n\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"\"\n#~ \"Rust utiliza un campo (discriminante) de forma interna para hacer un \"\n#~ \"seguimiento de la variante de enumeración.\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"Prueba otros tipos, como\"\n\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"`dbg_size!(bool)`: tamaño de 1 byte, alineación de 1 byte,\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<bool>)`: tamaño de 1 byte, alineación de 1 byte \"\n#~ \"(optimización de nichos, consulta más abajo),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(&i32)`: tamaño de 8 bytes, alineación de 8 bytes (en una \"\n#~ \"máquina de 64 bits),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<&i32>)`: tamaño de 8 bytes, alineación de 8 bytes \"\n#~ \"(optimización del puntero nulo, consulta más abajo).\"\n\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"\"\n#~ \"Optimización de nichos: Rust combina los patrones de bits no utilizados \"\n#~ \"para el discriminante de enumeración.\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"Ejemplo más complejo si quieres hablar de lo que pasa cuando encadenamos \"\n#~ \"más de 256 `Option`.\"\n\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"A partir de la versión 1.65, una construcción [let-else](https://doc.rust-\"\n#~ \"lang.org/rust-by-example/flow_control/let_else.html) similar permite \"\n#~ \"realizar una tarea de desestructuración o, si falla, ejecutar un bloque \"\n#~ \"necesario para anular el flujo de control normal (con `panic`/`return`/\"\n#~ \"`break`/`continue`)::\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"La \\\\[palabra clave `match`\\\\][`match` keyword](https://doc.rust-lang.org/\"\n#~ \"reference/expressions/match-expr.html) se usa para comparar un valor con \"\n#~ \"uno o varios patrones. En ese sentido, funciona como una serie de \"\n#~ \"expresiones `if let`:\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"Guarda la expresión de coincidencia en una variable e imprímela.\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"Elimina `.as_deref()` y explica el error.\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` devuelve `Option<String>`, pero no podemos \"\n#~ \"encontrar coincidencias con `String`.\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` transforma `Option<T>` en `Option<&T::Target>`. En nuestro \"\n#~ \"caso, esto convierte `Option<String>` en `Option<&str>`.\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"Ahora podemos usar la coincidencia de patrones para encontrar \"\n#~ \"coincidencias con `&str` dentro de `Option`.\"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"`_` es un patrón comodín que coincide con cualquier valor.\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Puede ser útil para mostrar cómo funciona un enlace, por ejemplo, \"\n#~ \"cambiando un carácter comodín por una variable o quitando las comillas \"\n#~ \"alrededor de `q`. \"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Puedes mostrar la coincidencia con una referencia.\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Este puede ser un buen momento para mencionar el concepto de patrones \"\n#~ \"irrefutables, ya que el término puede aparecer en mensajes de error.\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"También puedes desestructurar `structs`:\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"\"\n#~ \"La desestructuración de slices de longitud desconocida también funciona \"\n#~ \"con patrones de longitud fija.\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Al establecer coincidencias, puedes añadir un _guardia_ a un patrón. Se \"\n#~ \"trata de una expresión booleana arbitraria que se ejecutará si el patrón \"\n#~ \"coincide:\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Puedes usar las variables definidas en el patrón en tu expresión if.\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Día 1: Ejercicios de la Tarde\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Veremos todas estas cosas:\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Algoritmo de Luhn\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Un ejercicio sobre coincidencia de patrones.\"\n\n#~ msgid \"\"\n#~ \"Try to solve the problem the \\\"simple\\\" way first, using `for` loops and \"\n#~ \"integers. Then, revisit the solution and try to implement it with \"\n#~ \"iterators.\"\n#~ msgstr \"\"\n#~ \"Intenta resolver el problema de la forma \\\"sencilla\\\" primero, usando \"\n#~ \"bucles `for` e enteros. Luego, vuelve a la solución e intenta \"\n#~ \"implementarla con iteradores.\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Gestión de la memoria: _stack_ (pila) vs _heap_ (montículo), gestión \"\n#~ \"manual de la memoria, gestión de la memoria basada en ámbitos y _garbage \"\n#~ \"collector_ (recolección de memoria residual).\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"_Ownership_ (Propiedad): semántica de movimiento, copiar, clonar, \"\n#~ \"_borrowing_ (préstamos) y _lifetimes_ (tiempos de vida).\"\n\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Estructuras (_Structs_) y métodos.\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"La Biblioteca Estándar (_Standard Library_): `String`, `Option` y \"\n#~ \"`Result`, `Vec`, `HashMap`, `Rc` y `Arc`.\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"Módulos: visibilidad, rutas y jerarquía del sistema de archivos.\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"En primer lugar, veamos cómo funciona la gestión de la memoria.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"_Stack_ (Pila) vs _Heap_ (Montículo)\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Ejemplo de _Stack_ y de _Heap_\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Eres tú quien asigna y desasigna la memoria del _heap_.\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Si no lo haces con cuidado, podrían producirse fallos, errores, \"\n#~ \"vulnerabilidades de seguridad y pérdidas de memoria.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"Ejemplo en C\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"Debes llamar a `free` en cada puntero que asignes con `malloc`:\"\n\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"La memoria se pierde si la función devuelve un resultado antes de tiempo \"\n#~ \"entre `malloc` y `free`: el puntero se pierde y no podemos anular la \"\n#~ \"asignación de la memoria. Peor aún, si se libera el puntero dos veces o \"\n#~ \"si se accede a uno liberado, pueden producirse vulnerabilidades de \"\n#~ \"seguridad de las que otros podrían aprovecharse.\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Los constructores y destructores permiten acceder al tiempo de vida de un \"\n#~ \"objeto.\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Al envolver un puntero en un objeto, puedes liberar memoria cuando el \"\n#~ \"objeto se destruya. El compilador asegura que esto ocurra, aunque se \"\n#~ \"genere una excepción.\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"A menudo, significa que la _adquisición de recursos es la inicialización_ \"\n#~ \"(RAII) y te proporciona punteros inteligentes.\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hola \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"El objeto `std::unique_ptr` se reserva en el _stack_ y apunta a la \"\n#~ \"memoria asignada en el _heap_.\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"Al final de `say_hello`, se ejecuta el destructor `std::unique_ptr`.\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"El destructor libera el objeto `Person` al que apunta.\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Los constructores de movimiento especiales se utilizan cuando se pasa el \"\n#~ \"_ownership_ a una función:\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Una alternativa a la gestión manual de la memoria basada en el ámbito es \"\n#~ \"la gestión automática de la memoria:\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"\"\n#~ \"El programador nunca asigna ni desasigna la memoria de forma explícita.\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Un _garbage collector_ (recolector de memoria residual) encuentra la que \"\n#~ \"no se utiliza y la desasigna para el programador.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Ejemplo en Java\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"\"\n#~ \"El objeto `person` no se libera después de que `sayHello` devuelva el \"\n#~ \"siguiente resultado:\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hola \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Gestión de la Memoria en Rust\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"La gestión de la memoria en Rust es una mezcla:\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Segura y correcta como Java, pero sin _garbage collector_.\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"Está basada en el ámbito, como C++, pero el compilador cumple con todas \"\n#~ \"las normas.\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Un usuario de Rust puede elegir la abstracción adecuada para cada \"\n#~ \"situación, algunas ni siquiera tienen coste en _runtime_, como C.\"\n\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Rust lo consigue modelando explícitamente el _ownership_.\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Si en este momento te preguntan cómo, puedes mencionar que en Rust se \"\n#~ \"suele gestionar con tipos de envoltorios RAII, como [Box](https://doc.\"\n#~ \"rust-lang.org/std/boxed/struct.Box.html), [Vec]https://doc.rust-lang.org/\"\n#~ \"std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.\"\n#~ \"html) o [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). Estos \"\n#~ \"encapsulan el _ownership_ y la asignación de memoria a través de diversos \"\n#~ \"medios, evitando así los posibles errores en C.\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"Puede que aquí te pregunten por los destructores, así que debes saber que \"\n#~ \"el trait [Drop](https://doc.rust-lang.org/std/ops/trait.Drop.html) es el \"\n#~ \"equivalente en Rust.\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Se puede ejecutar un destructor para liberar recursos.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hola!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"Siempre hay _exactamente_ un enlace a variable que posee un valor.\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Los datos del _heap_ de `s1` se reutilizan en `s2`.\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"Cuando `s1` sale del ámbito, no ocurre nada (ha sido movida).\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplicate the data in s1.\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplicar datos en s1.\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" _Stack_                          _Heap_\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" _Stack_                          _Heap_\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Si los alumnos preguntan por `derive`, basta con decir que se trata de \"\n#~ \"una forma de generar código en Rust durante el tiempo de compilación. En \"\n#~ \"este caso, se generan las implementaciones predeterminadas de los traits \"\n#~ \"`Copy` y `Clone`.\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Un valor que se toma prestado tiene un _tiempo de vida_:\"\n\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"\"\n#~ \"El tiempo de vida puede ser implícito: `add(p1: &Point, p2: &Point) -> \"\n#~ \"Point`.\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"\"\n#~ \"Tiempo de vida también puede ser explícito: `&'a Point`, `&'document str`.\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Lee `&'a Point` como \\\"un `Point` prestado que es válido al menos durante \"\n#~ \"el tiempo de vida de `a`\\\".\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"\"\n#~ \"El compilador siempre infiere el tiempo de vida: no puedes asignarlos tú.\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Además de tomar prestados sus argumentos, una función puede devolver un \"\n#~ \"valor que se ha tomado prestado:\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` es un parámetro genérico que infiere el compilador.\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"\"\n#~ \"Los tiempos de vida comienzan por `'` y `'a` suele ser un nombre \"\n#~ \"predeterminado habitual.\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"La parte _al menos_ es importante cuando los parámetros están en ámbitos \"\n#~ \"distintos.\"\n\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Mueve la declaración de `p2` y `p3` a un nuevo ámbito (`{ ... }`), lo que \"\n#~ \"dará como resultado el siguiente código:\"\n\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"\"\n#~ \"Ten en cuenta que no se puede compilar, ya que `p3` dura más tiempo que \"\n#~ \"`p2`.\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"Restablece el espacio de trabajo y cambia la firma de la función a `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. No se \"\n#~ \"compilará porque la relación entre los tiempos de vida de `'a` y `'b` no \"\n#~ \"está clara.\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"Otra forma de explicarlo:\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"\"\n#~ \"Una función toma prestadas dos referencias a dos valores y devuelve otra \"\n#~ \"referencia.\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"\"\n#~ \"Esta debe proceder de una de esas dos entradas (o de una variable global).\"\n\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"¿Cuál de ellas es? El compilador debe saberlo para que, en el sitio de la \"\n#~ \"llamada, la referencia devuelta no se use durante más tiempo que una \"\n#~ \"variable de la que procede la referencia.\"\n\n#~ msgid \"\"\n#~ \"Methods are defined in an `impl` block, which we will see in following \"\n#~ \"slides.\"\n#~ msgstr \"\"\n#~ \"Los métodos están definidos en un bloque `impl` que veremos en las \"\n#~ \"siguientes diapositivas.\"\n\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"La función `new` se podría escribir utilizando `Self` como tipo, ya que \"\n#~ \"es intercambiable con el nombre de tipo de estructura.\"\n\n#~ msgid \"\"\n#~ \"Implement the `Default` trait for the struct. Define some fields and use \"\n#~ \"the default values for the other fields.\"\n#~ msgstr \"\"\n#~ \"Implementa el trait `Default` en la estructura. Define algunos campos y \"\n#~ \"usa los valores predeterminados para el resto de los campos.\"\n\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"Los métodos se definen en el bloque `impl`.\"\n\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"Utiliza la sintaxis de actualización de estructuras para definir una \"\n#~ \"estructura nueva con `peter`. Ten en cuenta que, después, ya no podrás \"\n#~ \"acceder a la variable `peter`.\"\n\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"\"\n#~ \"Utiliza `{:#?}` al imprimir estructuras para solicitar la representación \"\n#~ \"de `Debug`.\"\n\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"\"\n#~ \"A continuación, se describe la diferencia entre receptores de métodos.\"\n\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"Considera recalcar los conceptos \\\"compartido e inmutable\\\" y \\\"único y \"\n#~ \"mutable\\\". Estas restricciones siempre vienen juntas en Rust debido a las \"\n#~ \"reglas del _borrow checker_, y `self` no es una excepción. No es posible \"\n#~ \"referenciar una estructura desde varias ubicaciones y llamar a un método \"\n#~ \"mutable (`&mut self`) en ella.\"\n\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"\"\n#~ \"Cada uno de estos cuatro métodos utilizan un receptor de método distinto.\"\n\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Puedes indicar cómo eso cambia lo que la función puede hacer con los \"\n#~ \"valores de las variables y si se puede utilizar de nuevo en `main` y, en \"\n#~ \"caso afirmativo, cómo.\"\n\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Puedes mostrar el error que aparece al intentar llamar a `finish` dos \"\n#~ \"veces.\"\n\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Ten en cuenta que, aunque los receptores de los métodos sean diferentes, \"\n#~ \"las funciones no estáticas se llaman del mismo modo en el cuerpo \"\n#~ \"principal. Rust habilita la referenciación y desreferenciación \"\n#~ \"automáticas al llamar a los métodos. Además, añade automáticamente los \"\n#~ \"caracteres `&`, `*` y `muts` para que el objeto coincida con la firma del \"\n#~ \"método.\"\n\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Podrías mencionar que `print_laps` está usando un vector sobre el que se \"\n#~ \"itera. Describiremos los vectores con más detalle por la tarde. \"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Día 2: Ejercicios de la Mañana\"\n\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Veremos la implementación de métodos en dos contextos:\"\n\n#~ msgid \"Storing books and querying the collection\"\n#~ msgstr \"Almacenar libros y consultar la colección\"\n\n#~ msgid \"Keeping track of health statistics for patients\"\n#~ msgstr \"Hacer seguimiento de las estadísticas de salud de pacientes\"\n\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Mañana conoceremos mucho mejor _structs_ y el tipo `Vec<T>`. Por ahora, \"\n#~ \"solo debes conocer parte de su API:\"\n\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Crea un modelo de la colección de libros de una biblioteca con esta \"\n#~ \"opción. Copia el código que aparece abajo en <https://play.rust-lang.org/\"\n#~ \"> y actualiza los tipos para que compile:\"\n\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Soluciones](solutions-afternoon.md#designing-a-library)\"\n\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"\"\n#~ \"Entre los tipos de vocabulario más habituales se incluyen los siguientes:\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"Tipos [`Option` y `Result`](std/option-result.md): se utilizan para \"\n#~ \"valores opcionales y [gestión de errores](error-handling.md).\"\n\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"\"\n#~ \"[`String`](std/string.md): el tipo de cadena predeterminado que se usa \"\n#~ \"para los datos propios.\"\n\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md): un vector estándar extensible.\"\n\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"\"\n#~ \"[`HashMap`](std/hashmap.md): un mapa hash con un algoritmo hash \"\n#~ \"configurable.\"\n\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"\"\n#~ \"[`Box`](std/box.md): un puntero propio para datos ubicados en el _heap_.\"\n\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"\"\n#~ \"[`Rc`](std/rc.md): un puntero compartido de conteo de referencias para \"\n#~ \"datos asignados a _heap_.\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` y `Result`\"\n\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Los tipos representan datos opcionales:\"\n\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"`Option<&T>` no usa espacio adicional en comparación con `&T`.\"\n\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` devuelve `Result<usize, usize>`.\"\n\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Si se encuentra, `Result::Ok` contiene el índice donde se halla el \"\n#~ \"elemento.\"\n\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"De lo contrario, `Result::Err` contendrá el índice donde se debe insertar \"\n#~ \"dicho elemento.\"\n\n#~ msgid \"\"\n#~ \"Show iterating over a vector and mutating the value: `for e in &mut v \"\n#~ \"{ *e += 50; }`\"\n#~ msgstr \"\"\n#~ \"Muestra la iteración sobre un vector y la mutación del valor: `for e in \"\n#~ \"&mut v { *e += 50; }`.\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                     Heap\\n\"\n#~ \".- - - - - - -.     .- - - - - - -.\\n\"\n#~ \":             :     :             :\\n\"\n#~ \":    five     :     :             :\\n\"\n#~ \":   +-----+   :     :   +-----+   :\\n\"\n#~ \":   | o---|---+-----+-->|  5  |   :\\n\"\n#~ \":   +-----+   :     :   +-----+   :\\n\"\n#~ \":             :     :             :\\n\"\n#~ \":             :     :             :\\n\"\n#~ \"`- - - - - - -'     `- - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" _Stack_            _Heap_\\n\"\n#~ \".- - - - - - -.     .- - - - - - -.\\n\"\n#~ \":             :     :             :\\n\"\n#~ \":    five     :     :             :\\n\"\n#~ \":   +-----+   :     :   +-----+   :\\n\"\n#~ \":   | o---|---+-----+-->|  5  |   :\\n\"\n#~ \":   +-----+   :     :   +-----+   :\\n\"\n#~ \":             :     :             :\\n\"\n#~ \":             :     :             :\\n\"\n#~ \"`- - - - - - -'     `- - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"En el ejemplo anterior, incluso puedes omitir `*` en la instrucción \"\n#~ \"`println!` gracias a `Deref`. \"\n\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Box con Estructuras de Datos Recursivos\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` y `RefCell`\"\n\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) y \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implementan lo que Rust llama _mutabilidad interna_: mutación de valores \"\n#~ \"en un contexto inmutable.\"\n\n#~ msgid \"\"\n#~ \"`Cell` is typically used for simple types, as it requires copying or \"\n#~ \"moving values. More complex interior types typically use `RefCell`, which \"\n#~ \"tracks shared and exclusive references at runtime and panics if they are \"\n#~ \"misused.\"\n#~ msgstr \"\"\n#~ \"Normalmente, `Cell` se utiliza para tipos simples, ya que requiere copiar \"\n#~ \"o mover valores. Los tipos internos más complejos normalmente utilizan \"\n#~ \"`RefCell`, que realiza un seguimiento de las referencias compartidas y \"\n#~ \"exclusivas en tiempo de ejecución y entra en pánico si se utilizan de \"\n#~ \"forma incorrecta.\"\n\n#~ msgid \"\"\n#~ \"If we were using `Cell` instead of `RefCell` in this example, we would \"\n#~ \"have to move the `Node` out of the `Rc` to push children, then move it \"\n#~ \"back in. This is safe because there's always one, un-referenced value in \"\n#~ \"the cell, but it's not ergonomic.\"\n#~ msgstr \"\"\n#~ \"Si estuviéramos utilizando `Cell` en lugar de `RefCell` en este ejemplo, \"\n#~ \"tendríamos que mover el `Node` fuera del `Rc` para insertar hijos y luego \"\n#~ \"volver a moverlo. Esto es seguro porque siempre hay un valor sin \"\n#~ \"referenciar en la celda, pero no es ergonómico.\"\n\n#~ msgid \"\"\n#~ \"To do anything with a Node, you must call a `RefCell` method, usually \"\n#~ \"`borrow` or `borrow_mut`.\"\n#~ msgstr \"\"\n#~ \"Para hacer cualquier cosa con un Node, debes llamar a un método de \"\n#~ \"`RefCell`, normalmente `borrow` o `borrow_mut`.\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Día 2: Ejercicios de la Tarde\"\n\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Los ejercicios de esta tarde se centrarán en las cadenas y los iteradores.\"\n\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"El modelo de _ownership_ de Rust afecta a muchas APIs. Un ejemplo serían \"\n#~ \"los traits [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n#~ \"html) y [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.\"\n#~ \"IntoIterator.html).\"\n\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"Los _traits_ son como las interfaces: describen el comportamiento \"\n#~ \"(métodos) de un tipo. El trait `Iterator` indica que se puede llamar a \"\n#~ \"`next` hasta que se obtenga `None`:\"\n\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Utiliza este trait de la siguiente forma:\"\n\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"¿Qué tipo devuelve el iterador? Prueba tu respuesta aquí:\"\n\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"¿Por qué se usa este tipo?\"\n\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Al igual que antes, ¿qué tipo devuelve el iterador?\"\n\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Ahora que conocemos `Iterator` e `IntoIterator`, podemos crear bucles \"\n#~ \"`for`. Llaman a `into_iter()` sobre una expresión e iteran sobre el \"\n#~ \"iterador resultante:\"\n\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Experimenta con el código anterior y consulta la documentación sobre \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) y sobre [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) para comprobar las respuestas.\"\n\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"En este ejercicio se va a implementar un componente de enrutamiento de un \"\n#~ \"servidor web. El servidor está configurado con un número de _prefijos de \"\n#~ \"ruta_ que se comparan con las _rutas de solicitud_. Los prefijos de ruta \"\n#~ \"pueden contener un carácter comodín que coincida con un segmento \"\n#~ \"completo. Consulta las pruebas unitarias más abajo.\"\n\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"\"\n#~ \"_Traits_: derivación de _traits_, métodos predeterminados y _traits_ \"\n#~ \"importantes de la _standard library_ (biblioteca estándar).\"\n\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"\"\n#~ \"_Generics_ (Genéricos): tipos de datos genéricos, métodos genéricos, \"\n#~ \"monomorfización y objetos de _traits_.\"\n\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"\"\n#~ \"Pruebas: pruebas unitarias, pruebas de documentación y pruebas de \"\n#~ \"integración.\"\n\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"\"\n#~ \"Rust inseguro: punteros sin formato, variables estáticas, funciones no \"\n#~ \"seguras y funciones externas.\"\n\n#~ msgid \"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\"\n#~ msgstr \"\"\n#~ \"Prueba a declarar una nueva variable `let p = Point { x: 5, y: 10.0 };`.\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"\"\n#~ \"Corrige el código para permitir puntos que tengan elementos de distintos \"\n#~ \"tipos.\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Puedes declarar un tipo genérico en tu bloque `impl`:\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"El código genérico se convierte en código no genérico en función de los \"\n#~ \"sitios de llamada:\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"se comporta como si se hubiera escrito\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"\"\n#~ \"Las macros de derivación de Rust funcionan generando automáticamente \"\n#~ \"código que implementa los _traits_ especificados para una estructura de \"\n#~ \"datos.\"\n\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"\"\n#~ \"Puedes dejar que el compilador derive una serie de _traits_ de la \"\n#~ \"siguiente manera:\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"Los _traits_ pueden implementar comportamientos en función de otros \"\n#~ \"métodos de _traits_:\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"Mueve el método `not_equals` a un nuevo trait `NotEquals`.\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"Haz que `Equals` sea un supertrait para `NotEquals`.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"trait NotEquals: Equals {\\n\"\n#~ \"    fn not_equals(&self, other: &Self) -> bool {\\n\"\n#~ \"        !self.equals(other)\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"trait NotEquals: Equals {\\n\"\n#~ \"    fn not_equals(&self, other: &Self) -> bool {\\n\"\n#~ \"        !self.equals(other)\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"\"\n#~ \"Proporciona una implementación general de `NotEquals` para `Equals`.\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"\"\n#~ \"Con la implementación general, ya no necesitas `Equals` como supertrait \"\n#~ \"para `NotEqual`.\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait` permite trabajar con tipos a los que no se les puede asignar \"\n#~ \"un nombre.\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Este ejemplo es fantástico porque usa `impl Display` dos veces. Nos ayuda \"\n#~ \"explicar que no hay nada que obligue a que sea _el mismo_ tipo `impl \"\n#~ \"Display`. Si se utiliza un solo `T: Display`, se aplicaría la restricción \"\n#~ \"de que el tipo de entrada `T` y el tipo de retorno `T` son iguales. No \"\n#~ \"funcionaría para esta función en concreto, ya que el tipo que esperamos \"\n#~ \"como entrada probablemente no sea el que devuelve `format!`. Si \"\n#~ \"quisiéramos hacer lo mismo a través de la sintaxis `: Display`, \"\n#~ \"necesitaríamos dos parámetros genéricos independientes.\"\n\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"A continuación, veremos algunos de los _traits_ más comunes de la \"\n#~ \"biblioteca estándar de Rust:\"\n\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) y \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) se usan en los bucles `for`.\"\n\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) y [`Into`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) se usan para \"\n#~ \"convertir valores.\"\n\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) y [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) se usan para E/S.\"\n\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... se usan para \"\n#~ \"sobrecargar operadores, y\"\n\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Iterator` implementa `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`.\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Add`, `Mul`, etc.\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Día 3: Ejercicios de la Mañana\"\n\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Diseñaremos una biblioteca GUI clásica de _traits_ y objetos _trait_.\"\n\n#~ msgid \"\"\n#~ \"We will also look at enum dispatch with an exercise involving points and \"\n#~ \"polygons.\"\n#~ msgstr \"\"\n#~ \"También veremos la asignación de enumeraciones con un ejercicio que \"\n#~ \"involucra puntos y polígonos.\"\n\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects.\"\n#~ msgstr \"\"\n#~ \"Vamos a diseñar una biblioteca GUI clásica con nuestro recién adquirido \"\n#~ \"conocimiento sobre _traits_ y objetos trait.\"\n\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"Tendremos varios widgets en nuestra biblioteca:\"\n\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Window`: tiene un `title` y contiene otros widgets.\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Button`: tiene una `label` y una función de retrollamada que se invoca \"\n#~ \"cuando se pulsa el botón.\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`: tiene una `label`.\"\n\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"\"\n#~ \"Los widgets implementarán un trait `Widget`, como se indica más abajo.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Copia el siguiente fragmento de código en la página <https://play.rust-\"\n#~ \"lang.org/> y rellena los métodos `draw_into` que faltan para implementar \"\n#~ \"el trait `Widget`:\"\n\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"La salida del programa anterior puede ser algo sencillo como esto:\"\n\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Si quieres trazar texto alineado, puedes usar los operadores de formato \"\n#~ \"[relleno/alineación](https://doc.rust-lang.org/std/fmt/index.\"\n#~ \"html#fillalignment). En concreto, observa cómo puedes rellenar con \"\n#~ \"distintos caracteres (en este caso, `'/'`) y cómo puedes controlar la \"\n#~ \"alineación:\"\n\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Con estos trucos de alineación puedes, por ejemplo, obtener resultados \"\n#~ \"como el siguiente:\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Estructura de polígono\"\n\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Crearemos una estructura `Polygon` que contenga algunos puntos. Copia el \"\n#~ \"siguiente fragmento de código en la página <https://play.rust-lang.org/> \"\n#~ \"y rellena los métodos que faltan para pasar las pruebas:\"\n\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Dado que faltan las firmas de los métodos en las instrucciones del \"\n#~ \"problema, la parte clave del ejercicio consiste en especificarlas \"\n#~ \"correctamente. No tienes que modificar las pruebas.\"\n\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Otras partes interesantes del ejercicio:\"\n\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Deriva un trait `Copy` en algunas estructuras, ya que, en las pruebas, \"\n#~ \"los métodos a veces no toman prestados sus argumentos.\"\n\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Descubrir que hay que implementar el trait `Add` para que se puedan \"\n#~ \"añadir dos objetos mediante \\\"+\\\". Ten en cuenta que no hablaremos de los \"\n#~ \"genéricos hasta el día 3.\"\n\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"La gestión de errores en Rust se realiza mediante un flujo de control \"\n#~ \"explícito:\"\n\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"\"\n#~ \"Las funciones que pueden tener errores lo indican en su tipo de resultado \"\n#~ \"devuelto.\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"No hay excepciones.\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Capturar el Desenrrollado de la _Stack_\"\n\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Ya hemos visto la _enum_ `Result`. Se utiliza normalmente cuando se \"\n#~ \"esperan errores como parte del funcionamiento normal:\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Propagar errores con `?`\"\n\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"El operador try `?` se utiliza para devolver errores al llamador. Te \"\n#~ \"permite convertir\"\n\n#~ msgid \"\"\n#~ \"The return type of the function has to be compatible with the nested \"\n#~ \"functions it calls. For instance, a function returning a `Result<T, Err>` \"\n#~ \"can only apply the `?` operator on a function returning a  `Result<AnyT, \"\n#~ \"Err>`. It cannot apply the `?` operator on a function returning an \"\n#~ \"`Option<AnyT>` or `Result<T, OtherErr>` unless `OtherErr` implements \"\n#~ \"`From<Err>`. Reciprocally, a function returning an `Option<T>` can only \"\n#~ \"apply the `?` operator  on a function returning an `Option<AnyT>`.\"\n#~ msgstr \"\"\n#~ \"El tipo de resultado de la función tiene que ser compatible con las \"\n#~ \"funciones anidadas que llama. Por ejemplo, una función que devuelve un \"\n#~ \"`Result<T, Err>` solo puede aplicar el operador `?` a una función que \"\n#~ \"devuelve un `Result<AnyT, Err>`. No puede aplicar el operador `?` a una \"\n#~ \"función que devuelve un `Option<AnyT>` o `Result<T, OtherErr>` a menos \"\n#~ \"que `OtherErr` implemente `From<Err>`. Recíprocamente, una función que \"\n#~ \"devuelve un `Option<T>` solo puede aplicar el operador `?` a una función \"\n#~ \"que devuelve un `Option<AnyT>`.\"\n\n#~ msgid \"\"\n#~ \"You can convert incompatible types into one another with the different \"\n#~ \"`Option` and `Result` methods  such as `Option::ok_or`, `Result::ok`, \"\n#~ \"`Result::err`.\"\n#~ msgstr \"\"\n#~ \"Puedes convertir tipos incompatibles entre sí con los distintos métodos \"\n#~ \"de `Option` y `Result` como `Option::ok_or`, `Result::ok`, `Result::err`.\"\n\n#~ msgid \"\"\n#~ \"It is good practice for all error types that don't need to be `no_std` to \"\n#~ \"implement `std::error::Error`, which requires `Debug` and `Display`. The \"\n#~ \"`Error` crate for `core` is only available in [nightly](https://github.\"\n#~ \"com/rust-lang/rust/issues/103765), so not fully `no_std` compatible yet.\"\n#~ msgstr \"\"\n#~ \"Se recomienda que todos los tipos de errores que no necesitan ser \"\n#~ \"`no_std` implementen `std::error::Error`, que requiere `Debug` y \"\n#~ \"`Display`. El crate `Error` para `core` solo está disponible en [nightly]\"\n#~ \"(https://github.com/rust-lang/rust/issues/103765), por lo que aún no es \"\n#~ \"totalmente compatible con `no_std`.\"\n\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"Por lo general, es útil que también implementen `Clone` y `Eq`, siempre \"\n#~ \"que sea posible, para facilitar las cosas a las pruebas y a los \"\n#~ \"consumidores de tu biblioteca. En este caso, no podemos hacerlo de forma \"\n#~ \"sencilla porque `io::Error` no los implementa.\"\n\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"La macro de derivación de `thiserror` implementa automáticamente `std::\"\n#~ \"error::Error` y, de forma opcional, `Display` (si se proporcionan los \"\n#~ \"atributos `#[error(...)]`) y `From` (si se añade el atributo `#[from]`). \"\n#~ \"También funciona con estructuras.\"\n\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"No afecta a tu API pública, lo que la hace idónea para las bibliotecas.\"\n\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"El crate [anyhow](https://docs.rs/anyhow/), que se utiliza con \"\n#~ \"frecuencia, puede ayudar a añadir información contextual a los errores y \"\n#~ \"permite tener menos tipos de errores personalizados:\"\n\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Marca pruebas unitarias con `#[test]`:\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"Busca y ejecuta las pruebas unitarias con `cargo test`.\"\n\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Las pruebas unitarias se suelen incluir en un módulo anidado (ejecuta las \"\n#~ \"pruebas en el [_Playground_](https://play.rust-lang.org/)):\"\n\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"Crates útiles para escribir pruebas\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Llamar a código externo\"\n\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Es posible que las funciones de otros lenguajes infrinjan las garantías \"\n#~ \"de Rust. Por lo tanto, no es seguro llamarlas:\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Día 3: ejercicios de la tarde\"\n\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"\"\n#~ \"Vamos a crear un envoltorio seguro para leer el contenido del directorio.\"\n\n#~ msgid \"\"\n#~ \"For this exercise, we suggest using a local dev environment instead of \"\n#~ \"the Playground. This will allow you to run your binary on your own \"\n#~ \"machine.\"\n#~ msgstr \"\"\n#~ \"Para este ejercicio, recomendamos utilizar un entorno de desarrollo \"\n#~ \"local, en lugar del playground. De este modo, podrás ejecutar tu binario \"\n#~ \"en tu propia máquina.\"\n\n#~ msgid \"\"\n#~ \"To get started, follow the [running locally](../../cargo/running-locally.\"\n#~ \"md) instructions.\"\n#~ msgstr \"\"\n#~ \"Para empezar, sigue las instrucciones para [ejecutar a nivel local](../../\"\n#~ \"cargo/running-locally.md).\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Después de realizar el ejercicio, puedes consultar la [solución]\"\n#~ \"(solutions-afternoon.md) proporcionada.\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"libgreetings\\\",\\n\"\n#~ \"        \\\"libtextwrap\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libgreetings\\\",\\n\"\n#~ \"    crate_name: \\\"greetings\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"libgreetings\\\",\\n\"\n#~ \"        \\\"libtextwrap\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libgreetings\\\",\\n\"\n#~ \"    crate_name: \\\"greetings\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"use greetings::greeting;\\n\"\n#~ \"use textwrap::fill;\\n\"\n#~ \"\\n\"\n#~ \"/// Prints a greeting to standard output.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{}\\\", fill(&greeting(\\\"Bob\\\"), 24));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"use greetings::greeting;\\n\"\n#~ \"use textwrap::fill;\\n\"\n#~ \"\\n\"\n#~ \"/// Imprime un saludo en una salida estándar.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{}\\\", fill(&greeting(\\\"Bob\\\"), 24));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Greeting library.\\n\"\n#~ \"\\n\"\n#~ \"/// Greet `name`.\\n\"\n#~ \"pub fn greeting(name: &str) -> String {\\n\"\n#~ \"    format!(\\\"Hello {name}, it is very nice to meet you!\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Greeting library.\\n\"\n#~ \"\\n\"\n#~ \"/// Saludar a `name`.\\n\"\n#~ \"pub fn greeting(name: &str) -> String {\\n\"\n#~ \"    format!(\\\"Hello {name}, it is very nice to meet you!\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"package com.example.birthdayservice;\\n\"\n#~ \"\\n\"\n#~ \"/** Birthday service interface. */\\n\"\n#~ \"interface IBirthdayService {\\n\"\n#~ \"    /** Generate a Happy Birthday message. */\\n\"\n#~ \"    String wishHappyBirthday(String name, int years);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"package com.example.birthdayservice;\\n\"\n#~ \"\\n\"\n#~ \"/** Birthday service interface. */\\n\"\n#~ \"interface IBirthdayService {\\n\"\n#~ \"    /** Generate a Happy Birthday message. */\\n\"\n#~ \"    String wishHappyBirthday(String name, int years);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"aidl_interface {\\n\"\n#~ \"    name: \\\"com.example.birthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"com/example/birthdayservice/*.aidl\\\"],\\n\"\n#~ \"    unstable: true,\\n\"\n#~ \"    backend: {\\n\"\n#~ \"        rust: { // Rust is not enabled by default\\n\"\n#~ \"            enabled: true,\\n\"\n#~ \"        },\\n\"\n#~ \"    },\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"aidl_interface {\\n\"\n#~ \"    name: \\\"com.example.birthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"com/example/birthdayservice/*.aidl\\\"],\\n\"\n#~ \"    unstable: true,\\n\"\n#~ \"    backend: {\\n\"\n#~ \"        rust: { // Rust is not enabled by default\\n\"\n#~ \"            enabled: true,\\n\"\n#~ \"        },\\n\"\n#~ \"    },\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"At this point, the instructor should switch to the [CXX tutorial](https://\"\n#~ \"cxx.rs/tutorial.html).\"\n#~ msgstr \"\"\n#~ \"En este punto, el instructor debería cambiar al [tutorial de CXX](https://\"\n#~ \"cxx.rs/tutorial.html).\"\n\n#~ msgid \"Walk the students through the tutorial step by step.\"\n#~ msgstr \"Guía a los estudiantes a través del tutorial paso a paso.\"\n\n#~ msgid \"\"\n#~ \"Highlight how CXX presents a clean interface without unsafe code in _both \"\n#~ \"languages_.\"\n#~ msgstr \"\"\n#~ \"Destaca cómo CXX presenta una interfaz limpia sin código inseguro en \"\n#~ \"_ambos lenguajes_.\"\n\n#~ msgid \"\"\n#~ \"Explain how a Rust `String` cannot map to a C++ `std::string` (the latter \"\n#~ \"does not uphold the UTF-8 invariant). Show that despite being different \"\n#~ \"types, `rust::String` in C++ can be easily constructed from a C++ `std::\"\n#~ \"string`, making it very ergonomic to use.\"\n#~ msgstr \"\"\n#~ \"Explica que una `String` de Rust no puede asignarse a una `std::string` \"\n#~ \"de C++ (esta última no mantiene la invariante UTF-8). Muestra que, a \"\n#~ \"pesar de ser tipos diferentes, `rust::String` en C++ se puede construir \"\n#~ \"fácilmente a partir de una `std::string` de C++, lo que la hace muy \"\n#~ \"ergonómica de usar.\"\n\n#~ msgid \"\"\n#~ \"Explain that a Rust function returning `Result<T, E>` becomes a function \"\n#~ \"which throws a `E` exception in C++ (and vice versa).\"\n#~ msgstr \"\"\n#~ \"Explica que una función de Rust que devuelve `Result<T, E>` se convierte \"\n#~ \"en una función que lanza una excepción `E` en C++ (y viceversa).\"\n\n#~ msgid \"\"\n#~ \"```bash\\n\"\n#~ \"sudo apt install gcc-aarch64-linux-gnu gdb-multiarch libudev-dev picocom \"\n#~ \"pkg-config qemu-system-arm\\n\"\n#~ \"rustup update\\n\"\n#~ \"rustup target add aarch64-unknown-none thumbv7em-none-eabihf\\n\"\n#~ \"rustup component add llvm-tools-preview\\n\"\n#~ \"cargo install cargo-binutils cargo-embed\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bash\\n\"\n#~ \"sudo apt install gcc-aarch64-linux-gnu gdb-multiarch libudev-dev picocom \"\n#~ \"pkg-config qemu-system-arm\\n\"\n#~ \"rustup update\\n\"\n#~ \"rustup target add aarch64-unknown-none thumbv7em-none-eabihf\\n\"\n#~ \"rustup component add llvm-tools-preview\\n\"\n#~ \"cargo install cargo-binutils cargo-embed\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bash\\n\"\n#~ \"echo 'SUBSYSTEM==\\\"usb\\\", ATTR{idVendor}==\\\"0d28\\\", MODE=\\\"0664\\\", \"\n#~ \"GROUP=\\\"plugdev\\\"' |\\\\\\n\"\n#~ \"  sudo tee /etc/udev/rules.d/50-microbit.rules\\n\"\n#~ \"sudo udevadm control --reload-rules\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bash\\n\"\n#~ \"echo 'SUBSYSTEM==\\\"usb\\\", ATTR{idVendor}==\\\"0d28\\\", MODE=\\\"0664\\\", \"\n#~ \"GROUP=\\\"plugdev\\\"' |\\\\\\n\"\n#~ \"  sudo tee /etc/udev/rules.d/50-microbit.rules\\n\"\n#~ \"sudo udevadm control --reload-rules\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bash\\n\"\n#~ \"xcode-select --install\\n\"\n#~ \"brew install gdb picocom qemu\\n\"\n#~ \"brew install --cask gcc-aarch64-embedded\\n\"\n#~ \"rustup update\\n\"\n#~ \"rustup target add aarch64-unknown-none thumbv7em-none-eabihf\\n\"\n#~ \"rustup component add llvm-tools-preview\\n\"\n#~ \"cargo install cargo-binutils cargo-embed\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bash\\n\"\n#~ \"xcode-select --install\\n\"\n#~ \"brew install gdb picocom qemu\\n\"\n#~ \"brew install --cask gcc-aarch64-embedded\\n\"\n#~ \"rustup update\\n\"\n#~ \"rustup target add aarch64-unknown-none thumbv7em-none-eabihf\\n\"\n#~ \"rustup component add llvm-tools-preview\\n\"\n#~ \"cargo install cargo-binutils cargo-embed\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"#![no_main]\\n\"\n#~ \"#![no_std]\\n\"\n#~ \"\\n\"\n#~ \"use core::panic::PanicInfo;\\n\"\n#~ \"\\n\"\n#~ \"#[panic_handler]\\n\"\n#~ \"fn panic(_panic: &PanicInfo) -> ! {\\n\"\n#~ \"    loop {}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"#![no_main]\\n\"\n#~ \"#![no_std]\\n\"\n#~ \"\\n\"\n#~ \"use core::panic::PanicInfo;\\n\"\n#~ \"\\n\"\n#~ \"#[panic_handler]\\n\"\n#~ \"fn panic(_panic: &PanicInfo) -> ! {\\n\"\n#~ \"    loop {}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"#![no_main]\\n\"\n#~ \"#![no_std]\\n\"\n#~ \"\\n\"\n#~ \"extern crate alloc;\\n\"\n#~ \"extern crate panic_halt as _;\\n\"\n#~ \"\\n\"\n#~ \"use alloc::string::ToString;\\n\"\n#~ \"use alloc::vec::Vec;\\n\"\n#~ \"use buddy_system_allocator::LockedHeap;\\n\"\n#~ \"\\n\"\n#~ \"#[global_allocator]\\n\"\n#~ \"static HEAP_ALLOCATOR: LockedHeap<32> = LockedHeap::<32>::new();\\n\"\n#~ \"\\n\"\n#~ \"static mut HEAP: [u8; 65536] = [0; 65536];\\n\"\n#~ \"\\n\"\n#~ \"pub fn entry() {\\n\"\n#~ \"    // Safe because `HEAP` is only used here and `entry` is only called \"\n#~ \"once.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        // Give the allocator some memory to allocate.\\n\"\n#~ \"        HEAP_ALLOCATOR\\n\"\n#~ \"            .lock()\\n\"\n#~ \"            .init(HEAP.as_mut_ptr() as usize, HEAP.len());\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    // Now we can do things that require heap allocation.\\n\"\n#~ \"    let mut v = Vec::new();\\n\"\n#~ \"    v.push(\\\"A string\\\".to_string());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"#![no_main]\\n\"\n#~ \"#![no_std]\\n\"\n#~ \"\\n\"\n#~ \"extern crate alloc;\\n\"\n#~ \"extern crate panic_halt as _;\\n\"\n#~ \"\\n\"\n#~ \"use alloc::string::ToString;\\n\"\n#~ \"use alloc::vec::Vec;\\n\"\n#~ \"use buddy_system_allocator::LockedHeap;\\n\"\n#~ \"\\n\"\n#~ \"#[global_allocator]\\n\"\n#~ \"static HEAP_ALLOCATOR: LockedHeap<32> = LockedHeap::<32>::new();\\n\"\n#~ \"\\n\"\n#~ \"static mut HEAP: [u8; 65536] = [0; 65536];\\n\"\n#~ \"\\n\"\n#~ \"pub fn entry() {\\n\"\n#~ \"    // Safe because `HEAP` is only used here and `entry` is only called \"\n#~ \"once.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        // Give the allocator some memory to allocate.\\n\"\n#~ \"        HEAP_ALLOCATOR\\n\"\n#~ \"            .lock()\\n\"\n#~ \"            .init(HEAP.as_mut_ptr() as usize, HEAP.len());\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    // Ahora podemos hacer cosas que requieran asignación de _heap_.\\n\"\n#~ \"    let mut v = Vec::new();\\n\"\n#~ \"    v.push(\\\"A string\\\".to_string());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"SWD\"\n#~ msgstr \"SWD\"\n\n#~ msgid \"GDB stub and Microsoft \"\n#~ msgstr \"GDB stub y el servidor \"\n\n#~ msgid \"DAP\"\n#~ msgstr \"DAP\"\n\n#~ msgid \" server\"\n#~ msgstr \" de Microsoft\"\n\n#~ msgid \"\"\n#~ \"`cargo-embed` is a cargo subcommand to build and flash binaries, log \"\n#~ msgstr \"\"\n#~ \"`cargo-embed` es un subcomando de Cargo para compilar e instalar \"\n#~ \"binarios, registrar salidas \"\n\n#~ msgid \"RTT\"\n#~ msgstr \"TTR\"\n\n#~ msgid \"HVC\"\n#~ msgstr \"HVC\"\n\n#~ msgid \" to tell the firmware to power off the system:\"\n#~ msgstr \" para decirle al firmware que apague el sistema:\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo add thiserror\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo add thiserror\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"use reqwest::{blocking::Client, Url};\\n\"\n#~ \"use scraper::{Html, Selector};\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Error, Debug)]\\n\"\n#~ \"enum Error {\\n\"\n#~ \"    #[error(\\\"request error: {0}\\\")]\\n\"\n#~ \"    ReqwestError(#[from] reqwest::Error),\\n\"\n#~ \"    #[error(\\\"bad http response: {0}\\\")]\\n\"\n#~ \"    BadResponse(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct CrawlCommand {\\n\"\n#~ \"    url: Url,\\n\"\n#~ \"    extract_links: bool,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn visit_page(client: &Client, command: &CrawlCommand) -> \"\n#~ \"Result<Vec<Url>, Error> {\\n\"\n#~ \"    println!(\\\"Checking {:#}\\\", command.url);\\n\"\n#~ \"    let response = client.get(command.url.clone()).send()?;\\n\"\n#~ \"    if !response.status().is_success() {\\n\"\n#~ \"        return Err(Error::BadResponse(response.status().to_string()));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    let mut link_urls = Vec::new();\\n\"\n#~ \"    if !command.extract_links {\\n\"\n#~ \"        return Ok(link_urls);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    let base_url = response.url().to_owned();\\n\"\n#~ \"    let body_text = response.text()?;\\n\"\n#~ \"    let document = Html::parse_document(&body_text);\\n\"\n#~ \"\\n\"\n#~ \"    let selector = Selector::parse(\\\"a\\\").unwrap();\\n\"\n#~ \"    let href_values = document\\n\"\n#~ \"        .select(&selector)\\n\"\n#~ \"        .filter_map(|element| element.value().attr(\\\"href\\\"));\\n\"\n#~ \"    for href in href_values {\\n\"\n#~ \"        match base_url.join(href) {\\n\"\n#~ \"            Ok(link_url) => {\\n\"\n#~ \"                link_urls.push(link_url);\\n\"\n#~ \"            }\\n\"\n#~ \"            Err(err) => {\\n\"\n#~ \"                println!(\\\"On {base_url:#}: ignored unparsable {href:?}: \"\n#~ \"{err}\\\");\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(link_urls)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let client = Client::new();\\n\"\n#~ \"    let start_url = Url::parse(\\\"https://www.google.org\\\").unwrap();\\n\"\n#~ \"    let crawl_command = CrawlCommand{ url: start_url, extract_links: \"\n#~ \"true };\\n\"\n#~ \"    match visit_page(&client, &crawl_command) {\\n\"\n#~ \"        Ok(links) => println!(\\\"Links: {links:#?}\\\"),\\n\"\n#~ \"        Err(err) => println!(\\\"Could not extract links: {err:#}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"use reqwest::{blocking::Client, Url};\\n\"\n#~ \"use scraper::{Html, Selector};\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Error, Debug)]\\n\"\n#~ \"enum Error {\\n\"\n#~ \"    #[error(\\\"request error: {0}\\\")]\\n\"\n#~ \"    ReqwestError(#[from] reqwest::Error),\\n\"\n#~ \"    #[error(\\\"bad http response: {0}\\\")]\\n\"\n#~ \"    BadResponse(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct CrawlCommand {\\n\"\n#~ \"    url: Url,\\n\"\n#~ \"    extract_links: bool,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn visit_page(client: &Client, command: &CrawlCommand) -> \"\n#~ \"Result<Vec<Url>, Error> {\\n\"\n#~ \"    println!(\\\"Checking {:#}\\\", command.url);\\n\"\n#~ \"    let response = client.get(command.url.clone()).send()?;\\n\"\n#~ \"    if !response.status().is_success() {\\n\"\n#~ \"        return Err(Error::BadResponse(response.status().to_string()));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    let mut link_urls = Vec::new();\\n\"\n#~ \"    if !command.extract_links {\\n\"\n#~ \"        return Ok(link_urls);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    let base_url = response.url().to_owned();\\n\"\n#~ \"    let body_text = response.text()?;\\n\"\n#~ \"    let document = Html::parse_document(&body_text);\\n\"\n#~ \"\\n\"\n#~ \"    let selector = Selector::parse(\\\"a\\\").unwrap();\\n\"\n#~ \"    let href_values = document\\n\"\n#~ \"        .select(&selector)\\n\"\n#~ \"        .filter_map(|element| element.value().attr(\\\"href\\\"));\\n\"\n#~ \"    for href in href_values {\\n\"\n#~ \"        match base_url.join(href) {\\n\"\n#~ \"            Ok(link_url) => {\\n\"\n#~ \"                link_urls.push(link_url);\\n\"\n#~ \"            }\\n\"\n#~ \"            Err(err) => {\\n\"\n#~ \"                println!(\\\"On {base_url:#}: ignored unparsable {href:?}: \"\n#~ \"{err}\\\");\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(link_urls)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let client = Client::new();\\n\"\n#~ \"    let start_url = Url::parse(\\\"https://www.google.org\\\").unwrap();\\n\"\n#~ \"    let crawl_command = CrawlCommand{ url: start_url, extract_links: \"\n#~ \"true };\\n\"\n#~ \"    match visit_page(&client, &crawl_command) {\\n\"\n#~ \"        Ok(links) => println!(\\\"Links: {links:#?}\\\"),\\n\"\n#~ \"        Err(err) => println!(\\\"Could not extract links: {err:#}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use futures::executor::block_on;\\n\"\n#~ \"\\n\"\n#~ \"async fn count_to(count: i32) {\\n\"\n#~ \"    for i in 1..=count {\\n\"\n#~ \"        println!(\\\"Count is: {i}!\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"async fn async_main(count: i32) {\\n\"\n#~ \"    count_to(count).await;\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    block_on(async_main(10));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use futures::executor::block_on;\\n\"\n#~ \"\\n\"\n#~ \"async fn count_to(count: i32) {\\n\"\n#~ \"    for i in 1..=count {\\n\"\n#~ \"        println!(\\\"Count is: {i}!\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"async fn async_main(count: i32) {\\n\"\n#~ \"    count_to(count).await;\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    block_on(async_main(10));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"When you await a future, all local variables (that would ordinarily be \"\n#~ \"stored on a stack frame) are instead stored in the Future for the current \"\n#~ \"async block. If your future has pointers to data on the stack, those \"\n#~ \"pointers might get invalidated. This is unsafe.\"\n#~ msgstr \"\"\n#~ \"Cuando esperas un futuro, todas las variables locales (que normalmente se \"\n#~ \"almacenarían en un marco de pila) se almacenan en el futuro del bloque \"\n#~ \"asíncrono. Si tu futuro tiene punteros en datos de la pila, podrían \"\n#~ \"invalidarse. Es una acción insegura.\"\n\n#~ msgid \"\"\n#~ \"Therefore, you must guarantee that the addresses your future points to \"\n#~ \"don't change. That is why we need to `pin` futures. Using the same future \"\n#~ \"repeatedly in a `select!` often leads to issues with pinned values.\"\n#~ msgstr \"\"\n#~ \"Por lo tanto, debes asegurarte de que las direcciones a las que apunta el \"\n#~ \"futuro no cambien. Por ese motivo debemos fijar (`pin`) los futuros. Si \"\n#~ \"se usa el mismo futuro varias veces en un `select!`, se suelen producir \"\n#~ \"problemas en los valores fijados.\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"\"\n#~ \"En las páginas siguientes encontrarás las soluciones a los ejercicios.\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"No dudes en hacer preguntas sobre las soluciones [en GitHub](https://\"\n#~ \"github.com/google/comprehensive-rust/discussions). Ponte en contacto con \"\n#~ \"nosotros si tienes una solución distinta o mejor de la que se presenta \"\n#~ \"aquí.\"\n\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Nota:** Ignora los comentarios `// ANCHOR: label` y `// ANCHOR_END: \"\n#~ \"label` que aparecen en las soluciones. Están ahí para que sea posible \"\n#~ \"reutilizar algunas partes de las soluciones de los ejercicios.\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Día 1: Ejercicios de la Mañana\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([Volver al ejercicio](for-loops.md))\"\n\n#~ msgid \"Bonus question\"\n#~ msgstr \"Pregunta extra\"\n\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Requiere conceptos más avanzados. Es posible que parezca que se puede \"\n#~ \"utilizar un slice de slices (`&[&[i32]]`) como tipo de entrada para hacer \"\n#~ \"una trasposición y así lograr que nuestra función controle cualquier \"\n#~ \"tamaño de matriz. Sin embargo, esto se viene abajo rápidamente: el tipo \"\n#~ \"de resultado devuelto no puede ser `&[&[i32]]`, ya que necesita ser el \"\n#~ \"propietario de los datos que devuelve.\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Puedes probar a utilizar algo como `Vec<Vec<i32>>`, pero esto tampoco \"\n#~ \"funciona desde el principio: es difícil cambiar de `Vec<Vec<i32>>` a \"\n#~ \"`&[&[i32]]`, por lo que tampoco puedes usar `pretty_print` de forma \"\n#~ \"sencilla.\"\n\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"Una vez que veamos los traits y los genéricos, podremos usar el trait \"\n#~ \"[`std::convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.\"\n#~ \"html) para abstraer cualquier elemento que se pueda referenciar, como un \"\n#~ \"slice.\"\n\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Además, el propio tipo no requeriría que los slices secundarios fueran de \"\n#~ \"la misma longitud, por lo que dicha variable podría contener una matriz \"\n#~ \"no válida.\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"Día 1: Ejercicios de la Tarde\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([volver al ejercicio](luhn.md))\"\n\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Correspondencia de Patrones\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"Día 2: Ejercicios de la Mañana\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Diseñando una Librería\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([volver al ejercicio](book-library.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([volver al ejercicio](strings-iterators.md))\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"Día 3: Ejercicios de la mañana\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([volver al ejercicio](simple-gui.md))\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"Día 3: Ejercicios de la Tarde\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([volver al ejercicio](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"Trabajo adicional en C++ moderno\"\n\n#~ msgid \"\"\n#~ \"[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/\"\n#~ \"tokio_websockets/proto/struct.WebsocketStream.html#method.next): for \"\n#~ \"asynchronously reading messages from a Websocket Stream.\"\n#~ msgstr \"\"\n#~ \"[WebsocketStream::next()](https://docs.rs/tokio-websockets/0.3.2/\"\n#~ \"tokio_websockets/proto/struct.WebsocketStream.html#method.next): para la \"\n#~ \"lectura asíncrona de mensajes de un flujo WebSocket.\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Comparación\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"El curso es rápido y abarca muchos temas:\"\n\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"Dependiendo de la abstracción (o combinación de abstracciones) que \"\n#~ \"elijas, puede ser un solo puntero único, de referencia contada, o de \"\n#~ \"referencia atómica contada.\"\n\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"\"\n#~ \"A continuación, se muestra una comparación aproximada de las técnicas de \"\n#~ \"gestión de la memoria.\"\n\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Ventajas de las diferentes técnicas de gestión de la memoria\"\n\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Manual, como en C:\"\n\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Sin sobrecarga en _runtime_.\"\n\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Automática, como en Java:\"\n\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"Totalmente automática.\"\n\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Segura y correcta.\"\n\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Basada en el ámbito, como en C++:\"\n\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Parcialmente automática.\"\n\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Basada en el ámbito e implementada por el compilador, como en Rust:\"\n\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Implementada por el compilador.\"\n\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Inconvenientes de las diferentes técnicas de gestión de la memoria\"\n\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Errores use-after-free.\"\n\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Errores double free.\"\n\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"Pérdidas de memoria.\"\n\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"Pausas en la recolección de memoria residual.\"\n\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Retrasos del destructor.\"\n\n#~ msgid \"Complex, opt-in by programmer (on C++).\"\n#~ msgstr \"Compleja, habilitada por el programador (en C++).\"\n\n#~ msgid \"Circular references can lead to memory leaks\"\n#~ msgstr \"Las referencias circulares pueden provocar pérdidas de memoria.\"\n\n#~ msgid \"Potential runtime overhead\"\n#~ msgstr \"Posible sobrecarga en _runtime_ \"\n\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Implementada por el compilador y basada en el ámbito, como en Rust:\"\n\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Cierta complejidad inicial.\"\n\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Puede rechazar programas válidos.\"\n\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"\"\n#~ \"Estructura simple que hace un seguimiento de las estadísticas de salud.\"\n\n#~ msgid \"Multiple structs and enums for a drawing library.\"\n#~ msgstr \"Varias estructuras y enumeraciones para una biblioteca de planos.\"\n\n#~ msgid \"Day 4 Morning\"\n#~ msgstr \"Día 4 Mañana\"\n\n#~ msgid \"On Day 4, we will cover Android-specific things such as:\"\n#~ msgstr \"En el Día 4, cubriremos cosas específicas a Android como:\"\n\n#~ msgid \"AIDL servers and clients.\"\n#~ msgstr \"Clientes y servidores AIDL. \"\n\n#~ msgid \"Interoperability with C, C++, and Java.\"\n#~ msgstr \"Interoperabilidad con C, C++, y Java.\"\n\n#~ msgid \"\"\n#~ \"It is important to note that this course does not cover Android \"\n#~ \"**application**  development in Rust, and that the Android-specific parts \"\n#~ \"are specifically about writing code for Android itself, the operating \"\n#~ \"system. \"\n#~ msgstr \"\"\n#~ \"Es importante destacar que este curso no cubre desarrollo de \"\n#~ \"**aplicaciones**  Android en Rust, y que las partes específicas a Android \"\n#~ \"son acerca de escribir código para Android en sí, el sistema operativo. \"\n\n#~ msgid \"\"\n#~ \"Learn how to use async Rust --- we'll only mention async Rust when \"\n#~ \"covering traditional concurrency primitives. Please see [Asynchronous \"\n#~ \"Programming in Rust](https://rust-lang.github.io/async-book/) instead for \"\n#~ \"details on this topic.\"\n#~ msgstr \"\"\n#~ \"Aprender  cómo usar Rust asincrónico —solo mencionaremos Rust async \"\n#~ \"cuando cubramos las primitivas de concurrencia tradicional. Por favor ver \"\n#~ \"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-\"\n#~ \"book/) para más detalles.\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"Día 1: Rust Básico, propiedad y chequeo de préstamos.\"\n\n#~ msgid \"Day 4: Concurrency in Rust and interoperability with other languages\"\n#~ msgstr \"\"\n#~ \"Día 4: Concurrencia en Rust e interoperatiblidad con otros lenguajes\"\n\n#~ msgid \"\"\n#~ \"**Exercise for Day 4:** Do you interface with some C/C++ code in your \"\n#~ \"project which we could attempt to move to Rust? The fewer dependencies \"\n#~ \"the better. Parsing code would be ideal.\"\n#~ msgstr \"\"\n#~ \"**Ejecicio del Día 4:** Comunicarte con alegan código C/C++ en tu \"\n#~ \"proyecto que podrías migrar a Rust? Con menos dependencias es lo mejor. \"\n#~ \"Parsear el código sería lo ideal.\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (Recomendado)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rustup.rs/) \"\n#~ \"tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Puedes seguir las instrucciones para instalar cargo y el compilador de \"\n#~ \"Rust, además de otras herramientas estándar con la herramienta [rustup]\"\n#~ \"(https://rust-analyzer.github.io/), que es mantenida por la Fundación \"\n#~ \"Rust.\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"Package Managers\"\n\n#~ msgid \"}\"\n#~ msgstr \"}\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    fizzbuzz_to(20);   // Defined below, no forward declaration needed\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    fizzbuzz_to(20);   // Definida abajo, no necesitas declararla antes\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn fizzbuzz(n: u32) -> () {  // No return value means returning the unit \"\n#~ \"type `()` match (is_divisible_by(n, 3), is_divisible_by(n, 5)) { (true,  \"\n#~ \"true)  => println!(\\\"fizzbuzz\\\"), (true,  false) => println!(\\\"fizz\\\"), \"\n#~ \"(false, true)  => println!(\\\"buzz\\\"), (false, false) => println!\"\n#~ \"(\\\"{n}\\\"), } }\"\n#~ msgstr \"\"\n#~ \"fn fizzbuzz(n: u32) -> () {  // No devolver valor implica devolver un \"\n#~ \"tipo unit `()` match (is_divisible_by(n, 3), is_divisible_by(n, 5)) \"\n#~ \"{ (true,  true)  => println!(\\\"fizzbuzz\\\"), (true,  false) => println!\"\n#~ \"(\\\"fizz\\\"), (false, true)  => println!(\\\"buzz\\\"), (false, false) => \"\n#~ \"println!(\\\"{n}\\\"), } }\"\n\n#~ msgid \"\"\n#~ \"fn fizzbuzz_to(n: u32) {  // `-> ()` is normally omitted for i in 1..=n \"\n#~ \"{ fizzbuzz(i); } }\"\n#~ msgstr \"\"\n#~ \"fn fizzbuzz_to(n: u32) {  // `-> ()` por lo general se omite for i in 1..\"\n#~ \"=n { fizzbuzz(i); } }\"\n\n#~ msgid \"\"\n#~ \"The `match` expression in `fizzbuzz()` is doing a lot of work. It is \"\n#~ \"expanded below to show what is happening.\"\n#~ msgstr \"Los `match` en `fizzbuzz()` hacen mucho. Se detalla debajo.\"\n\n#~ msgid \"(Type annotations added for clarity, but they can be elided.)\"\n#~ msgstr \"(Las anotaciones dan claridad, pero se pueden omitir)\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn elegir_uno<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"for i in 0..3 {\\n\"\n#~ \"    print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"}\\n\"\n#~ \"println!();\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"print!(\\\"Iterando sobre el rango:\\\");\\n\"\n#~ \"for i in 0..3 {\\n\"\n#~ \"    print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"}\\n\"\n#~ \"println!();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Note that since `println!` is a macro, `x` is not moved, even using the \"\n#~ \"function like syntax of `println!(\\\"x: {}\\\", x)`\"\n#~ msgstr \"\"\n#~ \"Nota que a partir que `println!` es una macro, `x` no se mueve, incluso \"\n#~ \"usando una función como `println!(\\\"x: {}\\\", x)`\"\n\n#~ msgid \"Global state is managed with static and constant variables.\"\n#~ msgstr \"El estado global es manejado con variables estáticas y constantes.\"\n\n#~ msgid \"You can declare compile-time constants:\"\n#~ msgstr \"Puedes declarar constantes en tiempo de compilación:\"\n\n#~ msgid \"\"\n#~ \"fn main() { let digest = compute_digest(\\\"Hello\\\"); println!(\\\"Digest: \"\n#~ \"{digest:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let digest = compute_digest(\\\"Hola\\\"); println!(\\\"Digest: \"\n#~ \"{digest:?}\\\"); }\"\n\n#~ msgid \"You can also declare static variables:\"\n#~ msgstr \"También puedes declarar variables estáticas:\"\n\n#~ msgid \"\"\n#~ \"We will look at mutating static data in the [chapter on Unsafe Rust](../\"\n#~ \"unsafe.md).\"\n#~ msgstr \"\"\n#~ \"Veremos cambiar datos estáticos en el [capítulo Rust No Seguro](../unsafe.\"\n#~ \"md).\"\n\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"Potencial de use-after-free.\"\n\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"Los datos se mueven de `s1` y `s2` si no se accede más.\"\n\n#~ msgid \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"&p3.0: {:p}\\\", &p3.0); println!(\\\"{p1:?} + \"\n#~ \"{p2:?} = {p3:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"&p3.0: {:p}\\\", &p3.0); println!(\\\"{p1:?} + \"\n#~ \"{p2:?} = {p3:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"A small book library,\"\n#~ msgstr \"Un pequeño libro de biblioteca,\"\n\n#~ msgid \"Iterators and ownership (hard).\"\n#~ msgstr \"Iteradores y propiedad (difícil).\"\n\n#~ msgid \"\"\n#~ \"impl Book { // This is a constructor, used below. fn new(title: &str, \"\n#~ \"year: u16) -> Book { Book { title: String::from(title), year, } } }\"\n#~ msgstr \"\"\n#~ \"impl Book { // Este es el constructor, usado debajo. fn new(title: &str, \"\n#~ \"year: u16) -> Book { Book { title: String::from(title), year, } } }\"\n\n#~ msgid \"\"\n#~ \"// This makes it possible to print Book values with {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } }\"\n#~ msgstr \"\"\n#~ \"// Esto hace posible imprimir valores del libro con {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } }\"\n\n#~ msgid \"\"\n#~ \"// This shows the desired behavior. Uncomment the code below and // \"\n#~ \"implement the missing methods. You will need to update the // method \"\n#~ \"signatures, including the \\\"self\\\" parameter! You may // also need to \"\n#~ \"update the variable bindings within main. fn main() { let library = \"\n#~ \"Library::new();\"\n#~ msgstr \"\"\n#~ \"// Esto muestra el estado deseado. Descomenta el código debajo e // \"\n#~ \"implementa el método que falta. Puedes necesitar actualizar el  // signo \"\n#~ \"del método, incluyendo el parámetro \\\"self\\\". También fn main() { let \"\n#~ \"library = Library::new();\"\n\n#~ msgid \"\"\n#~ \"impl Person { fn say_hello(&self) { println!(\\\"Hello, my name is {}\\\", \"\n#~ \"self.name); } }\"\n#~ msgstr \"\"\n#~ \"impl Person { fn say_hello(&self) { println!(\\\"Hola, mi nombre es {}\\\", \"\n#~ \"self.name); } }\"\n"
  },
  {
    "path": "po/fa.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-09-11T22:10:46Z\\n\"\n\"PO-Revision-Date: 2024-10-17 00:33+0330\\n\"\n\"Last-Translator: alix1383 <dev.alix13@gmail.com>\\n\"\n\"Language-Team: Persian\\n\"\n\"Language: fa\\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\"X-Generator: Poedit 3.0.1\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"به Comprehensive Rust خوش آمدید 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"اجرای دوره\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"مباحث دوره\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"میان‌برهای صفحه کلید\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"ترجمه\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"استفاده از cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"اکوسیستم Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"نمونه کد\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"اجرای کد به صورت لوکال با cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"روز ۱: صبح\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"خوش آمدید\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"سلام, دنیا\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"زبان Rust چیست؟\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"مزیت‌های زبان Rust\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"تایپ‌ها و مقادیر\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"متغیرها\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"مقادیر\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"عملگرهای ریاضی\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"تعیین تایپ ضمنی\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"تمرین: دنباله فیبوناچی\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"راه‌حل\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"مبانی پایه کنترل جریان\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"عبارات `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"حلقه‌ها\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` و `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"برچسب‌ها\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"بلوک‌ها و محدوده‌ها\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"محدوده‌ها و سایه‌گذاری\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"توابع\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"ماکروها\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"تمرین: دنباله Collatz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"روز ۱: بعد از ظهر\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"تاپل ها و آرایه ها\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"آرایه‌ها\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"تاپل‌ها\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"تکرار ارایه\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"الگو‌ها و ضدِ ساختارها\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"تمرین: آرایه‌های تو در تو\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"مراجع\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"مراجع اشتراکی\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"مراجع انحصاری\"\n\n#: src/SUMMARY.md src/references.md src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"برش‌ها\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"رشته‌ها\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"تمرین: هندسه\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"تایپ‌های تعریف شده توسط کاربر\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"ساختارهای نام‌دار\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"ساختار‌ تاپل‌ها\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Enums\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Const\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"Static\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"نام‌های مستعار تایپ\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"تمرین: رویدادهای آسانسور\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"روز ۲: صبح\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"تطبیق\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"تطابق مقادیر\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"تخریب ساختارها\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"تخریب ساختار Enums\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"کنترل جریان Let\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"تمرین: ارزیابی عبارت\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"متدها و تریت‌ها\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"متدها\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"پیاده سازی Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Supertraits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"تایپ‌های وابسته\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Deriving\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"تمرین: توابع Generic\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"روز دوم: عصر\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Generics\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"توابع Generic\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"دیتا تایپ‌های Generic\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Generic Traits\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Trait Bounds\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"تمرین: Generic `min`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"کتابخانه‌ استاندارد تایپ‌ها\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"کتابخانه‌ استاندارد\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"مستندات\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"تمرین: شمارنده\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"کتابخانه استاندارد Traits\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"مقایسه\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"اپراتورها\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` and `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Casting\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` and `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, struct update syntax\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Closures\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"تمرین: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"روز ۳: صبح\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"مدیریت حافظه\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"بررسی حافظه برنامه\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"رویکردهای مدیریت حافظه\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"مالکیت\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"مفاهیم جابه‌جایی\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"کپی کردن تایپ‌ها\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"تمرین: تایپ‌های سازنده\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"اشاره‌گرهای هوشمند\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`<Box<T`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Owned Trait Objects\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"تمرین: درخت باینری\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"روز ۳: بعد از ظهر\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"قرض‌گیری (Borrowing)\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"قرض‌گیری یک مقدار\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"چک کردن قرض\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"خطاهای قرض‌گیری\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"تغییرپذیری داخلی\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"تمرین: آمار سلامتی\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"طول‌عمر\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"تفسیر‌های طول عمر\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"حذف طول عمر\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"طول عمر ساختارها\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"تمرین: تجزیه Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"روز چهارم: صبح\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Iterators\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"تمرین: روش Iterator Chaining\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"ماژول‌ها\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"سلسله‌ مراتب فایل‌سیستم\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"قابلیت دید\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"تمرین: ماژولهایی برای کتابخانه رابط کاربری گرافیکی\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"تست‌کردن\"\n\n#: src/SUMMARY.md src/testing.md\nmsgid \"Test Modules\"\nmsgstr \"تست‌ ماژول‌ها\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"انواع دیگر تست‌ها\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"کامپایلر Lints و Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"تمرین: الگوریتم Luhn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"روز چهارم: بعد از ظهر\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"مدیریت خطا\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"در مورد Panicها\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"عملگرد Try\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"این تبدیل‌ها (Conversions) را امتحان کنید\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error` Trait\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` و `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"تمرین: بازنویسی با `Result`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust ناایمن\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"ناایمن\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"عدم ارجاع به اشاره‌گرهای خام\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"متغیرهای ثابت قابل تغییر\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"نوع داده چندگانه\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"توابع ناامن\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"صفات (Traits) ناامن\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"تمرین: FFI Wrapper\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"اندروید\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"تنظیم\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"قوانین ساخت\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"باینری\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"کتابخانه\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"آموزش سرویس Birthday\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"رابط (Interface)\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"Service API\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"سرویس\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"سرور\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"استقرار\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"کاربر\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"تغییر دادن API\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Updating Implementations\"\nmsgstr \"پیاده سازی\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"AIDL Types\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"انواع اولیه\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"تایپ‌های اٰرایه‌ای\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Sending Objects\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"بسته‌بندی‌ها\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"ارسال فایل‌ها\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Mocking\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"لاگ\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"قابلیت همکاری\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"با C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"فراخوانی C با Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"فراخوانی Rust از C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"با <span dir=ltr>C++</span>\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"ماژول پل\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust Bridge\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"Generated C++\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"پل ++C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"انواع مشترک\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Shared Enums\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"مدیریت خطا Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"مدیریت خطا ++C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"تایپ‌های اضافی\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"روش Build برای اندروید: ++C\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"روش Build برای اندروید: ژانرها\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"روش Build برای اندروید: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"با جاوا\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/android/morning.md src/exercises/bare-metal/morning.md\n#: src/exercises/bare-metal/afternoon.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"تمرین‌ها\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"مقایسه Chromium و اکوسیستم Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"قواعد\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"Rust ناایمن\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"بسته به Rust Code از ++Chromium C\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"تمرین‌ها\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` Library\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"قواعد GN برای تست‌های Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` Macro\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"قابلیت همکاری با ++C\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"نمونه اتصال‌ها (Bindingها)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"محدودیت‌های CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"مدیریت خطا CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"مدیریت خطا: مثال QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"مدیریت خطا: مثال PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"استفاده از CXX در Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"اضافه‌کردن Crateهای شخص ثالث\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"پیکربندی Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"تنظیمات `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"دانلود کردن Crateها\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"ایجاد قواعد `gn` Build\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"حل مشکلات\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"ساخت اسکریپت‌هایی که کد را تولید می‌کنند\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"ساخت اسکریپت‌هایی که ++C را Build می‌کند یا اقدامات دلخواه انجام می‌دهند\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"وابسته به یک Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"بررسی‌ها و ممیزی‌ها\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"کد‌های Chromium را بررسی کنید\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"به روز نگه داشتن Crateها\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"دور همی  تمرین کنید\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"راه‌حل‌های تمرین\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"با Bare Metal: صبح\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"یک مثال ساده\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"میکروکنترلرها\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO خام\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PACs\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crates\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Board Support Crates\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"انواع State Pattern\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"probe-rs, cargo-embed\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"اشکال یابی (Debugging)\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"باقی پروژه‌ها\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"قطب‌نما\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"راه حل‌ها\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"با Bare Metal:  عصر\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"پردازنده‌های برنامه\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"آماده شدن برای Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"اسمبلی درونی\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"بریم یک درایور UART بنویسیم\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"صفت‌های بیشتر\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"یک درایور بهتر UART\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"پرچم‌های بیتی (Bitflags)\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"رجیستر‌های چندگانه\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"درایور\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"استفاده از آن\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"استثناها\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"جعبه‌های (Crates) کاربردی\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"درایور RTC\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"همزمانی: صبح\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"تردها\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"تردهای ساده\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"محدوده تردها\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"کانال‌ها\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Senders و Receivers\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"کانال‌های نامحدود\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"کانال‌های محدود\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` و `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"ویژگی‌های نشانگر\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"مثال‌ها\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"ناحیه‌های مشترک\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"مثال\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"فلسفه Dining\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"جستجوگر پیوند چند تِردی\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"همزمانی: عصر\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"مبانی Async\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Runtimes\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Task\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"کانال‌ها و Control Flow\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"کانال‌های Async\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Pitfallها\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"مسدود کردن Executor\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"صفات Async\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"لغو\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"پخش برنامه چت\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"کلمات آخر\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"سپاس!\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"واژه‌نامه\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"منابع دیگر\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"اعتبارها\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"این یک دوره رایگان Rust است که توسط تیم اندروید در گوگل توسعه یافته است. این \"\n\"این دوره طیف کامل‌ای از Rust را پوشش میدهد, از مباحث پایه تا مباحث  پیشرفته  \"\n\"مانند جنریک و مدیریت خطاها.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"آخرین نسخه از دوره را میتوان در <https://google.github.io/comprehensive-rust/\"\n\"> پیدا کنید. اگر از جای دیگری میخوانید, لطفا برای بروز رسانی‌ها منبع اصلی را \"\n\"نیز بررسی کنید.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"این دوره به زبان های دیگر موجود است. زبان مورد نظر خود را در گوشه سمت راست \"\n\"بالای صفحه انتخاب کنید یا صفحه [ترجمه‌ها](running-the-course/translations.md) \"\n\"را برای فهرستی از تمام ترجمه‌های موجود را بررسی کنید.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"این دوره نیز  [به عنوان یک PDF](comprehensive-rust.pdf)  در دسترس است.\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"هدف از این دوره آموزش Rust به شماست. ما فرض می کنیم شما چیزی از درباره Rust \"\n\"نمی دانید :\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"درک جامعی از syntax و زبان Rust به شما می دهد.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"شما را قادر می سازد تا برنامه های موجود را تغییر دهید و برنامه های جدید را \"\n\"در Rust بنویسید.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"اصطلاحات رایج Rust را به شما یاد می دهد.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"ما چهار روز اول دوره را اصول Rust  می نامیم.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"با تکیه بر این، از شما دعوت می شود تا به یک یا چند موضوع تخصصی بپردازید:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md):  یک دوره نیم روزه  استفاده از Rust برای توسعه پلت فرم \"\n\"اندروید (AOSP). این شامل قابلیت همکاری با C، C ++و Java است.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md):  یک دوره نیم روزه در مورد استفاده از Rust در \"\n\"مرورگرهای مبتنی بر Chromium. این شامل قابلیت همکاری با C ++ و نحوه قرار دادن \"\n\"جعبه های(crates) شخص ثالث در کروم است.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): یک کلاس تمام روز در مورد استفاده از Rust برای \"\n\"توسعهbare-metal (تعریف شده). هم میکروکنترلرها و هم پردازنده های برنامه پوشش \"\n\"داده شده اند.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in \"\n\"Rust. We cover both classical concurrency (preemptively scheduling using \"\n\"threads and mutexes) and async/await concurrency (cooperative multitasking \"\n\"using futures).\"\nmsgstr \"\"\n\"[همروندی](concurrency/welcome.md): یک کلاس یک روزه در مورد concurrency در \"\n\"زبان Rust است. ما هر دو مورد concurrency کلاسیک (زمانبندی preemptively با \"\n\"استفاده از threadها و mutexها ) و async/await concurrency (multitasking \"\n\"مشارکتی) با استفاده از futures را پوشش خواهیم داد.\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"اهداف خارج از این دوره\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"زبان Rust, یک زبان بزرگ است و ما نمی‌توانیم طی چند روز همه موارد را پوشش دهیم.\"\n\"چندتا از اهداف خارج از این دوره عبارتند از:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"برای آموزش چگونه‌گی توسعه Macro ها: لطفا [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) و [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) را برسی کنید.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"فرض می‌شود\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"این دوره فرض می‌کند که شما دانش برنامه‌نویسی دارید. Rust یک زبان استاتیک تایپ \"\n\"است و ما گاهی اوقات زبان Rust را با C و <span dir=ltr>C++</span> مقایسه می \"\n\"کنیم تا رویکرد‌های Rust را بهتر توضیح دهیم.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"اگر می‌دانید چگونه به زبانی با دینامیک تایپ مانند پایتون یا جاوا اسکریپت \"\n\"برنامه‌نویسی کنید می‌توانید به خوبی این روش را دنبال کنید.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"این یک نمونه از _speaker note_ هست. ما از این‌ها استفاده خواهیم کرد تا تا \"\n\"اطلاعات بیشتری را ارائه دهیم.. این مورد می‌تواند شامل نکات کلیدی باشد که مدرس \"\n\"باید آن را پوشش دهد و همچنین پاسخ به سوالات رایجی که در کلاس مطرح می شود.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"این صفحه برای مدرس دوره است.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"اینجا بخشی از پیشینه نحوه برگزاری دوره توسط گوگل به صورت درون سازمانی است.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"ما معمولا کلاس‌ها را از ساعت ۱۰:۰۰ تا ۱۶:۰۰ برگزار می کنیم، با یک ساعت \"\n\"استراحت ناهار در میانه روز با این رویه ۲.۵ ساعت برای کلاس صبح و ۲.۵ ساعت \"\n\"برای کلاس بعدازظهر باقی می‌گذارد. توجه داشته باشید که این فقط یک توصیه است: \"\n\"شما می‌توانید ۳ ساعت از جلسه صبح را صرف تمرین بیشتر برای افراد کنید. نکته \"\n\"منفی این کار این است که با جلسه طولانی تر افراد بعد از ۶ ساعت کلاس در بعد از \"\n\"ظهر خیلی خسته میشوند.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"قبل از اجرای دوره، شما می‌خواهید:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"با مطالب دوره آشنا شوید. ما یادداشت های سخنرانی را برای کمک به برجسته کردن \"\n\"نکات کلیدی گنجانده‌ایم (لطفا با مشارکت بیشتر در یادداشت‌های سخنران به ما کمک \"\n\"کنید!). هنگام ارائه، باید مطمئن شوید که یادداشت‌های سخنران را در یک پنجره \"\n\"پاپ‌آپ باز کنید (روی پیوند با یک فلش کوچک در کنار «یادداشت‌های سخنران» کلیک \"\n\"کنید). به این ترتیب یک صفحه نمایش تمیز برای ارائه به کلاس خواهید داشت.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"در مورد زمان‌بندی دوره تصمیم بگیرید. از آنجایی که دوره حداقل سه روز کامل طول \"\n\"می‌کشد، توصیه می‌کنیم که دوره را در دو هفته برنامه‌ریزی کنید. شرکت کنندگان در \"\n\"دوره گفته‌اند که داشتن فاصله‌ای در دوره مفید است، زیرا به آنها کمک می‌کند تا \"\n\"تمام اطلاعاتی را که به آنها می‌دهیم پردازش کنند.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"یک اتاق بزرگ برای حضور شرکت کنندگان پیدا کنید. ما کلاسی با گنجایش ۱۵ الی ۲۵ \"\n\"نفر را پیشنهاد می‌کنیم. افراد در این تعداد می‌توانند به راحتی سوال بپرسند --- \"\n\"همچنین مدرس وقت کافی برای پاسخ‌ دادن به سوالات را نیز دارد. مطمئن شوید که \"\n\"اتاق مورد نظر  _میز_ برای شما و دانشجویان دارد: شما همگی نیاز دارید که \"\n\"بتونید بشنید و با لپتاپ های خود کار کنید. به خصوص شما به عنوان مدرس کلی live-\"\n\"coding انجام خواهید داد پس صرفا یک میز بدون جا برای لپتاپ برای شما مناسب \"\n\"نخواهد بود.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"در روز برگزاری دوره، کمی زودتر به کلاس بیایید تا همه چیز را آماده کنید. ما \"\n\"توصیه می کنیم مستقیماً با استفاده از `mdbook serve`را در لپتاپ خود اجرا کنید. \"\n\"([راهنمای نصب](https://github.com/google/comprehensive-rust#building) را \"\n\"ببنیید). با این کار عملکرد بدون تاخیر در هنگام تغییر صفحات تضمین می شود. \"\n\"استفاده از لپ تاپ همچنین به شما امکان می دهد اشتباهات تایپی ا در صورت مشاهده \"\n\"شما یا شرکت کنندگان در دوره اصلاح کنید.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"بگذارید افراد خودشان یا در گروه های کوچک تمرینات را حل کنند. مابه طور معمول \"\n\"۳۰ الی ۴۵ دقیقه را برای تمرینات در صبح و بعد‌از‌ظهر (از جمله زمان بررسی راه حل \"\n\"ها ) صرف می‌کنیم. حتما از افراد بخواهید که اگر گیر کرده‌اند یا چیزی وجود دارد \"\n\"که می‌توانید به آنها کمک کنید. وقتی که می‌بینید چندین نفر مشکل یکسانی دارند, \"\n\"خطاب به کلاس راه‌حل را پیشنهاد دهید؛ به عنوان مثال، با نشان دادن جایی که \"\n\"می‌توانند اطلاعات مربوطه را در کتابخانه استاندارد (standard library) پیدا \"\n\"کنند.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"همش همین بود! در تدریس دوره موفق باشید! امیدواریم که برای شما هم به همان \"\n\"اندازه که برای ما لذت‌بخش بوده، لذت‌بخش باشد!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"لطفاً [بازخورد خود را ارائه دهید](https://github.com/google/comprehensive-\"\n\"rust/discussions/86) تا در آینده بتوانیم به بهبود دوره ادامه دهیم. ما دوست \"\n\"داریم بشنویم چه چیزی برای شما خوب بوده و چه چیزی می تواند بهتر شود. همینطور \"\n\"شما دانش‌آموزان نیز بسیار خوش آمدید  [برای ما بازخورد ارسال کنید](https://\"\n\"github.com/google/comprehensive-rust/discussions/100) !\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"مبانی Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"سه روز اول دوره را [مبانی Rust ](../welcome-day-1.md)تشکیل میدهند. این این \"\n\"سه روز با سرعت بالایی پیش می‌روند و ما موارد زیادی را پوشش می‌دهیم!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"مباحث دوره:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"روز ۱ صبح (۲ ساعت و ۵ دقیقه با احتساب استراحت)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"بخش\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Duration\"\nmsgstr \"مدت زمان\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"۱۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-4.md\nmsgid \"40 minutes\"\nmsgstr \"۴۰ دقیقه\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"روز ۱ بعد از ظهر (۲ ساعت و ۳۵ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"۳۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md\n#: src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"۵۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"۵۰ دقیقه\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"روز ۲ صبح (۲ ساعت و ۱۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md\n#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"۳ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"1 hour\"\nmsgstr \"۱ ساعت\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"روز ۲ بعد از ظهر (۴ ساعت و ۵ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"۴۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"۱ ساعت و ۱۰ دقیفه\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"روز ۳ صبح (۲ ساعت و ۲۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"روز ۳ بعدازظهر(۱ ساعت و ۵۵ دقیقه، شامل وقت اسراحت)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"روز ۴ صبح (۲ ساعت و ۴۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"روز ۴ بعدازظهر (۲ ساعت و ۱۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"ساعت و ۵ دقیقه\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"عمیق تر شدن\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"علاوه بر کلاس 4 روزه Rust Fundamentals، موضوعات تخصصی تری را نیز پوشش می \"\n\"دهیم:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust در اندروید\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"در [Rust در اندروید](../android.md) توی دوره  یک دوره نیم روزه در مورد \"\n\"استفاده از  Rust برای توسعه پلتفرم اندروید عمیق می‌شیم. این شامل قابلیت تعامل \"\n\"با C، <span dir=ltr>C++</span> و جاوا می‌شود.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"شما نیاز دارید که یک نسخه از [مخزن ASOP](https://source.android.com/docs/\"\n\"setup/download/downloading) بگیرید, همچنین یک نسخه از [مخزن دوره](https://\"\n\"github.com/google/comprehensive-rust) بگیرید و روی همون ماشین در مسیر `src/\"\n\"android/`مخزن ASOP قرار دهید. با این کار اطمینان حاصل می‌کنید که سیستم build \"\n\"اندروید فایل های `Android.bp` را در `src/android/` می‌بینید.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"اطمینان حاصل کنید که `adb sync` با شبیه‌ساز یا دستگاه واقعی شما کار می‌کند  و \"\n\"همه نمونه‌های Android را با استفاده از `src/android/build_all.sh` از قبل \"\n\"بسازید.  اسکریپت را بخوانید تا دستوراتی را که اجرا می‌کند ببینید و مطمئن شوید \"\n\"که وقتی آنها را  اجرا می‌کنید به درستی کار می‌کنند.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust در اندروید\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"عمیق [Rust in Chromium](../chromium.md) یک دوره نیم روزه برای استفاده از \"\n\"Rust به عنوان بخشی از مرورگر Chromium است. این شامل استفاده از Rust در سیستم \"\n\"ساخت `gn‍` Chromium، آوردن کتابخانه‌های شخص ثالث (\\\"crates\\\") و قابلیت همکاری +\"\n\"+C است.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"شما باید بتوانید Chromium را بسازید --- یک اشکال زدایی، ساخت کامپوننت برای \"\n\"سرعت [توصیه می شود] (../chromium/setup.md) است، اما هر ساختی کار می کند. \"\n\"مطمئن شوید که می‌توانید مرورگر Chromium را که ساخته‌اید اجرا کنید.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust بر روی سخت افزار بدون سیستم عامل\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"دوره آموزشی [Rust بر روی سخت افزار بدون سیستم عامل](../bare-metal.md) یک \"\n\"دوره یک روزه با تمرکز بر استفاده ازRust برای توسعه بر روی سخت افزار بدون \"\n\"سیستم عامل (embedded) است.  این دوره هم میکروکنترلرها و هم پردازشگر هایی با \"\n\"کارایی خاص را پوشش می دهد.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"برای قسمت میکروکنترلر، باید برد توسعه [BBCmicro:bit](https://microbit.org/)  \"\n\"v2 را   خریداری کنید. همه باید تعدادی بسته را همانطور که در [welcome page]\"\n\"(../bare-metal.md) توضیح داده شده نصب کنند.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"همزمانی در Rust\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day \"\n\"class on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"دوره [همزمانی در Rust ](../concurrency.md) یک روزه با تمرکز بر همزمانی   که \"\n\"شامل همزمانی کلاسیک و   `async`/`await` است.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"شما به یک crate جدید نیاز خواهید داشت و وابستگی ها دانلود و آماده استفاده \"\n\"باشند. سپس می‌توانید نمونه‌ها را در `src/main.rs‍` کپی/پیست کنید تا با آنها \"\n\"آزمایش کنید:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"صبح (۳ ساعت و ۲۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"۳۰ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/methods-and-traits.md\n#: src/std-types.md src/memory-management.md src/borrowing.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"۲۰ دقیقه\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"ارسال و همگام‌سازی\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"بعدازظهر (۳ ساعت و ۲۰ دقیقه، شامل وقت استراحت)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"فرمت\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"این دوره قرار است بسیار تعاملی باشد و توصیه می کنیم اجازه دهید حس کنجکاوی \"\n\"Rust را هدایت کنند!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"چندین میانبر صفحه کلید مفید در mdBook وجود دارد:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"<kbd>Arrow-Left</kbd>: به صفحه قبلی هدایت می‌کند.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"<kbd>Arrow-Right</kbd>: به صفحه بعدی هدایت می‌کند.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\n#, fuzzy\nmsgid \"<kbd>Ctrl + Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"<kbd>Ctrl + Enter</kbd>: اجرای نمونه کدی که بر روی آن تمرکز شده است.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"<kbd>s</kbd>: نوار جستجو را فعال می‌کند.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"این دوره توسط مجموعه ای از داوطلبان فوق العاده به زبان های دیگر ترجمه شده \"\n\"است:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[پرتغالی برزیلی](https://google.github.io/comprehensive-rust/pt-BR/) توسط \"\n\"[@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) و  \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp).\"\nmsgstr \"\"\n\"[چینی (ساده‌شده)](https://google.github.io/comprehensive-rust/zh-CN/) توسط \"\n\"[@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/wnghl), \"\n\"[@anlunx](https://github.com/anlunx), [@kongy](https://github.com/kongy), \"\n\"[@noahdragon](https://github.com/noahdragon), [@superwhd](https://github.com/\"\n\"superwhd), [@SketchK](https://github.com/SketchK) و [@nodmp](https://github.\"\n\"com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[چینی (سنتی)](https://google.github.io/comprehensive-rust/zh-TW/) توسط \"\n\"[@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen) و [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[ژاپنی](https://google.github.io/comprehensive-rust/ja/) توسط [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) و [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[کره ای](https://google.github.io/comprehensive-rust/ko/) توسط [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) و \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[اسپانیایی](https://google.github.io/comprehensive-rust/es/) توسط [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[فرانسویی](https://google.github.io/comprehensive-rust/fr/) توسط [@KookaS]\"\n\"(https://github.com/KookaS) و [@vcaen](https://github.com/vcaen).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"از انتخابگر زبان در گوشه بالا سمت راست برای جابه‌جایی بین زبان‌ها استفاده کنید.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"ترجمه‌های ناقص\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"تعداد زیادی ترجمه در حال انجام وجود دارد. ما به آخرین ترجمه های به روز شده \"\n\"پیوند می دهیم:\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[اسپانیایی](https://google.github.io/comprehensive-rust/es/) توسط [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[بنگالی](https://google.github.io/comprehensive-rust/bn/) توسط [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@Alix1383]\"\n\"(https://github.com/alix1383), [@DannyRavi](https://github.com/DannyRavi), \"\n\"[@hamidrezakp](https://github.com/hamidrezakp), [@javad-jafari](https://\"\n\"github.com/javad-jafari) and [@moaminsharifi](https://github.com/\"\n\"moaminsharifi).\"\nmsgstr \"\"\n\"[چینی (سنتی)](https://google.github.io/comprehensive-rust/zh-TW/) توسط \"\n\"[@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen) و [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[فرانسویی](https://google.github.io/comprehensive-rust/fr/) توسط [@KookaS]\"\n\"(https://github.com/KookaS) و [@vcaen](https://github.com/vcaen).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[آلمانی](https://google.github.io/comprehensive-rust/de/) توسط [@Throvn]\"\n\"(https://github.com/Throvn) و [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[ایتالیایی](https://google.github.io/comprehensive-rust/de/) توسط [@Throvn]\"\n\"(https://github.com/Throvn) و [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\"فهرست کامل ترجمه‌ها با وضعیت فعلی‌شان نیز [در آخرین به‌روزرسانی](https://google.\"\n\"github.io/comprehensive-rust/translation-report.html) یا [همگام‌سازی شده با \"\n\"آخرین نسخه دوره](https://google.github.io/comprehensive-rust/synced-\"\n\"translation-report.html).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"اگر می‌خواهید به این کار کمک کنید، لطفاً [دستورالعمل‌های ما](https://github.com/\"\n\"google/comprehensive-rust/blob/main/TRANSLATIONS.md) را برای چگونگی ادامه \"\n\"کار ببینید. ترجمه ها در [issue tracker](https://github.com/google/\"\n\"comprehensive-rust/issues/282) هماهنگ و کنترل می شوند.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"وقتی شروع به خواندن درباره Rust می کنید، خیلی سریع با [Cargo](https://doc.\"\n\"rust-lang.org/cargo/) ، ابزار استانداردی که در اکوسیستم Rust برای ساخت و \"\n\"اجرای برنامه های Rust استفاده می شود، آشنا خواهید شد. در اینجا می‌خواهیم یک \"\n\"مرور مختصر از در مورد کارگو و نحوه انطباق آن با اکوسیستم Rust و برنامه‌های آن \"\n\"را در این آموزش ارائه دهیم.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"راهنمای نصب\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**لطفا دستورالعمل را دنبال کنید <https://rustup.rs>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"این کار به شما امکان استفاده از ابزار ساخت Cargo (`cargo`) و  کامپایلر Rust \"\n\"(`rustc`) را می دهد. شما همچنین `rustup` را دریافت خواهید کرد، یک ابزار خط \"\n\"فرمان(CLI) که می توانید از آن برای نصب نسخه های مختلف کامپایلر استفاده کنید.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"پس از نصب Rust، باید ویرایشگر یا IDE خود را برای کار با Rust پیکربندی کنید. \"\n\"اکثر ویرایشگرها این کار را با ارتباط گرفتن با [rust-analyzer](https://rust-\"\n\"analyzer.github.io/) انجام می‌دهند، که قابلیت تکمیل خودکار و پرش به تعریف را \"\n\"برای [VS Code](https://code.visualstudio.com/)، [Emacs](https://rust-\"\n\"analyzer.github.io/manual.html#emacs)، [Vim/Neovim](https://rust-analyzer.\"\n\"github.io/manual.html#vimneovim)  و بسیاری دیگر فراهم می کند. همچنین یک IDE \"\n\"متفاوت به نام [RustRover](https://www.jetbrains.com/rust/) در دسترس است.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"در دبیان/اوبونتو، می‌توانید Cargo و  Rust و [Rust formatter](https://github.\"\n\"com/rust-lang/rustfmt) را نیز از طریق `apt` نصب کنید. با این حال، این به شما \"\n\"یک نسخه   قدیمی Rust  را جهت نصب می دهد و ممکن است منجر به رفتار غیرمنتظره \"\n\"برنامه شود. command مورد نظر این خواهد بود:\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"در macOS، می‌توانید از [Homebrew](https://brew.sh/) برای نصب Rust استفاده \"\n\"کنید، اما ممکن است یک نسخه قدیمی باشد. بنابراین توصیه می شود Rust را از سایت \"\n\"رسمی نصب کنید.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"اکوسیستم Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"اکوسیستم Rust از تعدادی ابزار تشکیل شده است که مهمترین آنها عبارتند از:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: کامپایلر Rust که فایل‌های `.rs` را به باینری و سایر فرمت‌های میانی \"\n\"تبدیل می‌کند.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: مدیر وابستگی Rust و build tool آن است. Cargo می داند که چگونه \"\n\"وابستگی ها را که معمولاً در <https://crates.io> میزبانی می شوند دانلود کند و \"\n\"هنگام ساخت پروژه آنها را به `rustc` منتقل می‌کند. Cargo همچنین دارای یک \"\n\"دستگاه تست داخلی است که برای اجرای unit test استفاده می شود.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"'rustup': نصب کننده و به روز رسانی rustchain ابزار. این ابزار برای نصب و به \"\n\"روز رسانی \\\"rustc\\\" و \\\"cargo\\\" در هنگام انتشار نسخه های جدید Rust استفاده \"\n\"می شود. علاوه بر این، \\\"rustup\\\" همچنین می تواند اسناد را برای کتابخانه \"\n\"استاندارد دانلود کند. شما می توانید چندین نسخه از Rust را در یک زمان نصب \"\n\"کنید و \\\"rustup\\\" به شما اجازه می دهد تا در صورت نیاز بین انها تغییر دهید.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"نکات کلیدی:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust یک برنامه سریع برای انتشار نسخه‌های جدید دارد و هر شش هفته یک نسخه جدید \"\n\"منتشر می شود. نسخه‌های جدید سازگاری با نسخه‌های قدیمی را حفظ می‌کنند --- به \"\n\"علاوه قابلیت‌های جدید را فعال می‌کنند.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"سه کانال انتشار وجود دارد: \\\"stable\\\"، \\\"beta\\\"، و \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"ویژگی های جدید در \\\"nightly\\\" آزمایش می شوند ، \\\"beta\\\" چیزی است که هر شش \"\n\"هفته \\\"stable\\\" می شود.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"همچنین می‌توان وابستگی‌ها را از  [registries](https://doc.rust-lang.org/cargo/\"\n\"reference/registries.html)،  پوشه‌ها و git و موارد دیگر برطرف کرد.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust همچنین نسخه [editions](https://doc.rust-lang.org/edition-guide/) دارد: \"\n\"نسخه فعلی Rust 2021 است. نسخه های قبلی Rust 2015 و Rust 2018 بودند.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"نسخه ها مجاز به ایجاد تغییرات backwards incompatible  در زبان هستند.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"برای جلوگیری از breaking code، نسخه‌ها اختیاری انتخاب می‌شوند که: شما نسخه‌ \"\n\"مورد نظر  برای crate خود از طریق فایل `Cargo.toml` انتخاب می‌کنید.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"برای جلوگیری از شکاف در اکوسیستم، کامپایلرهای Rust می توانند کدهای نوشته شده \"\n\"برای نسخه های مختلف را ترکیب کنند.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"لازم به ذکر است که استفاده از کامپایلر به طور مستقیم(rustc) و نه از طریق \"\n\"`cargo` بسیار غیرمعمول است (اکثر کاربران هرگز این کار را نمی کنند).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"ممکن است لازم به ذکر باشد که Cargo خود یک ابزار بسیار قدرتمند و جامع است. \"\n\"این است که قادر به بسیاری از ویژگی های پیشرفته از جمله اما نه محدود به:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"ساختار پروژه/بسته\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"وابستگی های Dev و وابستگی‌های   Runtime  Management/Caching\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"همچنین با command plugin فرعی (مانند [cargo clippy](https://github.com/rust-\"\n\"lang/rust-clippy)) قابل توسعه است.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"در [official Cargo Book](https://doc.rust-lang.org/cargo/) بیشتر بخوانید.\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"نمونه کد در این آموزش\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"برای این آموزش، بیشتر زبان Rust را از طریق مثال هایی که می توان از طریق \"\n\"مرورگر شما اجرا کرد، بررسی می کنیم. این کار راه اندازی را بسیار ساده تر می \"\n\"کند و تجربه ای ثابت را برای همه تضمین می کند.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"نصب Cargo همچنان پیشنهاد می شود:  چونکه انجام تمرینات را برای شما آسان تر می \"\n\"کند. در روز آخر، تمرین بزرگتری را انجام خواهیم داد که به شما نشان می دهد \"\n\"چگونه با وابستگی ها کار کنید و برای این کار شما به Cargo نیاز دارید.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"بلوک های کد در این دوره کاملاً تعاملی(interactive) هستند:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Edit me!\\\"\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"You can use <kbd>Ctrl + Enter</kbd> to execute the code when focus is in the \"\n\"text box.\"\nmsgstr \"برای اجرای کد زمانی که focus در text box است.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"اکثر نمونه های کد مانند نشان داده شده در بالا قابل ویرایش هستند. چند نمونه \"\n\"کد به دلایل مختلف قابل ویرایش نیستند:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"همینطورembedded playground نمی توانند unit tests را اجرا کنند. کد را کپی \"\n\"کنید و آن را در Playground واقعی باز کنید تا unit tests د را نشان دهید.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"در واقع embedded playgrounds در لحظه ای که از صفحه دور می شوید حالت پایدار \"\n\"خود را از دست می دهند! به همین دلیل است که دانش آموزان باید تمرینات را با \"\n\"استفاده از local Rust installation یا از طریق Playground حل کنند.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"اجرای کد به صورت لوکال با Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"اگر می خواهید کد را روی سیستم خود آزمایش کنید، ابتدا باید Rust را نصب کنید. \"\n\"این کار را با دنبال کردن [instructions in the Rust Book](https://doc.rust-\"\n\"lang.org/book/ch01-01-installation.html) انجام دهید. این باید به شما یک \"\n\"`rustc` و `cargo` کاربردی بدهد. در زمان نگارش، آخرین نسخه پایدار Rust دارای \"\n\"این version numberها است:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"شما همچنین می توانید از هر نسخه بعدی استفاده کنید، زیرا Rust سازگاری با نسخه \"\n\"های قبلی را حفظ می‌کند.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"با این کار، این مراحل را دنبال کنید تا از یکی از مثال‌های این آموزش، یک \"\n\"باینری Rust بسازید:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"روی دکمه \\\"کپی در کلیپ بورد\\\" در نمونه ای که می خواهید کپی کنید؛ کلیک کنید.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"از `cargo new exercise` برای ایجاد دایرکتوری `excerise/` جدید برای کد خود \"\n\"استفاده کنید:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"به `exercise/` بروید و از `cargo run` برای ساخت و اجرای باینری خود استفاده \"\n\"کنید:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"کد صفحه دیگر را در `src/main.rs` با کد خود جایگزین کنید. برای مثال، با \"\n\"استفاده از مثال در صفحه قبل، `src/main.rs` را شبیه به آن کنید.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"برای ساختن و اجرای باینری به روز شده خود از `cargo run` استفاده کنید:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"از `cargo check` برای بررسی سریع پروژه خود برای خطاها استفاده کنید، از \"\n\"`cargo build` برای کامپایل، بدون اجرای آن استفاده کنید. خروجی را در `target/\"\n\"debug/` برای ساخت اشکال زدایی معمولی خواهید یافت. برای تولید نسخه بهینه سازی \"\n\"شده در `target/release/` از `cargo build --release` استفاده کنید.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"با ویرایش `Cargo.toml` می‌توانید وابستگی‌هایی برای پروژه خود اضافه کنید. \"\n\"هنگامی که دستورات `cargo` را اجرا می کنید، به طور خودکار وابستگی های مورد \"\n\"نیاز را برای شما دانلود و کامپایل می‌کند.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"سعی کنید شرکت کنندگان کلاس را تشویق کنید تا Cargo را نصب کنند و از یک \"\n\"ویرایشگر محلی استفاده کنند. این زندگی آنها را آسان تر می کند زیرا آنها یک \"\n\"محیط توسعه عادی خواهند داشت.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"به روز اول خوش آمدید\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"این اولین روز از مبانی Rust است. ما امروز بخش‌های فابل توجه‌ای را پوشش خواهیم \"\n\"داد:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"سینتکس‌های مقدماتی: متغیرها, تایپ‌های عددی و تایپ‌های مرکب, enums, structs, \"\n\"مراجع, توابع, و متدها.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Types and type inference.\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"ساختارهای جریان کنترل: حلقه ها، شرط ها و غیره.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"تایپ های تعریف شده توسط کاربر: ساختارها و enums.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"تطابق الگو: تجزیه و تحلیل enums, structs و آرایه‌ها.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"برنامه زمانی\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب 10 دقیقه استراحت، این جلسه باید حدود 2 ساعت و 5 دقیقه طول بکشد. آن \"\n\"شامل:\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"لطفا به دانشجویان یادآوری کنید:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"آنها باید سؤالاتی را که به دست آوردند بپرسند، آنها را تا انتها ذخیره نکنید.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"کلاس قرار است تعاملی باشد و بحث‌ها بسیار مورد تشویق قرار می گیرند!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"به‌عنوان یک مربی، باید سعی کنید بحث‌ها را مرتبط نگه دارید، به عنوان مثال، \"\n\"بحث‌های مرتبط با نحوه انجام کارها توسط Rust در مقابل برخی زبان‌های دیگر را حفظ \"\n\"کنید. پیدا کردن تعادل مناسب می تواند سخت باشد، اما در مورد اجازه دادن به بحث \"\n\"اشتباه کنید، زیرا آنها بیشتر از ارتباط یک طرفه افراد را درگیر می کنند.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"احتمالاً سؤالات به این معنی است که ما در مورد چیزهایی قبل از اسلاید صحبت می \"\n\"کنیم.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"این اصلاً اشکالی ندارد! تکرار بخش مهمی از یادگیری است. به یاد داشته باشید که \"\n\"اسلایدها فقط یک پشتیبان هستند و شما می توانید هر طور که دوست دارید از آنها \"\n\"صرف نظر کنید.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"ایده روز اول نشان دادن چیزهای \\\"پایه\\\" در Rust است که باید در زبان های دیگر \"\n\"مشابهت های فوری داشته باشند. قسمت های پیشرفته تر Rust در روزهای بعد عرضه می \"\n\"شوند.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"اگر این را در کلاس درس تدریس می کنید، اینجا مکان خوبی برای مرور برنامه است. \"\n\"توجه داشته باشید که در پایان هر بخش یک تمرین و سپس یک استراحت وجود دارد. \"\n\"برای پوشاندن محلول تمرین بعد از استراحت برنامه ریزی کنید. زمان های ذکر شده \"\n\"در اینجا یک پیشنهاد برای حفظ دوره در برنامه است. با خیال راحت انعطاف پذیر \"\n\"باشید و در صورت لزوم تنظیم کنید!\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"این بخش ۱۵ دقیقه زمان می برد. این بخش شامل:\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"اسلاید\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"۱۰ دقیقه\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"۲ دقیقه\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"‏Rust یک زبان برنامه‌نویسی جدید است که [نسخه 1.0 آن در سال 2015 منتشر شد]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"زبان Rust, یک زبان کامپایل شده ایستا است که نقشی مشابه <span dir=ltr>C++</\"\n\"span> دارد\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` از `LLVM` به عنوان بک‌اند خود استفاده می‌کند.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\" راست از بسیاری از [بسترها و معماری‌ها](https://doc.rust-lang.org/nightly/\"\n\"rustc/platform-support.html) پشتیبانی می کند :\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"زبان Rust برای طیف گسترده‌ای از دستگاه‌ها استفاده می‌شود:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"میان‌افزار (firmware) و بوت‌لودرها (boot loaders)\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"نمایشگر‌های هوشمند,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"تلفن‌های همراه,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"رایانه‌های رومیزی,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"سرورها.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust در همان حوزه <span dir=ltr>C++</span> قرار می‌گیرد:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"انعطاف پذیری بالا.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"سطح کنترل بالا.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"می‌تواند به دستگاه‌های بسیار محدود مانند میکروکنترلرها مقیاس‌بندی شود.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"فاقد ران‌تایم (runtime)  یا جمع‌آوری زباله (garbage collection) است.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"بر قابلیت اطمینان و ایمنی بدون قربانی کردن عملکرد تمرکز دارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"برخی از نقاط قوت منحصر به فرد زبان Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_ایمنی حافظه زمان کامپایل_ - کل کلاس های باگ حافظه در زمان کامپایل جلوگیری \"\n\"می شود\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"هیچ متغیر مقدار‌دهی نشده‌ای (`uninitialized`) وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"هیچ آزادسازی دوباره‌ای وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"هیچ استفاده‌ای پس از آزادسازی وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"هیچ اشاره‌گر `NULL` وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"هیچ موتکس قفل شدهِ فراموش شده‌ای وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"هیچ وضعیت رقابتی (`data races`) بین رشته‌ها وجود ندارد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"تکرارکننده‌ها (`iterators`) هیچگاه نامعتبر نمی‌شوند..\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_بدون رفتار زمان اجرا تعریف نشده_ - کاری که دستور Rust انجام می دهد هرگز \"\n\"نامشخص باقی نمی ماند\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"دسترسی به آرایه با بررسی محدوده چک می‌شود.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"سرریز عدد صحیح تعریف شده است (پانیک یا `wrap-around`).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_ویژگی های زبان مدرن_ - به اندازه زبان های سطح بالاتر گویا و ارگونومیک است\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enumها و تطابق الگوها.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"جنریک‌ها.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"FFI بدون سربار.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"انتزاع‌هایی بدون هزینه.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"خطاهای کامپایل عالیست.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"مدیر وابستگی درون-ساختی.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"پشتیبانی درون-ساختی از تست نویسی.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"پشتیبانی عالی از LSP‌.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"وقت زیادی را اینجا صرف نکنید. تمام این نکات بعداً با عمق بیشتری پوشش داده \"\n\"خواهد شد.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"حتما از کلاس بپرسید که با چه زبان‌هایی تجربه دارند. بسته به پاسخ، می توانید \"\n\"ویژگی‌های مختلف Rust را برجسته کنید::\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"تجربه با C یا <span dir=ltr>C++</span> : زبان Rust با استفاده از بررسی کننده \"\n\"قرض‌گیری (اشاره به مبحث قرض گرفتن یا  `borrow`) ، یک سری کامل از _خطاهای زمان \"\n\"اجرا_ را از بین می‌برد .t  عملکردی مانند C و <span dir=ltr>C++</span> را \"\n\"دارید اما مشکلات عدم ایمنی حافظه را ندارید. علاوه بر این، شما یک زبان مدرن \"\n\"با ساختارهایی مانند تطابق الگو و مدیریت وابستگی داخلی دریافت می‌کنید.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"تجربه با Java، Go، Python، JavaScript...: شما همان ایمنی حافظه (memory \"\n\"safety ) را مانند آن زبان‌ها دریافت می‌کنید، به علاوه یک احساس زبان سطح بالا \"\n\"مشابه را تجربه خواهید کرد. علاوه بر این، شما عملکرد سریع و قابل پیش‌بینی \"\n\"مانند C و <span dir=ltr>C++</span> (بدون garbage collector) و همچنین دسترسی \"\n\"به سخت‌افزار سطح پایین (در صورت نیاز) دریافت می‌کنید.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) یک راه آسان برای اجرای برنامه \"\n\"های Rust کوتاه ارائه می دهد و پایه ای برای مثال ها و تمرین های این دوره است. \"\n\"برنامه \\\"Hello-world\\\" را که با آن شروع می شود اجرا کنید. دارای چند ویژگی \"\n\"مفید است:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"در زیر \\\"ابزارها\\\"، از گزینه \\\"rustfmt\\\" برای قالب بندی کد خود به روش \"\n\"\\\"استاندارد\\\" استفاده کنید.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust دارای دو \\\"نمایه\\\" اصلی برای تولید کد است: Debug (بررسی های زمان اجرا \"\n\"اضافی، بهینه سازی کمتر) و Release (بررسی های زمان اجرا کمتر، بهینه سازی \"\n\"زیاد). اینها در قسمت «اشکال‌زدایی» در بالا قابل دسترسی هستند.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"اگر علاقه مند هستید، از \\\"ASM\\\" در زیر \\\"...\\\" برای دیدن کد اسمبلی تولید شده \"\n\"استفاده کنید.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"هنگامی که دانش آموزان به سمت استراحت می روند، آنها را تشویق کنید تا \"\n\"playground  را باز کنند و کمی تجربه کنند. آنها را تشویق کنید که برگه را باز \"\n\"نگه دارند و در بقیه دوره چیزهایی را امتحان کنند. این به ویژه برای دانش‌آموزان \"\n\"پیشرفته که می‌خواهند درباره بهینه‌سازی‌های Rust یا مونتاژ تولید شده بیشتر \"\n\"بدانند مفید است.\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۴۰ دقیقه طول بکشد. آن شامل:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"بیایید به ساده ترین برنامه Rust ممکن یعنی یک برنامه Hello World کلاسیک \"\n\"بپردازیم:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"سلام 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"آنچه شما می‌بینید:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"توابع با `fn` معرفی می‌شوند.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"\"\n\"بلوک‌ها با پرانتزهای باز و بسته مانند C و <span dir=ltr>C++</span> محدود \"\n\"می‌شوند.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"تابع `main` نقطه ورود برنامه است.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"\"\n\"زبان Rust دارای ماکروهای hygienic است، <span dir=ltr>`println!`</span> یک \"\n\"نمونه از این است.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"رشته‌های Rust دارای انکودینگ UTF-8 هستند و می‌توانند شامل هر کاراکتر یونیکد \"\n\"باشند.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"این اسلاید سعی می کند دانشجویان با کد Rust احساس راحتی کنند. آنها در سه روز \"\n\"آینده خیلی از این کدها خواهند دید، بنابراین با یک چیز آشنا شروع می کنیم..\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"زبان Rust, زبان بسیار شبیه به سایر زبان‌های خانواده C/<span dir=ltr>C++</\"\n\"span>/Java است.یک زبان امری است (imperative) و سعی نمی‌کند چیزی را مگر اینکه \"\n\"کاملاً ضروری باشد، دوباره اختراع کند.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"زبان Rust, یک زبان مدرن با پشتیبانی کامل از چیزهایی مانند یونیکد است.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust از ماکروها برای موقعیت‌هایی استفاده می‌کند که می‌خواهید تعداد متغیری از  \"\n\"آرگومان‌ها داشته باشید (بدون [اورلودینگ](../control-flow-basics/functions.md) \"\n\"تابع).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"«هاجنیک» (`hygienic‍`) بودن ماکرو به این معنی است که آنها به طور تصادفی \"\n\"شناسه‌ها را از محدوده‌ای که در آن استفاده می‌شوند، ذخیره نمی‌کنند. ماکروهای Rust \"\n\"در واقع فقط [تا حدی هاجنیک](https://veykril.github.io/tlborm/decl-macros/\"\n\"minutiae/hygiene.html هستند.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"زبان Rust, یک زبان چند پارادایمی است. به عنوان مثال، دارای ویژگی‌های قدرتمند \"\n\"[برنامه نویسی شی‌گرا](https://doc.rust-lang.org/book/ch17-00-oop.html) است و \"\n\"در حالی که یک زبان فانکشنال(`functional‍`) نیست، شامل طیف وسیعی از [مفاهیم \"\n\"فانکشنال](https://doc.rust-lang.org/book/ch13-00-functional-features.html) \"\n\"است.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"زبان Rust از طریق سیستم تایپ استاتیک, ایمینی نوع را فراهم می‌کند. به صورت \"\n\"پیشفرض تعریف متغییر ها از نوع «غیر قابل تغییر» (immutable) است:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"برای نشان دادن اینکه متغیرها به طور پیش‌فرض تغییرناپذیر هستند، کامنت \\\"x = \"\n\"20\\\" را حذف کنید. برای اجازه دادن به تغییرات، کلمه کلیدی «mut» را اضافه کنید.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"«i32» در اینجا نوع متغیر است. این باید در زمان کامپایل شناخته شود، اما \"\n\"استنتاج نوع (که بعداً پوشش داده می شود) به برنامه نویس اجازه می دهد تا در \"\n\"بسیاری از موارد آن را حذف کند.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"در اینجا چند نوع پایه داخلی و نحو برای مقادیر تحت اللفظی هر نوع آورده شده \"\n\"است.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"انواع\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"مقادیر ثابت\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"اعداد صحیح علامت‌دار\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"\"\n\"<span dir=ltr><code class=hljs>-10</code>, <code class=hljs>0</code>, <code \"\n\"class=hljs>1_000</code>, <code class=hljs>123_i64</code></span>\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"اعداد صحیح مثبت\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"\"\n\"<span dir=ltr><code class=hljs>0</code>, <code class=hljs>123</code>, <code \"\n\"class=hljs>10_u16</code></span>\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"اعداد با ممیز شناور\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"\"\n\"<span dir=ltr><code class=hljs>3.14</code>, <code class=hljs>-10.0e20</\"\n\"code>, <code class=hljs>2_f32</code></span>\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"مقادیر عددی یونیکد\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"بولین‌ها\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"اندازه تایپ‌ها به شرح زیر است:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN`و `fN` به اندازه _N_ حافظه اشغال می‌کنند.,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` و `usize` به اندازه یک اشاره‌گر حافظه اشغال می‌کنند,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` به اندازه 32 بیت حافظه اشغال می‌کنند.,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` به اندازه 8 بیت حافظه اشغال می‌کنند.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"موارد اندکی وجود دارند که در بالا نشان داده نشده است:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"می‌توان همه خطوط زیرین `_` را در اعداد حذف کرد، آنها فقط برای خوانایی هستند.  \"\n\"«<span dir=ltr>`1_000`</span>  می‌تواند به صورت <span dir=ltr>`1000`</span> \"\n\"(یا <span dir=ltr>`10_00`</span>) نوشته شود و <span dir=ltr>`123_i64`</span> \"\n\"می‌تواند به صورت <span dir=ltr>`123i64`</span> نوشته شود».\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"این اولین بار است که تابعی غیر از \\\"main\\\" می بینیم، اما معنی آن باید واضح \"\n\"باشد: سه عدد صحیح می گیرد و یک عدد صحیح برمی گرداند. توابع بعداً با جزئیات \"\n\"بیشتر پوشش داده خواهد شد.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"حسابی بسیار شبیه به زبان های دیگر است، با تقدم مشابه.\"\n\n#: src/types-and-values/arithmetic.md\n#, fuzzy\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"در مورد سرریز اعداد صحیح چطور؟ در C و++ C سرریز اعداد صحیح _signed_ در واقع \"\n\"تعریف نشده است و ممکن است کارهای متفاوتی را در پلتفرم ها یا کامپایلرهای \"\n\"مختلف انجام دهد. در Rust تعریف شده است.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"«i32» را به «i16» تغییر دهید تا یک سرریز عدد صحیح را ببینید، که در یک ساخت \"\n\"اشکال‌زدایی وحشت می‌کند (بررسی می‌شود) و در یک نسخه انتشار می‌پیچد. گزینه های \"\n\"دیگری مانند سرریز، اشباع و حمل وجود دارد. اینها با نحو متد قابل دسترسی \"\n\"هستند، به عنوان مثال، `(a * b).saturating_add(b * c).saturating_add(c *a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"در واقع، کامپایلر سرریز عبارات ثابت را تشخیص می دهد، به همین دلیل است که \"\n\"مثال به یک تابع جداگانه نیاز دارد.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"زبان Rust برای تعیین نوع متغیر به نحوه استفاده از آن نگاه می‌کند:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"این اسلاید نشان می‌دهد که چگونه کامپایلر Rust با توجه به اعلان‌ها و استفاده‌های \"\n\"متغیر، انواع را استنتاج می‌کند. \"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"بسیار مهم است که تاکید کنیم متغیرهایی که به این صورت تعریف می‌شوند از «نوع \"\n\"داده پویای `any`» نیستند که بتواند هر نوعی باشند. وقتی که ما از **تعیین تایپ \"\n\"ضمنی** استفاده می‌کنیم در واقع مشابه زمانی هست که نوع داده را به صورت صریح \"\n\"اعلام میکنیم و کد های ماشین آنها دقیقا یکسان هستند. فقط با استفاده از  تعیین \"\n\"تایپ ضمنی میتوانید کد ها رو به صورت مختصرتر بنویسیم. \"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"هنگامی که هیچ چیز نوع یک عدد صحیح را محدود نمی کند، Rust به طور پیش فرض روی \"\n\"«i32» قرار می گیرد. گاهی اوقات در پیام های خطا به صورت «{integer}» نشان داده \"\n\"می شود. به طور مشابه، تایپ ممیز شناور پیش‌فرض «f64» است.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ERROR: no implementation for `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"دنباله فیبوناچی با «[0،1]» شروع می شود. برای n>1، عدد فیبوناچی n به صورت \"\n\"بازگشتی به عنوان مجموع اعداد فیبوناچی n-1 و n-2 محاسبه می شود.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"یک تابع fib(n) بنویسید که عدد فیبوناچی n را محاسبه کند. چه زمانی این عملکرد \"\n\"panic می شود؟\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"//حالت پایه\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"این را پیاده‌سازی کن\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// حالت بازگشتی\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"if Expressions\"\nmsgstr \"عبارت if\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"۴ دقیقه\"\n\n#: src/control-flow-basics.md\nmsgid \"break and continue\"\nmsgstr \"`break` و `continue`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"عبارات `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"شما [عبارت `if`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) رو به مانند دیگر زبان‌ها استفاده می‌کنید:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"صفر!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"biggish\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"huge\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"در کنار این موضوع, می‌توانید از if به عنوان یک عبارت با قابلیت بازگشت مقدار \"\n\"هم استفاده کنید. آخرین عبارت توی هر بلاک  if اون مقدار و نوع بازگشتی است:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"کوچک\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"بزرگ\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"اندازه عدد: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"از آنجایی که ‍`if` یک عبارت است و باید نوع خاصی داشته باشد، هر دو بلاک (`if` \"\n\"و `else`) باید از نوع یکسانی را باز گردانند.  در نظر بگیرید که اگر بعد از \"\n\"`x / 2` در مثال دوم `;` اضافه کنید، چه اتفاقی می افتد.\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"An `if` expression should be used in the same way as the other expressions. \"\n\"For example, when it is used in a `let` statement, the statement must be \"\n\"terminated with a `;` as well. Remove the `;` before `println!` to see the \"\n\"compiler error.\"\nmsgstr \"\"\n\"هنگامی که «if» در یک عبارت استفاده می شود، عبارت باید دارای «;» باشد تا آن \"\n\"را از عبارت بعدی جدا کند. \\\";\\\" را قبل از \\\"println!\\\" حذف کنید تا خطای \"\n\"کامپایلر را ببینید.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\"سه کلمه کلیدی حلقه ای در Rust وجود دارد: \\\"while\\\"، \\\"loop\\\" و \\\"for\\\":\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"حلقه‌های `while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[کلمه‌کلیدی`while` ](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) بسیار شبیه به سایر زبان‌ها عمل می‌کند.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"خروجی x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"حلقه [`for`](https://doc.rust-lang.org/std/keyword.for.html) در محدوده‌ای از \"\n\"مقادیر یا موارد موجود در یک مجموعه تکرار می‌شود:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"حلقه‌های «for» در  از مفهومی به نام «تکرارکننده‌ها» برای مدیریت تکرار در انواع \"\n\"مختلف محدوده/مجموعه استفاده می‌کنند. Iterators بعداً با جزئیات بیشتر مورد بحث \"\n\"قرار خواهند گرفت.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"توجه داشته باشید که حلقه `for` فقط تا `4` تکرار می شود. نحو `1..=5` را برای \"\n\"یک محدوده فراگیر نشان دهید.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`loop`](https://doc.rust-lang.org/std/keyword.loop.html) برای همیشه، تا \"\n\"زمانی که یک «break» ایجاد شود، حلقه می‌شود.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"اگر می‌خواهید بلافاصله تکرار بعدی را شروع کنید، از [`continue`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#continue-expressions) \"\n\"استفاده کنید.\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). With \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"اگر می‌خواهید زودتر از یک حلقه خارج شوید، از [`break`](https://doc.rust-lang.\"\n\"org/reference/expressions/loop-expr.html#break-expressions) استفاده کنید.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"Note that `loop` is the only looping construct which can return a non-\"\n\"trivial value. This is because it's guaranteed to only return at a `break` \"\n\"statement (unlike `while` and `for` loops, which can also return when the \"\n\"condition fails).\"\nmsgstr \"\"\n\"توجه داشته باشید که loop تنها ساختار حلقه‌ای است که یک مقدار **non-trivial** \"\n\"را برمی‌گرداند. این به دلیل این است که  تضمین می‌شود حداقل یک بار وارد آن شود \"\n\"(برخلاف حلقه‌های `while` و `for`).\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"کلیدواژه‌های `continue` و `break` هر دو می‌توانند به صورت اختیاری یک آرگومان \"\n\"برچسب (label) بگیرند که میتوان برای  خروج از حلقه‌های تو در تو استفاده می‌کرد:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elements searched: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"بلوک‌ها\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"یک بلوک در Rust حاوی دنباله ای از عبارات است که با پرانتزهای «{}» محصور شده \"\n\"است. هر بلوک دارای یک مقدار و یک نوع است که آخرین عبارت بلوک است:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"اگر آخرین عبارت با `;` پایان یابد، مقدار و نوع بازگشتی `()` است.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"می‌توانید نشان دهید که چگونه با تغییر خط آخر بلاک مقدار و نوع بازگشتی تغییر \"\n\"می‌کند. به عنوان مثال با اضافه کردن یا  حذف کردن یک `;` یا با استفاده از کلید \"\n\"واژه `return` تغییرات را اعمال کنید.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"‏محدوده (scope) یک متغیر محدود به بلاک محاصره‌کننده آن است.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"شما می توانید متغیرها را سایه بزنید، هم آنهایی که از اسکوپ‌های بیرونی هستند و \"\n\"هم متغیرهایی که از اسکوپ یکسان هستند:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"shadowed in inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"after: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"با افزودن یک «b» در بلوک داخلی در آخرین مثال، و سپس تلاش برای دسترسی به آن \"\n\"در خارج از بلوک، نشان دهید که دامنه یک متغیر محدود است.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variables' memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"سایه زدن با جهش متفاوت است، زیرا پس از سایه زدن، هر دو مکان حافظه متغیر به \"\n\"طور همزمان وجود دارند. هر دو با یک نام موجود هستند، بسته به جایی که از آن در \"\n\"کد استفاده می کنید.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"یک متغیر سایه‌دار می تواند انواع داده‌ای متفاوتی داشته باشد.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"سایه زدن در ابتدا مبهم به نظر می رسد، اما برای نگه داشتن مقادیر پس از  <span \"\n\"dir=ltr>`.unwrap()`</span> مناسب است.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"بعد اعلان تابع پارامترهای ورودی و نوع آن و سپس یک نوع برگشتی هستند (برخلاف \"\n\"برخی از زبان‌های برنامه‌نویسی).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"آخرین عبارت در بدنه تابع (یا هر بلوک دیگری) به عنوان مقدار برگشتی در نظر \"\n\"گرفته می‌شود. به همین سادگی <span dir=ltr>`;`</span> را  میتوان در انتهای \"\n\"عبارت حذف کنید.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the return type is omitted.\"\nmsgstr \"\"\n\"برخی از توابع هیچ مقدار برگشتی ندارند و «نوع یکه» <span dir=ltr>`()`</span> \"\n\"را برمی‌گردانند. اگر <span dir=ltr>`-> ()`</span> از بخش نوع برگشتی حذف شود، \"\n\"کامپایلر این را استنتاج خواهد کرد که هیچ نوع برگشتی وجود ندارد.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\"بارگذاری مجدد (overloading) پشتیبانی نمی‌شود -- هر تابع فقط یک پیاده‌سازی دارد.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"همیشه تعداد ثابتی از پارامترها را می گیرد. آرگومان های پیش فرض پشتیبانی نمی \"\n\"شوند. ماکروها را می توان برای پشتیبانی از توابع متغیر استفاده کرد.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"همیشه یک مجموعه واحد از انواع آرگومان‌ها را می‌گیرد.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"ماکروها در طول کامپایل به کد Rust گسترش می‌یابند و می‌توانند تعداد متغیری از \"\n\"آرگومان‌ها را بگیرند. آنها در پایان با یک «!» متمایز می شوند. کتابخانه \"\n\"استاندارد Rust شامل مجموعه ای از ماکروهای مفید است.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` یک خط را در خروجی استاندارد چاپ می کند و قالب بندی \"\n\"شرح داده شده در [`std::fmt`] (https://doc.rust-lang.org/std/fmt/index.html) \"\n\"را اعمال می کند. .\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` درست مانند `println!` کار می کند، اما نتیجه را به صورت \"\n\"یک رشته برمی گرداند.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` مقدار عبارت را ثبت کرده و آن را برمی گرداند.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` مقداری از کد را به عنوان هنوز پیاده‌سازی نشده علامت‌گذاری می‌کند. \"\n\"panic می کند.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` مقداری از کد را غیرقابل دسترسی علامت گذاری می کند. اگر \"\n\"اعدام شود وحشت می کند.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"نکته مهم این بخش این است که این امکانات مشترک و نحوه استفاده از آنها وجود \"\n\"دارد. اینکه چرا آنها به عنوان ماکرو تعریف می شوند و به چه چیزی گسترش می \"\n\"یابند، بسیار مهم نیست.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"این دوره شامل تعریف ماکروها نمی شود، اما در بخش بعدی استفاده از ماکروهای \"\n\"مشتق شده توضیح داده خواهد شد.\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\"‏[Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) به شرح \"\n\"زیر تعریف می‌شود، برای هر n<sub>۱</sub> دلخواه بزرگتر از صفر:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"\"\n\"اگر _n<sub>i</sub>_ = ۱ باشد، دنباله (sequence) در _n<sub>i</sub>_ پایان \"\n\"می‌یابد.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"\"\n\"اگر _n<sub>i</sub>_ زوج باشد، آنگاه _n<sub>i+۱</sub>_ = _n<sub>i</sub>_/۲.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\"اگر _n<sub>i</sub>_ فرد باشد، آنگاه _n<sub>i+۱</sub>_ = ۳ * _n<sub>i</sub>_ \"\n\"+ ۱.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"به عنوان مثال، با شروع از _n<sub>i</sub>_ = ۳:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"۳ فرد است، پس _n<sub>2</sub>_ = ۳ * ۳ + ۱ = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"۱۰ زوج است، پس _n<sub>3</sub>_  = ۱۰ / ۲ = ۵;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"۵ فرد است، پس _n<sub>4</sub>_ = ۳ * ۵ + ۱ = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"۱۶ زوج است، پس _n<sub>5</sub>_ = ۱۶ / ۲ = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"۸ زوج است، پس _n<sub>6</sub>_ = ۸ / ۲ = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"۴ زوج است، پس _n<sub>7</sub>_ = ۴ / ۲ = ۲;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"۲ زوج است، پس _n<sub>۸</sub>_ = ۱; و\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"دنباله به پایان می‌رسد.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"یک تابع بنویسید تا طول دنباله Collatz برای یک n اولیه داده شده را محاسبه کند.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"خوش آمد\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب 10 دقیقه استراحت، این جلسه باید حدود 2 ساعت و 35 دقیقه طول بکشد. \"\n\"آن شامل:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"این بخش باید حدود 35 دقیقه طول بکشد. این شامل:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"یک مقدار از نوع آرایه <span dir=ltr>`[T; N]`</span> دارای <span dir=ltr>`N`</\"\n\"span>  (یک ثابت زمان کامپایل) عنصر از نوع یکسان <span dir=ltr>`T`</span> \"\n\"است. توجه داشته باشید که طول آرایه بخشی از نوع آن است، به این معنی که <span \"\n\"dir=ltr>`[u8; 3]`</span> و <span dir=ltr>`[u8; 4]`</span> دو نوع متفاوت در \"\n\"نظر گرفته می‌شوند.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"سعی کنید به یک عنصر آرایه خارج از محدوده دسترسی داشته باشید. دسترسی های \"\n\"آرایه در زمان اجرا بررسی می شود. زنگ معمولاً می‌تواند این بررسی‌ها را از بین \"\n\"ببرد و با استفاده از Rust ناایمن از آنها جلوگیری کرد.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"ما می‌توانیم از مقادیر ثابت برای انتساب مقادیر به آرایه‌ها استفاده کنیم.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"ماکرو <span dir=ltr>`println!`</span> با پارامتر فرمت <span dir=ltr>`?`</\"\n\"span>   نیازمند پیاده سازی دیباگ است: <span dir=ltr>`{}`</span> خروجی پیش \"\n\"فرض را می‌دهد، <span dir=ltr>`{:?}`</span>  خروجی دیباگ را می‌دهد. انواع‌ای \"\n\"مانند اعداد صحیح و رشته‌ها خروجی پیش فرض را پیاده سازی می‌کنند، اما آرایه‌ها \"\n\"فقط خروجی دیباگ را پیاده سازی می‌کنند. این بدان معناست که ما باید در اینجا از \"\n\"خروجی دیباگ استفاده کنیم.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"اضافه کردن <span dir=ltr>`#`</span>، مانند <span dir=ltr>`{a:#?}`</span>، یک \"\n\"فرمت «چاپ زیبا» را فراخوانی می‌کند که می‌تواند خواندن آن را آسان تر کند.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"مانند آرایه‌ها، تاپل‌ها نیز دارای طول ثابت هستند.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"تاپل‌ها مقادیر انواع مختلف را در یک نوع مرکب کنار هم قرار می‌دهند.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"می‌توان به فیلدهای یک تاپل با استفاده از نقطه و شماره اندیس مقدار، مانند \"\n\"<span dir=ltr>`t.0`</span>، <span dir=ltr>`t.1`</span> دسترسی پیدا کرد.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"تاپل خالی `()` به عنوان `unit type` نامیده می‌شود و نشان‌دهنده عدم وجود مقدار \"\n\"بازگشتی است، مشابه `void` در زبان‌های دیگر.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"عبارت `for` از تکرار روی آرایه ها (اما نه تاپل ها) پشتیبانی می کند.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"این قابلیت از ویژگی `IntoIterator` استفاده می‌کند، اما ما هنوز به آن \"\n\"پرداخته‌ایم.\"\n\n#: src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked, while debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"ماکرو `assert_ne!` در اینجا جدید است. همچنین ماکروهای `assert_eq!` و `assert!\"\n\"` وجود دارد. این‌ها همیشه بررسی می‌شوند، در حالی که، گونه‌های فقط اشکال‌زدایی \"\n\"مانند `debug_assert!` در نسخه‌های  ریلیز کامپایل نمی‌شوند.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"هنگام کار با تاپل ها و سایر مقادیر ساختاریافته، معمول است که بخواهید مقادیر \"\n\"داخلی را در متغیرهای محلی استخراج کنید. این را می توان به صورت دستی با \"\n\"دسترسی مستقیم به مقادیر داخلی انجام داد:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"left: {left}, right: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"با این حال، Rust همچنین از استفاده از تطبیق الگو برای تخریب یک مقدار بزرگتر \"\n\"در بخش های تشکیل دهنده آن پشتیبانی می کند:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"الگوهای استفاده شده در اینجا \\\"irrefutable\\\" هستند، به این معنی که کامپایلر \"\n\"می تواند به طور ایستا تأیید کند که مقدار سمت راست `=` ساختاری مشابه الگو \"\n\"دارد.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"نام متغیر یک الگوی انکارناپذیر است که همیشه با هر مقداری مطابقت دارد، از این \"\n\"رو می‌توانیم از «let» برای اعلام یک متغیر استفاده کنیم.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust همچنین از استفاده از الگوها در شرطی‌ها پشتیبانی می‌کند و امکان مقایسه \"\n\"برابری و تخریب ساختار را در همان زمان فراهم می‌کند. این شکل از تطبیق الگو \"\n\"بعداً با جزئیات بیشتری مورد بحث قرار خواهد گرفت.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"مثال‌های بالا را ویرایش کنید تا خطای کامپایلر در زمانی که الگو با مقدار \"\n\"مطابقت‌شده مطابقت ندارد نشان داده شود.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"آرایه ها می توانند آرایه های دیگری نیز داشته باشند:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"نوع این متغیر چیست؟\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"از آرایه‌ای مشابه مثال بالا برای نوشتن تابع <span dir=ltr>`transpose`</span> \"\n\"استفاده کنید که یک ماتریس را جابجا می‌کند (ردیف‌ها را به ستون‌ها تبدیل می‌کند):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"کد زیر را در <https://play.rust-lang.org/> کپی کرده و توابع را پیاده‌سازی \"\n\"کنید:\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: این را زمانی که پیاده‌سازی‌تان تمام شد حذف کنید.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"‏// <-- این کامنت باعث می‌شود rustfmt یک خط جدید اضافه کند.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"جابجا شده است: {:#?}\\\"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۵۵ دقیقه طول بکشد. آن شامل:\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A reference provides a way to access another value without taking ownership \"\n\"of the value, and is also called \\\"borrowing\\\". Shared references are read-\"\n\"only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"یک مرجع راهی برای دسترسی به مقدار دیگری بدون مسئولیت ارزش فراهم می کند و به \"\n\"آن «قرض» نیز می گویند. مراجع مشترک فقط خواندنی هستند و داده های ارجاع شده \"\n\"نمی توانند تغییر کنند.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"یک مرجع مشترک به یک نوع `T` دارای نوع `&T` است. یک مقدار مرجع با عملگر `&` \"\n\"ساخته می شود. عملگر `*` یک مرجع را \\\"ارجاع مجدد\\\" می کند و مقدار آن را به \"\n\"دست می دهد.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"راست بطور استاتیک مراجع تعلیق شده (dangling) را ممنوع می‌کند:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"گفته می‌شود که یک مرجع مقداری را که به آن ارجاع می‌دهد \\\"borrow\\\" (قرض) می‌کند، \"\n\"و این مدل خوبی برای دانش‌آموزانی است که با اشاره‌گرها آشنا نیستند: کد می‌تواند \"\n\"از مرجع برای دسترسی به مقدار استفاده کند، اما همچنان متعلق به متغیر اصلی \"\n\"است. این دوره در روز 3 به جزئیات بیشتری در مورد مالکیت خواهد پرداخت.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"مراجع به عنوان اشاره گر پیاده سازی می شوند و یک مزیت کلیدی این است که می \"\n\"توانند بسیار کوچکتر از چیزی باشند که به آن اشاره می کنند. دانش آموزانی که با \"\n\"C یا C++ آشنا هستند، مراجع را به عنوان اشاره گر تشخیص می دهند. بخش‌های بعدی \"\n\"دوره به این موضوع می‌پردازد که چگونه Rust از اشکالات ایمنی حافظه ناشی از \"\n\"استفاده از نشانگرهای خام جلوگیری می‌کند.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\"Rust به طور خودکار برای شما مراجع ایجاد نمی کند - `&` همیشه مورد نیاز است.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"راست در برخی موارد به‌طور خودکار از Dereference می‌کند، به‌ویژه هنگام فراخوانی \"\n\"متدها (<span dir=ltr>`ref_x.count_ones()`</span> را امتحان کنید).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"در این مثال، `r` قابل تغییر است تا بتوان آن را مجدداً اختصاص داد (`r = &b`). \"\n\"توجه داشته باشید که این `r` را دوباره متصل می کند، به طوری که به چیز دیگری \"\n\"اشاره می کند. این با C++ متفاوت است، جایی که انتساب به یک مرجع مقدار مرجع را \"\n\"تغییر می دهد.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"یک مرجع مشترک اجازه تغییر مقداری را که به آن ارجاع می دهد را نمی دهد، حتی \"\n\"اگر آن مقدار قابل تغییر باشد. \\\"*r = \\\"X\\\" را امتحان کنید.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust طول عمر همه مراجع را ردیابی می کند تا اطمینان حاصل شود که آنها به \"\n\"اندازه کافی عمر می کنند. ارجاعات آویزان نمی توانند در Rust ایمن رخ دهند. \"\n\"`x_axis` یک ارجاع به `point` برمی‌گرداند، اما «نقطه» زمانی که تابع برمی‌گردد، \"\n\"تخصیص داده می‌شود، بنابراین کامپایل نمی‌شود.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"هنگامی که به مالکیت در زبان راست رسیدیم، بیشتر در مورد «قرض دادن» صحبت \"\n\"خواهیم کرد.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"مراجع انحصاری، همچنین به عنوان مراجع قابل تغییر شناخته می شوند، اجازه می \"\n\"دهند مقداری را که به آن ارجاع می دهند تغییر دهند. آنها نوع `mut &T` دارند.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"انحصاری\\\" به این معنی است که فقط از این مرجع می توان برای دسترسی به مقدار \"\n\"استفاده کرد. هیچ مرجع دیگری (اشتراک‌گذاری شده یا انحصاری) نمی‌تواند همزمان \"\n\"وجود داشته باشد، و تا زمانی که مرجع انحصاری وجود دارد، نمی‌توان به مقدار \"\n\"ارجاع‌شده دسترسی داشت. زمانی که `x_coord` زنده است، `&point.0` بسازید یا \"\n\"`point.0` را تغییر دهید.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"حتماً تفاوت بین «let mut x_coord: &i32» و «let x_coord: &mut i32» را یادداشت \"\n\"کنید. مورد اول یک مرجع مشترک را نشان می دهد که می تواند به مقادیر مختلف متصل \"\n\"شود، در حالی که دومی نشان دهنده یک مرجع انحصاری به یک مقدار قابل تغییر است.\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"یک برش به شما امکان می‌دهد نما (view) از یک مجموعه بزرگتر داشته باشید:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"برش‌ها داده‌ها را از نوع برش‌شده قرض می‌گیرند.\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\"پرسش: اگر <span dir=ltr>`a[3]`</span> را درست قبل از چاپ <span dir=ltr>`s`</\"\n\"span> تغییر دهید چه اتفاقی می‌افتد؟\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"ما با قرض گرفتن <span dir=ltr>`a`</span> و مشخص کردن شاخص‌های شروع و پایان در \"\n\"براکت‌ها، برش (slice) ایجاد می‌کنیم.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"اگر برش از شاخص ۰ شروع شود، سینتکس راست به ما اجازه می‌دهد شاخص شروع را حذف \"\n\"کنیم (یعنی عدد صفر را  ننویسیم)، به این معنی که <span dir=ltr>`&a[0..a.\"\n\"len()]`</span>  و <span dir=ltr>`&a[..a.len()]`</span> یکسان  هستند.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"در مورد شاخص آخر نیز همینطور است، بنابراین <span dir=ltr>`&a[2..a.len()]`</\"\n\"span> و <span dir=ltr>`&a[2..]`</span>  یکسان هستند.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"یک روش ساده برای برش کل آرایه، این است که از <span dir=ltr>`&a[..]`</span> \"\n\"استفاده کنیم.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"<span dir=ltr>`s`</span> یک مرجع به برش i32 است. توجه داشته باشید که نوع \"\n\"<span dir=ltr>`s`</span> (<span dir=ltr>`&[i32]`</span>) دیگر طول آرایه را \"\n\"ذکر نمی‌شود. این به ما امکان می‌دهد محاسباتی را روی برش‌هایی با اندازه‌های مختلف \"\n\"انجام دهیم.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"برش‌ها همیشه از یک شیء دیگر قرض می‌گیرند. در این مثال، <span dir=ltr>`a`</\"\n\"span> باید حداقل به اندازه طول‌عمر برش ما، زنده (در محدوده) باقی بماند. \"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"پرسش در مورد تغییر <span dir=ltr>`a[3]`</span> می تواند یک بحث جالب را شروع \"\n\"کند، اما پاسخ‌اش این است که به دلایل ایمنی حافظه، نمی‌توانید این کار را از \"\n\"طریق <span dir=ltr>`a`</span> در این مرحله از اجرا انجام دهید، اما می‌توانید \"\n\"داده‌ها را از هر دو <span dir=ltr>`a`</span> و <span dir=ltr>`s`</span> به \"\n\"طور ایمن بخوانید. این کار قبل از ایجاد برش و دوباره بعد از <span \"\n\"dir=ltr>`println!`</span> کار میکند، زمانی که برش دیگر استفاده نمی شود. \"\n\"جزئیات بیشتری در بخش بررسی‌کننده‌قرض (the borrow checker) توضیح خواهیم داد.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"حالا می‌توانیم دو نوع رشته‌ای را در راست درک کنیم:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"`str&` تکه‌ای از بایت‌های رمزگذاری‌شده UTF-8، شبیه به `[u8]&` است.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"`str&` تکه‌ای از بایت‌های رمزگذاری‌شده UTF-8، شبیه به `[u8]&` است.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"دنیا\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"سلام\\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"<span dir=ltr>`&str`</span>  یک برش رشته‌ای را معرفی می‌کند، که یک مرجع \"\n\"غیرقابل تغییر به داده‌های رشته‌ای رمزشده UTF-8 است که در یک بلوک حافظه ذخیره \"\n\"شده است. لیترال های رشته‌ای <span dir=ltr>`String`</span>  (`”Hello”`) در \"\n\"باینری برنامه ذخیره می‌شوند.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"در راست نوع ‍<span dir=ltr>`String`</span> یک wrapper بر روی یک بردار از \"\n\"بایت‌هاست. مانند <span dir=ltr>`Vec<T>`</span>، یک نوع Owned است.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"مانند بسیاری از انواع دیگر، <span dir=ltr>`String::from()`</span> یک رشته از \"\n\"یک لیترال رشته ایجاد می‌کند. <span dir=ltr>`String::new()`</span> که رشته \"\n\"خالی جدید ایجاد می‌کند که داده های رشته‌ای می‌توانند با استفاده از متدهای <span \"\n\"dir=ltr>`push()`</span> و <span dir=ltr>`push_str()`</span> به آن اضافه شوند.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"ماکرو <span dir=ltr>`format!()`</span> یک راه راحت برای ایجاد یک رشته Owned \"\n\"از مقادیر پویا است. مثل فرمت قابل پذیرش توسط ماکرو <span dir=ltr>`println!\"\n\"()`</span> است.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"می‌توانید برش‌های `&str` را از `String` از طریق `&` و انتخابی محدوده انتخاب \"\n\"کنید. اگر محدوده بایتی را انتخاب کنید که با مرزهای نویسه تراز نباشد، عبارت \"\n\"وحشت می کند. تکرار کننده `chars` روی کاراکترها تکرار می شود و بر تلاش برای \"\n\"درست کردن مرزهای کاراکتر ترجیح داده می شود.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"برای برنامه‌نویسان <span dir=ltr>`C++`</span>: <span dir=ltr>`&str`</span>را  \"\n\"به عنوان <span dir=ltr>`const char*`</span> در <span dir=ltr>`C++`</span> \"\n\"درنظر بگیرید، اما یک فرق مهم این است که در راست که همیشه به یک رشته معتبر در \"\n\"حافظه اشاره می کند. راست نوع <span dir=ltr>`String`</span>معادل تقریبی <span \"\n\"dir=ltr>`std::string`</span> در <span dir=ltr>`C++`</span> است (با این تفاوت \"\n\"که فقط می‌تواند حاوی بایت‌های رمزشده UTF-8 باشد و هرگز از بهینه‌سازی Small-\"\n\"String استفاده نمی کند).\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"رشته‌های بایت به شما امکان می‌دهند مستقیماً یک مقدار <span dir=ltr>`&[u8]`</\"\n\"span>  ایجاد کنید:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"رشته‌های خام به شما امکان می دهند یک مقدار <span dir=ltr><code \"\n\"class=hljs>&str</code></span> با غیرفعال کردن فرارها ایجاد کنید:  `r\\\"\\\\n\\\" \"\n\"== \\\"\\\\\\\\n\\\"`.شما می‌توانید با استفاده از تعداد برابر `#` در دو طرف دابل‌کوت \"\n\"دابل‌کوت‌ها، دابل‌کوت‌ها را جاسازی کنید:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"ما چند توابع کاربردی برای هندسه سه بعدی ایجاد خواهیم کرد که نقطه ای را به \"\n\"عنوان `[f64;3]` نشان می دهد. تعیین امضاهای عملکرد به عهده شماست.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// اندازه یک بردار را با جمع مربعات مختصات آن محاسبه کنید\\n\"\n\"// و سپس جذر آن را بگیرید. از متد `sqrt()` برای محاسبه جذر استفاده کنید، مثل \"\n\"`v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// یک بردار را با محاسبه اندازه‌ی آن و تقسیم تمام مختصات آن\\n\"\n\"// بر آن اندازه، نرمال‌سازی کنید.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// از `main` زیر برای تست کار خود استفاده کنید.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"اندازه‌ی یک بردار واحد: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"اندازه‌ی {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"اندازه‌ی {v:?} پس از نرمال‌سازی: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// اندازه‌ی بردار داده شده را محاسبه کنید.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// اندازه‌ی بردار را به 1.0 تغییر دهید بدون اینکه جهت آن تغییر کند.\\n\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"این بخش حدود ۵۰ دقیقه طول خواهد کشید. شامل موارد زیر است:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"‏مانند C و C++، زبان Rust از ساختارهای سفارشی پشتیبانی می‌کند:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"‏\\\"{} {} ساله است\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"پیتر\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"ایوری\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"جکی\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"نکات کلیدی:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"‏ساختارها (Structs) در Rust مانند C یا C++ عمل می‌کنند.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"‏مانند C++ و برخلاف C، برای تعریف یک نوع نیازی به `typedef` نیست.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"‏برخلاف C++، در Rust بین ساختارها ارث‌بری وجود ندارد.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"این زمان مناسبی است تا به مردمان اطلاع دهیم که انواع مختلفی از ساختارها وجود \"\n\"دارد.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"ساختارهای بدون اندازه (مانند `struct Foo;`) ممکن است زمانی استفاده شوند که \"\n\"می‌خواهید یک صفت (trait) را بر روی یک نوع پیاده‌سازی کنید، اما داده‌ای ندارید \"\n\"که بخواهید در خود مقدار ذخیره کنید.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"اسلاید بعدی ساختارهای تاپل (Tuple structs) را معرفی خواهد کرد، که زمانی \"\n\"استفاده می‌شوند که نام فیلدها مهم نیستند.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"اگر از قبل متغیرهایی با نام‌های مناسب دارید، می‌توانید ساختار را با استفاده از \"\n\"یک روش میانبر ایجاد کنید.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"سینتکس `..avery` به ما اجازه می‌دهد که اکثر فیلدها را از ساختار قدیمی کپی \"\n\"کنیم بدون اینکه همه آن‌ها را صریحاً تایپ کنیم. این باید همیشه آخرین عنصر باشد.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"اگر نام فیلدها بی‌اهمیت هستند، می‌توانید از ساختار tuple استفاده کنید:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"این اغلب برایsingle-field wrapper (که newtypes نامیده می‌شوند) استفاده می‌شود:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"از یک دانشمند حوزه موشک در ناسا بپرس\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Newtypes یک راه مناسب برای رمزگذاری اطلاعات اضافی در مورد مقدار در یک نوع \"\n\"اولیه (primitive type) است، به عنوان مثال:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"این عدد در برخی واحدها اندازه گیری می‌شود:  `Newtons` در مثال بالا.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"مقدار زمانی که ایجاد شد مقداری اعتبارسنجی را دریافت کرد، بنابراین دیگر لازم \"\n\"نیست در هر بار استفاده دوباره آن را تأیید کنید: `PhoneNumber(String)` یا \"\n\"`OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"نحوه افزودن مقدار `f64` به نوع `Newtons` را با دسترسی به single field در نوع \"\n\"جدید نشان دهید.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust معمولاً چیزهای غیر واضح را دوست ندارد، مانند automatic unwrapping  یا \"\n\"به‌عنوان‌مثال استفاده از booleanها به عنوان اعداد صحیح.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"مبحث Operator overloading در روز سوم مورد بحث قرار می گیرد (generics).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"این مثال، اشاره ظریفی به شکست [مدارگَرد آب‌و‌هوای مریخ](https://en.wikipedia.\"\n\"org/wiki/Mars_Climate_Orbiter) است.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"کلمه کلیدی `enum` اجازه ایجاد نوع داده‌ای را می دهد که دارای چندین گونه مختلف \"\n\"است:\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Simple variant\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Tuple variant\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Struct variant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"در این پیچ: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"`Enum`ها به شما امکان می دهند مجموعه‌ای از مقادیر مختلف با نوع‌های مختلف را \"\n\"تحت یک نوع جمع آوری کنید.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` یک type با گونه‌های مختلف است. دو مقدار `Direction` وجود دارد:  \"\n\"`Direction::Left` و `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"الان زمان خوبی برای مقایسه ساختارها و `Enum`هاست:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"در هر دو، می توانید یک نسخه ساده بدون فیلد (unit struct) یا یکی با انواع \"\n\"مختلف فیلد (variant payloads) داشته باشید.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"شما حتی می توانید انواع مختلف یک `Enum` را با ساختارهای جداگانه پیاده سازی \"\n\"کنید، اما در آن صورت آنها از همان نوعی که در ابتدا تعریف کردید یعنی `Enum` \"\n\"نخواهند بود.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\"Rust از حداقل فضا برای ذخیره‌سازی متمایز‌کننده (discriminant) استفاده می‌کند.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"در صورت لزوم، یک عدد صحیح با کوچکترین اندازه مورد نیاز را ذخیره می‌کند\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"اگر مقادیر متغیر مجاز همه الگوهای bit را پوشش ندهند، از الگوهای bit نامعتبر \"\n\"برای رمزگذاری متمایز کننده (یک  \\\"niche optimization\\\") استفاده می‌کند. برای \"\n\"مثال، `Option<&u8>` یک اشاره‌گر به یک عدد صحیح یا `NULL` را برای نوع `None` \"\n\"ذخیره می‌کند.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"شما می توانید در صورت نیاز (به عنوان مثال، برای سازگاری با C) discriminant \"\n\"را کنترل کنید:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"بدون `repr`، نوع discriminant دو بایت حافظه اشغال میکند، زیرا 10001 در 2 \"\n\"بایت جا می‌شود.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/smart-pointers/box.md\n#: src/borrowing/shared.md src/error-handling/result.md\nmsgid \"More to Explore\"\nmsgstr \"برای کاوش بیشتر\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"زبان Rust دارای چندین بهینه‌سازی دارد که می‌تواند برای کاهش فضای اشغال شده \"\n\"توسط`Enum`ها استفاده کند.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"بهینه‌سازی اشاره‌گر `NULL`: برای برخی از انواع، Rust تضمین می‌کند که <span \"\n\"dir=ltr>`size_of::<T>()`</span>  برابر با <span dir=ltr>`size_of::\"\n\"<Option<T>>()`</span> است.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"کد نمونه, اگر می‌خواهید نشان دهید که نمایش بیت به بیت در عمل چگونه ممکن است \"\n\"به نظر برسد. مهم است توجه داشته باشید که کامپایلر هیچ تضمینی در مورد این \"\n\"نمایش نمی‌دهد، بنابراین این کاملاً ناایمن است.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"متغیرهای ثابت در زمان کامپایل ارزیابی می شوند و مقادیر آنها در هر جایی که \"\n\"استفاده می شوند، درج می شوند:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"طبق [کتاب Rust RFC](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html)، این موارد هنگام استفاده درج می شوند.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"فقط توابعی که با `const` علامت گذاری شده اند می توانند در زمان کامپایل برای \"\n\"تولید مقادیر `const` فراخوانی شوند. با این حال، توابع `const` را می توان در \"\n\"زمان اجرا فراخوانی کرد (بر خلاف تعریف متغییری ثابت)\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"به این نکته اشاره کنید که `const` شبیه `constexpr` در <span dir=ltr>`C++`</\"\n\"span> عمل می‌کند.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"با اینکه خیلی رایج نیست که اگر کسی به یک یک مقدار ثابت  که در زمان اجرا \"\n\"ارزیابی می‌شود از `const` استفاده کند اما مفید تر و ایمن تر از استفاده \"\n\"`static`ها هستند.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"متغیرهای ایستا در طول عمر کل اجرای برنامه خواهند ماند و بنابراین منتقل \"\n\"نمی‌شوند:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"به RustOS 3.14 خوش آمدید\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"همانطور که در [کتاب Rust RFC](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html) ذکر شده، این موارد هنگام استفاده درج نمی شوند و دارای یک مکان \"\n\"حافظه واقعی هستند. این برای کدهای ناایمن و `embedded` مفید است و متغیر در کل \"\n\"اجرای برنامه زنده می ماند. هنگامی که یک مقدار با اسکوپ گلوبال نیاز نیست, \"\n\"استفاده از `const` ترجیح داده می‌شود.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"از سوی دیگر، `static` بسیار شبیه به یک متغیر سراسری `const` یا `mutable` در \"\n\"<span dir=ltr>`C++`</span> هستند.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` هویت شی را فراهم می‌کند: آدرسی در حافظه و حالتی که توسط انواع با \"\n\"تغییرپذیری داخلی مانند <span dir=ltr>`Mutex<T>`</span> را نیاز دارد.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"از آنجایی که متغیرهای `static` از هر رشته‌ای (thread) قابل دسترسی هستند، باید \"\n\"`Sync` باشند. تغییرپذیری داخلی از طریق یک [`Mutex`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html)، اتمی یا مشابه امکان پذیر است. البته که \"\n\"داشتن متغییر های استاتیک قابل تغییر هم امکان پذیر هست اما برای این کار نیاز \"\n\"به همگام سازی دستی دارند.  بنابراین هر دسترسی به آنها نیاز به کد `unsafe` \"\n\"دارد. ما در فصل Unsafe Rust به استاتیک های قابل تغییر [mutable statics](../\"\n\"unsafe/mutable-static-variables.md) نگاه خواهیم کرد.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"داده‌های `thread_local` را با ماکروی <span dir=ltr>`std::thread_local`</span> \"\n\"می‌توان ایجاد کرد.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"تایپ  alias، نامی برای نوع دیگر ایجاد می کند. این دو نوع را می توان به جای \"\n\"هم استفاده کرد.\"\n\n#: src/user-defined-types/aliases.md\n#, fuzzy\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// Aliases are more useful with long, complex types:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"برنامه‌نویسان C این را شبیه به `typedef` تشخیص می‌دهند.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"ما یک ساختار داده برای نمایش یک رویداد در یک سیستم کنترل آسانسور ایجاد \"\n\"خواهیم کرد. این به شما بستگی دارد که انواع و عملکردها را برای ساخت رویدادهای \"\n\"مختلف تعریف کنید. از `#[derive(Debug)]` استفاده کنید تا اجازه دهید انواع با \"\n\"`{:?}` قالببندی شوند.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"این تمرین فقط به ایجاد و پر کردن ساختارهای داده نیاز دارد تا `main` بدون خطا \"\n\"اجرا شود. بخش بعدی این دوره دریافت داده‌ها از این ساختارها را پوشش می‌دهد.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: add required variants\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// A direction of travel.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// The car has arrived on the given floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// The car doors have opened.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// The car doors have closed.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// A floor button was pressed in the elevator car.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"یک مسافر طبقه همکف دکمه بالا را فشار داده است: {:?} \\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"ماشین به طبقه همکف رسیده است: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"در ماشین باز شد: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"یک مسافر دکمه طبقه 3 را فشار داده است: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"در ماشین بسته شد: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"ماشین به طبقه ۳ رسیده است: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// A button was pressed.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// The car has arrived at the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// The car's doors have opened.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// The car's doors have closed.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// A floor is represented as an integer.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// A user-accessible button.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// A button in the elevator lobby on the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// A floor button within the car.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"به روز ۲ خوش آمدید\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"اکنون که مقدار زیادی از Rust را دیده ایم، امروز بر روی سیستم تایپ Rust تمرکز \"\n\"خواهیم کرد:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"تطبیق الگو: استخراج داده از ساختارها.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"متد‌ها: ارتباط توابع با تایپ ها.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Traits: رفتارهایی که توسط چندین تایپ مشترک هستند.\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Generics: پارامتری‌سازی تایپ‌ها بر اساس تایپ‌های دیگر.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"کتابخانه‌استاندارد تایپ‌ها و traits: یک گردش در کتابخانه‌ استاندارد و ارزشمند \"\n\"Rust.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب ۱۰ دقیقه استراحت، این جلسه باید حدود ۲ ساعت و ۱۰ دقیقه طول بکشد. \"\n\"این شامل:\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\n#: src/error-handling.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"این بخش باید حدود ۱ ساعت طول بکشد. این شامل:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"کلمه کلیدی `match` به شما اجازه می‌دهد یک مقدار را با یک یا چند _الگو_ مطابقت \"\n\"دهید. مقایسه‌ها از بالا به پایین انجام می‌شوند و اولین تطابق انتخاب می‌شود.\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"الگوها می توانند مقادیر ساده ای باشند، شبیه به `switch` در C و ++C:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"ترک کردن\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"حرکت در اطراف\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"ورودی شماره\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"حروف کوچک: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"یک چیز دیگر\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"الگوی `_` یک الگوی عام (Wildcard) است که با هر مقداری مطابقت دارد. عبارت‌ها \"\n\"باید جامع باشند، به این معنی که همه احتمالات را پوشش دهند، بنابراین `_` اغلب \"\n\"به عنوان آخرین حالت برای پوشش تمامی موارد استفاده می‌شود.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"`match` می‌تواند به عنوان یک عبارت استفاده شود. دقیقاً مانند `if`، هر شاخه \"\n\"match باید از یک تایپ باشد. تایپ بازگشتی، تایپ آخرین عبارت در بلاک است، اگر \"\n\"وجود داشته باشد. در مثال بالا، تایپ بازگشتی `()` است.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"یک متغیر در الگو (`key` در این مثال) یک اتصال ایجاد می‌کند که می‌توان از آن در \"\n\"بخش مطابقت استفاده کرد.\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\"یک guard در عبارت `match` باعث می‌شود که آن شاخه تنها در صورتی مطابقت داشته \"\n\"باشد که شرط برقرار باشد.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"بهتر است که اشاره کنید چطوری میتوان از کاراکترهای خاص در الگو استفاده کرد\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` به عنوان `or`\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` برای تعیین همه محدوده یا تا جایی که میتوان گسترش یابد\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\"<span dir=ltr><code class=hljs>1..=5</code></span> نمایانگر یک محدوده خاص است\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` نمایانگر هر حالتی است\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"guard های تطبیق به عنوان یک ویژگی سینتکس جداگانه دسته بندی می‌شوند, زمانی مهم \"\n\"و ضروری هستند که بخواهیم ایده های پیچیده تر از الگوهای ساده بیان کنیم.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"آنها با عبارت `if` جداگانه ای در داخل یک شاخه تطبیق هستند یکسان نیستند. یک \"\n\"عبارت `if` در داخل بلاک شاخه (پس از <span dir=ltr>`=>`</span>) پس از ورود به \"\n\"اون شاخه خاص صدا زده میشود. اگر شرط `if` برقرار نباشد کاری به سایر شاخه های \"\n\"عبارت `match` اصلی ندارد.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"شرط تعریف شده در guard با کمک `|` به شرط های تطبیق الگو اضافه می‌شود.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"ساختارها\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"مانند tuple ها، ساختار را نیز می توان با تطبیق تخریب کرد:\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"در y = {y} ، سایر فیلدها نادیده گرفته شدند\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"تغییر مقادیر لیترال در foo برای مطابقت با سایر الگوها.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"اضافه کردن یک فیلد جدید به Foo و ایجاد تغییرات مورد نیاز.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"تشخیص تفاوت بین یک گرفتن متغییر و یک عبارت ثابت می‌تواند دشوار باشد. سعی کنید \"\n\"‍`2` را در شاخه دوم به یک متغیر تغییر دهید و خواهید دید که  کار نمی‌کند. آن را \"\n\"به یک `const` تغییر دهید و خواهید دید که دوباره کار می‌کند.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"مانند tuple ها، enum ها را نیز می توان با تطبیق تخریب کرد:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"الگوها همچنین می‌توانند برای متصل کردن متغیرها به بخش‌هایی از مقادیر شما \"\n\"استفاده شوند. این روش به شما اجازه می‌دهد ساختار انواع خود را بررسی کنید. \"\n\"بیایید با یک نوع ساده `enum` شروع کنیم:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"نمی توان  {n}  را به دو قسمت مساوی تقسیم کرد\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} تقسیم به دو است {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"با عرض‌پوزش، خطایی رخ داده است: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"اینجا از شاخه‌ها برای _تجزیه_ مقدار `Result` استفاده کرده‌ایم. در شاخه‌ی اول، \"\n\"`half` به مقداری که درون حالت `Ok` قرار دارد متصل شده است. در شاخه‌ی دوم، \"\n\"`msg` به پیام خطا متصل شده است.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"عبارت `if`/`else` یک نوع enum بازمی‌گرداند که بعداً با استفاده از `match` از \"\n\"هم باز می‌شود.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"می توانید با اضافه کردن یک فیلد دیگر `None` به `enum`  اضافه کنید و نمایش \"\n\"خطاها هنگام اجرای کد، را تست کنید. مکان هایی را که کد شما اکنون ناقص است و \"\n\"نحوه تلاش کامپایلر برای ارائه نکاتی به شما را نشان دهید.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"مقادیر در حالات enum تنها پس از تطبیق الگو قابل دسترسی هستند.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"نشان دهید چه اتفاقی می‌افتد وقتی جستجو (مطابقت) ناقص است. به مزیتی که \"\n\"کامپایلر Rust فراهم می‌کند، اشاره کنید که تأیید می‌کند همه حالات پوشش داده \"\n\"شده‌اند.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\"نتیجه‌ی تابع `divide_in_two` را در متغیر `result` ذخیره کنید و آن را در یک \"\n\"حلقه با استفاده از `match` بررسی کنید. این کد کامپایل نمی‌شود زیرا `msg` \"\n\"هنگام مطابقت مصرف می‌شود. برای رفع این مشکل، به جای `result` از `result&` \"\n\"استفاده کنید. این کار باعث می‌شود `msg` به صورت یک ارجاع باشد و مصرف نشود. \"\n\"این ویژگی که به نام [\\\"match ergonomics\\\"](https://rust-lang.github.io/\"\n\"rfcs/2005-match-ergonomics.html) شناخته می‌شود، در Rust 2018 معرفی شده است. \"\n\"اگر می‌خواهید از نسخه‌های قدیمی‌تر Rust پشتیبانی کنید، به جای `msg` از `ref \"\n\"msg` در الگو استفاده کنید.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"زبان Rust چند ساختار کنترل جریان دارد که با سایر زبان‌ها متفاوت است. این \"\n\"ساختارها برای مطابقت الگو استفاده می‌شوند:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"عبارت `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"عبارت `let else`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"عبارت `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[عبارت `if let`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions)  به شما امکان می‌دهد بسته به اینکه آیا یک مقدار با \"\n\"یک الگو مطابقت دارد، کدهای مختلفی را اجرا کنید:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"slept for {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"برای حالت رایج مطابقت با یک الگو و بازگشت از تابع، از [`let else`](https://\"\n\"doc.rust-lang.org/rust-by-example/flow_control/let_else.html) استفاده کنید. \"\n\"در اینجا، حالت \\\"else\\\" باید منحرف شود (مانند `return`، `break`، یا `panic` \"\n\"- به غیر از اینکه از انتهای بلوک خارج شود).\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"نه یک hex digit\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"یک string خالی دریافت کردم\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"هیچ‌کدام\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"نتیجه: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"مانند `if let`، یک دستور [`while let`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#predicate-pattern-loops) وجود دارد که مقادیر \"\n\"مقابل الگو به طور مکرر (تکرار شونده‌ای) بررسی می‌کند:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"در اینجا [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) تا زمانی که رشته خالی نشده است، `Some(c)` را \"\n\"برمی‌گرداند و پس از آن `None` را باز می‌گرداند. استفاده از `while let` به ما \"\n\"این امکان را می‌دهد که به طور مداوم از میان همه موارد عبور کنیم.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"برخلاف دستور `match` دستور `if let` همه حالت های ممکن را برای تطبیق الگو \"\n\"پشتیبانی نمیکند. اگر می‌خواهید همه حالت را پوشش دهید از دستور `match` استفاده \"\n\"کنید.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"یک استفاده رایج از دستور `if let`، رسیدگی به مقادیر `Some` هنگام کار با \"\n\"`Option` است.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"برخلاف دستور `match` دستور `if let`  از <span dir=ltr>`=>`</span> برای تطبیق \"\n\"الگو استفاده نمیکند.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"`if-let` ها می‌توانند به صورت تو در تو انباشته شوند، همان‌طور که در اینجا نشان \"\n\"داده شده است. ساختار `let-else` از فلت کردن این کدهای تو در تو پشتیبانی \"\n\"می‌کند. نسخه‌ی پیچیده را برای دانش‌آموزان بازنویسی کنید تا بتوانند تبدیل آن را \"\n\"مشاهده کنند.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"نسخه‌ی بازنویسی شده به صورت زیر است:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"توجه داشته باشید که حلقه `while let` تا زمانی که مقادیر مقابل الگو طبیق \"\n\"داشته باشد (شرط برقرار باشد)، ادامه خواهد داشت.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"شما می‌توانید حلقه‌ی `while let` را به صورت یک حلقه بی‌پایان با یک دستور `if` \"\n\"بازنویسی کنید که در صورت عدم وجود مقداری برای باز کردن (unwrap) از `()name.\"\n\"pop`، شکسته می‌شود. `while let` یک Syntactic sugar برای این سناریو ارائه \"\n\"می‌دهد.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"بیایید یک ارزیاب ساده بازگشتی برای عبارات حسابی بنویسیم.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"نوع `Box` در اینجا یک اشاره‌گر هوشمند است و در ادامه دوره به طور مفصل مورد \"\n\"بررسی قرار خواهد گرفت. یک عبارت می‌تواند با استفاده از `Box::new` \\\"باکس\\\" \"\n\"شود، همان‌طور که در تست‌ها مشاهده می‌شود. برای ارزیابی یک عبارت باکس‌شده، از \"\n\"عملگر deref (`*`) برای \\\"باز کردن باکس\\\" استفاده کنید: `eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"برخی از عبارات نمی‌توانند ارزیابی شوند و خطا برمی‌گردانند. نوع استاندارد \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) یک enum است که یا نمایانگر یک مقدار موفقیت‌آمیز (`Ok(Value)`) یا یک خطا \"\n\"(`Err(String)`) است. ما این نوع را به‌طور مفصل‌تر در آینده پوشش خواهیم داد.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"کد را کپی و در Rust Playground پیست کنید و پیاده‌سازی تابع `eval` را آغاز \"\n\"کنید. محصول نهایی باید تست‌ها را پاس کند. ممکن است استفاده از `()!todo` و \"\n\"گذراندن تست‌ها به صورت تک به تک مفید باشد. همچنین می‌توانید به طور موقت یک تست \"\n\"را با استفاده از `[ignore]#` نادیده بگیرید:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"اگر زودتر تمام کردید، سعی کنید یک تست بنویسید که منجر به تقسیم بر صفر یا \"\n\"سرریز عدد صحیح شود. چگونه می‌توانید این را با استفاده از `Result` به جای \"\n\"panic مدیریت کنید؟\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// An operation to perform on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// An expression, in tree form.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// An operation on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// A literal value\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"تقسیم بر صفر\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust به شما این امکان را می‌دهد که توابعی را با تایپ جدید خود مرتبط کنید. این \"\n\"کار را با استفاده از بلوک `impl` انجام می‌دهید:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// No receiver, a static method\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Exclusive borrowed read-write access to self\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Shared and read-only borrowed access to self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"ضبط {} دور برای {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Lap {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"// Exclusive ownership of self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"مسابقه {} به پایان رسید، کل زمان دور: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"جایزه بزرگ موناکو\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"آرگومان‌های `self` \\\"گیرنده\\\" را مشخص می‌کنند - شیئی که متد بر روی آن عمل \"\n\"می‌کند. چندین گیرنده رایج برای یک متد وجود دارد:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`self&`: شیئی را از فراخواننده با استفاده از یک مرجع مشترک و غیرقابل تغییر \"\n\"قرض می‌گیرد. شیء می‌تواند بعداً دوباره استفاده شود.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`mut self&`: شیء را از فراخواننده با استفاده از یک مرجع منحصر به فرد و قابل \"\n\"تغییر قرض می‌گیرد. شی پس از آن نمی‌تواند دوباره استفاده شود تا زمانی که مرجع \"\n\"به پایان برسد.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: مالکیت شیء را به عهده می‌گیرد و آن را از فراخواننده منتقل می‌کند. متد \"\n\"مالک شیء می‌شود. شیء هنگامی که متد باز می‌گردد حذف خواهد شد، مگر اینکه مالکیت \"\n\"آن به‌طور صریح منتقل شود. مالکیت کامل به‌طور خودکار به معنای قابلیت تغییر نیست.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: مشابه مورد بالا، اما متد می‌تواند شیء را تغییر دهد.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"بدون گیرنده: این تبدیل به یک متد استاتیک در ساختار می‌شود. معمولاً برای ایجاد \"\n\"سازنده‌ها استفاده می‌شود که به‌طور معمول `new` نامیده می‌شوند.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"مفید است که متدها را با مقایسه آنها با توابع معرفی کنیم.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"متدها بر روی یک نمونه از تایپی (مانند struct یا enum) فراخوانی می‌شوند، و \"\n\"پارامتر اول نمونه را به‌عنوان نمونه `self`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"توسعه‌دهندگان ممکن است تصمیم بگیرند از متدها استفاده کنند تا از نحو گیرنده \"\n\"متد بهره‌برداری کنند و به سازمان‌دهی بهتر کد کمک کنند. با استفاده از متدها، \"\n\"می‌توانیم تمامی کدهای پیاده‌سازی را در یک مکان قابل پیش‌بینی نگه داریم.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"استفاده از کلمه کلیدی `self`، که به‌عنوان گیرنده متد عمل می‌کند، را مشخص کنید.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"نشان دهید که `self` یک اصطلاح کوتاه‌شده برای `self: Self` است و شاید نشان \"\n\"دهید که چگونه نام struct نیز می‌تواند استفاده شود.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"توضیح دهید که `Self` یک نام مستعار نوع برای تایپ است که بلوک `impl` در آن \"\n\"قرار دارد و می‌تواند در سایر بخش‌های بلوک استفاده شود.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"توجه کنید که چگونه `self` مانند سایر ساختارها استفاده می‌شود و dot notation \"\n\"می‌تواند برای ارجاع به فیلدهای فردی به کار رود.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"این ممکن است زمان مناسبی باشد برای نشان دادن تفاوت بین `self&` و `self` با \"\n\"تلاش برای اجرای متد `finish` دو بار.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"فراتر از حالت‌های مختلف `self`، تایپ‌های [special wrapper types](https://doc.\"\n\"rust-lang.org/reference/special-types-and-traits.html) نیز وجود دارند که \"\n\"به‌عنوان تایپ‌های گیرنده مجاز هستند، مانند `<Box<Self`.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"راست به شما این امکان را می‌دهد که با استفاده از traits بر روی تایپ‌ها انتزاع \"\n\"ایجاد کنید. آنها مشابه interface ها هستند:\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"/// Return a sentence from this pet.\\n\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// Print a string to the terminal greeting this pet.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"یک trait مجموعه‌ای از متدها را تعریف می‌کند که تایپ‌ها باید آن‌ها را داشته باشند \"\n\"تا بتوانند آن trait را پیاده‌سازی کنند.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"در بخش \\\"Generics\\\"، در ادامه خواهیم دید که چگونه می‌توانیم عملکردی بسازیم که \"\n\"generic بر روی تمام تایپ‌های که یک trait را پیاده‌سازی کرده‌اند باشد.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"اوه تو چثدر زیبا هستی! اسمت چیه؟ {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"  Woof، نام من {} است!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"برای پیاده‌سازی `Trait` برای `Type`، از بلوک `{ .. } impl Trait for Type` \"\n\"استفاده می‌کنید.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"برخلاف رابط‌های Go، داشتن فقط متدهای مطابقت‌دهنده کافی نیست: نوع `Cat` با متد \"\n\"`()talk` به‌طور خودکار `Pet` را برآورده نمی‌کند، مگر اینکه در یک بلوک `impl \"\n\"Pet` قرار داشته باشد.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Traits ممکن است پیاده‌سازی‌های پیش‌فرض برای برخی از متدها ارائه دهند. \"\n\"پیاده‌سازی‌های پیش‌فرض می‌توانند به تمامی متدهای trait وابسته باشند. در این \"\n\"مورد، `greet` ارائه شده است و به `talk` وابسته است.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"یک trait می‌تواند نیاز داشته باشد که تایپ‌هایی که آن را پیاده‌سازی می‌کنند، \"\n\"همچنین traits دیگری به نام _supertraits_ را نیز پیاده‌سازی کنند. در اینجا، هر \"\n\"نوعی که `Pet` را پیاده‌سازی کند، باید `Animal` را نیز پیاده‌سازی کند.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} has {} legs\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"این گاهی اوقات \\\"trait inheritance\\\" نامیده می‌شود، اما دانش‌آموزان نباید \"\n\"انتظار داشته باشند که این رفتار مشابه وراثت در برنامه‌نویسی شیءگرا (OO) باشد. \"\n\"این تنها یک الزام اضافی بر روی پیاده‌سازی‌های یک trait را مشخص می‌کند.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"تایپ‌های مرتبط تایپ‌هایی جایگزین هستند که توسط پیاده‌سازی trait تأمین می‌شوند.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"تایپ‌های مرتبط گاهی اوقات \\\"تایپ‌های خروجی\\\" نیز نامیده می‌شوند. نکته کلیدی این \"\n\"است که پیاده‌ساز، نه فراخواننده، این تایپ را انتخاب می‌کند.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"بسیاری از traitهای کتابخانه استاندارد دارای نوع‌های مرتبط هستند، از جمله \"\n\"اپراتورهای حسابی و `Iterator`.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Traitهای پشتیبانی‌شده می‌توانند به‌طور خودکار برای تایپ‌های سفارشی شما پیاده‌سازی \"\n\"شوند، به شرح زیر:\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// Default trait adds `default` constructor.\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// Clone trait adds `clone` method.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// Debug trait adds support for printing with `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} vs. {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"انتساب (Derivation) با استفاده از ماکروها پیاده‌سازی می‌شود و بسیاری از \"\n\"crateها ماکروهای مفیدی برای اضافه کردن قابلیت‌های کاربردی ارائه می‌دهند. به \"\n\"عنوان مثال، `serde` می‌تواند پشتیبانی از ترتیب را برای یک ساختار با استفاده \"\n\"از `[derive(Serialize)]#` فراهم کند.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"تمرین: Trait Logger\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"بیایید یک ابزار لاگ‌ ساده طراحی کنیم که از یک trait به نام `Logger` با متد \"\n\"`log` استفاده کند. کدی که ممکن است پیشرفت خود را لاگ کند می‌تواند یک `impl \"\n\"Logger&` دریافت کند. در زمان تست، این ممکن است پیام‌ها را در فایل‌ لاگ تست \"\n\"قرار دهد، در حالی که در نسخه تولید، پیام‌ها به یک سرور لاگ ارسال می‌شود.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"با این حال، `StderrLogger` که در زیر داده شده است، تمامی پیام‌ها را بدون توجه \"\n\"به سطح جزئیات لاگ می‌کند. وظیفه شما این است که نوع `VerbosityFilter` را \"\n\"بنویسید که پیام‌هایی با سطح جزئیات بالاتر از حداکثر سطح تعیین‌شده را نادیده \"\n\"بگیرد.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"این الگو الگوی رایجی است: یک ساختارکه یک پیاده‌سازی trait را در بر می‌گیرد و \"\n\"همان trait را پیاده‌سازی می‌کند و در این فرآیند به آن رفتار اضافی می‌دهد. چه \"\n\"نوع‌های دیگری از پوشش‌دهنده‌ها ممکن است در یک ابزار لاگ مفید باشند؟\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Log a message at the given verbosity level.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"اطلاعات بیشتر={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"FYI\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"اوهو\\\"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: Define and implement `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"/// Only log messages up to the given verbosity level.\\n\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب ۱۰ دقیقه استراحت، این جلسه باید حدود ۳ ساعت و ۱۵ دقیقه طول بکشد. \"\n\"آن شامل:\"\n\n#: src/generics.md src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۴۵ دقیقه طول بکشد. آن شامل:\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Trait\"\n\n#: src/generics.md\nmsgid \"dyn Trait\"\nmsgstr \"dyn Trait\"\n\n#: src/generics.md\nmsgid \"Exercise: Generic min\"\nmsgstr \"تمرین: Generic `min`\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust از generics پشتیبانی می‌کند که به شما امکان می‌دهد الگوریتم‌ها یا \"\n\"ساختارهای داده (مانند مرتب‌سازی یا درخت دودویی) را بر روی تایپ‌های استفاده‌شده \"\n\"یا ذخیره‌شده تخصیص دهید.\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"شماره ای را انتخاب کرد: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"یک تاپل انتخاب کرد: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"سگ\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"گربه\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"Rust تایپ T را بر اساس تایپ آرگومان‌ها و مقدار بازگشتی استنباط می‌کند.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"این شبیه به الگوهای در ++C است، اما Rust تابع generic را بلافاصله به صورت \"\n\"جزئی کامپایل می‌کند، بنابراین آن تابع باید برای تمام تایپ‌هایی که با محدودیت‌ها \"\n\"مطابقت دارند معتبر باشد. به عنوان مثال، سعی کنید تابع `pick` را طوری تغییر \"\n\"دهید که اگر `n == 0` باشد، مقدار `even + odd` را برگرداند. حتی اگر فقط \"\n\"نمونه‌سازی تابع `pick` با اعداد صحیح استفاده شود، Rust همچنان آن را نامعتبر \"\n\"در نظر می‌گیرد. اما ++C اجازه این کار را به شما می‌دهد.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"کد generic بر اساس محل‌های فراخوانی به کد non-generic تبدیل می‌شود. این یک \"\n\"انتزاع بدون هزینه است: شما دقیقاً همان نتیجه‌ای را دریافت می‌کنید که گویی \"\n\"ساختارهای داده را بدون انتزاع به صورت دستی کدنویسی کرده‌اید.\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"می‌توانید از generic‌ ها برای انتزاع نوع فیلد مشخص استفاده کنید:\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} و {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_سوال:_ چرا `T` در عبارت `{}<impl<T> Point<T` دوبار مشخص شده است؟ آیا این \"\n\"تکراری نیست؟\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"این به این دلیل است که این یک بخش پیاده‌سازی generic برای تایپ generic است. \"\n\"آن‌ها به‌طور مستقل generic هستند.\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"این به این معناست که این متدها برای هر نوع `T` تعریف شده‌اند.\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"این امکان وجود دارد که `{ .. }<impl Point<u32` را بنویسید.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` هنوز هم generic است و می‌توانید از `<Point<f64` استفاده کنید، اما \"\n\"متدهای موجود در این بلوک تنها برای `<Point<u32` در دسترس خواهند بود.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"سعی کنید یک متغیر جدید با `let p = Point { x: 5, y: 10.0 };` بسازید. کد را \"\n\"به‌روزرسانی کنید تا نقاطی که دارای عناصر با تایپ‌های مختلف هستند را مجاز کند، \"\n\"با استفاده از دو تایپ متغیر، مانند `T` و `U`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\"Traits نیز می‌توانند generic باشند، درست مانند تایپ و توابع. پارامترهای یک \"\n\"trait زمانی که استفاده می‌شود، تایپ‌های مشخصی پیدا می‌کنند.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"تبدیل شده از integer: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"تبدیل‌شده از bool: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\\\"{from_int:?}, {from_bool:?}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\"`From` trait در ادامه دوره پوشش داده خواهد شد، اما [تعریف آن در مستندات \"\n\"`std`](https://doc.rust-lang.org/std/convert/trait.From.html) ساده است.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"پیاده‌سازی‌های trait نیازی به پوشش تمام پارامترهای تایپ ممکن ندارند. در اینجا، \"\n\"`Foo::from(\\\"hello\\\")` کامپایل نخواهد شد زیرا پیاده‌سازی `<From<&str` برای \"\n\"`Foo` وجود ندارد.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"traitهای Generic تایپ‌ها را به‌عنوان \\\"ورودی\\\" می‌پذیرند، در حالی که تایپ مرتبط \"\n\"تایپ از \\\"خروجی\\\" هستند. یک trait می‌تواند پیاده‌سازی‌های مختلفی برای تایپ‌های \"\n\"ورودی متفاوت داشته باشد.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"در واقع، Rust نیاز دارد که حداکثر یک پیاده‌سازی از یک trait برای هر تایپ `T` \"\n\"تطابق داشته باشد. بر خلاف برخی زبان‌های دیگر، Rust هیچ قاعده‌ای برای انتخاب \"\n\"\\\"مشخص‌ترین\\\" تطابق را ندارد. در حال حاضر، کارهایی برای اضافه کردن این \"\n\"پشتیبانی وجود دارد که به آن [ویژه‌سازی](https://rust-lang.github.io/rfcs/1210-\"\n\"impl-specialization.html) می‌گویند.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"هنگام کار با generic‌ها، معمولاً می‌خواهید نیاز داشته باشید که تایپ، trait ترید \"\n\"خاص را پیاده‌سازی کنند، تا بتوانید متدهای آن trait را فراخوانی کنید.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"You can do this with `T: Trait`:\"\nmsgstr \"\"\n\"می‌توانید این کار را با استفاده از `T: Trait` یا `impl Trait` انجام دهید:\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"سعی کنید یک `NonClonable` بسازید و آن را به `duplicate` پاس دهید.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"زمانی که چندین ترید لازم است، از `+` برای ترکیب آن‌ها استفاده کنید.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"یک عبارت `where` را نشان دهید، زیرا دانش‌آموزان هنگام خواندن کد با آن مواجه \"\n\"خواهند شد.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\"اگر تعداد پارامترها زیاد باشد، استفاده از عبارت `where` باعث می‌شود که امضای \"\n\"تابع مرتب‌تر و خواناتر باشد.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"این ویژگی‌های اضافی دارد که آن را قدرتمندتر می‌کند.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"اگر کسی بپرسد، ویژگی اضافی این است که تایپ در سمت چپ `:` می‌تواند دلخواه \"\n\"باشد، مانند `<Option<T`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"توجه داشته باشید که Rust (هنوز) پشتیبانی از ویژه‌سازی را ندارد. به عنوان \"\n\"مثال، با توجه به `duplicate` اصلی، اضافه کردن یک پیاده‌سازی ویژه‌شده مانند \"\n\"`duplicate(a: u32)` نامعتبر است.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"مشابه با محدودیت‌های trait، می‌توان از `impl Trait` syntax در آرگومان‌های تابع \"\n\"و مقادیر بازگشتی استفاده کرد:\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"قابل دیباگ: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"`impl Trait` به شما اجازه می‌دهد با تایپ‌هایی کار کنید که نمی‌توانید نام ببرید. \"\n\"معنی `impl Trait` در موقعیت‌های مختلف کمی متفاوت است.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"برای یک پارامتر، `impl Trait` شبیه به یک پارامتر generic ناشناخته با یک \"\n\"محدودیت trait است.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"برای تایپ بازگشتی، به این معناست که تایپ بازگشتی تایپ مشخصی است که trait را \"\n\"پیاده‌سازی می‌کند، بدون اینکه تایپ را نام ببرید. این می‌تواند زمانی مفید باشد \"\n\"که نمی‌خواهید تایپ مشخص را در یک API عمومی افشا کنید.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"Inference در موقعیت بازگشتی دشوار است. تابعی که `impl Foo` را برمی‌گرداند، \"\n\"تایپ مشخصی را که برمی‌گرداند انتخاب می‌کند، بدون اینکه آن را به طور صریح در \"\n\"منبع بنویسد. تابعی که تایپ generic مانند `collect<B>() -> B` را برمی‌گرداند، \"\n\"می‌تواند هر تایپ که `B` را برآورده می‌کند بازگرداند، و ممکن است فراخوانی‌کننده \"\n\"نیاز به انتخاب یکی از آن‌ها داشته باشد، مانند `let x: Vec<_> = foo.collect()` \"\n\"یا با استفاده از ()<turbofish، `foo.collect::<Vec<_>`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"نوع `debuggable` چیست؟ سعی کنید .. = () :let debuggable` را امتحان کنید تا \"\n\"ببینید پیام خطا چه چیزی را نشان می‌دهد.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\"علاوه بر استفاده از تریدها برای فراخوانی استاتیک از طریق generic‌ها، Rust \"\n\"همچنین از استفاده از آن‌ها برای فراخوانی داینامیک با تایپ‌های حذف‌شده از طریق \"\n\"اشیاء trait پشتیبانی می‌کند:\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miau!\\\"\"\n\n#: src/generics/dyn-trait.md\n#, fuzzy\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"// Use the system timer as a delay provider.\\n\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"سلام، شما کی هستید؟ {}\\\"\"\n\n#: src/generics/dyn-trait.md\n#, fuzzy\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"// Uses type-erasure and dynamic dispatch.\\n\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\"Generic‌ها، از جمله `impl Trait`، از monomorphization برای ایجاد یک نمونه \"\n\"تخصصی از تابع برای هر تایپ مختلفی که با آن نمونه‌سازی شده استفاده می‌کنند. این \"\n\"بدان معناست که فراخوانی یک متد trait از درون یک تابع generic همچنان از \"\n\"فراخوانی استاتیک استفاده می‌کند، زیرا کامپایلر اطلاعات کامل تایپ را دارد و \"\n\"می‌تواند پیاده‌سازی trait مربوط به تایپ را مشخص کند.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\"زمانی که از `dyn Trait` استفاده می‌شود، به‌جای آن از فراخوانی داینامیک از طریق \"\n\"یک [virtual method table](https://en.wikipedia.org/wiki/\"\n\"Virtual_method_table) (vtable) استفاده می‌کند. این بدان معناست که یک نسخه \"\n\"واحد از `fn dynamic` وجود دارد که بدون توجه به تایپ `Pet` که وارد می‌شود، \"\n\"استفاده می‌شود.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\"زمانی که از `dyn Trait` استفاده می‌شود، شی trait باید پشت یک تایپ واسط قرار \"\n\"داشته باشد. در این مورد، این تایپ واسط یک ارجاع است، اگرچه تایپ‌های \"\n\"اشاره‌گرهای هوشمند مانند `Box` نیز می‌توانند استفاده شوند (این موضوع در روز \"\n\"سوم نشان داده خواهد شد).\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\"در زمان اجرا، یک `dyn Pet&` به‌صورت یک \\\"اشاره‌گر چاق\\\" (fat pointer) نمایان \"\n\"می‌شود، یعنی یک جفت از دو اشاره‌گر: یکی از اشاره‌گرها به شیء مشخصی که `Pet` را \"\n\"پیاده‌سازی می‌کند اشاره دارد و دیگری به vtable برای پیاده‌سازی ترید آن نوع \"\n\"اشاره می‌کند. هنگام فراخوانی متد `talk` بر روی `dyn Pet&`، کامپایلر آدرس تابع \"\n\"`talk` را در vtable جستجو کرده و سپس تابع را فراخوانی می‌کند و اشاره‌گر به \"\n\"`Dog` یا `Cat` را به آن تابع پاس می‌دهد. کامپایلر نیازی به دانستن تایپ مشخص \"\n\"`Pet` برای انجام این کار ندارد.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\"یک `dyn Trait` به‌عنوان \\\"تایپ ‌حذف‌ شده\\\" (type-erased) در نظر گرفته می‌شود، \"\n\"زیرا دیگر در زمان کامپایل اطلاعاتی درباره تایپ مشخص نداریم.\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"در این تمرین کوتاه، شما یک تابع `min`generic را پیاده‌سازی خواهید کرد که \"\n\"حداقل از دو مقدار را تعیین می‌کند، با استفاده از trait [`Ord`](https://doc.\"\n\"rust-lang.org/stable/std/cmp/trait.Ord.html).\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: implement the `min` function used in `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"'7'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"goodbye\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"bat\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"armadillo\\\"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"[`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html) trait و \"\n\"[`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.Ordering.html) \"\n\"enum را به دانش‌آموزان نشان دهید.\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"نتیجه\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"Vec\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"برای هر یک از اسلایدهای این بخش، کمی زمان صرف مرور صفحات مستندات کنید و برخی \"\n\"از متدهای رایج‌تر را برجسته کنید.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust دارای یک کتابخانه استاندارد است که به ایجاد مجموعه‌ای از تایپ‌های رایج \"\n\"استفاده‌شده توسط کتابخانه‌ها و برنامه‌های Rust کمک می‌کند. به این ترتیب، دو \"\n\"کتابخانه می‌توانند به‌راحتی با هم کار کنند زیرا هر دو از تایپ `String` یکسانی \"\n\"استفاده می‌کنند.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"در واقع، Rust شامل چندین لایه از کتابخانه استاندارد است: `core`، `alloc` و \"\n\"`std`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` شامل ابتدایی‌ترین تایپ‌ها و توابع است که به `libc`، تخصیص‌دهنده حافظه یا \"\n\"حتی وجود یک سیستم‌عامل وابسته نیستند.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` شامل تایپ‌هایی است که به یک تخصیص‌دهنده حافظه سراسری نیاز دارند، مانند \"\n\"`Vec`، `Box` و `Arc`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"برنامه‌های Rust تعبیه‌شده اغلب تنها از `core` و گاهی اوقات از `alloc` استفاده \"\n\"می‌کنند.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust دارای مستندات گسترده‌ای است. به عنوان مثال:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"تمام جزئیات مربوط به [حلقه‌ها](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"تایپ‌های ابتدایی مانند [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"تایپ‌های کتابخانه استاندارد مانند [`Option`](https://doc.rust-lang.org/stable/\"\n\"std/option/enum.Option.html) یا [`BinaryHeap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.BinaryHeap.html).\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"در واقع، شما می‌توانید کد خود را مستند کنید:\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"محتویات به‌عنوان Markdown پردازش می‌شوند. تمام crate‌های کتابخانه‌ای منتشرشده \"\n\"Rust به‌طور خودکار در [`docs.rs`](https://docs.rs) با استفاده از ابزار \"\n\"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) مستند \"\n\"می‌شوند. مستند کردن تمام آیتم‌های عمومی در یک API با استفاده از این الگو به‌طور \"\n\"رایج مرسوم است.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"برای مستند کردن یک آیتم از درون خود آیتم (مانند درون یک ماژول)، از `!//` یا \"\n\"`/* .. !*/` استفاده کنید که به آن \\\"کامنت‌های مستندات داخلی\\\" می‌گویند:\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"مستندات تولیدشده برای `rand` crate را در <https://docs.rs/rand> به \"\n\"دانش‌آموزان نشان دهید.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"ما قبلاً برخی استفاده‌ها از `<Option<T` را مشاهده کرده‌ایم. این تایپ یا مقداری \"\n\"از تایپ`T` را ذخیره می‌کند یا هیچ چیزی را ذخیره نمی‌کند. به عنوان مثال، \"\n\"[`String::find`](https://doc.rust-lang.org/stable/std/string/struct.String.\"\n\"html#method.find) یک `<Option<usize` را برمی‌گرداند.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"پیدا کردن نوع بازگشتی{position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Character not found\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` به‌طور گسترده‌ای استفاده می‌شود و تنها در کتابخانه استاندارد محدود \"\n\"نمی‌شود.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` مقدار موجود در یک `Option` را برمی‌گرداند یا باعث panic می‌شود. \"\n\"`expect` مشابه است اما پیامی برای خطا می‌پذیرد.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"می‌توانید در مواجهه با panic  `None` کنید، اما نمی‌توانید به‌طور \\\"تصادفی\\\" \"\n\"فراموش کنید که `None` بررسی کنید.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"استفاده از `unwrap`/`expect` در همه‌جا هنگام ساخت سریع چیزی رایج است، اما کد \"\n\"تولیدی معمولاً `None` را به‌شیوه‌ای مناسب‌تر مدیریت می‌کند.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"بهینه‌سازی niche به این معناست که `<Option<T` اغلب اندازه‌ای مشابه با `T` در \"\n\"حافظه دارد.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` مشابه `Option` است، اما موفقیت یا شکست یک عملیات را نشان می‌دهد، \"\n\"هرکدام با یک نوع متغیر enum متفاوت. این نوع جنریک است: `<Result<T, E` که در \"\n\"آن `T` در متغیر `Ok` استفاده می‌شود و `E` در متغیر `Err` ظاهر می‌شود.\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"دفتر خاطرات عزیز: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"نمی‌توان محتوای فایل را خواند\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"دفتر خاطرات باز نشد: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"همانند `Option`، مقدار موفقیت‌آمیز درون `Result` قرار دارد و توسعه‌دهنده را \"\n\"ملزم به استخراج صریح آن می‌کند. این به بررسی خطاها تشویق می‌کند. در صورتی که \"\n\"خطا هرگز نباید رخ دهد، می‌توان از `()unwrap` یا `()expect` استفاده کرد که این \"\n\"نیز نشان‌دهنده نیت توسعه‌دهنده است.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"مستندات `Result` مطالعه‌ای توصیه‌شده است. نه در طول دوره، اما ذکر آن ارزشمند \"\n\"است. این مستندات شامل بسیاری از متدها و توابع کاربردی است که به برنامه‌نویسی \"\n\"به استایل تابع‌محور کمک می‌کند.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` نوع استاندارد برای پیاده‌سازی مدیریت خطاها است که در روز چهارم دوره \"\n\"خواهیم دید.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) یک رشته \"\n\"قابل رشد با کدگذاری UTF-8 است:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"سلام\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, number of chars = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` پیاده‌سازی‌کننده [`Deref<Target = str>`](https://doc.rust-lang.org/\"\n\"std/string/struct.String.html#deref-methods-str) است، که به این معناست که \"\n\"می‌توانید تمام متدهای `str` را بر روی `String` فراخوانی کنید.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` یک رشته جدید خالی برمی‌گرداند. از `String::with_capacity` \"\n\"استفاده کنید زمانی که می‌دانید چقدر داده می‌خواهید به رشته اضافه کنید.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` اندازه رشته `String` را به‌صورت بایت برمی‌گرداند (که ممکن است با \"\n\"طول آن به‌صورت کاراکتر متفاوت باشد).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` یک تکرارگر (iterator) از روی کاراکترهای واقعی برمی‌گرداند. \"\n\"توجه داشته باشید که یک `char` ممکن است با آنچه که یک انسان به عنوان \"\n\"\\\"کاراکتر\\\" در نظر می‌گیرد، متفاوت باشد به دلیل [grapheme clusters](https://\"\n\"docs.rs/unicode-segmentation/latest/unicode_segmentation/struct.Graphemes.\"\n\"html).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"زمانی که مردم به رشته‌ها اشاره می‌کنند، ممکن است منظورشان `str&` یا `String` \"\n\"باشد.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"زمانی که یک تایپ، `<Deref<Target = T` را پیاده‌سازی می‌کند، کامپایلر به شما \"\n\"این امکان را می‌دهد که به‌طور شفاف متدهای `T` را فراخوانی کنید.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"ما هنوز `Deref` trait را بررسی نکرده‌ایم، بنابراین در این مرحله این بیشتر \"\n\"توضیح‌دهنده ساختار نوار کناری در مستندات است.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` پیاده‌سازی‌کننده `<Deref<Target = str` است که به‌طور شفاف دسترسی به \"\n\"متدهای `str` را فراهم می‌کند.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"`;()let s3 = s1.deref` و `;let s3 = &*s1` بنویسید و مقایسه کنید .\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"بنویسید و مقایسه کنید `let s3 = s1.deref();` و `let s3 = &*s1;`.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"راه‌های مختلف برای ایندکس‌گذاری یک `String` را مقایسه کنید:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"به یک کاراکتر با استفاده از `()s3.chars().nth(i).unwrap`، جایی که `i` در \"\n\"محدوده است یا خارج از محدوده.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"به یک زیررشته با استفاده از `[4..0]s3`، جایی که این برش در مرزهای کاراکترها \"\n\"است یا نباشد.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"بسیاری از تایپ داده‌ها می‌توانند با استفاده از متد [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) به رشته \"\n\"تبدیل شوند. این ترید به‌طور خودکار برای تمام تایپ‌هایی که `Display` را \"\n\"پیاده‌سازی می‌کنند، پیاده‌سازی شده است، بنابراین هر چیزی که می‌تواند قالب‌بندی \"\n\"شود، همچنین می‌تواند به رشته تبدیل شود.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"این [`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) بافر قابل \"\n\"تغییر اندازه و heap-allocated است:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Canonical macro to initialize a vector with elements.\\n\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Retain only the even elements.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Remove consecutive duplicates.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` پیاده‌سازی‌کننده [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/\"\n\"vec/struct.Vec.html#deref-methods-%5BT%5D) است، به این معنی که می‌توانید \"\n\"متدهای برش را بر روی یک `Vec` فراخوانی کنید.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` نوعی مجموعه است، به همراه `String` و `HashMap`. داده‌های آن در حافظه \"\n\"heap ذخیره می‌شود. به این معنی که مقدار داده‌ها نیازی به دانستن در زمان \"\n\"کامپایل ندارد و می‌تواند در زمان اجرا رشد یا کوچک شود.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"توجه داشته باشید که `<Vec<T` نیز یک تایپ generic است، اما نیازی به تعیین \"\n\"صریح `T` ندارید. همان‌طور که همیشه با استنتاج تایپ در Rust ، `T` در زمان \"\n\"اولین فراخوانی `push` مشخص شده است.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`[...]!vec` یک ماکرو استاندارد برای استفاده به‌جای `()Vec::new` است و از \"\n\"افزودن عناصر اولیه به vector پشتیبانی می‌کند.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"برای ایندکس‌گذاری vector از `[` `]` استفاده می‌کنید، اما اگر از محدوده خارج \"\n\"شود، باعث panic می‌شود. به‌طور جایگزین، استفاده از `get` یک `Option` را \"\n\"برمی‌گرداند. تابع `pop` آخرین عنصر را حذف می‌کند.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"برش‌ها در روز سوم پوشش داده می‌شوند. در حال حاضر، دانش‌آموزان تنها باید بدانند \"\n\"که یک مقدار از تایپ `Vec` به تمام متدهای مستند شده برش‌ها نیز دسترسی دارد.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"نقشه hash استاندارد با حفاظت در برابر حملات HashDoS:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"ماجراهای هاکلبری فین\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"قصه‌های گریمز\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"غرور و تعصب\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"ما درباره {} کتاب می دانیم، اما Les Misérables نه.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"ماجراجویی آلیس در سرزمین عجایب\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} صفحه‌ها\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} ناشناخته است.\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"// Use the .entry() method to insert a value if nothing is found.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"`HashMap` در prelude تعریف نشده و باید به scope وارد شود.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"سطرهای کد زیر را امتحان کنید. سطر اول بررسی می‌کند که آیا یک کتاب در \"\n\"`HashMap` وجود دارد یا خیر و اگر وجود نداشت، یک مقدار جایگزین برمی‌گرداند. \"\n\"سطر دوم مقدار جایگزین را در `HashMap` وارد می‌کند اگر کتاب پیدا نشد.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"هری پاتر و سنگ جادو\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"برخلاف `!vec`، متأسفانه ماکروی استاندارد `!hashmap` وجود ندارد.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"از نسخه 1.56 Rust به بعد، `HashMap` پیاده‌سازی‌کننده [`From<[(K, V); N]>`]\"\n\"(https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) است که به ما \"\n\"اجازه می‌دهد به‌راحتی یک `HashMap` را از یک آرایه مقداردهی اولیه کنیم:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"به‌طور جایگزین، `HashMap` می‌تواند از هر `Iterator` که جفت‌های key-value را \"\n\"تولید می‌کند، ساخته شود.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"ما `<HashMap<String, i32` را نمایش می‌دهیم و از استفاده از `str&` به‌عنوان \"\n\"کلید اجتناب می‌کنیم تا مثال‌ها ساده‌تر شوند. استفاده از ارجاعات در مجموعه‌ها \"\n\"البته ممکن است، اما می‌تواند به مشکلاتی با borrow checker منجر شود.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"حذف `()to_string` از مثال بالا را امتحان کنید و ببینید آیا هنوز کامپایل \"\n\"می‌شود یا خیر. فکر می‌کنید ممکن است با چه مشکلاتی مواجه شویم؟\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"این چندین تایپ \\\"تایپ بازگشتی خاص متد\\\" دارد، مانند `std::collections::\"\n\"hash_map::Keys`. این تایپ‌ها معمولاً در جستجوهای مستندات Rust ظاهر می‌شوند. \"\n\"مستندات این تایپ را به دانش‌آموزان نشان دهید و پیوند مفید بازگشتی به متد \"\n\"`keys` را نیز نمایش دهید.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"در این تمرین، شما یک ساختار داده بسیار ساده را به‌صورت generic خواهید کرد. \"\n\"این ساختار از [`std::collections::HashMap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.HashMap.html) برای پیگیری اینکه چه مقادیری مشاهده \"\n\"شده‌اند و هرکدام چند بار ظاهر شده‌اند، استفاده می‌کند.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"نسخه اولیه `Counter` به‌طور سخت‌افزاری برای مقادیر `u32` کدگذاری شده است. \"\n\"ساختار و متدهای آن را به‌صورت generic بر اساس تایپ مقداری که در حال پیگیری \"\n\"است، تغییر دهید، به‌طوری که `Counter` بتواند هر تایپ مقداری را پیگیری کند.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"اگر زود تمام کردید، سعی کنید از متد [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) استفاده کنید تا \"\n\"تعداد جستجوهای هش مورد نیاز برای پیاده‌سازی متد `count` را به نصف کاهش دهید.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Create a new Counter.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Count an occurrence of the given value.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Return the number of times the given value has been seen.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"مقادیر {} برابر با {} را دیده‌شده\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"سیب\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"orange\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"داشتم {} سیب‌ها\\\"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"\"\n\"این بخش باید حدود ۱ ساعت و ۱۰ دقیقه طول بکشد. این بخش شامل موارد زیر است:\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From and Into\"\n\n#: src/std-traits.md\nmsgid \"Read and Write\"\nmsgstr \"Read and Write\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"به طور پیش‌فرض، ساختار به‌روزرسانی syntax\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"همانند تایپ‌ها موجود در کتابخانه استاندارد، زمانی را صرف مرور مستندات هرtrait \"\n\"کنید.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"این بخش طولانی است. در میانه‌ی آن یک استراحت کنید.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"این trait‌ها از مقایسه بین مقادیر پشتیبانی می‌کنند. همه‌ی این trait‌ها را می‌توان \"\n\"برای تایپ‌هایی که شامل فیلدهایی هستند که این trait‌ها را پیاده‌سازی می‌کنند، \"\n\"به‌دست آورد.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` and `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` یک رابطه هم‌ارزی جزئی است که دارای متد الزامی `eq` و متد ارائه‌شده \"\n\"`ne` می‌باشد. عملگرهای `==` و `=!` این متدها را فراخوانی می‌کنند.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` یک رابطه هم‌ارزی کامل است (بازتابی، متقارن، و transitive) و شامل \"\n\"`PartialEq` می‌شود. توابعی که به هم‌ارزی کامل نیاز دارند، از `Eq` به‌عنوان یک \"\n\"trait bound استفاده می‌کنند.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` and `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` یک ترتیب جزئی را تعریف می‌کند و دارای متد `partial_cmp` است. این \"\n\"ویژگی برای پیاده‌سازی عملگرهای `<`، `<=`، `>=` و `>` استفاده می‌شود.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\"`Ord` یک ترتیب کامل است که در آن متد `cmp` مقدار `Ordering` را برمی‌گرداند.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` می‌تواند بین تایپ‌های مختلف پیاده‌سازی شود، اما `Eq` نمی‌تواند، زیرا \"\n\"بازتابی است:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"در عمل، معمولاً این trait‌ها به‌طور خودکار به‌دست می‌آیند، اما کمتر پیش می‌آید که \"\n\"آن‌ها به‌طور دستی پیاده‌سازی شوند.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"بارگذاری مجدد عملگرها از طریق traits در [`std::ops`](https://doc.rust-lang.\"\n\"org/std/ops/index.html) پیاده‌سازی شده است:\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"نکات بحث:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"می‌توانید `Add` را برای `Point&` پیاده‌سازی کنید. در چه موقعیت‌هایی این کار \"\n\"مفید است؟\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"پاسخ: `Add:add` خود `self` را مصرف می‌کند. اگر تایپ `T` که برای آن عملگر را \"\n\"بارگذاری می‌کنید، `Copy` نباشد، باید پیاده‌سازی عملگر را برای `T&` نیز در نظر \"\n\"بگیرید. این کار از ایجاد کپی‌های غیرضروری در محل فراخوانی جلوگیری می‌کند.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"چرا `Output` یک تایپ مرتبط است؟ آیا می‌توان آن را به‌عنوان یک پارامترتایپ برای \"\n\"متد تعریف کرد؟\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"پاسخ کوتاه: پارامترهای تایپ تابع توسط فراخوانی‌کننده کنترل می‌شوند، اما \"\n\"تایپ‌های مرتبط (مانند `Output`) توسط پیاده‌ساز trait کنترل می‌شوند.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"شما می‌توانید `Add` را برای دو تایپ مختلف پیاده‌سازی کنید، به‌عنوان مثال `impl \"\n\"Add<(i32, i32)> for Point` می‌تواند یک tuple را به یک `Point` اضافه کند.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"The `Not` trait (`!` operator) is notable because it does not \\\"boolify\\\" \"\n\"like the same operator in C-family languages; instead, for integer types it \"\n\"negates each bit of the number, which arithmetically is equivalent to \"\n\"subtracting it from -1: `!5 == -6`.\"\nmsgstr \"\"\n\"عملگر `Not` یک ویژگی(`!` operator) قابل توجه است زیرا مانند همان عملگر در \"\n\"زبان‌های خانواده C هرگز  \\\"boolify\\\"  نمی شود. در عوض، برای انواع عدد صحیح، \"\n\"هر بیت از عدد را نفی می‌کند، که از نظر حسابی معادل کم کردن آن از -1: `!5 == \"\n\"-6` است.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions. Unlike `as`, these traits correspond to \"\n\"lossless, infallible conversions.\"\nmsgstr \"\"\n\"تایپ‌های مختلف ویژگی‌های [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) و [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) \"\n\"را برای تسهیل تبدیل تایپ پیاده‌سازی می‌کنند:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) به‌طور خودکار \"\n\"زمانی پیاده‌سازی می‌شود که [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html) پیاده‌سازی شده باشد:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"به همین دلیل معمولاً تنها `From` پیاده‌سازی می‌شود، زیرا تایپ شما به‌طور خودکار \"\n\"پیاده‌سازی `Into` را نیز دریافت می‌کند.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"هنگام اعلام تایپ ورودی تابعی مانند \\\"هر چیزی که می‌تواند به یک `String` تبدیل \"\n\"شود\\\"، قاعده برعکس است، باید از `Into` استفاده کنید. تابع شما تایپ‌های را \"\n\"قبول می‌کند که پیاده‌سازی `From` دارند و همچنین تاید‌هایی که فقط `Into` را \"\n\"پیاده‌سازی کرده‌اند.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust هیچ _implicit_ ندارد، اما از تبدیل‌های صریح با استفاده از `as` پشتیبانی \"\n\"می‌کند. این تبدیل‌ها معمولاً پیرو معنای C هستند که در آنجا تعریف شده‌اند.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"as u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"as i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"as u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"نتایج استفاده از `as` _همیشه_ در Rust تعریف شده و در تمامی پلتفرم‌ها ثابت \"\n\"هستند. این ممکن است با شهود شما برای تغییر علامت یا تبدیل به تایپ کوچکتر \"\n\"مطابقت نداشته باشد -- مستندات را بررسی کنید و برای وضوح بیشتر نظر دهید.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"تبدیل تایپ با استفاده از `as` ابزاری نسبتاً حساس است که استفاده نادرست از آن \"\n\"آسان است و می‌تواند منبعی از اشکالات ظریف باشد، به خصوص زمانی که کار نگهداری \"\n\"آینده باعث تغییر تایپ‌های مورد استفاده یا دامنه مقادیر در تایپ‌ها شود. تبدیل‌ها \"\n\"بهتر است تنها زمانی استفاده شوند که قصد شما نشان دادن برش بدون قید و شرط \"\n\"باشد (مثلاً انتخاب 32 بیت پایین از یک `u64` با `as u32`، بدون توجه به آنچه در \"\n\"بیت‌های بالا وجود دارد).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"برای تبدیل‌های بدون خطا (مانند تبدیل `u32` به `u64`)، استفاده از `From` یا \"\n\"`Into` بر `as` ارجح است تا تأیید شود که تبدیل در واقع بدون خطا است. برای \"\n\"تبدیل‌های با احتمال خطا، `TryFrom` و `TryInto` در دسترس هستند وقتی که \"\n\"می‌خواهید تبدیل‌هایی را که به شیوه‌ای متفاوت از آن‌هایی که مطابقت ندارند، مدیریت \"\n\"کنید.\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"در نظر داشته باشید که پس از این اسلاید استراحت کنید.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` مشابه به `static_cast` در ++C است. استفاده از `as` در مواردی که ممکن \"\n\"است داده‌ها از دست برود، معمولاً توصیه نمی‌شود یا حداقل نیاز به توضیحی کامنتی \"\n\"دارد.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"این موضوع در تبدیل اعداد صحیح به `usize` برای استفاده به عنوان ایندکس رایج \"\n\"است.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"با استفاده از [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) و \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html)، می‌توانید \"\n\"بر روی منابع `u8` انتزاع کنید:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"lines in slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"lines in file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"به طور مشابه، [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"به شما امکان می‌دهد که بر روی منابع `u8` انتزاع کنید:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Logged: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"The `Default` Trait\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"ویژگی [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"یک مقدار پیش‌فرض برای یک تایپ تولید می‌کند.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\" مقدار Y  وارد شده است!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"این ویژگی می‌تواند به طور مستقیم پیاده‌سازی شود یا می‌تواند از طریق \"\n\"`[derive(Default)]#` به صورت خودکار تولید شود.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"یک پیاده‌سازی خودکار، مقداری تولید می‌کند که در آن تمامی فیلدها به مقادیر \"\n\"پیش‌فرض خود تنظیم شده‌اند.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"این بدان معناست که تمام تایپ‌های موجود در ساختار نیز باید `Default` را \"\n\"پیاده‌سازی کنند.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"نوع‌های استاندارد Rust اغلب `Default` را با مقادیر معقول پیاده‌سازی می‌کنند \"\n\"(مثل `0`، `\\\"\\\"` و غیره).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"مقداردهی جزئی ساختارها با `Default` به خوبی کار می‌کند.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"کتابخانه استاندارد Rust آگاه است که تایپ‌های مختلف می‌توانند `Default` را \"\n\"پیاده‌سازی کنند و روش‌های کمکی را فراهم می‌کند که از آن استفاده می‌کنند.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"سینتکس `..` به نام [سینتکس به‌روزرسانی ساختار](https://doc.rust-lang.org/book/\"\n\"ch05-01-defining-structs.html#creating-instances-from-other-instances-with-\"\n\"struct-update-syntax) شناخته می‌شود.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"بسته‌ها یا عبارات لامبدا تایپ‌هایی دارند که نمی‌توان نام‌گذاری کرد. با این حال، \"\n\"آن‌ها پیاده‌سازی‌های ویژه از traits [`Fn`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Fn.html)، [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.\"\n\"html) و [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) \"\n\"هستند:\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling {func_name}({input}): {}\\\"\"\nmsgstr \"\\\"فراخوانی {func_name}({input}): {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"add_3\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate\\\"\"\nmsgstr \"\\\"تجمیع: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"multiply_sum\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can \"\n\"be called needing only a shared reference to the closure, which means the \"\n\"closure can be executed repeatedly and even concurrently.\"\nmsgstr \"\"\n\"یک `Fn` (برای مثال `add_3`) نه مقادیر گرفته شده را مصرف می‌کند و نه آن‌ها را \"\n\"تغییر می‌دهد، یا شاید اصلاً چیزی را نمی‌گیرد. این تایپ می‌تواند به‌طور همزمان \"\n\"چندین بار فراخوانی شود.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure \"\n\"object is accessed via exclusive reference, so it can be called repeatedly \"\n\"but not concurrently.\"\nmsgstr \"\"\n\"یک `FnMut` (برای مثال `accumulate`) ممکن است مقادیر گرفته شده را تغییر دهد. \"\n\"شما می‌توانید آن را چندین بار فراخوانی کنید، اما نه به‌طور همزمان.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. \"\n\"Doing so consumes the closure and any values captured by move.\"\nmsgstr \"\"\n\"اگر یک `FnOnce` (برای مثال `multiply_sum`) داشته باشید، تنها می‌توانید آن را \"\n\"یک‌بار فراخوانی کنید. ممکن است مقادیر گرفته شده را مصرف کند.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` یک زیرتایپ از `FnOnce` است. `Fn` نیز یک زیرتایپ از `FnMut` و \"\n\"`FnOnce` است. به عبارت دیگر، می‌توانید از `FnMut` در جایی که `FnOnce` نیاز \"\n\"است استفاده کنید و از `Fn` در جایی که `FnMut` یا `FnOnce` نیاز است استفاده \"\n\"کنید.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"زمانی که تابعی تعریف می‌کنید که یک closure را می‌گیرد، باید از `FnOnce` \"\n\"استفاده کنید اگر فقط یک بار آن را فراخوانی می‌کنید (یعنی یک بار استفاده \"\n\"می‌شود)، یا از `FnMut` در غیر این صورت، و در نهایت از `Fn`. این کار بیشترین \"\n\"انعطاف‌پذیری را برای فراخوانی‌کننده فراهم می‌کند.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(which can be passed to a consumer of any of the 3 closure traits), then \"\n\"`FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"در مقابل، زمانی که یک closure دارید، بیشترین انعطاف‌پذیری که می‌توانید داشته \"\n\"باشید `Fn` است (که می‌تواند در هر جایی استفاده شود)، سپس `FnMut` و در نهایت \"\n\"`FnOnce`.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures. Function pointers \"\n\"(references to `fn` items) implement `Copy` and `Fn`.\"\nmsgstr \"\"\n\"کامپایلر همچنین `Copy` (برای مثال برای `add_3`) و `Clone` (برای مثال \"\n\"`multiply_sum`) را بر اساس آنچه که closure به دست می‌آورد، استنتاج می‌کند.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture each variable from an outer scope by the \"\n\"least demanding form of access they can (by shared reference if possible, \"\n\"then exclusive reference, then by move). The `move` keyword forces capture \"\n\"by value.\"\nmsgstr \"\"\n\"به صورت پیش‌فرض، بسته‌بندی‌ها (closures) هر متغیر از یک دامنه بیرونی را با \"\n\"کمترین سطح دسترسی ممکن (با ارجاع مشترک اگر ممکن باشد، سپس ارجاع انحصاری، سپس \"\n\"با انتقال) capture می‌کنند. کلیدواژه `move` یا انتقال، capture را به صورت \"\n\"value اجباری می‌کند.\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Hi\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Greg\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"در این مثال، شما الگوریتم کلاسیک [رمزگذاری \\\"ROT13\\\"](https://en.wikipedia.\"\n\"org/wiki/ROT13) را پیاده‌سازی خواهید کرد. این کد را به محیط Playground کپی \"\n\"کرده و بخش‌های ناقص آن را پیاده‌سازی کنید. تنها حروف الفبای ASCII را بچرخانید \"\n\"تا نتیجه همچنان UTF-8 معتبر باقی بماند.\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Implement the `Read` trait for `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"چه اتفاقی می‌افتد اگر دو نمونه از `RotDecoder` را به‌هم متصل کنید که هر کدام \"\n\"۱۳ کاراکتر را بچرخانند؟\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"به روز ۳ خوش آمدید\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"امروز، ما به بررسی خواهیم پرداخت:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"مدیریت حافظه، طول عمرها و بررسی‌کننده قرض‌گیری (borrow checker): چگونه زبان \"\n\"Rust از ایمنی حافظه اطمینان حاصل می‌کند.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"اشاره‌گر هوشمند: تایپ‌های اشاره‌گر در کتابخانه استاندارد.\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب استراحت‌های ۱۰ دقیقه‌ای، این جلسه باید حدود ۲ ساعت و ۲۰ دقیقه طول \"\n\"بکشد. این جلسه شامل:\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/memory-management.md\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"برنامه‌ها حافظه را به دو روش تخصیص می‌دهند:\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\"Stack: بلوک پیوسته‌ای از حافظه که برای متغیرهای محلی (داخل یک تابع) استفاده \"\n\"می‌شود.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"مقادیر دارای اندازه‌های ثابتی هستند که در زمان کامپایل شناخته می‌شوند.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"بسیار سریع: فقط یک اشاره‌گر stack را جابجا کنید.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"مدیریت آسان: پیرو فراخوانی‌های تابع است.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"بهره‌وری عالی از حافظه.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap: ذخیره‌سازی مقادیر خارج از فراخوانی‌های تابع.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"مقادیر دارای اندازه‌های پویا هستند که در زمان اجرا تعیین می‌شوند.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"کمی کندتر از stack: نیاز به برخی از عملیات‌های مدیریتی دارد.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"هیچ تضمینی برای بهره‌وری بالا از حافظه ندارد.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"ساختن یک `String` metadata با اندازه ثابت را روی stack و داده با اندازه \"\n\"پویا، یعنی رشته واقعی، را روی heap قرار می‌دهد:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"ذکر کنید که یک `String` توسط یک `Vec` پشتیبانی می‌شود، بنابراین دارای ظرفیت و \"\n\"طول است و در صورت تغییرپذیری، می‌تواند از طریق اختصاص مجدد حافظه روی heap رشد \"\n\"کند.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"اگر دانش‌آموزان درباره آن سوال کنند، می‌توانید اشاره کنید که حافظه زیرین با \"\n\"استفاده از [System Allocator](https://doc.rust-lang.org/std/alloc/struct.\"\n\"System.html) بر روی heap اختصاص داده شده و تخصیص‌دهنده‌های سفارشی می‌توانند با \"\n\"استفاده از [Allocator API](https://doc.rust-lang.org/std/alloc/index.html) \"\n\"پیاده‌سازی شوند\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"می‌توانیم با استفاده از Rust ناامن (unsafe) نحوه چیدمان حافظه را بررسی کنیم. \"\n\"با این حال، باید اشاره کنید که این کار به درستی ناامن است!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"دنیا\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"به طور سنتی، زبان‌ها به دو دسته گسترده تقسیم شده‌اند:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"کنترل کامل از طریق مدیریت دستی حافظه: C++، C، پاسکال، ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"برنامه‌نویس تصمیم می‌گیرد که چه زمانی حافظه heap را تخصیص یا آزاد کند.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"برنامه‌نویس باید تعیین کند که آیا یک اشاره‌گر هنوز به حافظه معتبر اشاره می‌کند \"\n\"یا نه.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"مطالعات نشان می‌دهد که برنامه‌نویسان اشتباهاتی مرتکب می‌شوند.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"ایمنی کامل از طریق مدیریت خودکار حافظه در زمان اجرا: جاوا، پایتون، گو، \"\n\"هسکل، ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"یک سیستم زمان اجرا اطمینان می‌یابد که حافظه تا زمانی که دیگر نتواند به آن \"\n\"ارجاع داده شود، آزاد نمی‌شود.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Typically implemented with reference counting or garbage collection.\"\nmsgstr \"\"\n\"معمولاً با استفاده از شمارش ارجاع، جمع‌آوری زباله، یا RAII پیاده‌سازی می‌شود.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust یک ترکیب جدید ارائه می‌دهد:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"کنترل کامل و ایمنی از طریق اجرای صحیح مدیریت حافظه در زمان کامپایل.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"این کار را با استفاده از مفهوم مالکیت صریح انجام می‌دهد.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"این اسلاید به منظور کمک به دانش‌آموزانی است که از زبان‌های دیگر می‌آیند تا Rust \"\n\"را در زمینه مناسب قرار دهند.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C باید حافظه heap را به‌طور دستی با استفاده از `malloc` و `free` مدیریت کند. \"\n\"خطاهای رایج شامل فراموش کردن فراخوانی `free`، فراخوانی آن چندین بار برای یک \"\n\"اشاره‌گر، یا dereference کردن یک اشاره‌گر پس از آزاد شدن حافظه‌ای است که به آن \"\n\"اشاره می‌کند.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"++C ابزارهایی مانند اشاره‌گرهای هوشمند (`unique_ptr`, `shared_ptr`) دارد که \"\n\"از تضمین‌های زبانی درباره فراخوانی ویرایشگرها (destructor) برای اطمینان از \"\n\"آزاد شدن حافظه هنگام بازگشت از تابع استفاده می‌کنند. با این حال، هنوز هم \"\n\"بسیار آسان است که از این ابزارها به اشتباه استفاده کرده و باگ‌هایی مشابه به C \"\n\"ایجاد کرد.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"جاوا، گو و پایتون به جمع‌آوری‌کننده زباله (garbage collector) برای شناسایی \"\n\"حافظه‌ای که دیگر در دسترس نیست و دور ریختن آن متکی هستند. این امر تضمین می‌کند \"\n\"که هر اشاره‌گری می‌تواند dereference شود و از بروز خطاهای استفاده پس از \"\n\"آزادسازی (use-after-free) و سایر دسته‌های باگ جلوگیری می‌کند. اما، GC هزینه‌ای \"\n\"در زمان اجرا دارد و تنظیم مناسب آن دشوار است.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"مدل مالکیت و قرض‌گیری Rust (ownership and borrowing) می‌تواند در بسیاری از \"\n\"موارد عملکرد C را با عملیات‌های تخصیص و آزادسازی دقیقاً در مکان‌های مورد نیاز \"\n\"-- با هزینه صفر -- به دست آورد. همچنین ابزارهایی مشابه به اشاره‌گرهای هوشمند +\"\n\"+C را فراهم می‌کند. در صورت نیاز، گزینه‌های دیگری مانند شمارش ارجاع نیز در \"\n\"دسترس هستند و حتی crates شخص ثالثی برای پشتیبانی از جمع‌آوری زباله در زمان \"\n\"اجرا موجود است (که در این کلاس پوشش داده نمی‌شود).\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"تمام پیوندهای متغیر دارای یک **دامنه** هستند که در آن معتبر هستند و استفاده \"\n\"از متغیر خارج از دامنه‌اش یک خطاست:\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"می‌گوییم که متغیر _مالک_ مقدار است. هر مقدار در Rust در هر لحظه دقیقاً یک مالک \"\n\"دارد.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"در پایان دامنه، متغیر **حذف** می‌شود و داده‌ها آزاد می‌شوند. یک ویرایشگر \"\n\"(destructor) می‌تواند در اینجا اجرا شود تا منابع را آزاد کند.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"دانش‌آموزانی که با پیاده‌سازی‌های جمع‌آوری زباله آشنا هستند، خواهند دانست که یک \"\n\"جمع‌آوری‌کننده زباله با مجموعه‌ای از \\\"ریشه‌ها\\\" برای یافتن تمام حافظه‌های قابل \"\n\"دسترسی شروع می‌کند. اصول \\\"مالکیت تک‌گانه\\\" Rust ایده مشابهی است.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"انتساب, *مالکیت* را بین متغیرها منتقل می‌کند:\"\n\n#: src/memory-management/move.md src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"سلام!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"انتساب `s1`به `s2` مالکیت را منتقل می‌کند.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"زمانی که دیگر در اسکوپ `s1` نیستیم,  هیچ اتفاقی نمی‌افتد: چون `s1` مالک چیزی \"\n\"نیست.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"زمانی که دیگر در اسکوپ `s2` نیستیم, داده‌های رشته آزاد می‌شوند.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"قبل از انتقال به `s2` :\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"بعد از انتقال به `s2` :\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"هنگامی که یک مقدار را به یک تابع منتقل می‌کنید، مقدار به آرگمان تابع اختصاص \"\n\"داده می‌شود. به این شکل مالکیت را منتقل می‌کند:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"سلام {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"الیس\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"اشاره کنید که این رویه راست بر خلاف پیش‌فرض زبان <span dir=ltr>C++</span>  \"\n\"است که در ان مقدار کپی میشود مگر که از <span dir=ltr>`std::move`</span> \"\n\"استفاده کنیم ( تا یک مقدار را جا به جا کنیم!)\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"این رویه فقط برای انتقال مالکیت است. اینکه آیا هیچ کد ماشینی برای دستکاری \"\n\"خود داده‌ها تولید می‌شود یا خیر، موضوعی برای بهینه‌سازی است و چنین کپی‌هایی \"\n\"به‌طور تهاجمی (aggressively) بهینه‌سازی می‌شوند.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"مقادیر ساده (مانند اعداد صحیح) را می‌توان `Copy` کرد (اسلایدهای بعدی را \"\n\"ببینید).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"در Rust، کلون‌ها واضح بیان می‌شوند (با استفاده از `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"در مثال `say_hello`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"با اولین فراخوانی `say_hello`، تابع `main` مالکیت `name` را انتقال می‌دهد. پس \"\n\"از آن، `name` دیگر نمی‌تواند در `main` استفاده شود.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"حافظه انباشت اختصاص داده شده برای `name` در انتهای تابع `say_hello` آزاد \"\n\"خواهد شد.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"تابع `main` می‌تواند مالکیت `name` را حفظ کند اگر آن را به عنوان یک مرجع \"\n\"(<span dir=ltr>`&name`</span>) منتقل کند و صد البته که `say_hello` یک مرجع \"\n\"را به عنوان پارامتر باید بپذیرد.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"به عنوان گزینه دیگر، `main` می‌تواند یک کلون از `name` را در فراخوانی اولیه \"\n\"تابع ای که در نظر داریم (<span dir=ltr>`name.clone()`</span>) منتقل کند.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"در زبان Rust سخت‌تر از <span dir=ltr>C++</span> است که سهوا کپی ایجاد کنیم, \"\n\"زیر به صورت پیش‌فرض از مفهوم «انتقال» استفاده میکنیم و برنامه نویس مجبور است \"\n\"هر جا که لازم هست به صورت صریح کلون را ایجاد کند.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"نسخههای دفاعی در ++C مدرن\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"<span dir=ltr>C++</span> مدرن این مشکل را به شیوه متفاوتی حل می‌کند:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Duplicate the data in s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"داده‌های انباشت از داده‌های `s1`  یک کپی برابر اصل برای  `s2` گرفته می‌شود که \"\n\"این کپی به صورت مستقل است.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"حالا هر موقع `s1` یا `s2` از اسکوپ موردنظرشون خارج شوند هر کدام به صورت \"\n\"جداگانه‌ای حافظه خود را آزاد میکنند.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"قبل از انتساب همراه کپی:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"بعد از انتساب همراه کپی:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"زبان <span dir=ltr>C++</span> انتخاب کمی متفاوت نسبت به  زبان Rust انجام \"\n\"داده است. زیرا `=` داده‌ها را کپی می‌کند، داده‌های رشته باید کلون شوند. در غیر \"\n\"این صورت، هر موقع از اسکوپ یکی از آنها خارج شویم امکان به وجود آمدن اشتباه \"\n\"آزادسازی مجدد حافظه رخ دهد.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"البته که زبان <span dir=ltr>C++</span> دارای  [<span dir=ltr>`std::move`</\"\n\"span>](https://en.cppreference.com/w/cpp/utility/move)  است که برای انتقال \"\n\"یک متغییر استفاده میشود. اگر مثال ما <span dir=ltr>`s2 = std::move(s1)`</\"\n\"span> بود هیچ تخصیص انباشتی صورت نمیگرفت بلکه `s1` در یک وضعیت معتبر البته \"\n\"نامشخص قرار میگرفت و برخلاف زبان Rust, توی زبان <span dir=ltr>C++</span> \"\n\"برنامه‌نویس مجاز است که دوباره از `s1` استفاده کند.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"بر خلاف Rust، `=` در <span dir=ltr>C++</span> می‌تواند برای کپی کردن و هم \"\n\"انتقال دادن استفاده شود.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"گاهی اوقات شما _می‌خواهید_ یک نسخه از مقدار بسازید. ویژگی `Clone` این کار را \"\n\"انجام می‌دهد.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"ایده‌ی `Clone` این است که شناسایی مکان‌های تخصیص حافظه heap آسان‌تر شود. به \"\n\"دنبال `()clone.` و چند مورد دیگر مانند `!vec` یا `Box::new` بگردید.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"معمولاً برای حل مشکلات مربوط به بررسی‌کننده قرض‌گیری (borrow checker) از کپی \"\n\"کردن استفاده می‌شود و سپس در آینده تلاش می‌شود تا آن کپی‌ها بهینه‌سازی شوند.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` معمولاً یک کپی عمیق از مقدار را انجام می‌دهد، به این معنی که اگر به \"\n\"عنوان مثال یک آرایه را کپی کنید، تمام عناصر آن آرایه نیز کپی خواهند شد.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"رفتار `clone` توسط کاربر تعریف می‌شود، بنابراین می‌تواند در صورت نیاز، منطق \"\n\"کپی‌برداری سفارشی را اجرا کند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"در حالی که مفهوم انتقال  به صورت پیش‌فرض است، در زبان راست چند نوع خاص به \"\n\"صورت پیش‌فرض کپی می‌شوند:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"این انواع‌داده ویژگی `Copy` را پیاده‌سازی کرده‌اند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"البته که میتوان برای نوع‌هایی که میسازید هم مفهوم کپی را داشته باشید:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"پس از انتساب، هر دو `p1` و `p2` داده‌های خود مستقل خود را دارند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"همچنین می‌توانیم از <span dir=ltr>`p1.clone()`</span>  برای کپی صریح داده‌ها \"\n\"استفاده کنیم.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"کپی‌برداری و کلون‌سازی یکسان نیستند:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"کپی‌برداری به کپی‌های بیت به بیت از مناطق حافظه اشاره دارد و روی همه انواع \"\n\"تعریف شده توسط شما کار نمی‌کند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"کپی‌برداری اجازه منطق سفارشی را نمی‌دهد (بر خلاف کپی constructors در <span \"\n\"dir=ltr>C++</span>).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"کلون‌سازی یک عملیات عمومی‌تر است و همچنین با پیاده‌سازی ویژگی `Clone` امکان \"\n\"رفتار سفارشی را فراهم می‌کند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\"کپی‌برداری روی انواع داده‌ای که ویژگی Drop را پیاده سازی کرده اند کار نمی‌کند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"در مثال بالا، موارد زیر را امتحان کنید:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"یک فیلد `String` به `struct Point` اضافه کنید. کامپایل نمی‌شود زیرا `String` \"\n\"یک نوع `Copy` نیست.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"ویژگی `Copy` را از صفت `derive` حذف کنید. اکنون خطای کامپایلر در `!println` \"\n\"برای `p1` قرار دارد.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"نشان دهید که اگر `p1` را به جای کپی آن کلون کنید، کار می‌کند.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\"ارجاعات مشترک (`shared references`) دارای ویژگی `Copy`/`Clone` هستند، اما \"\n\"ارجاعات قابل تغییر (`mutable references`) این‌طور نیستند. این به این دلیل است \"\n\"که Rust نیاز دارد که ارجاعات قابل تغییر منحصر به فرد باشند، بنابراین در حالی \"\n\"که کپی کردن یک ارجاع مشترک معتبر است، ایجاد یک کپی از یک ارجاع قابل تغییر \"\n\"قوانین قرض‌گیری Rust را نقض می‌کند.\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"ویژگی `Drop`\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"مقادیر که ویژگی [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) \"\n\"را پیاده‌سازی می‌کنند می‌توانند کدی را مشخص کنند که هنگام خروج از دامنه اجرا \"\n\"شود:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropping {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Exiting block B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Exiting block A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Exiting main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\"توجه داشته باشید که `std::mem::drop` با `std::ops::Drop::drop` یکسان نیست.\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"مقادیر به طور خودکار زمانی که از دامنه خارج می‌شوند، حذف می‌شوند.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"زمانی که یک مقدار حذف می‌شود، اگر آن مقدار ویژگی `std::ops::Drop` را \"\n\"پیاده‌سازی کرده باشد، پیاده‌سازی `Drop::drop` آن فراخوانی خواهد شد.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"تمام فیلدهای آن نیز سپس حذف خواهند شد، چه آن مقدار ویژگی `Drop` را پیاده‌سازی \"\n\"کرده باشد یا نه.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` یک تابع خالی است که هر مقداری را می‌پذیرد. اهمیت آن در این \"\n\"است که مالکیت مقدار را به عهده می‌گیرد، بنابراین در پایان دامنه‌اش حذف می‌شود. \"\n\"این ویژگی آن را به روشی مناسب برای حذف صریح مقادیر پیش از آنچه که معمولاً از \"\n\"دامنه خارج می‌شوند، تبدیل می‌کند.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"این می‌تواند برای اشیائی که در هنگام `drop` کاری انجام می‌دهند مفید باشد: آزاد \"\n\"کردن قفل‌ها، بستن فایل‌ها و غیره.\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"چرا `Drop::drop` `self` را نمی‌گیرد؟\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"پاسخ کوتاه: اگر این‌طور بود، `std::mem::drop` در پایان بلوک فراخوانی می‌شد که \"\n\"منجر به فراخوانی مجدد `Drop::drop` و ایجاد خطای سرریز (stack overflow) stack \"\n\"می‌شد!\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"سعی کنید `drop(a)` را با `()a.drop` جایگزین کنید.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"در این مثال، ما یک نوع داده پیچیده را پیاده‌سازی خواهیم کرد که مالک تمام \"\n\"داده‌های خود است. ما از \\\"الگوی سازنده\\\" برای پشتیبانی از ساخت یک مقدار جدید \"\n\"به صورت قطعه‌قطعه، با استفاده از توابع کمکی، استفاده خواهیم کرد.\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"جا‌های خالی را پر کنید.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// A representation of a software package.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Set the package version.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Set the package authors.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Add an additional dependency.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Set the language. If not set, language defaults to None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"Box<T>\"\nmsgstr \"Box<T>\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) یک اشاره‌گر مالک \"\n\"به داده‌های روی heap است:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`<Box<T` ویژگی `<Deref<Target = T` را پیاده‌سازی می‌کند، که به این معناست که \"\n\"می‌توانید [مستقیم روش‌های `T` را روی `<Box<T` فراخوانی کنید](https://doc.rust-\"\n\"lang.org/std/ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes cannot be stored \"\n\"inline without a pointer indirection, which can be worked around using `Box`:\"\nmsgstr \"\"\n\"تایپ‌های داده‌های بازگشتی یا انواع داده با اندازه‌های دینامیک را نمی‌توان به \"\n\"صورت inline بدون pointer indirection ذخیره کرد، که می‌توان با استفاده از \"\n\"`Box` آن کار را کرد:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// A non-empty list: first element and the rest of the list.\\n\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// An empty list.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` مانند `std::unique_ptr` در ++C است، با این تفاوت که تضمین شده است که \"\n\"هیچ‌گاه تهی (null) نخواهد بود.\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"`Box` می‌تواند زمانی مفید باشد که شما:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"یک تایپ دارید که اندازه آن در زمان کامپایل مشخص نیست، اما کامپایلر Rust نیاز \"\n\"به دانستن اندازه دقیق آن دارد.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"می‌خواهید مالکیت مقدار زیادی داده را انتقال دهید. برای جلوگیری از کپی کردن \"\n\"حجم زیادی از داده‌ها در پشته، به جای آن داده‌ها را در heap در یک `Box` ذخیره \"\n\"کنید تا فقط اشاره‌گر منتقل شود.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"اگر از `Box` استفاده نمی‌کردیم و سعی می‌کردیم یک `List` را مستقیماً در داخل \"\n\"`List` قرار دهیم، کامپایلر نمی‌توانست اندازه ثابتی برای ساختار در حافظه \"\n\"محاسبه کند (زیرا `List` اندازه‌ای بی‌نهایت پیدا می‌کرد).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` این مشکل را حل می‌کند زیرا اندازه‌ای برابر با یک اشاره‌گر عادی دارد و فقط \"\n\"به عنصر بعدی `List` در heap اشاره می‌کند.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"`Box` را از تعریف `List` حذف کنید و خطای کامپایلر را نمایش دهید. پیام خطا \"\n\"\\\"recursive without indirection\\\" را دریافت خواهیم کرد، زیرا برای رکورسیون \"\n\"داده‌ها باید از یک روش غیرمستقیم، مانند `Box` یا ارجاعی از نوعی، به جای ذخیره \"\n\"مستقیم مقدار استفاده کنیم.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"بهینه سازی Niche\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\"اگرچه `Box` مشابه `std::unique_ptr` در ++C به نظر می‌رسد، اما نمی‌تواند خالی/\"\n\"null باشد. این ویژگی باعث می‌شود که `Box` یکی از تایپ‌هایی باشد که به کامپایلر \"\n\"اجازه می‌دهد ذخیره‌سازی برخی از `enum`ها را بهینه‌سازی کند.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\"برای مثال، `<<Option<Box<T` همان اندازه را دارد که `<Box<T`، زیرا کامپایلر \"\n\"از مقدار NULL برای تمایز بین variant‌ ها به جای استفاده از تگ صریح استفاده \"\n\"می‌کند ([\\\"بهینه‌سازی اشاره‌گر خالی\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\\\"Just box\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\\\"Optional box\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\\\"Size of just_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\\\"Size of optional_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\\\"Size of none: {}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) یک اشاره‌گر مشترک با \"\n\"شمارش ارجاع است. از این هنگام استفاده کنید که نیاز دارید به داده‌های یکسان از \"\n\"مکان‌های متعدد اشاره کنید:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"اگر در یک محیط چند-رشته‌ای (multi-threaded) هستید، به [`Arc`](../concurrency/\"\n\"shared-state/arc.md) و [`Mutex`](https://doc.rust-lang.org/std/sync/struct.\"\n\"Mutex.html) نگاه کنید.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"شما می‌توانید یک اشاره‌گر مشترک را به یک اشاره‌گر [`Weak`](https://doc.rust-\"\n\"lang.org/std/rc/struct.Weak.html) تغییر دهید تا دوره‌هایی ایجاد کنید که در \"\n\"نهایت حذف خواهند شد.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"شمارش `Rc` تضمین می‌کند که مقدار درون آن به مدت زمانی که ارجاع‌هایی وجود دارد، \"\n\"معتبر خواهد بود.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"`Rc` در Rust مشابه `std::shared_ptr` در ++C است.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` ارزان است: این تابع یک اشاره‌گر به همان تخصیص (allocation) ایجاد \"\n\"می‌کند و شمارش ارجاع را افزایش می‌دهد. این عمل کپی عمیق (deep clone) انجام \"\n\"نمی‌دهد و به طور کلی هنگام جستجو برای مسائل عملکردی در کد می‌توان آن را نادیده \"\n\"گرفت.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` در واقع در صورت نیاز مقدار درونی را کپی می‌کند (\\\"clone-on-\"\n\"write\\\") و یک ارجاع قابل تغییر (mutable reference) برمی‌گرداند.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"از `Rc::strong_count` برای بررسی شمارش ارجاع‌ها استفاده کنید.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` یک شیء _با شمارش ارجاع ضعیف_ به شما می‌دهد تا دوره‌هایی ایجاد \"\n\"کنید که به درستی حذف خواهند شد (احتمالاً به همراه `RefCell`).\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\"پیش‌تر دیدیم که چگونه می‌توان ازویژگی اشیاء (trait objects) با ارجاعات استفاده \"\n\"کرد، مثلاً `dyn Pet&`. با این حال، می‌توانیم از اشیاء ویژگی با اشاره‌گرهای \"\n\"هوشمند مانند `Box` نیز استفاده کنیم تا یک شیء ویژگی مالک (owned trait \"\n\"object) ایجاد کنیم: `<Box<dyn Pet`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"چیدمان حافظه پس از تخصیص `pets`:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"تایپ‌هایی که ویژگی معین را پیاده‌سازی می‌کنند ممکن است اندازه‌های مختلفی داشته \"\n\"باشند. این موضوع باعث می‌شود که داشتن مواردی مانند `<Vec<dyn Pet` در مثال \"\n\"بالا غیرممکن باشد.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` راهی است برای اطلاع دادن به کامپایلر درباره یک تایپ با اندازه پویا \"\n\"که ویژگی `Pet` را پیاده‌سازی می‌کند.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"در این مثال، `pets` در stack تخصیص داده می‌شود و داده‌های vector در heap \"\n\"هستند. دو عنصر vector _اشاره‌گرهای چاق_ (fat pointers) هستند:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"اشاره‌گر چاق (fat pointer) یک اشاره‌گر با عرض دو برابر است. این اشاره‌گر دو \"\n\"مؤلفه دارد: یک اشاره‌گر به شیء واقعی و یک اشاره‌گر به [روش‌های جدول مجازی]\"\n\"(https://en.wikipedia.org/wiki/Virtual_method_table) (vtable) برای پیاده‌سازی \"\n\"`Pet` آن شیء خاص.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"داده‌های مربوط به `Dog` به نام Fido شامل فیلدهای `name` و `age` است. `Cat` \"\n\"دارای فیلد `lives` است.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"خروجی‌های زیر را در مثال بالا مقایسه کنید:\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"یک درخت باینری (binary tree) یک ساختار داده درختی است که در آن هر گره دو \"\n\"فرزند (چپ و راست) دارد. ما درختی خواهیم ساخت که در آن هر گره یک مقدار را \"\n\"ذخیره می‌کند. برای یک گره معین N، تمام گره‌های زیر درخت چپ N دارای مقادیر \"\n\"کوچکتر خواهند بود و تمام گره‌های زیر درخت راست N دارای مقادیر بزرگتر خواهند \"\n\"بود.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"تایپ‌های زیر را پیاده‌سازی کنید تا آزمایش‌های داده شده موفقیت‌آمیز باشند.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\"اعتبار اضافی: یک تکرارگر (iterator) بر روی درخت باینری پیاده‌سازی کنید که \"\n\"مقادیر را به ترتیب (in-order) برگرداند.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// A node in the binary tree.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// A possibly-empty subtree.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"// not a unique item\\n\"\nmsgstr \"// not a unique item\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب استراحت‌های ۱۰ دقیقه‌ای، این جلسه باید حدود ۱ ساعت و ۵۵ دقیقه طول \"\n\"بکشد. این شامل:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"همان‌طور که پیش‌تر دیدیم، به جای انتقال مالکیت هنگام فراخوانی یک تابع، \"\n\"می‌توانید به تابع اجازه دهید که _ارجاعی_ به مقدار داشته باشد:\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"تابع `add` _ارجاع_ می‌گیرد به دو نقطه و یک نقطه جدید برمی‌گرداند.\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"فراخوانی‌کننده مالکیت ورودی‌ها را حفظ می‌کند.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"این اسلاید مرور مطالب مربوط به ارجاعات از روز اول است که به طور جزئی به شامل \"\n\"آرگومان‌های تابع و مقادیر بازگشتی گسترش یافته است.\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"یادداشت‌هایی در مورد بازگشت‌های stack و درون‌ریزی (inlining):\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"برای نشان دادن این که بازگشت از `add` ارزان است، زیرا کامپایلر می‌تواند \"\n\"عملیات کپی را حذف کند، با درون‌ریزی (inlining) فراخوانی `add` به تابع `main`، \"\n\"کد فوق را تغییر دهید تا آدرس‌های پشته چاپ شوند و آن را در [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"اجرا کنید یا به اسمبلی در [Godbolt](https://rust.godbolt.org/) نگاه کنید. در \"\n\"سطح بهینه‌سازی \\\"DEBUG\\\"، آدرس‌ها باید تغییر کنند، در حالی که با تغییر به \"\n\"تنظیم \\\"RELEASE\\\" ثابت می‌مانند:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\"کامپایلر Rust می‌تواند به‌طور خودکار درون‌ریزی (inlining) انجام دهد، که می‌تواند \"\n\"در سطح تابع با `[inline(never)]#` غیرفعال شود.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\"پس از غیرفعال کردن درون‌ریزی، آدرس‌های چاپ شده در تمامی سطوح بهینه‌سازی تغییر \"\n\"خواهند کرد. با نگاه کردن به Godbolt یا Playground، می‌توان دید که در این \"\n\"حالت، بازگشت مقدار به ABI بستگی دارد، به عنوان مثال در amd64، دو `i32` که \"\n\"نقطه را تشکیل می‌دهند، در دو رجیستر (مانند `eax` و `edx`) بازگردانده خواهند \"\n\"شد.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"_بررسی‌کننده ارجاع_ (borrow checker) در Rust محدودیت‌هایی بر روی روش‌های ارجاع \"\n\"به مقادیر اعمال می‌کند. برای یک مقدار خاص، در هر زمان:\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"شما می‌توانید یک یا چند ارجاع اشتراکی به مقدار داشته باشید، _یا_\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"می‌توانید دقیقاً یک ارجاع انحصاری به مقدار داشته باشید.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"توجه داشته باشید که نیاز این است که ارجاعات متضاد در همان نقطه _وجود_ نداشته \"\n\"باشند. مهم نیست که ارجاع در کجا dereferenced شود.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"کد بالا کامپایل نمی‌شود زیرا `a` به‌طور همزمان به‌صورت قابل تغییر (از طریق `c`) \"\n\"و غیرقابل تغییر (از طریق `b`) ارجاع داده شده است.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"برای اینکه کد کامپایل شود، دستور `!println` مربوط به `b` را قبل از محدوده‌ای \"\n\"که `c` را معرفی می‌کند، منتقل کنید.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"پس از آن تغییر، کامپایلر متوجه می‌شود که `b` تنها پیش از ارجاع جدید قابل \"\n\"تغییر به `a` از طریق `c` استفاده می‌شود. این ویژگی بررسی‌کننده ارجاع به نام \"\n\"non-lexical lifetimes است.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"محدودیت ارجاع انحصاری بسیار قوی است. Rust از آن برای اطمینان از عدم وقوع \"\n\"داده‌های رقابتی (data races) استفاده می‌کند. Rust همچنین _متکی_ به این محدودیت \"\n\"برای بهینه‌سازی کد است. به عنوان مثال، مقدار پشت یک ارجاع اشتراکی می‌تواند \"\n\"به‌طور ایمن در یک رجیستر برای طول عمر آن ارجاع کش شود.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"بررسی‌کننده ارجاع به‌گونه‌ای طراحی شده است که بسیاری از الگوهای رایج را \"\n\"پشتیبانی کند، مانند گرفتن ارجاعات انحصاری به فیلدهای مختلف در یک ساختار \"\n\"به‌طور همزمان. اما، در برخی موقعیت‌ها، ممکن است که به‌طور کامل متوجه وضعیت نشود \"\n\"و این اغلب منجر به \\\"درگیری با borrow checker\\\" می‌شود.\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\"به عنوان یک مثال ملموس از چگونگی جلوگیری از خطاهای حافظه توسط این قوانین \"\n\"ارجاع، به حالت تغییر یک مجموعه در حالی که ارجاعاتی به عناصر آن وجود دارد، \"\n\"توجه کنید:\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"{elem}\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"به طور مشابه، به وضعیت نامعتبر شدن تکرارگر (iterator) توجه کنید:\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\"در هر دو مورد، تغییر مجموعه با اضافه کردن عناصر جدید به آن می‌تواند به‌طور \"\n\"بالقوه ارجاعات موجود به عناصر مجموعه را نامعتبر کند، اگر مجموعه نیاز به \"\n\"تخصیص مجدد حافظه داشته باشد.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"در برخی موقعیت‌ها، لازم است که داده‌های پشت یک ارجاع اشتراکی (فقط خواندنی) را \"\n\"تغییر دهید. به عنوان مثال، یک ساختار داده اشتراکی ممکن است دارای یک کش داخلی \"\n\"باشد و بخواهد این کش را از روش‌های خواندنی به‌روزرسانی کند.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"الگوی \\\"تغییرپذیری داخلی\\\" (interior mutability) اجازه می‌دهد که دسترسی \"\n\"انحصاری (قابل تغییر) پشت یک ارجاع اشتراکی وجود داشته باشد. کتابخانه \"\n\"استاندارد روش‌های متعددی برای انجام این کار فراهم می‌کند، در حالی که همچنان \"\n\"ایمنی را تضمین می‌کند، معمولاً با انجام یک بررسی در زمان اجرا.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value using only a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the inner value. Since there are no references, borrowing rules cannot be \"\n\"broken.\"\nmsgstr \"\"\n\"`Cell` یک مقدار را در بر می‌گیرد و امکان دریافت یا تنظیم مقدار را حتی با یک \"\n\"ارجاع اشتراکی به `Cell` فراهم می‌کند. با این حال، `Cell` اجازه نمی‌دهد که به \"\n\"مقدار ارجاع داده شود. از آنجا که هیچ ارجاعی وجود ندارد، قوانین ارجاع \"\n\"نمی‌توانند نقض شوند.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"// Note that `cell` is NOT declared as mutable.\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` allows accessing and mutating a wrapped value by providing \"\n\"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without \"\n\"actually being Rust references.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"These types perform dynamic checks using a counter in the `RefCell` to \"\n\"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`.\"\nmsgstr \"\"\n\"این type با استفاده از یک شمارنده در `RefCell` بررسی‌های dynamic را انجام \"\n\"می‌دهند تا از وجود `RefMut` در کنار `Ref`/`RefMut` دیگر جلوگیری کنند.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow \"\n\"calling methods on the inner value without allowing references to escape.\"\nmsgstr \"\"\n\"با پیاده‌سازی `Deref` (و `DerefMut` برای `RefMut`)، این تایپ‌ها امکان فراخوانی \"\n\"متدها روی مقدار داخلی را بدون اجازه خروج ارجاع‌ها فراهم می‌کنند.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{cell:?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"مهم‌ترین نکته‌ای که باید از این اسلاید برداشت کرد این است که Rust روش‌های \"\n\"_ایمن_ برای تغییر داده‌های پشت یک ارجاع اشتراکی ارائه می‌دهد. راه‌های مختلفی \"\n\"برای تضمین این ایمنی وجود دارد، و `RefCell` و `Cell` دو مورد از آن‌ها هستند.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` قوانین معمول ارجاع Rust (یا چندین ارجاع اشتراکی یا یک ارجاع \"\n\"انحصاری) را با یک بررسی در زمان اجرا اعمال می‌کند. در این حالت، همه ارجاعات \"\n\"بسیار کوتاه هستند و هرگز هم‌پوشانی ندارند، بنابراین بررسی‌ها همیشه موفقیت‌آمیز \"\n\"هستند.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\"بلوک اضافی در مثال `RefCell` برای پایان دادن به ارجاعی که توسط فراخوانی \"\n\"`borrow_mut` ایجاد شده است، قبل از چاپ `cell` است. تلاش برای چاپ یک \"\n\"`RefCell` که در حال حاضر ارجاع داده شده است، فقط پیغام `\\\"{borrowed}\\\"` را \"\n\"نشان می‌دهد.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` یک روش ساده‌تر برای تضمین ایمنی است: این نوع دارای متدی به نام `set` \"\n\"است که `self&` را می‌پذیرد. این روش نیاز به بررسی در زمان اجرا ندارد، اما \"\n\"نیاز به انتقال مقادیر دارد که می‌تواند هزینه‌های خود را داشته باشد.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\"هر دو `RefCell` و `Cell` دارای `!Sync` هستند، به این معنی که `RefCell&` و \"\n\"`&Cell` نمی‌توانند بین نخ‌ها منتقل شوند. این امر مانع از دسترسی همزمان دو نخ \"\n\"به سلول می‌شود.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"شما در حال پیاده‌سازی یک سیستم پایش سلامت هستید. به عنوان بخشی از این کار، \"\n\"نیاز دارید تا آمار سلامت کاربران را دنبال کنید.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"شما با یک تابع ابتدایی در بلوک `impl` و همچنین یک تعریف `struct` به نام \"\n\"`User` شروع خواهید کرد. هدف شما پیاده‌سازی متد ابتدایی در `struct` `User` است \"\n\"که در بلوک `impl` تعریف شده است.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"کد زیر را به <https://play.rust-lang.org/> کپی کنید و متد‌های ناقص را تکمیل \"\n\"کنید:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\\\"به‌روزرسانی آمار یک کاربر بر اساس اندازه‌گیری معبار بازدید از پزشک\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"من {} هستم و سن من {} است\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"یک مرجع دارای _طول عمر_ است که نباید از ارزش مورد اشاره بیشتر باشد. این \"\n\"موضوع توسط بررسی‌کننده قرض‌ها تایید می‌شود.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"طول عمر می‌تواند ضمنی باشد - این همان چیزی است که تا کنون مشاهده کرده‌ایم. طول \"\n\"عمرها می‌توانند صریح نیز باشند: `&'a Point`، `&'document str`. طول عمرها با \"\n\"`'` شروع می‌شوند و `'a` نام پیش‌فرض معمولی است. `&'a Point` را به عنوان \\\"یک \"\n\"`Point` قرضی که برای حداقل طول عمر `a` معتبر است\\\" بخوانید.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"طول عمرها همیشه توسط کامپایلر استنتاج می‌شوند: شما نمی‌توانید به طور دستی طول \"\n\"عمر را اختصاص دهید. انتساب‌های صریح طول عمر محدودیت‌هایی ایجاد می‌کنند که در \"\n\"صورت وجود ابهام است؛ کامپایلر تأیید می‌کند که یک راه‌حل معتبر وجود دارد.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"طول عمرها وقتی که به عبور مقادیر به توابع و بازگشت مقادیر از توابع می‌پردازیم \"\n\"پیچیده‌تر می‌شوند.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// What is the lifetime of p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"در این مثال، کامپایلر نمی‌داند که طول عمر `p3` را چگونه استنباط کند. نگاه \"\n\"کردن به بدنه تابع نشان می‌دهد که تنها به‌طور ایمن می‌تواند فرض کند که طول عمر \"\n\"`p3` کوتاه‌تر از `p1` و `p2` است. اما مانند تایپ‌ها، راست نیاز به توضیحات صریح \"\n\"طول عمرها در آرگومان‌های تابع و مقادیر بازگشتی دارد.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"به تابع `left_most` به صورت مناسب `'a` را اضافه کنید:\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"این به این معناست که \\\"با توجه به اینکه `p1` و `p2` هر دو از `'a` بیشتر عمر \"\n\"می‌کنند، مقدار بازگشتی برای مدت `'a` معتبر خواهد بود.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"در موارد معمول، عمر متغیرها می‌تواند نادیده گرفته شود، همانطور که در اسلاید \"\n\"بعدی توضیح داده شده است.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"طول عمر در فراخوانی‌ توابع\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"عمرهای مربوط به آرگومان‌های تابع و مقادیر بازگشتی باید به طور کامل مشخص شوند، \"\n\"اما Rust اجازه می‌دهد عمرها در بیشتر موارد با [چند قانون ساده](https://doc.\"\n\"rust-lang.org/nomicon/lifetime-elision.html) نادیده گرفته شوند. این مسئله \"\n\"استنتاج نیست -- بلکه تنها یک اصطلاح نوشتاری کوتاه است.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\"هر آرگومان که فاقد یک lifetime annotation است، یک عمر به آن اختصاص داده \"\n\"می‌شود.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"اگر تنها یک عمر برای آرگومان وجود داشته باشد، به تمام مقادیر بازگشتی که \"\n\"حاشیه‌نویسی نشده‌اند، اختصاص داده می‌شود.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"اگر چندین عمر آرگومان وجود داشته باشد و اولین آن برای `self` باشد، آن عمر به \"\n\"تمام مقادیر بازگشتی که حاشیه‌نویسی نشده‌اند، اختصاص داده می‌شود.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"در این مثال، `cab_distance` به طور خودکار حذف می‌شود.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"تابع `nearest` مثال دیگری از تابعی است که با ارجاعات متعدد در آرگومان‌هایش \"\n\"نیاز به حاشیه‌نویسی صریح دارد.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"امضا را طوری تنظیم کنید که \\\"دروغ\\\" بگوید درباره طول عمر مقادیری که برگشت \"\n\"داده می‌شوند:\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"این کد کامپایل نخواهد شد، که نشان‌دهنده این است که برچسب‌های طول عمر توسط \"\n\"کامپایلر برای اعتبارسنجی بررسی می‌شوند. توجه داشته باشید که این وضعیت برای \"\n\"اشاره‌گرهای خام (ناامن) صدق نمی‌کند و این یکی از منابع رایج خطاها در Rust \"\n\"ناامن است.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"دانش‌آموزان ممکن است بپرسند که چه زمانی باید از طول عمرها استفاده کرد. در \"\n\"Rust، _همیشه_ برای قرض‌ها طول عمر وجود دارد. بیشتر مواقع، حذف و استنباط تایپ \"\n\"به این معنی است که نیازی به نوشتن این طول عمرها نیست. در موارد پیچیده‌تر، \"\n\"برچسب‌های طول عمر می‌توانند به حل ابهام کمک کنند. اغلب، به‌ویژه در هنگام \"\n\"پروتوتایپ‌سازی، راحت‌تر است که با داده‌های مالکیت‌شده کار کنید و مقادیر را در \"\n\"صورت لزوم کلون کنید.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Lifetimes in Data Structures\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"اگر یک تایپ داده داده‌های قرضی را ذخیره کند، باید با یک طول عمر مشخص شود:\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Bye {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"در مثال بالا، حاشیه‌نویسی بر روی `Highlight` تضمین می‌کند که داده‌های زیرین \"\n\"`str&` به مدت حداقل برابر با هر نمونه از `Highlight` که از آن داده استفاده \"\n\"می‌کند، زنده بماند.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"اگر `text` قبل از پایان عمر `fox` (یا `dog`) مصرف شود، بررسی‌کننده‌ی قرض \"\n\"(borrow checker) خطا می‌دهد.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"تایپ‌های دارای داده‌های قرضی (borrowed data) کاربران را مجبور می‌کنند تا \"\n\"داده‌های اصلی را نگه دارند. این می‌تواند برای ایجاد نمایه‌های سبک مفید باشد، \"\n\"اما معمولاً استفاده از آنها را تا حدی دشوارتر می‌کند.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"در صورت امکان، داده‌های ساختارها را به طور مستقیم مالکیت کنید.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"برخی از ساختارهای داده که شامل چندین ارجاع هستند، ممکن است نیاز به چندین \"\n\"نشانه‌گذاری عمر داشته باشند. این امر می‌تواند ضروری باشد اگر بخواهید روابط \"\n\"عمری بین ارجاعات مختلف را به علاوه عمر ساختار خود توصیف کنید. این موارد \"\n\"بسیار پیشرفته هستند.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"در این تمرین، شما یک تجزیه‌کننده برای [رمزگذاری باینری پروتوباف](https://\"\n\"protobuf.dev/programming-guides/encoding/) خواهید ساخت. نگران نباشید، این \"\n\"کار ساده‌تر از آن است که به نظر می‌رسد! این الگو نشان‌دهنده یک الگوی رایج در \"\n\"تجزیه داده‌ها است که شامل عبور برش‌های داده است. داده‌های اصلی هرگز کپی نمی‌شوند.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"تجزیه کامل یک پیام پروتوباف نیاز به دانستن تایپ‌های این فیلدها دارد که بر \"\n\"اساس شماره‌های فیلد ایندکس شده‌اند. این اطلاعات معمولاً در یک فایل `proto` \"\n\"ارائه می‌شود. در این تمرین، ما این اطلاعات را به صورت عبارات `match` در \"\n\"توابعی که برای هر فیلد فراخوانی می‌شوند، کدگذاری خواهیم کرد.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"ما از پروتوباف زیر استفاده خواهیم کرد:\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"یک پیام پروتوباف به عنوان مجموعه‌ای از فیلدها، یکی پس از دیگری، کدگذاری \"\n\"می‌شود. هر فیلد به صورت یک \\\"تگ\\\" به همراه مقدار آن پیاده‌سازی شده است. تگ \"\n\"شامل شماره فیلد (مانند `2` برای فیلد `id` در پیام `Person`) و wire type است \"\n\"که نحوه تعیین بار را از جریان بایت مشخص می‌کند.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"اعداد، از جمله تگ، با استفاده از کدگذاری با طول متغیر به نام VARINT نمایندگی \"\n\"می‌شوند. خوشبختانه، تابع `parse_varint` برای شما تعریف شده است. کد داده شده \"\n\"همچنین بازخوانی‌هایی برای مدیریت فیلدهای `Person` و `PhoneNumber` و تجزیه یک \"\n\"پیام به مجموعه‌ای از فراخوانی‌ها به آن بازخوانی‌ها را تعریف می‌کند.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"برای شما باقی‌مانده است که تابع `parse_field` و ویژگی `ProtoMessage` را برای \"\n\"`Person` و `PhoneNumber` پیاده‌سازی کنید.\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// A wire type as seen on the wire.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    /// little-endian order containing a 64-bit signed integer or double \"\n\"type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"/// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    /// little-endian order containing a 64-bit signed integer or double \"\n\"type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float \"\n\"type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float \"\n\"type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// A field's value, typed based on the wire type.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//I32(i32),  -- not needed for this exercise\\n\"\nmsgstr \"//I32(i32),  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// A field, containing the field number and its value.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\nmsgstr \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\\\"نوع سیم نامعتبر: {value}\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\\\"انتظار می‌رود که رشته یک فیلد Len باشد\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\\\"نامعتبر string\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\\\"بایت‌های مورد انتظار یک فیلد `Len` باشند\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\\\"انتظار می‌رود `u64` یک فیلد `Varint` باشد\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\\\"بایت کافی برای varint نیست\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// More than 7 bytes is invalid.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\\\"تعداد بایت‌های زیادی برای varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Convert a tag into a field number and a WireType.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Parse a field, returning the remaining bytes\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"بر اساس نوع سیم، یک فیلد بسازید، با مصرف هر تعداد بایت که لازم است.\\\"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"فیلد و هر بایت مصرف نشده را برگردانید.\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\"در این تمرین موارد مختلفی وجود دارد که ممکن است تجزیه protobuf با شکست مواجه \"\n\"شود، مثلاً اگر بخواهید یک `i32` را هنگامی که کمتر از ۴ بایت در بافر داده \"\n\"باقی‌مانده است، تجزیه کنید. در کد Rust معمولاً این را با استفاده از `Result` \"\n\"مدیریت می‌کنیم، اما برای سادگی در این تمرین، اگر با هرگونه خطا مواجه شویم، به \"\n\"جای آن که با `Result` برخورد کنیم، برنامه را متوقف خواهیم کرد. در روز چهارم، \"\n\"به بررسی دقیق‌تر مدیریت خطا در Rust خواهیم پرداخت.\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\\\"استفاده از len در `usize` معتبر نیست\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"EOF غیر منتظره\\\"\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"// skip everything else\\n\"\nmsgstr \"// skip everything else\\n\"\n\n#: src/lifetimes/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/testing/unit-tests.md src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"beautiful name\\\"\"\nmsgstr \"\\\"سلام {name}\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Evan\\\"\"\nmsgstr \"\\\"Evan\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"+1234-777-9090\\\"\"\nmsgstr \"\\\"+1234-777-9090\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"home\\\"\"\nmsgstr \"\\\"خانه\\\"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"به روز ۱ خوش آمدید\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"امروز ما موضوعات مربوط به ساخت نرم افزار در مقیاس بزرگ در Rust را پوشش \"\n\"خواهیم داد:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"Iterators: شیرجه عمیق در ویژگی `Iterator`.\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"ماژول ها و قابلیت مشاهده.\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"تست‌کردن.\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"رسیدگی به خطا: panics در `Result` و اپراتور تلاش مجدد `?`.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\"با Unsafe Rust: پنجره فرار مبتنی بر زمان که نمی‌توانید خود را در safe Rust \"\n\"بیان کنید.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب ۱۰ دقیقه استراحت، این جلسه باید حدود ۲ ساعت و ۴۰ دقیقه طول بکشد. \"\n\"شامل:\"\n\n#: src/iterators.md\nmsgid \"Iterator\"\nmsgstr \"Iterator\"\n\n#: src/iterators.md\nmsgid \"IntoIterator\"\nmsgstr \"IntoIterator\"\n\n#: src/iterators.md src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"ویژگی ['Iterator'](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"از تکرار بیش از مقادیر در یک مجموعه پشتیبانی می‌کند. این به یک متد `next` \"\n\"نیاز دارد و متدهای زیادی را ارائه می‌کند. بسیاری از انواع کتابخانه استاندارد \"\n\"`Iterator`  را پیاده‌سازی می‌کنند و شما نیز می‌توانید آن را خودتان پیاده‌سازی \"\n\"کنید:\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"ویژگی `Iterator` بسیاری از عملیات برنامه‌نویسی تابعی رایج را روی collectionها \"\n\"پیاده‌سازی می‌کند (مانند `map`, `filter`, `reduce`,و غیره). این ویژگی است که \"\n\"در آن می‌توانید تمام اسناد مربوط به آنها را پیدا کنید. در Rust، این توابع \"\n\"باید کد را به اندازه پیاده‌سازی‌های ضروری معادل تولید کنند.\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` ویژگی است که باعث می‌شود حلقه‌ها کار کنند. این مجموعه \"\n\"(collection) توسط تایپ‌های مجموعه مانند  `Vec<T>` و ارجاعاتی به آنها مانند  \"\n\"`&Vec<T>` و  `&[T]` پیاده‌سازی می‌شود. Ranges نیز آن ‌هارا اجرا می‌کند. به همین \"\n\"دلیل است که می‌توانید روی یک بردار با `برای i در some_vec { .. }` تکرار کنید، \"\n\"اما  درنهایت `some_vec.next()`وجود ندارد.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"ویژگی `Iterator` به شما می‌گوید که چگونه پس از ایجاد یک تکرار کننده، \"\n\"_iterate_ کنید. ویژگی مرتبط [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) نحوه ایجاد یک تکرار کننده برای یک نوع را مشخص \"\n\"می‌کند. به طور خودکار توسط حلقه `for` استفاده می‌شود.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"روی مستندات`IntoIterator` کلیک کنید. هر پیاده‌سازی `IntoIterator` باید دو نوع \"\n\"را اعلام کند:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"ء `Item`: نوعی که باید تکرار شود، مانند `i8`،\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\"`IntoIter`: یک «Iterator» تایپ است که با متد `into_iter` برگردانده شده است.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"توجه داشته باشید که `IntoIter` و`Item` به هم link شده‌اند: تکرار‌کننده \"\n\"(iterator) باید همان `Item` type را داشته باشد، به این معنی که \"\n\"`Option<Item>` را برمی‌گرداند.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"مثال روی تمام ترکیبات مختصات x و y تکرار می‌شود.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"سعی کنید دو بار روی شبکه در `main` تکرار کنید. چرا این گزینه شکست می‌خورد؟ \"\n\"توجه داشته باشید که `IntoIterator::into_iter` مالکیت `self` را می‌گیرد.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"این مشکل را با اجرای `IntoIterator` برای `&Grid` و ذخیره یک reference به این \"\n\"`Grid` در `GridIter` برطرف کنید.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"همین مشکل می‌تواند برای انواع کتابخانه استاندارد رخ دهد: `برای e در \"\n\"some_vector` مالکیت `some_vector` را در اختیار می‌گیرد و روی عناصر متعلق به \"\n\"آن بردار تکرار می‌شود. به جای آن از `e در &some_vector` برای تکرار بر روی \"\n\"ارجاعات به عناصر `some_vector` استفاده کنید.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"گزینه [`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.\"\n\"html) به شما امکان می دهد از یک [`Iterator`](https://doc.rust-lang .org/std/\"\n\"iter/trait.Iterator.html) یک مجموعه یا collection  بسازید.\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"پیاده‌سازی `Iterator`\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"دو راه برای تعیین`B` برای این روش وجود دارد:\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"با کمک \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`، همانطور \"\n\"که نشان داده شده است و به طور خلاصه `_` استفاده شده در اینجا به Rust امکان \"\n\"می‌دهد نوع عناصر \\\"Vec\\\" را استنتاج کند.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"با نوع inference:  `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"این مثال را برای استفاده از این فرم بازنویسی کنید.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"پیاده‌سازی‌های اولیه `FromIterator` برای`Vec`, `HashMap` و غیره وجود دارد. \"\n\"همچنین پیاده‌سازی‌های تخصصی‌تری وجود دارد که به شما امکان می‌دهد کارهای جالبی \"\n\"مانند تبدیل `Iterator<Item = Result<V, E>>` به یک `Result<Vec<V>, E>` انجام \"\n\"دهید.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"در این تمرین، باید برخی از روش های ارائه شده در [`Iterator`](https://doc.\"\n\"rust-lang.org/std/iter/trait.Iterator.html) را برای پیاده‌سازی یک ویژگی پیدا \"\n\"کنید و از آنها برای محاسبه پیچیده استفاده کنید.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"کد زیر را در<https://play.rust-lang.org/> کپی کنید و تست ها را قبول کنید. از \"\n\"یک عبارت تکرارکننده (iterator) استفاده کنید و نتیجه را جمع‌آوری (`collect`) \"\n\"کنید تا مقدار بازگشتی را بسازید.\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use, super, self\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"دیده‌ایم که چگونه بلوک‌های `impl` به ما اجازه می‌دهند تا namespace functions را \"\n\"به یک type تبدیل کنیم.\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"به طور مشابه، `mod` به ما اجازه می‌دهد تا توابع و namespace type به این صورت \"\n\"داشته باشیم:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"در ماژول foo\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"در ماژول نواری\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"بسته‌ها یا Packageهای عملکردی را ارائه می‌کنند و شامل یک فایل`Cargo.toml` \"\n\"می‌شوند که نحوه ساخت بسته‌ای از crateهای 1+ را شرح می‌دهد.\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"در واقع Crateها درختی از ماژول‌ها هستند که در آن یک crate باینری یک فایل \"\n\"اجرایی ایجاد می‌کند و یک crate کتابخانه در یک کتابخانه کامپایل می‌شود.\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"ماژول‌های organization، scope، و تمرکز این بخش را تعریف می‌کنند.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"حذف محتوای ماژول به Rust می‌گوید که آن را در فایل دیگری جستجو کند:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"این به rust می‌گوید که محتوای ماژول `garden` در`src/garden.rs`یافت می‌شود. به \"\n\"طور مشابه، ماژول `garden::vegetables` را می‌توان در `src/garden/vegetables.\"\n\"rs` یافت.\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"ریشه`crate`  در:\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (for a library crate)\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (for a binary crate)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"ماژول‌های تعریف‌شده در فایل‌ها را نیز می‌توان با استفاده از «کامنت‌های مستند \"\n\"داخلی» مستند کرد. اینها موردی را که حاوی آنها است - در این مورد، یک ماژول \"\n\"مستند می‌کنند.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Re-export types from this module.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Sow the given seed packets.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Harvest the produce in the garden that is ready.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"قبل از Rust 2018، ماژول‌ها باید به جای `module.rs` در `module/mod.rs` قرار \"\n\"می‌گرفتند و این هنوز یک جایگزین کارآمد برای نسخه‌های بعد از 2018 است.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"دلیل اصلی معرفی `filename.rs` به‌عنوان جایگزین `filename/mod.rs` این بود که \"\n\"تشخیص بسیاری از فایل‌ها با نام `mod.rs` در IDE‌ها دشوار است.\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"لانه‌گزینی(nesting) عمیق‌تر می‌تواند از folderها استفاده کند، حتی اگر ماژول \"\n\"اصلی یک فایل باشد:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"مکانی که rust به دنبال ماژول‌ها می‌گردد را می‌توان با دستور کامپایلر تغییر داد:\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"برای مثال، اگر می‌خواهید تست‌هایی را برای یک ماژول در فایلی به نام \"\n\"`some_module_test.rs` قرار دهید، مفید است، شبیه به قرارداد (convention) در \"\n\"Go.\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"ماژول‌ها یک مرز حریم خصوصی هستند:\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"گزینه‌های ماژول به طور پیش‌فرض private هستند (جزئیات پیاده سازی را پنهان \"\n\"می‌کند).\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"کزینه‌های sibling و sibling همیشه قابل مشاهده است.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"به عبارت دیگر، اگر یک مورد در ماژول `foo` قابل مشاهده باشد، در همه \"\n\"فرزندان`foo` قابل مشاهده است.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"از کلمه کلیدی `pub` برای public کردن ماژول‌ها استفاده کنید.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"علاوه بر این، مشخص‌کننده‌های پیشرفته `pub(...)` برای محدود کردن دامنه دید \"\n\"عمومی وجود دارد.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"این آدرس با ببینید [Rust Reference](https://doc.rust-lang.org/reference/\"\n\"visibility-and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"پیکربندی قابل نمایش بودن `pub(crate)` یک الگوی رایج است.\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"این مورد کمتر متداول است، شما می‌توانید به یک مسیر خاص دید بدهید.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"در هر صورت، قابلیت دیدن باید به یک ماژول والد (و همه فرزندان آن) داده شود.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"یک ماژول می‌تواند نمادها را از ماژول دیگری با `use` وارد محدوده کند. شما \"\n\"معمولاً چیزی شبیه به این را در بالای هر ماژول خواهید دید:\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"مسیر\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"مسیرها (Paths) به شرح زیر حل می‌شوند:\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"به عنوان یک path نسبی:\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"در واقع `foo` یا `self::foo` به `foo` در ماژول فعلی اشاره دارد،\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"به عنوان یک path مطلق:\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` به `foo` در ریشه جعبه فعلی اشاره دارد,\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"یک `bar::foo` به `foo` در `bar` crate اشاره دارد.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"این\\\"re-export\\\" نمادها در مسیر کوتاه‌تری معمول است. برای مثال، `lib.rs` سطح \"\n\"بالا در یک crate ممکن است داشته باشد\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"در دسترس قرار دادن `DiskStorage` و `NetworkStorage` برای سایر  crateها با یک \"\n\"مسیر راحت و کوتاه.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"در بیشتر موارد، فقط مواردی که در یک ماژول ظاهر می‌شوند باید `use` شوند. با‌ \"\n\"این‌حال، یک ویژگی (trait) باید در محدوده باشد تا بتوان هر method ای را روی آن \"\n\"ویژگی فراخوانی کرد، حتی اگر نوعی که آن ویژگی را اجرا می کند قبلاً در محدوده \"\n\"باشد. به عنوان مثال، برای استفاده از متد `read_to_string` در نوعی که ویژگی \"\n\"`Read` را اجرا می‌کند، باید از `use std::io::Read` استفاده کنید.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"عبارت `use` می‌تواند دارای علامت عام باشد:  `use std::io::*`. از این کار منع \"\n\"شده است زیرا مشخص نیست کدام موارد import می‌شوند و ممکن است در طول زمان تغییر \"\n\"کنند.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"در این تمرین، یک پیاده‌سازی کتابخانه GUI کوچک را دوباره سازماندهی خواهید کرد. \"\n\"این کتابخانه یک ویژگی`Widget` و چند پیاده‌سازی از آن ویژگی و همچنین یک تابع \"\n\"`main` را تعریف می‌کند.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"معمول است که هر نوع یا مجموعه‌ای از انواع مرتبط نزدیک را در ماژول خود قرار \"\n\"دهید، بنابراین هر نوع ویجت باید ماژول خاص خود را داشته باشد.\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"Cargo Setup\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"یک Rust playground  فقط از یک فایل پشتیبانی می‌کند، بنابراین باید یک پروژه \"\n\"Cargo را در سیستم فایل محلی خود ایجاد کنید:\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"این `src/main.rs` حاصل را ویرایش کنید تا عبارات `mod` را اضافه کنید و \"\n\"فایل‌های اضافی را در دایرکتوری `src` اضافه کنید.\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"منبع\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"در اینجا اجرای تک ماژول کتابخانه GUI آمده است:\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Natural width of `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Draw the widget into a buffer.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Draw the widget on standard output.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Add 4 paddings for borders\\n\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// add a bit of padding\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"این یک نسخه نمایشی GUI برای متنی کوچک است.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Click me!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"دانش‌آموزان را تشویق کنید تا کد را به‌گونه‌ای تقسیم کنند که برایشان طبیعی است و \"\n\"به اعلان‌های `mod`, `use` و `pub`عادت کنند. پس از آن، در مورد اینکه چه \"\n\"organizationهایی idiomatic هستند بحث کنید.\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: Label-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"تست‌های واحد (Unit Tests)\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust and Cargo با یک چارچوب تست واحد ساده ارائه می شود:\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"تست‌های یکپارچه‌سازی از طریق دایرکتوری `tests/` پشتیبانی می‌شوند.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"تست‌ها با `#[test]`علامت‌گذاری شده‌اند. تست‌های واحد اغلب در یک ماژول `tests` \"\n\"تودرتو قرار می‌گیرند و از `#[cfg(test)]` استفاده می‌کنند تا آنها را به صورت \"\n\"مشروط تنها در هنگام build تست‌ها کامپایل کنند.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"سلام دنیا!\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"این به شما امکان می‌دهد تا private helper را آزمایش کنید.\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"ویژگی  `#[cfg(test)]` تنها زمانی فعال است که `cargo test` را اجرا کنید.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"تست‌ها را در playground اجرا کنید تا نتیجه‌های آن‌ها را نشان‌دهید.\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Integration Tests\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"اگر می‌خواهید کتابخانه خود را به عنوان یک سرویس‌گیرنده آزمایش کنید، از تست \"\n\"یکپارچه‌سازی (integration test) استفاده کنید.\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"یک فایل  `.rs` در زیر  `tests/` بسازید:\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"این آزمایش‌ها فقط به public API مربوط به crate شما دسترسی دارند.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"تست‌ سندها\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"زبان Rust دارای پشتیبانی داخلی برای تست‌های مستندسازی است:\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"بلوک‌های کد در commentها `///` به طور خودکار به عنوان کد Rust دیده می‌شوند.\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"این کد به عنوان بخشی از `cargo test` کامپایل و اجرا می‌شود.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"افزودن  `#` به کد، آن را از مستندات پنهان می‌کند، اما همچنان آن را کامپایل/\"\n\"اجرا می‌کند.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"کد بالا را در [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) \"\n\"تست کنید.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"کامپایلر Rust پیام‌های خطای جالب و همچنین  built-in lint مناسبی تولید می‌کند. \"\n\"[Clippy](https://doc.rust-lang.org/clippy/)  که lintهای بیشتری را ارائه \"\n\"می‌دهد، که در گروه‌هایی سازماندهی شده‌اند که می‌توانند در هر پروژه فعال شوند.\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\"\\\"\\\"X احتمالاً در یک u16 مناسب است، درست است؟ {}\\\"X احتمالاً در یک u16 مناسب \"\n\"است، درست است؟ {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"نمونه کد را اجرا کنید و پیام خطا را بررسی کنید. lintهایی نیز در اینجا قابل \"\n\"مشاهده هستند، اما پس از کامپایل شدن کد، آن‌ها نشان‌داده نمی‌شوند. برای نمایش آن \"\n\"lintها به سایت Playground بروید.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"پس از رفع lintها،  `clippy`  را در سایت playground اجرا کنید تا هشدارهای \"\n\"clippy نشان داده شود. Clippy مستندات گسترده‌ای از  lintهای خود دارد و همیشه  \"\n\"lintهای جدید (از جمله default-deny lint) را اضافه می‌کند.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"توجه داشته باشید که خطاها یا هشدارهای مربوط به  `help: ...` را می‌توان با \"\n\"`cargo fix` یا از طریق ویرایشگر خود برطرف کرد.\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"الگوریتم  Luhn\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[الگوریتم Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) برای \"\n\"اعتبارسنجی شماره‌های کارت اعتباری استفاده می‌شود. این الگوریتم یک رشته را به \"\n\"عنوان ورودی دریافت می‌کند و برای اعتبارسنجی شماره کارت اعتباری مراحل زیر را \"\n\"انجام می‌دهد:\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"تمام فضاها را نادیده بگیرید.شماره‌هایی با کمتر از دو رقم را رد کنید.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"با حرکت از سمت راست رشته به چپ، هر دومین رقم را دوبل کنید: برای شماره \"\n\"`1234`، `3` و `1` را دوبل می‌کنیم. برای شماره `98765`، `6` و `8` را دوبل \"\n\"می‌کنیم.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"پس از دوبل کردن یک عدد، اگر اون جفت خروجی بیش از 9 باشد، ارقام را جمع کنید. \"\n\"بنابراین، دوبل کردن `7` به `14` تبدیل می‌شود که به <span dir=ltr>`1 + 4 = 5`</\"\n\"span> تبدیل می‌شود.\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"تمام ارقام دو برابر نشده و دو برابر شده را جمع کنید.\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"اگر مجموع با ‍`0` خاتمه یابد، شماره کارت اعتباری معتبر است.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"کد ارائه شده یک پیاده‌سازی باگ از الگوریتم luhn را به همراه دو unit test پایه \"\n\"ارائه می‌کند که تأیید می‌کند بیشتر الگوریتم به درستی پیاده‌سازی شده است.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"کد زیر را به <span dir=ltr><https://play.rust-lang.org/></span>  کپی کنید و \"\n\"تابع را پیاده‌سازی کنید.\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// This is the buggy version that appears in the problem.\\n\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// This is the solution and passes all of the tests below.\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"آیا {cc_number} یک شماره کارت اعتباری معتبر است؟ {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"بله\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"نه\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب 10 دقیقه استراحت، این جلسه باید حدود 2 ساعت و 5 دقیقه طول بکشد. آن \"\n\"شامل:\"\n\n#: src/error-handling.md\nmsgid \"Error Trait\"\nmsgstr \"ویژگی (Trait) خطا\"\n\n#: src/error-handling.md\nmsgid \"thiserror and anyhow\"\nmsgstr \"thiserror و anyhow\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"تمرین: بازنویسی با نتیجه\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust خطاهای مهلک را با \\\"panic\\\" کنترل می‌کند.\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"اگر یک خطای مرگبار در زمان اجرا رخ دهد، Rust باعث panic می‌شود:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"استفاده از Panicها برای خطاهای غیر قابل جبران و غیرمنتظره است.\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"پانیک‌ها علائم باگ در برنامه هستند.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"خرابی‌های زمان اجرا مانند failed bounds checkها می‌تواند باعث panic شود\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"Assertions (such as `assert!`) panic on failure\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"پنیک‌های خاص می‌توانند از ماکرو `panic!` استفاده کنند.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"یک panic را \\\"باز\\\" ​​می‌کند و مقادیر را حذف می‌کند درست مثل اینکه توابع برگشته \"\n\"باشند.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"اگر خرابی قابل قبول نیست، از APIهای بدون panic (مانند `Vec::get`) استفاده \"\n\"کنید.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"به طور پیش‌فرض، panic باعث unwind شدن stack می‌شود. unwinding را می‌توان \"\n\"گرفت( در واقع منظور این است که می‌توان آن را caught کرد):\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"اینجا مشکلی نیست!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"oh no!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\"گرفتن (Catching) غیر معمول است. سعی نکنید exceptionها را با `catch_unwind` \"\n\"پیاده‌سازی کنید!\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"این کار می‌تواند در سرورهایی مفید باشد که حتی در صورت خراب شدن یک درخواست، \"\n\"باید به کار خود ادامه دهند.\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"اگر `panic = 'abort'` در `Cargo.toml`» شما تنظیم شده باشد، این مورد کار \"\n\"نمی‌کند.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\"مکانیسم اصلی ما برای مدیریت خطا در Rust، فهرست [`Result`](https://doc.rust-\"\n\"lang.org/stable/std/result/enum.Result.html) است، که به طور خلاصه هنگام بحث \"\n\"در مورد تایپ‌های کتابخانه استاندارد مشاهده کردیم.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\"اینکه آیا یک تابع می‌تواند خطا ایجاد کند یا نه، در signature نوع تابع با \"\n\"برگرداندن تابع مقدار `Result` کدگذاری می‌شود.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\"مانند `Option`، هیچ راهی برای فراموش کردن خطا وجود ندارد: شما نمی‌توانید به \"\n\"مقدار موفقیت یا مقدار خطا بدون تطبیق الگوی اولیه در `Result` دسترسی پیدا \"\n\"کنید تا بررسی کنید کدام نوع را دارید. روش‌هایی مانند`unwrap`  نوشتن کدهای \"\n\"سریع و کثیف را آسان‌تر می‌کنند که مدیریت خطا را به خوبی انجام نمی‌دهد، اما به \"\n\"این معنی است که همیشه می‌توانید در کد منبع خود ببینید که در کجا مدیریت صحیح \"\n\"خطا نادیده گرفته می‌شود.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\"مقایسه مدیریت خطا در Rust با قراردادهای مدیریت خطا که دانش‌آموزان ممکن است با \"\n\"سایر زبان‌های برنامه‌نویسی آشنا باشند، ممکن است مفید باشد.\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"\"\n\"بسیاری از زبان‌ها از exceptionها استفاده می‌کنند، به عنوان مثال.  ++C، جاوا، \"\n\"پایتون.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\"در اکثر زبان‌های دارای exception، این که آیا یک تابع می‌تواند استثنا ایجاد کند \"\n\"یا نه، به عنوان بخشی از نوع امضای(signature) آن قابل مشاهده نیست. این به طور \"\n\"کلی به این معنی است که هنگام فراخوانی یک تابع نمی‌توانید بگویید که آیا ممکن \"\n\"است یک exception ایجاد کند یا خیر.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\"استثناها معمولاً call stack را باز می‌کنند و تا رسیدن به بلوک `try` به سمت \"\n\"بالا منتشر می‌شوند. خطایی که در اعماق call stack ایجاد می‌شود ممکن است بر \"\n\"عملکرد نامرتبط بیشتر تأثیر بگذارد.\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"شماره‌های خطا\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\"برخی از زبان‌ها دارای توابعی هستند که یک عدد خطا (یا مقداری خطای دیگر) را جدا \"\n\"از مقدار بازگشت موفقیت‌آمیز تابع برمی‌گردانند. به عنوان مثال می توان به C و Go \"\n\"اشاره کرد.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\"بسته به زبان ممکن است فراموش کنید مقدار خطا را بررسی کنید، در این صورت ممکن \"\n\"است به یک مقدار موفقیت نامعتبر یا نامعتبر دسترسی داشته باشید.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"خطاهای زمان اجرا مانند connection-refused یا file-not-found با نوع «نتیجه» \"\n\"مدیریت می‌شوند، اما تطبیق این نوع در هر تماس می‌تواند دشوار باشد. اپراتور `?`  \"\n\"برای برگرداندن خطاها به تماس گیرنده استفاده می‌شود. این به شما امکان می‌دهد تا \"\n\"موارد مشترک را بازگردانید.\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"بسیار ساده‌تر\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"می‌توانیم از این برای ساده‌سازی کد رسیدگی به خطا استفاده کنیم:\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"نام‌کاربری یا خطا: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"تابع `read_username` را برای استفاده از `?` ساده کنید.\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"متغیر`username` می تواند  `Ok(string)` یا `Err(error)` باشد.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"از فراخوانی `fs::write` برای آزمایش سناریوهای مختلف استفاده کنید: بدون فایل، \"\n\"فایل خالی، فایل با نام کاربری.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"توجه داشته باشید که `main` تا زمانی که `std::process::Termination` را \"\n\"پیاده‌سازی کند، می‌تواند `نتیجه<(), E>` را برگرداند. در عمل، این بدان معنی است \"\n\"که `E` پیاده‌سازی `Debug` را انجام‌می‌دهد. فایل اجرایی، نوع  `Err` را چاپ می‌کند \"\n\"و در صورت خطا، وضعیت خروج غیر صفر (nonzero) را برمی‌گرداند.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"گسترش مؤثر `?` کمی پیچیده‌تر از آنچه قبلاً ذکر شد است:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"به طو مشابه کار می‌کند\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"فراخوانی `From::from` در اینجا به این معنی است که ما سعی می کنیم نوع خطا را \"\n\"به نوع بازگشتی توسط تابع تبدیل کنیم. این باعث می‌شود که خطاها به خطاهای سطح \"\n\"بالاتر کپسوله شوند.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"IO error: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"در این  {path} نام کاربری یافت نشد\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"عملگر `?` باید مقداری سازگار با نوع بازگشتی تابع برگرداند. برای `Result`، به \"\n\"این معنی است که انواع خطا باید سازگار باشند. تابعی که`Result<T, ErrorOuter>` \"\n\"را برمی‌گرداند، تنها می‌تواند از  `?`  در مقداری از تایپ‌های  `Result<U, \"\n\"ErrorInner>` استفاده کند اگر `ErrorOuter` و `ErrorInner`  یک نوع باشند یا \"\n\"اگر `ErrorOuter` از<ErrorInner>` را پیاده‌سازی کند.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"یک جایگزین رایج برای پیاده سازی `From`جهت `Result::map_err` است، به خصوص \"\n\"زمانی که تبدیل‌ها فقط در یک مکان انجام می‌شود.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"هیچ الزامی برای سازگاری `Option` وجود ندارد. تابعی که `Option<T>` را برمی \"\n\"گرداند می تواند از عملگر `?` در `Option<U>` برای انواع دلخواه `T` و `U` \"\n\"استفاده کند.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"یک تابعی که `Result` را برمی‌گرداند دیگر نمی‌تواند از `?` در `Option` استفاده \"\n\"کند و بالعکس. با این‌حال، `Option::ok_or`  یک  `Option` را به `Result`  تبدیل \"\n\"می‌کند در حالی که `Result::ok` «نتیجه» را به `Option` تبدیل می‌کند.\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"انواع خطاهای Dynamic\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"گاهی اوقات می‌خواهیم اجازه دهیم هر نوع خطای بدون نوشتن enum خودمان که تمام \"\n\"احتمالات مختلف را پوشش می‌دهد، برگردانده شود. ویژگی `std::error::Error` ایجاد \"\n\"یک object مشخ استه که می‌تواند حاوی هر خطایی باشد را آسان می‌کند.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"تعداد: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Error: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"تابع `read_count`می‌تواند `std::io::Error` (از عملیات فایل) یا `std::num::\"\n\"ParseIntError` (از `String::parse`) را برگرداند.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"خطاهای Boxing باعث صرفه‌جویی در کد می شود، اما توانایی رسیدگی به موارد خطای \"\n\"مختلف را به طور متفاوت در برنامه از بین می‌برد. به این ترتیب استفاده از \"\n\"`Box<dyn Error>` در public API یک کتابخانه ایده خوبی نیست، اما می‌تواند گزینه \"\n\"خوبی در برنامه‌ای باشد که فقط می‌خواهید پیام خطا را در جایی نمایش دهید.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\"هنگام تعریف یک نوع خطای سفارشی، مطمئن شوید که ویژگی `std::error::Error` را \"\n\"اجرا کنید تا بتوان آن را در جعبه قرار داد. اما اگر نیاز به پشتیبانی از ویژگی \"\n\"`no_std` دارید، به خاطر داشته باشید که ویژگی `std::error::Error` در حال حاضر \"\n\"با `no_std` در [nightly](https://github.com/rust-lang) سازگار است.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"این [`thiserror`](https://docs.rs/thiserror/) و [`anyhow`](https://docs.rs/\"\n\"anyhow/) crateها به طور گسترده ای برای ساده کردن رسیدگی به خطا استفاده \"\n\"می‌شوند.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\"اغلب `anyhow` توسط برنامه‌ها برای کمک به مدیریت خطا در توابع، از جمله افزودن \"\n\"اطلاعات متنی به خطاهای شما، استفاده می‌شود.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"هیچ نام‌کاربری در {0} یافت نشد\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"{path} باز نشد\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"شکست در خواندن\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"نام‌کاربری: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Error: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"ماکرو استخراج `Error` توسط `thiserror` ارائه می‌شود و دارای ویژگی‌های مفید \"\n\"زیادی برای کمک به تعریف انواع خطا به روشی فشرده است.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"ویژگی `std::error::Error` به طور خودکار مشتق می‌شود.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"پیام  `#[error]` برای استخراج ویژگی `Display` استفاده می‌شود.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` اساساً پوششی (wrapper) در اطراف`Box<dyn Error>` است. به این \"\n\"ترتیب معمولاً انتخاب خوبی برای API عمومی یک کتابخانه نیست، اما به طور گسترده \"\n\"در برنامه‌های مختلف استفاده می‌شود.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"`anyhow::Result<V>`یک type مستعار برای است`Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"در صورت لزوم می‌توان نوع خطای واقعی داخل آن را برای بررسی استخراج کرد.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"عملکرد ارائه شده توسط `anyhow::Result<T>` ممکن است برای توسعه‌دهندگان Go آشنا \"\n\"باشد، زیرا الگوهای استفاده و ارگونومی مشابهی را با `(T, error)` از Go ارائه \"\n\"می‌دهد.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` یک ویژگی است که برای  typeهای استاندارد `Result` و \"\n\"`Option` پیاده‌سازی شده است. `use anyhow::Context` برای فعال کردن `.\"\n\"context()` و `.with_context()` در آن  typeها ضروری است.\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"در زیر یک تجزیه‌کننده بسیار ساده برای یک زبان عبارت پیاده‌سازی می‌کند. با این \"\n\"حال، با panic خطاها را کنترل می‌کند. آن را بازنویسی کنید تا به جای آن از \"\n\"مدیریت خطای اصطلاحی استفاده کنید و خطاها را به بازگشت از `main` منتشر کنید. \"\n\"با خیال راحت از `thiserror` و `anyhow` استفاده کنید.\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"نکته: با رفع خطا در عملکرد `parse` شروع کنید. هنگامی که به درستی کار کرد، \"\n\"`Tokenizer` را برای پیاده‌سازی `Iterator<Item=Result<Token, TokenizerError>>` \"\n\"به‌روزرسانی کنید و آن را در parser کنترل کنید.\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// An arithmetic operator.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// A token in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// An expression in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// A reference to a variable.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// A literal number.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// A binary operation.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"کاراکتر غیرمنتظره {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"پایان غیرمنتظره در ورودی\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"عدد صحیح 32-bit  نامعتبر\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"توکن غیرمنتظره {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// Look ahead to parse a binary operation if present.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"کاراکتر غیرمنتظره \\\"{0}\\\" در ورودی\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"خطای توکن‌سازی: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"توکن (token) غیرمنتظره {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"شماره نامعتبر\\\"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۱ ساعت و ۵ دقیقه طول بکشد.و شامل موارد زیر است:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"زبان Rust دو بخش دارد:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"در **Safe Rust:** حافظه ایمن یا memory safe، هیچ رفتار تعریف نشده‌ای امکان \"\n\"پذیر نیست.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"در **Unsafe Rust:** در صورت نقض پیش‌شرط‌ها، می‌تواند باعث رفتار نامشخص شود.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"ما عمدتاً safe Rust را در این دوره دیدیم، اما مهم است که بدانیم Unsafe Rust \"\n\"چیست.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"کد ناامن معمولا کوچک و ایزوله است و صحت آن باید به دقت مستند شود. معمولاً در \"\n\"یک لایه انتزاعی ایمن پیچیده می‌شود.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"این Unsafe Rust به شما امکان دسترسی به پنج قابلیت جدید را می‌دهد:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"اشاره‌گرهای خام.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"به متغیرهای mutable static variable  تغییر دسترسی دهید.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"به فیلدهای  `union`  دسترسی پیدا کنید.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"توابع `unsafe`، از جمله توابع `extern` را فراخوانی کنید.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"ویژگی‌های `unsafe` را اجرا کنید.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"در ادامه به طور خلاصه به قابلیت‌های unsafe می‌پردازیم. برای جزئیات کامل، لطفاً \"\n\"به [Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) و [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"همینطور Unsafe Rust به این معنی نیست که کد نادرست است. این بدان معنی است که \"\n\"توسعه‌دهندگان برخی از ویژگی‌های ایمنی کامپایلر را خاموش کرده‌اند و باید کد صحیح \"\n\"را خودشان بنویسند. این بدان معناست که کامپایلر دیگر قواعد ایمنی Rust را اجرا \"\n\"نمی‌کند.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"ایجاد اشاره‌گر ایمن است، اما عدم ارجاع به آنها «ناامن» یا `unsafe` است:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"مراقب باش!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 برابر هست: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"اوهو\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 برابر هست: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"این تمرین خوبی است (و طبق راهنمای سبک Android Rust لازم است) برای هر بلوک \"\n\"`unsafe` یک نظر بنویسید و توضیح دهد که چگونه کد داخل آن الزامات ایمنی عملیات \"\n\"ناامنی را که انجام می‌دهد برآورده می‌کند.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"در مورد عدم ارجاع اشاره‌گر، این بدان معنی است که نشانگرها باید [_valid_]\"\n\"(https://doc.rust-lang.org/std/ptr/index.html#safety) باشند، یعنی:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"اشاره‌گر باید غیر تهی یا non-null باشد.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"اشاره‌گر باید _dereferenceable_ باشد (در محدوده یک object اختصاص داده شده).\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"این object نباید جابجا شده باشد.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"دسترسی همزمان به یک مکان نباید وجود داشته باشد.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"اگر اشاره‌گر با فرستادن یک reference به دست آمده باشد، object زیرین باید live \"\n\"باشد و نمی‌توان از هیچ مرجعی برای دسترسی به حافظه استفاده کرد.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"در بیشتر موارد، اشاره‌گر نیز باید به درستی تراز شود.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"بخش «NOT SAFE» نمونه‌ای از یک نوع رایج از اشکال UB را ارائه می‌کند: `*r1`  \"\n\"دارای طول عمر  `'static` است، بنابراین `r3` دارای نوع  `&'static String` است \"\n\"و بنابراین عمر `s` بیشتر می‌شود. ایجاد یک مرجع از یک اشاره گر نیاز به دقت \"\n\"بسیار دارد.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"خواندن یک متغیر استاتیک تغییرناپذیر بی‌خطر است:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"سلام دنیا!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"با‌این‌حال، از آنجایی که شرایط رقابتی داده‌ها ممکن است رخ دهد، خواندن و نوشتن \"\n\"متغیرهای mutable static ناامن است:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"برنامه در اینجا امن است زیرا single-thread است. با این حال، کامپایلر Rust \"\n\"محافظه کار است و بدترین‌ها را در نظر می‌گیرد.  `unsafe` را حذف کنید و ببینید \"\n\"چگونه کامپایلر توضیح می‌دهد که جهش یک static از چندین thread یک رفتار تعریف \"\n\"نشده است.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"استفاده از یک static قابل تغییر (mutable) به طور کلی ایده بدی است، اما \"\n\"مواردی وجود دارد که ممکن است در کدهای سطح پایین `no_std` منطقی باشد، مانند \"\n\"اجرای یک heap allocator یا کار با برخی از APIهای مربوط به زبان C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"همینطور Unionها مانند enum‌ها هستند، اما شما باید خودتان active field را \"\n\"ردیابی کنید:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"هیچ رفتار تعریف نشده‌ای در زمان اجرا:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"به طور کلی Unionها در Rust به ندرت مورد نیاز هستند زیرا معمولاً می‌توانید از \"\n\"enum استفاده کنید. آنها گاهی اوقات برای تعامل با APIهای کتابخانه C مورد نیاز \"\n\"هستند.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"اگر فقط می‌خواهید بایت‌ها را به‌عنوان نوع متفاوتی تفسیر کنید، احتمالاً [`std::\"\n\"mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.transmute.html \"\n\"را می‌خواهید ) یا یک safe wrapper مانند جعبه [`zerocopy`(https://crates.io/\"\n\"crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"فراخوانی متدهای ناامن\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"یک function یا method را می‌توان `unsafe` علامت‌گذاری کرد، اگر دارای پیش‌شرط‌های \"\n\"اضافی باشد که باید برای جلوگیری از رفتار نامشخص رعایت کنید:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"char count: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"مقدار مطلق ۳- طبق C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"نوشتن متدهای ناامن\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"اگر عملکردهای خود را برای جلوگیری از رفتار نامشخص به شرایط خاصی نیاز دارند، \"\n\"می‌توانید به‌عنوان`unsafe` علامت‌گذاری کنید.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// SAFETY: ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"تابع `get_unchecked`، مانند اکثر توابع `_unchecked`، ناامن است، زیرا اگر در \"\n\"محدوده نادرست باشد، می‌تواند یک UB ایجاد کند. `abs` به دلیل دیگری نادرست است: \"\n\"این یک تابع خارجی (FFI) است. فراخوانی توابع خارجی معمولاً زمانی مشکل‌ساز است \"\n\"که آن توابع کارهایی را با اشاره‌گرهایی انجام می‌دهند که ممکن است مدل حافظه \"\n\"Rust را نقض کنند، اما به طور کلی هر تابع C ممکن است تحت هر شرایط دلخواه \"\n\"رفتار نامشخصی داشته باشد.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"زبان برنامه‌نویسی `\\\"C\\\"` در این مثال ABI است. [ABIهای دیگر نیز در دسترس \"\n\"هستند](https://doc.rust-lang.org/reference/items/external-blocks.html).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"ما در واقع از pointerها برای یک تابع`swap`  استفاده نمی‌کنیم - این کار را \"\n\"می‌توان به‌طور ایمن با referenceها انجام داد.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"توجه داشته باشید که کد ناامن در یک تابع ناامن بدون بلوک `unsafe` مجاز است. \"\n\"ما می‌توانیم این کار را با  `#[deny(unsafe_op_in_unsafe_fn)]` غیرمجاز کنیم. \"\n\"سعی کنید آن را اضافه کنید و ببینید چه اتفاقی می افتد. این احتمالاً در نسخه \"\n\"بعدی Rust تغییر خواهد کرد.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"پیاده سازی صفات (Traits) ناامن\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"مانند توابع، اگر پیاده‌سازی باید شرایط خاصی را تضمین کند تا از رفتار نامشخص \"\n\"جلوگیری شود، می‌توانید یک ویژگی را به‌عنوان `unsafe` علامت‌گذاری کنید.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"برای مثال،  `zerocopy` crate  یک ویژگی ناامن دارد که [چیزی شبیه به این]\"\n\"(https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html) است:\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"باید یک بخش `# Safety` در Rustdoc برای این صفت (trait) وجود داشته باشد که \"\n\"شرایط لازم برای اجرای ایمن این trait را توضیح دهد.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"بخش ایمنی واقعی برای `AsBytes`  نسبتا طولانی‌تر و پیچیده‌تر است.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"ویژگی‌های داخلی`Send` و `Sync`  ناامن (unsafe) هستند.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"امن بودن FFI Wrapper\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"زبان Rust پشتیبانی بسیار خوبی برای فراخوانی توابع از طریق رابط تابع خارجی \"\n\"_foreign function interface_ (FFI) دارد. ما از آن برای ساختن یک پوشش امن \"\n\"برای توابع `libc` استفاده می‌کنیم که از C برای خواندن نام فایل ها در یک فهرست \"\n\"استفاده می کنید.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"شما می‌خواهید به صفحات راهنما مراجعه کنید:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"همچنین می‌خواهید [`std::ffi`](https://doc.rust-lang.or) را مرور کنید\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"رمزگذاری\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"استفاده\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) و [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"پردازش متن در Rust\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"NUL-terminated\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"ارتباط با توابع C\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) و [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"مخصوص سیستم‌عامل\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"برقراری ارتباط با سیستم‌عامل\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"شما بین تمام این typeها تبدیل خواهید کرد:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\"`CString` به `*const i8`: برای فراخوانی توابع C به یک اشاره‌گر نیاز دارید,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"از `*const i8` به `&CStr`: به چیزی نیاز دارید که بتواند کاراکتر `\\\\0` را \"\n\"پیدا کند,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"`&CStr` به `&[u8]`: یک slice بایت universal interface  برای «برخی داده‌های \"\n\"ناشناخته» است،\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"از `&[u8]` به `&OsStr`: `&OsStr` گامی به سوی `OsString` است، از [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) برای ایجاد \"\n\"آن استفاده کنید،\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"مورد [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) همچنین یک فصل \"\n\"بسیار مفید در مورد FFI دارد.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"کد زیر را در <https://play.rust-lang.org/> کپی کنید و توابع و متدهای از \"\n\"مفقود شده را پر کنید:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Layout according to the macOS man page for dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Call closedir as needed.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"files: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"مسیر نامعتبر: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"نمی‌توان {:?} را باز کرد\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// We have reached the end of the directory.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SAFETY: self.dir is not NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"نمی‌توان {:?} را ببندد\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"نه مشابه این دایرکتوری\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"نویسه غیر UTF-8 در مسیر\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"این خاطرات Foo است \\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"به Rust در Android خوش‌آمدید\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"‏ Rust برای system software در اندروید پشتیبانی می‌شود. این بدان معناست که می \"\n\"توانید سرویس‌ها، کتابخانه‌‌ها، درایورها یا حتی سیستم‌عامل جدید را در Rust \"\n\"بنویسید (یا در صورت نیاز کدهای موجود را بهبود ببخشید).\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"ما امروز سعی خواهیم کرد Rust را از یکی از پروژه‌های خودتان فراخوانی کنیم. \"\n\"بنابراین سعی کنید گوشه کوچکی از پایه کد خود را پیدا کنید تا بتوانیم برخی از \"\n\"خطوط کد را به Rust منتقل کنیم. هر چه وابستگی‌ها و انواع \\\"exotic\\\" کمتر باشد \"\n\"برای ما بهتر است. چیزی که برخی از بایت‌های خام را تجزیه کند ایده آل خواهد بود.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"با‌توجه‌به افزایش استفاده از Rust در اندروید، سخنران ممکن است به یکی از موارد \"\n\"زیر اشاره کند:\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"‏ مثال سرویس: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"کتابخانه‌ها: [Rutabaga Virtual Graphics Interface]‌(https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"ما از یک دستگاه Cuttlefish Android Virtual برای آزمایش کد خود استفاده خواهیم \"\n\"کرد. مطمئن شوید که به یکی از آنها دسترسی دارید یا یک مورد جدید ایجاد کنید:\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"لطفاً برای جزئیات به [Android Developer Codelab]‌(https://source.android.com/\"\n\"docs/setup/start) مراجعه کنید.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"‏ Cuttlefish یک Android device مرجع است که برای کار بر روی دسکتاپ های لینوکس \"\n\"عمومی طراحی شده است. پشتیبانی از MacOS نیز برنامه‌ریزی شده است.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"این Cuttlefish system image تعهد بالایی به دستگاه‌های واقعی دارد و شبیه‌ساز \"\n\"ایده آل برای اجرای بسیاری از موارد استفاده از Rust است.\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"‏ Android build system (Soong) از Rust از طریق تعدادی ماژول پشتیبانی می‌کند:\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"Module Type\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"توضیحات\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"یک Rust binary تولید می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"یک کتابخانه Rust تولید می‌کند و هر دو نوع `rlib` و `dylib` را ارائه می‌دهد.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"یک کتابخانه Rust C قابل استفاده توسط ماژول‌های `cc` تولید می‌کند و انواع \"\n\"متغیرهای static و share را ارائه می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"یک کتابخانه `proc-macro` تولید می‌کند. اینها مشابه پلاگین‌های کامپایلر هستند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"یک باینری تست Rust تولید می‌کند که از استاندارد Rust test مهار شده استفاده \"\n\"می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"یک `libfuzzer` باینری Rust fuzz تولید می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"یک source تولید می‌کند و یک کتابخانه Rust تولید می‌کند که یک interface برای یک \"\n\"protobuf خاص فراهم می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"یک source تولید می‌کند و یک کتابخانه Rust حاوی پیوندهای Rust به کتابخانه‌های C \"\n\"تولید می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"در ادامه به `rust_binary` و `rust_binary` نگاه خواهیم کرد.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"موارد دیگری که سخنران ممکن است ذکر کند:\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"‏ Cargo برای repoهای چند‌زبانه بهینه‌سازی نشده است و همچنین packageها را از \"\n\"اینترنت دانلود می‌کند.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"برای انطباق و کارایی، اندروید باید crates in-tree داشته باشد. همچنین باید با \"\n\"کد C/C++/Java همکاری داشته باشد. Soong این شکاف را پر می کند.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Soong has many similarities to [Bazel](https://bazel.build/), which is the \"\n\"open-source variant of Blaze (used in google3).\"\nmsgstr \"\"\n\"‏ Soong شباهت‌های زیادی به Bazel دارد که نوع open-source از Blaze است (مورد \"\n\"استفاده در google3).\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"واقعیت جالب: داده‌های Star Trek یک اندروید از نوع Soong است.\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Rust Binaries\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"اجازه دهید با یک برنامه ساده شروع کنیم. در ریشه یک AOSP، فایل های زیر را \"\n\"ایجاد کنید:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Rust demo.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Prints a greeting to standard output.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"سلام از Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"اکنون می‌توانید باینری را بسازید، push  و اجرا کنید:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"کتابخانه‌های Rust\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"شما از `rust_library` برای ایجاد یک کتابخانه Rust جدید برای Android استفاده \"\n\"می‌کنید.\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"در اینجا ما یک وابستگی به دو کتابخانه را اعلام می‌کنیم:\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"‏ `libgreeting`, چیزی که در زیر تعریف می‌کنیم,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"‏`libtextwrap`، که این crates‌ای است که قبلاً در [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/) عرضه شده است.\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Need this to avoid dynamic link error.\\n\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Greeting library.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Greet `name`.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"سلام {name}، از آشنایی با شما بسیار خوشحالم!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"باینری را مانند قبل می سازید، push و اجرا می‌کنید:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"‏[Android Interface Definition Language (AIDL)](https://developer.android.com/\"\n\"guide/components/aidl) در Rust پشتیبانی می‌شود:\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"کد Rust می تواند سرورهای AIDL موجود را فراخوانی کند,\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"می‌توانید سرورهای جدید AIDL را در Rust ایجاد کنید.\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\"برای نشان‌دادن نحوه استفاده از Rust با Binder، ما می‌خواهیم روند ایجاد رابط \"\n\"Binder را بررسی کنیم. سپس هم سرویس توصیف‌شده را پیاده‌سازی می‌کنیم و هم کد \"\n\"کلاینت را می‌نویسیم که با آن سرویس صحبت می‌کند.\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"AIDL Interfaces\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"شما API سرویس خود را با استفاده از یک AIDL interface اعلام می‌کنید:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Birthday service interface. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Generate a Happy Birthday message. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust is not enabled by default\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\"توجه داشته باشید که ساختار دایرکتوری زیر دایرکتوری `aidl/` باید با نام \"\n\"package استفاده شده در فایل AIDL مطابقت داشته باشد، به‌عنوان‌مثال بسته `com.\"\n\"example.birthdayservice` بوده و این فایل در `aidl/com/example/\"\n\"IBirthdayService.aidl` است.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"Generated Service API\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\"Binder یک trait مطابق با تعریف interface تولید می‌کند. trait برای صحبت کردن \"\n\"با سرویس است.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"_Generated trait_:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\"سرویس شما باید این trait را پیاده‌سازی کند و کلاینت شما از این ویژگی برای \"\n\"صحبت با سرویس‌ها استفاده خواهد کرد.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\"پیوندهای تولید شده را می توان در `out/soong/.intermediates/<path to module>/\"\n\"` یافت.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\"اشاره کنید که چگونه function signature تولید شده، به ویژه typeهای آرگومان و \"\n\"بازگشتی، با تعریف interface مطابقت دارد.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\"‏ `String` برای آرگومان منجر به type متفاوتی Rust نسبت به `String` به عنوان \"\n\"type برگشتی می‌شود.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"پیاده‌سازی سرویس‌ها\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"اکنون می‌توانیم سرویس AIDL را پیاده‌سازی کنیم:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// The `IBirthdayService` implementation.\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\"به مسیر ایجاد  `IBirthdayService` trait  اشاره کنید و توضیح‌دهید که چرا هر یک \"\n\"از بخش‌ها ضروری است.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\"‏ TODO: trait وویژگی `binder::Interface` چه کاری انجام می‌دهد؟ آیا متد‌هایی \"\n\"برای override وجود دارد؟ source کجاست؟\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"AIDL Server\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"در نهایت، می توانیم سروری ایجاد کنیم که سرویس را expose می‌کند:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Entry point for birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Failed to register service\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// To avoid dynamic link error.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\"فرآیند اجرای یک سرویس تعریف‌شده توسط کاربر (در این مورد نوع `BirthdayService` \"\n\"که `IBirthdayService` را پیاده‌سازی می‌کند) و شروع آن به‌عنوان یک سرویس Binder \"\n\"چند مرحله دارد و ممکن است پیچیده‌تر از آنچه دانش‌آموزان به آن عادت کرده‌اند به \"\n\"نظر برسد. اگر آن‌ها از Binder برای C++ یا زبان دیگری استفاده کردند. به \"\n\"دانش‌آموزان توضیح دهید که چرا هر مرحله لازم است.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"نمونه‌ای از نوع سرویس خود (`BirthdayService`) ایجاد کنید.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\"این service object را در `Bn*` type مربوطه قرار دهید (در این مورد،\"\n\"`BnBirthdayService`). این نوع توسط Binder تولید می‌شود و عملکرد رایج Binder \"\n\"را ارائه می‌کند که توسط کلاس پایه `BnBinder` در C++ ارائه می‌شود. ما در Rust \"\n\"ارث‌بری یا inheritance نداریم، بنابراین در عوض از ترکیب composition می‌کنیم و \"\n\"`BirthdayService` خود را در `BnBinderService` تولید شده قرار می‌دهیم.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\"‏ `add_service` را فراخوانی کنید و به آن یک شناسه سرویس و شی‏ سرویس خود بدهید \"\n\"(شی‏ «BnBirthdayService» در مثال).\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\"‏ `join_thread_pool` را فراخوانی کنید تا thread فعلی را به Binder thread \"\n\"اضافه کنید و شروع به گوش دادن برای connectionها کنید.\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"اکنون می‌توانیم سرویس را بسازیم، push کنیم و شروع کنیم:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"در ترمینال دیگر، بررسی کنید که آیا سرویسی اجرا شود:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"همچنین می‌توانید با `service call` با سرویس تماس بگیرید:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"AIDL Client\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"در‌نهایت، ما می‌توانیم یک Rust client برای سرویس جدید خود ایجاد کنیم.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Failed to connect to BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"// Call the service.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"توجه داشته باشید که client به `libbirthdayservice` وابسته نیست.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"کلاینت را در دستگاه خود بسازید، push کرده و اجرا کنید:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\"‏`Strong<dyn IBirthdayService>` یک trait object است که نشان‌دهنده سرویسی است \"\n\"که کلاینت به آن متصل شده است.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\"‏ `Strong` یک نوع اشاره‌گر هوشمند سفارشی برای Binder است. هم تعداد ref های \"\n\"درون فرآیندی (in-process) را برای سرویس trait object مدیریت می‌کند و هم \"\n\"شمارنده global Binder را که تعداد فرآیندهایی را که به object ارجاع دارند را \"\n\"ردیابی می‌کند.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\"توجه داشته باشید که trait object که کلاینت برای صحبت با سرویس استفاده می‌کند، \"\n\"دقیقاً از همان ویژگی استفاده می‌کند که سرور پیاده‌سازی می‌کند. برای یک Binder \"\n\"interface معین، یک trait یا ویژگی Rust ایجاد شده است که هم کلاینت و هم سرور \"\n\"از آن استفاده می‌کنند.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\"از همان شناسه سرویس استفاده شده در هنگام ثبت سرویس استفاده کنید. این به طور \"\n\"ایده‌آل باید در یک crate مشترک تعریف شود که هم کلاینت و هم سرور می توانند به \"\n\"آن وابسته باشند.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"اجازه دهید API را با عملکرد بیشتری گسترش دهیم: می‌خواهیم به مشتریان اجازه \"\n\"دهیم لیستی از خطوط را برای کارت تولد مشخص کنند:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"این منجر به یک تعریف ویژگی به روز شده برای `IBirthdayService` می‌شود:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\"توجه داشته باشید که چگونه `String[]`در تعریف AIDL به عنوان  `&[String]` در \"\n\"Rust ترجمه می‌شود، به‌عنوان مثال از idiomatic Rust type در bindingهای تولید \"\n\"شده تا جایی که ممکن است استفاده می‌شود:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"آرگومان های آرایه `in` به sliceها ترجمه می‌شوند.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"آرگومان‌های`out` و `inout` به  `&mut Vec<T>` ترجمه می‌شوند.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"مقادیر بازگشتی به بازگرداندن `Vec<T>` ترجمه می‌شوند.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"به‌روزرسانی کلاینت و سرویس‌ها\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"کد سرویس کلاینت و سرور را برای حساب کردن API جدید به‌روز کنید.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\\\"Habby birfday to yuuuuu\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\\\"And also: many more\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\"‏TODO: قطعات کد را به فایل‌های پروژه منتقل کنید، جایی که واقعاً ساخته می‌شوند؟\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"کار با انواع AIDL\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"انواع AIDL به نوع اصطلاحی Rust مناسب ترجمه می‌شوند:\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\"انواع اولیه یا Primitive types (بیشتر) به idiomatic Rust type نگاشت می‌شوند.\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\"انواع Collectionها مانند sliceها،`Vec` و  string typeها پشتیبانی می‌شوند.\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\"ارجاع به AIDL objects و دسته فایل‌ها را می‌توان بین clientها و سرویس‌ها ارسال \"\n\"کرد.\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"دسته‌های فایل و بسته‌بندی‌ها به طور کامل پشتیبانی می‌شوند.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\"انواع ابتدایی یا Primitive type (معمولاً) به صورت idiomatically نگاشت می‌شوند:\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"AIDL Type\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Rust Type\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"نکته\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"بولین‌ها`boolean`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"`i8`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"توجه داشته باشید که بایت‌ها امضا شده‌اند.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"به استفاده از `u16` توجه کنید، نه `u32`.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"`i32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"`long`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"`i64`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"`double`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\"انواع آرایه (`T[]`, `byte[]`, و `List<T>`) بسته به نحوه استفاده از آنها در \"\n\"function signature، به Rust array type  مناسب ترجمه می‌شوند:\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"موقعیت\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"`in` argument\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"`out`/`inout` argument\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"Return\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"`int[3][4]`). In the Java backend, fixed-size arrays are represented as \"\n\"array types.\"\nmsgstr \"\"\n\"در اندروید ۱۳ یا بالاتر، آرایه‌های با اندازه ثابت پشتیبانی می‌شوند، یعنی \"\n\"`T[N]` به `[T; N]`. آرایه‌های با اندازه ثابت می‌توانند چندین بعد داشته باشند \"\n\"(مانند ‌`int[3][4]`. در Java backend، آرایه‌های با اندازه ثابت به عنوان array \"\n\"type نمایش داده می‌شوند.\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"آرایه‌های موجود در فیلدهای parcelable همیشه به `Vec<T>` ترجمه می‌شوند.\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\"‏ AIDL objects را می‌توان به‌عنوان یک نوع AIDL مشخص یا به عنوان `IBinder` \"\n\"interface پاک‌شده ارسال کرد:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"/** The same thing, but using a binder object. */\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"/** The same thing, but using `IBinder`. */\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"**birthday_service/src/client.rs**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\"به استفاده از `BnBirthdayInfoProvider` توجه کنید. این همان هدف \"\n\"`BnBirthdayService` است که قبلاً دیدیم.\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"‏ Binder برای Rust از ارسال مستقیم بسته‌بندی‌ها پشتیبانی می‌کند:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"/** The same thing, but with a parcelable. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\"فایل‌ها را می‌توان با استفاده از نوع `ParcelFileDescriptor` بین کلاینت‌ها/\"\n\"سرورهای Binder ارسال کرد:\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"/** The same thing, but loads info from a file. */\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"// Open a file and put the birthday info in it.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\\\"/data/local/tmp/birthday.info\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"{name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\\\"{years}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"**birthday_service/src/lib.rs**:\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"کنترل فایل نامعتبر\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\"‏ `ParcelFileDescriptor` یک `OwnedFd` را احاطه می‌کند و بنابراین می‌تواند از یک \"\n\"`File` (یا هر نوع دیگری که یک `OwnedFd` را احاطه می‌کند) ایجاد کند و می‌تواند \"\n\"برای ایجاد یک دسته `File` جدید در طرف دیگر استفاده شود.\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\"انواع دیگر توصیف‌گرهای فایل را می توان بسته‌بندی و ارسال کرد، به‌عنوان‌مثال. \"\n\"سوکت های TCP، UDP و UNIX.\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"تست‌کردن در Android\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\"بر اساس [Testing](../testing.md)، اکنون به نحوه عملکرد unit testها در AOSP \"\n\"خواهیم پرداخت. از ماژول `rust_test` برای تست های واحد خود استفاده کنید:\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libleftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"leftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libleftpad_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\\\"leftpad_test\\\"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_testing/src/lib.rs_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Left-padding library.\\n\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Left-pad `s` to `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"  foo\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foobar\\\"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"اکنون می توانید تست را با\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"خروجی به شکل زیر است:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\"توجه کنید که چگونه فقط ریشه crate کتابخانه را ذکر می‌کنید. تست‌ها به صورت \"\n\"بازگشتی در ماژول‌های تودرتو یافت می‌شوند.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"جعبه [GoogleTest](https://docs.rs/googletest/) با استفاده از _matchers_ \"\n\"اجازه می‌دهد تا assertهای آزمایشی انعطاف‌پذیر را انجام دهید:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"اگر آخرین عنصر را به`\\\"!\\\"`تغییر دهیم، آزمایش با یک پیغام خطای ساختار یافته \"\n\"که خطا را pin-pointing می‌کند، شکست می خورد:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"‏ GoogleTest بخشی از Rust Playground نیست، بنابراین باید این مثال را در یک \"\n\"محیط local اجرا کنید. برای افزودن سریع آن به پروژه Cargo موجود، از `cargo \"\n\"add googletest` استفاده کنید.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"خط `use googletest::prelude::*;` تعدادی از  [ماکروها و typeهای پرکاربرد]\"\n\"(https://docs.rs/googletest/latest/googletest/prelude/index.html) را وارد \"\n\"می‌کند.\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://rust-exercises.com/advanced-testing/), a self-guided \"\n\"Rust course: it provides a guided introduction to the library, with \"\n\"exercises to help you get comfortable with `googletest` macros, its matchers \"\n\"and its overall philosophy.\"\nmsgstr \"\"\n\"این فقط سطح را نشان می‌دهد، تطبیق‌های داخلی زیادی وجود دارد. فصل اول [‌آزمایش \"\n\"پیشرفته برای برنامه های Rust]‌(https://github.com/mainmatter/rust-advanced-\"\n\"testing-workshop)، یک دوره آموزشی Rust را در نظر بگیرید: این یک مقدمه \"\n\"راهنمایی برای کتابخانه با تمرین‌هایی که به شما کمک می‌کند با ماکروهای \"\n\"`googletest` و مطابقت‌های آن و فلسفه کلی آن راحت باشید.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"یک ویژگی خاص خوب این است که عدم تطابق در string‌های چند خطی به صورت یک تفاوت \"\n\"نشان داده می شود:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"تفاوت رنگی را نشان می‌دهد (رنگ ها در اینجا نشان‌داده نمی‌شوند):\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"این crate یک پورت [GoogleTest for C++]‌(https://google.github.io/googletest/) \"\n\"در Rust است.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"برای mocking از  [Mockall](https://docs.rs/mockall/) که یک کتابخانه محبوب \"\n\"بوده استفاده شده است. برای استفاده از traitها، باید کد خود را مجدداً تغییر \"\n\"دهید، سپس می‌توانید به سرعت آنها را mock کنید:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"‏ Mockall کتابخانه mocking توصیه شده در Android (AOSP) است. [کتابخانه‌های \"\n\"mocking دیگری در crates.io](https://crates.io/keywords/mock) در دسترس هستند، \"\n\"به‌ویژه در زمینه سرویس‌های mocking HTTP. سایر کتابخانه‌های mocking به روشی \"\n\"مشابه Mockall کار می‌کنند، به این معنی که اجرای ساختگی یا mock یک ویژگی خاص \"\n\"را آسان می‌کنند.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"توجه داشته باشید که mocking تا حدودی _جنجال_برانگیز_ است: mockها به شما این \"\n\"امکان را می‌دهند که آزمون را کاملاً از وابستگی‌های آن جدا کنید. نتیجه فوری آن، \"\n\"اجرای سریع‌تر و پایدارتر تست است. از طرف دیگر، mockها را می توان به اشتباه \"\n\"پیکربندی کرد و خروجی متفاوتی با آنچه وابستگی های واقعی انجام می دادند را \"\n\"برگرداند.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"در صورت امکان، توصیه می‌شود از وابستگی‌های واقعی استفاده کنید. به عنوان مثال، \"\n\"بسیاری از پایگاه‌داده‌ها به شما اجازه می‌دهند تا یک in-memory backend را \"\n\"پیکربندی کنید. این به این معنی است که شما در تست های خود رفتار صحیح را \"\n\"دریافت می کنید، به علاوه آنها سریع هستند و به طور خودکار پس از اجرای عملیات \"\n\"مخصوص به خود پاک می شوند.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"به‌طور‌ مشابه، بسیاری از frameworkهای وب به شما اجازه می‌دهند یک سرور در یک \"\n\"process دیگر راه‌اندازی کنید که به یک پورت تصادفی در `localhost` متصل می‌شود. \"\n\"همیشه این را به mock کردن framework ترجیح دهید زیرا به شما کمک می‌کند کد خود \"\n\"را در محیط واقعی آزمایش کنید.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"‏ Mockall بخشی از Rust Playground نیست، بنابراین باید این مثال را در یک محیط \"\n\"local اجرا کنید. از  `cargo add mockall` برای اضافه کردن سریع Mockall به \"\n\"پروژه Cargo موجود استفاده کنید.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"‏ Mockall عملکرد بسیار بیشتری دارد. به ویژه، می‌توانید انتظاراتی را تنظیم کنید \"\n\"که به استدلال های ارائه شده بستگی دارد. در اینجا ما از این برای mock کردن \"\n\"عملکرد cat استفاده می‌کنیم که 3 ساعت پس از آخرین باری که به آن غذا داده شده \"\n\"گرسنه می‌شود:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"می‌توانید از `.times(n)` برای محدود‌کردن تعداد دفعاتی که یک mock method \"\n\"می‌تواند به`n` فراخوانی شود استفاده کنید --- در صورت عدم ارضای این روش، زمانی \"\n\"که آن را حذف کنید به‌طور خودکار دچار panic می‌شود.\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"باید از  `log` crate  برای ورود خودکار به`logcat` (روی دستگاه) یا `stdout` \"\n\"(روی host) استفاده کنید:\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Rust logging demo.\\n\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Logs a greeting.\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"شروع برنامه.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"کارها خوب پیش می‌رود.\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Something went wrong!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"ساخت، push و اجرای باینری‌ها روی یک ماشین:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"لاگ‌ها در `adb logcat` نشان‌داده می‌شوند:\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"‏‌Rust از قابلیت همکاری با زبان‌های دیگر پشتیبانی می‌کند. این بدان معنی است که \"\n\"شما می‌توانید:\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"توابع Rust را از زبان های دیگر فراخوانی کنید.\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"فراخوانی توابع نوشته شده به زبان های دیگر از Rust.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"وقتی توابعی را به‌ یک زبان خارجی فراخوانی می‌کنید، می‌گوییم که از یک رابط تابع \"\n\"خارج( _foreign function interface_) که به نام FFI نیز شناخته می‌شود، استفاده \"\n\"می‌کنید.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"قابلیت همکاری با C\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"‏ Rust پشتیبانی کاملی برای link دادن object fileهایی با یک  فراخوانی C دارد. \"\n\"به طور مشابه، می توانید توابع Rust را export کرده و آنها را از C فراخوانی \"\n\"کنید.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"در صورت تمایل می‌توانید این کار را دستی انجام دهید:\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/\"\n\"exercise.md).\"\nmsgstr \"\"\n\"ما قبلاً این را در [تمرین Safe FFI Wrapper](../../unsafe-rust/exercise.md) \"\n\"دیدیم.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"این مستلزم آگاهی کامل از پلتفرم هدف است و برای production توصیه نمی‌شود.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"در ادامه گزینه‌های بهتر را بررسی خواهیم کرد.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"با استفاده از Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"ابزار [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"می‌تواند اتصالات را از یک فایل هدر C به طور خودکار ایجاد کند.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"ابتدا یک کتابخانه کوچک C ایجاد کنید:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| Happy Birthday %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"این را به فایل `Android.bp` خود اضافه کنید:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"یک فایل هدر wrapper برای کتابخانه ایجاد کنید (در این مثال به شدت مورد نیاز \"\n\"نیست):\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"اکنون می توانید اتصالات (bindings) را به طور خودکار ایجاد کنید:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"در نهایت، می‌توانیم از bindingها در برنامه Rust خود استفاده کنیم:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"چاپ_کارت_تولد\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"در نهایت، ما می‌توانیم تست‌های تولید شده خودکار را برای اطمینان از کارکرد \"\n\"اتصالات (bindings) اجرا کنیم:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Generated file, skip linting\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"فراخوانی Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"صدور یا Exporting توابع و تایپ‌ها از Rust به C آسان است:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI demo.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analyze the numbers.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) is smallest!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\" مقدارy  ({y}) احتمالا بزرگتر از x ({x}) است\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"اکنون می توانیم این را از یک باینری C فراخوانی کنیم:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` نام‌گذاری معمول Rust را غیرفعال می‌کند، بنابراین نماد صادر شده \"\n\"فقط نام تابع خواهد بود. همچنین می‌توانید از `#[export_name = \\\"some_name\\\"]` \"\n\"برای تعیین هر نامی استفاده کنید.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"این [CXX crate](https://cxx.rs/) امکان همکاری امن بین Rust و C++ را فراهم \"\n\"می‌کند.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"رویکرد کلی به این صورت است:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"‏ CXX متکی به توصیفی از signatureهای تابع است که از هر زبان به زبان دیگر در \"\n\"معرض دید قرار می‌گیرد. شما این توضیحات را با استفاده از بلوک‌های خارجی در یک \"\n\"ماژول Rust ارائه می‌کنید که با attribute ماکروها `#[cxx::bridge]`  شرح داده \"\n\"شده است.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Shared structs with fields visible to both languages.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Rust types and signatures exposed to C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// C++ types and signatures exposed to Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"پل به طور کلی در یک ماژول `ffi`در crate شما اعلام می‌شود.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"از اعلان‌های (declarations) انجام شده در ماژول پل، CXX تعاریف مطابق با type/\"\n\"function در Rust و ++C را ایجاد می‌کند تا آن موارد را در معرض هر دو زبان قرار \"\n\"دهد.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"برای مشاهده کد Rust ایجاد شده از [cargo-expand](https://github.com/dtolnay/\"\n\"cargo-expand) که برای مشاهده ماکرو proc توسعه یافته استفاده کنید. برای بیشتر \"\n\"نمونه‌ها از `cargo expand ::ffi` فقط برای گسترش ماژول `ffi` استفاده کنید \"\n\"(اگرچه این برای پروژه‌های Android کاربرد ندارد).\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"برای مشاهده کد  ++C  تولید شده به `target/cxxbridge` نگاه کنید.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"تعریف پل در Rust\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Opaque type\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Method on `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"توابع\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"موارد اعلام شده در موارد  `extern \\\"Rust\\\"` reference که در محدوده ماژول \"\n\"والد قرار دارند.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"تولیدکننده کد CXX از `extern \\\"Rust\\\"` خارجی شما برای تولید یک فایل هدر  +\"\n\"+C  حاوی اعلان‌های  ++C  مربوطه استفاده می‌کند. header تولید‌شده همان مسیری را \"\n\"دارد که فایل منبع Rust حاوی پل دارای آن است، به جز استفاده از پسوند فایل rs.\"\n\"h.\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"نتیجه (تقریبی) ++C در زیر است:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"C++ Bridge Declarations\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"نتیجه (تقریبی) Rust در زیر است:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"برنامه‌نویس نیازی به تضمینی در مورد درست بودن signatureهایی که تایپ کرده است \"\n\"ندارد. CXX اظهارات ثابتی را انجام می دهد که signatureها دقیقاً با آنچه در ++C \"\n\"اعلام شده مطابقت دارند.\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"بلوک‌های `unsafe extern` به شما امکان می‌دهند توابع ++C را که برای فراخوانی از \"\n\"Rust امن هستند را اعلام کنید.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"فقط C-like (unit) enums پشتیبانی می‌شود.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"تعداد محدودی از ویژگی‌ها برای `#[derive()]`در انواع مشترک پشتیبانی می‌شوند. \"\n\"عملکرد مربوطه نیز برای کد ++C ایجاد می شود، به عنوان مثال. اگر `Hash` را \"\n\"استخراج کنید، پیاده‌سازی `std::hash` برای نوع ++C مربوطه نیز ایجاد می‌کند.\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Generated Rust:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"Generated C++:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"در سمت Rust، کد تولید شده برای enums مشترک در واقع ساختاری است که یک مقدار \"\n\"عددی را بسته‌بندی می‌کند. به این دلیل که UB در ++C نیست تا یک کلاس enum مقداری \"\n\"متفاوت از همه انواع فهرست شده داشته باشد و نمایش‌دهنده Rust مورد نظر ما باید \"\n\"رفتار مشابهی داشته باشد.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 به عمق > 0 نیاز دارد\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Success!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\"توابع Rust که «نتیجه» را برمی‌گردانند به exceptionهای سمت  ++C  ترجمه می‌شوند.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"این exception به وقوع پیوسته همیشه از نوع `rust::Error` خواهد بود که در درجه \"\n\"اول راهی برای دریافت string پیام خطا نشان می‌دهد. پیغام خطا از نوع \"\n\"خطای`Display` می‌آید.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"باز شدن panic از Rust به ++C همیشه باعث می‌شود که فرآیند بلافاصله خاتمه یابد.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"توابع ++C اعلام شده (declared) برای برگرداندن `Result`، هر exception صورت \"\n\"گرفته شده در سمت ++C را می‌گیرند و آن را به عنوان مقدار `Err` به تابع \"\n\"فراخوانی Rust برمی‌گردانند.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"اگر یک exception از یک  extern \\\"C++\\\" function که توسط پل CXX برای بازگشت \"\n\"\\\"نتیجه\\\" اعلان نشده است، ایجاد شود، برنامه C++'  `std::terminate` را \"\n\"فراخوانی می‌کند. این رفتار معادل همان exception است که از طریق یک `noexcept` \"\n\"C++ function فعال می‌شود.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"C++ Type\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"این typeها را می‌توان در فیلدهای ساختارهای مشترک و آرگومان‌ها و extern \"\n\"functionها استفاده کرد.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"توجه داشته باشید که  `String` در Rust مستقیماً به `std::string` نگاشت نمی‌شود. \"\n\"چند دلیل برای این وجود دارد:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\"‏`std::string` ثابت UTF-8 را که  `String` به آن نیاز دارد را پشتیبانی نمی‌کند.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"این دو نوع طرح‌بندی‌های متفاوتی در حافظه دارند و بنابراین نمی‌توان آنها را \"\n\"مستقیماً بین زبان‌ها منتقل کرد.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"‏ `std::string` به سازنده‌های حرکتی نیاز دارد که با معنای حرکت Rust مطابقت \"\n\"ندارند، بنابراین `std::string` نمی‌تواند با مقدار به Rust منتقل شود.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"ساخت در اندروید\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"یک `cc_library_static` برای ساخت کتابخانه ++C از جمله هدر و فایل منبع تولید \"\n\"شده CXX ایجاد کنید.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"به این نکته اشاره کنید که `libcxx_test_bridge_header` و  \"\n\"`libcxx_test_bridge_code` وابستگی‌هایی برای پیوندهای ++C تولید شده توسط CXX ​​\"\n\"هستند. نحوه تنظیم اینها را در اسلاید بعدی نشان خواهیم داد.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"توجه داشته باشید که برای ایجاد تعاریف رایج CXX باید به کتابخانه `cxx-bridge-\"\n\"header` وابسته باشید.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"مستندات کامل برای استفاده از CXX در Android را می‌توانید در این آدرس پیدا \"\n\"کنید [the Android docs](https://source.android.com/docs/setup/build/rust/\"\n\"building-rust-modules/android-rust-patterns#rust-cpp-interop-using-cxx). \"\n\"ممکن است بخواهید آن پیوند را با کلاس به اشتراک بگذارید تا دانش‌آموزان بدانند \"\n\"که در آینده می‌توانند این دستورالعمل‌ها را دوباره پیدا کنند.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"دو نوع ژانر ایجاد کنید: یکی برای تولید هدر CXX و دیگری برای تولید فایل منبع \"\n\"CXX. سپس از اینها به عنوان ورودی `cc_library_static` استفاده می‌شود.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Generate the C++ code that Rust calls into.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"ابزار`cxxbridge` یک ابزار مستقل است که سمت ++C ماژول پل را تولید می‌کند. در \"\n\"Android گنجانده شده و به عنوان ابزار Soong در دسترس است.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"طبق قرارداد، اگر فایل منبع Rust شما `lib.rs` باشد، فایل header شما `lib.rs.\"\n\"h` و فایل منبع شما  `lib.rs.cc` نام خواهد داشت. اگرچه این قرارداد نامگذاری \"\n\"اجرا نمی‌شود.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\"یک`rust_binary` ایجاد کنید که به `libcxx` و `cc_library_static` شما بستگی \"\n\"دارد.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"قابلیت همکاری با جاوا\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"جاوا می‌تواند objectهای مشترک را از طریق [واسط بومی جاوا [Java Native \"\n\"Interface (JNI)](https://en.wikipedia.org/wiki/Java_Native_Interface) \"\n\"بارگیری کند.  [`jni` crate](https://docs.rs/jni/) به شما امکان می دهد یک \"\n\"کتابخانه سازگار ایجاد کنید.\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"ابتدا یک تابع Rust برای export به Java ایجاد می‌کنیم:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI demo.\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// HelloWorld::hello method implementation.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"سلام, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"سپس این تابع را از جاوا فراخوانی می کنیم:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"سلام دنیا\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"در نهایت، می‌توانید باینری را بسازید، همگام‌سازی کنید و اجرا کنید:\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"این یک تمرین گروهی است: ما به یکی از پروژه‌هایی که با آن کار می‌کنید نگاه \"\n\"می‌کنیم و سعی می‌کنیم مقداری Rust را در آن ادغام کنیم. چند پیشنهاد:\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"با سرویس AIDL خود با کلاینت که در Rust نوشته شده است تماس بگیرید.\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"یک تابع را از پروژه خود به Rust منتقل کنید و آن را فراخوانی کنید.\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"هیچ راه‌حلی در اینجا ارائه نشده است زیرا این مورد باز است: به فردی در کلاس \"\n\"متکی است که یک قطعه کد دارد که می توانید آن را به Rust on fly تبدیل کنید.\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"به Rust در Chromium خوش‌آمدید\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"‏ Rust برای کتابخانه‌های شخص ثالث در Chromium پشتیبانی می‌شود، با glue code اول \"\n\"شخص برای اتصال بین Rust و کد موجود در ++Chromium C.\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"امروز ما با Rust ارتباط می‌گیریم تا کار احمقانه‌ای با stringها انجام دهد. اگر \"\n\"گوشه‌ای از کد را دارید که در آن رشته UTF8 را به کاربر نشان می دهید، به جای \"\n\"قسمت دقیقی که در مورد آن صحبت می‌کنیم، این دستور العمل را در قسمت خود از \"\n\"پایگاه کد دنبال کنید.\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"مطمئن شوید که می‌توانید Chromium را build و اجرا کنید. هر پلتفرم و مجموعه‌ای \"\n\"از build flag ها بدون مشکل هستند، تا زمانی که کد شما نسبتاً جدید باشد (موقعیت \"\n\"commit 1223636 به بعد، مربوط به نوامبر 2023):\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"(یک component به صورت debug build برای سریع‌ترین زمان تکرار توصیه می‌شود. این \"\n\"یک حالت پیش‌فرض است!)\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"اگر از قبل در آن مرحله نیستید، به [چگونه Chromium بسازیم](https://www.\"\n\"chromium.org/developers/how-tos/get-the-code/) مراجعه کنید. هشدار: راه‌اندازی \"\n\"برای build Chromium زمان زیادی می‌برد.\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"همچنین توصیه می شود که Visual Studio code را نصب کرده باشید.\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"در مورد تمرین‌ها\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"این بخش از دوره دارای یک سری تمرینات است که بر روی یکدیگر ساخته می‌شوند. ما \"\n\"آنها را به جای اینکه فقط در انتها انجام دهیم، در طول دوره پخش خواهیم کرد. \"\n\"اگر برای تکمیل قسمت خاصی وقت ندارید، نگران نباشید: می توانید در اسلاید بعدی \"\n\"به عقب برگردید.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"جامعه Rust معمولاً از `cargo` و کتابخانه‌های [crates.io](https://crates.io/) \"\n\"استفاده می‌کند. Chromium با استفاده از `gn` و `ninja` و مجموعه‌ای از وابستگی‌ها \"\n\"ساخته شده است.\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"هنگام نوشتن کد در Rust، انتخاب‌های شما عبارتند از:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"از `gn` و `ninja`  با کمک الگوهای `//build/rust/*.gni` استفاده کنید (مثلاً \"\n\"`rust_static_library` که بعداً با آن آشنا خواهیم شد). این از toolchain و \"\n\"crateهای بررسی‌شده Chromium استفاده می‌کند.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"از `cargo` استفاده کنید، اما [خود را به toolchain و crateهای بررسی‌شده \"\n\"Chromium محدود کنید](https://chromium.googlesource.com/chromium/src/+/refs/\"\n\"heads/main/docs/rust.md#Using-cargo)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"از `cargo` استفاده کنید، به یک [toolchain](https://rustup.rs/) و/یا \"\n\"[crateهای دانلود شده از اینترنت]‌(https://crates.io/) اعتماد کنید.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"از اینجا به بعد ما روی `gn` و `ninja` تمرکز خواهیم کرد، زیرا به این ترتیب \"\n\"می‌توان کد Rust را در مرورگر Chromium ایجاد کرد. در عین حال، Cargo بخش مهمی \"\n\"از اکوسیستم Rust است و شما باید آن را در جعبه ابزار خود نگه دارید.\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"خرده تمرین\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"به گروه‌های کوچک تقسیم شده و:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"سناریوهای طوفان فکری که در آن `cargo` ممکن است مزیتی را ارائه دهد و نمایه \"\n\"ریسک‌های این سناریوها را ارزیابی کند.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"در هنگام استفاده از `gn` و `ninja`و `cargo` آفلاین و غیره در مورد ابزارها، \"\n\"کتابخانه‌ها و گروه‌هایی از افراد بحث کنید.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"از دانش‌آموزان بخواهید که قبل از اتمام تمرین از نگاه کردن به یادداشت‌های \"\n\"سخنران خودداری کنند. با فرض اینکه افرادی که دوره را می‌گذرانند از نظر فیزیکی \"\n\"با هم هستند، از آنها بخواهید در گروه های کوچک ۳-۴ نفره بحث کنند.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"نکته‌ها/تکنیک‌ها مربوط به بخش اول تمرین (\\\"سناریوهایی که Cargo ممکن است مزیتی \"\n\"را ارائه دهد\\\"):\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"این فوق العاده است که هنگام نوشتن یک ابزار یا نمونه‌سازی بخشی از Chromium به \"\n\"اکوسیستم غنی کتابخانه‌های crates.io دسترسی داشته باشید. تقریباً برای هر چیزی \"\n\"یک crate وجود دارد و معمولاً استفاده از آنها بسیار لذت بخش است. (`clap` برای \"\n\"تجزیه خط فرمان، `serde` برای سریال‌سازی/جداسازی‌سریال به/از قالب‌های مختلف، \"\n\"`itertools` برای کار با تکرارکننده‌ها (iterators) و غیره).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"‏ `cargo` بررسی کردن یک کتابخانه را آسان می‌کند (فقط یک خط به `Cargo.toml` \"\n\"اضافه کنید و شروع به نوشتن کد کنید)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"شاید ارزش این را داشته باشد که چگونه CPAN به انتخاب `perl` کمک کرد. یا \"\n\"مقایسه با `python` + `pip`.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"تجربه توسعه نه تنها با ابزارهای اصلی Rust (به عنوان مثال استفاده از `rustup` \"\n\"برای تغییر به نسخه `rustc` متفاوت در هنگام آزمایش crate ای که نیاز به کار بر \"\n\"روی پایداری‌های شبانه، فعلی و قدیمی‌تر دارد) بسیار خوب است، بلکه توسط یک \"\n\"اکوسیستم نیز انجام می‌شود. از ابزارهای شخص ثالث (مثلاً موزیلا `cargo vet` را \"\n\"برای ساده‌سازی و اشتراک‌گذاری ممیزی‌های امنیتی فراهم می‌کند؛ `criterion` crate \"\n\"راهی ساده برای اجرای benchmark‌ها می‌دهد).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"‏ `cargo` افزودن ابزارها را از طریق`cargo install --locked cargo-vet` تسهیل \"\n\"می‌کند.\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\"ممکن است ارزش مقایسه با برنامه‌های افزودنی کروم یا افزونه‌های VScode را داشته \"\n\"باشد.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"نمونه‌های کلی و عمومی از پروژه‌هایی که `cargo` ممکن است انتخاب مناسبی باشد:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"شاید تعجب‌آور باشد که Rust به طور فزاینده ای در صنعت برای نوشتن ابزارهای خط \"\n\"فرمان محبوب می‌شود. گستردگی و ارگونومی کتابخانه‌ها با پایتون قابل مقایسه است، \"\n\"درحالی‌که قوی‌تر (به لطف تایپ سیستم غنی) است و سریعتر کار می‌کند (به عنوان یک \"\n\"زبان کامپایل شده و نه مفسری).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"مشارکت در اکوسیستم Rust مستلزم استفاده از ابزار استاندارد Rust مانند Cargo \"\n\"است. کتابخانه‌هایی که می‌خواهند مشارکت‌های خارجی دریافت کنند و می‌خواهند خارج از \"\n\"Chromium استفاده شوند (مثلاً در محیط‌های ساخت Bazel یا Android/Soong) احتمالاً \"\n\"باید از Cargo استفاده کنند.\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"نمونه‌هایی از پروژه‌های مرتبط با Chromium که مبتنی بر `cargo` هستند:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"‏ `serde_json_lenient` (در قسمت‌های دیگر Google آزمایش شده  که منجر به PRهایی \"\n\"با بهبود در عملکرد می‌باشد.)\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"کتابخانه‌های فونت مانند `font-types`\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"ابزار `gnrt` (ما بعداً در دوره با آن آشنا خواهیم شد) که برای تجزیه خط فرمان \"\n\"به `clap` و برای فایل‌های پیکربندی به `toml` بستگی دارد.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"سلب مسئولیت: یک دلیل منحصر به فرد برای استفاده از `cargo` در دسترس نبودن \"\n\"`gn` در هنگام ساخت و راه‌اندازی کتابخانه استاندارد Rust درحین ساخت Rust \"\n\"toolchain بود.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"‏ `run_gnrt.py` از کپی Chromium از `cargo` و `rustc` استفاده می‌کند.`gnrt` به \"\n\"کتابخانه‌های شخص ثالثی بستگی دارد که از اینترنت دانلود شده‌اند، اما  `run_gnrt.\"\n\"py`  از `cargo` می‌پرسد که فقط محتوای `--locked` از طریق `Cargo.lock` مجاز \"\n\"است.)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"دانش‌آموزان ممکن است موارد زیر را به طور ضمنی یا صریح مورد اعتماد تشخیص‌دهند:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (کامپایلر Rust) که به نوبه خود به کتابخانه‌های LLVM، کامپایلر Clang، \"\n\"منابع `rustc` (برگرفته از GitHub، بررسی شده توسط تیم کامپایلر Rust) وابسته \"\n\"است، کامپایلر Rust باینری که برای راه‌اندازی بارگیری (bootstrapping) شده است\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"‏ `rustup` (شاید شایان ذکر است که  `rustup` زیر چتر سازمان https://github.com/\"\n\"rust-lang/ - همانند `rustc` توسعه یافته است)\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`, `rustfmt`,سایر موارد.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"زیرساخت‌های داخلی مختلف (ربات‌هایی که `rustc` می‌سازند، سیستمی برای توزیع \"\n\"toolchain از پیش‌ساخته شده بین مهندسان Chromium و بقیغ)\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"ابزار Cargo مانند `cargo audit`، `cargo vet` و غیره.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"کتابخانه‌های Rust در `//third_party/rust` عرضه شده است (بازرسی شده توسط \"\n\"security@chromium.org)\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"سایر کتابخانه‌های Rust (بعضی خاص، برخی کاملاً محبوب و پرکاربرد)\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"رویکرد Chromium Rust\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"‏ Chromium هنوز Rust شخص اول را مجاز نمی‌کند، مگر در موارد نادر که توسط [Area \"\n\"Tech Leads](https://source.chromium.org/chromium/chromium/src/+/main:\"\n\"ATL_OWNERS) تأیید شده است.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"رویکردهای Chromium در مورد کتابخانه‌های شخص ثالث [اینجا](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#rust) \"\n\"مشخص شده است. Rust برای کتابخانه‌های شخص ثالث تحت شرایط مختلف مجاز است، از \"\n\"جمله اینکه آیا آنها بهترین گزینه برای کارایی بالا یا موارد امنیتی هستند.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"تعداد بسیار کمی از کتابخانه‌های Rust مستقیماً یک C/C++ API را در معرض دید \"\n\"(expose) قرار می‌دهند، به این معنی که تقریباً همه این کتابخانه‌ها به مقدار کمی \"\n\"glue code اول شخص نیاز دارند.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"کد Rust glue اول شخص برای یک crate شخص ثالث خاص معمولاً باید در `third_party/\"\n\"rust/<crate>/<version>/wrapper` نگهداری شود.\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"به‌همین دلیل، دوره‌ی امروز به شدت بر روی موارد زیر متمرکز خواهد شد:\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"آوردن کتابخانه های Rust شخص ثالث (\\\"crates\\\")\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\"نوشتن glue code برای اینکه بتوانید به کمک آن crateها از ++Chromium C استفاده \"\n\"کنید.\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\"اگر این رویکرد در طول زمان تغییر کند، این دوره به گونه‌ای تکامل می‌یابد که در \"\n\"مسیر مناسب ادامه یابد.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"قوانین Build\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"کد Rust معمولاً با استفاده از `cargo` ساخته می‌شود. Chromium با  `gn` و \"\n\"`ninja` جهت کارایی بیشتر ساخته می‌شود --- قواعد استاتیک آن حداکثر موازی‌سازی \"\n\"را امکان‌پذیر می‌سازد. Rust نیز از این قاعده مستثنی نیست.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"افزودن کد Rust به Chromium\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"در برخی از فایل‌های موجود `BUILD.gn` یک `rust_static_library` را اعلام کنید:\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"همچنین می‌توانید `deps` را روی سایر اهداف Rust اضافه کنید. بعداً از این برای \"\n\"وابستگی به کد شخص ثالث استفاده خواهیم کرد.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"شما باید هر دوی crate root و فهرست کامل منابع را مشخص کنید. `crate_root` \"\n\"فایلی است که به کامپایلر Rust داده می‌شود که نشان‌دهنده فایل ریشه واحد کامپایل \"\n\"است --- معمولاً به‌نام `lib.rs` است. همینطور `sources` فهرست کاملی از تمام \"\n\"فایل‌های منبعی است که  `ninja` برای تعیین زمان لازم برای بازسازی به آن‌ها نیاز \"\n\"دارد.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(چیزی به نام Rust `source_set` وجود ندارد، زیرا در Rust، تمامی crate یک واحد \"\n\"جمع‌آوری است. `static_library` کوچک‌ترین واحد است.)\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"دانش‌آموزان ممکن است تعجب کنند که چرا به جای استفاده از [پشتیبانی داخلی gn \"\n\"برای کتابخانه‌های استاتیک Rust](https://gn.googlesource.com/gn/+/main/docs/\"\n\"reference.md#func_static_library) به یک الگوی gn نیاز داریم. پاسخ این است که \"\n\"این الگو از CXX interop، ویژگی‌های Rust و تست‌های واحد پشتیبانی می‌کند که بعداً \"\n\"از برخی از آنها استفاده خواهیم کرد.\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"شامل کد `unsafe` Rust\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"کد ناامن Rust به طور پیش‌فرض در  `rust_static_library` غیرمجاز است --- \"\n\"کامپایل نمی‌شود. اگر به کد unsafe Rust نیاز دارید، `allow_unsafe = true` را \"\n\"به هدف gn اضافه کنید. (بعداً در دوره ما شرایطی را خواهیم دید که در آن لازم \"\n\"است.)\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"به سادگی هدف بالا را به `deps` برخی از اهداف Chromium C++ اضافه کنید.\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"تایپ‌ها در کد Rust حذف شده اند که باعث می‌شود یک IDE خوب حتی مفیدتر از++C \"\n\"باشد. کد ویژوال استودیو برای Rust در Chromium به خوبی کار می کند و برای \"\n\"استفاده از آن،\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"اطمینان حاصل کنید که VSCode شما دارای extension `rust-analyzer` است، نه \"\n\"فرم‌های قبلی پشتیبانی از Rust\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"‏ `gn gen out/Debug --export-rust-project` (یا معادل آن برای دایرکتوری خروجی \"\n\"شما)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"اگر مخاطب به طور طبیعی نسبت به IDE‌ها علاقه نداشته باشد، نمایش برخی از \"\n\"ویژگی‌های code annotation و کاوش در rust-analyzer می‌تواند مفید باشد.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"مراحل زیر ممکن است به نسخه نمایشی کمک کند (اما در عوض از یک قطعه Rust مربوط \"\n\"به Chromium که بیشتر با آن آشنا هستید استفاده کنید):\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\"‏ `components/qr_code_generator/qr_code_generator_ffi_glue.rs` را باز کنید\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"مکان نما را روی فراخوانی `QrCode::new` (حدود خط 26) در \"\n\"\\\\`qr_code_generator_ffi_glue.rs قرار دهید\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"نسخه‌ی نمایشی **نمایش مستندات ** (typical bindings: vscode = ctrl k i; vim/\"\n\"CoC = K).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"نسخه‌ی Demo یا نمایشی **go to definition** (typical bindings: vscode = F12; \"\n\"vim/CoC = g d). (این شما را به `//third_party/rust/.../qr_code-.../src/lib.\"\n\"rs` می‌رساند.)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"نسخه آزمایشی **outline** و در ادامه به متد `QrCode::with_bits` بروید (حدود \"\n\"خط 164؛ طرح کلی در پنجره file explorer در vscode است؛ typical vim/CoC \"\n\"bindings = space o)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"نسخه‌ی نمایشی **type annotations** (مثال های بسیار خوبی در متد  `QrCode::\"\n\"with_bits` وجود دارد)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"ممکن است مهم باشد که `gn gen ... --export-rust-project` باید پس از ویرایش \"\n\"فایل‌های `BUILD.gn` (که در طول تمرین‌های این جلسه چند بار انجام می‌دهیم) دوباره \"\n\"اجرا شود.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"تمرین قواعد ساخت\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"در ساخت Chromium خود، یک Rust target جدید به `//ui/base/BUILD.gn` اضافه کنید \"\n\"که حاوی:\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**مهم**: توجه داشته باشید که `no_mangle` در اینجا توسط کامپایلر Rust نوعی \"\n\"ناامنی (type of unsafety) در نظر گرفته می‌شود، بنابراین باید کد unsafe را در \"\n\"`gn` target خود مجاز کنید.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"این هدف جدید Rust را به عنوان وابستگی به `//ui/base:base` اضافه کنید. این \"\n\"تابع را در بالای `ui/base/resource/resource_bundle.cc` اعلام کنید (بعداً \"\n\"خواهیم دید که چگونه می‌توان این کار را با ابزارهای تولید bindings خودکار کرد):\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"این تابع را از جایی در `ui/base/resource/resource_bundle.cc` فراخوانی کنید - \"\n\"ما قسمت بالای `ResourceBundle::MaybeMangleLocalizedString` را پیشنهاد \"\n\"می‌کنیم. Chromium را Build و اجرا کنید و مطمئن شوید که \\\"Hello from Rust!\\\" \"\n\"بارها چاپ می‌شود.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"اگر از VSCode استفاده می‌کنید، اکنون Rust را تنظیم کنید تا در VSCode به خوبی \"\n\"کار کند. این کار در تمرین‌های بعدی مفید خواهد بود. اگر موفق شده‌اید، می‌توانید \"\n\"از کلیک راست روی\\\"Go to definition\\\" در`println!` استفاده کنید.\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"کجا می‌توان help پیدا کرد\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"گزینه‌های موجود برای [`rust_static_library` gn template](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/rust_static_library.gni;\"\n\"l=16)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"اطلاعات درباره [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/abi.\"\n\"html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"اطلاعات درباره [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.extern.\"\n\"html)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"اطلاعاتی درباره gnهای [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"این مثال غیرعادی است زیرا به زبان متقابل با کمترین مخرج مشترک، C خلاصه \"\n\"می‌شود. بعداً در دوره،  ++C  آن را مستقیماً به Rust وصل خواهیم کرد.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"‏ `allow_unsafe = true` در اینجا مورد نیاز است زیرا `#[no_mangle]` ممکن است \"\n\"به Rust اجازه دهد دو تابع با نام یکسان تولید کند و Rust دیگر نمی‌تواند تضمین \"\n\"کند که تابع مورد نظر فراخوانی شده است.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"اگر به یک فایل اجرایی Rust خالص نیاز دارید، می‌توانید این کار را با استفاده \"\n\"از الگوی`rust_executable` gn  نیز انجام دهید.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"جامعه Rust معمولاً unit testهای را در یک ماژول قرار می‌دهد که در همان فایل \"\n\"منبع کد مورد آزمایش قرار می‌گیرد. این مورد [قبل‌تر](../testing.md) در دوره \"\n\"پوشش داده شده بود و به این صورت است:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"در Chromium باید unit testها را در یک فایل منبع جداگانه قرار دهیم و همچنان \"\n\"این روش را برای Rust دنبال می‌کنیم --- این باعث می‌شود تست‌ها به طور مداوم قابل \"\n\"کشف باشند و کمک می‌کند از بازسازی فایل‌های `.rs` برای بار دوم (در پیکربندی \"\n\"`test`) جلوگیری شود.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"این منجر به گزینه‌های زیر برای تست کد Rust در Chromium می‌شود:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"تست‌های Native Rust (یعنی `#[test]`). خارج از `//third_party/rust` مناسب نیست.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"تست‌های `gtest` که در C++ نوشته شده‌اند و Rust را از طریق تماس‌های FFI انجام \"\n\"می‌دهند. زمانی که کد Rust فقط یک لایه نازکی از FFI است و unit testها موجود، \"\n\"پوشش کافی برای ویژگی‌هایی که ارائه می‌کنند کافی است.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"آزمایش‌های `gtest` که در Rust نوشته شده‌اند و از crate تحت آزمایش از طریق API \"\n\"عمومی آن استفاده می‌کنند (در صورت نیاز از `pub mod for_testing { ... }` » \"\n\"استفاده می‌کنند. این موضوع در چند اسلاید بعد معرفی شده است.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"ذکر کنید که تست‌هایnative Rust در مورد crateهای شخص ثالث باید در نهایت توسط \"\n\"روبات‌های Chromium انجام شود. (چنین آزمایشی به ندرت مورد نیاز است --- فقط پس \"\n\"از افزودن یا به‌روز‌رسانی crateهای شخص ثالث.)\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"برخی از مثال‌ها ممکن است به توضیح اینکه چه زمانی باید از  C++ `gtest` در \"\n\"مقابل Rust `gtest` استفاده شود کمک کند:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"‏ QR عملکرد بسیار کمی در لایه Rust شخص اول دارد (این فقط یک چسب FFI باریک \"\n\"است) و بنابراین از unit testهای++C موجود برای آزمایش ++C و اجرای Rust \"\n\"استفاده می‌کند (تست‌ها را پارامتر می‌کند تا Rust را با استفاده از یک \"\n\"`ScopedFeatureList` آن را فعال یا غیرفعال کند.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"‏ Hypothetical/WIP PNG ممکن است نیاز به پیاده‌سازی ایمن از حافظه تبدیل‌های \"\n\"پیکسلی داشته باشد که توسط `libpng` ارائه شده‌اند اما در `png` crate وجود \"\n\"ندارند - به عنوان مثال. RGBA => BGRA یا تصحیح‌گر گاما (gamma correction). \"\n\"چنین عملکردی ممکن است از آزمایش های جداگانه‌ای که در Rust نوشته شده است \"\n\"بهره‌مند شود.\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"کتابخانه [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/\"\n\"src/+/main/testing/rust_gtest_interop/README.md) راهی را ارائه می‌دهد:\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"از یک تابع Rust به عنوان یک تست `gtest` استفاده کنید (با استفاده از \"\n\"`#[gtest(...)]` attribute)\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"از `expect_eq!`  و ماکروهای مشابه (شبیه به `assert_eq!` استفاده کنید، اما \"\n\"وقتی assertion ناموفق بود، panic نکنید و تست را خاتمه ندهید).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"مثال:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"ساده‌ترین راه برای build Rust `gtest` اضافه‌کردن آن‌ها به یک باینری تست موجود \"\n\"است که از قبل حاوی تست‌هایی است که در ++C نوشته شده‌اند. به عنوان مثال:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"نگارش تست‌های Rust در یک `static_library` جداگانه نیز کار می‌کند، اما نیاز به \"\n\"اعلام دستی وابستگی به کتابخانه‌های پشتیبانی دارد:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"پس از افزودن `:my_rust_lib` به GN `deps`، همچنان باید نحوه وارد کردن و \"\n\"استفاده از `my_rust_lib` را از `my_rust_lib_unittest.rs` یاد بگیریم. ما یک \"\n\"`crate_name` صریح برای `my_rust_lib` ارائه نکرده‌ایم، بنابراین نام crate آن \"\n\"بر اساس مسیر و نام کامل هدف محاسبه می‌شود. خوشبختانه ما می‌توانیم با استفاده \"\n\"از ماکرو `chromium::import!` از `chromium` crate که به‌طور خودکار وارد می‌شود، \"\n\"درنتیجه از کار با چنین نامی پرهیز کنیم:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"در زیر جلدها، ماکرو به چیزی شبیه به زیر گسترش می یابد:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"اطلاعات بیشتر را می‌توانید در [ doc comment](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:build/rust/chromium_prelude/chromium_prelude.rs?\"\n\"q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) پیدا کنید. ماکرو مربوطه `chromium::\"\n\"import`.\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"‏`rust_static_library` از تعیین نام صریح از طریق ویژگی`crate_name` پشتیبانی \"\n\"می‌کند، اما انجام این کار ممنوع است و از آن جلوگیری می‌شود زیرا نام crate باید \"\n\"در سطح سراسری منحصر‌به‌فرد باشد. crates.io منحصر‌به‌فرد بودن نام crateهای خود را \"\n\"تضمین می‌کند، بنابراین اهداف`cargo_crate` GN (تولید شده توسط ابزار  `gnrt` که \"\n\"در بخش بعدی پوشش داده شده است) از نام‌های crate کوتاه استفاده می‌کنند.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"تمرین تستی\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"وقت یک تمرین دیگر است!\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"درChromium build شما باید:\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"یک تابع قابل آزمایش در کنار `hello_from_rust` اضافه کنید. چند پیشنهاد: اضافه \"\n\"کردن دو عدد صحیح دریافت شده به عنوان آرگومان، محاسبه عدد فیبوناچی nام، جمع \"\n\"اعداد صحیح در یک برش و غیره.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"یک فایل`..._unittest.rs` جداگانه با یک تست برای تابع جدید اضافه کنید.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"تست‌های جدید را به `BUILD.gn` اضافه کنید.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\"تست‌ها را بسازید، اجرا کنید و بررسی کنید که آيا تست جدید به درستی کار می‌کند.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"جامعه Rust گزینه‌های متعددی را برای C++/Rust interop ارائه می‌دهد، با ابزارهای \"\n\"جدیدی که همیشه در حال توسعه هستند. در حال حاضر، Chromium از ابزاری به نام \"\n\"CXX استفاده می‌کند.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"شما کل مرز زبان (language boundary) خود را در یک زبان تعریف interface (که \"\n\"بسیار شبیه Rust به نظر می رسد) توصیف می کنید و سپس ابزارهای CXX اعلان‌هایی را \"\n\"برای توابع و تایپ‌ها در Rust و ++C ایجاد می‌کنند.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"برای مثال کامل استفاده از این [آموزش CXX](https://cxx.rs/tutorial.html) را \"\n\"ببینید.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"از طریق دیاگرام صحبت کنید. توضیح دهید که در پشت صحنه، این دقیقاً همان کاری را \"\n\"انجام می‌دهد که قبلاً انجام می‌دادید. به این نکته اشاره کنید که خودکارسازی \"\n\"فرآیند دارای مزایای زیر است:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"این ابزار تضمین می‌کند که مجانب ++C و Rust مطابقت کامل دارند (مثلاً اگر \"\n\"`#[cxx::bridge]` با تعاریف واقعی ++C یا Rust مطابقت نداشته باشد، درنتیجه با \"\n\"خطاهای کامپایل مواجه می‌شوید اما با اتصال‌های دستی غیرهمگام‌شده (out-of-sync \"\n\"manual bindings) می‌توانید رفتار نامشخص دریافت کنید)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"این ابزار تولید Thunk‌های FFI (کارکردهای کوچک، سازگار با C-ABI، و رایگان) را \"\n\"برای ویژگی های غیر C (به عنوان مثال فعال کردن تماس‌های FFI به‌ متدهای Rust) به \"\n\"طور خودکار انجام می دهد؛ اتصال های دستی نیاز به نوشتن چنین عملکردهای سطح \"\n\"بالا و رایگان به صورت دستی دارد.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\"ابزارها و کتابخانه می‌توانند مجموعه‌ای از انواع هسته (core types) را مدیریت \"\n\"کنند - به عنوان مثال:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"‏ `&[T]` را می‌توان از مرز FFI عبور داد، حتی اگر هیچ‌گونه طرح‌بندی ABI یا حافظه \"\n\"خاصی را تضمین نکند. با اتصال‌های (bindings) دستی،`std::span<T>` / `&[T]` باید \"\n\"به‌صورت دستی تخریب شود و از یک pointer و length به صورت مجدد ساخته شود - با \"\n\"توجه به اینکه هر زبان sliceهای خالی را کمی متفاوت نشان می‌دهد، درنتیجه مستعد \"\n\"خطا است)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"اشاره گرهای هوشمند مانند `std::unique_ptr<T>`, `std::shared_ptr<T>` و/یا  \"\n\"`Box` به صورت native پشتیبانی می‌شوند. با کمک اتصال‌های دستی (manual \"\n\"bindings)، باید C-ABI-compatible raw pointers را پاس کنید که خطرات ایمنی و \"\n\"طول عمر را افزایش می‌دهد.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"تایپ‌های `rust::String` و `CxxString` تفاوت‌ها را در نمایش stringها در بین \"\n\"زبان‌ها درک و حفظ می‌کنند (به عنوان مثال، `rust::String::lossy` می‌تواند یک \"\n\"Rust string  را از ورودی غیر UTF8 و `rust::String::c_str` بسازد و می‌تواند یک \"\n\"string را با NUL خاتمه دهد).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"‏ CXX مستلزم آن است که کل مرز C++/Rust در ماژول‌های `cxx::bridge` در کد منبع `.\"\n\"rs` اعلام شود.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// Definitions of Rust types and functions go here\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"اشاره کنید:\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"اگرچه این شبیه به یک `mod` معمولی Rust است، اما ماکرو رویه‌ای `#[cxx::\"\n\"bridge]` کارهای پیچیده‌ای برای آن انجام می‌دهد و کد تولید شده کمی پیچیده تر \"\n\"است - اگرچه این کار همچنان منجر به یک  `mod` به نام `ffi` در کد شما می شود.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"پشتیبانی Native در ++C برای`std::unique_ptr`در Rust\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"پشتیبانی Native برای Rust Slices در ++C\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"فراخوانی از ++C به Rust و تایپ‌های Rust (در قسمت بالا)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"فراخوانی از Rust به ++C و تایپ‌های ++C (در قسمت پایین)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"تصور نادرست رایج**: به نظر می‌رسد هِدِر ++C توسط Rust تجزیه می‌شود، اما این \"\n\"گمراه کننده است. این هِدِر هرگز توسط Rust تفسیر نمی‌شود، بلکه به سادگی \"\n\"`#include` در کد ++C تولید‌شده برای کامپایلرهای ++C است.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"تا حد زیادی مفیدترین صفحه هنگام استفاده از CXX برابر [type reference]\"\n\"(https://cxx.rs/bindings.html) است.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"‏ CXX به‌طورکلی مناسب مواردی است که:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\"اینترفیس ++Rust-C شما به اندازه کافی ساده است که می‌توانید همه آن را اعلام یا \"\n\"declare کنید.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"شما فقط از تایپ‌هایی استفاده می‌کنید که قبلاً توسط CXX ​​پشتیبانی می‌شوند، برای \"\n\"مثال`std::unique_ptr`, `std::string`, `&[u8]` و غیره.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"این مورد محدودیت‌های زیادی دارد --- برای مثال عدم پشتیبانی از تایپ 'Option' \"\n\"Rust.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"این محدودیت‌ها ما را محدود می‌کنند تا از Rust در Chromium فقط برای \\\"گره‌های \"\n\"برگ\\\" به خوبی ایزوله شده استفاده کنیم نه برای تعامل دلخواه ++Rust-C. هنگام \"\n\"در نظر گرفتن یک مورد استفاده برای Rust در Chromium، یک نقطه شروع خوب این است \"\n\"که پیش نویس پیوندهای CXX برای مرز زبان (language boundary) را پیش‌نویس کنید \"\n\"تا ببینید آیا به اندازه کافی ساده به نظر می رسد یا خیر.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"همچنین باید برخی از نکات مهم دیگر را با CXX مطرح کنید، به عنوان مثال:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"مدیریت خطای آن بر اساسC++ exception است (در اسلاید بعدی ارائه شده است)\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"استفاده ازFunction pointerها دشوار است.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"‏ CXX [پشتیبانی از  `Result<T,E>`](https://cxx.rs/binding/result.html)  به C+\"\n\"+ exception متکی است، بنابراین نمی‌توانیم از آن در Chromium استفاده کنیم. \"\n\"جایگزین‌های آن عبارتند از:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"قسمت `T` از `نتیجه<T، E>` می تواند باشد:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"از طریق پارامترهای خارجی (به عنوان مثال از طریق `&mut T`) برگردانده شده است. \"\n\"این مستلزم آن است که `T` بتواند از مرز FFI عبور کند - برای مثال `T` باید \"\n\"باشد:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"یک type اولیه (مانند `u32` یا `usize`)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"تایپی که به طور native توسط `cxx` پشتیبانی می‌شود (مانند  `UniquePtr<T>`) که \"\n\"دارای یک مقدار پیش‌فرض مناسب برای استفاده در موارد خرابی است (_unlike_ \"\n\"`Box<T>`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"در سمت Rust حفظ شده و از طریق مرجع در معرض دید قرار گرفته است. این کار ممکن \"\n\"است زمانی مورد نیاز باشد که `T` یک تایپ Rust است که نمی‌تواند از مرز FFI عبور \"\n\"کند و نمی تواند در `UniquePtr<T>` ذخیره شود.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"قسمت `E` از `Result<T, E>` می‌تواند باشد:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"به‌عنوان یک boolean برگردانده می‌شود (مثلاً `true` نشان‌دهنده موفقیت و `false` \"\n\"نشان‌دهنده یک شکست است)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"حفظ جزئیات خطا در تئوری امکان پذیر است، اما تاکنون در عمل مورد نیاز نبوده \"\n\"است.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"مدیریت خطا CXX: مثال QR\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"تولید کد QR [نمونه‌ای](https://source.chromium.org/chromium/chromium/src/+/\"\n\"main:components/qr_code_generator/qr_code_generator_ffi_glue.rs;l=13-18;\"\n\"drc=7bf1b75b9101ca2013) است که در آن بولی برای ارتباط موفقیت در مق‌بل شکست و \"\n\"جایی که نتیجه موفقیت آمیز را می‌توان از مرز FFI عبور داد استفاده می شود:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"دانش آموزان ممکن است در مورد معنایی خروجی `out_qr_size` کنجکاو باشند. این \"\n\"اندازه بردار نیست بلکه اندازه کد QR است (و مسلماً کمی اضافی است - درواقع این \"\n\"جذر اندازه بردار است).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"شاید لازم باشد قبل از فراخوانی تابع Rust به اهمیت مقداردهی اولیه \"\n\"`out_qr_size` اشاره کنیم. ایجاد یک مرجع Rust که به حافظه اولیه اشاره می‌کند، \"\n\"منجر به رفتار نامشخص می‌شود (برخلاف ++C، زمانی که تنها عمل عدم ارجاع چنین \"\n\"حافظه‌ای منجر به UB می‌شود).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"اگر دانش‌آموزان درباره `Pin` سؤال می‌کنند، توضیح دهید که چرا CXX برای ارجاع‌های \"\n\"قابل تغییر به داده‌های ++C به آن نیاز دارد: پاسخ این است که داده‌های++C را \"\n\"نمی‌توان مانند داده‌های Rust جابه‌جا کرد، زیرا ممکن است حاوی نشانگرهای \"\n\"خودارجاعی (self-referential pointers) باشد.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"مدیریت خطا CXX: مثال PNG\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"نمونه اولیه PNG decoder نشان می‌دهد که وقتی نتیجه موفقیت آمیز نمی‌تواند از مرز \"\n\"FFI عبور کند و چه کاری می توان انجام داد:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"‏ \\\"PngReader\\\" و \\\"ResultOfPngReader\\\" تایپ‌های Rust هستند --- objectهای از \"\n\"این نوع نمیتوانند بدون جهت‌گیری غیرمستقیم `Box<T>` از مرز FFI عبور کنند. ما \"\n\"نمی‌توانیم `out_parameter: &mut PngReader` داشته باشیم، زیرا CXX به ++C اجازه \"\n\"نمی‌دهد Rust object ها را براساس مقدار ذخیره کند.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"این مثال نشان می‌دهد که حتی اگر CXX از genericها و templateهای دلخواه \"\n\"پشتیبانی نمی‌کند، ما همچنان می‌توانیم آنها را از مرز FFI عبور دهیم و آنها را \"\n\"به‌صورت دستی تخصصی/تک‌شکلی ( specializing / monomorphizing) در یک نوع غیرعمومی \"\n\"تبدیل کنیم. در مثال `ResultOfPngReader` یک نوع non-generic است که به متدهای \"\n\"مناسب `Result<T, E>` (به عنوان مثال به «is_err»، «unwrap» و/یا «as_mut» \"\n\"ارسال می‌شود.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"استفاده از cxx در Chromium\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"در Chromium، یک `#[cxx::bridge] mod` مستقل برای هر برگ گره‌ای که می‌خواهیم از \"\n\"Rust استفاده کنیم را تعریف می‌کنیم. شما معمولاً برای هر `rust_static_library` \"\n\"یکی دارید. پس فقط اضافه کنید.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"به هدف `rust_static_library` موجود در کنار `crate_root` و `sources`.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \" headerهای ++C در یک مکان منطقی تولید می‌شوند، بنابراین شما می‌توانید\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"برخی از توابع کاربردی را در `//base`  برای تبدیل به/از تایپ‌های ++Chromium C \"\n\"به انواع CXX Rust پیدا خواهید کرد --- برای مثال [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src /+/main:base/containers/span_rust.\"\n\"h;l=21).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"دانش‌آموزان ممکن است بپرسند --- چرا هنوز به `allow_unsafe = true` نیاز داریم؟\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"پاسخ کلی این است که هیچ کد ++C/C با استانداردهای معمول Rust \\\"ایمن\\\" نیست. \"\n\"فراخوانی مجدد و برگشتی به ++C/C  از Rust ممکن است کارهای دلخواه را در حافظه \"\n\"انجام دهد و ایمنی طرح‌بندی داده‌های خود Rust را به خطر بیندازد. وجود کلمات \"\n\"کلیدی بسیار زیاد «ناامن» در تعامل ++C/C  می‌تواند به نسبت سیگنال به نویز چنین \"\n\"کلمه کلیدی آسیب برساند و این [جنجال‌برانگیز]‌(https://steveklabnik.com/writing/\"\n\"the-cxx-debate) است، اما به طور دقیق، آوردن هر کد خارجی به یک باینری Rust \"\n\"می‌تواند باعث رفتار غیرمنتظره از دیدگاه Rust شود.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"پاسخ دقیقق دردیاگرام بالای [این صفحه](../interoperability-with-cpp.md) نهفته \"\n\"است  --- در پشت صحنه، CXX توابع Rust «ناامن» و `extern \\\"C\\\"` را درست مانند \"\n\"در بخش قبل به صورت دستی انجام دادیم.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"تمرین: قابلیت همکاری با ++C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"قسمت اول\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"در فایل Rust که قبلاً ایجاد کرده‌اید، یک `#[cxx::bridge]` اضافه کنید که یک \"\n\"تابع را مشخص می‌کند که باید از++C فراخوانی شود که نام `hello_from_rust` دارد، \"\n\"بدون اینکه پارامتر و هیچ مقداری برگرداند.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"تابع `hello_from_rust` قبلی خود را برای حذف  `extern \\\"C\\\"` و `#[no_mangle]` \"\n\"تغییر دهید. حالا این فقط یک تابع استاندارد Rust است.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"هدف `gn` خود را برای ایجاد این پیوندها (bindings) تغییر دهید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"در کد ++C خود، forward-declaration برای `hello_from_rust` را حذف کنید. در \"\n\"عوض، فایل هِدِر تولید شده را اضافه کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"Build و run!\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"قسمت دوم\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"ایده خوبی است که کمی با CXX بازی کنید. این به شما کمک می کند تا به این فکر \"\n\"کنید که Rust در Chromium واقعا چقدر انعطاف پذیر است.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"برخی از چیزهایی که باید امتحان کنید:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"از Rust دوباره به  ++C فراخوانی کنید. درنهایت شما نیاز خواهید داشت:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"یک فایل هِدِر اضافی که می‌توانید از `cxx::bridge` خود `include!` را وارد کنید. \"\n\"شما باید تابع ++C خود را در آن فایل هِدِر جدید اعلام کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"یک بلوک `unsafe` برای فراخوانی چنین تابعی، یا به طور متناوب کلمه کلیدی \"\n\"`unsafe` را در `#[cxx::bridge]` خود [همانطور که در اینجا توضیح داده شده است]\"\n\"(https://cxx.rs/extern-c++.html#functions-and-member-functions).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"همچنین ممکن است لازم باشد`#include \\\"third_party/rust/cxx/v1/crate/include/\"\n\"cxx.h\\\"` را وارد کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"یک رشته++C را از ++C به Rust منتقل کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"ارسال یک reference از یک C++ object به Rust .\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"عمداً امضاهای تابع Rust را که از `#[cxx::bridge]` مطابقت ندارند، دریافت کنید \"\n\"و به خطاهایی که می بینید عادت کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"عمداً امضاهای تابع ++C را که از `#[cxx::bridge]` مطابقت ندارند، دریافت کنید و \"\n\"به خطاهایی که می بینید عادت کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"یک `std::unique_ptr` از نوعی از ++C را به Rust ارسال کنید، به طوری که Rust \"\n\"بتواند دارای یک C++ object باشد.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"یک Rust object ایجاد کنید و آن را به ++C ارسال کنید تا ++C مالک آن باشد. \"\n\"(نکته: شما به یک `Box` نیاز دارید).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"چند متد را در نوع ++C اعلام کنید. آنها را از Rust فراخوانی کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"چند متد را در Rust type اعلام کنید. از ++C آن‌ها را فراخوانی کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"قسمت سوم\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"اکنون نقاط قوت و محدودیت‌های CXX interop را درک کرده‌اید، به چند مورد استفاده \"\n\"برای Rust در Chromium فکر کنید که در آن رابط به اندازه کافی ساده باشد. نحوه \"\n\"تعریف این رابط را ترسیم کنید.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"یک [`cxx` binding reference](https://cxx.rs/bindings.html)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"یک  [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\"برخی از سؤالاتی که ممکن است با آن مواجه شوید:برخی از سوالاتی که ممکن است با \"\n\"آن مواجه شوید:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"من مشکلی در مقداردهی اولیه یک متغیر از نوع X با نوع Y می‌بینم، که در آن X و Y \"\n\"هر دو نوع تابع هستند. بخاطر اینکه تابع ++ C شما کاملاً با اعلان موجود در \"\n\"`cxx::bridge` شما مطابقت ندارد.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"به نظر می‌رسد می‌توانم آزادانه مراجع ++C را به منابع Rust تبدیل کنم. آیا این \"\n\"خطر UB را ندارد؟ برای تایپ‌های _opaque_ CXX، خیر، زیرا اندازه آنها صفر است. \"\n\"برای انواع بی‌اهمیت CXX بله، ممکن است باعث UB شود، اگرچه طراحی CXX ساخت چنین \"\n\"نمونه‌ای را بسیار دشوار می‌کند.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"کتابخانه‌های Rust \\\"Crates\\\" نامیده می‌شوند و در [crates.io](https://crates.\"\n\"io) یافت می‌شوند. وابستگی cratesهای Rust به یکدیگر بسیار آسان است. بنابراین \"\n\"آنها این کار را انجام می‌دهند!\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"ویژگی\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"C++ library\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"Rust crate\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"Build system\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"تعداد زیادی\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"یکپارچگی: `Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"اندازه کتابخانه معمولی\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"Large-ish\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"کوچک\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"وابستگی‌های گذرا\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"Few\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"برای یک مهندس Chromium، این مزایا و معایب دارد:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"همه crateها از یک سیستم ساخت مشترک استفاده می‌کنند، بنابراین می‌توانیم گنجاندن \"\n\"آن‌ها در Chromium را خودکار کنیم...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"... اما، crateها معمولاً وابستگی‌های گذرا دارند، بنابراین احتمالاً مجبور خواهید \"\n\"بود چندین کتابخانه را بیاورید.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"بحث خواهیم کرد:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"نحوه قرار دادن یک crate در درخت کد منبع Chromium\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"چگونه قوانین ساخت `gn` برای آن ایجاد کنیم\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"نحوه بررسی کد منبع آن برای ایمنی کافی\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"پیکربندی فایل `Cargo.toml` برای افزودن crateها\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"‏ Chromium دارای یک مجموعه واحد از وابستگی‌های crate مستقیم با مدیریت مرکزی \"\n\"است. اینها از طریق یک [`Cargo.toml`](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.toml) مدیریت \"\n\"می‌شوند :\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"مانند هر `Cargo.toml` دیگری، می‌توانید [جزئیات بیشتر در مورد وابستگی‌ها]\"\n\"(https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) را \"\n\"مشخص کنید --- معمولاً شما می‌خواهید «ویژگی‌هایی» را که می‌خواهید در crate فعال \"\n\"کنید را مشخص کنید.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"هنگام افزودن crate به Chromium، اغلب باید اطلاعات اضافی را در یک فایل اضافی، \"\n\"`gnrt_config.toml` ارائه کنید، که در ادامه با آن آشنا خواهیم شد.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"در کنار `Cargo.toml` یک  [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml) قرار دارد. این شامل برنامه‌های  extension مخصوص Chromium برای مدیریت \"\n\"crate است.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"اگر crate جدیدی اضافه کنید، باید حداقل`group` را مشخص کنید. این یکی از:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"به عنوان مثال،\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"بسته به طرح کد منبع crate، ممکن است لازم باشد از این فایل برای تعیین محل \"\n\"یافتن فایل (های) مجوز آن استفاده کنید.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"بعداً، موارد دیگری را که برای حل مشکلات باید پیکربندی کنید، در این فایل \"\n\"مشاهده خواهیم کرد.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"ابزاری به نام `gnrt` می‌داند که چگونه جعبه‌ها را بارگیری کند و چگونه قواعد \"\n\"`BUILD.gn` را ایجاد کند.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"برای شروع، crate مورد نظر خود را به صورت زیر دانلود کنید:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"اگرچه ابزار`gnrt` بخشی از کد منبع Chromium است، با اجرای این دستور، \"\n\"وابستگی‌های آن را از `crates.io` دانلود و اجرا می‌کنید. [بخش قبلی](../cargo.\"\n\"md) را در مورد این تصمیم امنیتی ببینید.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"این `vendor` command ممکن است بارگیری کند:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"جعبه‌های (crates) کاربردی شما\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"وابستگی های مستقیم و گذرا\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"نسخه‌های جدید crateهای دیگر، همانطور که `cargo` برای حل کردن مجموعه کامل \"\n\"جعبه‌های مورد نیاز Chromium لازم است.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"‏ Chromium وصله‌هایی را برای برخی crateها نگهداری می‌کند که در`//third_party/\"\n\"rust/chromium_crates_io/patches` نگهداری می‌شوند. این‌ها به‌طور خودکار دوباره \"\n\"اعمال می‌شوند، اما اگر وصله نشد، ممکن است نیاز به اقدام دستی داشته باشید.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\"هنگامی که crate را دانلود کردید، فایل‌های `BUILD.gn` را مانند این تولید کنید:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"اکنون `git status` را اجرا کنید. شما باید این موارد را پیدا کنید:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"حداقل یک کد منبع جعبه جدید در `third_party/rust/chromium_crates_io/vendor`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"حداقل یک `BUILD.gn` جدید در `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"یک `README.chromium` مناسب\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"لطفا به [مرجع Rust ](https://doc.rust-lang.org/reference/type-layout.html) \"\n\"مراجعه کنید.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\"نگاهی دقیق بیندازید، به‌خصوص به چیزهایی که در `third_party/rust` ایجاد می‌شوند.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"کمی در مورد semver --- و به‌ویژه روشی که در Chromium اجازه می‌دهد چندین نسخه \"\n\"ناسازگار از crateها را مجاز کند، صحبت کنید. این مورد که در اکوسیستم Cargo \"\n\"منع می‌شود ولی گاهی اوقات ضروری است.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"اگر build شما با شکست مواجه شد، ممکن است به دلیل `build.rs` باشد: برنامه‌هایی \"\n\"که کارهای دلخواه را در زمان build انجام می‌دهند. این مورد به‌طورکلی در تضاد با \"\n\"طراحی `gn` و `ninja` است که هدفشان قواعد build ایستا، قطعی برای به حداکثر \"\n\"رساندن موازی‌سازی و تکرارپذیری buildها است.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"برخی از اقدامات `build.rs` به طور خودکار پشتیبانی می‌شوند. دیگران نیاز به \"\n\"اقدام دارند:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"ساخت افکت اسکریپت\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"توسط قالب‌های gn ما پشتیبانی می‌شود\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"کار مورد نیاز شما\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"بررسی نسخه rustc برای پیکربندی ویژگی‌ها روشن و خاموش\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"بلی\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"None\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"بررسی پلتفرم یا CPU برای پیکربندی ویژگی‌های روشن و خاموش\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"تولید کردن کد\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"بله - در `gnrt_config.toml` مشخص کنید\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"Building C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"خیر\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"اطراف آن را Patch کنید\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"سایر اقدامات دلخواه\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"خوشبختانه، اکثر crateها حاوی build script نیستند و خوشبختانه، اکثر build \"\n\"scriptها تنها دو عمل اصلی را انجام می‌دهند.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"اگه `ninja` درباره نبودن فایل‌ها اعتراض کرد، `build.rs` را بررسی کنید و \"\n\"ببینید که آیا کدهای منبع را می‌نویسد.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"در این صورت، [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) را \"\n\"تغییر دهید تا `build-script-outputs` به crate اضافه شود. اگر این یک وابستگی \"\n\"گذرا است، یعنی وابستگی که کد Chromium نباید مستقیماً به آن وابسته باشد، پس \"\n\"`allow-first-party-usage=false` را نیز اضافه کنید. چندین نمونه از قبل در آن \"\n\"فایل وجود دارد:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"اکنون [`gnrt.py -- gen`](../generating-gn-build-rules.md) را مجدداً اجرا کنید \"\n\"تا فایل‌های  `BUILD.gn` را دوباره تولید کنید تا به ninja اطلاع دهید که این \"\n\"فایل خروجی خاص ورودی مراحل build بعدی است.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"برخی از crateها از crate مربوط به [`cc`](https://crates.io/crates/cc) برای \"\n\"build و link کتابخانه‌های C/C++ استفاده می‌کنند. crateهای دیگر C/C++ را با \"\n\"استفاده از [`bindgen`](https://crates.io/crates/bindgen) در اسکریپت‌های build \"\n\"خود تجزیه می‌کنند. این فعالیت‌ها را نمی‌توان در زمینه Chromium پشتیبانی کرد --- \"\n\"سیستم ساخت gn، ninja و LLVM ما در بیان روابط بین build actionsها بسیار خاص \"\n\"است.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"بنابراین، گزینه‌های شما عبارتند از:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"از این crateها اجتناب کنید\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"یک وصله (patch) روی crate بزنید.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"وصله‌ها (Patches) باید در`third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` نگهداری شوند - برای مثال [Patchها در مقابل `](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - و هر بار که crate را upgrade می‌کند به‌طور \"\n\"خودکار توسط`gnrt` اعمال می‌شود.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"هنگامی که یک crate شخص ثالث اضافه کردید و قواعد build را ایجاد کردید که با \"\n\"توجه به نوع crate می‌تواند ساده باشد. درنتیجه هدف `rust_static_library` خود \"\n\"را پیدا کنید و یک `dep` روی هدف `:lib` در crate خود اضافه کنید.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"به‌طور‌مشخص،\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"حسابرسی Crateهای شخص ثالث\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"افزودن کتابخانه‌های جدید تابع [قواعد](https://chromium.googlesource.com/\"\n\"chromium/src/+/refs/heads/main/docs/rust.md#Third_party-review) مربوط به \"\n\"Chromium است، اما البته موضوع بررسی امنیتی نیز وجود دارد. از آنجایی که ممکن \"\n\"است نه تنها یک crate، بلکه وابستگی‌های گذرا را نیز وارد کنید، ممکن است کدهای \"\n\"زیادی برای بررسی وجود داشته باشد. از سوی دیگر، safe Rust code  می‌تواند عوارض \"\n\"جانبی محدودی داشته باشد. پس چگونه باید آن را بررسی کنید؟\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"با گذشت زمان، Chromium قصد دارد به فرآیندی بر اساس [cargo vet](https://\"\n\"mozilla.github.io/cargo-vet/) حرکت کند.\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"در همین حال، برای هر crate جدید اضافه شده، موارد زیر را بررسی می کنیم:\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"بدانید که چرا هر crate استفاده می‌شود. رابطه بین crateها چیست؟ اگر سیستم ساخت \"\n\"هر جعبه حاوی `build.rs`  یا ماکروهای رویه‌ای (procedural macros) است، مشخص \"\n\"کنید که آن‌ها برای چه چیزی هستند. آیا آنها با روشی که Chromium به طور معمول \"\n\"ساخته و built می‌شود سازگار هستند؟\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"بررسی کنید که هر crate به نظر برسد که به خوبی نگهداری شده باشد.\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"از `cd third-party/rust/chromium_crates_io; cargo audit` استفاده کنید. بررسی \"\n\"cargo برای بررسی آسیب‌پذیری‌های شناخته‌شده (ابتدا باید  `cargo install cargo-\"\n\"audit` که از قضا شامل دانلود وابستگی‌های زیادی از اینترنت می‌شود[2](../cargo.\"\n\"md))\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"مطمئن شوید هر کد `unsafe` به اندازه کافی برای [قاعده دو](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/security/rule-of-2.md#unsafe-code-\"\n\"in-safe-languages)  خوب است\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"هرگونه استفاده از APIهای `fs` یا `net` را بررسی کنید\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"تمام کدها را در سطح کافی بخوانید تا به دنبال هر چیزی که ممکن است به طور مخرب \"\n\"وارد شده باشد را بگردید. (در اینجا نمی توانید به طور واقع بینانه به دنبال \"\n\"نتیجه ۱۰۰ درصدی باشید: اغلب کدهای زیادی وجود دارد.)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"این‌ها فقط دستورالعمل‌هایی هستند --- با بازبین‌هایی از `security@chromium.org` \"\n\"کار کنید تا راه درستی برای اطمینان از crate پیدا کنید.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"بررسی Crateها در کد منبع Chromium\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"‏ `git status` باید نشان دهد:\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"کد Crate در `//third_party/rust/chromium_crates_io`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"متادیتا (`BUILD.gn` و `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"لطفاً یک فایل`OWNERS` در مکان دیگر نیز اضافه کنید.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"باید همه اینها را به همراه تغییرات `Cargo.toml` و `gnrt_config.toml`  خود در \"\n\"مخزن Chromium قرار دهید.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**مهم**: باید از `git add -f` استفاده کنید زیرا در غیر این صورت فایل‌های  `.\"\n\"gitignore` ممکن است منجر به حذف برخی از فایل‌ها شود.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"در حین انجام این کار، ممکن است متوجه شوید که بررسی‌های پیش‌ارسال به دلیل زبان \"\n\"غیرمطرح با شکست مواجه می‌شوند. بخاطر این که داده‌های Rust crate معمولاً شامل \"\n\"نام شاخه‌های git می‌شوند و بسیاری از پروژه‌ها هنوز از اصطلاحات غیرمطرح در آنجا \"\n\"استفاده می‌کنند. بنابراین ممکن است لازم باشد این موارد را اجرا کنید:\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"شما به‌عنوان مالک هر وابستگی شخص ثالث Chromium، [انتظار می‌رود آن را با هرگونه \"\n\"اصلاحات امنیتی به‌روز نگه دارید](https://chromium.googlesource.com/chromium/\"\n\"src/+/main/docs/adding_to_third_party.md#add-owners). امید است که ما به زودی \"\n\"این را برای crateهای Rust خودکار کنیم، اما در حال حاضر، همچنان مسئولیت \"\n\"شماست، همانطور که برای هر وابستگی به شخص ثالث دیگر این مسئولیت را دارید.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"‏ [uwuify](https://crates.io/crates/uwuify) را به Chromium اضافه کنید و \"\n\"[ویژگی‌های پیش‌فرض](https://doc.rust-lang.org/cargo/reference/features.\"\n\"html#the-default-feature). فرض کنید از crate در ارسال و دریافت بسته‌ها برای \"\n\"Chromium استفاده می‌شود، اما برای رسیدگی به ورودی‌های غیرقابل اعتماد استفاده \"\n\"نمی‌شود.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(در تمرین بعدی از uwuify برای Chromium استفاده خواهیم کرد، اما در صورت تمایل \"\n\"می‌توانید این کار را انجام دهید. همینطور می‌توانید یک هدف ['rust_executable']\"\n\"(https://source.chromium.org /chromium/chromium/src/+/main:build/rust/\"\n\"rust_executable.gni) جدید ایجاد کنید که از `uwuify` استفاده می‌کند).\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"دانش‌آموزان باید تعداد زیادی وابستگی گذرا را دانلود کنند.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"کل crateهای مورد نیاز عبارتند از:\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"`instant`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`, و\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"اگر دانش‌آموزان حتی بیشتر از آن دانلود می‌کنند، احتمالا فراموش کرده‌اند که \"\n\"ویژگی‌های پیش‌فرض را خاموش کنند.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"با تشکر از [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) برای این \"\n\"crate!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"برای جمع‌آوری آن --- تمرین کنید\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"در این تمرین، می‌خواهید یک ویژگی کاملاً جدید Chromium را اضافه کنید و همه \"\n\"چیزهایی را که قبلاً یاد گرفته‌اید جمع آوری کنید.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"خلاصه‌ای از مدیریت محصول\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"جامعه‌ای از pixyها کشف شده است که در یک جنگل بارانی دور افتاده زندگی می کنند. \"\n\"مهم است که Chromium برای pixyها را در اسرع وقت به آنها تحویل دهیم.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"لازمه کار این است که تمام stringهای رابط کاربری Chromium به زبان Pixie ترجمه \"\n\"شوند.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"زمانی برای منتظر ماندن برای ترجمه‌های مناسب وجود ندارد، اما خوشبختانه زبان \"\n\"pixie بسیار نزدیک به انگلیسی است و به نظر می‌رسد که Rust crate ای وجود دارد \"\n\"که ترجمه را انجام می‌دهد.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"در واقع، شما قبلا [آن crate را در تمرین قبلی وارد کردید](https://crates.io/\"\n\"crates/uwuify).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"(بدیهی است که ترجمه های واقعی Chrome نیاز به دقت و تلاش باورنکردنی دارند. \"\n\"این مورد را ارسال نکنید!)\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"گام‌ها\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"‏ `ResourceBundle::MaybeMangleLocalizedString` را تغییر دهید تا همه stringها \"\n\"را قبل از نمایش یکپارچه کند. در این build خاص Chromium، بدون در نظر گرفتن \"\n\"تنظیمات `mangle_localized_strings_` همیشه باید این کار را انجام دهد.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"اگر همه این تمرین‌ها را درست انجام داده‌اید، به شما تبریک می‌گوییم، باید Chrome \"\n\"را برای pixies ایجاد می‌کردید!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"‏ UTF16 در مقابل UTF8. دانش‌آموزان باید بدانند که stringهای Rust همیشه UTF8 \"\n\"هستند و احتمالاً تصمیم خواهند گرفت که بهتر است تبدیل را در سمت C++ با استفاده \"\n\"از `base::UTF16ToUTF8`  انجام دهند و دوباره برگردند.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"اگر دانش‌آموزان تصمیم بگیرند که تبدیل را در سمت Rust انجام دهند، باید \"\n\"[`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.String.\"\n\"html#method را در نظر بگیرند. مدیریت خطا را در نظر بگیرید و در نظر داشته \"\n\"باشید که کدام [نوع های پشتیبانی شده از CXX می توانند تعداد زیادی از u16 ها \"\n\"را منتقل کنند](https://cxx.rs/binding/slice.html).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"دانش‌آموزها ممکن است مرز C++/Rust را به روش های مختلف طراحی کنند، به عنوان \"\n\"مثال. گرفتن و برگرداندن stringها بر اساس مقدار، یا گرفتن یک مرجع قابل تغییر \"\n\"به یک string. اگر از یک مرجع قابل تغییر استفاده شود، CXX احتمالاً به دانش‌آموز \"\n\"می‌گوید که باید از [`Pin`](https://doc.rust-lang.org/std/pin/) استفاده کند. \"\n\"ممکن است لازم باشد توضیح دهید `Pin` چه می‌کند و سپس توضیح دهید که چرا CXX به \"\n\"آن برای ارجاع‌های قابل تغییر به داده‌های  C++  نیاز دارد: پاسخ این است که \"\n\"داده‌های C++  را نمی‌توان مانند داده‌های Rust جابه‌جا کرد، زیرا ممکن است حاوی \"\n\"نشانگرهای خودارجاعی (self-referential pointers) باشد.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"هدف C++ حاوی `ResourceBundle::MaybeMangleLocalizedString` باید به هدف \"\n\"`rust_static_library` وابسته باشد. دانش‌آموز احتمالاً از قبل این کار را انجام \"\n\"داده است.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"هدف `rust_static_library` باید به `//third_party/rust/uwuify/v0_2:lib` \"\n\"وابسته باشد.\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"راه‌حل‌های تمرینات Chromium را می‌توانید در [این سری از CLs](https://chromium-\"\n\"review.googlesource.com/c/chromium/src/+/5096560) پیدا کنید.\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"به Bare Metal Rust خوش آمدید\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"این یک دوره مستقل یک روزه در مورد bare-metal Rust است که با هدف افرادی که با \"\n\"اصول Rust آشنا هستند (شاید از اتمام دوره جامع Rust) و در حالت ایده آل نیز \"\n\"تجربه برنامه‌نویسی bare-metal به زبان دیگری را دارند، مانند C می‌باشد.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"امروز ما در مورد'bare-metal' Rust صحبت خواهیم کرد: اجرای کد Rust بدون \"\n\"سیستم‌عامل در ادامه به چند بخش تقسیم خواهد شد:\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"این `no_std` Rust چیست؟\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"نوشتنfirmware برای میکروکنترلرها.\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"نوشتن کد bootloader / kernel  برای پردازنده‌های برنامه.\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"برخی از crateهای مفید برای توسعه bare-metal Rust.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"برای بخش میکروکنترلر دوره ما از [BBC micro:bit](https://microbit.org/) v2 به \"\n\"عنوان مثال استفاده خواهیم کرد. این یک [برد توسعه](https://tech.microbit.org/\"\n\"hardware/) مبتنی بر میکروکنترلر Nordic nRF52833 با چند LED و دکمه، شتاب‌سنج و \"\n\"قطب‌نما متصل به I2C و یک دیباگر SWD روی برد است.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"برای شروع، ابزارهایی را که بعداً به آنها نیاز خواهیم داشت نصب کنید. در لینوکس \"\n\"یا دبیان:\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"و به کاربران گروه `plugdev` اجازه دسترسی به برنامه‌نویس micro:bit را بدهید:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"در MacOS:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slices, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` و `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"یک `File` و بقیه  در `fs`.\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"یک `HashMap` به RNG وابسته است.\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"یک برنامه حداقلی از`no_std`\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"این به یک باینری خالی کامپایل می‌شود.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"همچنین می‌توان آن را توسط crate دیگری مانند  `panic-halt` تهیه کرد.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"بسته به هدف، ممکن است لازم باشد برای جلوگیری از خطای `eh_personality` را \"\n\"`panic = \\\"abort\\\"`  کامپایل کنید.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"توجه داشته باشید که `main`  یا هیچ نقطه ورودی دیگری وجود ندارد. این به شما \"\n\"بستگی دارد که نقطه ورود خود را تعریف کنید. این معمولاً شامل یک اسکریپت linker \"\n\"و مقداری کد اسمبلی برای تنظیم موارد آماده برای اجرای کد Rust است.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"برای استفاده از `alloc` باید یک [global (heap) allocator](https://doc.rust-\"\n\"lang.org/stable/std/alloc/trait.GlobalAlloc.html) را پیاده‌سازی کنید.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Give the allocator some memory to allocate.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Now we can do things that require heap allocation.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator`یک third-party crate است که یک تخصیص‌دهنده buddy \"\n\"system را پیاده‌سازی می‌کند. crateهای دیگر در دسترس هستند یا می‌توانید نسخه \"\n\"مربوط به خود را بنویسید یا به تخصیص دهنده موجود خود متصل کنید.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"پارامتر const `LockedHeap` حداکثر ترتیب تخصیص‌دهنده (allocator) است. یعنی در \"\n\"این مورد می‌تواند مناطقی تا 2\\\\*\\\\*32  بایت را اختصاص دهد.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"اگر هر crate ای در درخت وابستگی شما به  `alloc` بستگی دارد، باید دقیقاً یک \"\n\"تخصیص‌دهنده سراسری در باینری خود تعریف کنید. معمولاً این کار در binary crate \"\n\"سطح بالا انجام می‌شود.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"برای اطمینان از اینکه `panic_halt` crate لینک شده است، استفاده `extern crate \"\n\"panic_halt as _` ضروری است، بنابراین panic handler آن را دریافت می‌کنیم.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"این مثال ساخته می شود اما اجرا نمی‌شود، زیرا entry point ندارد.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"یک `cortex_m_rt` crate (در میان چیزهای دیگر) یکreset handler  برای \"\n\"میکروکنترلرهای Cortex M فراهم می‌کند.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"در ادامه نحوه دسترسی به لوازم جانبی (peripherals) را با افزایش سطح انتزاع \"\n\"بررسی خواهیم کرد.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"ماکرو `cortex_m_rt::entry` مستلزم این است که تابع دارای نوع `cortex_m_rt::\"\n\"entry` باشد، زیرا بازگشت به reset handler  منطقی نیست.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"مثال را با `cargo embed --bin minimal` اجرا کنید\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"اکثر میکروکنترلرها از طریق IO دارای memory-map به تجهیزات جانبی \"\n\"(peripherals) دسترسی دارند. بیایید سعی کنیم یک LED را در micro:bit خود روشن \"\n\"کنیم:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// GPIO port 0 peripheral address\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// GPIO peripheral offsets\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// PIN_CNF fields\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"در GPIO 0 پایه ۲۱  به ستون اول ماتریس LED و پایه ۲۸ به ردیف اول متصل است.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"مثال را با:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Crateهای دسترسی جانبی\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"گزینه [`svd2rust`](https://crates.io/crates/svd2rust)  که  wrapperهای Rust \"\n\"عمدتاً ایمن را برای تجهیزات جانبی دارای memory-map از فایل‌های[CMSIS-SVD]\"\n\"(https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) تولید می‌کند.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"فایل‌های SVD (System View Description) در واقع فایل‌های XML هستند که معمولاً \"\n\"توسط فروشندگان تجهیزات ریزپردازنده ارائه می‌شوند که memory map دستگاه را \"\n\"توصیف می‌کنند.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"آنها بر اساس peripheral، register، field و value، با نام، توضیحات، آدرس و \"\n\"غیره سازماندهی می‌شوند.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"فایل‌های SVD اغلب دارای باگ و ناقص هستند، بنابراین پروژه‌های مختلفی وجود دارد \"\n\"که اشتباهات را اصلاح می‌کنند، جزئیات گمشده را اضافه می‌کنند و crateهای تولید \"\n\"شده را منتشر می‌کنند.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` جدول برداری را از جمله موارد دیگر ارائه می‌دهد.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"اگر`cargo install cargo-binutils` را انجام دهید، می‌توانید  `cargo objdump --\"\n\"bin pac -- -d --no-show-raw-insn` را اجرا کنید تا باینری حاصل را ببینید.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"HAL crates\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"این [crateهای HAL]‌(https://github.com/rust-embedded/wesome-embedded-rust#hal-\"\n\"implementation-crates) برای بسیاری از میکروکنترلرها بسته‌بندی‌هایی را در اطراف \"\n\"تجهیزات جانبی مختلف ارائه می‌دهند. اینها معمولاً ویژگی‌های [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal) را پیاده‌سازی می‌کنند.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Create HAL wrapper for GPIO port 0.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"بسیاری از HAL crateها برای انواعی از دستگاه های Cortex-M و RISC-V از جمله \"\n\"میکروکنترلرهای STM32، GD32، nRF، NXP، MSP430، AVR و PIC مختلف وجود دارد.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"Board support crates\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"پشتیبانی crateهای Boardها که برای راحتی بیشتر سطح پوششی بیشتری را برای یک \"\n\"board خاص فراهم می‌کنند.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"در این مورد crate پشتیبانی برد فقط نام‌های مفیدتر و مقداری مقداردهی اولیه را \"\n\"ارائه می‌دهد.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"این crate ممکن است شامل درایورهایی برای برخی از دستگاه‌های داخلی خارج از خود \"\n\"میکروکنترلر نیز باشد.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"ء `microbit-v2` شامل یک درایور ساده برای ماتریس LED است.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"یک تایپ state pattern\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"پین‌ها `Copy` یا `Clone` را اجرا نمی‌کنند، بنابراین فقط یک نمونه از هر کدام \"\n\"می‌تواند وجود داشته باشد. هنگامی که یک pin از ساختار پورت خارج می شود، هیچ کس \"\n\"دیگری نمی تواند آن را بگیرد.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"تغییر پیکربندی pin، نمونه pin ​​قدیمی را مصرف می‌کند، بنابراین نمی‌توانید پس از \"\n\"آن از pin قدیمی استفاده کنید.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"این type یک مقدار state را نشان می‌دهد که در آن قرار دارد: به عنوان مثال. در \"\n\"این مورد، وضعیت پیکربندی یک پین GPIO. این state machine را در type system \"\n\"رمزگذاری می‌کند و تضمین می‌کند که سعی نکنید از pin به روشی خاص استفاده کنید \"\n\"بدون اینکه ابتدا آن را به درستی پیکربندی کنید. state transition غیرمجاز در \"\n\"زمان کامپایل شناسایی می‌شود.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"می‌توانید `is_high` را در یک پین ورودی و `set_high` را در یک پایه خروجی \"\n\"فراخوانی کنید، اما برعکس امکان پذیر نیست.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"بسیاری از HAL crateها از این الگو پیروی می‌کنند.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"این crate ['embedded-hal'](https://crates.io/crates/embedded-hal) تعدادی \"\n\"ویژگی را ارائه می‌دهد که میکروکنترلرهای جانبی رایج را پوشش می‌دهد:\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"PWM\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"تایمرهای تاخیری\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"گذرگاه‌ها و دستگاه‌های I2C و SPI\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\"ویژگی‌های مشابه برای جریان‌های بایت (مانند UART)، گذرگاه‌های CAN و RNG و تقسیم \"\n\"شدن به [`embedded-io`](https://crates.io/crates/embedded-io)، [`embedded-\"\n\"can`](https ://crates.io/crates/embedded-can) و [`rand_core`](https://crates.\"\n\"io/crates/rand_core) به ترتیب.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"سپس crateهای دیگر [درایورها](https://github.com/rust-embedded/wesome-\"\n\"embedded-rust#driver-crates) را بر حسب این ویژگی‌ها پیاده‌سازی می‌کنند، به \"\n\"عنوان مثال. یک درایور شتاب سنج ممکن است به یک نمونه دستگاه I2C یا SPI نیاز \"\n\"داشته باشد.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\"این ویژگی‌ها با استفاده از وسایل جانبی(peripherals) پوشش می‌دهند، اما آنها را \"\n\"مقداردهی اولیه یا پیکربندی نمی‌کنند، زیرا مقداردهی اولیه و پیکربندی معمولاً به \"\n\"پلتفرم خاص بستگی دارد.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"پیاده‌سازی‌هایی برای بسیاری از میکروکنترلرها و همچنین پلتفرم‌های دیگری مانند \"\n\"لینوکس در Raspberry Pi وجود دارد.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"برای[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) \"\n\"نسخه‌های async از traitها را ارائه می دهد.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"مورد [`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) رویکرد \"\n\"دیگری را برای عدم مسدود کردن I/O ارائه می دهد که بر اساس [`nb`](https:// \"\n\"crates.io/crates/nb) crate است.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"یک [probe-rs](https://probe.rs/) یک مجموعه ابزار مفید برای اشکال زدایی \"\n\"جاسازی شده است، مانند OpenOCD است، اما بهتر یکپارچه شده است.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\"SWD (Serial Wire Debug) و JTAG از طریق پروب های CMSIS-DAP، ST-Link و J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB stub و Microsoft DAP (Debug Adapter Protocol) server\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"ادغام Cargo\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`buddy_system_allocator`یک third-party crate است که یک تخصیص‌دهنده buddy \"\n\"system را پیاده‌سازی می‌کند. crateهای دیگر در دسترس هستند یا می‌توانید نسخه \"\n\"مربوط به خود را بنویسید یا به تخصیص دهنده موجود خود متصل کنید.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) یک \"\n\"پروتکل استاندارد ARM از طریق USB است که برای یک دیباگر درون مداری جهت دسترسی \"\n\"به پورت  CoreSight Debug Access در انواع مختلف پردازنده‌های Arm Cortex  مورد \"\n\"استفاده قرار گرفته و این همان چیزی است که دیباگر داخلی در BBC micro:bit از \"\n\"آن استفاده می‌کند.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link طیفی از دیباگرهای درون مدار از ST Microelectronics است، J-Link \"\n\"محدوده ای از SEGGER است.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"پورت دسترسی Debug معمولا یا یک رابط JTAG 5 پین یا Serial Wire Debug 2 پین \"\n\"است.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs یک کتابخانه است که در صورت تمایل می‌توانید آن را در ابزارهای خود \"\n\"ادغام کنید.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[پروتکل آداپتور Debug مایکروسافت](https://microsoft.github.io/debug-adapter-\"\n\"protocol/) به VSCode و سایر IDE‌ها اجازه می‌دهد کدهای موجود در هر میکروکنترلر \"\n\"پشتیبانی‌شده را Debug کنند.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\"این cargo-embed یک باینری است که با استفاده از کتابخانه probe-rs ساخته شده \"\n\"است.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) مکانیزمی برای انتقال داده‌ها بین debug host  و \"\n\"target از طریق تعدادی بافر حلقه‌ای (ringbuffers) است.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"در یک ترمینال تحت  `src/bare-metal/microcontrollers/examples/`:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"در ترمینال دیگری در همان دایرکتوری:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"در gLinux یا Debian:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"در GDB، اجرا کنید:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"پروژه‌های دیگر\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"همراهی مبتنی بر وقفه بلادرنگ\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"مدیریت منابع مشترک، ارسال پیام، زمان‌بندی تسک (task scheduling)، صف تایمر \"\n\"(timer queue)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"اجرا کننده‌های `async` اولویت‌دار، تایمرها، شبکه، USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS متمرکز بر امنیت با برنامه‌ریزی پیشگیرانه و پشتیبانی از واحد حفاظت از \"\n\"حافظه\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"یک Microkernel RTOS از شرکت Oxide Computer با protection از حافظه، درایورهای \"\n\"غیرمجاز و IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"برخی از پلتفرم‌ها پیاده‌سازی `std` دارند، به عنوان مثال. [esp-idf](https://esp-\"\n\"rs.github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\"RTIC را می‌توان یک RTOS یا یک چارچوب همزمان (concurrency framework) در نظر \"\n\"گرفت.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"این شامل هیچ HAL نیست.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"از Cortex-M NVIC (کنترل‌کننده وقفه مجازی تودرتو-Nested Virtual Interrupt \"\n\"Controller) برای زمان‌بندی به جای یک هسته مناسب استفاده می‌کند.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"Cortex-M فقط.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"گوگل از TockOS در میکروکنترلر Haven برای کلیدهای امنیتی Titan استفاده می‌کند.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"در واقع FreeRTOS بیشتر به زبان C نوشته شده است، اما رابط‌های Rust برای نوشتن \"\n\"برنامه‌ها در این حالت وجود دارد.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"ما جهت را از قطب‌نمای I2C می‌خوانیم و خوانش‌ها را در یک پورت سریال ثبت می‌کنیم.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"پس از دیدن تمرین‌ها، می‌توانید به [راه حل‌ها] (solutions-morning.md) ارائه شده \"\n\"نگاه کنید.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"ما جهت را از قطب‌نمای I2C می خوانیم و خوانش‌ها را در یک پورت سریال ثبت می‌کنیم. \"\n\"اگر وقت دارید، سعی کنید آن را به نحوی روی LED‌ها نیز نمایش دهید یا به نوعی از \"\n\"دکمه‌ها استفاده کنید.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"نکته‌ها:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"مستندات [`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) و \"\n\"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) به همراه \"\n\"crateهای آن را بررسی کنید همانطور که [micro:bit hardware](https://tech.\"\n\"microbit.org/hardware/) را بررسی می‌کنید.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"واحد اندازه‌گیری اینرسی در قطعه LSM303AGR به bus داخلی I2C متصل است.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI نام دیگری برای I2C است، بنابراین دستگاه جانبی اصلی I2C TWIM نامیده می‌شود.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"درایور LSM303AGR به چیزی نیاز دارد که ویژگی `embedded_hal::i2c::I2c` را اجرا \"\n\"کند. ساختار[`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html)  این مورد را پیاده‌سازی می‌کند.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"شما یک ساختار ['microbit::Board'](https://docs.rs/microbit-v2/latest/\"\n\"microbit/struct.Board.html) با فیلدهایی برای پین‌ها و تجهیزات جانبی مختلف \"\n\"دارید.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"در صورت تمایل می‌توانید به [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) نیز نگاه کنید، اما برای این تمرین لازم نیست.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"این [الگوی تمرین](../../comprehensive-rust-exercises.zip) را دانلود کنید و \"\n\"فایل‌های زیر را در دایرکتوری `compass` جستجو کنید.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_ (نیاز به تغییر ندارد):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_ (نیازی به تغییر این نیست):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"مشاهده خروجی سریال در لینوکس با:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"یا در سیستم‌عامل Mac چیزی شبیه به (نام دستگاه ممکن است کمی متفاوت باشد):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"برای خروج از picocom از Ctrl+A و  Ctrl+Q استفاده کنید.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"تمرین صبحگاهی Bare Metal Rust\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([back to exercise](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configure serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Use the system timer as a delay provider.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"راه اندازی IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Set up display and timer.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"آماده.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Read compass data and log it to the serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"Application processors\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"تا اینجا در مورد میکروکنترلرهایی مانند سری Arm Cortex-M صحبت کردیم. حالا \"\n\"بیایید سعی کنیم چیزی برای Cortex-A بنویسیم. برای سادگی، ما فقط با بردQEMU's \"\n\"aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/virt.html) \"\n\"کار می‌کنیم.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"به طور کلی، میکروکنترلرها دارای MMU یا چندین سطح دسترسی (سطوح استثنا در \"\n\"پردازنده‌های Arm، حلقه‌ها در x86) نیستند، در حالی که پردازنده‌های برنامه دارای \"\n\"دسترسی هستند.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU از شبیه‌سازی ماشین‌های مختلف یا مدل‌های برد مختلف برای هر معماری پشتیبانی \"\n\"می کند. برد 'virt' با هیچ سخت‌افزار واقعی خاصی مطابقت ندارد، اما صرفا برای \"\n\"ماشین‌های مجازی طراحی شده است.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\"قبل از اینکه بتوانیم اجرای کد Rust را شروع کنیم، باید مقداری مقداردهی اولیه \"\n\"را انجام دهیم.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"این همان چیزی است که برای C وجود دارد: مقداردهی اولیه وضعیت پردازنده، صفر \"\n\"کردن BSS و تنظیم stack pointer.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"این BSS (نماد شروع بلوک، به دلایل تاریخی) بخشی از object file است که حاوی \"\n\"متغیرهای تخصیص یافته استاتیکی است که مقدار اولیه آنها صفر است. برای جلوگیری \"\n\"از اتلاف فضا روی صفر، آنها از تصویر حذف شده‌اند. کامپایلر فرض می‌کند که لودر \"\n\"از صفر کردن آنها مراقبت می‌کند.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"ممکن است BSS قبلاً صفر شده باشد، بسته به اینکه چگونه حافظه مقداردهی اولیه شده \"\n\"و تصویر بارگذاری شده است، اما برای اطمینان آن را صفر می‌کنیم.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"قبل از خواندن یا نوشتن هر حافظه باید MMU و cache را فعال کنیم. اگر این کار \"\n\"را نکنیم:\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"دسترسی‌های بدون تراز خطا خواهند داشت. ما کد Rust را برای هدف`aarch64-unknown-\"\n\"none` می‌سازیم که `+strict-align` را تنظیم می‌کند تا از ایجاد دسترسی‌های بدون \"\n\"تراز توسط کامپایلر جلوگیری کند، بنابراین در این مورد باید خوب باشد، اما \"\n\"لزوماً اینطور نیست.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"اگر در VM اجرا می‌شد، این کار می‌تواند منجر به مشکلات انسجام cache شود. مشکل \"\n\"این است که VM مستقیماً با حافظه cache غیرفعال شده به حافظه دسترسی پیدا می‌کند، \"\n\"در حالی که host دارای نام مستعار قابل cache برای همان حافظه است. حتی اگر \"\n\"cache به طور صریح به حافظه دسترسی نداشته باشد، دسترسی‌های گمانه‌زنی می‌تواند \"\n\"منجر به پر شدن حافظه cache شود، و پس از پاک شدن حافظه cache یا فعال کردن \"\n\"حافظه توسط VM، تغییرات از یک یا دیگری از بین می‌رود. (حافظه cache با آدرس \"\n\"فیزیکی کلید می‌خورد، نه VA یا IPA.)\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"برای سادگی، ما فقط از یک pagetable کدگذاری شده استفاده می کنیم (به`idmap.S` \"\n\"مراجعه کنید) که ۱ گیگابایت اول فضای آدرس را برای دستگاه‌ها، ۱ گیگابایت بعدی \"\n\"را برای DRAM و ۱ گیگابایت دیگر را برای دستگاه‌های بیشتر نگاشت می‌کند. این با \"\n\"چیدمان حافظه‌ای که QEMU استفاده می‌کند مطابقت دارد.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"ما همچنین exception vector (`vbar_el1`) را تنظیم کردیم که در ادامه بیشتر در \"\n\"مورد آن خواهیم دید.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"همه مثال‌ها امروز بعد از ظهر فرض می‌کنند که ما در سطح استثنا 1 (EL1) اجرا \"\n\"خواهیم کرد. اگر نیاز به اجرا در سطح استثنایی متفاوت دارید، باید `entry.S`را \"\n\"بر این اساس تغییر دهید.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"Inline assembly\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"گاهی اوقات برای انجام کارهایی که با کد Rust امکان پذیر نیست، باید از اسمبلی \"\n\"استفاده کنیم. به عنوان مثال، برای برقراری یک HVC (hypervisor call) نایز است \"\n\"که به firmware بگویید سیستم را خاموش کند:\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(اگر واقعاُ می‌خواهید این کار را انجام دهید، از crate مربوطه [`smccc`](https://\"\n\"crates.io/crates/smccc) استفاده کنید که دارای بسته‌بندی(wrapper) برای همه این \"\n\"عملکردها است.)\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"‏ PSCI یک رابط هدایت‌گر Arm Power State است که مجموعه‌ای استاندارد از توابع \"\n\"برای مدیریت وضعیت‌های power در سیستم و CPU بوده، از جمله موارد دیگری از این \"\n\"مورد توسط میان‌افزار EL3 و hypervisor در بسیاری از سیستم‌ها پیاده سازی شده است.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"یک  `0 => _` syntax  به این معنی است که رجیستر را قبل از اجرای کد اسمبلی \"\n\"درون خطی به 0 مقداردهی کنید و پس از آن محتوای آن را نادیده بگیرید. ما باید \"\n\"از `inout` به جای `in` استفاده کنیم زیرا این فراخوانی به طور بالقوه می‌تواند \"\n\"محتویات رجیسترها را مخدوش کند.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"این تابع `main` باید به صورت`#[no_mangle]` و  `extern \\\"C\\\"` باشد زیرا از \"\n\"نقطه ورودی (entry point) ما در `entry.S` فراخوانی می‌شود.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"‏ `_x0`–`_x3` مقادیر رجیسترهای `x0`–`x3` هستند که به طور معمول توسط \"\n\"bootloader برای ارسال چیزهایی مانند اشاره‌گر به device tree استفاده می‌شود. \"\n\"طبق قرارداد فراخوانی استاندارد aarch64 (که همان چیزی است که `extern \\\"C\\\"` \"\n\"برای استفاده مشخص می‌کند)، رجیسترهای `x0`–`x7` برای ۸ آرگومان اول ارسال شده \"\n\"به یک تابع استفاده می‌شوند، بنابراین `entry.S` این کار را انجام نمی‌دهد. لازم \"\n\"نیست کار خاصی انجام دهید، جز اینکه مطمئن شوید که این مورد رجیسترها را تغییر \"\n\"نمی‌دهد.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"مثال را در QEMU با `make qemu_psci` در زیر `src/bare-metal/aps/examples` \"\n\"اجرا کنید.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"دسترسی به حافظه فرار برای MMIO\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"از `pointer::read_volatile` و `pointer::write_volatile` استفاده کنید.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"هرگز reference‌ای را نگه ندارید.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"‏ `addr_of!` به شما امکان می‌دهد بدون ایجاد یک مرجع میانی، فیلدهایی از \"\n\"ساختارها را دریافت کنید.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"دسترسی فرار (Volatile access): عملیات خواندن یا نوشتن ممکن است عوارض جانبی \"\n\"داشته باشد، بنابراین از کامپایلر یا سخت‌افزار از مرتب‌سازی مجدد، کپی‌کردن یا \"\n\"حذف آنها جلوگیری کنید.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"معمولاً اگر بنویسید و سپس بخوانید، به عنوان مثال. از طریق یک reference، \"\n\"کامپایلر ممکن است فرض کند که مقدار خوانده شده همان مقداری است که نوشته شده \"\n\"است و در واقع خواندن memory را سخت‌تر نکند.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"برخی از crateهای موجود برای دسترسی فَرار(volatile access) به سخت‌افزار دارای \"\n\"referenceهایی هستند، اما این همیشه درست نیست. هر زمان که یک reference وجود \"\n\"داشته باشد، کامپایلر ممکن است انتخاب کند که reference آن را لغو کند.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"از ماکرو `addr_of!` برای دریافت اشاره‌گرهای struct field از یک اشاره‌گر به \"\n\"ساختار استفاده کنید.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"بیایید یک درایور UART بنویسیم\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"این ماشین QEMU 'virt' یک  [PL011](https://developer.arm.com/documentation/\"\n\"ddi0183/g) به‌عنوان UART دارد، پس بیایید یک درایور برای آن بنویسیم.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Minimal driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Writes a single byte to the UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Wait until there is room in the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Write to the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Wait until the UART is no longer busy.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"توجه داشته باشید که `Uart::new` ناامن یا unsafe است در حالی که متد‌های دیگر \"\n\"ایمن هستند. این به‌خاطر این است که تا زمانی که تماس گیرنده `Uart::new` تضمین \"\n\"کند که الزامات ایمنی آن برآورده شده است (یعنی فقط یک نمونه از درایور برای یک \"\n\"UART مشخص وجود دارد و هیچ چیز دیگری نام مستعار فضای آدرس آن را ندارد)، پس \"\n\"همیشه می‌توان `write_byte` را بعداً فراخوانی کرد زیرا می‌توانیم پیش‌شرط‌های لازم \"\n\"را فرض کنیم.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"ما می‌توانستیم این کار را به صورت دیگری انجام دهیم ( ساخت `new` را ایمن کنیم، \"\n\"اما `write_byte` را ناامن کنیم)، اما استفاده از آن بسیار راحت‌تر خواهد بود، \"\n\"زیرا هر مکانی که `write_byte` را صدا می‌زند باید در مورد ایمنی یا safety \"\n\"استدلال کند.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"این یک الگوی رایج برای نوشتن بسته‌های ایمن کد ناامن است: انتقال بار اثبات \"\n\"سلامت عملکردی از تعداد زیادی مکان به تعداد کمتری مکان.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"‏ traitهای بیشتر\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"ما ویژگی `Debug` را استخراج کردیم. اجرای چند ویژگی دیگر نیز مفید خواهد بود.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"پیاده‌سازی `Write`به ما امکان می‌دهد از ماکروهای `write!` و `writeln!` با تایپ \"\n\"`Uart` خود استفاده کنیم.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"مثال را در QEMU با `make qemu_minimal` در زیر `src/bare-metal/aps/examples` \"\n\"اجرا کنید.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"یک درایور UART بهتر\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"‏ PL011 در واقع [مجموعه رجیسترهای زیادی دارد](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers) و اضافه کردن \"\n\"offset برای ساختن اشاره‌گرها برای دسترسی به آنها مستعدخطا است و حتی فرآبند \"\n\"خواندن را می‌تواند پیچیده کند، برخی از آن فیلدها از نوع bit هستند که دسترسی \"\n\"به آنها به روشی ساختاریافته خوب است.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"افست\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"نام رجیستر\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"عرض\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"همچنین برخی از ID register هایی وجود دارد که برای اختصار حذف شده‌اند.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"این crate برای [`bitflags`](https://crates.io/crates/bitflags) جهت کار با \"\n\"bitflags مفید است.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Flags from the UART flag register.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Data set ready.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Data carrier detect.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART busy transmitting data.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// Receive FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// Transmit FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// Receive FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// Transmit FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Ring indicator.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"ماکرو `bitflags!` یک نوع جدید چیزی مانند`Flags(u16)` را به همراه تعدادی \"\n\"پیاده‌سازی متد برای دریافت و تنظیم flagها ایجاد می‌کند.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"رجیستر چندگانه\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"ما می‌توانیم از یک ساختار برای نمایش طرح memory layout یک رجیستر UART استفاده \"\n\"کنیم.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"‏ [`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) به کامپایلر می گوید که فیلدهای ساختاری را به ترتیب قرار دهد \"\n\"و این پیروی از قوانین مشابه با زبان C است. این کار را برای ساختار ما برای \"\n\"داشتن یک طرح قابل پیش‌بینی ضروری است، زیرا نمایش پیش‌فرض Rust به کامپایلر \"\n\"اجازه می دهد تا (از جمله موارد دیگر) فیلدها را به هر نحوی که صلاح بداند مرتب \"\n\"کند.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"حال بیایید از ساختار جدید `Registers` در درایور خود استفاده کنیم.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\n\"\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Check for error conditions in bits 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"به استفاده از `addr_of!` / `addr_of_mut!` برای دریافت pointerها به فیلدهای \"\n\"جداگانه بدون ایجاد یک reference میانی توجه کنید، که ممکن است نادرست باشد.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"با استفاده از آن\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"بیایید یک برنامه کوچک با استفاده از درایور خود بنویسیم تا روی کنسول سریال \"\n\"بنویسیم و بایت‌های ورودی را echo کنیم.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Base address of the primary PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"Bye!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"همانطور که در مثال [inline assembly]‌(../inline-assembly.md)، این تابع `main` \"\n\"از کد نقطه ورودی ما در `entry.S` فراخوانی می‌شود. برای جزئیات بیشتر، \"\n\"یادداشت‌های سخنرانی‌ها را در آنجا ببینید.\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"مثال را در QEMU با `make qemu` در زیر `src/bare-metal/aps/examples` اجرا \"\n\"کنید.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"خوب است که بتوانید از ماکروهای logging از crate [`log`](https://crates.io/\"\n\"crates/log) استفاده کنید. ما می‌توانیم این کار را با اجرای ویژگی `Log` انجام \"\n\"دهیم.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Initialises UART logger.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"باز کردن در`log` ایمن است زیرا `LOGGER` را قبل از فراخوانی `set_logger` \"\n\"مقداردهی اولیه می‌کنیم.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"قبل از استفاده از لاگر باید مقداردهی اولیه کنیم.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"توجه داشته باشید که panic handler ما اکنون می تواند جزئیات panic را ثبت کند.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"مثال را در QEMU با `make qemu_logger` در زیر `src/bare-metal/aps/examples` \"\n\"اجرا کنید.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"‏ AArch64 یک جدول برداری استثنایی با ۱۶ ورودی، برای ۴ نوع استثنا \"\n\"(synchronous، IRQ، FIQ، SError) از ۴ حالت (Ecurrent EL with SP0, current EL \"\n\"with SPx, lower EL using AArch64, lower EL using AArch32) تعریف می‌کند. ما \"\n\"این کار را در اسمبلی پیاده‌سازی می‌کنیم تا رجیسترهای فرار (volatile) را قبل از \"\n\"فراخوانی Rust در stack ذخیره کنیم:\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\"‏ EL سطح استثنا است. تمام نمونه‌های ما امروز بعدازظهر در EL1 اجرا می‌شوند.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"برای سادگی، ما بین SP0 و SPx برای استثناهای EL فعلی، یا بین AArch32 و \"\n\"AArch64 برای استثناهای پایین EL تمایز قائل نمی‌شویم.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"برای این مثال، ما فقط exception را log کرده و سپس خاموش می‌کنیم، زیرا انتظار \"\n\"نداریم هیچ یک از آنها واقعاً اتفاق بیفتد.\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"می‌توانیم به handlerهای exception و context اجرای اصلی‌مان کمابیش مانند \"\n\"threadهای مختلف فکر کنیم. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) آنچه را که می‌توانیم بین آنها به اشتراک بگذاریم، دقیقاً مانند threadها، \"\n\"کنترل می‌کنند. برای مثال، اگر می‌خواهیم مقداری را بین handlerهای exception و \"\n\"بقیه برنامه به اشتراک بگذاریم که بیشتر در مورد `Send` است اما مربوط به \"\n\"`Sync` نیست، باید آن را در چیزی مانند`Mutex` محصور کرده و یک استاتیک در آن \"\n\"قرار دهیم.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot without the C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"پشتیبانی از x86، aarch64 و RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"به جای اینکه خود درایورهای زیادی داشته باشد، به LinuxBoot متکی است.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"راه‌اندازی، درایور UART و bootloader ساده، JTAG، سطوح exception، مدیریت \"\n\"exception و page tableها\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"برخی ابهامات در مورد نگهداری کَش و راه‌اندازی اولیه در Rust، لزوماً مثال خوبی \"\n\"برای کپی کردن برای کد production نیست.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"تجزیه‌و‌تحلیل استاتیک برای تعیین حداکثر استفاده از stack.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"آموزش سیستم عامل RaspberryPi، کد Rust را قبل از فعال شدن MMU و حافظه کَش اجرا \"\n\"می‌کند. این کار memory را می‌خواند و روی آن می‌نویسد (به عنوان مثال stack). \"\n\"بااین‌حال:\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"بدون MMU و حافظه کَش، دسترسی‌های بدون تراز دچار خطا خواهند شد.این‌ها با \"\n\"`aarch64-unknown-none` ساخته می‌شود که `+strict-align` را تنظیم کنند تا از \"\n\"ایجاد دسترسی‌های غیرهمتراز توسط کامپایلر جلوگیری کند، بنابراین همیشه باید \"\n\"صحیح باشد، اما لزوماً اینطور نیست.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"اگر در VM اجرا می‌شد، این می‌تواند منجر به مشکلات انسجام کَش (cache coherency) \"\n\"شود. مشکل این است که ماشین مجازی مستقیماً با حافظه کَش غیرفعال شده به حافظه \"\n\"دسترسی پیدا می‌کند، درحالی‌که host دارای alias قابل کَش برای همان حافظه است. \"\n\"حتی اگر host به طور صریح به حافظه دسترسی نداشته باشد، دسترسی‌های موقتی \"\n\"می‌تواند منجر به پر شدن حافظه کَش شود و سپس تغییرات از یکی پس از دیگری از بین \"\n\"می‌رود. باز هم در این مورد خاص درست است (مستقیماً روی سخت‌افزار بدون hypervisor \"\n\"اجرا می‌شود)، اما به‌طورکلی الگوی خوبی نیست.\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"جعبه‌های (crates) کاربردی\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"ما به چند crate می‌پردازیم که برخی از مشکلات رایج در برنامه‌نویسی bare-metal \"\n\"را حل می‌کند.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"این crate [`zerocopy`](https://docs.rs/zerocopy/) (از Fuchsia) صفات و \"\n\"ماکروهایی را برای تبدیل ایمن بین دنباله‌های بایت و انواع دیگر فراهم می‌کند.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"این برای MMIO مناسب نیست (زیرا از خواندن و نوشتن فرار یا volatile استفاده \"\n\"نمی‌کند)، اما می‌تواند برای کار با ساختارهای مشترک با سخت افزار مفید باشد. \"\n\"توسط DMA، یا از طریق برخی از رابط‌های خارجی ارسال می‌شود.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"‏ `FromBytes` را می‌توان برای انواعی که هر الگوی بایتی برای آنها معتبر است \"\n\"پیاده‌سازی کرد و بنابراین می‌توان با خیال راحت از یک دنباله بایت‌های نامعتبر \"\n\"تبدیل کرد.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"تلاش برای استخراج `FromBytes` برای این تایپ‌ها ناموفق خواهد بود، زیرا \"\n\"`RequestType` از همه مقادیر ممکن u32 به عنوان متمایزکننده استفاده نمی‌کند، \"\n\"بنابراین همه الگوهای بایت معتبر نیستند.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` دارای تایپ‌های برای اعداد اولیه مطلع از byte-order است.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"مثال را با `cargo run` در `src/bare-metal/useful-crates/zerocopy-example/\"\n\"`اجرا کنید. (به دلیل وابستگی به crate در Playground اجرا نمی‌شود.)\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"این crate [`aarch64-paging`](https://crates.io/crates/aarch64-paging) به شما \"\n\"امکان می‌دهد page tableها را مطابق با معماری سیستم حافظه‌مجازی AArch64 ایجاد \"\n\"کنید.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Create a new page table with identity mapping.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"// Map a 2 MiB region of memory as read-only.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Set `TTBR0_EL1` to activate the page table.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"در حال حاضر فقط از EL1 پشتیبانی می‌کند، اما پشتیبانی از سایر سطوح استثنا باید \"\n\"ساده باشد.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"این مورد در Android برای [Protected VM Firmware]‌(https://cs.android.com/\"\n\"android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/) استفاده می‌شود.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"هیچ راه آسانی برای اجرای این مثال وجود ندارد، زیرا باید روی سخت‌افزار واقعی \"\n\"یا تحت QEMU اجرا شود.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"‏ ['buddy_system_allocator'](https://crates.io/crates/buddy_system_allocator) \"\n\"یک third-party crate است که یک buddy system allocator را پیاده‌سازی می‌کند. \"\n\"می‌توان آن را هم برای ['LockedHeap'](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"در پیاده‌سازی [`GlobalAlloc`]‌(https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) استفاده کرد. بنابراین می‌توانید از crate استاندارد `alloc` \"\n\"(همانطور که [قبل از](../alloc.md) دیدیم) یا برای تخصیص فضای آدرس دیگر \"\n\"استفاده کنید. به عنوان مثال، ممکن است بخواهیم فضای MMIO را برای PCI BARها \"\n\"اختصاص دهیم:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"‏ PCI BAR‌ها همیشه دارای تراز برابر با اندازه خود هستند.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"مثال را با `cargo run` در `src/bare-metal/useful-crates/allocator-example/` \"\n\"اجرا کنید. (به دلیل وابستگی به crate در Playground اجرا نمی‌شود.)\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"گاهی اوقات شما چیزی را می‌خواهید که بتوان آن را مانند Vec تغییر اندازه داد، \"\n\"اما بدون heap allocation که [`tinyvec`]  (https://crates.io/crates/tinyvec) \"\n\"این را فراهم می‌کند: یک برداری که توسط یک آرایه یا برش پشتیبانی می‌شود که \"\n\"می‌تواند به‌صورت ایستا allocate داده شود یا روی stack که تعداد عناصر استفاده \"\n\"شده را ردیابی می‌کند و اگر سعی کنید بیشتر از آنچه که اختصاص‌داده‌شده را استفاده \"\n\"کنید panic می‌کند.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"‏ `tinyvec` نیاز دارد که تایپ عنصر `Default` را برای مقداردهی اولیه اجرا کند.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"‏ Rust Playground شامل `tinyvec` می‌شود، بنابراین این مثال به‌خوبی به صورت \"\n\"داخلی اجرا می‌شود.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"‏ `std::sync::Mutex` و دیگر موارد اولیه همگام‌سازی از `std::sync` در `core` یا \"\n\"`alloc` موجود نیستند. چگونه می‌توانیم هماهنگ‌سازی یا تغییرپذیری داخلی، مانند \"\n\"اشتراک‌گذاری وضعیت بین CPU‌های مختلف را مدیریت کنیم؟\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"این crate [`spin`](https://crates.io/crates/spin) معادل‌های مبتنی بر \"\n\"spinlock، بسیاری از این موارد اولیه را ارائه می‌کند.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"اگر در handlerهای وقفه قفل می‌کنید مراقب باشید که از بن بست(deadlock) جلوگیری \"\n\"کنید.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"‏ `spin` همچنین دارای اجرای  ticket lock mutex است. معادل‌های `RwLock`, \"\n\"`Barrier` و `Once` از `std::sync`. و `Lazy` برای مقداردهی اولیه lazy.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"این crate ['once_cell'](https://crates.io/crates/once_cell) همچنین دارای \"\n\"تایپ‌های مفیدی برای مقداردهی اولیه دیرهنگام با رویکرد کمی متفاوت به `spin::\"\n\"once::Once` است.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"‏ Playground Rust شامل `spin` است، بنابراین این مثال به خوبی به صورت داخلی \"\n\"اجرا می‌شود.\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"برای ساختن یک bare-metal Rust binary در AOSP، باید از یک `rust_ffi_static` \"\n\"Soong برای ساخت کد Rust خود استفاده کنید، سپس از یک `cc_binary` با یک linker \"\n\"script برای تولید binary استفاده کرده و سپس از یک `raw_binary` برای تبدیل \"\n\"ELF به یک raw binary آماده اجرا استفاده کنید.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/\"\n\"libs/libvmbase/) library provides a linker script and useful defaults for \"\n\"the build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"برای ماشین‌های مجازی که تحت crosvm در aarch64 اجرا می‌شوند، کتابخانه [vmbase]\"\n\"(https://android.googlesource.com/platform/packages/modules/Virtualization/+/\"\n\"refs/heads/master/vmbase/) یک اسکریپت linker و پیش‌فرض‌های مفیدی را ارائه \"\n\"می‌کند. برای این قوانین ساخت، همراه با یک نقطه ورودی، UART console logging و \"\n\"موارد دیگر.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"این ماکرو `main!`عملکرد اصلی شما را مشخص می‌کند تا از نقطه ورودی `vmbase` \"\n\"فراخوانی شود.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"نقطه ورودی `vmbase` مقدار دهی اولیه کنسول را کنترل می‌کند و در صورت بازگشت \"\n\"main function، یک PSCI_SYSTEM_OFF برای خاموش کردن VM صادر می‌کند.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"ما یک درایور برای دستگاه PL031 real-time clock  خواهیم نوشت.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"پس از بررسی تمرین‌ها، می‌توانید به [راه‌حل ها](solutions-afternoon.md) ارائه \"\n\"شده نگاهی بیندازید.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"RTC driver\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"ماشین QEMU aarch64 virt دارای یک ساعت بلادرنگ [PL031](https://developer.arm.\"\n\"com/documentation/ddi0224/c) در 0x9010000 است. برای این تمرین باید یک درایور \"\n\"برای آن بنویسید.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"از آن برای چاپ زمان جاری در کنسول سریال استفاده کنید. می‌توانید از crate \"\n\"[`chrono`](https://crates.io/crates/chrono) برای قالب‌بندی date/time استفاده \"\n\"کنید.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"از match register و raw interrupt status استفاده کنید تا تا زمان معینی منتظر \"\n\"بمانید، به عنوان مثال. ۳ ثانیه در آینده نزدیک (Call [`core::hint::spin_loop`]\"\n\"(https://doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"‏ _افزونه‌ها اگر زمان دارید:_ وقفه ایجاد شده توسط تطبیق RTC را فعال کرده و آن \"\n\"را مدیریت کنید. می‌توانید از درایور ارائه شده در crate [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) برای پیکربندی Arm Generic Interrupt Controller استفاده \"\n\"کنید.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"از وقفه RTC استفاده کنید که به عنوان `IntId::spi(2)` به GIC متصل است.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"هنگامی که وقفه (interrupt) فعال شد، می‌توانید هسته را از طریق `arm_gic::\"\n\"wfi()` به حالت Sleep درآورید، که باعث می‌شود هسته تا زمانی که وقفه دریافت کند \"\n\"به خواب برود.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"دانلود از [exercise template](../../comprehensive-rust-exercises.zip) و \"\n\"فایل‌های زیر را در دایرکتوری `rtc` جستجو کنید.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"‏ _src/exceptions.rs_ (شما فقط باید این را برای بخش سوم تمرین تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"‏ _src/logger.rs_ (نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_ (نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_ (نیازی نیست این مورد رو تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_ ( نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_ ( نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_ (نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_ (نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_ (نیازی نیست این مورد را تغییر دهید):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"کد را در QEMU با  `make qemu` اجرا کنید.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"بعدازظهربا Bare Metal Rust\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([back to exercise](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Base addresses of the GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Base address of the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// The IRQ used by the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Wait for 3 seconds, without interrupts.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Waiting for {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Finished waiting\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Wait another 3 seconds for an interrupt.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Data register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Match register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Load register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Control register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Interrupt Mask Set or Clear register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Raw Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Masked Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Interrupt Clear Register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Driver for a PL031 real-time clock.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Reads the current RTC value.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Clears a pending interrupt, if any.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"به مبحث Concurrency در Rust خوش‌آمدید\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"زبان Rust به طور کامل از concurrency در سطح thread های سیستم‌عامل با استفاده \"\n\"از mutex ها و channel ها پشتیبانی می‌کند.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"سیستم Rust راست نقش مهمی در تبدیل بسیاری از باگ‌های concurrency به باگ‌های \"\n\"زمان کامپایل ایفا می‌کند. این مورد اغلب به‌عنوان هم‌زمانی بی‌پروا ( _fearless \"\n\"concurrency_) شناخته می‌شود زیرا می‌توانید به کامپایلر برای اطمینان از صحت در \"\n\"زمان اجرا (runtime) اعتماد کنید.\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"با احتساب استراحت‌های ۱۰ دقیقه‌ای، این جلسه باید حدود ۳ ساعت و ۲۰ دقیقه طول \"\n\"بکشد. شامل موارد زیر است:\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\"‏ Rust به ما اجازه می‌دهد تا به ابزارهای همزمانی سیستم عامل دسترسی داشته \"\n\"باشیم: thread‌ها، سازوکارهای همگام‌سازی و غیره.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\"این سیستم تایپ به ما ایمنی لازم برای concurrency بدون هیچ ویژگی خاصی می‌دهد.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\" همان ابزارهایی که به ما در دسترسی concurrent در یک thread واحد کمک می‌کنند \"\n\"(مانند یک تابع فراخوانی شده که ممکن است یک آرگومان را تغییر دهد یا مراجعی به \"\n\"آن را برای خواندن بعد ذخیره کند) ما را از مشکلات multi-threading نجات می‌دهند.\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۳۰ دقیقه طول بکشد و شامل موارد زیر است:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"threadهای Rust مانند threadها در زبان‌های دیگر کار می‌کنند:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"شمارنده thread: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Main thread: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Spawning new threads does not automatically delay program termination at the \"\n\"end of `main`.\"\nmsgstr \"\"\n\"ایجاد threadهای جدید به طور خودکار خاتمه برنامه را تا پایان `main` به تاخیر \"\n\"نمی‌اندازد.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Thread panicها مستقل از یکدیگر هستند.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"‏Panicها می‌تواند payloadای را حمل کند که می‌توان آن را با «downcast_ref» باز \"\n\"کرد.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\"‏Rust thread API ها خیلی متفاوت از موارد دیگر به نظر نمی‌رسند. که C++ یکی از \"\n\"آن‌ها است.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"مثال را اجرا کنید.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\"زمان‌بندی 5 میلی‌ثانیه به اندازه‌ای سست هستند که thread اصلی و spawned threadها \"\n\"عمدتاً همگام می‌مانند.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\"توجه داشته باشید که برنامه قبل از اینکه thread spawned به مقدار ۱۰ برسد به \"\n\"پایان می‌رسد!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\"این به خاطر است که انتهای main برنامه است و spawned threadها ایجاد شده باعث \"\n\"تداوم آن نمی‌شوند.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"در مقابسه با pthreads/C++ std::thread/boost::thread اگر مطلوب باشد.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"چقدر باید صبر کنیم تا یک spawned thread تکمیل شود؟\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. به سند نگاه کنید.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\"`JoinHandle` دارد [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) متد آن بلاک‌ها.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"از «let handle = thread::spawn(...)» و بعد از «handle.join()» استفاده کنید \"\n\"تا منتظر بمانید تا thread تمام شود و شمارنده برنامه برابر با مقدار ۱۰ باشد.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"حالا اگر بخواهیم مقداری را برگردانیم چه؟\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"دوباره به اسناد نگاه کنید:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"به کمک`Result` از «handle.join()» برای دسترسی به مقدار برگشتی استفاده کنید.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"خوب، مورد دیگر چطور؟\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\"فعال‌سازی یک panic در یک thread. توجه شود که این مورد panic `main` نیست.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"دسترسی به این panic payload. بهترین زمان برای پرداخت به این موضوع است [`Any`]\"\n\"(https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\"اکنون می‌توانیم مقادیر را از رشته‌ها برگردانیم! در مورد گرفتن ورودی‌ها چطور؟\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"چیزی را از طریق reference در بسته‌بندی thread  ثبت کنید.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"یک پیغام خطا نشان می‌دهد که باید آن را جابجا کنیم.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\"آن را به داخل منتقل کنید، درنتیجه ما می توانیم محاسبه کنیم و سپس یک مقدار \"\n\"مشتق شده را برگردانیم.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"اگر بخواهیم قرض (borrow) بگیریم چطور؟\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\" تابع ‏Main در هنگام بازگشت threadهای فرزند را از بین می‌برد، اما تابع دیگری \"\n\"return می‌شود و آنها را در حال اجرا می‌گذارد.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\"این کار می‌تواند منجر به stack استفاده پس از return شود که memory safety را \"\n\"نقض می‌کند!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"چگونه از آن جلوگیری کنیم؟ صفحه بعدی را ببینید.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"‏thread‌های معمولی نمی‌توانند از محیط خود قرض (borrow) بگیرند:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"به‌هرحال, می‌توانید برای این مورد [scoped thread](https://doc.rust-lang.org/\"\n\"std/thread/fn.scope.html) ببینید:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"دلیل آن این است که وقتی تابع «thread::scope» کامل می‌شود، اتصال همه thread‌ها \"\n\"تضمین می‌شود، بنابراین می‌توانند داده‌های قرضی را برگردانند.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"قوانین عادی قرض‌گیری Rust اعمال می‌شود: شما می‌توانید به‌صورت تغییرپذیر(mutable) \"\n\"با یک thread یا غیرقابل تغییر (immutable) با هر تعداد thread قرض (borrow) \"\n\"بگیرید.\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"این بخش باید حدود ۲۰ دقیقه طول بکشد. این شامل:\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"کانال‌های Rust دارای دو بخش هستند: `Sender<T>` و `Receiver<T>`. این دو بخش از \"\n\"طریق channel به هم متصل می‌شوند، اما شما فقط نقاط پایانی (end-points) را \"\n\"می‌بینید.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"دریافت شد: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"شما یک کانال نامحدود و ناهمزمان با `mpsc::channel()` دریافت می کنید:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: sent Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: انجام شد\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"با کانال‌های bounded (synchronous)، فرآیند `send` می‌تواند thread فعلی را \"\n\"مسدود کند:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"فراخوانی  `send` تا زمانی که فضای کافی در کانال برای پیام جدید وجود داشته \"\n\"باشد، thread کنونی را مسدود می‌کند. اگر کسی از کانال چیزی نخواند آنگاه thread \"\n\"را می‌توان به طور نامحدود مسدود کرد.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"اگر کانال بسته شود، تماس برای `send` با یک error قطع می‌شود (به همین \"\n\"دلیل`Result` را برمی‌گرداند. هنگامی که گیرنده از بین می رود یک کانال بسته \"\n\"می‌شود.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\"یک کانال محدود ( bounded channel) با اندازه صفر را \\\"کانال ملاقات\\\" یا \"\n\"\\\"rendezvous channel\\\" می‌‌نامند. هر ارسال، thread فعلی را مسدود می‌کند تا \"\n\"زمانی که رشته دیگری `recv` را فراخواند.\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"ارسال\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"همگام‌سازی\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"‏ Rust چگونه می‌داند که دسترسی مشترک در سراسر threadها را ممنوع می‌کند؟ پاسخ در \"\n\"دو trait است:\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"‏[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): در صورتی که \"\n\"جابجایی `T` در امتداد thread boundary ایمن باشد، تایپ `T` از جنس `Send` است.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"‏[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): در صورتی که \"\n\"جابجایی یک `&T` در سراسر یک thread boundary ایمن باشد، یک تایپ `T` از جنس \"\n\"`Sync`  است.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"‏`Send` و `Sync` [ویژگی‌های ناامن] هستند (../../unsafe-rust/unsafe-traits.md). \"\n\"کامپایلر به‌طور خودکار آنها را برای تایپ‌های شما مشتق می‌کند تا زمانی که فقط \"\n\"دارای انواع `Send` و `Sync` باشند. شما همچنین می توانید آنها را به صورت دستی \"\n\"پیاده سازی کنید به‌خصوص زمانی که می دانید مقدار آن معتبر است.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"می‌توان این traitها را به عنوان نشانگرهایی در نظر گرفت که نوعی ویژگی thread-\"\n\"safety خاصی را دارد.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"آنها را می‌توان در محدودیت‌های generic به عنوان  trait عادی استفاده کرد.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"اگر انتقال مقدار `T` به thread دیگری امن باشد، تایپ `T` در [`Send`](https://\"\n\"doc.rust-lang.org/std/marker/trait.Send.html) است.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"تأثیر انتقال مالکیت (moving ownership) به یک thread دیگر این است که \"\n\"_نابودگرها_ ( _destructors_ ) در آن thread اجرا می شوند. بنابراین سوال این \"\n\"است که چه زمانی می‌توانید یک مقدار را در یک thread تخصیص دهید و آن را در \"\n\"thread دیگر توزیع کنید.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"به عنوان مثال، اتصال به کتابخانه SQLite فقط باید از یک thread قابل دسترسی \"\n\"باشد.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"یک تایپ `T` در واقع نوعی [`Sync`](https://doc.rust-lang.org/std/marker/trait.\"\n\"Sync.html) است، اگر در دسترسی به یک  مقدار`T` از طریق چندین رشته به طور \"\n\"همزمان امن باشد.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"به طور دقیق‌تر، تعریف این طور است:\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` یک نوع `Sync` فقط و فقط زمانی که `&T` یک نوع `Send` باشد\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"این عبارت به طور کلی روشی مختصر برای گفتن این است که اگر یک تایپ برای \"\n\"استفاده مشترک امن باشد، انتقال ارجاعات (pass references) آن به threadها نیز \"\n\"امن است.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"این به خاطراست که اگر یک تایپ از جنس Sync باشد، به این معنی است که می‌توان آن \"\n\"را در چند thread بدون خطر در مورد وضعیت رقابتی داده یا سایر مشکلات Sync به \"\n\"اشتراک گذاشت، بنابراین انتقال آن به thread‌ای دیگر امن است. ارجاع به تایپ  \"\n\"نیز برای انتقال به threadای دیگر ایمن است، زیرا داده‌هایی که به آن ارجاع \"\n\"می‌دهد می‌توانند از هر threadای با خیال راحت دسترسی داشته باشند.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"اکثر انواعی که با آنها روبرو می شوید `Send + Sync` هستند:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\"‏`Arc<T>`:به طور صریح از طریق تعداد شمارش atomic reference  با thread-safe.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`: از 1.72.0.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\"‏`AtomicBool`، `AtomicU8`، ...: از دستورالعمل های atomic ویژه استفاده می‌کند.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"در صورت وجود پارامترهای نوع، تایپ‌های generic معمولاً از نوع  `Send + Sync`  \"\n\"هستند.`Send + Sync`.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"این تایپ‌ها را می‌توان به رشته‌های دیگر منتقل کرد، اما آنها ایمن نیستند. به طور \"\n\"معمول به دلیل تغییرپذیری داخلی(interior mutability):\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are safe to access (via shared references) from multiple \"\n\"threads, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"این تایپ‌ها از نظر thread ایمن هستند، اما نمی توان آنها را به thread دیگری \"\n\"منتقل کرد:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them. However, an already-locked mutex can have its \"\n\"guarded variable read by any thread with which the guard is shared.\"\nmsgstr \"\"\n\"‏«MutexGuard<T: Sync>»: از ابتدایی‌های سطح سیستم‌عامل استفاده می‌کند که باید در \"\n\"threadای که آنها را ایجاد کرده است، توزیع شوند.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"این تایپ‌ها از نظر thread ایمن نیستند و نمی توان آنها را به رشته های دیگر \"\n\"منتقل کرد:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"‏\\\"Rc<T>\\\": هر \\\"Rc<T>\\\" دارای یک ارجاع به \\\"RcBox<T>\\\" است که حاوی تعداد \"\n\"مراجع غیر atomic است.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"درمورد `*const T`, `*mut T`: زبان فرض Rust می کند که اشاره گرهای خام ممکن \"\n\"است ملاحظات همزمانی خاصی داشته باشند.\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"‏[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) اجازه می‌دهد \"\n\"تا دسترسی read-only مشترک از طریق `Arc::clone` صورت پذیرد:\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"‏\\\"Arc\\\" مخفف \\\"Atomic Reference Counted\\\" است، یک نسخه ایمن از `Rc` که از \"\n\"عملیات atomic استفاده می‌کند.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"‏\\\"Arc<T>\\\" به طور کلی \\\"Clone\\\" را خواه `T` انجام دهد یا نه، پیاده سازی می \"\n\"کند. `Send` و `Sync` را اگر و فقط در صورتی پیاده‌سازی می‌کند که `T` هر دوی \"\n\"آنها را پیاده‌سازی کند.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` هزینه یک عملیات atomic که اجرا می‌شود را دارد، اما پس از آن \"\n\"استفاده از 'T' آزاد است.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"مراقب reference cycleها باشید، `Arc` از garbage collector برای شناسایی آنها \"\n\"استفاده نمی‌کند.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` می‌تواند مفید باشد.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability.md)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) تضمین \"\n\"می‌کند که حذف متقابل _و_ امکان دسترسی قابل تغییر (mutable) به \\\"T\\\" را در پشت \"\n\"یکread-only interface  (شکل دیگری از [تغییرپذیری (mutable) داخلی](../../\"\n\"borrowing/interior-mutability.md)) فراهم می‌کند.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"توجه کنید که چگونه یک [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) برای اجرای \"\n\"کامل آن داریم.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"‏«Mutex» در Rust مانند مجموعه‌ای با تنها یک عنصر --- داده‌های محافظت شده \"\n\"(protected) به نظر می‌رسد.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"نمی‌توان قبل از دسترسی به داده‌های محافظت شده یا protected، دسترسی mutex را \"\n\"فراموش کرد.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"با گرفتن lock می‌توانید `&mut T` را از `&Mutex<T>` دریافت کنید.`MutexGuard` \"\n\"تضمین می‌کند که`&mut T` بیشتر از قفل نگه‌داشته شده، موجود نمی‌ماند.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"‏`Mutex<T>` هر دوی پیاده سازی `Send` و `Sync` iff (فقط و فقط) `T` از `Send` \"\n\"استفاده‌ می‌کنند.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"‏ همتای قفل خواندن و نوشتن: `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"چرا `lock()` یک`Result` برمی‌گرداند؟\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"اگر threadای که  `Mutex`  را نگه می‌دارد دچار panic شود، `Mutex` «مسموم/\"\n\"poisoned» می‌شود تا نشان دهد که داده‌هایی که محافظت می‌کند ممکن است در وضعیت \"\n\"ناسازگاری باشند. فراخوانی `lock()` در یک mutex مسموم با یک [«PoisonError»] \"\n\"(https://doc.rust-lang.org/std/sync/struct.PoisonError.html) انجام نمی‌شود. \"\n\"می‌توانید `into_inner()` را در مورد خطا برای بازیابی داده‌ها بدون توجه به آن \"\n\"فراخوانی کنید.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"اجازه دهید `Arc` و `Mutex` را در عمل ببینیم:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"راه‌حل ممکن:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"بخش‌های قابل توجه:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"‏ `v` در `Arc` و `Mutex` احاطه می‌شود، زیرا مسائل آنها شبیه به هم است.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"قرار دادن یک `Mutex` در یک `Arc` یک الگوی رایج برای به اشتراک گذاشتن حالت \"\n\"قابل تغییر (mutable) بین threadها است.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"‏ `v: Arc<_>` باید به عنوان `v2` کلون شود تا بتوان آن را به thread دیگری \"\n\"منتقل کرد. نکته `move` به  lambda signature اضافه شد.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"بلوک‌ها برای محدود کردن دامنه `LockGuard` تا حد امکان معرفی شده‌اند.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"مسئله ناهار خوردن فیلسوفان، در واقع یک مسئله کلاسیک concurrency است:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"پنج فیلسوف در کنار هم دور یک میز غذا می‌خورند. هر فیلسوف جایگاه خاص خود را در \"\n\"میز دارد. بین هر بشقاب یک چنگال قرار دارد. غذایی که سِرو می‌شود نوعی اسپاگتی \"\n\"است که باید با دو چنگال خورده شود. هر فیلسوف فقط می‌تواند به طور متناوب فکر \"\n\"کند و غذا بخورد. علاوه بر این، یک فیلسوف فقط می‌تواند اسپاگتی خود را زمانی \"\n\"بخورد که هم چنگال چپ و هم چنگال راست را داشته باشد؛ بنابراین دو چنگال فقط \"\n\"زمانی در دسترس خواهد بود که دو همسایه نزدیک آنها در حال فکرکردن باشند و نه \"\n\"در حال غذاخوردن. پس از اینکه یک فیلسوف غذاخوردن را تمام کرد، هر دو چنگال را \"\n\"پایین می‌گذارد.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"برای این تمرین به یک [Cargo installation](../../cargo/running-locally.md) \"\n\"محلی نیاز دارید. کد زیر را در فایلی به نام `src/main.rs` کپی کنید، جاهای \"\n\"خالی را پر کنید و آزمایش کنید که `cargo run` به بن‌بست (deadlock) نمی‌خورد:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"ایول! {} یک ایده جدید!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Pick up forks...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} is eating...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Socrates\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hypatia\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Plato\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristotle\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Create forks\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Create philosophers\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// Make each of them think and eat 100 times\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Output their thoughts\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"می توانید از `Cargo.toml` زیر استفاده کنید:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"اجازه دهید از دانش جدید خود برای ایجاد یک جستجوگر لینک multi-thread استفاده \"\n\"کنیم. باید از یک صفحه وب شروع شود و بررسی کنید که لینک‌های موجود در صفحه \"\n\"معتبر هستند. باید به‌صورت بازگشتی صفحات دیگر را در همان دامنه بررسی کند و این \"\n\"کار را تا زمانی که همه صفحات تأیید نشده‌اند ادامه دهد.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\"برای این کار به یک کلاینت HTTP مانند [`reqwest`](https://docs.rs/reqwest/) \"\n\"نیاز دارید. شما همچنین به راهی برای یافتن لینک‌ها نیاز دارید، ما می توانیم از \"\n\"[`reqwest`](https://docs.rs/reqwest/) استفاده کنیم. در نهایت، ما به روشی \"\n\"برای رسیدگی به خطاها نیاز داریم پس درنتیجه از [`thiserror`](https://docs.rs/\"\n\"thiserror/) استفاده خواهیم کرد.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"یک پروژه Cargo جدید ایجاد کنید و آن را به عنوان یک وابستگی با `reqwest` \"\n\"اعلام کنید:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"اگر`cargo add` با `error: no such subcommand` ناموفق بود، لطفاً فایل `Cargo.\"\n\"toml` را دستی ویرایش کنید و وابستگی‌های ذکر شده در زیر را اضافه کنید.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"فراخوانی‌ها `cargo add` را در فایل `Cargo.toml` به‌صورت زیر به‌روزرسانی می‌کند:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"اکنون می توانید صفحه شروع را دانلود کنید. با یک سایت کوچک مانند `https://www.\"\n\"google.org/` امتحان کنید.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"فایل `src/main.rs` شما باید چیزی شبیه به این باشد:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"request error: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"بررسی {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Links: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"نمی‌تواند لینک را باز کند: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"این کد را در `src/main.rs` اجرا کنید\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"برای بررسی موازی لینک‌ها از threadها استفاده کنید: URLهایی را که باید بررسی \"\n\"شوند به یک channel ارسال کنید و اجازه دهید چند thread به‌صورت موازی URLها را \"\n\"بررسی کنند.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"این را به صورت بازگشتی پیوندها گسترش دهید تا از همه صفحات را در دامنه «www.\"\n\"google.org» استخراج کنید. حد بالا را حدود ۱۰۰ صفحه یا بیشتر قرار دهید تا در \"\n\"نهایت توسط سایت مسدود نشوید.\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} is trying to eat\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"جستجوگر Link\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// The sender got dropped. No more commands coming in.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"خطای crawling دریافت شد: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"Bad URLs: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"‏ \\\"Async\\\" یک مدل concurrency است که در آن چندین کار به طور هم‌زمان با اجرای \"\n\"هر کار تا زمانی که مسدود شود، اجرا می‌شود و سپس به کار دیگری که آماده ادامه \"\n\"دادن است سوئیچ می‌شود. این مدل اجازه می‌دهد تا تعداد بیشتری کار را روی تعداد \"\n\"محدودی از رشته‌ها اجرا کنید و به این دلیل است که سربار هر task معمولاً بسیار \"\n\"کم است و سیستم‌‌عامل‌ها معمولاً مقدماتی را برای شناسایی مؤثر I/O که قادر به \"\n\"ادامه هستند فراهم می‌کنند.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"عملیات Rust asynchronous بر اساس \\\"futures\\\" است، که نشان‌دهنده کاری است که \"\n\"ممکن است در آینده تکمیل شود. future‌ها تا زمانی که علامت کامل بودنشان را \"\n\"ندهند، «polled» می‌شوند.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"‏ Futureها توسط یک زمان‌بندی ناهمزمان نظارت می‌شوند و چندین زمان‌بندی مختلف در \"\n\"دسترس هستند.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"پایتون مدل مشابهی را در «asyncio» خود دارد. با‌این‌حال، تایپ «Future» آن مبتنی \"\n\"بر callback است و poll نشده است. برنامه‌های Async Python به یک «حلقه» شبیه به \"\n\"runtime در Rust نیاز دارند.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"این مورد شبیه \\\"Promise\\\" در جاوا اسکریپت است که دوباره مبتنی بر callback \"\n\"است. runtime زبان حلقه رویداد (event loop) را پیاده سازی می‌کند، بنابراین \"\n\"بسیاری از جزئیات واضح در Promise پنهان می‌شوند.\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"async/await\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"در سطح بالا، کد Rust async بسیار شبیه کد متوالی \\\"عادی\\\" است (\\\"normal\\\" \"\n\"sequential code):\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Count is: {i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"توجه داشته باشید که این یک مثال ساده برای نشان دادن syntax است. هیچ عملیات \"\n\"طولانی مدت یا هیچ هم‌زمانی(concurrency) واقعی در آن وجود ندارد!\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"نوع برگشت async call چیست؟\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\"برای مشاهده type از `let future: () = async_main(10);` در `main` استفاده \"\n\"کنید.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"کلمه کلیدی \\\"async\\\" شیرینیِ syntax زبان Rust است. کامپایلر نوع بازگشتی را با \"\n\"یک future جایگزین می‌کند.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"شما نمی‌توانید بدون دستورالعمل‌های اضافی به کامپایلر در مورد نحوه استفاده از \"\n\"future بازگشتی، `main` را async کنید.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"برای اجرای کدهای همگام به یک اجرا‌ کننده (executor) نیاز دارید.`block_on` که \"\n\"thread رشته فعلی را تا زمانی که future ارائه شده تکمیل شود مسدود می‌کند.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"همیشه `await` به طور ناهمزمان (asyn) منتظر تکمیل یک عملیات دیگر است. برخلاف \"\n\"`block_on` یک  `await` معمولاً thread فعلی را مسدود نمی‌کند.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"‏ `.await` فقط می‌تواند در داخل یک تابع `async` استفاده شود (یا block؛ این \"\n\"مورد در آینده معرفی می‌شوند).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) یک trait \"\n\"است، اجرا شده توسط objectهایی که نشان دهنده عملیاتی هستند که ممکن است هنوز \"\n\"کامل نشده باشد. می‌توان یک future را poll کرد و `poll` یک [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html) را برمی‌گرداند.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"یک تابع async یک `impl Future` را برمی‌گرداند. همچنین امکان (اما غیرمعمول) \"\n\"پیاده‌سازی `Future` برای تایپ‌های خودتان نیز وجود دارد. برای مثال،  \"\n\"`JoinHandle`  برگردانده شده از `tokio::spawn` `Future` را پیاده‌سازی می‌کند تا \"\n\"امکان پیوستن (joining) به آن را فراهم کند.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"کلمه کلیدی `.await` که برای Future اعمال می‌شود، باعث می‌شود که تابع async \"\n\"فعلی تا زمانی که Future آماده شود متوقف شود و سپس خروجی آن ارزیابی شود.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"تایپ‌های `Future` و `Poll` دقیقاً همانطور که نشان داده شده است اجرا می شوند. \"\n\"برای نمایش پیاده‌سازی‌ها در اسناد، روی لینک‌ها کلیک کنید.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"ما به `Pin` و `Context` نخواهیم رسید، زیرا به جای ساختن کدهای اولیه async، \"\n\"بر نوشتن کدهای async تمرکز خواهیم کرد. به طور خلاصه:\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"‏ `Context` به Future اجازه می‌دهد تا زمانی که رویدادی رخ می دهد، خود را برای \"\n\"poll مجدد برنامه‌ریزی کند.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"‏ `Pin` تضمین می‌کند که Future در حافظه جابه‌جا نمی‌شود، بنابراین pointerهای \"\n\"future معتبر باقی می‌مانند. این برای اجازه دادن به referenceها برای معتبر \"\n\"ماندن پس از  `.await` لازم است.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"یک _runtime_ برای انجام عملیات به صورت ناهمزمان از (a_reactor_) پشتیبانی می \"\n\"کند و مسئول اجرای futureها (an _executor_) است. Rust یک runtime داخلی ندارد، \"\n\"اما چندین گزینه دیگر در دسترس است:\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"‏[Tokio](https://tokio.rs/): کارایی(performant)، با یک اکوسیستم با کارایی \"\n\"بالا به خوبی توسعه یافته مانند [Hyper](https://hyper.rs/) برای HTTP یا \"\n\"[Tonic] (https://github) .com/hyperium/tonic) برای gRPC.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"‏[async-std](https://async.rs/):: هدفش این است که یک \\\"std for async\\\" باشد و \"\n\"شامل یک runtime اولیه در `async::task` است.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/): ساده و سبک است\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"چندین برنامه بزرگتر زمان اجرا (runtime) مخصوص به خود را دارند. برای مثال، \"\n\"[Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/\"\n\"fuchsia-async/src/lib.rs) اکنون یکی runtime دارد.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"توجه داشته باشید که از میان زمان‌های اجرا ذکر شده، فقط Tokio در playground \"\n\"زبان Rust پشتیبانی می‌شود.playground همچنین اجازه ورود/خروجی (I/O) را نمی \"\n\"دهد، بنابراین بیشتر چیزهای async جالب نمی‌توانند در playground اجرا شوند.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"‏ Futureها از این جهت «بی‌اثر(inert)» هستند که هیچ کاری انجام نمی‌دهند (حتی \"\n\"عملیات I/O را شروع نمی‌کنند) مگر اینکه یک مجری(executor) وجود داشته باشد که \"\n\"آنها را polling کند. به عنوان مثال، این با JS Promises متفاوت است که حتی اگر \"\n\"هرگز استفاده نشوند تا پایان کامل شدن برنامه اجرا خواهند شد.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio provides:\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\"یک runtime از نوع multi-thread برای اجرای کدهای ناهمزمان(asynchronous).\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"یک asynchronous version کتابخانه‌ای استاندارد است.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"اکوسیستم بزرگی از کتابخانه‌ها.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"شمارش  task: {i}!\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Main task: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"با ماکرو `tokio::main` اکنون می‌توانیم `main` را async کنیم.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"تابع `spawn` یک \\\"task\\\" جدید و همزمان ایجاد می‌کند.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"توجه: `spawn` یک  `Future` می‌گیرد، شما `.await` را در `count_to` صدا نمی‌زنید.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**Further بررسی:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"چرا `count_to`  (معمولا) به مقدار ۱۰ نمی‌رسد؟ این نمونه‌ای از لغو async است. \"\n\"`tokio::spawn` یک handle را برمی‌گرداند که می‌توان مدتی منتظر ماند تا تمام شود.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"به جای  spawn مورد `count_to(10).await`» را امتحان کنید.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"منتظر کار برگشتی از `tokio::spawn` باشید.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"‏ Rust یک task system دارد که نوعی thread سبک‌ وزن است.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"یک task یک future در سطح بالا دارد که اجراکننده (executor) برای ادامه کار آن \"\n\"را poll می‌کند. آن future ممکن است یک یا چند future تودرتو داشته باشد که متد \"\n\"`poll` آن را `poll` می‌کند، که به طور ناپایداری با یک stack فراخوانی شده \"\n\"مطابقت دارد. همزمانی در یک task با poll از چندین child future، مانند رقابت \"\n\"یک تایمر و یک عملیات I/O امکان‌پذیر است.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"listening on port {}\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"connection from {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Who are you?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"socket error\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"از تماس تلفنی متشکریم، {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"این مثال را در `src/main.rs` آماده شده خود کپی کنید و آن را از آنجا اجرا \"\n\"کنید.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"سعی کنید با یک ابزار اتصال TCP مانند [nc](https://www.unix.com/man-page/\"\n\"linux/1/nc/) یا [telnet](https://www.unix.com/) به آن متصل شوید.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"از دانش‌آموزان بخواهید که وضعیت سرور مورد مثال را با چند کلاینت متصل تجسم \"\n\"کنند. چه taskهایی وجود دارد؟ Future آنها چیست؟\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"این اولین بار است که بلوک `async` را می‌بینیم. این شبیه به بسته شدن است، اما \"\n\"هیچ استدلالی ندارد. مقدار بازگشتی آن از نوع Future است، شبیه به  `async fn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"بلوک async را به یک تابع تغییر دهید و مدیریت خطا را با استفاده از `?` بهبود \"\n\"بخشید.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\"چندین crate از asynchronous channel پشتیبانی می‌کنند. به عنوان مثال `tokio`:\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"تاکنون {count} عدد ping دریافت شده است.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler کامل‌شده‌است\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Sent {} pings so far.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Something went wrong in ping handler task.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\"اندازه کانال را به`3` تغییر دهید و ببینید که چگونه بر اجرا تأثیر می‌گذارد.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\"به‌طور‌کلی، interface شبیه به channelهای `sync` است که در [کلاس صبح‌گاهی](../\"\n\"channels.md) دیده می‌شود.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"تماس `std::mem::drop` را حذف کنید. چه اتفاقی می‌افتد؟ چرا؟\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"این crate مربوط به [Flume](https://docs.rs/flume/latest/flume/) دارای \"\n\"کانال‌هایی است که  `sync` و `async` `send` و `recv` را اجرا می‌کنند. این کار \"\n\"می‌تواند برای برنامه‌های پیچیده با taskهای پردازشی IO و CPU سنگین مناسب باشد.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"چیزی که کار با کانال‌های `async` را ترجیح می‌دهد، توانایی ترکیب آن‌ها با دیگر \"\n\"`future` برای ترکیب آنها و ایجاد جریان کنترل پیچیده است.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"عملیات پیوستن (join) منتظر می‌ماند تا تمام مجموعه‌ای از futureها آماده شوند و \"\n\"مجموعه‌ای (collection) از نتایج آنها را برمی‌گرداند. این شبیه به `Promise.all` \"\n\"در JavaScript یا `asyncio.gather` در پایتون است.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"برای چند future از تایپ‌های مختلف، می‌توانید از `std::future::join!` استفاده \"\n\"کنید، اما باید بدانید که در زمان کامپایل چند future خواهید داشت. این در حال \"\n\"حاضر در جعبه (crate از نوع `futures` است که به زودی در `std::future` تثبیت \"\n\"می‌شود.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"خطر `join` این است که یکی از future‌ها ممکن است هرگز resolve نشود، این مسئله \"\n\"باعث می‌شود برنامه شما متوقف شود.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"همچنین می‌توانید `join_all` را با `join!` ترکیب کنید، به‌عنوان مثال برای \"\n\"پیوستن (`join!`) همه درخواست‌ها به یک سرویس http و همچنین یک کوئری پایگاه \"\n\"داده سعی کنید `tokio::time::sleep` را با استفاده از `futures::join!` به \"\n\"future اضافه کنید. این یک timeout نیست (که به `select!`نیاز دارد و در فصل \"\n\"بعدی توضیح داده ‌می‌شود) بلکه `join!` را نشان می‌دهد.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"یک عملیات انتخابی منتظر می‌ماند تا هر یک از مجموعه‌ای از futureها آماده شود و \"\n\"به نتیجه آن future پاسخ می‌دهد. در JavaScript این مورد شبیه به `Promise.race` \"\n\"است و در پایتون با `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)` قابل مقایسه می‌باشد.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"مانند یک عبارت تطبیقی (match statement)، بدنه `pattern` دارای تعدادی بازو \"\n\"است که هر کدام به شکل عبارت `pattern = future => statement` هستند. هنگامی که \"\n\"`future` آماده است، مقدار بازگشتی آن توسط `pattern` تخریب می‌شود. سپس \"\n\"`statement` با متغیرهای حاصل اجرا می‌شود. در نتیجه `statement` نتیجه‌ي ماکرو \"\n\"`select!` می‌شود.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"got: {msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"timeout\\\"\"\nmsgstr \"\\\"timeout\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Failed to send greeting\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Listener failed\\\"\"\nmsgstr \"\\\"شنونده شکست خورد\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"The `listener` async block here is a common form: wait for some async event, \"\n\"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why \"\n\"does the `send` also fail in this situation?\"\nmsgstr \"\"\n\"بلوک async `listener` در اینجا یک شکل رایج است: منتظر برخی رویدادهای async \"\n\"یا به‌عنوان مثال برای timeoutها باشید. `sleep` را به sleep طولانی‌تر تغییر \"\n\"دهید تا شاهد شکست آن باشید. چرا `send` نیز در این شرایط شکست می‌خورد؟\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"`select!` is also often used in a loop in \\\"actor\\\" architectures, where a \"\n\"task reacts to events in a loop. That has some pitfalls, which will be \"\n\"discussed in the next segment.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"‏ Async / await انتزاع راحت و کارآمدی را برای برنامه نویسی concurrent \"\n\"asynchronous فراهم می‌کند. با‌این‌حال، مدل async/wait در Rust نیز با سهم خود از \"\n\"مشکلات و pitfallها و footgunها همراه است. برخی از آنها را در این فصل توضیح \"\n\"می‌دهیم.\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"Pin\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"مسدود کردن executor\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"اکثر async runtimeهای تنها به  IO task اجازه می‌دهند که به صورت همزمان \"\n\"(concurrent) اجرا شوند. این بدان معنی است که تسک‌های block کردن CPU باعث \"\n\"مسدود شدن executor و جلوگیری از اجرای سایر تسک‌ها می‌شود. یک راه حل آسان این \"\n\"است که در صورت امکان از متدهای معادل async استفاده کنید.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"کد را اجرا کنید و ببینید که sleep‌ها به طور متوالی اتفاق می‌افتند و نه به صورت \"\n\"همزمان (concurrent).\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"این `\\\"current_thread\\\"` همه taskها را روی یک thread قرار می‌دهد. این \"\n\"اثرگذاری را آشکارتر می‌کند، اما این اشکال همچنان در طبیعت multi-threaded وجود \"\n\"دارد.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"‏ `std::thread::sleep` را به `tokio::time::sleep` تغییر دهید و منتظر نتیجه \"\n\"باشید.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"راه‌حل دیگر `tokio::task::spawn_blocking` است که یک thread واقعی ایجاد می‌کند \"\n\"و handle آن را بدون مسدود کردن executor به future تبدیل می‌کند.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"شما نباید taskها را به عنوان thread‌های سیستم عامل در نظر بگیرید. آنها از \"\n\"نگاشت ۱ به ۱ پشتیبانی نمی‌کنند و اکثر executorها به بسیاری از taskها اجازه \"\n\"می‌دهند روی یک thread سیستم عامل اجرا شوند. این امر به‌ویژه هنگام تعامل با \"\n\"کتابخانه‌های دیگر از طریق FFI مشکل‌ساز است، جایی که آن کتابخانه ممکن است به \"\n\"ذخیره‌سازی محلی thread یا نگاشت (map) به threadهای سیستم‌عامل خاص (مانند CUDA) \"\n\"بستگی داشته باشد. در چنین شرایطی `tokio::task::spawn_blocking` را ترجیح دهید.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"با احتیاط از همگام‌سازی mutexها استفاده کنید. نگه داشتن یک mutex روی یک `.\"\n\"await` ممکن است باعث مسدود شدن task دیگری شود و آن task ممکن است در همان \"\n\"thread در حال اجرا باشد.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"بلوک‌ها و توابع Async انواعی را برمی‌گردانند که ویژگی `Future` را پیاده‌سازی \"\n\"می‌کنند. نوع برگشتی نتیجه تبدیل کامپایلر است که متغیرهای محلی را به داده های \"\n\"ذخیره شده در future تبدیل می کند.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"برخی از این متغیرها می‌توانند اشاره‌گرهایی را برای سایر متغیرهای محلی نگه \"\n\"دارند. به همین دلیل، future هرگز نباید به مکان حافظه دیگری منتقل شود، زیرا \"\n\"این pointerها را باطل می‌کند.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"برای جلوگیری از جابجایی تایپ future در حافظه، فقط از طریق یک pointer پین شده \"\n\"می توان آن را بررسی کرد. `Pin` یک wrapper در اطراف یک reference است که تمام \"\n\"عملیاتی را که می‌تواند نمونه‌ای را که به آن اشاره می‌کند به یک مکان حافظه \"\n\"متفاوت منتقل کند را ممنوع می‌کند.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// A worker which listens for work on a queue and performs it.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Pretend to work.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"failed to send response\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: report number of iterations every 100ms\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"// A requester which requests work and waits for it to complete.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"failed to send on work queue\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"failed waiting for response\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"نتیجه کار برای تکرار  {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"شما ممکن است این را به عنوان نمونه ای از الگوی بازیگر (actor pattern) تشخیص \"\n\"دهید. بازیگران معمولاً `select!` را در یک حلقه صدا می‌زنند.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\"این به عنوان یک جمع‌بندی از چند درس قبلی عمل می کند، بنابراین وقت خود را صرف \"\n\"آن کنید.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"به‌سادگی یک `_ = sleep(Duration::from_millis(100)) => { println!(..) }` را به \"\n\"`select!` اضافه کنید. این مورد هرگز اجرا نمی شود. چرا؟\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"درعوض، یک `timeout_fut` حاوی آن future خارج از `loop` اضافه کنید:\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"این مورد هنوز کار نمی‌کند. خطاهای کامپایلر را دنبال کنید، `&mut` را به  \"\n\"`timeout_fut` در `select!` اضافه کنید تا حرکت را ادامه دهید، سپس از `Box::\"\n\"pin` استفاده کنید:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\"این مورد کامپایل می‌شود، اما پس از انقضای timeout و در هر تکرار برابر با \"\n\"`Poll::Ready` است (future ترکیبی به این مسئله کمک می‌کند). به‌روزرسانی برای \"\n\"بازنشانی `timeout_fut` هر بار که منقضی می‌شود:\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"جعبه allocateها بر روی heap. در برخی موارد، `std::pin::pin!` (فقط به تازگی \"\n\"تثبیت شده است، با کدهای قدیمی‌تر که اغلب از `tokio::pin!` استفاده می‌کنند) نیز \"\n\"یک گزینه است، اما استفاده از آن برای futureای که دوباره تخصیص داده می‌شود \"\n\"دشوار است.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"جایگزین دیگر این است که به هیچ وجه از `pin` استفاده نکنید، بلکه task دیگری \"\n\"ایجاد کنید که هر 100 میلی‌ثانیه به یک کانال `oneshot` ارسال می‌شود.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"داده‌هایی که حاوی اشاره‌گرهایی به خود هستند، خود ارجاعی ( self-referential) \"\n\"نامیده می شوند. به طور معمول، Rust borrow checker از جابجایی داده‌های \"\n\"خودارجاعی جلوگیری می‌کند، زیرا منابع نمی‌توانند بیشتر از داده‌هایی که به آنها \"\n\"اشاره می‌کنند زنده بمانند. با‌این‌حال، تبدیل کد برای بلوک‌ها و توابع async توسط \"\n\"borrow checker تأیید نمی‌شود.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"‏ `Pin` یک wrapper در اطراف یک reference است. یک object را نمی‌توان با استفاده \"\n\"از یک pointer پین شده از جای خود حرکت داد. با این حال، هنوز هم می‌توان آن را \"\n\"از طریق یک pointer بدون پین جابجا کرد.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"متد `poll` از ویژگی `Future` از `Pin<&mut Self>` به جای `&mut Self` برای \"\n\"اشاره به نمونه (instance) استفاده می‌‌کند. به همین دلیل است که فقط می‌توان آن \"\n\"را روی یک اشاره‌‌گر پین شده فراخوانی کرد.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\"متدهای Async در traitها اخیراً در انتشار 1.75 تثبیت شده‌اند. این نیاز به \"\n\"پشتیبانی برای استفاده از موقعیت بازگشتی `impl Trait` (RPIT) در traitها را \"\n\"داشت، زیرا شیرین‌زدایی (desugaring) برای `async fn` شامل `-> impl \"\n\"Future<Output = ...>` است.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\"با این‌حال، حتی با پشتیبانی native امروز، برخی از مشکلات در مورد `async fn` و \"\n\"RPIT در ویژگی‌ها وجود دارد:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\"‏Return-position impl Trait تمام طول عمرهای درون محدوده را ثبت می کند \"\n\"(بنابراین برخی از الگوهای قرض کردن (borrowing) نمی توانند بیان شوند)\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\"ویژگی‌هایی که متد‌های آن‌ها از موقعیت بازگشتی `impl trait` یا `async` استفاده \"\n\"می‌کنند با `dyn` سازگار نیستند.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"اگر به پشتیبانی `dyn` نیاز داریم، crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) راه‌حلی را از طریق یک ماکرو ارائه می‌کند، با ذکر \"\n\"چند نکته:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"running all sleepers..\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"slept for {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"استفاده از `async_trait` آسان است، اما توجه داشته باشید که برای رسیدن به این \"\n\"هدف از heap allocationها استفاده می‌کند. این heap allocation دارای سربار \"\n\"عملکرد است.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"چالش‌های پشتیبانی برای `async trait` در زبان Rust بسیار عمیق هستند و احتمالاً \"\n\"ارزش توصیف عمیق در اینجا را ندارند. Niko Matsakis در [این پست](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) آنها را به خوبی توضیح داده است. به خصوص اگر شما به این موضوع علاقه‌مند \"\n\"هستید.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"سعی کنید یک sleep خواب جدید ایجاد کنید که برای مدت زمان تصادفی می‌خوابد و آن \"\n\"را به Vec اضافه کنید.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"کنار گذاشتن future به این معنی است که دیگر هرگز نمی‌توان آن را poll کرد. به \"\n\"این حالت _cancellation_ می‌گویند و می‌تواند در هر نقطه `await` رخ دهد. برای \"\n\"اطمینان از عملکرد صحیح سیستم حتی در صورت لغو futureها، دقت مناسب لازم است. \"\n\"به‌عنوان ‌مثال، نباید داده‌ها را از دست بدهد یا به بن‌بست (deadlock) برسد.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\\\"not UTF-8\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"کامپایلر در مورد cancellation-safety کمکی نمی‌کند. باید مستندات API را \"\n\"بخوانید و در نظر بگیرید که `async fn` شما چه وضعیتی دارد.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"برخلاف `panic` و `?`، لغو یا cancellation بخشی از جریان کنترل عادی (و رسیدگی \"\n\"به خطا) است.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"اسن مثال بخش‌هایی از string را از دست می‌دهد.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"هر زمان که شاخه `tick()` اول تمام شود، `next()` و `buf` آن حذف می شوند.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"‏`LinesReader` را می‌توان با تبدیل `buf` به بخشی از ساختار، ایمن کرد:\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// prefix buf and bytes with self.\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"‏ ['Interval::tick'](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) برای cancellation-safe است زیرا ردیابی می‌کند که آیا یک \"\n\"tick  تحویل داده شده است.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"‏ [`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) برای cancellation-safe است زیرا داده‌ها را \"\n\"برمی‌گرداند یا نمی‌خواند.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"‏ [`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) مشابه مثال است و شبیه cancellation-\"\n\"safe نیست. برای جزئیات و موارد جایگزین به مستندات آن مراجعه کنید.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"فلسفه Dining  --- Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a \"\n\"description of the problem.\"\nmsgstr \"\"\n\"برای توضیح مشکل به [dining philosophers](../sync-exercises/dining-\"\n\"philosophers.md) مراجعه کنید.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"مانند قبل، برای این تمرین به Cargo installation](../../cargo/running-locally.\"\n\"md) نیاز دارید. کد زیر را در فایلی به نام `src/main.rs` کپی کنید، جاهای خالی \"\n\"را پر کنید و تست کنید که `cargo run` به بن بست (`src/main.rs`) نمی‌خورد:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"// Keep trying until we have both forks\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Make them think and eat\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"از آنجایی که این بار از Async Rust استفاده می‌کنید، به وابستگی `tokio` نیاز \"\n\"دارید. می‌توانید از `Cargo.toml` زیر استفاده کنید:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"همچنین توجه داشته باشید که این بار باید از ماژول `Mutex` و `mpsc` از `tokio` \"\n\"crate استفاده کنید.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"آیا می‌توانید پیاده‌سازی خود را تک thread ای کنید؟\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"در این تمرین، ما می‌خواهیم از دانش جدید خود برای پیاده سازی یک برنامه \"\n\"broadcast chat استفاده کنیم. ما یک سرور چت داریم که کاربران به آن متصل \"\n\"می‌شوند و پیام‌های خود را منتشر می‌کنند. کلاینت پیام‌های کاربر را از ورودی \"\n\"استاندارد می‌خواند و آنها را به سرور ارسال می‌کند. سرور چت هر پیامی را که \"\n\"دریافت می‌کند برای همه کاربران پخش می‌کند.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"برای این کار، از [ broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) در سمت سرور و [`tokio_websockets`](https://\"\n\"docs.rs/tokio-websockets/) برای ارتباط بین کلاینت و سرور.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"یک پروژه Cargo جدید ایجاد کنید و وابستگی‌های زیر را اضافه کنید:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.40.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.9.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.38.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.3\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"‏API‌های مورد نیاز\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"شما به توابع زیر از `tokio` و [`tokio_websockets`](https://docs.rs/tokio-\"\n\"websockets/) نیاز دارید. چند دقیقه را برای آشنایی با API اختصاص دهید.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"‏ [StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) توسط `WebSocketStream`: برای خواندن \"\n\"ناهمزمان پیام‌ها از یک جریان وب سوکت.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"‏[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) پیاده‌سازی شده توسط `WebSocketStream`: برای \"\n\"ارسال ناهمزمان پیام‌ها در یک Websocket Stream.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"‏[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): برای خواندن ناهمزمان پیام‌های کاربر از ورودی \"\n\"استاندارد.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"‏[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): برای اشتراک در یک broadcast channel.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"دو باینری\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"به طور معمول در یک پروژه Cargo، شما می توانید فقط یک فایل باینری و یک فایل \"\n\"`src/main.rs` داشته باشید. در این پروژه به دو باینری نیاز داریم. یکی برای \"\n\"کلاینت و دیگری برای سرور. شما به طور بالقوه می‌توانید آنها را در دو پروژه \"\n\"Cargo جداگانه بسازید، اما ما آنها را در یک پروژه Cargo واحد با دو باینری \"\n\"قرار می‌دهیم. برای این کار، کلاینت و کد سرور باید زیر `src/bin` قرار گیرند \"\n\"(به[documentation](https://doc.rust-lang.org/cargo/reference/cargo-targets.\"\n\"html#binaries) مراجعه کنید ).\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"کد سرور و کلاینت زیر را به ترتیب در`src/bin/server.rs` و `src/bin/client.rs` \"\n\"کپی کنید. وظیفه شما این است که این فایل‌ها را همانطور که در زیر توضیح داده \"\n\"شده است تکمیل کنید.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"// TODO: For a hint, see the description of the task below.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"listening on port 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"اتصال جدید از {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Wrap the raw TCP stream into a websocket.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"راه‌اندازی باینری\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"سرور را راه‌اندازی کنید با استفاده از:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"و این کلاینت با:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"تابع `handle_connection` را در `src/bin/server.rs` پیاده‌سازی کنید.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"نکته: از `tokio::select!` برای انجام همزمان دو task در یک حلقه پیوسته \"\n\"استفاده کنید. یک task پیام‌هایی را از کلاینت دریافت می‌کند و آنها را \"\n\"پخش(broadcast) می‌کند. دیگری پیام‌های دریافت شده توسط سرور را برای کاربر ارسال \"\n\"می‌کند.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"تابع اصلی را در `src/bin/client.rs` تکمیل کنید.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"نکته: مانند قبل، از `tokio::select!` در یک حلقه پیوسته برای انجام همزمان دو \"\n\"task استفاده کنید: (۱) خواندن پیام های کاربر از ورودی استاندارد و ارسال آنها \"\n\"به سرور و (۲) دریافت پیام از سرور و نمایش آنها برای کاربر.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"اختیاری: پس از اتمام کار، کد را تغییر دهید تا پیام‌ها برای همه کلاینت‌ها، به \"\n\"جز فرستنده پیام، منتشر شود.\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// The locks are dropped here\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"در اینجا یک ایده وجود دارد: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"به chat خوش آمدید! یک پیام تایپ کنید\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"From client {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Continuous loop for concurrently sending and receiving messages.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"From server: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"ممنون که آموزش‌هایی را از Comprehensive Rust 🦀! رو گرفتید. امیدواریم لذت \"\n\"برده باشید و برای‌ شما مفید بوده باشد.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"ما از برگزاری این دوره بسیار لذت بردیم. این دوره کامل نیست، بنابراین اگر \"\n\"اشتباهی را مشاهده کردید یا ایده‌ای برای بهبود دارید، لطفاً با [در GitHub با ما \"\n\"تماس بگیرید](https://github.com/google/comprehensive-rust/discussions) وارد \"\n\"شوید. ما دوست داریم از شما بشنویم.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"در زیر واژه‌نامه‌ای است که هدف آن ارائه تعریف کوتاهی از بسیاری از اصطلاحات در \"\n\"زبان Rust است. برای ترجمه‌ها، این مورد نیز برای اتصال این اصطلاح به زبان اصلی \"\n\"انگلیسی است.\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/review.md).\"\nmsgstr \"\"\n\"allocate:  \\n\"\n\"تخصیص حافظه پویا در [heap]‌(memory-management/review.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"argument:  \\n\"\n\"اطلاعاتی که به یک تابع یا متد منتقل می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"associated type:  \\n\"\n\"A type associated with a specific trait. Useful for defining the \"\n\"relationship between types.\"\nmsgstr \"\"\n\"نوع مرتبط:\\n\"\n\"نوعی که با یک ویژگی خاص مرتبط است. برای تعریف رابطه بین typeها مفید است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Bare-metal Rust:  \\n\"\n\"توسعه سطح پایین Rust، اغلب در سیستم‌هایی که سیستم‌عامل ندارند، مستقر می‌شود. \"\n\"[Bare-metal Rust](bare-metal.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_.\"\nmsgstr \"\"\n\"block:  \\n\"\n\"‏[Blocks]‌(control-flow-basics/blocks-and-scopes.md) و _scope_ را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](borrowing/shared.md).\"\nmsgstr \"\"\n\"borrow:  \\n\"\n\"‏ [Borrowing](borrowing/shared.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"borrow checker:  \\n\"\n\"بخشی از کامپایلر Rust که بررسی می‌کند که همه قرض‌ها (borrows) معتبر هستند.\"\n\n# recheck\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"brace:  \\n\"\n\"‏ `{` and `}`. نامیده می‌شوند _curly brace_, آنها delimit _blocks_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"build:  \\n\"\n\"فرآیند تبدیل کد منبع به کد اجرایی یا یک برنامه قابل استفاده می‌باشد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"call:  \\n\"\n\"برای فراخوانی یا اجرای یک تابع یا متد، کاربرد دارد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"channel:  \\n\"\n\"‏ برای ارسال ایمن پیام‌ها [بین threadها]‌(concurrency/channels.md) استفاده \"\n\"می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"دوره‌های اینجا Comprehensive Rust 🦀 نامیده می‌شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"concurrency:  \\n\"\n\"اجرای چندین  task یا process به طور همزمان.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency/welcome.md).\"\nmsgstr \"\"\n\"Concurrency در Rust ‏[Concurrency in Rust](concurrency/welcome.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"constant:  \\n\"\n\"مقداری که در طول اجرای برنامه تغییر نمی‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"control flow:  \\n\"\n\"ترتیبی که دستورات یا عملگرها در یک برنامه اجرا می‌شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"crash:  \\n\"\n\"یک شکست (failure) یا خاتمه غیرمنتظره و کنترل نشده یک برنامه است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"enumeration:  \\n\"\n\"یک نوع داده که یکی از چندین ثابت نامگذاری شده را، احتمالاً با یک تاپل یا \"\n\"ساختار مرتبط، نگه می‌دارد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"error:  \\n\"\n\"شرایط یا نتیجه غیرمنتظره‌ای که از رفتار مورد انتظار خارج می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"error handling:  \\n\"\n\"فرآیند مدیریت و پاسخگویی به خطاهایی که در حین اجرای برنامه رخ می‌دهد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"exercise:  \\n\"\n\" مشکل یا task که برای تمرین و آزمایش مهارت‌های برنامه‌نویسی طراحی شده است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"function:  \\n\"\n\"یک بلوک کد قابل استفاده مجدد که وظیفه خاصی را انجام می‌دهد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"garbage collector:  \\n\"\n\"مکانیزمی که به طور خودکار حافظه اشغال شده توسط اشیایی که دیگر استفاده \"\n\"نمی‌شوند را آزاد می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"generics:  \\n\"\n\"قابلیتی که امکان نوشتن کد با متغیرهایی برای انواع را فراهم می‌کند و امکان \"\n\"استفاده مجدد از کد با انواع داده‌های مختلف را فراهم می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"immutable:  \\n\"\n\"پس از ایجاد، دیگر قابل تغییر نیست.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"integration test:  \\n\"\n\"نوعی تست که تعامل بین بخش‌ها یا اجزای مختلف یک سیستم را تأیید می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"keyword:  \\n\"\n\"یک کلمه رزرو شده در یک زبان برنامه‌نویسی که معنای خاصی دارد و نمی‌توان از آن \"\n\"به عنوان شناسه یا سایر نامگذاری‌ها استفاده کرد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"library:  \\n\"\n\"مجموعه‌ای از routine‌ها یا کدهای از پیش کامپایل شده که می تواند توسط برنامه‌ها \"\n\"استفاده شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"macro:  \\n\"\n\"ماکروهای Rust را می‌توان با یک `!` در نام آن تشخیص داد. ماکروها زمانی استفاده \"\n\"می‌شوند که توابع عادی کافی نباشد. یک مثال معمولی `format!` است که تعداد \"\n\"متغیری از آرگومان‌ها را می‌گیرد که توسط توابع Rust پشتیبانی نمی‌شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` function:  \\n\"\n\"\\n\"\n\"برنامه‌های Rust با تابع `main` شروع به اجرا می‌کنند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"match:  \\n\"\n\"یک ساختار جریان کنترلی در Rust که امکان تطبیق الگو بر روی مقدار یک عبارت را \"\n\"فراهم می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"memory leak:  \\n\"\n\"وضعیتی که در آن برنامه نمی‌تواند حافظه‌ای را که دیگر مورد نیاز نیست آزاد کند و \"\n\"منجر به افزایش تدریجی استفاده از حافظه می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"method:  \\n\"\n\"یک تابع مرتبط با یک object یا یک type در Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"module:  \\n\"\n\"فضای نامی که شامل تعاریفی مانند توابع، انواع یا صفات برای سازماندهی کد در \"\n\"Rust است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"move:  \\n\"\n\"انتقال مالکیت (ownership) یک مقدار از یک متغیر به متغیر دیگر در Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"mutable:  \\n\"\n\"یک ویژگی در Rust که به متغیرها اجازه می‌دهد پس از اعلان، اصلاح شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"ownership:  \\n\"\n\"مفهومی در Rust که مشخص می‌کند کدام قسمت از کد مسئول مدیریت حافظه مرتبط با یک \"\n\"مقدار است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"panic:  \\n\"\n\"یک وضعیت خطای غیرقابل جبران در Rust که منجر به خاتمه برنامه می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"parameter:  \\n\"\n\"مقداری که هنگام فراخوانی به یک تابع یا متد ارسال می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"pattern:  \\n\"\n\"ترکیبی از مقادیر، عبارت‌ها یا ساختارهایی که می‌توانند با یک عبارت در Rust \"\n\"مطابقت داده شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"payload:  \\n\"\n\"داده یا اطلاعاتی که توسط یک پیام، رویداد یا ساختار داده حمل می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"program:  \\n\"\n\"مجموعه‌ای از دستورالعمل‌هایی که یک کامپیوتر می‌تواند برای انجام یک کار خاص یا \"\n\"حل یک مشکل خاصی اجرا کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"مجموعه‌ای از دستورالعمل‌هایی که یک کامپیوتر می‌تواند برای انجام یک کار خاص یا \"\n\"حل یک مشکل خاص اجرا کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"receiver:  \\n\"\n\"اولین پارامتر در متد Rust که نمونه‌ای را نشان می‌دهد که متد در آن فراخوانی \"\n\"می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"reference counting:  \\n\"\n\"یک تکنیک مدیریت حافظه که در آن تعداد ارجاعات به یک object ردیابی می‌شود و \"\n\"زمانی که شمارش به صفر می‌رسد، object تخصیص داده می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"return:  \\n\"\n\"یک کلمه کلیدی در Rust برای نشان دادن مقداری که باید از یک تابع برگردانده شود \"\n\"استفاده می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"یک زبان برنامه‌نویسی سیستمی که بر safety، کارایی و concurrency تمرکز دارد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Rust Fundamentals:  \\n\"\n\"روزهای ۱ تا ۴ این دوره.\"\n\n# check in browser again\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust در Android:\\n\"\n\"این [Rust in Android](android.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"‏ Rust در Chromium:  \\n\"\n\"‏ [Rust in Chromium](chromium.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"safe:  \\n\"\n\"به کدی اشاره دارد که به قوانین مالکیت (ownership) در زبان Rust و قرض‌گرفتن \"\n\"(borrowing) پایبند است و از خطاهای مربوط به حافظه جلوگیری می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"scope:  \\n\"\n\"منطقه‌ای از یک برنامه که در آن یک متغیر معتبر است و می‌توان از آن استفاده کرد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"standard library:  \\n\"\n\"مجموعه‌ای از ماژول‌ها که عملکردهای ضروری را در Rust ارائه می‌دهند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static:  \\n\"\n\"یک کلمه کلیدی در Rust برای تعریف متغیرهای ثابت یا موارد با طول عمر `'static` \"\n\"استفاده می‌شود.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\"string:  \\n\"\n\"نوع داده‌ای که داده‌های متنی را ذخیره می‌کند. برای اطلاعات بیشتر به [Strings]\"\n\"(references/strings.html) مراجعه کنید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"struct:  \\n\"\n\"یک نوع داده ترکیبی در Rust که متغیرهای انواع مختلف را تحت یک نام واحد جمع \"\n\"می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"test:  \\n\"\n\"یک ماژول Rust حاوی توابعی که صحت عملکردهای دیگر را آزمایش می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"thread:  \\n\"\n\"دنباله‌ای جداگانه از اجرا در یک برنامه که امکان اجرای همزمان را فراهم می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"thread safety:  \\n\"\n\"ویژگی برنامه‌ای که رفتار صحیح را در یک محیط multithread تضمین می‌کند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"trait:  \\n\"\n\"مجموعه‌ای از متدهای تعریف شده برای یک type ناشناخته، راهی برای دستیابی به \"\n\"polymorphism در Rust ارائه می‌دهد.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"trait bound:  \\n\"\n\"انتزاعی که در آن می‌توانید برای پیاده‌سازی برخی از ویژگی‌های (traitها) مورد \"\n\"علاقه‌تان به typeها نیاز داشته باشید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"tuple:  \\n\"\n\"یک data type ترکیبی که شامل متغیرهایی از انواع مختلف است. فیلدهای Tuple \"\n\"بی‌نام هستند و با شماره ترتیبی آنها قابل دسترسی هستند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"type:  \\n\"\n\"طبقه‌بندی که مشخص می‌کند کدام عملیات را می‌توان بر روی مقادیری از یک تایپ خاص \"\n\"در Rust انجام داد.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"type inference:  \\n\"\n\"توانایی کامپایلر Rust برای شناسایی تایپ یک متغیر یا عبارت.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"undefined behavior:  \\n\"\n\"اقدامات یا شرایطی در Rust که هیچ نتیجه مشخصی ندارند و اغلب منجر به رفتار \"\n\"غیرقابل پیش‌بینی برنامه می‌شوند.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"union:  \\n\"\n\"یک data type که می‌تواند مقادیری از انواع مختلف را در خود نگه دارد، اما فقط \"\n\"یکی در یک زمان خاص.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"unit test:  \\n\"\n\"‏ Rust با پشتیبانی داخلی برای اجرای unit testهای کوچک و integration testهای \"\n\"بزرگتر ارائه می‌شود. [Unit Tests](testing/unit-tests.html) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"unit type:  \\n\"\n\"نوعی که هیچ داده‌ای را در خود نگه نمی‌دارد و به صورت tuple بدون هیچ عضوی نوشته \"\n\"شده است.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe-rust/unsafe.md).\"\nmsgstr \"\"\n\"unsafe:  \\n\"\n\"زیرمجموعه (subset) در Rust که به شما امکان می‌دهد رفتار نامشخصی را فعال‌سازی \"\n\"کنید. [Unsafe Rust] (unsafe-rust/unsafe.md) را ببینید.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"variable:  \\n\"\n\"یک مکان حافظه که داده‌ها را ذخیره می‌کند. متغیرها در یک _scope_ معتبر هستند.\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"سایر منابع برای Rust\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"جامعه Rust منابع بسیار باکیفیت و رایگان را به صورت آنلاین ایجاد کرده است.\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"مستندات رسمی\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"پروژه Rust میزبان منابع بسیاری است. این‌ منابع، Rust را به طور کامل پوشش \"\n\"می‌دهند:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"‏ [زبان برنامه نویسی Rust] (https://doc.rust-lang.org/book/): کتاب رایگان و \"\n\"معروف در مورد Rust که این زبان را با جزئیات دقیقی پوشش می‌دهد و شامل چند \"\n\"پروژه برای ساخت نرم‌افزار می‌شود.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"‏ [Rust By Example](https://doc.rust-lang.org/rust-by-example/): در مورد Rust \"\n\"syntax را به کمک یک سری از مثال‌ها پوشش می‌دهد که ساختارهای مختلف را به نمایش \"\n\"می‌گذارد. گاهی اوقات شامل تمرین‌های کوچکی می‌شود که از شما خواسته می‌شود کد را \"\n\"در مثال‌ها گسترش دهید.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"‏ [Rust Standard Library]‌(https://doc.rust-lang.org/std/): مستندات کامل \"\n\"کتابخانه استاندارد برای Rust می‌باشد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"‏ [The Rust Reference](https://doc.rust-lang.org/reference/): کتاب ناقصی که \"\n\"گرامر و مدل حافظه Rust را توصیف می‌کند.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"راهنماهای تخصصی بیشتر میزبانی شده در سایت رسمی Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"‏[Rustonomicon](https://doc.rust-lang.org/nomicon/): که unsafe Rust ناامن را \"\n\"پوشش می‌دهد، از جمله کار با pointerهای خام و interfaceهای با زبان های دیگر \"\n\"(FFI) را تشریح می‌کند.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"‏ [برنامه نویسی ناهمزمان در Rust](https://rust-lang.github.io/async-book/): \"\n\"مدل برنامه‌نویسی ناهمزمان (asynchronous programming) جدیدی را پوشش می‌دهد که \"\n\"پس از نگارش کتاب Rust معرفی شده است.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"‏ [The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"مقدمه‌ای بر استفاده از Rust در embedded deviceها که بدون سیستم‌عامل هستند را \"\n\"شامل می‌شود.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"مطالب آموزشی غیر‌رسمی\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"مجموعه کوچکی از راهنماها و آموزش‌های دیگر برای Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"‏ [Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): درباره \"\n\"Rust را از دیدگاه برنامه‌نویسان سطح پایین C پوشش می‌دهد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): covers Rust from the perspective of developers who \"\n\"write firmware in C.\"\nmsgstr \"\"\n\"‏ [Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): که Rust را از دیدگاه توسعه‌دهندگانی که سیستم‌عامل را به \"\n\"زبان C می‌نویسند پوشش می‌دهد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"‏ [Rust for Professionals](https://overexact.com/rust-for-professionals/): که \"\n\"syntax مورد استفاده Rust را به کمک  مقایسه‌های جانبی با زبان‌های دیگر مانند C، \"\n\"C++، Java، JavaScript و Python پوشش می‌دهد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"‏ [Rust on Exercism](https://exercism.org/tracks/rust): بیش از ۱۰۰ تمرین برای \"\n\"کمک به یادگیری Rust را شامل می‌شود.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"‏ [Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): مجموعه‌ای از ارائه‌های کوچک که هم بخش پایه و هم پیشرفته \"\n\"زبان Rust را پوشش می‌دهد. موضوعات دیگری مانند WebAssembly و async/wait نیز \"\n\"پوشش داده شده است.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-\"\n\"testing/): a self-paced workshop that goes beyond Rust's built-in testing \"\n\"framework. It covers `googletest`, snapshot testing, mocking as well as how \"\n\"to write your own custom test harness.\"\nmsgstr \"\"\n\"‏ [تست پیشرفته برای برنامه‌های Rust](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): کارگاهی خودآموز که فراتر از چارچوب تست داخلی \"\n\"Rust است. این `googletest`، تست snapshot و mocking و همچنین نحوه نوشتن \"\n\"تست‌های سفارشی خود را پوشش می‌دهد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"‏ [Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/\"\n\"beginners-series-to-rust/) و [اولین قدم های خود را با Rust بردارید](https://\"\n\"docs.microsoft. com/en-us/learn/paths/rust-first-steps/): دو راهنمای Rust با \"\n\"هدف توسعه‌دهندگان جدید می‌باشد. اولی مجموعه‌ای از ۳۵ ویدیو و دومی مجموعه‌ای از \"\n\"۱۱ ماژول است که دستور Rust و ساختارهای اولیه را پوشش می‌دهد.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"‏ [Learn Rust With Entirely Too Linked Lists]‌(https://rust-unofficial.github.\"\n\"io/too-many-lists/): کاوش عمیق قوانین مدیریت حافظه Rust، از طریق اجرای چند \"\n\"نوع مختلف list structure.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"لطفاً [Little Book of Rust Books]‌(https://lborb.github.io/book/) را برای \"\n\"کتاب‌های بیشتر در مورد Rust ببینید.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"مطالب در اینجا بر روی بسیاری از منابع عالی مستندات Rust ساخته شده است. برای \"\n\"فهرست کامل منابع مفید به صفحه [دیگر منابع]‌(other-resources.md) مراجعه کنید.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"محتوای Comprehensive Rust تحت مجوز Apache 2.0 مجوز دارند، لطفاً برای جزئیات \"\n\"بیشتر به ['LICENSE'](https://github.com/google/comprehensive-rust/blob/main/\"\n\"LICENSE) مراجعه کنید.\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"‏ Rust به‌همراه مثال\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"‏ برخی از مثال‌ها و تمرین‌ها از [Rust by Example]‌(https://doc.rust-lang.org/\"\n\"rust-by-example/) کپی و اقتباس شده‌اند. لطفاً برای جزئیات، از جمله شرایط \"\n\"license، به دایرکتوری `third_party/rust-by-example/` مراجعه کنید.\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"‏ Rust در تمرین‌ها\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"برخی تمرین‌‌ا از [Rust on Exercism]‌(https://exercism.org/tracks/rust) کپی و \"\n\"اقتباس شده‌اند. لطفاً برای جزئیات، از جمله شرایط license، به دایرکتوری \"\n\"`third_party/rust-on-exercism/` مراجعه کنید.\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"بخش [Interoperability with C++](android/interoperability/cpp.md) از تصویری \"\n\"از [CXX](https://cxx.rs/) استفاده می‌کند. لطفاً برای جزئیات، از جمله شرایط \"\n\"license، دایرکتوری `third_party/cxx/` را ببینید.\"\n\n#~ msgid \"Slices: `&[T]`\"\n#~ msgstr \"برش ها: `&[T]`\"\n\n#~ msgid \"Slices: &\\\\[T\\\\]\"\n#~ msgstr \"برش‌ها: `[T]&`\"\n\n#~ msgid \"\"\n#~ \"By default, closures will capture by reference if they can. The `move` \"\n#~ \"keyword makes them capture by value.\"\n#~ msgstr \"\"\n#~ \"به‌طور پیش‌فرض، closure ها اگر بتوانند، با ارجاع (reference) مقادیر را \"\n#~ \"می‌گیرند. کلمه کلیدی `move` باعث می‌شود که آنها مقادیر را به‌صورت مالکیت (by \"\n#~ \"value) بگیرند.\"\n\n#~ msgid \"\"\n#~ \"There is a plan to transition [Android](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n#~ \"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction) to Bazel.\"\n#~ msgstr \"\"\n#~ \"برنامه‌ای برای انتقال [Android](https://source.android.com/docs/setup/\"\n#~ \"build/bazel/introduction)، [ChromeOS](https://chromium.googlesource.com/\"\n#~ \"chromiumos/bazel/) وجود دارد و انتقال [Fuchsia](https://source.android.\"\n#~ \"com/docs/setup/build/bazel/introduction) به Bazel.\"\n\n#~ msgid \"\"\n#~ \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\n#~ msgstr \"\"\n#~ \"یادگیری قوانین ساخت Bazel-like برای همه توسعه‌دهندگان Rust OS مفید است.\"\n\n#~ msgid \"\"\n#~ \"Threads are all daemon threads, the main thread does not wait for them.\"\n#~ msgstr \"‏Thread‌ها همه daemon thread هستند و main thread منتظر آنها نیست.\"\n\n#, fuzzy\n#~ msgid \"\\\"Felix\\\"\"\n#~ msgstr \"\\\"Felix\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"Failed to send cat.\\\"\"\n#~ msgstr \"\\\"Failed to send cat.\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"Failed to send dog.\\\"\"\n#~ msgstr \"\\\"Failed to send dog.\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"Failed to receive winner\\\"\"\n#~ msgstr \"\\\"Failed to receive winner\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"Winner is {winner:?}\\\"\"\n#~ msgstr \"\\\"Winner is {winner:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this example, we have a race between a cat and a dog. \"\n#~ \"`first_animal_to_finish_race` listens to both channels and will pick \"\n#~ \"whichever arrives first. Since the dog takes 50ms, it wins against the \"\n#~ \"cat that take 500ms.\"\n#~ msgstr \"\"\n#~ \"در این مثال مسابقه‌ای بین گربه و سگ داریم. `first_animal_to_finish_race` \"\n#~ \"به هر دو channelها گوش می‌دهد و هر کدام را زودتر وارد شوند را انتخاب می‌کند.\"\n#~ \"بنابراین سگ ۵۰ میلی‌ثانیه طول می‌کشد، در برابر گربه‌ای که ۵۰۰ میلی‌ثانیه طول \"\n#~ \"می‌کشد تا پیروز شود.\"\n\n#~ msgid \"\"\n#~ \"You can use `oneshot` channels in this example as the channels are \"\n#~ \"supposed to receive only one `send`.\"\n#~ msgstr \"\"\n#~ \"در این مثال می‌توانید از کانال‌های `oneshot` استفاده کنید زیرا قرار است \"\n#~ \"کانال‌ها فقط یک `send` را دریافت کنند.\"\n\n#~ msgid \"\"\n#~ \"Try adding a deadline to the race, demonstrating selecting different \"\n#~ \"sorts of futures.\"\n#~ msgstr \"\"\n#~ \"سعی کنید یک ضرب الاجل به رقابت اضافه کنید و انتخاب انواع مختلف future را \"\n#~ \"نشان دهید.\"\n\n#~ msgid \"\"\n#~ \"Note that `select!` drops unmatched branches, which cancels their \"\n#~ \"futures. It is easiest to use when every execution of `select!` creates \"\n#~ \"new futures.\"\n#~ msgstr \"\"\n#~ \"توجه داشته باشید که `select!` شاخه‌های (branch) بی‌همتا را حذف می کند و  \"\n#~ \"future آنها را لغو می‌کند. زمانی که هر اجرای `select!` می‌تواند future‌های \"\n#~ \"جدیدی ایجاد می‌کند، راحت‌ترین استفاده از آن است.\"\n\n#~ msgid \"\"\n#~ \"An alternative is to pass `&mut future` instead of the future itself, but \"\n#~ \"this can lead to issues, further discussed in the pinning slide.\"\n#~ msgstr \"\"\n#~ \"یک راه جایگزین این است که به جای خودِ future از `&mut future` استفاده \"\n#~ \"کنید، اما این کار می‌تواند منجر به مسائلی شود که بیشتر در اسلاید سنجاق \"\n#~ \"(pinning slide) شده بحث شده است.\"\n\n#~ msgid \"1 hour and 20 minutes\"\n#~ msgstr \"۱ ساعت و ۲۰ دقیقه\"\n\n#~ msgid \"1 hour and 40 minutes\"\n#~ msgstr \"۱ ساعت ۴۰ دقیقه\"\n\n#~ msgid \"Day 2 Afternoon (4 hours, including breaks)\"\n#~ msgstr \"روز دوم بعدازظهر (4 ساعت با احتساب استراحت)\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"شما می توانید استفاده کنید \"\n\n#, fuzzy\n#~ msgid \"`String` is an owned, heap-allocated buffer of UTF-8 bytes.\"\n#~ msgstr \"`String` یک بافر متعلق به پشته از UTF-8 بایت است.\"\n\n#~ msgid \"`match` expressions\"\n#~ msgstr \"عبارت `match`\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"شرط ها\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"Static و Const\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"کنترل جریان\"\n\n#, fuzzy\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"به [تطبیق الگو](../pattern-matching.md) مراجعه کنید تا در مورد الگوها در \"\n#~ \"Rust اطلاعات بیشتری کسب کنید.\"\n\n#, fuzzy\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` یک بافر رشته‌ای قابل تغییر است.\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"بسیاری از دستور زبان Rust مشابه زبان‌های C، C++ یا Java خواهد بود:\"\n\n#, fuzzy\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"بلاک‌ها و اسکوپ‌ها با پرانتزهای باز و بسته مشخص می‌شوند.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"کامنت‌های تک خطی با ‍`//` شروع می‌شوند و کامنت‌های چند خطی با `/* ... */` \"\n#~ \"مشخص می‌شوند.\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"کلمات کلیدی مانند `if `و `while` به همان صورت عمل می‌کنند.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"انتساب متغیر با `=` انجام می‌شود، مقایسه با `==` انجام می‌شود.\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"در این مورد، پس از 3 تکرار حلقه `inner`، از حلقه `outer` خارج می‌شویم.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"<span dir=ltr><code class=hljs>[T; N]</code></span>\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>[20, 30, 40]</code>, <code class=hljs>[0; \"\n#~ \"3]</code></span>\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>()</code>, <code class=hljs>(T,)</code>, \"\n#~ \"<code class=hljs>(T1, T2)</code>, …</span>\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>()</code>, <code class=hljs>('x',)</code>, \"\n#~ \"<code class=hljs>('x', 1.2)</code>, …</span>\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"انتساب و دسترسی به آرایه:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"انتساب و دسترسی به تاپل:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"آرایه‌ها:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \":تاپل‌ها\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"تاپل خالی <span dir=ltr>`()`</span> همچنین به عنوان «نوع یکه» شناخته \"\n#~ \"می‌شود. این هم یک نوع است و هم تنها مقدار معتبر آن نوع - یعنی هم نوع و هم \"\n#~ \"مقدار آن به صورت <span dir=ltr>`()`</span> بیان می‌شوند.رای مثال برای نشان \"\n#~ \"دادن اینکه یک تابع یا عبارت هیچ مقدار برگشتی ندارد استفاده می‌شود، همانطور \"\n#~ \"که در اسلاید بعدی خواهیم دید. \"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"می‌توانید آن را به عنوان `void` در نظر بگیرید که ممکن است از سایر زبان‌های \"\n#~ \"برنامه‌نویسی برایتان آشنا باشد.\"\n\n#, fuzzy\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"\"\n#~ \"می توانید آرایه‌ها، تاپل‌ها و برش‌ها را با تطابق با عناصر آنها destructure \"\n#~ \"کنید.\"\n\n#, fuzzy\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"یک الگوی جدید با استفاده از `_` برای نمایش یک عنصر ایجاد کنید.\"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"مقادیر بیشتری را به آرایه اضافه کنید.\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"\"\n#~ \"اشاره کنید که چگونه `..` برای در نظر گرفتن تعداد عناصر مختلف، گسترش خواهد \"\n#~ \"یافت.\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"\"\n#~ \"مطابقت با انتهای آرایه رو با با الگوهای <span dir=ltr>`[.., b]`</span>  و \"\n#~ \"<span dir=ltr>`[a@..,b]`</span> را نشان دهید.\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"هر دو تابع را برای کار بر روی ماتریس‌های 3 × 3 هاردکد کنید.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"متغیرهای `ثابت` و `ایستا` دو روش متفاوت برای ایجاد مقادیر با اسکوپ گلوبال \"\n#~ \"(قابل دسترس در کل برنامه) هستند که نمی‌توانند در طول اجرای برنامه منتقل یا \"\n#~ \"دوباره تعریف شوند.\"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"جدول خاصیت‌ها:\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"دارای یک آدرس واقعی در حافظه\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"خیر (به صورت درون خطی)\"\n\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"در طول‌عمر کل برنامه زنده می‌ماند؟\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"میتوان قابل تغییر اش کرد\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"بلی (unsafe)\"\n\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"ارزیابی در زمان کامپایل\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"بلی (در زمان کامپایل ساخته می‌شود)\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"به صورت درون‌خطی هر جا که استفاده میشود قرار میگیرد\"\n\n#, fuzzy\n#~ msgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"به [تطبیق الگو](../pattern-matching.md) مراجعه کنید تا در مورد الگوها در \"\n#~ \"Rust اطلاعات بیشتری کسب کنید.\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"اصطلاحات راست:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>&amp;str</code></span>  یک مرجع غیرقابل \"\n#~ \"تغییر به یک برش از رشته‌ است.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` یک بافر رشته‌ای قابل تغییر است.\"\n\n#, fuzzy\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"هیچ رفتار تعریف نشده‌ای در زمان اجرا:\"\n\n#, fuzzy\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"aarch64-paging\"\n\n#, fuzzy\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"استثناها\"\n\n#, fuzzy\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"یک مثال ساده\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"چرا Rust؟\"\n\n#~ msgid \"An Example in C\"\n#~ msgstr \"یک مثال در زبان C\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"ضمانت‌های زمان کامپایل\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"ضمانت‌های زمان اجرا\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"ویژگی‌های جدید\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"سینتکس‌های مقدماتی\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String در مقابل str\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"داکیومنت نویسی\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"سربارگذاری\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"آرایه ها و حلقه های for\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"عبارت  for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"عبارت حلقه while\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"توقف و ادامه دادن (break & continue)\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"عبارت loop\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Variant Payloads\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"اندازه ی Enum ها\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"عبارت if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"عبارت while let\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"عبارت تطبیق\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"تخریب آرایه‌ها\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"گاردهای تطبیق\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"مقایسه پشته و انباشت\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"حافظه پشته\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"مدیریت دستی حافظه\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"مدیریت حافظه مبتنی بر دامنه\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"جمع آوری زباله (GC)\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"مدیریت حافظه Rust\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"های جابجا شده در Rust String\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"آزاد سازی مضاعف در سی‌پلاس‌پلاس مدرن\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"جابه‌جایی در صدا زدن توابع\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"کپی برداری و شبیه سازی\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"قرض گرفتن‌های مشترک و منحصر به فرد\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"نحو اختصاری فیلد\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"ذخیره سازی کتاب\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option و Result\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"تکرار کننده ها و مالکیت\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"رشته ها و تکرار کننده‌ها (Strings and Iterators)\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"متدهای جنریک\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"تک شکلی\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"متدهای پیشفرض\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"صفات مهم\"\n\n#~ msgid \"Default\"\n#~ msgstr \"پیش‌فرض\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"عملگر‌های: جمع و ضرب, ...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"بسته شدن‌ها: Fn, FnMut, FnOnce\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"یک کتابخانه GUI ساده\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"نقطه‌ها و چند ضلعی‌ها\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"گرفتن Stack در حال بازگشایی\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"مدیریت خطای ساختاری\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"انتشار خطاها با استفاده از عملگر ؟\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"تبدیل انواع خطا\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"استخراج شماره‌های خطا\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"اضافه کردن زمینه (Context) به خطاها\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"صفر کپی (zerocopy)\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"چرخش\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"روز ۱ صبح\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"روز ۱ عصر\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"روز ۲ صبح\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"روز ۲ عصر\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"روز ۳ صبح\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"روز ۳ عصر\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"صبح‌گاه با Bare Metal Rust\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"صبح‌گاه با همزمانی (Concurrency)\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"همزمانی: عصر\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"روز 1: Rust مقدمات, سینتکس, کنترل جریان, ساخت و مصرف مقادیر.\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"روز 2: مدیریت حافظه, مالکیت, انواع داده مرکب و کتابخانه استاندارد.\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"روز 3: جنریک‌ها, صفات, مدیریت خطا, تست‌کردن و Rust ناایمن.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"سازوکارهای کنترل جریان: `if`, `if let`, `while`, `while let`, `break` و \"\n#~ \"`continue`. \"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"ایده برای روز اول این است که فقط به اندازه کافی از Rust را نشان دهیم تا \"\n#~ \"بتوانیم در مورد بررسی کننده قرض `borrow checker` معروف صحبت کنیم.نحوه \"\n#~ \"مدیریت حافظه توسط Rust یک ویژگی مهم است و باید آن را بلافاصله به \"\n#~ \"دانشجویان نشان دهیم.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"اینجا مکان مناسبی برای یک برنامه ریزی است.,اگر که شما این موضوع را در \"\n#~ \"کلاس درس می دهیدما پیشنهاد می کنیم که روز را به دو قسمت تقسیم \"\n#~ \"کنید(اسلاید‌ها را دنبال کنید)\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"صبح: ۹:۰۰ تا ۱۲:۰۰\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"بعد از ظهر: ۱۳:۰۰ تا ۱۶:۰۰\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"البته می‌توانید این را بر‌حسب نیاز تنظیم کنید. لطفا مطمئن شوید که استراحت‌ها \"\n#~ \"را نیز درنظر بگیرید، ما توصیه می‌کنیم هر ساعت یک استراحت داشته باشید!\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"یک برنامه کوچیک در Rust:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // نقطه ورودی برنامه\\n\"\n#~ \"    let mut x: i32 = 6;  //انتساب متغیر قابل تغییر\\n\"\n#~ \"    print!(\\\"{x}\\\");       // ماکرویی برای چاپ‌کردن به مانند printf\\n\"\n#~ \"    while x != 1 {       // هیچ پرانتزی اطراف دستور نیست\\n\"\n#~ \"        if x % 2 == 0 {  // محاسبات مانند بقیه زبان ها \\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"این کد حدس کولاتز (`Collatz conjecture`) را پیاده سازی می کند: اعتقاد بر \"\n#~ \"این است که حلقه همیشه تمام می شود، اما این هنوز ثابت نشده است. کد را \"\n#~ \"ویرایش کنید و با ورودی‌های مختلف بازی کنید.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"توضیح دهید که همه متغیرها از نوع استاتیک هستند. سعی کنید `i32` را حذف \"\n#~ \"کنید تا استنتاج نوع را فعال کنید. با `i8` امتحان کنید و سرریز \"\n#~ \"(`overflow`) عدد صحیح در زمان اجرا را فعال کنید..\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"\"\n#~ \"`let mut x` را به `let x` تغییر دهید، و خطای کامپایلر را بررسی کنید.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"نشان دهید که چگونه <span dir=ltr>`print!`</span> در صورت عدم تطابق \"\n#~ \"آرگومان‌ها با قالب رشته (`format string`) ، خطای کامپایل می دهد.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"نشان دهید که چگونه در صورت تمایل به چاپ عبارتی که پیچیده‌تر از یک متغیر \"\n#~ \"واحد است،  باید از ‍`{}` به عنوان جایگزین استفاده کنید.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"کتابخانه استاندارد را به دانشجویان نشان دهید، به آنها نشان دهید که چگونه \"\n#~ \"`std::fmt` را که قوانین زبان-کوچک قالب‌بندی را دارد جستجو کنند. مهم است که \"\n#~ \"دانشجویان  با جستجو در کتابخانه استاندارد آشنا شوند.\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"در یک خط‌‌‌‌فرمان (`shell`) دستور `rustup doc std::fmt` را بزنید تا مستندات \"\n#~ \"محلی ‍`std::fmt` را توی مرورگر باز کند.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"ایمنی حافظه در زمان کامپایل.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"عدم وجود رفتار نامشخص در زمان اجرا.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"ویژگی‌های زبانی مدرن.\"\n\n#~ msgid \"Let's consider the following \\\"minimum wrong example\\\" program in C:\"\n#~ msgstr \"\"\n#~ \"بیایید برنامه «نمونه ای از حداقل اشتباهات» زیر را در C در نظر بگیریم:\"\n\n#~ msgid \"How many bugs do you spot?\"\n#~ msgstr \"چند باگ پیدا می کنید؟\"\n\n#~ msgid \"\"\n#~ \"Despite just 29 lines of code, this C example contains serious bugs in at \"\n#~ \"least 11:\"\n#~ msgstr \"با وجود تنها ۲۹ خط کد، این مثال C حداقل 11 باگ جدی دارد: \"\n\n#~ msgid \"Assignment `=` instead of equality comparison `==` (line 28)\"\n#~ msgstr \"تخصیص `=` به جای مقایسه برابری `==` (خط ۲۸)\"\n\n#~ msgid \"Excess argument to `printf` (line 23)\"\n#~ msgstr \"ارگمان اضافی به `printf` (خط ۲۳)\"\n\n#~ msgid \"File descriptor leak (after line 26)\"\n#~ msgstr \"نشت توصیفگر فایل (`File descriptor`) (پس از خط ۲۶)\"\n\n#~ msgid \"Forgotten braces in multi-line `if` (line 22)\"\n#~ msgstr \"فراموشی پرانتز در `if` چند خطی (خط ۲۲)\"\n\n#~ msgid \"Forgotten `break` in a `switch` statement (line 32)\"\n#~ msgstr \"فراموشی `break` در `switch` (خط ۳۲)\"\n\n#~ msgid \"\"\n#~ \"Forgotten NUL-termination of the `buf` string, leading to a buffer \"\n#~ \"overflow (line 29)\"\n#~ msgstr \"فراموشی خاتمه `NUL` رشته `buf`، منجر به سرریز بافر (خط ۲۹) \"\n\n#~ msgid \"Memory leak by not freeing the `malloc`\\\\-allocated buffer (line 21)\"\n#~ msgstr \"نشت حافظه با آزاد نکردن بافر اختصاص داده شده توسط `malloc` (خط ۲۱)\"\n\n#~ msgid \"Out-of-bounds access (line 17)\"\n#~ msgstr \"دسترسی خارج از محدوده (خط ۱۷)\"\n\n#~ msgid \"Unchecked cases in the `switch` statement (line 11)\"\n#~ msgstr \"حالات بررسی نشده در `switch` (خط ۱۱)\"\n\n#~ msgid \"Unchecked return values of `stat` and `fopen` (lines 18 and 26)\"\n#~ msgstr \"مقادیر برگشتی از `stat` و `fopen`  بررسی نشده (خطوط ۱۸ و ۲۶)\"\n\n#~ msgid \"\"\n#~ \"_Shouldn't these bugs be obvious even for a C compiler?_  \\n\"\n#~ \"No, surprisingly this code compiles warning-free at the default warning \"\n#~ \"level, even in the latest GCC version (13.2 as of writing).\"\n#~ msgstr \"\"\n#~ \"_آیا این باگها نباید برای یک کامپایلر C نمایان باشد؟_  \\n\"\n#~ \"نه، به طور شگفت انگیزی این کد بدون هیچ هشدار در سطح هشدار(`warning`) پیش \"\n#~ \"فرض کامپایل می شود، حتی در آخرین نسخه GCC (۱۳.۲  این کتاب در زمان نوشتن).\"\n\n#~ msgid \"\"\n#~ \"_Isn't this a highly unrealistic example?_  \\n\"\n#~ \"Absolutely not, these kind of bugs have lead to serious security \"\n#~ \"vulnerabilities in the past. Some examples:\"\n#~ msgstr \"\"\n#~ \"_آیا این یک مثال خیلی غیر واقعی نیست؟_  \\n\"\n#~ \"ابدا نه، این نوع از باگ‌ها در گذشته منجر به آسیب‌پذیری‌های امنیتی جدی \"\n#~ \"شده‌اند. چند نمونه:\"\n\n#~ msgid \"\"\n#~ \"Assignment `=` instead of equality comparison `==`: [The Linux Backdoor \"\n#~ \"Attempt of 2003](https://freedom-to-tinker.com/2013/10/09/the-linux-\"\n#~ \"backdoor-attempt-of-2003)\"\n#~ msgstr \"\"\n#~ \"تخصیص `=` به جای مقایسه برابر بودن `==`: [The Linux Backdoor Attempt of \"\n#~ \"2003](https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-attempt-\"\n#~ \"of-2003)\"\n\n#~ msgid \"\"\n#~ \"Forgotten braces in multi-line `if`: [The Apple goto fail vulnerability]\"\n#~ \"(https://dwheeler.com/essays/apple-goto-fail.html)\"\n#~ msgstr \"\"\n#~ \"فراموشی پرانتز در `if` چند خطی: [The Apple goto fail vulnerability]\"\n#~ \"(https://dwheeler.com/essays/apple-goto-fail.html)\"\n\n#~ msgid \"\"\n#~ \"Forgotten `break` in a `switch` statement: [The break that broke sudo]\"\n#~ \"(https://nakedsecurity.sophos.com/2012/05/21/anatomy-of-a-security-hole-\"\n#~ \"the-break-that-broke-sudo)\"\n#~ msgstr \"\"\n#~ \"فراموشی گذاشتن `break` در `switch`: <span dir=ltr>[The break that broke \"\n#~ \"sudo](https://nakedsecurity.sophos.com/2012/05/21/anatomy-of-a-security-\"\n#~ \"hole-the-break-that-broke-sudo) <span>\"\n\n#~ msgid \"\"\n#~ \"_How is Rust any better here?_  \\n\"\n#~ \"Safe Rust makes all of these bugs impossible:\"\n#~ msgstr \"\"\n#~ \"_چطوری زبان راست در اینجا بهتر عمل می‌کند?_  \\n\"\n#~ \"راست ایمن تمام این باگ‌ها را غیرممکن می‌کند:\"\n\n#~ msgid \"Assignments inside an `if` clause are not supported.\"\n#~ msgstr \"تخصیص‌ها در داخل یک شرط `if` پشتیبانی نمی‌شوند.\"\n\n#~ msgid \"Format strings are checked at compile-time.\"\n#~ msgstr \"قالب‌بندی رشته‌ها در زمان کامپایل بررسی می‌شوند.\"\n\n#~ msgid \"Resources are freed at the end of scope via the `Drop` trait.\"\n#~ msgstr \"منابع در پایان اسکوپ از طریق ویژگی `Drop` آزاد می‌شوند.\"\n\n#~ msgid \"All `if` clauses require braces.\"\n#~ msgstr \"همه شرط‌های `if` نیاز به پرانتز دارند.\"\n\n#~ msgid \"\"\n#~ \"`match` (as the Rust equivalent to `switch`) does not fall-through, hence \"\n#~ \"you can't accidentally forget a `break`.\"\n#~ msgstr \"\"\n#~ \"دستور`match` (به عنوان معادل Rust برای `switch`) فرو نمی‌پاشد (منظور fall-\"\n#~ \"through  پذیر بودن ان است) ، بنابراین نمی‌توانید به طور تصادفی یک break را \"\n#~ \"فراموش کنید.\"\n\n#~ msgid \"Buffer slices carry their size and don't rely on a NUL terminator.\"\n#~ msgstr \"\"\n#~ \"برش‌های بافر اندازه خود را حمل می‌کنند و به خاتمه دهنده `NUL` متکی نیستند.\"\n\n#~ msgid \"\"\n#~ \"Heap-allocated memory is freed via the `Drop` trait when the \"\n#~ \"corresponding `Box` leaves the scope.\"\n#~ msgstr \"\"\n#~ \"حافظه اختصاص داده شده به پشته از طریق ویژگی `Drop` زمانی آزاد می‌شود که \"\n#~ \"`Box` مورد نظر اسکوپ مربوطه را ترک کند.‍\"\n\n#~ msgid \"\"\n#~ \"Out-of-bounds accesses cause a panic or can be checked via the `get` \"\n#~ \"method of a slice.\"\n#~ msgstr \"\"\n#~ \"دسترسی‌های خارج از محدوده باعث پانیک می‌شوند یا می‌توان آنها را از طریق متد \"\n#~ \"get یک برش (`slice`) بررسی کرد.\"\n\n#~ msgid \"`match` mandates that all cases are handled.\"\n#~ msgstr \"دستور `match` الزام می‌کند که حالات بررسی شوند.\"\n\n#~ msgid \"\"\n#~ \"Fallible Rust functions return `Result` values that need to be unwrapped \"\n#~ \"and thereby checked for success. Additionally, the compiler emits a \"\n#~ \"warning if you miss to check the return value of a function marked with \"\n#~ \"`#[must_use]`.\"\n#~ msgstr \"\"\n#~ \"توابع خطا پذیر در زبان Rust مقدار Result را برمی‌گردانند که باید باز شوند \"\n#~ \"و در نتیجه برای موفقیت بررسی شوند. علاوه بر این، اگر بررسی مقدار برگشتی \"\n#~ \"تابعی که با <span dir=ltr>`#[must_use]`</span> علامت گذاری شده است را \"\n#~ \"فراموش کنید، کامپایلر هشدار می‌دهد.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"مدیریت حافظه ایستا در زمان کامپایل:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"\"\n#~ \"هیچ نشت حافظه‌ای وجود ندارد (_به طور کلی_، به یادداشت‌ها مراجعه کنید).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"ایجاد نشت حافظه در Rust (ایمن) امکان‌پذیر است. برخی از نمونه‌ها عبارتند از:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"می توانید از <span dir=ltr>[`Box::leak`](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html#method.leak)</span>  برای نشت دادن یک اشاره‌گر \"\n#~ \"استفاده کنید.یک مورد استفاده از این کار می‌تواند برای بدست آوردن متغیرهای \"\n#~ \"ایستا با مقداردهی اولیه و اندازه در زمان اجرا باشد.\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"می توانید از <span dir=ltr>[`std::mem::forget`](https://doc.rust-lang.org/\"\n#~ \"std/mem/fn.forget.html)</span>  استفاده کنید تا کامپایلر «مقدار» را \"\n#~ \"فراموش کند (به این معنا که تابع مخرب (`destructor`) هرگز اجرا نمی‌شود).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"همچنین می‌توانید به طور تصادفی یک [چرخه ارجاع](https://doc.rust-lang.org/\"\n#~ \"book/ch15-06-reference-cycles.html) با `Rc` یا `Arc` ایجاد کنید.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"در واقع، برخی از افراد پر کردن بی نهایت یک مجموعه را به عنوان نشت حافظه \"\n#~ \"در نظر می‌گیرند و Rust از آن محافظت نمی‌کند.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"برای این دوره، «هیچ نشت حافظه ای» باید به عنوان «تقریبا هیچ نشت حافظه \"\n#~ \"_تصادفی_» درنظر گرفته شود.\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"سرریز عدد صحیح از طریق پرچم زمان کامپایل [`overflow-checks`](https://doc.\"\n#~ \"rust-lang.org/rustc/codegen-options/index.html#overflow-checks) تعریف شده \"\n#~ \"است. اگر فعال باشد، برنامه خطا خواهد کرد (یک خرابی به صورت کنترل شده)، در \"\n#~ \"غیر این صورت wrap-around خواهید داشت.به طور پیش فرض، در حالت توسعه `debug \"\n#~ \"(cargo build)` شما خطا خواهید داشت. و در حالت گرفتن خروجی برای پروداکشن \"\n#~ \"`release (cargo build --release)` حالت wrap-around خواهید داشت.\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"بررسی محدوده نمی‌تواند با پرچم کامپایل غیرفعال شود. همچنین نمی‌توان آن را \"\n#~ \"به طور مستقیم با کلمه کلیدی `unsafe` غیرفعال کرد. با این حال، `unsafe` به \"\n#~ \"شما امکان می‌دهد توابعی مانند `slice::get_unchecked` را صدا بزنید که بررسی \"\n#~ \"محدوده را انجام نمی‌دهد. \"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"زبان Rust با استفاده از تمام تجربیاتی که در دهه‌های گذشته به دست آمده \"\n#~ \"ساخته شده است.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"ویژگی‌های زبان\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"ابزارها\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"انتزاع‌های بدون هزینه، مشابه <span dir=ltr>C++</span>، به این معنی است که \"\n#~ \"شما مجبور نیستید برای  ساختارهای برنامه‌نویسی سطح بالاتر با حافظه یا CPU \"\n#~ \"«هزینه»‌ای پرداخت کنید. به عنوان مثال، نوشتن یک حلقه با استفاده از for \"\n#~ \"باید تقریباً به همان دستورالعمل‌های سطح پایین به عنوان استفاده از ساختار \"\n#~ \"<span dir=ltr>`iter().fold()`</span> منجر شود.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"ارزش ذکر را دارد که Enum‌های زبان Rust  از «انواع داده جبری» هستند که \"\n#~ \"همچنین به عنوان «انواع جمع» شناخته می‌شوند، که به تایپ‌ سیستم اجازه می‌دهد \"\n#~ \"چیزهایی مانند  <span dir=ltr>`Option<T>`</span>  و <span \"\n#~ \"dir=ltr>`Result<T, E>`</span> را بیان کند.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"به افراد یادآوری کنید که خطاها را بخوانند --- بسیاری از توسعه دهندگان به \"\n#~ \"نادیده گرفتن خروجی طولانی کامپایلر عادت کرده‌اند. کامپایلر Rust به طور \"\n#~ \"قابل توجه‌ای پرحرف‌تر از سایر کامپایلرها است. اغلب بازخوردهای _عملیاتی_ را \"\n#~ \"در اختیار شما قرار می‌دهد که آماده کپی و پیست کردن در کد شما هستند.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"کتابخانه استاندارد Rust در مقایسه با زبان‌هایی مانند Java، Python و Go \"\n#~ \"کوچک است.  زبان Rust با چندین چیز که ممکن است آنها را استاندارد و ضروری \"\n#~ \"در نظر بگیرید همراه نیست:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"\"\n#~ \"یک تولید‌کننده عدد تصادفی، اما <span dir=ltr>[کتابخانه `rand`](https://\"\n#~ \"docs.rs/rand/)</span> را ببینید.\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"پشتیبانی از SSL یا TLS، اما میتوانید <span dir=ltr>[کتابخانه `rusttls`]\"\n#~ \"(https://docs.rs/rustls/)</span> را ببینید.\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"پشتیبانی از JSON، اما <span dir=ltr>[کتابخانه `serde_json`](https://docs.\"\n#~ \"rs/serde_json/)</span> را ببینید.\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"منطق پشت این امر این است که نمیتوان عملکردی را از کتابخانه استاندارد حذف \"\n#~ \"کرد، بنابراین باید بسیار پایدار باشد. برای مثال‌های بالا، جامعه Rust هنوز \"\n#~ \"در تلاش است تا بهترین راه حل را پیدا کند --- و شاید برای برخی از این \"\n#~ \"موارد، یک «بهترین راه حل» وجود نداشته باشد. \"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"زبان Rust همراه با یک مدیر بسته درون-ساختی به اسم Cargo ارائه می شود و \"\n#~ \"این امر  دانلود و کامپایل کردن crates شخص ثالث را بسیار آسان می کند. یکی \"\n#~ \"از پیامدهای این امر این است که کتابخانه استاندارد می تواند کوچکتر باشد.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"یافتن crates خوب شخص ثالث می تواند مشکل باشد. سایت‌هایی مانند <span \"\n#~ \"dir=ltr><https://lib.rs/></span> با اجازه مقایسه معیارهای سلامت برای \"\n#~ \"crates به شما کمک می‌کنند تا یک مورد خوب و قابل اعتماد را پیدا کنید.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/): یک پیاده  سازی LSP است \"\n#~ \"که در IDE‌ها و ویرایشگرهای متن اصلی استفاده می‌شود.\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>\\\"foo\\\"</code>, <code class=hljs>\\\"two\\n\"\n#~ \"lines\\\"</code></span>\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"مانند <span dir=ltr>C++</span>، راست دارای مراجع است:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"باید هنگام تعریف <span dir=ltr>`ref_x`</span> ارجاع دهی شود، مشابه \"\n#~ \"اشاره‌گرهای C و <span dir=ltr>C++</span>.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"مراجع‌ای که به‌عنوان `mut` تعریف می‌شوند، می‌توانند در طول عمر خود به مقادیر \"\n#~ \"مختلفی ارجاع داده شوند.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"گفته می‌شود که یک مرجع مقدار مورد اشاره خود را «قرض می‌گیرد».\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"راست برای اینکه اطمینان حاصل کند طول‌عمر همه مراجع به اندازه کافی است, \"\n#~ \"آنها را رهگیری می‌کند.\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"<span dir=ltr>`String`</span> در مقابل <span dir=ltr>`str`</span> \"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"شما می‌توانید برش‌های &str را از <span dir=ltr>`String`</span> از طریق `&` \"\n#~ \"و انتخاب محدوده به صورت اختیاری، قرض بگیرید.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"یک نسخه راست از سوال مصاحبه معروف مصاحبه [FizzBuzz](https://en.wikipedia.\"\n#~ \"org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"ما در <span dir=ltr>`main`</span> به یک تابعی که در زیرش نوشته شده است \"\n#~ \"اشاره می‌کنیم.  نیازی به اعلان از قبل تابع <span dir=ltr>`main`</span> یا \"\n#~ \"در بخش هدر نیست. \"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"عبارت تعیین محدوده در حلقه <span dir=ltr>`for`</span> در <span \"\n#~ \"dir=ltr>`print_fizzbuzz_to()`</span> حاوی <span dir=ltr>`=n`</span> است \"\n#~ \"که باعث می‌شود محدوده حد بالا را هم شامل شود (آخرین عنصر).\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"همه موارد زبان در راست را می‌توان با استفاده از سینتکس ویژه `///` مستند \"\n#~ \"کرد.\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"این دوره برای صرفه‌جویی در نوشتار متنی rustdoc را در اسلایدها قرار نمی‌دهد، \"\n#~ \"اما در کدهای دنیای واقعی باید وجود داشته باشد.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"کامنت های داخل کد در بخش‌های بعدی (در صفحه مربوط به ماژول‌ها) مورد بحث قرار \"\n#~ \"می‌گیرد و نیازی به پرداختن به آنها در اینجا نیست.\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"کامنت های rustdoc می‌توانند حاوی قطعه کدهایی باشند که می‌توانیم آنها را با \"\n#~ \"استفاده از <span dir=ltr>`cargo test`</span> اجرا و تست کنیم.  ما در  \"\n#~ \"[بخش تست نویسی](../testing/doc-tests.html)  در مورد این تست‌ها بحث خواهیم \"\n#~ \"کرد.\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"متدها، تابع‌هایی مربوط به یک نوع خاص هستند. آرگومان `self` یک متد، نمونه‌ای \"\n#~ \"از نوعی است که با آن مرتبط است:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"در تمرین امروز و کلاس فردا بیشتر به متدها می‌پردازیم.\"\n\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"\"\n#~ \"یک متد استاتیک به نام <span dir=ltr>`Rectangle::new`</span> اضافه کنید و \"\n#~ \"آن را از `main` فراخوانی کنید:\"\n\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"در حالی که از _نظر فنی_  راست یک متد سازنده خاص ندارد، معمولاً  از متدهای \"\n#~ \"استاتیک برای مقداردهی اولیه ساختارها استفاده می‌شود (اما الزامی نیست). \"\n#~ \"سازنده اصلی ، <span dir=ltr>`Rectangle { width, height }`</span> ،  را \"\n#~ \"می‌توان به طور مستقیم فراخوانی کرد. برای اطلاعات بیشتر [Rustnomicon]\"\n#~ \"(https://doc.rust-lang.org/nomicon/constructors.html) را ببینید.\"\n\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"برای نشان دادن اینکه چنین متدهای استاتیک می‌توانند آرگومان‌های دلخواه \"\n#~ \"بگیرند،   با ارگمان‌های یک سازنده <span dir=ltr>`Rectangle::square(width: \"\n#~ \"u32)`</span> اضافه کنید.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"سربارگذاری تابع (Function Overloading)\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"سربارگذاری پشتیبانی نمیشود, چون:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"همیشه تعداد ثابتی از آرگومان‌ها می‌گیرد.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"مقادیر پیش‌فرض پشتیبانی نمی‌شوند:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"تمام محل‌های فراخوانی دارای تعداد یکسانی از آرگومان هستند.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"گاهی اوقات از ماکروها به عنوان جایگزین استفاده می‌شود.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"با این حال، پارامترهای تابع می‌توانند جنریک باشند:\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"هنگام استفاده از جنریک‌ها، <span dir=ltr>`Into<T>`</span>  کتابخانه \"\n#~ \"استاندارد می‌تواند نوعی چندشکلی (polymorphism) محدود در انواع آرگومان‌ها \"\n#~ \"فراهم کند. جزئیات بیشتر را در بخش‌های بعدی خواهیم دید.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"روز اول: تمرین‌های صبح\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"در این تمرین‌ها، دو بخش از راست را بررسی خواهیم کرد:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"تبدیل‌های ضمنی بین انواع\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"آرایه‌ها و حلقه‌های `for`\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"چند نکته را هنگام حل تمرین‌ها درنظر بگیرید:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"در صورت امکان، از نصب محلی راست استفاده کنید. از این طریق می‌توانید از \"\n#~ \"تکمیل خودکار در ویرایشگر خود استفاده کنید.  برای جزئیات بیشتر در مورد نصب \"\n#~ \"راست، صفحه مربوط به [استفاده از کارگو](../../cargo.md)  را ببینید.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"در غیر این صورت از `Rust Playground` استفاده کنید.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"قطعه کدها به صورت عمدی قابل ویرایش نیستند: قطعه کدهای درون‌خطی اگر از صفحه \"\n#~ \"خارج شوید،  به حالت پیش‌فرض بازنشانی می‌شوند و تغییرات شما درنظر گرفته \"\n#~ \"نمی‌شود.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"راست به طور خودکار تبدیل‌های صریح بین انواع را اعمال نمی‌کند ([برخلاف زبان \"\n#~ \"<span dir=ltr>`C++`</span>](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)).به عنوان مثال میتوانید این را در یک برنامه ببینید:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"همه انواع عدد صحیح راست، تریت‌های (Trait) [<span dir=ltr>`Into<T>`</span>]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) و [<span \"\n#~ \"dir=ltr>`From<T>`</span>](https://doc.rust-lang.org/std/convert/trait.\"\n#~ \"From.html) را پیاده‌سازی می‌کنند تا به ما امکان تبدیل بین انواع عددی صحیح \"\n#~ \"را بدهند. با پیاده سازی ویژگی <span dir=ltr>`From<T>`</span> همه انواع به \"\n#~ \"صورت مشترک یک متد <span dir=ltr>`from()`</span> را دارند. با پیاده‌سازی \"\n#~ \"تریت <span dir=ltr>`Into<T>`</span>  همه انواع یک متد مشترک به اسم <span \"\n#~ \"dir=ltr>`into()`</span> را دارند. پیاده‌سازی این تریت‌ها راهی است که یک نوع \"\n#~ \"بیان می‌کند که می‌تواند به نوع دیگری تبدیل شود.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"کتابخانه استاندارد یک پیاده‌سازی <span dir=ltr>`From<i8> for i16`</span> \"\n#~ \"دارد <span dir=ltr>`i16`</span> دارد، به این معنی که می‌توانیم یک متغیر \"\n#~ \"`x` از نوع `i8` را با فراخوانی <span dir=ltr>`i16::from(x)`</span>  به یک \"\n#~ \"<span dir=ltr>`i16`</span>  تبدیل کنیم.  یا به شیوه ساده‌تر، با <span \"\n#~ \"dir=ltr>`x.into()`</span> ، زیرا پیاده‌سازی <span dir=ltr>`From<i8>`</\"\n#~ \"span>  برای نوع <span dir=ltr>`i16`</span>  به طور خودکار پیاده‌سازی<span \"\n#~ \"dir=ltr>`Into<i16>`</span>  برای نوع `i8` را ایجاد می‌کند.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"همین امر برای پیاده‌سازی‌های <span dir=ltr>`From`</span> خودتان برای انواع \"\n#~ \"خودتان نیز صدق می‌کند،  بنابراین کافیست فقط <span dir=ltr>`From`</span> را \"\n#~ \"پیاده‌سازی کنید تا به طور خودکار پیاده‌سازی <span dir=ltr>`Into`</span> \"\n#~ \"مربوطه را دریافت کنید.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"برنامه فوق را اجرا و به خطای کامپایلر نگاه کنید.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"کد بالا را به گونه‌ای به‌روزرسانی کنید که از <span dir=ltr>`into()`</span> \"\n#~ \"برای انجام تبدیل استفاده شود.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"نوع داده  `x` و `y` را به چیزهای دیگری (مانند `f32`, `bool`, `i128`) \"\n#~ \"تغییر دهید تا ببینید کدام انواع را می‌توانید به کدام انواع دیگر تبدیل \"\n#~ \"کنید.  سعی کنید انواع کوچک را به انواع بزرگ تبدیل کنید و برعکس. [مستندات \"\n#~ \"کتابخانه استاندارد](https://doc.rust-lang.org/std/convert/trait.From.\"\n#~ \"html) را بررسی کنید  تا ببینید آیا <span dir=ltr>`From<T>`</span> برای \"\n#~ \"تبدیل انواع‌ایی که بررسی می‌کنید پیاده‌سازی شده است یا نه.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"آرایه‌ها و حلقه‌های `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"دیدیم که یک آرایه را می‌توان به صورت زیر تعریف کرد: \"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"می‌توانید چنین آرایه‌ای را با درخواست نمایش اشکال‌زدایی آن با <span \"\n#~ \"dir=ltr>`{:?}`</span> چاپ کنید:\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"راست به شما این امکان را می‌دهد تا با استفاده از کلمه کلیدی `for` بر روی \"\n#~ \"چیزهایی مانند آرایه‌ها و رنج‌ها پیمایش کنید:\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"سوال جایزه‌دار\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"آیا می‌توانید به جای ماتریس‌های 3 × 3 هاردکد شده از برش‌های <span \"\n#~ \"dir=ltr>`&[i32]`</span>  برای آرگومان و انواع برگشتی تابع خود استفاده \"\n#~ \"کنید؟ چیزی شبیه <span dir=ltr>`&[&[i32]]`</span> برای برش-از-برش دو بعدی. \"\n#~ \"آیا امکان پذیر هست؟ چرا اره و چرا نه؟\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"برای دیدن یک پیاده‌سازی با کیفیت پروداکشن به جعبه [<span \"\n#~ \"dir=ltr>`ndarray`</span>](https://docs.rs/ndarray/) سر بزنید.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"راه‌حل‌ها و پاسخ به بخش جایزه در بخش جواب‌ها](solutions-morning.md#arrays-\"\n#~ \"and-for-loops) موجود است.\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"استفاده از ارجاع <span dir=ltr>`&array`</span>  در بخش <span dir=ltr>`for \"\n#~ \"n in &array`</span>  پیش‌نمایشی کوچکی از مسئله مالکیت است در قسمت عصر که \"\n#~ \"بعداً   به ان خواهیم پرداخت.\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"بدون استفاده از `&` ...\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"حلقه به گونه‌ای می‌بود که آرایه را مصرف می‌کند. این تغییری [در ویرایش سال \"\n#~ \"۲۰۲۱ معرفی شده است.](https://doc.rust-lang.org/edition-guide/rust-2021/\"\n#~ \"IntoIterator-for-arrays.html)\"\n\n#~ msgid \"\"\n#~ \"An implicit array copy would have occurred.  Since `i32` is a copy type, \"\n#~ \"then `[i32; 3]` is also a copy type.\"\n#~ msgstr \"\"\n#~ \"یک کپی آرایه ضمنی رخ می‌داد. از آنجایی که `i32` یک نوع کپی است، پس <span \"\n#~ \"dir=ltr>`[i32; 3]`</span>  نیز یک نوع کپی است.\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"همانطور که دیدیم، `if` در Rust یک عبارت است.  عبارت `if` برای آن استفاده \"\n#~ \"می‌شود که یکی از ۲ بلوک شرطی را در راست ایجاد کند. توجه داشته باشید که در \"\n#~ \"راست این بلاک  های `if`  میتوانند یک مقدار را برگرداند و در اصطلاح یک \"\n#~ \"مقدار داشته باشند. بقیه عبارات کنترل جریان نیز مشابه این کار میکنند.\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"قانون مشابه‌ای برای توابع نیز صدق می‌کند:  آخرین مقدار  در بلاک تابع مقدار \"\n#~ \"برگشتی است: \"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"هدف از این اسلاید نشان دادن این است که بلوک ها در Rust دارای نوع و مقدار \"\n#~ \"هستند. \"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"[حلقه `for`](https://doc.rust-lang.org/std/keyword.for.html)  به طور \"\n#~ \"نزدیکی به حلقه [حلقه `while let` ](while-let-expressions.md) مرتبط است. \"\n#~ \"حلقه `for` به طور خودکار  <span dir=ltr>`into_iter()`</span> را روی \"\n#~ \"عبارت  فراخوانی می‌کند و سپس روی آن پیشمایش انجام می‌دهد:\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"\"\n#~ \"مثل بقیه زبان‌ها می‌توانید از `break` و `continue` به صورت عادی استفاده \"\n#~ \"کنید.\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"پیشمایش اندیس در زبان راست دارای سینتکس خاصی نمی‌باشد.\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>(0..10)</code></span>  یک محدوده است که \"\n#~ \"ویژگی `Iterator` را پیاده‌سازی می‌کند.\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"متد `step_by`,  متدی است که یک `Iterator` دیگر با قابلیت در نظر نگرفتن \"\n#~ \"بقیه عناصر را برمی‌گرداند.\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"عناصر را در بردار تغییر دهید و خطاهای کامپایلر را توضیح دهید. بردار v را \"\n#~ \"قابل تغییر کنید (با اضافه کردن `mut`) و حلقه  `for` را به <span \"\n#~ \"dir=ltr>`for x in v.iter_mut()`</span> تغییر دهید.\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"عبارات `loop`\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"در نهایت، [کلمه کلیدی `loop`](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) وجود دارد که یک حلقه بی‌پایان \"\n#~ \"ایجاد می‌کند.\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"\"\n#~ \"اینجا باید از `break` یا `return` برای توقف حلقه و خروج از آن استفاده \"\n#~ \"کنید:\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"\"\n#~ \"حلقه `loop` را با یک مقدار متوقف کنید (به عنوان مثال <span dir=ltr>`break \"\n#~ \"8`</span> ) و آن را چاپ کنید.\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"به دلیل تعیین نوع ضمنی گذاشتن `i32` اختیاریست. با جلو  رفتن در این دوره \"\n#~ \"کمتر و کمتر آن را نشان خواهیم داد.\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"کد زیر به کامپایلر می‌گوید که بدون اینکه کد به صراحت نوع داده را مشخص کند، \"\n#~ \"در یک کانتینر عمومی (generic container)  خاص کپی کند، با استفاده از _ به \"\n#~ \"عنوان یک جایگزین برای اعلام نوع داده: \"\n\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) به [`FromIterator`](https://doc.rust-lang.org/std/\"\n#~ \"iter/trait.FromIterator.html) متکی است که [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) آن را پیاده‌سازی می‌کند.\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"متغیر‌های ایستا و ثابت\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"کد زیر نشان می دهد که چرا کامپایلر نمی تواند به سادگی از مکان های حافظه \"\n#~ \"که قبلا برای یک متغییر در نظر گرفته است به صورت مجدد وقتی که یک متغییر \"\n#~ \"غیر قابل تغییر داریم استفاده کند. حتی اگر چه نوع داده تغییر نکند.\"\n\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"در این صفحه نوع`Enum`به اسم `CoinFlip` که دارای `Heads` و `Tails` می‌باشد. \"\n#~ \"هنگام استفاده از `Enum`ها، به این اینگونه نام‌ها توجه کنید.\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"در هر دو، توابع مورد نیازشون در داخل یک بلاک `impl` تعریف می‌شوند.\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"می توانید شمارش های غنی تری را تعریف کنید که در آن انواع مختلف داده \"\n#~ \"باشند. سپس می‌توانید از دستور `match` برای استخراج داده‌ها از هر فیلد \"\n#~ \"استفاده کنید:\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"بر خلاف زبان‌های برخلاف C یا <span dir=ltr>`C++`</span> طبیق الگو به صورت \"\n#~ \"از بالا به پایین نمی‌باشد.\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"عبارت `match` دارای یک مقدار بازگشتی است. این مقدار آخرین عبارت در بازوی \"\n#~ \"`match` ای است که اجرا شده است.\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"از بالا شروع می‌کنیم و به دنبال الگویی هستیم که با مقدار مطابقت داشته \"\n#~ \"باشد، سپس کد پس از <span dir=ltr>`=>`</span> را اجرا می‌کنیم. بعد از اینکه \"\n#~ \"توی match اولین طبیق الگو انجام شد جستجو متوقف میشود.\"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"\"\n#~ \"دستور `match` یک فیلد تشخیصی پنهان (hidden discriminant field) در `enum` \"\n#~ \"را بررسی می کند.\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"\"\n#~ \"می توان با فراخوانی <span dir=ltr>`std::mem::discriminant()`</span> فیلد \"\n#~ \"تشخیصی پنهان  را دریافت کرد.\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"بهتره بدانیم که اگر `PartialEq` را برای ساختارهایی پیاده سازی کنیم. \"\n#~ \"قابلیت  `PartialEq`  بر برابری تأثیر نمی‌گذارد.\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr>`WebEvent::Click { ... }`</span> دقیقاً مانند <span \"\n#~ \"dir=ltr>`WebEvent::Click(Click)`</span> با <span dir=ltr>`struct Click \"\n#~ \"{ ... }`</span> در سطح بالا نیست.برای مثال, نسخه درون‌خطی نمی‌تواند ویژگی‌ها \"\n#~ \"را پیاده‌سازی کند.\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"`enum`ها در Rust به صورت فشرده بسته بندی شده اند، با در نظر گرفتن محدودیت \"\n#~ \"های ناشی از هم ترازی:\"\n\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"\"\n#~ \"زبان Rust, به صورت داخلی از یک فیلد (discriminant) برای رهگیری نوع \"\n#~ \"فیلدهای `enum` استفاده می کند.\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"سایر انواع‌داده را امتحان کنید، مانند:\"\n\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>dbg_size!(bool)</code></span>: اندازه توی \"\n#~ \"حافظه 1 بایت، فضای مورد نیاز برای align نیز  1 بایت است,\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>dbg_size!(Option<bool>)</code></span>:  \"\n#~ \"اندازه توی حافظه 1 بایت، ، فضای مورد نیاز برای align نیز  1 بایت است \"\n#~ \"(بهینه‌سازی خاص، در زیر ببینید)\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>dbg_size!(&i32)</code></span>: اندازه توی \"\n#~ \"حافظه ۸ بایت، ، فضای مورد نیاز برای align نیز  ۸ بایت است (روی ماشین ۶۴ \"\n#~ \"بیتی)\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>dbg_size!(Option<&i32>)</code></span>: \"\n#~ \"اندازه توی حافظه ۸ بایت، ، فضای مورد نیاز برای align نیز  ۸ بایت است \"\n#~ \"(بهینه‌سازی اشاره‌گر NULL را در زیر ببینید)\"\n\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"\"\n#~ \"بهینه‌سازی خاص: Rust الگوهای بیتی استفاده نشده را برای discriminant نوع \"\n#~ \"`Enum` ادغام می‌کند.\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"مثال پیچیده‌تر اگر می‌خواهید در مورد اتفاقی که می‌افتد زمانی که بیش از ۲۶۵ \"\n#~ \"عدد `Option` را به صورت تو در تو صدا بزنیم بحث کنید.\"\n\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"از نسخه 1.65، یک کلیدواژه مشابه به اسم  [`let-else`](https://doc.rust-\"\n#~ \"lang.org/rust-by-example/flow_control/let_else.html) اجازه می‌دهد تا یک \"\n#~ \"انتساب به صورت destructuring انجام شود، یا اگر شکست خورد، یک بلوک را اجرا \"\n#~ \"کند که برای خاتمه دادن به جریان کنترل عادی (با panic/return/break/\"\n#~ \"continue) ضروری است:\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"[کلمه‌کلیدی `match`](https://doc.rust-lang.org/reference/expressions/match-\"\n#~ \"expr.html) برای مطابقت یک مقدار در برابر یک یا چند الگو استفاده می‌شود. از \"\n#~ \"این نظر، مانند یک سری عبارات `if let` عمل می‌کند:\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"\"\n#~ \"مقادر بازگشتی از دستور `match` را در متغییری ذخیره کنید و آن را چاپ کنید.\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>.as_deref()</code></span> را حذف کنید و \"\n#~ \"خطا را توضیح دهید.\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>std::env::args().next()</code></span> یک \"\n#~ \"<span dir=ltr>`Option<String>`</span>  را برمی‌گرداند،چرا نمی توانیم به \"\n#~ \"عنوان `String` تطبیق الگو کنیم؟\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"<span dir=ltr><code class=hljs>as_deref()</code></span>  یک <span \"\n#~ \"dir=ltr>`Option<T>`</span> را به <span dir=ltr>`Option<&T::Target>`</\"\n#~ \"span>  تبدیل می‌کند. در مورد ما، این <span dir=ltr>`Option<String>`</span> \"\n#~ \"را به <span dir=ltr>`Option<&str>`</span> تبدیل می‌کند.\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"اکنون می‌توانیم از تطبیق الگو برای مطابقت با <span dir=ltr>`&str`</span> \"\n#~ \"داخل `Option` استفاده کنیم.\"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"\"\n#~ \"الگوی _ یک الگوی wildcard (هر حالتی) است که با هر مقداری مطابقت دارد.\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"می‌توان با جایگزینی یک کاراکتر`_` با یک متغیر، یا حذف نقل قول ها در اطراف \"\n#~ \"`q`، به نمایش نحوه کارکرد انتساب کمک کرد.\"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"می‌توانید تطبیق الگو را با یک ارجاع را نشان دهید.\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"این ممکن است زمان خوبی برای مطرح کردن مفهوم الگوهای غیرقابل انکار \"\n#~ \"(irrefutable patterns) باشد، زیرا این اصطلاح می تواند در پیام های خطا \"\n#~ \"ظاهر شود.\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"همچنین می‌توانید `structs` را destructure کنید:\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"\"\n#~ \"برای destructure کردن برش هایی با طول ناشناخته نیز با الگوهای طول ثابت \"\n#~ \"کار می کند.\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"هنگام تطابق، می توانید یک _guard_ به یک الگو اضافه کنید. این یک عبارت \"\n#~ \"بولین دلخواه است که در صورت مطابقت الگو اجرا می شود.\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"می توانید از متغیرهای تعریف شده در الگو در عبارت `if` خود استفاده کنید.\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"روز ۱: تمرین‌های عصر\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"ما روی ۲ تا چیز نگاهی می‌اندازیم:\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"الگوریتم  Luhn\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"تمرینی درباره تطبیق الگو\"\n\n#~ msgid \"\"\n#~ \"Try to solve the problem the \\\"simple\\\" way first, using `for` loops and \"\n#~ \"integers. Then, revisit the solution and try to implement it with \"\n#~ \"iterators.\"\n#~ msgstr \"\"\n#~ \"ابتدا سعی کنید مشکل را به روش «ساده» با استفاده از حلقه‌های `for` و اعداد \"\n#~ \"صحیح حل کنید. سپس،  سعی کنید آن را با استفاده از `iterator`ها پیاده‌سازی \"\n#~ \"کنید.\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"مدیریت حافظه: پشته (Stack) در مقابل انباشت (Heap)، مدیریت دستی حافظه، \"\n#~ \"مدیریت حافظه مبتنی بر اسکوپ و جمع آوری زباله. \"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Ownership: حرکت semantics،copying و cloning, borrowing  و lifetimes.\"\n\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"ساختارها و متدها.\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"کتابخانه استاندارد:  `String`, `Option` و `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` و `Arc`.\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"ماژول‌ها: قابل دیدن بودن, مسیرها و مدیریت سلسله مراتبی فایل‌سیستم\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"\"\n#~ \"قبل از هر چیزی, آنچه درباره مدیریت حافظه میدونیم رو بروز رسانی کنیم.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"پشته (Stack) در مقابل انباشت (Heap)\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"یک مثال از پشته و انباشت\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"شما خودتان حافظه انباشت را تخصیص داده و تخصیص‌زدایی می‌کنید.\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"اگر با دقت انجام نشود، این می تواند منجر به خرابی، اشکال، آسیب‌پذیری‌های \"\n#~ \"امنیتی و نشتی حافظه شود.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"مثالی در زبان C\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"\"\n#~ \"باید `free` را برای هر اشاره‌گری که با `malloc` تخصیص می‌دهید، فراخوانی \"\n#~ \"کنید:\"\n\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"اگر تابع بین `malloc` و `free` مقداری را بازگرداند و از تابع خارج شویم، \"\n#~ \"حافظه نشت می‌کند: اشاره گر گم می‌شود و نمی‌توانیم حافظه را تخصیص‌زدایی کنیم. \"\n#~ \"بدتر از آن، آزاد کردن مجدد اشاره گر یا دسترسی به یک اشاره گر که قبلا آزاد \"\n#~ \"شده می‌تواند منجر به آسیب‌پذیری‌های امنیتی قابل سوءاستفاده شود.\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"سازنده‌ها و مخرب‌ها به شما امکان می‌دهند تا به طول‌عمر یک شیء متصل (hook) \"\n#~ \"شوید.\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"با پیچیدن (wrapping) یک اشاره گر در یک شیء، می‌توانید هنگام تخریب شیء، \"\n#~ \"حافظه را آزاد کنید. کامپایلر تضمین می‌کند که این اتفاق می‌افتد، حتی اگر یک \"\n#~ \"exception ایجاد شود.\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"این اغلب به عنوان _resource acquisition is initialization_  (RAII) نامیده \"\n#~ \"می‌شود و به شما اشاره گرهای هوشمند می‌دهد.\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"ابجکت <span dir=ltr>`std::unique_ptr`</span> در پشته تخصیص داده می‌شود و \"\n#~ \"به حافظه‌ای که روی انباشت تخصیص داده شده اشاره می‌کند.\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"در پایان `say_hello`، تابع مخرب <span dir=ltr>`std::unique_ptr`</span> \"\n#~ \"اجرا می‌شود.\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"مخرب شیء `Person` را که به آن اشاره می‌کند، آزاد می‌کند.\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"هنگام انتقال مالکیت به یک تابع از سازنده‌های مخصوص انتقال استفاده می‌شود:\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"یک جایگزین برای مدیریت حافظه دستی و مبتنی بر اسکوپ، مدیریت حافظه خودکار \"\n#~ \"است:\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"برنامه نویس هیچ وقت به صورت صریح حافظه را تخصیص یا آزاد نمیکند.\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"یک جمع‌آوری زباله حافظه استفاده نشده را پیدا می‌کند و آن را برای برنامه‌نویس \"\n#~ \"تخصیص‌زدایی (آزاد) می‌کند.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"مثالی در Java\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"شیء `person` پس از بازگشت `sayHello` تخصیص‌زدایی نمی‌شود:\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"مدیریت حافظه در Rust\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"مدیریت حافظه در Rust ترکیبی از موارد زیر است:\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"ایمن و صحیح مانند جاوا، اما بدون جمع‌آوری زباله.\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"مبتنی بر اسکوپ مانند <span dir=ltr>C++</span>، اما کامپایلر همه موارد را \"\n#~ \"رعایت می‌کند.\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"کاربر Rust می‌تواند انتخاب کند که کدام انتزاع برای وضعیت مورد نظر مناسب \"\n#~ \"است، برخی مانند C  هزینه‌ای در زمان اجرا ندارند.\"\n\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"زبان Rust این کار را با مدل‌سازی صریح مالکیت انجام می‌دهد.\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"اگر توی این مرحله از شما پرسیده شد که چطوری این کار انجام می‌شود, میتوانید \"\n#~ \"به این موضوع که زبان راست معمولاً توسط انواع `wrapper RAII` مانند [`Box`]\"\n#~ \"(https://doc.rust-lang.org/std/boxed/struct.Box.html), [`Vec`](https://\"\n#~ \"doc.rust-lang.org/std/vec/struct.Vec.html), [`Rc`](https://doc.rust-lang.\"\n#~ \"org/std/rc/struct.Rc.html), یا [`Arc`](https://doc.rust-lang.org/std/sync/\"\n#~ \"struct.Arc.html) مدیریت را انجام میدهد. این‌ها مالکیت و تخصیص حافظه را از \"\n#~ \"طریق روش‌های مختلف دربرمی‌گیرند و از خطاهای بالقوه در C جلوگیری می‌کنند.\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"اگر درباره مخرب‌ها (destructors) از شما پرسیدند, مخرب ها معادل پیاده‌سازی \"\n#~ \"[Drop](https://doc.rust-lang.org/std/ops/trait.Drop.html) هستند.\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"یک مخرب می‌تواند در اینجا اجرا شود تا منابع را آزاد کند.\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"همیشه مالکیت یک مقدار را یک متغییر که بهش انتساب میدیم دارد\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"داده‌های انباشت از `s1` دوباره  برای `s2` استفاده می‌شود.\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"وقتی از اسکوپ `s1` خارج می‌شویم، هیچ اتفاقی نمی‌افتد.\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"اگر دانشجویان در مورد `derive` پرسیدند، کافی است بگوییم که این راهی برای \"\n#~ \"تولید کد در`Rust` در زمان کامپایل است. در این مورد، پیاده‌سازی‌های پیش‌فرض \"\n#~ \"صفت‌های `Copy` و `Clone` تولید می‌شوند.\"\n\n#, fuzzy\n#~ msgid \"Drawing A Simple GUI\"\n#~ msgstr \"یک کتابخانه GUI ساده\"\n\n#, fuzzy\n#~ msgid \"concurrency:\"\n#~ msgstr \"همزمانی\"\n\n#, fuzzy\n#~ msgid \"control flow:\"\n#~ msgstr \"کنترل جریان\"\n\n#, fuzzy\n#~ msgid \"error handling:\"\n#~ msgstr \"مدیریت خطا (Error Handling)\"\n\n#, fuzzy\n#~ msgid \"garbage collector:\"\n#~ msgstr \"Garbage Collection\"\n\n#, fuzzy\n#~ msgid \"generics:\"\n#~ msgstr \"Generics\"\n\n#, fuzzy\n#~ msgid \"integration test:\"\n#~ msgstr \"Integration Tests\"\n\n#, fuzzy\n#~ msgid \"main function:\"\n#~ msgstr \"فراخوانی متدهای ناامن\"\n\n#, fuzzy\n#~ msgid \"method:\"\n#~ msgstr \"متدها\"\n\n#, fuzzy\n#~ msgid \"module:\"\n#~ msgstr \"ماژول‌ها\"\n\n#, fuzzy\n#~ msgid \"ownership:\"\n#~ msgstr \"مالکیت\"\n\n#, fuzzy\n#~ msgid \"panic:\"\n#~ msgstr \"Panics\"\n\n#, fuzzy\n#~ msgid \"receiver:\"\n#~ msgstr \"درایور\"\n\n#, fuzzy\n#~ msgid \"standard library:\"\n#~ msgstr \"کتابخانه‌های استاندارد\"\n\n#, fuzzy\n#~ msgid \"struct:\"\n#~ msgstr \"ساختارها\"\n\n#, fuzzy\n#~ msgid \"thread:\"\n#~ msgstr \"تردها\"\n\n#, fuzzy\n#~ msgid \"trait:\"\n#~ msgstr \"trait:\"\n\n#, fuzzy\n#~ msgid \"union:\"\n#~ msgstr \"Unions\"\n\n#, fuzzy\n#~ msgid \"unit test:\"\n#~ msgstr \"تست‌های واحد (Unit Tests)\"\n\n#, fuzzy\n#~ msgid \"variable:\\\\\"\n#~ msgstr \"متغیرها\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"تطبیق الگو\"\n"
  },
  {
    "path": "po/fr.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-04-05T16:37:18-04:00\\n\"\n\"PO-Revision-Date: 2024-05-24 15:14-0400\\n\"\n\"Last-Translator: Olivier Charrez <olivier.charrez@hotmail.com>\\n\"\n\"Language-Team: French <traduc@traduc.org>\\n\"\n\"Language: fr\\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\"X-Generator: Poedit 3.4.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Bienvenue à Comprehensive Rust (le guide complet de Rust) 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Comment présenter le cours\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Structure du cours\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Raccourcis clavier\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Traductions\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Utiliser Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Écosystème de Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Exemples de code\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Exécuter Cargo localement\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Jour 1 : Matin\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"Bienvenue\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Qu'est-ce que Rust ?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variables\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Inférence de type\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Solutions\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Flux de contrôle\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`if` Expressions\"\nmsgstr \"expressions \\\"si\\\"\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"Boucles `for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"`for`\"\nmsgstr \"Boucles `for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"`break` and `continue`\"\nmsgstr \"`pause` et `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Portée et masquage\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Fonctions\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Jour 1 : Après-midi\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"Array Iteration\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Déstructuration des énumérations\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Références\"\n\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Références\"\n\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Références invalides\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Tranches\"\n\n#: src/SUMMARY.md src/references/strings.md\n#, fuzzy\nmsgid \"Strings\"\nmsgstr \"Cordes\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Structures\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Structures tuple\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Énumérations\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Static\"\nmsgstr \"`statique`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Const\"\nmsgstr \"`const`\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Jour 2 : Matin\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Filtrage par motif\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"Déstructuration des énumérations\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"Flux de contrôle\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Read et Write\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Méthodes\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"Implementing Traits\"\nmsgstr \"Implémentation de traits non sécurisés\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"Supertraits\"\nmsgstr \"Plus de traits\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"Associated Types\"\nmsgstr \"Types scalaires\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"Traits dérivés\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Exercices\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Génériques\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Fonctions externes\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Types de données génériques\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\n#, fuzzy\nmsgid \"Generic Traits\"\nmsgstr \"Génériques\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Traits lié\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\n#, fuzzy\nmsgid \"`impl Trait`\"\nmsgstr \"`Trait d'implémentation`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Jour 2 : Après-midi\"\n\n#: src/SUMMARY.md src/std-types.md\n#, fuzzy\nmsgid \"Standard Library Types\"\nmsgstr \"Bibliothèque standard\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Bibliothèque standard\"\n\n#: src/SUMMARY.md src/std-types/docs.md\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"Tests de documentation\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Option`\"\nmsgstr \"`Durée`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Result`\"\nmsgstr \"`Option`, `Résultat`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"String\"\n\n#: src/SUMMARY.md src/std-types/vec.md\n#, fuzzy\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"Exercices\"\n\n#: src/SUMMARY.md src/std-traits.md\n#, fuzzy\nmsgid \"Standard Library Traits\"\nmsgstr \"Bibliothèque standard\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\n#, fuzzy\nmsgid \"Comparisons\"\nmsgstr \"Comparaison\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"Itérateurs\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"`From` and `Into`\"\nmsgstr \"`De` et `Dans`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\n#, fuzzy\nmsgid \"Casting\"\nmsgstr \"Tester\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Lire` et `Ecrire`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\n#, fuzzy\nmsgid \"Closures\"\nmsgstr \"Fermetures\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: ROT13\"\nmsgstr \"Exercices\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Jour 3 : Matin\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Gestion de la mémoire\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Gestion automatique de la mémoire\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Possession\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Sémantique de déplacement\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Types composés\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Drop`\"\nmsgstr \"Drop\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"`Boîte`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Objets traits\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Jour 3 : Après-midi\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Emprunts\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"Emprunts\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"Emprunts\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"Interior Mutability\"\nmsgstr \"Interopérabilité\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Statistiques de santé\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Durées de vie\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Durées de vie dans les appels de fonction\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Durées de vie\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"Durées de vie\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Morning\"\nmsgstr \"Jour 1 : Matin\"\n\n#: src/SUMMARY.md src/iterators.md\n#, fuzzy\nmsgid \"Iterators\"\nmsgstr \"Itérateurs\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Iterator`\"\nmsgstr \"`Itérateur`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`FromIterator`\"\nmsgstr \"FromIterator\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Modules\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Hiérarchie du système de fichiers\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Visibilité\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/exercise.md\n#, fuzzy\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Une bibliothèque d'interface graphique\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Tester\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Modules de test\"\n\n#: src/SUMMARY.md src/testing/other.md\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"Autres projets\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Algorithme de Luhn\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Jour 1 : Après-midi\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Paniques\"\n\n#: src/SUMMARY.md src/error-handling/try.md\n#, fuzzy\nmsgid \"Try Operator\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Conversions implicites\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"\\\"Erreur\\\"\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`De` et `Dans`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Gestion structurée des erreurs avec `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust non sécurisé (_unsafe_)\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe\"\nmsgstr \"Rust non sécurisé (_unsafe_)\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Déréférencement des pointeurs nus\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Variables statiques mutables\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Unions\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Appel de fonctions non sécurisées\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Implémentation de traits non sécurisés\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Enveloppe FFI sécurisée\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Installation\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Règles de compilation\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Binaire\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Bibliothèque\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\n#, fuzzy\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Interface\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Service\"\nmsgstr \"Serveur\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Serveur\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Déployer\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Client\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Modification de l'API\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Updating Implementations\"\nmsgstr \"Mise en œuvre\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"AIDL Types\"\nmsgstr \"Types\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Array Types\"\nmsgstr \"Types composés\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"Sending Objects\"\nmsgstr \"Objets traits\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"Variables\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Journalisation\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interopérabilité\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Avec C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Appeler C avec Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Appeler Rust depuis C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Avec C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"The Bridge Module\"\nmsgstr \"Modules de test\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Rust Bridge\"\nmsgstr \"Binaires Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Types scalaires\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"Rust Error Handling\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"C++ Error Handling\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Avec Java\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"Exercices\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"Rust non sécurisé (_unsafe_)\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Exercise\"\nmsgstr \"Exercices\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Interoperability with C++\"\nmsgstr \"Interopérabilité avec C\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Exemples\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"CXX Error Handling\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"Solutions\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal : Matin\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Un exemple minimal\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"`alloc`\"\nmsgstr \"`allouer`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Microcontrôleurs\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO brut\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PACs\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crates\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Board Support Crates\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Le modèle d'état de type\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs`, `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Débogage\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Autres projets\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Boussole\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"Solutions\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal : Après-midi\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Processeurs d'applications\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Assembleur en ligne\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Écrivons un pilote UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Plus de traits\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Un meilleur pilote UART\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Registres multiples\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Pilote\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Utilisation\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Exceptions\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Crates utiles\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"`zerocopy`\"\nmsgstr \"`zérocopie`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-pagination`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"`spin`\"\nmsgstr \"`tourner`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`vmbase`\"\nmsgstr \"vmbase\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Pilote RTC\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concurrence : Matin\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Threads\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"Threads délimités\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Canaux\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Canaux illimités\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Canaux limités\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Envoyer` et `Synchroniser`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"`Send`\"\nmsgstr \"`Envoyer`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`Sync`\"\nmsgstr \"`Synchroniser`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Exemples\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"État partagé\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"Exemple\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Dîner des philosophes\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Vérificateur de liens à plusieurs threads\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concurrence : Après-midi\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Fermetures\"\n\n#: src/SUMMARY.md src/async/runtimes.md\n#, fuzzy\nmsgid \"Runtimes\"\nmsgstr \"Garanties d'exécution\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Tâches\"\n\n#: src/SUMMARY.md src/async/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Canaux asynchrones\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"Flux de contrôle\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"Pièges\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Bloquer l'exécuteur\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Traits asynchrones\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Annulation\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Derniers mots\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Merci!\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Autres ressources\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Crédits\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Flux de construction](https://img.shields.io/github/actions/workflow/\"\n\"status/google/comprehensive-rust/build.yml?style=flat-square)](https://\"\n\"github.com/google/comprehensive-rust/actions/workflows/build.yml?\"\n\"query=branch%3Amain) [![Contributeurs GitHub](https://img.shields.io/github/\"\n\"contributors/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/graphs/contributors)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Ce cours Rust gratuit a été développé par l'équipe Android de Google. Le \"\n\"cours couvre l'ensemble du langage Rust, de la syntaxe de base aux sujets \"\n\"avancés comme les génériques et la gestion des erreurs.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"La version la plus à jour de ce cours se trouve à l'adresse suivante: \"\n\"<https://google.github.io/comprehensive-rust/>. Si vous lisez ce cours \"\n\"depuis une autre adresse, n'hésitez pas à suivre ce lien pour accéder à la \"\n\"dernière version.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\"Ce cours est également disponible [au format PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Le but du cours est de vous apprendre Rust. Nous supposons que vous \"\n\"découvrez ce langage et espérons :\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\"Vous donner une compréhension complète de la syntaxe et du langage Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Vous permettre de modifier des programmes existants et d'écrire de nouveaux \"\n\"programmes en Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Vous montrer les constructions fréquentes (idiomes) en Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\"Nous appelons les quatre premiers jours de ce cours les «Fondamentaux de \"\n\"Rust».\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Au-delà de ces quatre premiers jours de cours, nous vous invitons à \"\n\"approfondir un ou plusieurs des sujets suivant:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): un cours d'une demi-journée consacré à l'utilisation \"\n\"de Rust dans le cadre du développement pour la plate-forme Android. Ce cours \"\n\"couvre également l'interopérabilité avec les langages C, C++ et Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): un cours d'une demi-journée consacré à \"\n\"l'utilisation de Rust dans le cadre du développement pour les navigateurs \"\n\"internet basés sur Chromium. Il inclut l'interopérabilité avec le langage C+\"\n\"+ et explique comment inclure des crates tierces dans Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): un cours d'une journée consacré à l'utilisation \"\n\"de Rust pour le développement embarqué. Le cours touche à la fois aux \"\n\"microcontrôleurs et aux processeurs d'applications.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Programmation concurrente](concurrency.md): un cours d'une journée consacré \"\n\"à la programmation concurrente en Rust. Nous couvrons la concurrence \"\n\"classique (planification à base de threads et mutex) ainsi que la \"\n\"concurrence async/await (multitâche coopératif à base de _futures_).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Non-objectifs\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust est un vaste langage et nous ne pourrons pas tout couvrir en quelques \"\n\"jours. Certains non-objectifs de ce cours sont :\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Apprendre comment développer des macros: pour cela, nous vous invitons à \"\n\"consulter le [Chapitre 19.5 dans le Rust Book](https://doc.rust-lang.org/\"\n\"book/ch19-06-macros.html) et [Rust by Example](https://doc.rust-lang.org/\"\n\"rust-by-example/macros.html) (an anglais). Vous pouvez également consulter \"\n\"[le Chapitre 19.5 dans la traduction non-officielle du Rust Book](https://\"\n\"jimskapt.github.io/rust-book-fr/ch19-06-macros.html) en français.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Prérequis\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Le cours suppose que vous savez déjà programmer. Rust est un langage \"\n\"statiquement typé et nous ferons parfois des comparaisons avec C et C++ pour \"\n\"mieux expliquer ou contraster l'approche de Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Si vous savez programmer dans un langage à typage dynamique tel que Python \"\n\"ou JavaScript, vous pourrez également suivre ce cours sans problème.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Ceci est un exemple de _note du formateur_. Nous les utiliserons pour \"\n\"ajouter d'autres informations sur les diapositives. Cela pourrait être des \"\n\"points clés que l'instructeur devrait couvrir, ainsi que des réponses aux \"\n\"questions typiques posées en classe.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Cette page est destinée au formateur.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Voici quelques informations générales sur la façon dont nous avons organisé \"\n\"le cours en interne chez Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"En général les classes sont organisées de 9 heures à 16 heures, avec une \"\n\"pause déjeuner d'une heure, soit trois heures de cours le matin et trois \"\n\"heures l'après-midi. La session du matin comme celle de l'après-midi \"\n\"comportent plusieurs pauses ainsi que du temps consacré aux exercices.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"\"\n\"Avant de présenter le cours, nous vous recommandons les choses suivantes :\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Familiarisez-vous avec le cours. Nous avons inclus les _notes du formateur_ \"\n\"afin de mettre les points clés en évidence (n'hésitez pas à nous proposer \"\n\"des notes supplémentaires !). Lors de la présentation, vous devez vous \"\n\"assurer d'ouvrir les notes du formateur dans une popup (cliquez sur le lien \"\n\"avec une petite flèche à côté de _Notes du Formateur_ (_Speaker Notes_)). De \"\n\"cette façon, vous affichez le cours sans les notes à la classe, et pouvez \"\n\"suivre les notes séparément.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Décidez des dates de la classe en avance. Étant donné que le cours dure \"\n\"quatre jours complets, nous vous recommandons de programmer les jours de \"\n\"classe sur un intervalle de deux semaines. Les participants aux classes \"\n\"précédentes ont en effet indiqué qu'il est utile d'espacer les jours de \"\n\"classe afin de mieux absorber le contenu.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Trouvez une salle suffisamment grande pour que tous les participants \"\n\"puissent suivre en personne. Nous recommandons que le nombre de participants \"\n\"soit de 15 à 20 personnes. Cela constitue un groupe suffisamment petit pour \"\n\"que les gens soient à l'aise pour poser des questions --- c'est aussi assez \"\n\"petit pour qu'un instructeur ait le temps de répondre aux questions. Assurez-\"\n\"vous que la salle dispose de _bureaux_ pour vous et pour les étudiants : \"\n\"vous devriez tous pouvoir vous assoir et travailler avec vos ordinateurs \"\n\"portables. En particulier, vous serez amené à faire beaucoup de \"\n\"programmation en direct en tant qu'instructeur, donc un simple pupitre ne \"\n\"serait pas très pratique pour vous.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Les jours de classe, prévoyez d'arriver en avance afin de préparer la salle. \"\n\"Nous vous recommandons de présenter directement en utilisant `mdbook serve` \"\n\"exécuté sur votre ordinateur portable (voir les [instructions d'installation]\"\n\"(https://github.com/google/comprehensive-rust#building)). Cela garantit des \"\n\"performances optimales sans ralentissement lorsque vous changez de page. \"\n\"L'utilisation de votre ordinateur portable vous permettra également de \"\n\"corriger les éventuelles fautes de frappe.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Laissez les participants résoudre les exercices seuls ou en petits groupes. \"\n\"En général nous consacrons 30 à 45 minutes aux exercices le matin et l'après-\"\n\"midi (y compris pour discuter les solutions). Assurez-vous de demander aux \"\n\"gens s'ils sont bloqués ou si vous pouvez les aider. Si vous constatez que \"\n\"plusieurs personnes font face au même problème, partagez-le avec la classe \"\n\"et proposez une solution, par exemple en montrant aux participants où \"\n\"trouver les informations pertinentes dans la bibliothèque standard.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"C'est tout, bonne chance pour la présentation du cours ! Nous espérons que \"\n\"vous y prendrez autant de plaisir que nous !\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Nous vous demandons de bien vouloir [fournir des commentaires](https://\"\n\"github.com/google/comprehensive-rust/discussions/86) par la suite afin que \"\n\"nous puissions continuer d'améliorer le cours. Nous aimerions savoir ce qui \"\n\"a bien fonctionné pour vous et ce qui pourrait être amélioré. Vos élèves \"\n\"peuvent également [envoyer des commentaires](https://github.com/google/\"\n\"comprehensive-rust/discussions/100). Merci !\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Fondamentaux de Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Les quatre premiers jours constituent les [Fondamentaux de Rust](../welcome-\"\n\"day-1.md). Le rythme est soutenu et nous couvrons beaucoup de sujets!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"{{%course outline Fundamentals}}\"\nmsgstr \"{{%course outline Fundamentals}}\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Approfondissements\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Au delà des quatre jours portant sur les Fondamentaux de Rust, nous couvrons \"\n\"également des sujets spécifiques:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust pour Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Rust pour Android](../android.md) est un cours d'une demi-journée consacré \"\n\"à l'utilisation de Rust dans le cadre du développement pour la plate-forme \"\n\"Android. Ce cours couvre également l'interopérabilité avec les langages C, C+\"\n\"+ et Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Vous aurez besoin d'un [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Effectuez un checkout du [répertoire du cours]\"\n\"(https://github.com/google/comprehensive-rust) sur la même machine et \"\n\"déplacez le dossier `src/android/` à la racine de votre checkout AOSP. Cela \"\n\"assurera que le système de construction d'Android a accès aux fichiers \"\n\"`Android.bp` dans `src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Assurez-vous que `adb sync` fonctionne avec votre émulateur ou votre \"\n\"appareil réel et pré-construisez tous les exemples Android en utilisant `src/\"\n\"android/build_all.sh`. Lisez le script pour voir les commandes éxécutées et \"\n\"assurez-vous qu'elles fonctionnent lorsque vous les exécutez à la main.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust pour Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"Le cours [Rust pour Chromium](../chromium.md) dure une demi-journée et \"\n\"explore l'utilisation de Rust pour le navigateur Chromium. Il couvre \"\n\"l'utilisation de Rust au sein du système de compilation `gn` de Chromium, \"\n\"l'intégration de bibliothèques tierces (\\\"crates\\\") et l'interopérabilité \"\n\"avec C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Vous aurez besoin de pouvoir compiler Chromium --- une compilation debug par \"\n\"composant est [recommandée](../chromium/setup.md) pour pouvoir effectuer des \"\n\"itérations de développement plus rapidement. Assurez-vous que vous pouvez \"\n\"lancer le navigateur Chromium que vous avez compilé.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Bare-Metal Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Bare-metal Rust](../bare-metal.md) est un cours d'une journée consacré à \"\n\"l'utilisation de Rust pour le développement embarqué. Le cours touche à la \"\n\"fois aux microcontrôleurs et aux processeurs d'applications.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Pour la partie microcontrôleurs, vous devrez acheter la carte de \"\n\"développement [BBC micro:bit](https://microbit.org/) v2 avant de commencer.\\n\"\n\"Tous les participants à ce cours devront installer les paquets listés sur \"\n\"[la page de bienvenue](../bare-metal.md) du cours.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Programmation concurrente en Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[La programmation concurrente en Rust](../concurrency.md) est un cours d'une \"\n\"journée portant sur la programmation concurrente classique ainsi que `async`/\"\n\"`await`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Il faudra que vous ayez préparé une crate à jour et que vous ayez téléchargé \"\n\"et installé les dépendances. Vous pourrez ensuite copier/coller les exemples \"\n\"dans `src/main.rs` et les modifier:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Format du cours\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Le cours se veut très interactif et nous recommandons de laisser les \"\n\"questions guider l'exploration de Rust !\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Il existe plusieurs raccourcis clavier utiles dans mdBook :\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Flèche vers la gauche\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \" : Navigue à la page précédente.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Flèche vers la droite\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \" : Navigue à la page suivante.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Entrée\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \" : Exécute l'exemple de code qui a le focus.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \" : Active la barre de recherche.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Le cours a été traduit dans d'autres langues par un ensemble de merveilleux \"\n\"bénévoles:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[portugais brésilien](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"par [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), \"\n\"et [@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[chinois (simplifié)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"par [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), et [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[chinois (traditionnel)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"par [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), et [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[coréen](https://google.github.io/comprehensive-rust/ko/) par [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), et [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[espagnol](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Utilisez le sélecteur de langue dans le coin supérieur droit pour basculer \"\n\"entre les langues.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Traductions incomplètes\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Il y a beaucoup de traductions en cours d'élaboration. Nous listons ci-\"\n\"dessous celles ayant été mises à jour le plus récemment:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[bengali](https://google.github.io/comprehensive-rust/bn/) par [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\"[francais](https://google.github.io/comprehensive-rust/fr/) par [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) et \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[allemand](https://google.github.io/comprehensive-rust/de/) par [@Throvn]\"\n\"(https://github.com/Throvn) et [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[japonais](https://google.github.io/comprehensive-rust/ja/) par [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) et [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[italien](https://google.github.io/comprehensive-rust/it/) par \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) et [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Si vous souhaitez contribuer à cet effort, veuillez consulter [nos \"\n\"instructions - en anglais](https://github.com/google/comprehensive-rust/blob/\"\n\"main/TRANSLATIONS.md) pour savoir comment se lancer. Les traductions sont \"\n\"coordonnées sur le [suivi de bogues - en anglais](https://github.com/google/\"\n\"comprehensive-rust/issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Lorsque vous commencerez à vous documenter sur Rust, vous rencontrerez \"\n\"rapidement [Cargo](https://doc.rust-lang.org/cargo/), l'outil standard \"\n\"utilisé dans l'écosystème Rust pour créer et exécuter des applications Rust. \"\n\"Dans cette section, nous voulons donner un bref aperçu de ce qu'est Cargo, \"\n\"comment il s'intègre dans le large écosystème de Rust et comment il \"\n\"s'inscrit dans cette formation.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Installation\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\"**Veuillez suivre les instructions sur <https://rustup.rs/>** (en anglais).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Une fois que vous aurez suivi ces instructions, vous disposerez du \"\n\"gestionnaire de dépendances et système de compilation `cargo` et du \"\n\"compilateur `rustc`. `rustup` sera également installé : il s'agit d'un \"\n\"utilitaire en ligne de commande que vous pourrez utiliser pour installer \"\n\"différentes versions du compilateur.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Après avoir installé Rust, il vous faudra configurer votre éditeur de texte \"\n\"ou votre IDE (environnement de développement) pour travailler avec Rust. La \"\n\"plupart des éditeurs reposent, pour ce faire, sur le [rust-analyzer](https://\"\n\"rust-analyzer.github.io/), un outil qui fournit les fonctionnalités de \"\n\"complétion automatique et de lien vers les définitions des symboles, \"\n\"notamment pour [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), et bien d'autres. Il existe \"\n\"également un IDE appelé [RustRover](https://www.jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Sur Debian/Ubuntu, vous pouvez installer Cargo, les sources Rust (`rust-\"\n\"src`: compilateur et bibliothèques standards) et l'outil de [formatage Rust]\"\n\"(https://github.com/rust-lang/rustfmt) via `apt`. Veuillez noter toutefois \"\n\"que l'installation via `apt` ne vous procurera pas la dernière version de \"\n\"Rust, ce qui pourrait conduire à des problèmes de comportement indéterminé \"\n\"(undefined behavior). La ligne de commande à utiliser serait :\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"L'écosystème de Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"L'écosystème de Rust est composé d'un certain nombre d'outils, dont les \"\n\"principaux sont :\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc` : le compilateur Rust qui transforme les fichiers `.rs` en binaires \"\n\"et autres formats intermédiaires.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo` : le gestionnaire de dépendances Rust et l'outil de compilation. \"\n\"Cargo peut télécharger les dépendances, en général hébergées sur <https://\"\n\"crates.io>, et les rendre disponibles pour `rustc` lors de la compilation de \"\n\"votre projet. Cargo intègre également un outil pour exécuter des tests \"\n\"unitaires.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup` : le programme d'installation et de mise à jour de la chaîne \"\n\"d'outils Rust. Cet outil sert à installer et mettre à jour `rustc` et \"\n\"`cargo` lorsque de nouvelles versions de Rust sont publiées. De plus, \"\n\"`rustup` peut également télécharger la documentation de la bibliothèque \"\n\"standard. Vous pouvez avoir plusieurs versions de Rust installées à la fois \"\n\"et `rustup` vous permettra de basculer entre elles au besoin.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/pattern-matching/destructuring.md\n#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Points clés:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust a un calendrier de publication rapide : une nouvelle version est \"\n\"disponible toutes les six semaines. Les nouvelles versions maintiennent la \"\n\"rétrocompatibilité avec les anciennes versions --- en plus, elles proposent \"\n\"de nouvelles fonctionnalités.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"Il existe trois types de publication : \\\"stable\\\", \\\"beta\\\" et \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Les nouvelles fonctionnalités sont testées sur \\\"nightly\\\". \\\"beta\\\" est ce \"\n\"qui devient \\\"stable\\\" toutes les six semaines.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Les dépendances peuvent aussi être obtenues sur des [dépôts alternatifs]\"\n\"(https://doc.rust-lang.org/cargo/reference/registries.html), via `git`, dans \"\n\"des répertoires système, et autres.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust a également des [éditions](https://doc.rust-lang.org/edition-guide/) : \"\n\"l'édition actuelle est Rust 2021. Les éditions passées étaient Rust 2015 et \"\n\"Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Les éditions sont autorisées à apporter des modifications **non** \"\n\"rétrocompatibles au langage.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Pour éviter de casser vos dépendances et empêcher la compilation de votre \"\n\"projet, les éditions sont laissées au choix : vous sélectionnez l'édition \"\n\"pour chaque crate via le fichier `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Pour éviter de diviser l'écosystème, les compilateurs Rust peuvent mélanger \"\n\"du code écrit pour différentes éditions.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Veuillez noter qu'il est assez rare d'utiliser le compilateur directement et \"\n\"non via `cargo` (la plupart des utilisateurs ne le font jamais).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Il peut être utile de mentionner que Cargo est un outil extrêmement puissant \"\n\"et complet. Il est capable de nombreuses fonctionnalités avancées, y \"\n\"compris, mais sans s'y limiter :\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Structure du projet/paquets\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[Espaces de travail](https://doc.rust-lang.org/cargo/reference/workspaces.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Gestion/mise en cache des dépendances de développement et des dépendances \"\n\"d'exécution\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[Créer des scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[Installation globale](https://doc.rust-lang.org/cargo/commands/cargo-\"\n\"install.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Il est également extensible avec des plugins de sous-commande (tels que \"\n\"[cargo clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Pour en savoir plus, vous pouvez lire le [livre officiel de Cargo - en \"\n\"anglais](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Échantillons de code dans cette formation\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Pour cette formation, nous allons surtout explorer le langage Rust à travers \"\n\"des exemples qui peuvent être exécuté via votre navigateur. Cela rend la \"\n\"configuration beaucoup plus facile et assure une expérience cohérente pour \"\n\"chacun.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"L'installation de Cargo est tout de même encouragée : elle vous facilitera \"\n\"la tâche pour les exercices. Le dernier jour, nous ferons un exercice plus \"\n\"conséquent qui vous montrera comment travailler avec des dépendances et, \"\n\"pour cela, vous avez besoin de Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Les blocs de code de ce cours sont entièrement interactifs :\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Vous pouvez utiliser \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" pour exécuter le code lorsque le focus est dans la zone de texte.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"La plupart des exemples de code sont modifiables comme indiqué ci-dessus. \"\n\"Quelques exemples de code ne sont pas modifiables pour diverses raisons :\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Les environnements d'exécution intégrés ne peuvent pas exécuter de tests \"\n\"unitaires. Copiez-collez le code et ouvrez-le dans l'environnement \"\n\"d'exécution complet pour valider les tests unitaires.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Les environnements d'exécution intégrés sont réinitialisés dès que vous \"\n\"quittez la page! C'est la raison pour laquelle les élèves doivent résoudre \"\n\"les exercices en utilisant une installation Rust locale ou via \"\n\"l'environnement d'exécution complet.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Exécuter du code localement avec Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Si vous souhaitez expérimenter le code sur votre propre système, il vous \"\n\"faudra d'abord installer Rust. Pour ce faire, suivez les [instructions dans \"\n\"le livre Rust - en anglais](https://doc.rust-lang.org/book/ch01-01-\"\n\"installation.html). Vous disposerez alors de `rustc` et `cargo`. Au moment \"\n\"de l'écriture, la dernière version stable de Rust a ces numéros de version :\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"N'importe quelle version plus récente peut également être utilisée, étant \"\n\"donné que les versions de Rust sont rétrocompatibles.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Suivez ensuite ces étapes pour créer un binaire Rust à partir d'un des \"\n\"exemples dans cette formation :\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Cliquez sur le bouton \\\"Copy to clipboard\\\" sur l'exemple que vous souhaitez \"\n\"copier.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Exécutez `cargo new exercise` pour créer un nouveau répertoire `exercise/` \"\n\"pour héberger votre code :\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Rendez vous dans le répertoire `exercise/` et exécutez `cargo run` pour \"\n\"compiler et exécuter votre binaire :\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Remplacez le code standard sous `src/main.rs` par votre propre code. Par \"\n\"exemple, en suivant l'exemple de la page précédente, modifiez `src/main.rs` \"\n\"comme ceci :\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Exécutez `cargo run` pour compiler et exécuter votre binaire mis à jour :\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Exécutez `cargo check` afin de rapidement déterminer si votre projet \"\n\"contient des erreurs. Exécutez `cargo build` pour le compiler sans \"\n\"l'exécuter. Pour une compilation normale en mode debug, le résultat se \"\n\"trouvera dans le répertoire `target/debug/`. Enfin, vous pouvez exécuter \"\n\"`cargo build --release` pour générer un binaire optimisé qui se trouvera \"\n\"dans le répertoire `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Vous pouvez déclarer des dépendances pour votre projet dans le fichier \"\n\"`Cargo.toml`. Quand vous lancez des commandes `cargo`, Cargo se charge de \"\n\"télécharger et compiler les dépendances manquantes.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Essayez d'encourager les participants à installer Cargo et à utiliser un \"\n\"éditeur local. Cela leur facilitera la vie puisqu'ils auront un \"\n\"environnement de développement normal.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Bienvenue au jour 1\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"C'est le premier jour de Comprehensive Rust(le guide complet de Rust). Nous \"\n\"couvrirons beaucoup de terrain aujourd'hui:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Syntaxe de base de Rust : variables, types scalaires et composés, \"\n\"énumérations, structures, références, fonctions et méthodes.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Inférence de type\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\"Filtrage par motif : déstructuration des énumérations, des structures et des \"\n\"tableaux.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"{{%session outline}}\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Veuillez rappeler aux élèves que :\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Ils doivent poser des questions lorsqu'ils les reçoivent, ne les enregistrez \"\n\"pas jusqu'à la fin.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"Le cours se veut interactif et les discussions sont vivement encouragées !\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"En tant qu'instructeur, vous devez essayer de garder les discussions \"\n\"pertinentes, c'est-à-dire, garder le lien avec la façon dont Rust fait les \"\n\"choses par rapport à un autre langage. Ça peut être difficile de trouver le \"\n\"bon équilibre, mais privilégiez les discussions car elles engagent les gens \"\n\"bien plus que la communication à sens unique.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Les questions signifieront probablement que nous parlons de choses avant les \"\n\"diapositives.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"C'est tout à fait correct! La répétition est une partie importante de \"\n\"l'apprentissage. N'oubliez pas que les diapositives ne sont qu'un support et \"\n\"que vous êtes libre de les sauter si vous le souhaitez.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\nmsgid \"{{%segment outline}}\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust est un nouveau langage de programmation qui a eu sa [version 1.0 en \"\n\"2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html) :\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust est un langage compilé statiquement dans un rôle similaire à C++\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` utilise LLVM comme backend.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust prend en charge de nombreuses [plates-formes et architectures](https://\"\n\"doc.rust-lang.org/nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ... \\\\*Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Rust est utilisé pour une large gamme d'appareils :\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"firmware et chargeurs de démarrage,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"firmware and boot loaders,\"\nmsgstr \"écrans intelligents,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"smart displays,\"\nmsgstr \"téléphones portables,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"mobile phones,\"\nmsgstr \"ordinateurs de bureau,\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"desktops,\"\nmsgstr \"serveurs.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust s'inscrit dans le même domaine que C++ :\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Grande flexibilité.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Haut niveau de contrôle.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Peut être réduit à des appareils très limités comme les téléphones mobiles.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"N'a pas de temps d'exécution ou de récupération d'ordures.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Se concentre sur la fiabilité et la sécurité sans sacrifier les performances.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Quelques arguments de vente uniques à Rust :\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Aucune variable non initialisée.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Pas de double libération de mémoire.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Aucune utilisation après la libération.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Pas de pointeurs `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Pas de mutex verrouillés oubliés.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Pas de courses de données entre les threads.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Aucune invalidation d'itérateur.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Array access is bounds checked.\"\nmsgstr \"L'accès au tableau est vérifié dans les limites.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Le débordement d'entier est défini.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Énumérations et filtrage par motif.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Generics.\"\nmsgstr \"Génériques.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"No overhead FFI.\"\nmsgstr \"Pas de frais généraux FFI.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Abstractions à coût zéro.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Great compiler errors.\"\nmsgstr \"Grandes erreurs de compilation.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Gestionnaire de dépendances intégré.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Built-in support for testing.\"\nmsgstr \"Support intégré pour les tests.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Excellente prise en charge du protocole de serveur de langue.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Assurez-vous de demander à la classe dans quels langages ils ont de \"\n\"l'expérience. Selon la réponse, vous pouvez mettre en évidence différentes \"\n\"fonctionnalités de Rust :\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Expérience avec C ou C++ : Rust élimine toute une classe d'_erreurs \"\n\"d'exécution_ via le vérificateur d'emprunt. On obtient des performances \"\n\"comme en C et C++, mais sans problèmes d'insécurité de la mémoire. De plus, \"\n\"Rust est un langage moderne avec des constructions telles que le filtrage \"\n\"par motif et la gestion intégrée des dépendances.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"Expérience avec Java, Go, Python, JavaScript... : On bénéficie de la même \"\n\"sécurité mémoire que dans ces langages, plus un sentiment de langage de haut \"\n\"niveau similaire. En outre on obtient des performances rapides et \"\n\"prévisibles comme C et C++ (pas de ramassage d'ordures) ainsi que l'accès au \"\n\"matériel de bas niveau (si l'on en a besoin).\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Passons au programme Rust le plus simple possible, un Bonjour Monde \"\n\"classique programme:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Ce que tu vois:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Les fonctions sont introduites avec `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Les blocs sont délimités par des accolades comme en C et C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"La fonction `main` est le point d'entrée du programme.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust a des macros hygiéniques, `println!` en est un exemple.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Les strings Rust sont encodées en UTF-8 et peuvent contenir n'importe quel \"\n\"caractère Unicode.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Cette diapositive tente de mettre les étudiants à l'aise avec le code Rust. \"\n\"Ils en verront une tonne durant les quatre prochains jours, alors nous \"\n\"commençons petit avec quelque chose de familier.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust ressemble beaucoup aux autres langages traditionnels C/C++/Java. C'est \"\n\"impératif (non fonctionnel) et il n'essaie pas de réinventer les choses à \"\n\"moins qu'absolument nécessaire.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"\"\n\"Rust est moderne avec un support complet pour des choses comme Unicode.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust utilise des macros pour les situations où vous souhaitez avoir un \"\n\"nombre variable d'arguments (pas de fonction [surchargées](basic-syntax/\"\n\"functions-interlude.md)).\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Les macros étant \\\"hygiéniques\\\", elles ne capturent pas accidentellement \"\n\"les identifiants de la portée dans laquelle elles sont utilisées. Les macros \"\n\"Rust ne sont en fait que [partiellement hygiénique](https://veykril.github.\"\n\"io/tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust fournit une sécurité de type via le typage statique. Les liaisons \"\n\"variables sont immuables par défaut:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Types\"\nmsgstr \"Types\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Literals\"\nmsgstr \"Littéraux\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Signed integers\"\nmsgstr \"Entiers signés\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123i64`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Unsigned integers\"\nmsgstr \"Entiers non signés\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10u16`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Floating point numbers\"\nmsgstr \"Nombres à virgule flottante\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2f32`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Unicode scalar values\"\nmsgstr \"Valeurs scalaires Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`char`\"\nmsgstr \"`car`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"Booleans\"\nmsgstr \"Chaînes d'octets\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`bool`\"\nmsgstr \"`&[u8]`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`true`, `false`\"\nmsgstr \"\"\n\"`b\\\"abc\\\"`, `br#\\\" \\\" \\\"#`\\n\"\n\"\\n\"\n\"Booléens\\n\"\n\"\\n\"\n\"`bool`\\n\"\n\"\\n\"\n\"'vrai', 'faux'\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"The types have widths as follows:\"\nmsgstr \"Les types ont des largeurs comme suit :\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` et `fN` ont une largeur de _N_ bits,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` et `usize` sont la largeur d'un pointeur,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` a une largeur de 32 bits,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` a une largeur de 8 bits.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust examinera comment la variable est _utilisée_ pour déterminer le type :\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Cette diapositive montre comment le compilateur Rust déduit les types en \"\n\"fonction des contraintes données par les déclarations et les utilisations \"\n\"des variables.\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Il est très important de souligner que les variables déclarées de cette \"\n\"manière ne sont pas d'une sorte de \\\"tout type\\\" dynamique qui peut détenir \"\n\"des données. Le code machine généré par une telle déclaration est identique \"\n\"à la déclaration explicite d'un type. Le compilateur fait le travail pour \"\n\"nous et nous aide à écrire un code plus concis.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"Mise en œuvre\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"`if` expressions\"\nmsgstr \"expressions \\\"si\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"De plus, vous pouvez l'utiliser comme expression. Cela fait la même chose \"\n\"que ci-dessus:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"Expressions `while`\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"Comme avec `if`, il existe une variante `while let` qui teste à plusieurs \"\n\"reprises une valeur contre un modèle :\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) utilisé pour \"\n\"définir les destructeurs.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/loop.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) utilisé pour \"\n\"définir les destructeurs.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\n#, fuzzy\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Si vous voulez quitter une boucle plus tôt, utilisez `break`, si vous voulez \"\n\"commencer immédiatement la prochaine itération utilise `continue`. \"\n\"`continue` et `break` peuvent éventuellement prenez un argument d'étiquette \"\n\"qui est utilisé pour sortir des boucles imbriquées :\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blocs\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Un bloc en Rust a une valeur et un type : la valeur est la dernière \"\n\"expression du bloc:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Vous pouvez montrer comment la valeur du bloc change en modifiant la \"\n\"dernière ligne du bloc. Par exemple, ajouter/supprimer un point-virgule ou \"\n\"utiliser un \\\"retour\\\".\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Vous pouvez masquer des variables, à la fois celles des portées externes et \"\n\"celles des même périmètre :\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Définition : l'occultation est différente de la mutation, car après \"\n\"l'occultation, les emplacements de mémoire des deux variables existent en \"\n\"même temps. Les deux sont disponibles sous le même nom, selon l'endroit où \"\n\"vous l'utilisez dans le code.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Une variable d'occultation peut avoir un type différent.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"L'ombrage semble obscur au début, mais est pratique pour conserver les \"\n\"valeurs après `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Chaque fonction a une seule implémentation :\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"Prend toujours un seul ensemble de types de paramètres.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"La surcharge d'opérateur est implémentée via des traits dans [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html) :\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"1\"\nmsgstr \"12\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"2\"\nmsgstr \"12\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Bienvenue\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples.md\n#, fuzzy\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Comme les tableaux, les tuples ont une longueur fixe.\"\n\n#: src/tuples-and-arrays/tuples.md\n#, fuzzy\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\"Les tuples regroupent des valeurs de différents types dans un type composé.\"\n\n#: src/tuples-and-arrays/tuples.md\n#, fuzzy\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Les champs d'un tuple sont accessibles par le point et l'index de la valeur, \"\n\"par ex. `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"Quel est le type de \\\"mot\\\" dans chaque boucle ?\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Utilisez ce qui précède pour écrire une fonction `pretty_print` qui imprime \"\n\"joliment une matrice et une fonction `transpose` qui va transposer une \"\n\"matrice (transformer les lignes en colonnes):\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"\"\n\"Codez en dur les deux fonctions pour qu'elles fonctionnent sur des matrices \"\n\"3 × 3.\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\"Copiez le code ci-dessous sur <https://play.rust-lang.org/> et implémentez \"\n\"le les fonctions:\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust interdira statiquement les références pendantes :\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust déréférencera automatiquement dans certains cas, en particulier lors de \"\n\"l'appel méthodes (essayez `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"Nous parlerons davantage de l'emprunt lorsque nous arriverons à la propriété.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Assurez-vous de noter la différence entre `let mut ref_x: &i32` et `let \"\n\"ref_x: &mut i32`. Le premier représente une référence mutable qui peut être \"\n\"liée à différentes valeurs, tandis que la seconde représente une référence à \"\n\"une valeur modifiable.\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Tranches\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Une tranche vous donne une vue dans une plus grande collection :\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"\"\n\"Les tranches empruntent des données au type en tranches. \\\\* Question : Que \"\n\"se passe-t-il si vous modifiez `a[3]` ?\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Nous créons une tranche en empruntant `a` et en spécifiant les index de \"\n\"début et de fin entre parenthèses.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Si la tranche commence à l'index 0, la syntaxe de plage de Rust nous permet \"\n\"de supprimer l'index de départ, ce qui signifie que `&a[0..a.len()]` et \"\n\"`&a[..a.len()]` sont identiques .\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Il en va de même pour le dernier index, donc `&a[2..a.len()]` et `&a[2..]` \"\n\"sont identiques.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Pour créer facilement une tranche du tableau complet, on peut donc utiliser \"\n\"`&a[..]`.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` est une référence à une tranche de `i32`s. Notez que le type de `s` \"\n\"(`&[i32]`) ne mentionne plus la longueur du tableau. Cela nous permet \"\n\"d'effectuer des calculs sur des tranches de tailles différentes.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Les tranches empruntent toujours à un autre objet. Dans cet exemple, \\\"a\\\" \"\n\"doit rester \\\"vivant\\\" (dans la portée) au moins aussi longtemps que notre \"\n\"tranche.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"La question sur la modification de `a[3]` peut susciter une discussion \"\n\"intéressante, mais la réponse est que pour des raisons de sécurité de la \"\n\"mémoire vous ne pouvez pas le faire via `a` après avoir créé une tranche, \"\n\"mais vous pouvez lire les données de `a` et `s` en toute sécurité. Plus de \"\n\"détails seront expliqués dans la section Vérificateur d'emprunt.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"\"\n\"Nous pouvons maintenant comprendre les deux types de string avec Rust :\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`String` is an owned, heap-allocated buffer of UTF-8 bytes.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Comme C et C++, Rust prend en charge les structures personnalisées :\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Key Points:\"\nmsgstr \"Points clés:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Si vous avez déjà des variables avec les bons noms, vous pouvez créer le \"\n\"struct en utilisant un raccourci :\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Si les noms de champ ne sont pas importants, vous pouvez utiliser une \"\n\"structure tuple :\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Ceci est souvent utilisé pour les wrappers à champ unique (appelés newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Les nouveaux types sont un excellent moyen d'encoder des informations \"\n\"supplémentaires sur la valeur dans un type primitif, par exemple :\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Le nombre est mesuré dans certaines unités : `Newtons` dans l'exemple ci-\"\n\"dessus.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"La valeur a été validée lors de sa création, vous n'avez donc plus besoin de \"\n\"la valider à chaque utilisation : 'PhoneNumber(String)`ou`OddNumber(u32)\\\\`.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Montrez comment ajouter une valeur `f64` à un type `Newtons` en accédant au \"\n\"champ unique dans le nouveau type.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust n'aime généralement pas les choses inexplicites, comme le déballage \"\n\"automatique ou, par exemple, l'utilisation de booléens comme entiers.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"La surcharge des opérateurs est discutée le jour 3 (génériques).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Le mot clé `enum` permet la création d'un type qui a quelques différentes \"\n\"variantes :\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Les énumérations vous permettent de collecter un ensemble de valeurs sous un \"\n\"type\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"C'est peut-être le bon moment pour comparer Structs et Enums :\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"Dans les deux cas, vous pouvez avoir une version simple sans champs \"\n\"(structure d'unité) ou une version avec différents types de champs (charges \"\n\"utiles variantes).\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Vous pouvez même implémenter les différentes variantes d'une énumération \"\n\"avec des structures distinctes, mais elles ne seraient alors pas du même \"\n\"type que si elles étaient toutes définies dans une énumération.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static`\"\nmsgstr \"`statique`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Bienvenue au jour 1\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Comme indiqué dans le \\\\[Rust RFC Book\\\\] [1](https://rust-lang.github.io/\"\n\"rfcs/0246-const-vs-static.html), ceux-ci ne sont pas alignés lors de \"\n\"l'utilisation et ont un emplacement de mémoire associé réel. Ceci est utile \"\n\"pour le code non sécurisé et intégré, et la variable vit tout au long de \"\n\"l'exécution du programme.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"`static`, d'autre part, ressemble beaucoup plus à une variable globale \"\n\"`const` ou mutable en C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Selon le \\\\[Rust RFC Book\\\\] [1](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), ceux-ci sont intégrés lors de l'utilisation.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"Mentionnez que `const` se comporte sémantiquement de la même manière que \"\n\"`constexpr` de C++.\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Il n'est pas très courant d'avoir besoin d'une constante évaluée à \"\n\"l'exécution, mais c'est utile et plus sûr que d'utiliser un statique.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Welcome to Day 2\"\nmsgstr \"Bienvenue au jour 2\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Maintenant que nous avons vu une bonne quantité de Rust, nous allons \"\n\"continuer avec :\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\"Filtrage par motif : déstructuration des énumérations, des structures et des \"\n\"tableaux.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"Le mot clé `match` vous permet de faire correspondre une valeur à un ou \"\n\"plusieurs _patterns_. Le les comparaisons se font de haut en bas et le \"\n\"premier match l'emporte.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"Les modèles peuvent être des valeurs simples, de la même manière que \"\n\"`switch` en C et C++ :\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Comme `if let`, chaque bras de correspondance doit avoir le même type. Le \"\n\"type est le dernier expression du bloc, le cas échéant. Dans l'exemple ci-\"\n\"dessus, le type est `()`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Vous pouvez indiquer comment certains caractères spécifiques sont utilisés \"\n\"dans un modèle\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` comme un `ou`\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` peut s'étendre autant que nécessaire\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` représente une plage inclusive\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` est un joker\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Les gardes de correspondance en tant que fonctionnalité de syntaxe distincte \"\n\"sont importants et nécessaires lorsque nous souhaitons exprimer de manière \"\n\"concise des idées plus complexes que ne le permettraient les modèles seuls.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Ils ne sont pas identiques à une expression \\\"if\\\" séparée à l'intérieur du \"\n\"bras de match. Une expression `if` à l'intérieur du bloc de branche (après \"\n\"`=>`) se produit après la sélection du bras de correspondance. L'échec de la \"\n\"condition \\\"si\\\" à l'intérieur de ce bloc n'entraînera pas d'autres bras de \"\n\"l'expression \\\"match\\\" d'origine considérée.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"La condition définie dans la garde s'applique à chaque expression dans un \"\n\"modèle avec un `|`.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"Structures\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Les modèles peuvent également être utilisés pour lier des variables à des \"\n\"parties de vos valeurs. C'est ainsi vous inspectez la structure de vos \"\n\"types. Commençons par un simple type `enum` :\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Ici, nous avons utilisé les bras pour _déstructurer_ la valeur `Result`. En \"\n\"premier arm, `half` est lié à la valeur à l'intérieur de la variante `Ok`. \"\n\"Dans le deuxième bras, `msg` est lié au message d'erreur.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"L'expression `if`/`else` renvoie une énumération qui est ensuite \"\n\"décompressée avec une `match`.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Vous pouvez essayer d'ajouter une troisième variante à la définition enum et \"\n\"d'afficher les erreurs lors de l'exécution du code. Indiquez les endroits où \"\n\"votre code est maintenant inexhaustif et comment le compilateur essaie de \"\n\"vous donner des indices.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Les valeurs des variantes enum ne sont accessibles qu'après avoir été mises \"\n\"en correspondance avec le modèle. Le modèle lie les références aux champs \"\n\"dans le \\\"match arm\\\" après le `=>`.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Démontrer ce qui se passe lorsque la recherche est inépuisable. Notez \"\n\"l'avantage que le compilateur Rust fournit en confirmant quand tous les cas \"\n\"sont traités.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`if let` expressions\"\nmsgstr \"expressions `si nous allons`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"expressions `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`match` expressions\"\nmsgstr \"expressions \\\"correspondantes\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"expressions `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Comme avec `if`, il existe une variante `while let` qui teste à plusieurs \"\n\"reprises une valeur contre un modèle :\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Ici, l'itérateur renvoyé par `v.iter()` renverra une `Option<i32>` à chaque \"\n\"appel à `next()`. Il renvoie `Some(x)` jusqu'à ce qu'il soit terminé, après \"\n\"quoi il renvoie \\\"Aucun\\\". Le `while let` nous permet de continuer à \"\n\"parcourir tous les éléments.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"expressions `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Soulignez que la boucle `while let` continuera tant que la valeur correspond \"\n\"au modèle.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Vous pouvez réécrire la boucle `while let` comme une boucle infinie avec une \"\n\"instruction if qui s'interrompt lorsqu'il n'y a pas de valeur à déballer \"\n\"pour `iter.next()`. Le `while let` fournit du sucre syntaxique pour le \"\n\"scénario ci-dessus.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust vous permet d'associer des fonctions à vos nouveaux types. Vous faites \"\n\"cela avec un Bloc `impl` :\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Le `&self` ci-dessus indique que la méthode emprunte l'objet de manière \"\n\"immuable. Là sont d'autres récepteurs possibles pour une méthode :\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self` : emprunte l'objet à l'appelant en utilisant un partage et immuable \"\n\"référence. L'objet peut être réutilisé par la suite.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self` : emprunte l'objet à l'appelant en utilisant un nom unique et \"\n\"mutable référence. L'objet peut être réutilisé par la suite.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self` : prend possession de l'objet et l'éloigne de l'appelant. Le méthode \"\n\"devient le propriétaire de l'objet. L'objet sera supprimé (désalloué) \"\n\"lorsque la méthode revient, sauf si sa propriété est explicitement transmis.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\"`mut self` : comme ci-dessus, mais tant que la méthode possède l'objet, elle \"\n\"peut le faire muter aussi. La propriété complète ne signifie pas \"\n\"automatiquement la mutabilité.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Pas de récepteur : cela devient une méthode statique sur la structure. \"\n\"Généralement utilisé pour créer des constructeurs appelés \\\"nouveaux\\\" par \"\n\"convention.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\"Il peut être utile d'introduire des méthodes en les comparant à des \"\n\"fonctions.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Les méthodes sont appelées sur une instance d'un type (tel qu'un struct ou \"\n\"un enum), le premier paramètre représente l'instance en tant que \\\"self\\\".\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Les développeurs peuvent choisir d'utiliser des méthodes pour tirer parti de \"\n\"la syntaxe du récepteur de méthode et pour mieux les organiser. En utilisant \"\n\"des méthodes, nous pouvons conserver tout le code d'implémentation en un \"\n\"seul endroit prévisible.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Soulignez l'utilisation du mot-clé `self`, un récepteur de méthode.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Montrez qu'il s'agit d'un terme abrégé pour `self:&Self` et montrez peut-\"\n\"être comment le nom de la structure pourrait également être utilisé.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Expliquez que `Self` est un alias de type pour le type dans lequel se trouve \"\n\"le bloc `impl` et peut être utilisé ailleurs dans le bloc.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Notez comment `self` est utilisé comme d'autres structures et la notation \"\n\"par points peut être utilisée pour faire référence à des champs individuels.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"C'est peut-être le bon moment pour démontrer en quoi `&self` diffère de \"\n\"`self` en modifiant le code et en essayant d'exécuter say_hello deux fois.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Au-delà des variantes sur \\\"self\\\", il y a aussi \\\\[types d'emballage \"\n\"spéciaux\\\\] (https://doc.rust-lang.org/reference/special-types-and-traits.\"\n\"html) autorisés à être des types de récepteurs, tels que `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust vous permet d'abstraire les types avec des traits. Ils sont similaires \"\n\"aux interfaces :\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Les caractéristiques peuvent spécifier des méthodes pré-implémentées (par \"\n\"défaut) et des méthodes que les utilisateurs sont tenus de suivre mettre en \"\n\"œuvre eux-mêmes. Les méthodes avec des implémentations par défaut peuvent \"\n\"s'appuyer sur les méthodes requises.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Exercices\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust prend en charge les génériques, ce qui vous permet d'abstraire un \"\n\"algorithme (comme le tri) sur les types utilisés dans l'algorithme.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Il s'agit d'une abstraction à coût nul : vous obtenez exactement le même \"\n\"résultat que si vous aviez codé à la main les structures de données sans \"\n\"l'abstraction.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\"Vous pouvez utiliser des génériques pour résumer le type de champ concret :\"\n\n#: src/generics/generic-data.md\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_Q :_ Pourquoi `T` est spécifié deux fois dans `impl<T> Point<T> {}` ? N'est-\"\n\"ce pas redondant ?\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"C'est parce qu'il s'agit d'une section d'implémentation générique pour le \"\n\"type générique. Ils sont indépendamment génériques.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Cela signifie que ces méthodes sont définies pour n'importe quel `T`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Il est possible d'écrire `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` est toujours générique et vous pouvez utiliser `Point<f64>`, mais \"\n\"les méthodes de ce bloc ne seront disponibles que pour `Point<u32>`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::From(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output type. A trait can have multiple implementations for different input \"\n\"types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Lorsque vous travaillez avec des génériques, vous souhaitez souvent exiger \"\n\"que les types implémentent un trait, afin que vous puissiez appeler les \"\n\"méthodes de ce trait.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Vous pouvez le faire avec `T: Trait` ou `impl Trait` :\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Montrez une clause \\\"où\\\", les étudiants la rencontreront lors de la lecture \"\n\"du code.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\"Cela désencombre la signature de la fonction si vous avez beaucoup de \"\n\"paramètres.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Il a des fonctionnalités supplémentaires qui le rendent plus puissant.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Si quelqu'un demande, la fonctionnalité supplémentaire est que le type à \"\n\"gauche de \\\":\\\" peut être arbitraire, comme `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Semblable aux limites de trait, une syntaxe `impl Trait` peut être utilisée \"\n\"dans la fonction arguments et valeurs de retour :\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"La signification de `impl Trait` est un peu différente dans les différentes \"\n\"positions.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Pour un paramètre, `impl Trait` est comme un paramètre générique anonyme \"\n\"avec un trait lié.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Pour un type de retour, cela signifie que le type de retour est un type \"\n\"concret qui implémente le trait, sans nommer le type. Cela peut être utile \"\n\"lorsque vous ne souhaitez pas exposer le type concret dans un API publique.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"L'inférence est difficile en position de retour. Une fonction renvoyant \"\n\"`impl Foo` sélectionne le type concret qu'il renvoie, sans l'écrire dans la \"\n\"source. Une fonction retourner un type générique comme `collect<B>() -> B` \"\n\"peut retourner n'importe quel type satisfaisant `B`, et l'appelant peut \"\n\"avoir besoin d'en choisir un, comme avec `let x : Vec<_> = foo.collect()` ou \"\n\"avec le turbofish, `foo.collect ::<Vec<_>>()`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"Vous pouvez implémenter le trait [`Iterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.Iterator.html) sur vos propres types :\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) et [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) utilisés pour IO,\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust est livré avec une bibliothèque standard qui permet d'établir un \"\n\"ensemble de types communs utilisé par la bibliothèque et les programmes \"\n\"Rust. De cette façon, deux bibliothèques peuvent travailler ensemble en \"\n\"douceur car ils utilisent tous les deux le même type `String`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"En fait, Rust contient plusieurs couches de la bibliothèque standard : \"\n\"`core`, `alloc` et `std`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` inclut les types et fonctions les plus basiques qui ne dépendent pas \"\n\"de `libc`, de l'allocateur ou même la présence d'un système d'exploitation.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` inclut les types qui nécessitent un allocateur de tas global, tels \"\n\"que `Vec`, `Box` et `Arc`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Les applications Embedded Rust n'utilisent souvent que \\\"core\\\" et parfois \"\n\"\\\"alloc\\\".\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Voir la [Rust Reference](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) et [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) utilisés pour IO,\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Le contenu est traité comme Markdown. Toutes les caisses de bibliothèque \"\n\"Rust publiées sont automatiquement documenté sur [`docs.rs`](https://docs.\"\n\"rs) en utilisant le [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-\"\n\"rustdoc.html). C'est idiomatic pour documenter tous les éléments publics \"\n\"dans une API utilisant ce modèle.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Montrez aux élèves les documents générés pour la caisse \\\"rand\\\" sur [`docs.\"\n\"rs/rand`](https://docs.rs/rand).\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Exceptions\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` et `Result` sont largement utilisés, pas seulement dans la \"\n\"bibliothèque standard.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Comme pour `Option`, la valeur réussie se trouve à l'intérieur de `Result`, \"\n\"obligeant le développeur à l'extraire explicitement. Cela encourage la \"\n\"vérification des erreurs. Dans le cas où une erreur ne devrait jamais se \"\n\"produire, `unwrap()` ou `expect()` peut être appelé, et c'est aussi un \"\n\"signal de l'intention du développeur.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"La documentation `Result` est une lecture recommandée. Pas pendant le cours, \"\n\"mais cela vaut la peine d'être mentionné. Il contient de nombreuses méthodes \"\n\"et fonctions pratiques qui facilitent la programmation de style fonctionnel.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` est le type standard pour implémenter la gestion des erreurs, comme \"\n\"nous le verrons le jour 3.\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) est le \"\n\"tampon de chaîne UTF-8 évolutif standard alloué par tas :\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implémente [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), ce qui signifie que vous \"\n\"pouvez appeler tous Méthodes `str` sur une `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) est le tampon \"\n\"standard redimensionnable alloué au tas :\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implémente [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), ce qui signifie que vous pouvez \"\n\"appeler slice méthodes sur un `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\"Carte de hachage standard avec protection contre les attaques HashDoS :\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Lire` et `Ecrire`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"La surcharge d'opérateur est implémentée via des traits dans [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html) :\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\n#, fuzzy\nmsgid \"Discussion points:\"\nmsgstr \"Points de discussion:\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Vous pouvez implémenter `Add` pour `&Point`. Dans quelles situations est-ce \"\n\"utile ?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Réponse : `Add:add` consomme `self`. Si tapez `T` pour lequel vous êtes la \"\n\"surcharge de l'opérateur n'est pas `Copy`, vous devriez envisager de \"\n\"surcharger l'opérateur pour `&T` également. Cela évite un clonage inutile \"\n\"sur le site d'appel. \\\\* Pourquoi `Output` est-il un type associé ? Pourrait-\"\n\"il en faire un paramètre de type?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Réponse courte : les paramètres de type sont contrôlés par l'appelant, mais \"\n\"les types associés (comme `Output`) sont contrôlés par l'implémenteur d'un \"\n\"trait.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Les types implémentent [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) et [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.\"\n\"html) pour faciliter les conversions de type :\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) est \"\n\"automatiquement implémenté lorsque [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) est implémenté :\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"C'est pourquoi il est courant de n'implémenter que `From`, car votre type \"\n\"recevra également l'implémentation `Into`.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Lors de la déclaration d'un type d'entrée d'argument de fonction comme \"\n\"\\\"tout ce qui peut être converti en `String`\\\", la règle est opposée, vous \"\n\"devez utiliser `Into`. Votre fonction acceptera les types qui implémentent \"\n\"`From` et ceux qui implémentent _uniquement_ `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"En utilisant [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) et \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), vous \"\n\"pouvez résumer les sources `u8` :\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"De même, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) vous \"\n\"permet d'abstraire les puits `u8` :\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The `Default` Trait\"\nmsgstr \"Le trait \\\"par défaut\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"fournit une implémentation par défaut d'un trait.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Il peut être implémenté directement ou il peut être dérivé via \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"L'implémentation dérivée produira une instance où tous les champs sont \"\n\"définis sur leurs valeurs par défaut.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Cela signifie que tous les types de la structure doivent également \"\n\"implémenter `Default`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Les types Rust standard implémentent souvent `Default` avec des valeurs \"\n\"raisonnables (par exemple `0`, `\\\"\\\"`, etc.).\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\"La copie de structure partielle fonctionne bien avec la valeur par défaut.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"La bibliothèque standard Rust est consciente que les types peuvent \"\n\"implémenter `Default` et fournit des méthodes pratiques qui l'utilisent.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Les fermetures ou les expressions lambda ont des types qui ne peuvent pas \"\n\"être nommés. Cependant, ils implémenter [`Fn`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Fn.html) spécial, [`FnMut`](https://doc.rust-lang.org/std/ops/\"\n\"trait.FnMut.html), et [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnOnce.html) :\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"Appel de fonctions non sécurisées\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Un `Fn` ne consomme ni ne modifie les valeurs capturées, ou peut-être ne \"\n\"capture rien du tout, il peut donc être appelé plusieurs fois simultanément.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Un `FnMut` peut faire muter les valeurs capturées, vous pouvez donc \"\n\"l'appeler plusieurs fois mais pas simultanément.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Si vous avez un \\\"FnOnce\\\", vous ne pouvez l'appeler qu'une seule fois. Cela \"\n\"peut consommer des valeurs capturées.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` est un sous-type de `FnOnce`. `Fn` est un sous-type de `FnMut` et \"\n\"`FnOnce`. C'est à dire. vous pouvez utiliser un `FnMut` partout où un \"\n\"`FnOnce` est appelé, et vous pouvez utiliser un `Fn` partout où un `FnMut` \"\n\"ou `FnOnce` est réclamé.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"Bienvenue au jour 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Pile : Zone continue de mémoire pour les variables locales.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Les valeurs ont des tailles fixes connues au moment de la compilation.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Extrêmement rapide : il suffit de déplacer un pointeur de pile.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Facile à gérer : suit les appels de fonction.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Great memory locality.\"\nmsgstr \"Grande localité de mémoire.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap : Stockage de valeurs en dehors des appels de fonction.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\"Les valeurs ont des tailles dynamiques déterminées au moment de l'exécution.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\"Légèrement plus lent que la pile : une certaine comptabilité est nécessaire.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Aucune garantie de localisation de la mémoire.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"La création d'une \\\"chaîne\\\" place des données de taille fixe sur la pile et \"\n\"dimensionnées dynamiquement données sur le tas :\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\"Traditionnellement, les langues se répartissent en deux grandes catégories :\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Contrôle total via la gestion manuelle de la mémoire : C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Sécurité totale via la gestion automatique de la mémoire à l'exécution : \"\n\"Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust propose un nouveau mix :\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Contrôle total * et * sécurité via l'application du temps de compilation de \"\n\"la mémoire correcte gestion.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Il le fait avec un concept de propriété explicite.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Toutes les liaisons de variables ont un _scope_ où elles sont valides et \"\n\"c'est une erreur de utiliser une variable en dehors de sa portée :\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"On dit que la variable _possède_ la valeur.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"A la fin du scope, la variable est _dropped_ et les données sont libérées.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Une affectation transférera la propriété entre les variables :\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"L'affectation de `s1` à `s2` transfère la propriété.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Lorsque `s1` sort de la portée, rien ne se passe : il n'a pas de propriété.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"Lorsque `s2` sort de la portée, les données de la chaîne sont libérées.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before move to `s2`:\"\nmsgstr \"Avant de passer à `s2` :\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After move to `s2`:\"\nmsgstr \"Après le passage à `s2` :\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Lorsque vous transmettez une valeur à une fonction, la valeur est affectée à \"\n\"la fonction paramètre. Cela transfère la propriété :\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Tranches\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Mentionnez que c'est l'opposé des valeurs par défaut en C++, qui copie par \"\n\"valeur à moins que vous n'utilisiez `std::move` (et que le constructeur de \"\n\"déplacement soit défini !).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"Dans Rust, les clones sont explicites (en utilisant `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Avec le premier appel à `say_hello`, `main` abandonne la propriété de \"\n\"`name`. Ensuite, `name` ne peut plus être utilisé dans `main`.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"La mémoire de tas allouée pour `name` sera libérée à la fin de la fonction \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` peut conserver la propriété s'il passe `name` comme référence \"\n\"(`&name`) et si `say_hello` accepte une référence comme paramètre.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternativement, `main` peut passer un clone de `name` dans le premier appel \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust rend plus difficile que C++ la création de copies par inadvertance en \"\n\"faisant de la sémantique de déplacement la valeur par défaut et en forçant \"\n\"les programmeurs à rendre les clones explicites.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Double libération de mémoire en C++ moderne\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Le C++ moderne résout cela différemment :\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Les données de tas de `s1` sont dupliquées et `s2` obtient sa propre copie \"\n\"indépendante.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Lorsque `s1` et `s2` sortent de la portée, ils libèrent chacun leur propre \"\n\"mémoire.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before copy-assignment:\"\nmsgstr \"Avant l'affectation de copie :\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After copy-assignment:\"\nmsgstr \"Après l'affectation de copie :\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Bien que la sémantique de déplacement soit la valeur par défaut, certains \"\n\"types sont copiés par défaut :\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Ces types implémentent le trait \\\"Copier\\\".\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Vous pouvez activer vos propres types pour utiliser la sémantique de copie :\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Après l'affectation, `p1` et `p2` possèdent leurs propres données.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"Nous pouvons également utiliser `p1.clone()` pour copier explicitement les \"\n\"données.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"La copie et le clonage ne sont pas la même chose :\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"La copie fait référence aux copies au niveau du bit des régions de mémoire \"\n\"et ne fonctionne pas sur des objets arbitraires.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"La copie ne permet pas de logique personnalisée (contrairement aux \"\n\"constructeurs de copie en C++).\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Le clonage est une opération plus générale et permet également un \"\n\"comportement personnalisé en implémentant le trait \\\"Cloner\\\".\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\"La copie ne fonctionne pas sur les types qui implémentent le trait `Drop`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"In the above example, try the following:\"\nmsgstr \"Dans l'exemple ci-dessus, essayez ce qui suit :\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Ajoutez un champ `String` à `struct Point`. Il ne sera pas compilé car \"\n\"`String` n'est pas un type `Copy`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Supprimer `Copy` de l'attribut `derive`. L'erreur du compilateur est \"\n\"maintenant dans `println!` pour `p1`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Montrez que cela fonctionne si vous clonez `p1` à la place.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"The `Drop` Trait\"\nmsgstr \"Le trait `Lâcher`\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Les valeurs qui implémentent [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html) peuvent spécifier le code à exécuter lorsqu'elles sortent \"\n\"de la portée :\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Pourquoi `Drop::drop` ne prend-il pas `self` ?\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Réponse courte : si c'était le cas, `std::mem::drop` serait appelé à la fin \"\n\"de le bloc, résultant en un autre appel à `Drop :: drop`, et une pile \"\n\"débordement!\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Essayez de remplacer `drop(a)` par `a.drop()`.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) est un pointeur \"\n\"propriétaire vers des données sur le tas :\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implémente `Deref<Target = T>`, ce qui signifie que vous pouvez \"\n\"[appeler des méthodes depuis `T` directement sur une `Box<T>`](https://doc.\"\n\"rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Les types de données récursifs ou les types de données avec des tailles \"\n\"dynamiques doivent utiliser une `Box` :\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` est comme `std::unique_ptr` en C++, sauf qu'il est garanti qu'il n'est \"\n\"pas nul.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Une `Box` peut être utile lorsque vous :\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"avoir un type dont la taille ne peut pas être connue au moment de la \"\n\"compilation, mais le compilateur Rust veut connaître une taille exacte.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"souhaitez transférer la propriété d'une grande quantité de données. Pour \"\n\"éviter de copier de grandes quantités de données sur la pile, stockez plutôt \"\n\"les données sur le tas dans une `Box` afin que seul le pointeur soit déplacé.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"Si la `Box` n'a pas été utilisée ici et que nous avons essayé d'intégrer une \"\n\"`List` directement dans la `List`, le compilateur ne calculerait pas une \"\n\"taille fixe de la structure en mémoire, elle semblerait infinie.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` résout ce problème car il a la même taille qu'un pointeur normal et \"\n\"pointe simplement vers le prochain élément de la `Liste` dans le tas.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Supprimez la `Box` dans la définition de la liste et affichez l'erreur du \"\n\"compilateur. \\\"Récursif avec indirection\\\" est un indice que vous voudrez \"\n\"peut-être utiliser une boîte ou une référence quelconque, au lieu de stocker \"\n\"une valeur directement.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Optimisation niche\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"Exceptions\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) est un pointeur \"\n\"partagé compté par référence. Utilisez-le lorsque vous avez besoin de vous \"\n\"référer aux mêmes données depuis plusieurs endroits :\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Voir [`Arc`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) si vous \"\n\"êtes dans un contexte multi-thread.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Vous pouvez _rétrograder_ un pointeur partagé en un pointeur [`Weak`]\"\n\"(https://doc.rust-lang.org/std/rc/struct.Weak.html) pour créer des cycles \"\n\"qui va tomber.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"Le comptage de `Rc` garantit que sa valeur contenue est valide tant qu'il y \"\n\"a des références.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Comme `std::shared_ptr` de C++.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`clone` est bon marché : il crée un pointeur vers la même allocation et \"\n\"augmente le nombre de références. Ne crée pas de clone profond et peut \"\n\"généralement être ignoré lors de la recherche de problèmes de performances \"\n\"dans le code.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` clone en fait la valeur interne si nécessaire (\\\"clone-on-\"\n\"write\\\") et renvoie une référence mutable.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Utilisez `Rc::strong_count` pour vérifier le nombre de références.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"Vous pouvez `downgrader()` un `Rc` en un objet _faiblement compté en \"\n\"référence_ pour créer des cycles qui seront supprimés correctement \"\n\"(probablement en combinaison avec `RefCell`).\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\"Les objets de trait autorisent des valeurs de différents types, par exemple \"\n\"dans une collection :\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Disposition de la mémoire après l'allocation de `pets` :\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Au lieu de transférer la propriété lors de l'appel d'une fonction, vous \"\n\"pouvez laisser une la fonction _emprunte_ la valeur :\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"La fonction `add` _emprunte_ deux points et renvoie un nouveau point.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"L'appelant conserve la propriété des entrées.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"Notes on stack returns:\"\nmsgstr \"Remarques sur les retours de pile :\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Rust impose des contraintes sur la manière dont vous pouvez emprunter des \"\n\"valeurs :\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Vous pouvez avoir une ou plusieurs valeurs `&T` à tout moment, _ou_\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Vous pouvez avoir exactement une valeur `&mut T`.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Le code ci-dessus ne se compile pas car 'a' est emprunté comme mutable (via \"\n\"'c') et comme immuable (via 'b') en même temps.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Déplacez l'instruction `println!` pour `b` avant la portée qui introduit `c` \"\n\"pour que le code soit compilé.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Après ce changement, le compilateur se rend compte que 'b' n'est utilisé \"\n\"qu'avant le nouvel emprunt mutable de 'a' à 'c'. Il s'agit d'une \"\n\"fonctionnalité du vérificateur d'emprunt appelée \\\"durées de vie non \"\n\"lexicales\\\".\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Cellule<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Vous travaillez à la mise en place d'un système de surveillance de la santé. \"\n\"Dans le cadre de cela, vous besoin de suivre les statistiques de santé des \"\n\"utilisateurs.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Vous commencerez avec quelques fonctions stub dans un bloc `impl` ainsi \"\n\"qu'un `User` définition de structure. Votre objectif est d'implémenter les \"\n\"méthodes tronquées sur le `User` `struct` défini dans le bloc `impl`.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Copiez le code ci-dessous sur <https://play.rust-lang.org/> et remplissez \"\n\"les champs manquants méthodes :\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Durées de vie dans les appels de fonction\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Durées de vie dans les structures de données\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Si un type de données stocke des données empruntées, il doit être annoté \"\n\"avec une durée de vie :\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"Dans l'exemple ci-dessus, l'annotation sur `Highlight` impose que les \"\n\"données sous-jacentes au `&str` contenu vivent au moins aussi longtemps que \"\n\"toute instance de `Highlight` qui utilise ces données.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Si `text` est consommé avant la fin de la durée de vie de `fox` (ou `dog`), \"\n\"le vérificateur d'emprunt génère une erreur.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Les types avec des données empruntées obligent les utilisateurs à conserver \"\n\"les données d'origine. Cela peut être utile pour créer des vues légères, \"\n\"mais cela les rend généralement un peu plus difficiles à utiliser.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Dans la mesure du possible, faites en sorte que les structures de données \"\n\"soient directement propriétaires de leurs données.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Certaines structures contenant plusieurs références peuvent avoir plusieurs \"\n\"annotations de durée de vie. Cela peut être nécessaire s'il est nécessaire \"\n\"de décrire les relations de durée de vie entre les références elles-mêmes, \"\n\"en plus de la durée de vie de la structure elle-même. Ce sont des cas \"\n\"d'utilisation très avancés.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"We'll use the following proto:\"\nmsgstr \"Vous pouvez utiliser le fichier `Cargo.toml` suivant :\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Bienvenue au jour 1\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"Aujourd'hui, nous aborderons quelques sujets plus avancés de Rust :\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Tester\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\"Gestion des erreurs : paniques, « Résultat » et l'opérateur d'essai « ? ».\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"Le trait `Iterator` implémente de nombreuses opérations de programmation \"\n\"fonctionnelles courantes sur les collections (par exemple, `map`, `filter`, \"\n\"`reduce`, etc.). C'est le trait où vous pouvez trouver toute la \"\n\"documentation à propos d'eux. Dans Rust, ces fonctions devraient produire le \"\n\"code aussi efficace que l'impératif équivalent implémentations.\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` est le trait qui fait fonctionner les boucles. Il est \"\n\"implémenté par des types de collection tels que `Vec<T>` et leurs références \"\n\"telles que `&Vec<T>` et `&[T]`. Les gammes l'implémentent également. C'est \"\n\"pourquoi vous pouvez itérer sur un vecteur avec `for i in some_vec { .. }` \"\n\"mais `some_vec.next()` n'existe pas.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Le trait `Iterator` vous indique comment _itérer_ une fois que vous avez \"\n\"créé un itérateur. Le trait connexe \\\"IntoIterator\\\" vous indique comment \"\n\"créer l'itérateur :\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"La syntaxe ici signifie que chaque implémentation de `IntoIterator` doit \"\n\"déclarer deux types :\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item` : le type sur lequel nous itérons, tel que `i8`,\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter` : le type `Iterator` renvoyé par la méthode `into_iter`.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Notez que `IntoIter` et `Item` sont liés : l'itérateur doit avoir le même \"\n\"Type `Item`, ce qui signifie qu'il renvoie `Option<Item>`\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"vous permet de créer une collection à partir d'un [`Iterator`](https://doc.\"\n\"rust-lang.org/std/iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Itérateur`\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Il existe également des implémentations qui vous permettent de faire des \"\n\"choses sympas comme convertir un `Iterator<Item = Result<V, E>>` en un \"\n\"`Result<Vec<V>, E>`.\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Vous pouvez implémenter le trait [`Iterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.Iterator.html) sur vos propres types :\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Copiez le code suivant sur <https://play.rust-lang.org/> et faites les tests \"\n\"passer. Essayez d'éviter d'attribuer un \\\"Vec\\\" à vos résultats \"\n\"intermédiaires :\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Nous avons vu comment les blocs `impl` nous permettent de faire fonctionner \"\n\"l'espace de noms sur un type.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"De même, `mod` nous permet d'utiliser des types et des fonctions d'espace de \"\n\"noms :\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Les packages fournissent des fonctionnalités et incluent un fichier `Cargo.\"\n\"toml` qui décrit comment créer un ensemble de 1+ caisses.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Les caisses sont un arbre de modules, où une caisse binaire crée un \"\n\"exécutable et une caisse de bibliothèque se compile en une bibliothèque.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\"Les modules définissent l'organisation, la portée et sont au centre de cette \"\n\"section.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"La racine `crate` se trouve dans :\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (pour une caisse de bibliothèque)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (pour un crate binaire)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"Les modules définis dans les fichiers peuvent également être documentés à \"\n\"l'aide de \\\"commentaires de documentation internes\\\". Ceux-ci documentent \"\n\"l'élément qui les contient -- dans ce cas, un module.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Les modules sont une limite de confidentialité :\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Les éléments du module sont privés par défaut (cache les détails \"\n\"d'implémentation).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Les éléments parents et frères sont toujours visibles.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"En d'autres termes, si un élément est visible dans le module `foo`, il est \"\n\"visible dans tous les descendants de `foo`.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Utilisez le mot-clé `pub` pour rendre les modules publics.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"De plus, il existe des spécificateurs avancés `pub(...)` pour restreindre la \"\n\"portée de la visibilité publique.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Voir la [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\"La configuration de la visibilité de `pub(crate)` est un modèle courant.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\"Plus rarement, vous pouvez donner de la visibilité à un chemin spécifique.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"Dans tous les cas, la visibilité doit être accordée à un module ancêtre (et \"\n\"à tous ses descendants).\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Chemins\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Les chemins sont résolus comme suit :\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"En tant que chemin relatif :\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` ou `self::foo` fait référence à `foo` dans le module actuel,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` fait référence à `foo` dans le module parent.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As an absolute path:\"\nmsgstr \"En tant que chemin absolu :\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` fait référence à `foo` à la racine du crate actuel,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` fait référence à `foo` dans le crate `bar`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Installation\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Tests unitaires\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust et Cargo sont livrés avec un cadre de test unitaire simple :\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Les tests unitaires sont pris en charge dans tout votre code.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\"Les tests d'intégration sont pris en charge via le répertoire `tests/`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Cela vous permet de tester unitairement les helpers privés.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"L'attribut `#[cfg(test)]` n'est actif que lorsque vous lancez `cargo test`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Tests d'intégration\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Si vous souhaitez tester votre bibliothèque en tant que client, utilisez un \"\n\"test d'intégration.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Créez un fichier `.rs` sous `tests/` :\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Ces tests n'ont accès qu'à l'API publique de votre crate.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Tests de documentation\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust a un support intégré pour les tests de documentation :\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Les blocs de code dans les commentaires `///` sont automatiquement \"\n\"considérés comme du code Rust.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Le code sera compilé et exécuté dans le cadre du `cargo test`.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Testez le code ci-dessus sur [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algorithme de Luhn\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"L'[algorithme de Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) est \"\n\"utilisé pour valider les numéros de carte de crédit. L'algorithme prend une \"\n\"chaîne en entrée et fait le suivant pour valider le numéro de carte \"\n\"bancaire :\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"\"\n\"Ignorer tous les espaces. Numéro de rejet comportant moins de deux chiffres.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"En se déplaçant de droite à gauche, doubler tous les deux chiffres : pour le \"\n\"nombre `1234`, on double '3' et '1'.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Après avoir doublé un chiffre, additionnez les chiffres. Donc doubler '7' \"\n\"devient '14' ce qui devient '5'.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Additionnez tous les chiffres non doublés et doublés.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\"Le numéro de carte de crédit est valide si la somme se termine par '0'.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Copiez le code ci-dessous sur <https://play.rust-lang.org/> et remplissez \"\n\"les champs manquants fonctions et méthodes :\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Rust déclenchera une panique si une erreur fatale se produit lors de \"\n\"l'exécution :\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Les paniques concernent les erreurs irrécupérables et inattendues.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Les paniques sont des symptômes de bogues dans le programme.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Utilisez des API qui ne paniquent pas (telles que `Vec::get`) si le plantage \"\n\"n'est pas acceptable.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"Par défaut, une panique entraînera le déroulement de la pile. Le déroulement \"\n\"peut être rattrapé :\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Cela peut être utile dans les serveurs qui doivent continuer à fonctionner \"\n\"même si un seul la demande se bloque.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Cela ne fonctionne pas si `panic = 'abort'` est défini dans votre `Cargo.\"\n\"toml`.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"dans le plus simple\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Nous pouvons l'utiliser pour simplifier notre code de gestion des erreurs :\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"La variable `username` peut être soit `Ok(string)` soit `Err(error)`.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Utilisez l'appel `fs::write` pour tester les différents scénarios : pas de \"\n\"fichier, fichier vide, fichier avec nom d'utilisateur.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"L'expansion effective de `?` est un peu plus compliquée qu'indiqué \"\n\"précédemment :\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"works the same as\"\nmsgstr \"fonctionne de la même manière que\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"L'appel `From::from` ici signifie que nous essayons de convertir le type \"\n\"d'erreur en type renvoyé par la fonction :\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Types d'erreurs dynamiques\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Parfois, nous voulons permettre à tout type d'erreur d'être renvoyé sans \"\n\"écrire notre propre énumération couvrant toutes les différentes \"\n\"possibilités. `std::error::Error` rend cela facile.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Cela permet d'économiser du code, mais abandonne la possibilité de gérer \"\n\"proprement différents cas d'erreur différemment dans le programme. En tant \"\n\"que tel, ce n'est généralement pas une bonne idée d'utiliser `Box<dyn \"\n\"Error>` dans l'API publique d'un bibliothèque, mais cela peut être une bonne \"\n\"option dans un programme où vous voulez juste afficher le message d'erreur \"\n\"quelque part.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"La caisse [thiserror](https://docs.rs/thiserror/) est un moyen populaire de \"\n\"créer un error enum comme nous l'avons fait sur la page précédente :\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror`\"\nmsgstr \"\\\"Erreur\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` est essentiellement un wrapper autour de `Box<dyn Error>`. \"\n\"En tant que tel, ce n'est généralement pas un bon choix pour l'API publique \"\n\"d'une bibliothèque, mais il est largement utilisé dans les applications.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`anyhow::Result<V>` est un alias de type pour `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"Le type d'erreur réel à l'intérieur peut être extrait pour examen si \"\n\"nécessaire.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"La fonctionnalité fournie par `anyhow::Result<T>` peut être familière aux \"\n\"développeurs Go, car elle fournit modèles d'utilisation et ergonomie \"\n\"similaires à `(T, erreur)` de Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Le langage Rust comporte deux parties :\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**Safe Rust :** mémoire sécurisée, aucun comportement indéfini possible.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Unsafe Rust :** peut déclencher un comportement indéfini si les conditions \"\n\"préalables ne sont pas respectées.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"Nous verrons principalement Rust sûr dans ce cours, mais il est important de \"\n\"savoir ce qu'est Rust non securisé (_unsafe_).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Le code dangereux est généralement petit et isolé, et son exactitude doit \"\n\"être soigneusement documenté. Il est généralement enveloppé dans une couche \"\n\"d'abstraction sûre.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Unsafe Rust vous donne accès à cinq nouvelles fonctionnalités :\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Déréférencer les pointeurs bruts.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Accéder ou modifier des variables statiques mutables.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Accéder aux champs \\\"union\\\".\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\"Appelez les fonctions `unsafe`, y compris les fonctions `extern`. \\\\* Mettre \"\n\"en œuvre les traits \\\" non sécurisés \\\".\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"Nous aborderons ensuite brièvement les capacités dangereuses. Pour plus de \"\n\"détails, veuillez consulter [Chapitre 19.1 du Rust Book](https://doc.rust-\"\n\"lang.org/book/ch19-01-unsafe-rust.html) et le [Rustonomicon](https://doc.\"\n\"rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Unsafe Rust ne signifie pas que le code est incorrect. Cela signifie que les \"\n\"développeurs ont désactivé les fonctionnalités de sécurité du compilateur et \"\n\"doit écrire le code correct en eux-mêmes. Cela signifie que le compilateur \"\n\"n'applique plus les règles de sécurité de la mémoire de Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"La création de pointeurs est sûre, mais leur déréférencement nécessite \"\n\"`unsafe` :\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Il est recommandé (et requis par le guide de style Android Rust) d'écrire un \"\n\"commentaire pour chaque Bloc `unsafe` expliquant comment le code à \"\n\"l'intérieur satisfait aux exigences de sécurité de l'unsafe opérations qu'il \"\n\"effectue.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"Dans le cas des déréférencements de pointeurs, cela signifie que les \"\n\"pointeurs doivent être [_valid_](https://doc.rust-lang.org/std/ptr/index.\"\n\"html#safety), c'est-à-dire :\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Le pointeur doit être non nul.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Le pointeur doit être _dereferenceable_ (dans les limites d'un seul objet \"\n\"alloué).\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"L'objet ne doit pas avoir été désalloué.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Il ne doit pas y avoir d'accès simultanés au même endroit.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Si le pointeur a été obtenu en transtypant une référence, l'objet sous-\"\n\"jacent doit être actif et non référence peut être utilisée pour accéder à la \"\n\"mémoire.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"Dans la plupart des cas, le pointeur doit également être correctement aligné.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Il est sûr de lire une variable statique immuable :\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Cependant, étant donné que des courses de données peuvent se produire, il \"\n\"n'est pas sûr de lire et d'écrire mutable variables statiques :\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"L'utilisation d'une statique mutable est généralement une mauvaise idée, \"\n\"mais il y a des cas où cela peut avoir du sens dans le code `no_std` de bas \"\n\"niveau, comme l'implémentation d'un allocation de tas ou l'utilisation de \"\n\"certaines API C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Les unions sont comme des énumérations, mais vous devez suivre vous-même le \"\n\"champ actif :\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Aucun comportement indéfini à l'exécution :\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Les unions sont très rarement nécessaires dans Rust car vous pouvez \"\n\"généralement utiliser une énumération. Ils sont parfois nécessaires pour \"\n\"interagir avec les API de la bibliothèque C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Si vous voulez simplement réinterpréter les octets comme un type différent, \"\n\"vous voudrez probablement [`std::mem::transmute`](https://doc.rust-lang.org/\"\n\"stable/std/mem/fn.transmute.html) ou un coffre-fort wrapper tel que la \"\n\"caisse [`zerocopy`](https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Appel de fonctions non sécurisées\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Une fonction ou une méthode peut être marquée \\\"unsafe\\\" si elle a des \"\n\"conditions préalables supplémentaires que vous doit respecter pour éviter un \"\n\"comportement indéfini :\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"Aucun comportement indéfini à l'exécution :\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Ecrire des fonctions non sécurisées\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Vous pouvez marquer vos propres fonctions comme \\\"non sécurisées\\\" si elles \"\n\"nécessitent des conditions particulières pour éviter undefined comportement.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Ce n'est généralement un problème que pour les fonctions externes qui font \"\n\"des choses avec des pointeurs qui pourraient violer le modèle de mémoire de \"\n\"Rust, mais en général, toute fonction C peut avoir un comportement indéfini \"\n\"sous n'importe quel circonstances arbitraires.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"Nous n'utiliserions pas de pointeurs pour cela car cela peut être fait en \"\n\"toute sécurité avec des références.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Notez que le code non sécurisé est autorisé dans une fonction non sécurisée \"\n\"sans bloc « non sécurisé ». Nous pouvons interdisez cela avec \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Essayez de l'ajouter et voyez ce qui se \"\n\"passe.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Implémentation de traits non sécurisés\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Comme avec les fonctions, vous pouvez marquer un trait comme \\\"non \"\n\"sécurisé\\\" si l'implémentation doit garantir conditions particulières pour \"\n\"éviter un comportement indéfini.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Par exemple, la caisse \\\"zérocopie\\\" a un trait dangereux qui semble \"\n\"[quelque chose comme ça](https://docs.rs/zerocopy/latest/zerocopy/trait.\"\n\"AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Il devrait y avoir une section `# Sécurité` sur le Rustdoc pour le trait \"\n\"expliquant les exigences pour le trait à mettre en œuvre en toute sécurité.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"La section de sécurité actuelle pour `AsBytes` est plutôt plus longue et \"\n\"plus compliquée.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Les traits intégrés \\\"Envoyer\\\" et \\\"Synchroniser\\\" ne sont pas sûrs.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Enveloppe FFI sécurisée\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust a un excellent support pour appeler des fonctions via une fonction \"\n\"_foreign interface_ (FFI). Nous allons l'utiliser pour construire un wrapper \"\n\"sûr pour la `libc` fonctions que vous utiliseriez à partir de C pour lire \"\n\"les noms de fichiers d'un répertoire.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Vous voudrez consulter les pages de manuel :\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Copiez le code ci-dessous sur <https://play.rust-lang.org/> et remplissez \"\n\"les champs manquants fonctions et méthodes :\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Bienvenue au jour 1\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust est pris en charge pour le développement de plates-formes natives sur \"\n\"Android. Cela signifie que vous pouvez écrire de nouveaux services de \"\n\"système d'exploitation dans Rust, ainsi que l'extension prestations \"\n\"existantes.\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Nous allons essayer d'appeler Rust depuis l'un de vos propres projets \"\n\"aujourd'hui. Alors essayez de trouver un petit coin de votre code où nous \"\n\"pouvons déplacer quelques lignes de code vers Rust. Le moins il y a de \"\n\"dépendances et de types \\\"exotiques\\\", le mieux c'est. Quelque chose qui \"\n\"analyse quelques octets de donnée brute serait idéal.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Nous utiliserons un appareil virtuel Android pour tester notre code. Assurez-\"\n\"vous que vous avez accéder à un ou en créer un nouveau avec :\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Veuillez consulter le \\\\[Développeur Android Codelab\\\\] (https://source.\"\n\"android.com/docs/setup/start) pour plus de détails.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Le système de construction Android (Soong) prend en charge Rust via un \"\n\"certain nombre de modules :\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"Type de module\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Description\"\nmsgstr \"Descriptif\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binaire`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Produit un binaire Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Produit une bibliothèque Rust et fournit les variantes `rlib` et `dylib`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Produit une bibliothèque Rust C utilisable par les modules `cc` et fournit \"\n\"des variantes statiques et partagées.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Produit une bibliothèque Rust `proc-macro`. Ceux-ci sont analogues aux \"\n\"plugins du compilateur.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Produit un binaire de test Rust qui utilise le harnais de test Rust standard.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Produit un exécutable Rust fuzz utilisant `libfuzzer`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Génère la source et produit une bibliothèque Rust qui fournit une interface \"\n\"pour un protobuf particulier.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Génère la source et produit une bibliothèque Rust contenant des liaisons \"\n\"Rust aux bibliothèques C.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Nous examinerons ensuite `rust_binary` et `rust_library`.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Binaires Rust\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Commençons par une application simple. A la racine d'une caisse AOSP, créez \"\n\"les fichiers suivants :\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_ :\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_ :\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Vous pouvez maintenant compiler, envoyer et exécuter le binaire :\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Bibliothèques Rust\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Vous utilisez `rust_library` pour créer une nouvelle bibliothèque Rust pour \"\n\"Android.\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Ici, nous déclarons une dépendance sur deux bibliothèques :\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, que nous définissons ci-dessous,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, qui est une caisse déjà disponible dans \\\\[`external/rust/\"\n\"crates/`\\\\]\\\\[crates\\\\].\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_ :\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Vous construisez, poussez et exécutez le binaire comme avant :\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Le [langage de définition d'interface Android (AIDL)](https://developer.\"\n\"android.com/guide/components/aidl) est pris en charge dans Rust :\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Le code Rust peut appeler des serveurs AIDL existants,\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Vous pouvez créer de nouveaux serveurs AIDL dans Rust.\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfaces AIDL\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Vous déclarez l'API de votre service à l'aide d'une interface AIDL :\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_service_anniversaire/aidl/com/exemple/serviceanniversaire/IBirthdayService.\"\n\"aidl_ :\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_service_anniversaire/aidl/Android.bp_ :\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_service_anniversaire/aidl/com/exemple/serviceanniversaire/IBirthdayService.\"\n\"aidl_ :\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"Rust non sécurisé (_unsafe_)\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Mise en œuvre des services\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Nous pouvons maintenant implémenter le service AIDL :\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Mise en œuvre des services\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_service_anniversaire/Android.bp_ :\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"Serveur AIDL\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Enfin, nous pouvons créer un serveur qui expose le service :\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_service_anniversaire/src/server.rs_ :\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Nous pouvons maintenant créer, pousser et démarrer le service :\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Dans un autre terminal, vérifiez que le service s'exécute :\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Vous pouvez également appeler le service avec `service call` :\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"Client AIDL\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"Enfin, nous pouvons créer un client Rust pour notre nouveau service.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_service_anniversaire/src/client.rs_ :\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_service_anniversaire/src/client.rs_ :\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Notez que le client ne dépend pas de `libbirthdayservice`.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Créez, transférez et exécutez le client sur votre appareil :\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Étendons l'API avec plus de fonctionnalités : nous voulons laisser les \"\n\"clients spécifier un liste des lignes pour la carte d'anniversaire :\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rust by Example\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`&[u8]`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"Descriptif\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"Tranches\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"_service_anniversaire/aidl/com/exemple/serviceanniversaire/IBirthdayService.\"\n\"aidl_ :\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"_service_anniversaire/aidl/com/exemple/serviceanniversaire/IBirthdayService.\"\n\"aidl_ :\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"_service_anniversaire/src/client.rs_ :\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"_service_anniversaire/aidl/com/exemple/serviceanniversaire/IBirthdayService.\"\n\"aidl_ :\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"_service_anniversaire/src/lib.rs_ :\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"Rust pour Android\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_ :\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_ :\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"Vous pouvez maintenant générer automatiquement les liaisons :\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"L'approche globale ressemble à ceci:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Vous devez utiliser la caisse `log` pour vous connecter automatiquement à \"\n\"`logcat` (sur l'appareil) ou `stdout` (sur l'hôte) :\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_ :\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"_hello_rust_logs/Android.bp_ :\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_ :\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Compilez, transférez et exécutez le binaire sur votre appareil :\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Les journaux s'affichent dans `adb logcat` :\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust a un excellent support pour l'interopérabilité avec d'autres langages. \"\n\"Ça signifie Que tu peux:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Appelez les fonctions Rust à partir d'autres langues.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Fonctions d'appel écrites dans d'autres langages depuis Rust.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Lorsque vous appelez des fonctions dans une langue étrangère, nous disons \"\n\"que vous utilisez un _interface de fonction étrangère_, également connue \"\n\"sous le nom de FFI.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Interopérabilité avec C\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust prend entièrement en charge la liaison de fichiers objets avec une \"\n\"convention d'appel C. De même, vous pouvez exporter des fonctions Rust et \"\n\"les appeler depuis C.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Vous pouvez le faire à la main si vous le souhaitez :\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Nous avons déjà vu cela dans le [Safe FFI Wrapper exercice](../../exercises/\"\n\"day-3/safe-ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Cela suppose une parfaite connaissance de la plateforme cible. Non \"\n\"recommandé pour fabrication.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"Nous examinerons ensuite de meilleures options.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Utiliser Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"L'outil [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) peut générer automatiquement des liaisons à partir d'un fichier d'en-\"\n\"tête C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Créez d'abord une petite bibliothèque C :\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_ :\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_ :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Ajoutez ceci à votre fichier `Android.bp` :\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interopérabilité/bindgen/Android.bp_ :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Créez un fichier d'en-tête wrapper pour la bibliothèque (pas strictement \"\n\"nécessaire dans ce exemple):\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_ :\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Vous pouvez maintenant générer automatiquement les liaisons :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Enfin, nous pouvons utiliser les liaisons dans notre programme Rust :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"`main.rs` :\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interopérabilité/bindgen/main.rs_ :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Enfin, nous pouvons exécuter des tests générés automatiquement pour nous \"\n\"assurer que les liaisons fonctionnent :\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Appeler Rust\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Exporter des fonctions et des types Rust vers C est simple :\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interopérabilité/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interopérabilité/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interopérabilité/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Nous pouvons maintenant appeler cela à partir d'un binaire C :\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` désactive la modification du nom habituel de Rust, de sorte \"\n\"que le symbole exporté sera simplement le nom de la fonction. Vous pouvez \"\n\"également utiliser `#[export_name = \\\"some_name\\\"]` pour spécifier le nom \"\n\"que vous voulez.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"La [caisse CXX](https://cxx.rs/) permet de faire une interopérabilité sûre \"\n\"entre Rust et C++.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"L'approche globale ressemble à ceci:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"Rustdoc\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Fonctions\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"Rust non sécurisé (_unsafe_)\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Exemple C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::string`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Récepteur<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Cellule<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Récepteur<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Rust pour Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Interopérabilité avec Java\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java peut charger des objets partagés via [Java Native Interface (JNI)]\"\n\"(https://en.wikipedia.org/wiki/Java_Native_Interface). Le [`jni` crate]\"\n\"(https://docs.rs/jni/) vous permet de créer une bibliothèque compatible.\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Tout d'abord, nous créons une fonction Rust à exporter vers Java :\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interopérabilité/java/src/lib.rs_ :\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interopérabilité/java/Android.bp_ :\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Enfin, nous pouvons appeler cette fonction depuis Java :\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interopérabilité/java/HelloWorld.java_ :\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Bonjour le monde!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"Enfin, vous pouvez créer, synchroniser et exécuter le binaire :\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Pour le dernier exercice, nous examinerons l'un des projets sur lesquels \"\n\"vous travaillez. Laissez-nous regroupez-vous et faites-le ensemble. Quelques \"\n\"suggestions:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Appelez votre service AIDL avec un client écrit en Rust.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Déplacez une fonction de votre projet vers Rust et appelez-la.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Aucune solution n'est proposée ici car celle-ci est ouverte : elle repose \"\n\"sur quelqu'un en la classe ayant un morceau de code que vous pouvez remettre \"\n\"à Rust à la volée.\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Bienvenue au jour 1\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Exercices\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Règles de compilation\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Règles de compilation\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Exemple\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Exercices\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Voir le \\\\[tutoriel CXX\\\\] [2](https://cxx.rs/tutorial.html) pour un exemple \"\n\"complet d'utilisation.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Support intégré pour les tests.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Gestion des erreurs\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Interopérabilité avec C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Quelques notes:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"Bibliothèque\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Écosystème de Rust\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Écosystème de Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Vous pouvez utiliser le fichier `Cargo.toml` suivant :\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"Crates utiles\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Voir la [Rust Reference](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Génériques\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"`const`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Bienvenue dans Bare Metal Rust\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Il s'agit d'un cours autonome d'une journée sur la bare-metal Rust, destiné \"\n\"aux personnes familiarisées avec le bases de Rust (peut-être après avoir \"\n\"terminé le cours Comprehensive Rust(le guide complet de Rust)), et \"\n\"idéalement aussi avoir quelques expérience de la programmation bare-metal \"\n\"dans un autre langage tel que C.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Aujourd'hui, nous allons parler de Rust \\\"bare-metal\\\": exécuter du code \"\n\"Rust sans système d'exploitation sous nous. Cette volonté être divisé en \"\n\"plusieurs parties :\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"Qu'est-ce que `no_std` Rust ?\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Ecriture de firmware pour microcontrôleurs.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\"Ecriture du bootloader / code noyau pour les processeurs d'application.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Quelques caisses utiles pour le développement de Rust en métal nu.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"Pour la partie microcontrôleur du cours, nous utiliserons le [BBC micro:bit]\"\n\"(https://microbit.org/) v2 par exemple. C'est une [carte de développement]\"\n\"(https://tech.microbit.org/hardware/) basée sur le Nordic Microcontrôleur \"\n\"nRF51822 avec quelques LED et boutons, un accéléromètre et une boussole \"\n\"connectés I2C, et un débogueur SWD intégré.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Pour commencer, installez quelques outils dont nous aurons besoin plus tard. \"\n\"Sous gLinux ou Debian :\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"Et donnez aux utilisateurs du groupe `plugdev` l'accès au programmeur micro:\"\n\"bit :\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"On MacOS:\"\nmsgstr \"Sur MacOS :\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`core`\"\nmsgstr \"`noyau`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Tranches, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Résultat`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Afficher`, `Déboguer`, `écrire !`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panique !`, `assert_eq !`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` et toutes les fonctions habituelles liées au pointeur\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` et `async`/`wait`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`clôture`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Duration`\"\nmsgstr \"`Durée`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Boîte`, `Vache`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`Chaîne`, `CString`, `format !`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Error`\"\nmsgstr \"\\\"Erreur\\\"\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrière`, `Une fois`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` et le reste de `fs`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` et le reste de `io`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Chemin`, `OsString`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`net`\"\nmsgstr \"\\\"net\\\"\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Commande`, `Enfant`, `Code de sortie`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` et le reste de `thread`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instantané`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` dépend de RNG.\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` réexporte le contenu de `core` et `alloc`.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Un programme minimal `no_std`\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Pour utiliser `alloc` vous devez implémenter un [allocateur global (de tas)]\"\n\"(https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"La caisse `cortex_m_rt` fournit (entre autres) un gestionnaire de \"\n\"réinitialisation pour les microcontrôleurs Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"Ensuite, nous verrons comment accéder aux périphériques, avec des niveaux \"\n\"d'abstraction croissants.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"La macro `cortex_m_rt::entry` nécessite que la fonction ait le type `fn() -\"\n\"> !`, car le retour au gestionnaire de réinitialisation n'a pas de sens.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Exécutez l'exemple avec `cargo embed --bin minimal`\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"La plupart des microcontrôleurs accèdent aux périphériques via des E/S \"\n\"mappées en mémoire. Essayons d'allumer une LED sur notre micro:bit:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"La broche 21 du GPIO 0 est connectée à la première colonne de la matrice LED \"\n\"et la broche 28 à la première rangée.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Run the example with:\"\nmsgstr \"Exécutez l'exemple avec :\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Caisses d'accès périphérique\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) génère des wrappers Rust \"\n\"principalement sûrs pour périphériques mappés en mémoire de [CMSIS-SVD]\"\n\"(https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) des dossiers.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"Les fichiers SVD (System View Description) sont des fichiers XML \"\n\"généralement fournis par les fournisseurs de silicium qui décrire la carte \"\n\"mémoire de l'appareil.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Ils sont organisés par périphérique, registre, champ et valeur, avec noms, \"\n\"descriptions, adresses et ainsi de suite.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"Les fichiers SVD sont souvent bogués et incomplets, il existe donc divers \"\n\"projets qui corrigent le erreurs, ajoutez les détails manquants et publiez \"\n\"les caisses générées.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` fournit la table des vecteurs, entre autres choses.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Si vous \\\"installez cargo cargo-binutils\\\", vous pouvez exécuter `cargo \"\n\"objdump --bin pac -- -d --no-show-raw-insn` pour voir le binaire résultant.\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"HAL crates\"\nmsgstr \"caisses HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"[Caisses HAL](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) pour de nombreux microcontrôleurs fournissent des \"\n\"wrappers autour de divers périphériques. Ceux-ci implémentent généralement \"\n\"des traits de [`embedded-hal`](https://crates.io/crates/embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low` et `set_high` sont des méthodes sur le trait `embedded_hal` \"\n\"`OutputPin`.\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Les caisses HAL existent pour de nombreux appareils Cortex-M et RISC-V, y \"\n\"compris divers STM32, GD32, nRF, NXP, Microcontrôleurs MSP430, AVR et PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"Caisses support planche\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Les caisses de support de planche offrent un niveau supplémentaire \"\n\"d'emballage pour une planche spécifique pour plus de commodité.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"Dans ce cas, la caisse de support de carte fournit simplement des noms plus \"\n\"utiles, et un peu de initialisation.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"La caisse peut également inclure des pilotes pour certains périphériques \"\n\"embarqués en dehors du microcontrôleur lui-même.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` inclut un pilote simple pour la matrice LED.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"The type state pattern\"\nmsgstr \"Le modèle d'état de type\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"Les broches n'implémentent pas `Copy` ou `Clone`, donc une seule instance de \"\n\"chacun peut exister. Une fois qu'une broche est déplacé hors de la structure \"\n\"du port, personne d'autre ne peut le prendre.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"La modification de la configuration d'une broche consomme l'ancienne \"\n\"instance de broche, vous ne pouvez donc pas continuer à utiliser l'ancienne \"\n\"exemple par la suite.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"Le type d'une valeur indique l'état dans lequel elle se trouve : par ex. \"\n\"dans ce cas, l'état de la configuration d'une broche GPIO. Cela encode la \"\n\"machine d'état dans le système de type et garantit que vous ne essayez \"\n\"d'utiliser une broche d'une certaine manière sans la configurer correctement \"\n\"au préalable. État illégal les transitions sont interceptées au moment de la \"\n\"compilation.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Vous pouvez appeler `is_high` sur une broche d'entrée et `set_high` sur une \"\n\"broche de sortie, mais pas l'inverse.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"De nombreuses caisses HAL suivent ce modèle.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\"La caisse [`embedded-hal`](https://crates.io/crates/embedded-hal) fournit un \"\n\"certain nombre de caractéristiques couvrant les périphériques de \"\n\"microcontrôleur courants.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"ADC\"\nmsgstr \"ADC\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"I2C, SPI, UART, PEUT\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"RNG\"\nmsgstr \"GNA\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"Timers\"\nmsgstr \"Minuteries\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"Watchdogs\"\nmsgstr \"Chiens de garde\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\"D'autres caisses mettent alors en œuvre [pilotes](https://github.com/rust-\"\n\"embedded/awesome-embedded-rust#driver-crates) en ce qui concerne ces traits, \"\n\"par ex. un pilote d'accéléromètre peut nécessiter une implémentation de bus \"\n\"I2C ou SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Il existe des implémentations pour de nombreux microcontrôleurs, ainsi que \"\n\"pour d'autres plates-formes telles que Linux sur Tarte aux framboises.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\"Il y a des travaux en cours sur une version `async` de `embedded-hal`, mais \"\n\"ce n'est pas encore stable.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) est un ensemble d'outils pratique pour le \"\n\"débogage intégré, comme OpenOCD mais en mieux intégré.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \" et JTAG via les sondes CMSIS-DAP, ST-Link et J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\" et connectez GDB. Il est configuré par un Fichier `Embed.toml` dans votre \"\n\"répertoire de projet.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) est \"\n\"une norme Arm protocole sur USB pour un débogueur en circuit pour accéder au \"\n\"port d'accès de débogage CoreSight de divers Processeurs Arm Cortex. C'est \"\n\"ce que le débogueur embarqué sur le BBC micro:bit utilise.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link est une gamme de débogueurs en circuit de ST Microelectronics, J-\"\n\"Link est une gamme de SEGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"Le port d'accès au débogage est généralement une interface JTAG à 5 broches \"\n\"ou un débogage de fil série à 2 broches.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs est une bibliothèque que vous pouvez intégrer dans vos propres \"\n\"outils si vous le souhaitez.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"Le \\\\[protocole de l'adaptateur de débogage Microsoft\\\\] (https://microsoft.\"\n\"github.io/debug-adapter-protocol/) permet VSCode et d'autres IDE déboguent \"\n\"le code s'exécutant sur n'importe quel microcontrôleur pris en charge.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\"cargo-embed est un binaire construit à l'aide de la bibliothèque probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) est un mécanisme de transfert de données entre \"\n\"l'hôte de débogage et la cible à travers un certain nombre de tampons \"\n\"circulaires.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"Intégrer.toml :\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"Dans un terminal sous `src/bare-metal/microcontrollers/examples/` :\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"Dans un autre terminal du même répertoire :\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In GDB, try running:\"\nmsgstr \"Dans GDB, essayez d'exécuter :\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Other projects\"\nmsgstr \"Autres projets\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\\\\* [RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Concurrence pilotée par interruption en temps réel\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"Gestion des ressources partagées, transmission de messages, planification \"\n\"des tâches, file d'attente du minuteur\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Ambassade](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\"Exécuteurs \\\"asynchrones\\\" avec priorités, minuteries, mise en réseau, USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS axé sur la sécurité avec planification préemptive et prise en charge de \"\n\"l'unité de protection de la mémoire\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"Microkernel RTOS d'Oxide Computer Company avec protection de la mémoire, \"\n\"pilotes non privilégiés, IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Liaisons pour FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Certaines plates-formes ont des implémentations \\\"std\\\", par ex. [esp-idf]\"\n\"(https://esp-rs.github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC peut être considéré comme un RTOS ou un cadre de concurrence.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"Il n'inclut aucun HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Il utilise le Cortex-M NVIC (Nested Virtual Interrupt Controller) pour la \"\n\"planification plutôt qu'un noyau approprié.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"Cortex-M only.\"\nmsgstr \"Cortex-M uniquement.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"Google utilise TockOS sur le microcontrôleur Haven pour les clés de sécurité \"\n\"Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS est principalement écrit en C, mais il existe des liaisons Rust \"\n\"pour écrire des applications.\"\n\n#: src/exercises/bare-metal/morning.md\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Nous lirons la direction à partir d'une boussole I2C et enregistrerons les \"\n\"lectures sur un port série.\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Après avoir regardé l'exercice, vous pouvez regarder la [solution](solutions-\"\n\"afternoon.md) fournie.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Nous lirons la direction à partir d'une boussole I2C et enregistrerons les \"\n\"lectures sur un port série. Si tu as temps, essayez de l'afficher sur les \"\n\"LED d'une manière ou d'une autre, ou utilisez les boutons d'une manière ou \"\n\"d'une autre.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"Hints:\"\nmsgstr \"Astuces:\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Consultez la documentation du [`lsm303agr`](https://docs.rs/lsm303agr/latest/\"\n\"lsm303agr/) et [`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) \"\n\"caisses, ainsi que les [matériel micro:bit](https://tech.microbit.org/\"\n\"hardware/).\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\"La centrale de mesure inertielle LSM303AGR est connectée au bus interne I2C.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI est un autre nom pour I2C, donc le périphérique maître I2C s'appelle \"\n\"TWIM.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"Le pilote LSM303AGR a besoin de quelque chose implémentant `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. Le [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) structure implémente cela.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"Vous avez un [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) structure avec des champs pour les différentes broches et \"\n\"périphériques.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"Vous pouvez également consulter le [fiche technique nRF52833](https://\"\n\"infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) si vous le souhaitez, \"\n\"mais cela ne devrait pas être nécessaire pour cet exercice.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Téléchargez le \\\\[modèle d'exercice\\\\] (../../comprehensive-rust-exercises.\"\n\"zip) et regardez dans la `boussole` répertoire pour les fichiers suivants.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Cargo.toml` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Embed.toml` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\"`.cargo/config.toml` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Voir la sortie série sur Linux avec :\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"Ou sur Mac OS quelque chose comme (le nom de l'appareil peut être légèrement \"\n\"différent) :\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Utilisez Ctrl+A Ctrl+Q pour quitter picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Exercice du matin avec Rust sur bare metal\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([retour à l'exercice](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"Application processors\"\nmsgstr \"Processeurs d'application\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Jusqu'à présent, nous avons parlé de microcontrôleurs, tels que la série Arm \"\n\"Cortex-M. Essayons maintenant d'écrire quelque chose pour Cortex-A. Pour \"\n\"plus de simplicité, nous allons simplement travailler avec aarch64 de QEMU \"\n\"['virt'](https://qemu-project.gitlab.io/qemu/system/arm/virt.html).\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"D'une manière générale, les microcontrôleurs n'ont pas de MMU ou plusieurs \"\n\"niveaux de privilège (exception niveaux sur les processeurs Arm, sonne sur \"\n\"x86), contrairement aux processeurs d'application.\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU prend en charge l'émulation de différentes machines ou modèles de \"\n\"cartes pour chaque architecture. Le La carte 'virt' ne correspond à aucun \"\n\"matériel réel particulier, mais est conçue uniquement pour machines \"\n\"virtuelles.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"Inline assembly\"\nmsgstr \"Assemblage en ligne\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"Parfois, nous devons utiliser l'assemblage pour faire des choses qui ne sont \"\n\"pas possibles avec le code Rust. Par exemple, pour effectuer un \"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Si vous voulez vraiment faire cela, utilisez le crate [`psci`](https://\"\n\"crates.io/crates/smccc) qui contient des wrappers pour toutes ces fonctions.)\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI est l'interface de coordination de l'état de l'alimentation du bras, un \"\n\"ensemble standard de fonctions pour gérer le système et les états \"\n\"d'alimentation du processeur, entre autres. Il est implémenté par le \"\n\"firmware EL3 et les hyperviseurs sur de nombreux systèmes.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"La syntaxe `0 => _` signifie initialiser le registre à 0 avant d'exécuter le \"\n\"code assembleur en ligne, et ignorer son contenu par la suite. Nous devons \"\n\"utiliser `inout` plutôt que `in` car l'appel pourrait potentiellement \"\n\"encombrer le contenu des registres.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Cette fonction `main` doit être `#[no_mangle]` et `extern \\\"C\\\"` car elle \"\n\"est appelée depuis notre point d'entrée dans `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` sont les valeurs des registres `x0`–`x3`, qui sont classiquement \"\n\"utilisés par le bootloader pour passer des choses comme un pointeur vers \"\n\"l'arborescence des périphériques. Selon l'appel standard aarch64 convention \"\n\"(qui est ce que `extern \\\"C\\\"` spécifie d'utiliser), les registres `x0`–`x7` \"\n\"sont utilisés pour la 8 premiers arguments passés à une fonction, donc \"\n\"`entry.S` n'a rien de spécial à faire sauf assurez-vous qu'il ne modifie pas \"\n\"ces registres.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Exécutez l'exemple dans QEMU avec `make qemu_psci` sous `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Accès mémoire volatile pour MMIO\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"Utilisez `pointer::read_volatile` et `pointer::write_volatile`.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Never hold a reference.\"\nmsgstr \"Ne détenez jamais une référence.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!` vous permet d'obtenir des champs de structures sans créer de \"\n\"référence intermédiaire.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Accès volatile : les opérations de lecture ou d'écriture peuvent avoir des \"\n\"effets secondaires, évitez donc que le compilateur ou matériel de les \"\n\"réorganiser, de les dupliquer ou de les supprimer.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"Habituellement, si vous écrivez puis lisez, par ex. via une référence \"\n\"mutable, le compilateur peut supposer que la valeur lue est la même que la \"\n\"valeur que vous venez d'écrire et ne vous souciez pas de lire la mémoire.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Certaines caisses existantes pour l'accès volatile au matériel contiennent \"\n\"des références, mais ce n'est pas valable. Chaque fois qu'une référence \"\n\"existe, le compilateur peut choisir de la déréférencer.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"Utilisez la macro `addr_of!` pour obtenir des pointeurs de champ struct à \"\n\"partir d'un pointeur vers la struct.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"Let's write a UART driver\"\nmsgstr \"Écrivons un pilote UART\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"La machine QEMU 'virt' a un [PL011](https://developer.arm.com/documentation/\"\n\"ddi0183/g) UART, écrivons donc un pilote pour cela.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Notez que `Uart::new` n'est pas sûr alors que les autres méthodes sont \"\n\"sûres. C'est parce que tant que le l'appelant de `Uart::new` garantit que \"\n\"ses exigences de sécurité sont respectées (c'est-à-dire qu'il n'y a jamais \"\n\"une instance du pilote pour un UART donné, et rien d'autre aliasant son \"\n\"espace d'adressage), alors il est toujours sûr d'appeler `write_byte` plus \"\n\"tard car nous pouvons supposer que le nécessaire conditions préalables.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Nous aurions pu faire l'inverse (rendre `new` sûr mais `write_byte` non \"\n\"sûr), mais cela serait beaucoup moins pratique à utiliser car chaque endroit \"\n\"qui appelle `write_byte` aurait besoin de raisonner sur la sécurité\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Il s'agit d'un modèle courant pour écrire des wrappers sûrs de code non \"\n\"sécurisé : déplacer la charge de la preuve pour solidité d'un grand nombre \"\n\"d'endroits à un plus petit nombre d'endroits.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"More traits\"\nmsgstr \"Plus de traits\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Nous avons dérivé le trait `Debug`. Il serait également utile de mettre en \"\n\"œuvre quelques traits supplémentaires.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"L'implémentation de `Write` nous permet d'utiliser les macros `write!` et \"\n\"`writeln!` avec notre type `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Exécutez l'exemple dans QEMU avec `make qemu_minimal` sous `src/bare-metal/\"\n\"aps/examples`.\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"A better UART driver\"\nmsgstr \"Un meilleur pilote UART\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"Le PL011 a en fait \\\\[un tas de registres supplémentaires\\\\] [1](https://\"\n\"developer.arm.com/documentation/ddi0183/g/programmers-model/summary-of-\"\n\"registers), et ajoute des décalages pour construire des pointeurs pour \"\n\"accéder est sujette aux erreurs et difficile à lire. De plus, certains \"\n\"d'entre eux sont des champs de bits, ce qui serait bien de accéder de \"\n\"manière structurée.\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"Offset\"\nmsgstr \"Décalage\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"Register name\"\nmsgstr \"Nom du registre\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"Width\"\nmsgstr \"Largeur\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"FR\"\nmsgstr \"EN\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"IBRD\"\nmsgstr \"BIRD\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"RIS\"\nmsgstr \"SIR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"MIS\"\nmsgstr \"SIG\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"ICR\"\nmsgstr \"RIC\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\"Il existe également des registres d'identification qui ont été omis par \"\n\"souci de brièveté.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"Le crate [`bitflags`](https://crates.io/crates/bitflags) est utile pour \"\n\"travailler avec les bitflags.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"La macro `bitflags!` crée un nouveau type quelque chose comme `Flags(u16)`, \"\n\"avec un tas de méthodes implémentations pour obtenir et définir des drapeaux.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"Multiple registers\"\nmsgstr \"Plusieurs registres\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Nous pouvons utiliser une structure pour représenter la disposition de la \"\n\"mémoire des registres de l'UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) indique le compilateur pour disposer les champs struct dans \"\n\"l'ordre, en suivant les mêmes règles que C. Ceci est nécessaire pour que \"\n\"notre structure ait une mise en page prévisible, car la représentation Rust \"\n\"par défaut permet compilateur pour (entre autres) réorganiser les champs \"\n\"comme bon lui semble.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\"Utilisons maintenant la nouvelle structure `Registers` dans notre pilote.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Notez l'utilisation de `addr_of!` / `addr_of_mut!` pour obtenir des \"\n\"pointeurs vers des champs individuels sans créer une référence \"\n\"intermédiaire, qui serait malsaine.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"En l'utilisant\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Écrivons un petit programme en utilisant notre pilote pour écrire sur la \"\n\"console série et écho entrant octets.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Comme dans l'exemple [inline assembly](../inline-assembly.md), cette \"\n\"fonction `main` est appelée depuis notre code du point d'entrée dans `entry.\"\n\"S`. Voir les notes du formateur pour plus de détails.\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Exécutez l'exemple dans QEMU avec `make qemu` sous `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Ce serait bien de pouvoir utiliser les macros de journalisation du crate \"\n\"[`log`](https://crates.io/crates/log). Nous pouvons le faire en implémentant \"\n\"le trait `Log`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"Le déballage dans `log` est sûr car nous initialisons `LOGGER` avant \"\n\"d'appeler `set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Nous devons initialiser l'enregistreur avant de l'utiliser.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Notez que notre gestionnaire de panique peut désormais enregistrer les \"\n\"détails des paniques.\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Exécutez l'exemple dans QEMU avec `make qemu_logger` sous `src/bare-metal/\"\n\"aps/examples`.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot sans le C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Prend en charge x86, aarch64 et RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\"S'appuie sur LinuxBoot plutôt que d'avoir lui-même de nombreux pilotes.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"\\\\[Tutoriel Rust RaspberryPi OS\\\\] (https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"Initialisation, pilote UART, chargeur de démarrage simple, JTAG, niveaux \"\n\"d'exception, gestion des exceptions, tables de pages\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"Pas tous très bien écrits, alors méfiez-vous.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`pile-appel-cargo`](https://crates.io/crates/pile-appel-cargo)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Analyse statique pour déterminer l'utilisation maximale de la pile.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Crates utiles\"\n\n#: src/bare-metal/useful-crates.md\n#, fuzzy\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"Nous allons passer en revue quelques caisses qui résolvent certains \"\n\"problèmes courants de la programmation bare-metal.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"La caisse [`zerocopy`](https://docs.rs/zerocopy/) (de Fuchsia) fournit des \"\n\"traits et des macros pour convertir en toute sécurité entre séquences \"\n\"d'octets et autres types.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"Ce n'est pas adapté pour MMIO (car il n'utilise pas de lectures et \"\n\"d'écritures volatiles), mais peut être utile pour travailler avec des \"\n\"structures partagées avec du matériel, par ex. par DMA, ou envoyé sur une \"\n\"interface externe.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` peut être implémenté pour les types pour lesquels n'importe quel \"\n\"modèle d'octet est valide, et peut donc être en toute sécurité converti à \"\n\"partir d'une séquence d'octets non fiable.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Tenter de dériver `FromBytes` pour ces types échouerait, car `RequestType` \"\n\"n'utilise pas tous les valeurs u32 possibles comme discriminants, donc tous \"\n\"les modèles d'octets ne sont pas valides.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` a des types pour les primitives numériques sensibles à \"\n\"l'ordre des octets.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Exécutez l'exemple avec `cargo run` sous `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (Ce ne sera pas exécuter dans le Playground en raison de \"\n\"la dépendance de la caisse.)\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"La caisse [`aarch64-paging`](https://crates.io/crates/aarch64-paging) vous \"\n\"permet de créer des tables de pages en fonction de la mémoire virtuelle \"\n\"AArch64 Architecture du système.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Pour l'instant, il ne prend en charge que EL1, mais la prise en charge \"\n\"d'autres niveaux d'exception devrait être simple à ajouter.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Ceci est utilisé dans Android pour le \\\\[micrologiciel de la machine \"\n\"virtuelle protégée\\\\] [2](https://cs.android.com/android/platform/\"\n\"superproject/+/master:packages/modules/Virtualization/pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"Il n'y a pas de moyen simple d'exécuter cet exemple, car il doit être \"\n\"exécuté sur du matériel réel ou sous QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"est une caisse tierce implémentant un système d'allocation de copains de \"\n\"base. Il peut être utilisé à la fois pour [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"implémentant [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) afin que vous puissiez utiliser le caisse `alloc` standard \"\n\"(comme nous l'avons vu \\\\[avant\\\\] [4](../alloc.md)), ou pour allouer un \"\n\"autre espace d'adressage. Par exemple, nous pourrions vouloir allouer de \"\n\"l'espace MMIO pour les PCI BAR :\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"Les PCI BAR ont toujours un alignement égal à leur taille.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Exécutez l'exemple avec `cargo run` sous `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (Ce ne sera pas exécuter dans le Playground en raison \"\n\"de la dépendance de la caisse.)\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"Parfois, vous voulez quelque chose qui peut être redimensionné comme un \"\n\"`Vec`, mais sans allocation de tas. [`tinyvec`](https://crates.io/crates/\"\n\"tinyvec) fournit ceci : un vecteur soutenu par un tableau ou une tranche, \"\n\"qui pourrait être statiquement alloué ou sur la pile, qui garde une trace du \"\n\"nombre d'éléments utilisés et panique si vous essayez de utiliser plus que \"\n\"ce qui est alloué.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` nécessite que le type d'élément implémente `Default` pour \"\n\"l'initialisation.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Le Rust Playground inclut `tinyvec`, donc cet exemple fonctionnera bien en \"\n\"ligne.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` et les autres primitives de synchronisation de `std::\"\n\"sync` ne sont pas disponibles dans `core` ou `alloc`. Comment gérer la \"\n\"synchronisation ou la mutabilité intérieure, comme pour le partage état \"\n\"entre différents processeurs ?\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"Le crate [`spin`](https://crates.io/crates/spin) fournit des équivalents \"\n\"basés sur des verrous d'attente de plusieurs de ces primitives.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\n#, fuzzy\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Pour construire un binaire Rust bare-metal dans AOSP, vous devez utiliser \"\n\"une règle Soong `rust_ffi_static` pour construire votre code Rust, puis un \"\n\"`cc_binary` avec un script de liaison pour produire le binaire lui-même, \"\n\"puis un `raw_binary` pour convertir l'ELF en un binaire brut prêt à être \"\n\"exécuté.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"Pour les machines virtuelles exécutées sous crosvm sur aarch64, la \"\n\"bibliothèque [vmbase](https://android.googlesource.com/platform/packages/\"\n\"modules/Virtualization/+/refs/heads/master/vmbase/) fournit un script de \"\n\"liaison et des informations utiles. valeurs par défaut pour les règles de \"\n\"construction, ainsi qu'un point d'entrée, la journalisation de la console \"\n\"UART et plus encore.\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"La macro `main!` marque votre fonction principale, à appeler depuis le point \"\n\"d'entrée `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"Le point d'entrée `vmbase` gère l'initialisation de la console et émet un \"\n\"PSCI_SYSTEM_OFF pour l'arrêt la VM si votre fonction principale revient.\"\n\n#: src/exercises/bare-metal/afternoon.md\n#, fuzzy\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\"Nous allons écrire un pilote pour le dispositif d'horloge en temps réel \"\n\"PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Après avoir regardé l'exercice, vous pouvez regarder la [solution](solutions-\"\n\"afternoon.md) fournie.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"RTC driver\"\nmsgstr \"Pilote RTC\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"La machine QEMU aarch64 virt a une horloge en temps réel \\\\[PL031\\\\] [1]\"\n\"(https://developer.arm.com/documentation/ddi0224/c) à 0x9010000. Pour cet \"\n\"exercice, vous devrait écrire un pilote pour cela et l'utiliser pour \"\n\"imprimer l'heure actuelle sur la console série. Vous pouvez utiliser la \"\n\"caisse [`chrono`](https://crates.io/crates/chrono) pour le formatage de la \"\n\"date/heure.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Téléchargez le \\\\[modèle d'exercice\\\\] (../../comprehensive-rust-exercises.\"\n\"zip) et regardez dans le `rtc` répertoire pour les fichiers suivants.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"`src/exceptions.rs` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"`src/logger.rs` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"`src/pl011.rs` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"`build.rs` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"`entry.S` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"`exceptions.S` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"`idmap.S` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"`image.ld` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"`Makefile` (vous ne devriez pas avoir besoin de le modifier) :\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Exécutez le code dans QEMU avec `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Bare Metal Rust Après-midi\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([retour à l'exercice](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"`main.rs` :\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_pl031.rs_:\"\nmsgstr \"`pl031.rs` :\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\"Nous allons écrire un pilote pour le dispositif d'horloge en temps réel \"\n\"PL031.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Bienvenue à Comprehensive Rust(le guide complet de Rust) 🦀\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust prend entièrement en charge la concurrence en utilisant des threads de \"\n\"système d'exploitation avec des mutex et canaux.\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Le système de type Rust joue un rôle important dans la création de nombreux \"\n\"bugs de concurrence bogues de temps de compilation. Ceci est souvent appelé \"\n\"_concurrence sans peur_ puisque vous peut compter sur le compilateur pour \"\n\"assurer l'exactitude au moment de l'exécution.\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\"Les threads Rust fonctionnent de la même manière que les threads dans \"\n\"d'autres langages :\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\"Les threads sont tous des threads démons, le thread principal ne les attend \"\n\"pas.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Les thread panics sont indépendants les uns des autres.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Les paniques peuvent transporter une charge utile, qui peut être \"\n\"décompressée avec `downcast_ref`.\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"Exécutez l'exemple avec :\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"utilisé pour construire une instance par défaut d'un type.\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"Utilisez `let handle = thread::spawn(...)` et plus tard `handle.join()` pour \"\n\"attendre le fil pour finir.\"\n\n#: src/concurrency/threads.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"Cependant, vous pouvez utiliser un [fil de discussion de portée](https://doc.\"\n\"rust-lang.org/std/thread/fn.scope.html) pour cela :\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"Utilisez la valeur de retour `Result` de `handle.join()` pour accéder à la \"\n\"panique charge utile. C'est le bon moment pour parler de \\\\[`Tous`\\\\].\"\n\n#: src/concurrency/threads.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\"Déclenchez une panique dans le fil, notez que cela n'affecte pas `main`.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Utilisez la valeur de retour `Result` de `handle.join()` pour accéder à la \"\n\"panique charge utile. C'est le bon moment pour parler de \\\\[`Tous`\\\\].\"\n\n#: src/concurrency/threads.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Les threads normaux ne peuvent pas emprunter à leur environnement :\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Cependant, vous pouvez utiliser un [fil de discussion de portée](https://doc.\"\n\"rust-lang.org/std/thread/fn.scope.html) pour cela :\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"La raison en est que lorsque la fonction `thread::scope` se termine, tous \"\n\"les threads sont garantis d'être joints, afin qu'ils puissent renvoyer des \"\n\"données empruntées.\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Les règles d'emprunt normales de Rust s'appliquent : vous pouvez soit \"\n\"emprunter de manière mutable par un thread, soit de manière immuable par \"\n\"n'importe quel nombre de threads.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Les canaux Rust ont deux parties : un `Sender<T>` et un `Receiver<T>`. Les \"\n\"deux parties sont connectés via le canal, mais vous ne voyez que les \"\n\"extrémités.\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` signifie Multi-Producer, Single-Consumer. `Sender` et `SyncSender` \"\n\"implémentent `Clone` (donc vous pouvez créer plusieurs producteurs) mais \"\n\"`Receiver` ne le fait pas.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` et `recv()` renvoient `Result`. S'ils renvoient `Err`, cela \"\n\"signifie que la contrepartie `Sender` ou `Receiver` est supprimé et le canal \"\n\"est fermé.\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Vous obtenez un canal illimité et asynchrone avec `mpsc::channel()` :\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"Les canaux bornés et synchrones font que \\\"send\\\" bloque le thread actuel :\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Comment Rust sait-il interdire l'accès partagé à travers le thread? La \"\n\"réponse est en deux traits :\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) : un type `T` \"\n\"est `Send` s'il est sûr de déplacer un `T` à travers un thread frontière.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) : un type `T` \"\n\"est `Sync` s'il est sûr de déplacer un `&T` à travers un thread frontière.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"`Send` et `Sync` sont des \\\\[caractéristiques non sécurisées\\\\] [3](../\"\n\"unsafe/unsafe-traits.md). Le compilateur les dérivera automatiquement pour \"\n\"vos types tant qu'ils ne contiennent que les types `Send` et `Sync`. Vous \"\n\"pouvez également les implémenter manuellement lorsque vous sachez qu'il est \"\n\"valide.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"On peut considérer ces traits comme des marqueurs indiquant que le type \"\n\"possède certaines propriétés de sécurité des threads.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"Ils peuvent être utilisés dans les contraintes génériques comme des traits \"\n\"normaux.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Un type `T` est [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.\"\n\"html) s'il est sûr de déplacer une valeur `T` vers un autre thread.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"L'effet du déplacement de la propriété vers un autre thread est que \"\n\"_destructors_ s'exécutera dans ce fil. La question est donc de savoir quand \"\n\"vous pouvez allouer une valeur dans un thread et le désallouer dans un autre.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Un type `T` est [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.\"\n\"html) s'il est sûr d'accéder à une valeur `T` à partir de plusieurs fils en \"\n\"même temps.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Plus précisément, la définition est :\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` est `Sync` si et seulement si `&T` est `Envoyer`\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Cette déclaration est essentiellement une manière abrégée de dire que si un \"\n\"type est thread-safe pour une utilisation partagée, il est également thread-\"\n\"safe pour en passer des références à travers les threads.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"En effet, si un type est Sync, cela signifie qu'il peut être partagé sur \"\n\"plusieurs threads sans risque de courses de données ou d'autres problèmes de \"\n\"synchronisation, il est donc sûr de le déplacer vers un autre thread. Une \"\n\"référence au type peut également être déplacée en toute sécurité vers un \"\n\"autre thread, car les données auxquelles elle fait référence sont \"\n\"accessibles à partir de n'importe quel thread en toute sécurité.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"`Envoyer + Synchroniser`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"La plupart des types que vous rencontrez sont `Send + Sync` :\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Expéditeur<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Les types génériques sont généralement \\\"Send + Sync\\\" lorsque les \"\n\"paramètres de type sont `Envoyer + Synchroniser`.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Envoyer + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Ces types peuvent être déplacés vers d'autres threads, mais ils ne sont pas \"\n\"thread-safe. Typiquement à cause de la mutabilité intérieure :\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Récepteur<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cellule<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"` !Envoyer + Synchroniser`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Ces types sont thread-safe, mais ils ne peuvent pas être déplacés vers un \"\n\"autre thread :\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>` : utilise des primitives au niveau du système d'exploitation \"\n\"qui doivent être désallouées sur le fil qui les a créés.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Envoyer + !Synchroniser`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Ces types ne sont pas thread-safe et ne peuvent pas être déplacés vers \"\n\"d'autres threads :\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>` : chaque `Rc<T>` a une référence à un `RcBox<T>`, qui contient un \"\n\"comptage de référence non atomique.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T` : Rust suppose que les pointeurs bruts peuvent avoir \"\n\"des considérations de concurrence.\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\"Rust utilise le système de type pour appliquer la synchronisation des \"\n\"données partagées. C'est se fait principalement via deux types:\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), référence \"\n\"atomique comptée `T` : gère le partage entre les threads et prend soin de \"\n\"désallouer 'T' lorsque la dernière référence est supprimée,\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) : \"\n\"garantit un accès mutuellement exclusif à la valeur `T`.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) permet un \"\n\"accès partagé en lecture seule via sa méthode `clone` :\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` signifie \\\"Atomic Reference Counted\\\", une version thread-safe de `Rc` \"\n\"qui utilise opérations.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implémente `Clone` que `T` le fasse ou non. Il implémente `Send` et \"\n\"`Sync` ssi `T` les met en œuvre tous les deux.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` a le coût des opérations atomiques qui sont exécutées, mais \"\n\"après cela, l'utilisation du 'T' est libre.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Méfiez-vous des cycles de référence, `Arc` n'utilise pas de ramasse-miettes \"\n\"pour les détecter.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` peut aider.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) garantit \"\n\"l'exclusion mutuelle _et_ permet un accès mutable à `T` derrière une \"\n\"interface en lecture seule :\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Remarquez comment nous avons une couverture [`impl<T : Send> Sync for \"\n\"Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-\"\n\"for-Mutex%3CT%3E) mise en œuvre.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` dans Rust ressemble à une collection avec un seul élément - les \"\n\"données protégées.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Il n'est pas possible d'oublier d'acquérir le mutex avant d'accéder aux \"\n\"données protégées.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Vous pouvez obtenir un `&mut T` à partir d'un `&Mutex<T>` en prenant le \"\n\"verrou. Le `MutexGuard` garantit que le `&mut T` ne survit pas au \"\n\"verrouillage en cours.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implémente à la fois `Send` et `Sync` ssi `T` implémente `Send`.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Un homologue de verrouillage en lecture-écriture - `RwLock`.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Pourquoi `lock()` renvoie-t-il un `Result` ?\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Si le thread qui contenait le `Mutex` a paniqué, le `Mutex` devient \"\n\"\\\"empoisonné\\\" pour signaler que les données qu'il protège peuvent être dans \"\n\"un état incohérent. Appel de `lock()` sur un mutex empoisonné échoue avec \"\n\"une [`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.\"\n\"html). Vous pouvez appeler `into_inner()` sur l'erreur pour récupérer les \"\n\"données indépendamment de.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Voyons `Arc` et `Mutex` en action :\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"Possible solution:\"\nmsgstr \"Solution possible:\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"Notable parts:\"\nmsgstr \"Parties notables :\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` est enveloppé à la fois dans `Arc` et `Mutex`, car leurs préoccupations \"\n\"sont orthogonales.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Envelopper un `Mutex` dans un `Arc` est un modèle courant pour partager un \"\n\"état mutable entre les threads.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` doit être cloné en tant que `v2` avant de pouvoir être déplacé \"\n\"dans un autre thread. Remarque \\\"move\\\" a été ajouté à la signature lambda.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Des blocs sont introduits pour réduire autant que possible la portée du \"\n\"\\\"LockGuard\\\".\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"\"\n\"Mettons en pratique nos nouvelles compétences en matière de concurrence avec\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"Dîner des philosophes : un problème classique de la concurrence.\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\"Vérificateur de liens multithread : un projet plus vaste dans lequel vous \"\n\"utiliserez Cargo pour télécharger les dépendances puis vérifier les liens en \"\n\"parallèle.\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Le problème du dîner des philosophes est un problème classique en \"\n\"concurrence :\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Cinq philosophes dînent ensemble à la même table. Chaque philosophe a son \"\n\"propre place à table. Il y a une fourchette entre chaque assiette. Le plat \"\n\"servi est une sorte de spaghetti qui se mange avec deux fourchettes. Chaque \"\n\"philosophe peut seulement penser et manger alternativement. De plus, un \"\n\"philosophe ne peut que manger leur des spaghettis lorsqu'ils ont à la fois \"\n\"une fourchette gauche et droite. Ainsi deux fourches ne feront que être \"\n\"disponible lorsque ses deux voisins les plus proches pensent, ne mangent \"\n\"pas. Après un philosophe individuel finit de manger, ils poseront les deux \"\n\"fourchettes.\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Vous aurez besoin d'une [installation Cargo](../../cargo/running-locally.md) \"\n\"locale pour cet exercice. Copiez le code ci-dessous dans un fichier appelé \"\n\"`src/main.rs`, remplissez le vides, et testez que `cargo run` ne se bloque \"\n\"pas :\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"caisses HAL\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Vous pouvez utiliser le fichier `Cargo.toml` suivant :\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Utilisons nos nouvelles connaissances pour créer un vérificateur de liens \"\n\"multi-thread. Cela devrait commencez par une page Web et vérifiez que les \"\n\"liens sur la page sont valides. Cela devrait vérifier récursivement d'autres \"\n\"pages sur le même domaine et continuer à le faire jusqu'à ce que tous les \"\n\"pages ont été validées.\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Pour cela, vous aurez besoin d'un client HTTP tel que [`reqwest`](https://\"\n\"docs.rs/reqwest/). Créer un nouveau Projet Cargo et `reqwest` comme \"\n\"dépendance avec :\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Si `cargo add` échoue avec `error: no such subcommand`, veuillez modifier le \"\n\"Fichier `Cargo.toml` à la main. Ajoutez les dépendances répertoriées ci-\"\n\"dessous.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Les appels `cargo add` mettront à jour le fichier `Cargo.toml` pour qu'il \"\n\"ressemble à ceci :\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Vous pouvez maintenant télécharger la page de démarrage. Essayez avec un \"\n\"petit site comme `https://www.google.org/`.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Votre fichier `src/main.rs` devrait ressembler à ceci :\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Exécutez le code dans `src/main.rs` avec\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Utilisez des threads pour vérifier les liens en parallèle : envoyez les URL \"\n\"à vérifier à un channel et laissez quelques threads vérifier les URL en \"\n\"parallèle.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Étendez ceci pour extraire de manière récursive les liens de toutes les \"\n\"pages du domaine \\\"www.google.org\\\". Fixez une limite supérieure de 100 \"\n\"pages environ afin que vous ne finissez pas par être bloqué par le site.\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"Jour 3 Exercice du matin\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([retour à l'exercice](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Vérificateur de liens à plusieurs threads\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([retour à l'exercice](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md\n#, fuzzy\nmsgid \"Async Rust\"\nmsgstr \"Pourquoi Rust ?\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\n#, fuzzy\nmsgid \"Futures Control Flow\"\nmsgstr \"Flux de contrôle\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Dîner des philosophes - Asynchrone\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Vous aurez besoin d'une [installation Cargo](../../cargo/running-locally.md) \"\n\"locale pour cet exercice. Copiez le code ci-dessous dans un fichier appelé \"\n\"`src/main.rs`, remplissez le vides, et testez que `cargo run` ne se bloque \"\n\"pas :\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.36.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.7.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"Deux binaires\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"`src/main.rs` :\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"Exécution du parcours\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Run the server with:\"\nmsgstr \"Exécutez l'exemple avec :\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"and the client with:\"\nmsgstr \"Exécutez l'exemple avec :\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"Exercices de l'après-midi du jour 1\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([retour à l'exercice](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([retour à l'exercice](rtc.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Merci d'avoir pris Comprehensive Rust(le guide complet de Rust) 🦀!_ Nous \"\n\"espérons que vous l'avez apprécié et qu'il était utile.\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Nous nous sommes beaucoup amusés à préparer le cours. Le cours n'est pas \"\n\"parfait, donc si vous avez repéré des erreurs ou avez des idées \"\n\"d'améliorations, n'hésitez pas à nous contacter [contactez-nous au GitHub]\"\n\"(https://github.com/google/comprehensive-rust/discussions). Nous aimerions \"\n\"d'avoir de tes nouvelles.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Autres ressources Rust\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"La communauté Rust a créé une multitude de ressources gratuites et de haute \"\n\"qualité en ligne.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Official Documentation\"\nmsgstr \"Documents officiels\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"Le projet Rust héberge de nombreuses ressources. Celles-ci couvrent Rust en \"\n\"général :\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[Le langage de programmation Rust](https://doc.rust-lang.org/book/) : le \"\n\"livre canonique gratuit sur Rust. Couvre la langue en détail et comprend un \"\n\"peu de projets à construire.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/) : couvre la \"\n\"syntaxe de Rust via une série d'exemples qui présentent différentes \"\n\"constructions. Parfois comprend de petits exercices où l'on vous demande de \"\n\"développer le code de l'exemple.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Bibliothèque standard Rust](https://doc.rust-lang.org/std/) : documentation \"\n\"complète de la bibliothèque standard de Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/) : un livre \"\n\"incomplet qui décrit la grammaire et le modèle de mémoire de Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Des guides plus spécialisés hébergés sur le site officiel de Rust :\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/) : couvre le Rust non \"\n\"securisé (_unsafe_), y compris les pointeurs nus et l'interfaçage avec \"\n\"d'autres langages (FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Programmation asynchrone avec Rust](https://rust-lang.github.io/async-\"\n\"book/) : couvre le nouveau modèle de programmation asynchrone qui a été \"\n\"introduit après la publication du livre Rust.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/) : \"\n\"un introduction à l'utilisation de Rust sur des appareils embarqués sans \"\n\"système d'exploitation.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Matériel d'apprentissage non officiel\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Une petite sélection d'autres guides et tutoriels pour Rust :\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/) : couvre \"\n\"Rust du point de vue des programmeurs C de bas niveau.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"\\\\[Rust pour Programmeurs C Embarqué\\\\] (https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/) : couvre Rust du point de vue des développeurs qui écrivent des \"\n\"firmwares en C.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust pour les professionnels](https://overexact.com/rust-for-\"\n\"professionals/): couvre la syntaxe de Rust en utilisant des comparaisons \"\n\"côte à côte avec d'autres langages tels que C, C++, Java, JavaScript et \"\n\"Python.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust) : plus de 100 exercices \"\n\"pour vous aider vous apprenez Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"\\\\[Matériel de Ferrous Teaching\\\\] (https://ferrous-systems.github.io/\"\n\"teaching-material/index.html) : un série de petites présentations couvrant à \"\n\"la fois la partie de base et avancée de Rust. D'autres sujets tels que \"\n\"WebAssembly et async/wait sont également couvert.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Série débutant à Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) et [Faites vos premiers pas avec Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/) : deux Guides Rust \"\n\"destinés aux nouveaux développeurs. Le premier est un ensemble de 35 vidéos \"\n\"et le le second est un ensemble de 11 modules qui couvre la syntaxe Rust et \"\n\"les constructions de base.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"\\\\[Apprenez Rust avec trop de liens Listes\\\\] (https://rust-unofficial.\"\n\"github.io/too-many-lists/) : en profondeur exploration des règles de gestion \"\n\"de la mémoire de Rust, en implémentant quelques différents types de \"\n\"structures de liste.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Veuillez consulter le [Little Book of Rust Books](https://lborb.github.io/\"\n\"book/) pour encore plus de livres Rust.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Le matériel ici s'appuie sur les nombreuses sources de documentation de \"\n\"Rust. Voir la page sur \\\\[autres ressources\\\\] (other-resources.md) pour une \"\n\"liste complète des ressources utiles ressources.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Le matériel de Comprehensive Rust(le guide complet de Rust) est sous licence \"\n\"sous les termes de la licence d'Apache 2.0, veuillez consulter [`LICENSE`]\"\n\"(../LICENSE) pour plus de détails.\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Quelques exemples et exercices ont été copiés et adaptés de [Rust by Exemple]\"\n\"(https://doc.rust-lang.org/rust-by-example/). Veuillez consulter le \"\n\"Répertoire `third_party/rust-by-example/` pour plus de détails, y compris la \"\n\"licence conditions.\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust sur Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Certains exercices ont été copiés et adaptés de \\\\[Rust on Exercism\\\\] \"\n\"(https://exercism.org/tracks/rust). Veuillez consulter le Répertoire \"\n\"`third_party/rust-on-exercism/` pour plus de détails, y compris les \"\n\"conditions  de la licence.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"CXX\"\nmsgstr \"\\\\## CXX\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"La section [Interopérabilité avec C++](android/interoperability/cpp.md) \"\n\"utilise un image de [CXX](https://cxx.rs/). Veuillez consulter le répertoire \"\n\"`third_party/cxx/` pour plus de détails, y compris les termes de la licence.\"\n"
  },
  {
    "path": "po/it.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-01-24T11:55:41+01:00\\n\"\n\"PO-Revision-Date: 2023-10-25 10:17+0100\\n\"\n\"Last-Translator: Ivan De Marino <ivan.de.marino@gmail.com>\\n\"\n\"Language-Team: \\n\"\n\"Language: it\\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\"X-Generator: Poedit 3.4\\n\"\n\n#: src/SUMMARY.md:3 src/index.md:1\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Benvenuti a Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md:5 src/running-the-course.md:1\nmsgid \"Running the Course\"\nmsgstr \"Esecuzione del corso\"\n\n#: src/SUMMARY.md:6 src/running-the-course/course-structure.md:1\nmsgid \"Course Structure\"\nmsgstr \"Struttura del corso\"\n\n#: src/SUMMARY.md:7 src/running-the-course/keyboard-shortcuts.md:1\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Tasti rapidi\"\n\n#: src/SUMMARY.md:8 src/running-the-course/translations.md:1\nmsgid \"Translations\"\nmsgstr \"Traduzioni\"\n\n#: src/SUMMARY.md:9 src/cargo.md:1\nmsgid \"Using Cargo\"\nmsgstr \"Utilizzo di Cargo\"\n\n#: src/SUMMARY.md:10\nmsgid \"Rust Ecosystem\"\nmsgstr \"Ecosistema di Rust\"\n\n#: src/SUMMARY.md:11\nmsgid \"Code Samples\"\nmsgstr \"Esempi di codice\"\n\n#: src/SUMMARY.md:12\nmsgid \"Running Cargo Locally\"\nmsgstr \"Eseguire Cargo in locale\"\n\n#: src/SUMMARY.md:16\nmsgid \"Day 1: Morning\"\nmsgstr \"Giorno 1: Mattino\"\n\n#: src/SUMMARY.md:18 src/SUMMARY.md:44 src/SUMMARY.md:70 src/SUMMARY.md:93\n#: src/SUMMARY.md:119 src/SUMMARY.md:138 src/SUMMARY.md:158 src/SUMMARY.md:184\n#: src/SUMMARY.md:207 src/SUMMARY.md:244 src/SUMMARY.md:286 src/SUMMARY.md:337\nmsgid \"Welcome\"\nmsgstr \"Benvenuti\"\n\n#: src/SUMMARY.md:19 src/SUMMARY.md:21 src/hello-world.md:1\n#: src/hello-world/hello-world.md:1\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Hello World!\"\n\n#: src/SUMMARY.md:20 src/hello-world/what-is-rust.md:1\nmsgid \"What is Rust?\"\nmsgstr \"Cos’è Rust?\"\n\n#: src/SUMMARY.md:22 src/hello-world/benefits.md:1\nmsgid \"Benefits of Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:23 src/hello-world/playground.md:1\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:24 src/types-and-values.md:1\nmsgid \"Types and Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:25 src/types-and-values/variables.md:1\nmsgid \"Variables\"\nmsgstr \"Variabili\"\n\n#: src/SUMMARY.md:26 src/types-and-values/values.md:1\nmsgid \"Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:27 src/types-and-values/arithmetic.md:1\nmsgid \"Arithmetic\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:28 src/types-and-values/strings.md:1\nmsgid \"Strings\"\nmsgstr \"Corde\"\n\n#: src/SUMMARY.md:29 src/types-and-values/inference.md:1\nmsgid \"Type Inference\"\nmsgstr \"Inferenza del Tipo\"\n\n#: src/SUMMARY.md:30 src/types-and-values/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Esercizio: Valutazione Espressione\"\n\n#: src/SUMMARY.md:31 src/SUMMARY.md:40 src/SUMMARY.md:51 src/SUMMARY.md:56\n#: src/SUMMARY.md:64 src/SUMMARY.md:75 src/SUMMARY.md:82 src/SUMMARY.md:89\n#: src/SUMMARY.md:103 src/SUMMARY.md:113 src/SUMMARY.md:129 src/SUMMARY.md:134\n#: src/SUMMARY.md:144 src/SUMMARY.md:152 src/SUMMARY.md:164 src/SUMMARY.md:171\n#: src/SUMMARY.md:180 src/SUMMARY.md:192 src/SUMMARY.md:201\n#: src/types-and-values/solution.md:1 src/control-flow-basics/solution.md:1\n#: src/tuples-and-arrays/solution.md:1 src/references/solution.md:1\n#: src/user-defined-types/solution.md:1 src/pattern-matching/solution.md:1\n#: src/methods-and-traits/solution.md:1 src/generics/solution.md:1\n#: src/std-types/solution.md:1 src/std-traits/solution.md:1\n#: src/memory-management/solution.md:1 src/smart-pointers/solution.md:1\n#: src/borrowing/solution.md:1 src/slices-and-lifetimes/solution.md:1\n#: src/iterators/solution.md:1 src/modules/solution.md:1\n#: src/testing/solution.md:1 src/error-handling/solution.md:1\n#: src/unsafe-rust/solution.md:1\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Soluzioni\"\n\n#: src/SUMMARY.md:32 src/control-flow-basics.md:1\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Flusso di Controllo\"\n\n#: src/SUMMARY.md:33 src/control-flow-basics/conditionals.md:1\nmsgid \"Conditionals\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:34 src/control-flow-basics/loops.md:1\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"cicli `for`\"\n\n#: src/SUMMARY.md:35 src/control-flow-basics/break-continue.md:1\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` e `continue`\"\n\n#: src/SUMMARY.md:36 src/control-flow-basics/blocks-and-scopes.md:1\nmsgid \"Blocks and Scopes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:37 src/control-flow-basics/functions.md:1\nmsgid \"Functions\"\nmsgstr \"Funzioni\"\n\n#: src/SUMMARY.md:38 src/control-flow-basics/macros.md:1\nmsgid \"Macros\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:39 src/control-flow-basics/exercise.md:1\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:42\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Giorno 1: Pomeriggio\"\n\n#: src/SUMMARY.md:45 src/SUMMARY.md:46 src/tuples-and-arrays.md:1\n#: src/tuples-and-arrays/tuples-and-arrays.md:1\nmsgid \"Tuples and Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:47 src/tuples-and-arrays/iteration.md:1\n#, fuzzy\nmsgid \"Array Iteration\"\nmsgstr \"Iteratore (Iterator)\"\n\n#: src/SUMMARY.md:48 src/SUMMARY.md:71 src/tuples-and-arrays/match.md:1\n#: src/pattern-matching.md:1\nmsgid \"Pattern Matching\"\nmsgstr \"Pattern Matching\"\n\n#: src/SUMMARY.md:49 src/SUMMARY.md:72 src/tuples-and-arrays/destructuring.md:1\n#: src/pattern-matching/destructuring.md:1\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"Destrutturazione di Enum\"\n\n#: src/SUMMARY.md:50 src/tuples-and-arrays/exercise.md:1\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:52 src/references.md:1\nmsgid \"References\"\nmsgstr \"Riferimenti\"\n\n#: src/SUMMARY.md:53 src/references/shared.md:1\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Riferimenti\"\n\n#: src/SUMMARY.md:54 src/references/exclusive.md:1\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Riferimenti pendenti\"\n\n#: src/SUMMARY.md:55 src/references/exercise.md:1\nmsgid \"Exercise: Geometry\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:57 src/user-defined-types.md:1\nmsgid \"User-Defined Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:58 src/user-defined-types/named-structs.md:1\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Strutture (Struct)\"\n\n#: src/SUMMARY.md:59 src/user-defined-types/tuple-structs.md:5\nmsgid \"Tuple Structs\"\nmsgstr \"Strutture a Tupla (Tuple Structs)\"\n\n#: src/SUMMARY.md:60 src/user-defined-types/enums.md:1\n#: src/pattern-matching/destructuring.md:24\n#: src/pattern-matching/destructuring.md:67\nmsgid \"Enums\"\nmsgstr \"Enumerazioni (Enums)\"\n\n#: src/SUMMARY.md:61 src/user-defined-types/static-and-const.md:1\n#, fuzzy\nmsgid \"Static and Const\"\nmsgstr \"static & const\"\n\n#: src/SUMMARY.md:62 src/user-defined-types/aliases.md:1\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:63 src/user-defined-types/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Esercizio: Valutazione Espressione\"\n\n#: src/SUMMARY.md:68\nmsgid \"Day 2: Morning\"\nmsgstr \"Giorno 2: Mattina\"\n\n#: src/SUMMARY.md:73 src/pattern-matching/let-control-flow.md:1\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"Flusso di Controllo\"\n\n#: src/SUMMARY.md:74 src/pattern-matching/exercise.md:1\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Esercizio: Valutazione Espressione\"\n\n#: src/SUMMARY.md:76 src/methods-and-traits.md:1\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Read e Write\"\n\n#: src/SUMMARY.md:77 src/methods-and-traits/methods.md:1\nmsgid \"Methods\"\nmsgstr \"Metodi\"\n\n#: src/SUMMARY.md:78 src/methods-and-traits/traits.md:1\nmsgid \"Traits\"\nmsgstr \"Traits\"\n\n#: src/SUMMARY.md:79 src/methods-and-traits/deriving.md:1\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"Tratti derivati\"\n\n#: src/SUMMARY.md:80 src/methods-and-traits/trait-objects.md:1\nmsgid \"Trait Objects\"\nmsgstr \"Oggetti che implementano Trait (Trait Objects)\"\n\n#: src/SUMMARY.md:81 src/methods-and-traits/exercise.md:1\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:83 src/generics.md:1\nmsgid \"Generics\"\nmsgstr \"Generics\"\n\n#: src/SUMMARY.md:84 src/generics/generic-functions.md:1\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Funzioni Esterne (Extern)\"\n\n#: src/SUMMARY.md:85 src/generics/generic-data.md:1\nmsgid \"Generic Data Types\"\nmsgstr \"Tipi di dati Generic\"\n\n#: src/SUMMARY.md:86 src/generics/trait-bounds.md:1\nmsgid \"Trait Bounds\"\nmsgstr \"Trait Bounds\"\n\n#: src/SUMMARY.md:87 src/generics/impl-trait.md:1\n#, fuzzy\nmsgid \"`impl Trait`\"\nmsgstr \"`Impl Tratto`\"\n\n#: src/SUMMARY.md:88 src/generics/exercise.md:1\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:91\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Giorno 2: Pomeriggio\"\n\n#: src/SUMMARY.md:94 src/std-types.md:1\n#, fuzzy\nmsgid \"Standard Library Types\"\nmsgstr \"Libreria standard\"\n\n#: src/SUMMARY.md:95 src/std-types/std.md:1\nmsgid \"Standard Library\"\nmsgstr \"Libreria standard\"\n\n#: src/SUMMARY.md:96 src/std-types/docs.md:1\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"Test nella documentazione\"\n\n#: src/SUMMARY.md:97\n#, fuzzy\nmsgid \"`Option`\"\nmsgstr \"`Durata`\"\n\n#: src/SUMMARY.md:98\n#, fuzzy\nmsgid \"`Result`\"\nmsgstr \"`Opzione`, `Risultato`\"\n\n#: src/SUMMARY.md:99 src/android/interoperability/cpp/type-mapping.md:5\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"Stringa (String)\"\n\n#: src/SUMMARY.md:100 src/std-types/vec.md:1\n#, fuzzy\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md:101 src/std-types/hashmap.md:1 src/bare-metal/no_std.md:46\n#, fuzzy\nmsgid \"`HashMap`\"\nmsgstr \"`Mappa hash`\"\n\n#: src/SUMMARY.md:102 src/std-types/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"Esercizi\"\n\n#: src/SUMMARY.md:104 src/std-traits.md:1\n#, fuzzy\nmsgid \"Standard Library Traits\"\nmsgstr \"Libreria standard\"\n\n#: src/SUMMARY.md:105 src/std-traits/comparisons.md:1 src/async.md:17\n#, fuzzy\nmsgid \"Comparisons\"\nmsgstr \"Comparazione\"\n\n#: src/SUMMARY.md:106 src/std-traits/operators.md:1\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"Iteratori\"\n\n#: src/SUMMARY.md:107 src/std-traits/from-and-into.md:1\n#, fuzzy\nmsgid \"`From` and `Into`\"\nmsgstr \"`Da` e `Into`\"\n\n#: src/SUMMARY.md:108 src/std-traits/casting.md:1\n#, fuzzy\nmsgid \"Casting\"\nmsgstr \"Testare\"\n\n#: src/SUMMARY.md:109 src/std-traits/read-and-write.md:1\n#, fuzzy\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Leggi` e `Scrivi`\"\n\n#: src/SUMMARY.md:110\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:111 src/std-traits/closures.md:1\nmsgid \"Closures\"\nmsgstr \"Closures\"\n\n#: src/SUMMARY.md:112 src/std-traits/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: ROT13\"\nmsgstr \"Esercizi\"\n\n#: src/SUMMARY.md:117\nmsgid \"Day 3: Morning\"\nmsgstr \"Giorno 3: Mattina\"\n\n#: src/SUMMARY.md:120 src/memory-management.md:1\nmsgid \"Memory Management\"\nmsgstr \"Gestione della Memoria\"\n\n#: src/SUMMARY.md:121 src/memory-management/review.md:1\nmsgid \"Review of Program Memory\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:122 src/memory-management/approaches.md:1\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Gestione automatica della Memoria\"\n\n#: src/SUMMARY.md:123 src/memory-management/ownership.md:1\nmsgid \"Ownership\"\nmsgstr \"Proprietà\"\n\n#: src/SUMMARY.md:124 src/memory-management/move.md:1\nmsgid \"Move Semantics\"\nmsgstr \"Semantica di move\"\n\n#: src/SUMMARY.md:125\nmsgid \"`Clone`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:126 src/memory-management/copy-types.md:5\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Tipi Composti\"\n\n#: src/SUMMARY.md:127\n#, fuzzy\nmsgid \"`Drop`\"\nmsgstr \"Rilascio (Drop)\"\n\n#: src/SUMMARY.md:128 src/memory-management/exercise.md:1\nmsgid \"Exercise: Builder Type\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:130 src/smart-pointers.md:1\nmsgid \"Smart Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:131 src/smart-pointers/box.md:1\n#: src/android/interoperability/cpp/type-mapping.md:9\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"`Scatola`\"\n\n#: src/SUMMARY.md:132 src/smart-pointers/rc.md:1\n#, fuzzy\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md:133 src/smart-pointers/exercise.md:1\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:136\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Giorno 3: Pomeriggio\"\n\n#: src/SUMMARY.md:139 src/borrowing.md:1\nmsgid \"Borrowing\"\nmsgstr \"Prestito (Borrowing)\"\n\n#: src/SUMMARY.md:140 src/borrowing/shared.md:1\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"Prestito (Borrowing)\"\n\n#: src/SUMMARY.md:141 src/borrowing/borrowck.md:1\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"Prestito (Borrowing)\"\n\n#: src/SUMMARY.md:142 src/borrowing/interior-mutability.md:1\n#, fuzzy\nmsgid \"Interior Mutability\"\nmsgstr \"Interoperabilità\"\n\n#: src/SUMMARY.md:143 src/borrowing/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Salute (Health) Statistics\"\n\n#: src/SUMMARY.md:145 src/slices-and-lifetimes.md:1\n#, fuzzy\nmsgid \"Slices and Lifetimes\"\nmsgstr \"Lifetime\"\n\n#: src/SUMMARY.md:146\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Slice\"\n\n#: src/SUMMARY.md:147 src/slices-and-lifetimes/str.md:5\n#, fuzzy\nmsgid \"String References\"\nmsgstr \"Riferimenti pendenti\"\n\n#: src/SUMMARY.md:148 src/slices-and-lifetimes/lifetime-annotations.md:1\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Lifetime in Chiamate a Funzione\"\n\n#: src/SUMMARY.md:149\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Lifetime\"\n\n#: src/SUMMARY.md:150\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"Lifetime\"\n\n#: src/SUMMARY.md:151 src/slices-and-lifetimes/exercise.md:1\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:156\n#, fuzzy\nmsgid \"Day 4: Morning\"\nmsgstr \"Giorno 1: Mattino\"\n\n#: src/SUMMARY.md:159 src/iterators.md:1\n#, fuzzy\nmsgid \"Iterators\"\nmsgstr \"Iteratori\"\n\n#: src/SUMMARY.md:160 src/iterators/iterator.md:5 src/bare-metal/no_std.md:28\n#, fuzzy\nmsgid \"`Iterator`\"\nmsgstr \"`Iteratore`\"\n\n#: src/SUMMARY.md:161 src/iterators/intoiterator.md:1\n#, fuzzy\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md:162\n#, fuzzy\nmsgid \"`FromIterator`\"\nmsgstr \"FromIterator\"\n\n#: src/SUMMARY.md:163 src/iterators/exercise.md:1\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:165 src/SUMMARY.md:166 src/modules.md:1\n#: src/modules/modules.md:1\nmsgid \"Modules\"\nmsgstr \"Moduli\"\n\n#: src/SUMMARY.md:167 src/modules/filesystem.md:1\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Gerarchia del filesystem\"\n\n#: src/SUMMARY.md:168 src/modules/visibility.md:1\nmsgid \"Visibility\"\nmsgstr \"Visibilità\"\n\n#: src/SUMMARY.md:169\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:170 src/modules/exercise.md:1\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:172 src/SUMMARY.md:253 src/testing.md:1\n#: src/chromium/testing.md:1\nmsgid \"Testing\"\nmsgstr \"Testare\"\n\n#: src/SUMMARY.md:173\nmsgid \"Test Modules\"\nmsgstr \"Moduli (Module) di Test\"\n\n#: src/SUMMARY.md:174 src/testing/other.md:1\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"Altri progetti\"\n\n#: src/SUMMARY.md:175 src/SUMMARY.md:321 src/testing/useful-crates.md:1\nmsgid \"Useful Crates\"\nmsgstr \"Crates Utili\"\n\n#: src/SUMMARY.md:176 src/testing/googletest.md:1\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:177 src/testing/mocking.md:1\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:178 src/testing/lints.md:1\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:179 src/testing/exercise.md:1\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Algoritmo di Luhn\"\n\n#: src/SUMMARY.md:182\n#, fuzzy\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Giorno 1: Pomeriggio\"\n\n#: src/SUMMARY.md:185 src/error-handling.md:1\nmsgid \"Error Handling\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:186 src/error-handling/panics.md:1\nmsgid \"Panics\"\nmsgstr \"Panico (Panics)\"\n\n#: src/SUMMARY.md:187 src/error-handling/try.md:1\n#, fuzzy\nmsgid \"Try Operator\"\nmsgstr \"Iteratore (Iterator)\"\n\n#: src/SUMMARY.md:188 src/error-handling/try-conversions.md:1\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Conversione implicita\"\n\n#: src/SUMMARY.md:189\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"`Errore`\"\n\n#: src/SUMMARY.md:190 src/error-handling/thiserror-and-anyhow.md:1\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`Da` e `Into`\"\n\n#: src/SUMMARY.md:191\n#, fuzzy\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Gestione strutturata degli errori con `Result`\"\n\n#: src/SUMMARY.md:193 src/unsafe-rust.md:1 src/unsafe-rust/unsafe.md:1\nmsgid \"Unsafe Rust\"\nmsgstr \"Unsafe Rust\"\n\n#: src/SUMMARY.md:194\n#, fuzzy\nmsgid \"Unsafe\"\nmsgstr \"Unsafe Rust\"\n\n#: src/SUMMARY.md:195 src/unsafe-rust/dereferencing.md:1\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Dereferenziamento dei Puntatori (Pointers) Grezzi (Raw)\"\n\n#: src/SUMMARY.md:196 src/unsafe-rust/mutable-static.md:1\nmsgid \"Mutable Static Variables\"\nmsgstr \"Variabili Statiche Mutabili\"\n\n#: src/SUMMARY.md:197 src/unsafe-rust/unions.md:1\nmsgid \"Unions\"\nmsgstr \"Unioni\"\n\n#: src/SUMMARY.md:198 src/unsafe-rust/unsafe-functions.md:1\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Chiamare Funzioni Unsafe\"\n\n#: src/SUMMARY.md:199\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Implementare Unsafe Traits\"\n\n#: src/SUMMARY.md:200\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Safe FFI Wrapper\"\n\n#: src/SUMMARY.md:203 src/SUMMARY.md:327 src/bare-metal/android.md:1\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md:208 src/SUMMARY.md:245 src/android/setup.md:1\n#: src/chromium/setup.md:1\nmsgid \"Setup\"\nmsgstr \"Setup\"\n\n#: src/SUMMARY.md:209 src/SUMMARY.md:248 src/android/build-rules.md:1\nmsgid \"Build Rules\"\nmsgstr \"Regole (Rules) di Build\"\n\n#: src/SUMMARY.md:210\nmsgid \"Binary\"\nmsgstr \"Binario\"\n\n#: src/SUMMARY.md:211\nmsgid \"Library\"\nmsgstr \"Libreria (Library)\"\n\n#: src/SUMMARY.md:212 src/android/aidl.md:1\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md:213\nmsgid \"Interface\"\nmsgstr \"Interfaccia\"\n\n#: src/SUMMARY.md:214\nmsgid \"Implementation\"\nmsgstr \"Implementazione\"\n\n#: src/SUMMARY.md:215\nmsgid \"Server\"\nmsgstr \"Server\"\n\n#: src/SUMMARY.md:216 src/android/aidl/deploy.md:1\nmsgid \"Deploy\"\nmsgstr \"Deploy\"\n\n#: src/SUMMARY.md:217\nmsgid \"Client\"\nmsgstr \"Client\"\n\n#: src/SUMMARY.md:218 src/android/aidl/changing.md:1\nmsgid \"Changing API\"\nmsgstr \"Cambiare API\"\n\n#: src/SUMMARY.md:219 src/SUMMARY.md:317 src/android/logging.md:1\n#: src/bare-metal/aps/logging.md:1\nmsgid \"Logging\"\nmsgstr \"Logging\"\n\n#: src/SUMMARY.md:220 src/android/interoperability.md:1\nmsgid \"Interoperability\"\nmsgstr \"Interoperabilità\"\n\n#: src/SUMMARY.md:221\nmsgid \"With C\"\nmsgstr \"Con C\"\n\n#: src/SUMMARY.md:222\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Invocare C con Bindgen\"\n\n#: src/SUMMARY.md:223\nmsgid \"Calling Rust from C\"\nmsgstr \"Invocare Rust da C\"\n\n#: src/SUMMARY.md:224 src/android/interoperability/cpp.md:1\nmsgid \"With C++\"\nmsgstr \"Con C++\"\n\n#: src/SUMMARY.md:225 src/android/interoperability/cpp/bridge.md:1\n#, fuzzy\nmsgid \"The Bridge Module\"\nmsgstr \"Moduli (Module) di Test\"\n\n#: src/SUMMARY.md:226\n#, fuzzy\nmsgid \"Rust Bridge\"\nmsgstr \"Binari Rust\"\n\n#: src/SUMMARY.md:227 src/android/interoperability/cpp/generated-cpp.md:1\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:228\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:229 src/android/interoperability/cpp/shared-types.md:1\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Tipi Scalari\"\n\n#: src/SUMMARY.md:230 src/android/interoperability/cpp/shared-enums.md:1\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:231 src/android/interoperability/cpp/rust-result.md:1\n#, fuzzy\nmsgid \"Rust Error Handling\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:232 src/android/interoperability/cpp/cpp-exception.md:1\n#, fuzzy\nmsgid \"C++ Error Handling\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:233 src/android/interoperability/cpp/type-mapping.md:1\nmsgid \"Additional Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:234\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:235\nmsgid \"Building for Android: Genrules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:236\nmsgid \"Building for Android: Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:237\nmsgid \"With Java\"\nmsgstr \"Con Java\"\n\n#: src/SUMMARY.md:238 src/SUMMARY.md:300 src/SUMMARY.md:329 src/SUMMARY.md:351\n#: src/SUMMARY.md:373 src/exercises/android/morning.md:1\n#: src/exercises/bare-metal/morning.md:1\n#: src/exercises/bare-metal/afternoon.md:1\n#: src/exercises/concurrency/morning.md:1\n#: src/exercises/concurrency/afternoon.md:1\nmsgid \"Exercises\"\nmsgstr \"Esercizi\"\n\n#: src/SUMMARY.md:240\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:246 src/chromium/cargo.md:1\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:247\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:249\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"Unsafe Rust\"\n\n#: src/SUMMARY.md:250 src/chromium/build-rules/depending.md:1\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:251 src/chromium/build-rules/vscode.md:1\nmsgid \"Visual Studio Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:252 src/SUMMARY.md:257 src/SUMMARY.md:265 src/SUMMARY.md:278\n#: src/exercises/chromium/third-party.md:1\n#, fuzzy\nmsgid \"Exercise\"\nmsgstr \"Esercizi\"\n\n#: src/SUMMARY.md:254 src/chromium/testing/rust-gtest-interop.md:1\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:255 src/chromium/testing/build-gn.md:1\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:256 src/chromium/testing/chromium-import-macro.md:1\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:258 src/chromium/interoperability-with-cpp.md:1\n#, fuzzy\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperabilità con C\"\n\n#: src/SUMMARY.md:259\n#: src/chromium/interoperability-with-cpp/example-bindings.md:1\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Esempi\"\n\n#: src/SUMMARY.md:260\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:1\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:261\n#: src/chromium/interoperability-with-cpp/error-handling.md:1\n#, fuzzy\nmsgid \"CXX Error Handling\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:262\n#, fuzzy\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:263\n#, fuzzy\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Gestione degli errori\"\n\n#: src/SUMMARY.md:264\nmsgid \"Using CXX in Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:266 src/chromium/adding-third-party-crates.md:1\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:267\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:268\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:1\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:269\n#: src/chromium/adding-third-party-crates/downloading-crates.md:1\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:270\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:1\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:271\n#: src/chromium/adding-third-party-crates/resolving-problems.md:1\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:272\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:1\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:273\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:1\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:274\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:1\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:275\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:276\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:277\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md:1\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:279\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:280 src/exercises/chromium/solutions.md:1\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"Soluzioni\"\n\n#: src/SUMMARY.md:282\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal: Mattino\"\n\n#: src/SUMMARY.md:287 src/bare-metal/no_std.md:1\n#, fuzzy\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md:288\nmsgid \"A Minimal Example\"\nmsgstr \"Un Esempio Minimo\"\n\n#: src/SUMMARY.md:289 src/bare-metal/no_std.md:12 src/bare-metal/alloc.md:1\n#, fuzzy\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md:290 src/bare-metal/microcontrollers.md:1\nmsgid \"Microcontrollers\"\nmsgstr \"Microcontroller\"\n\n#: src/SUMMARY.md:291 src/bare-metal/microcontrollers/mmio.md:1\nmsgid \"Raw MMIO\"\nmsgstr \"Raw MMIO\"\n\n#: src/SUMMARY.md:292\nmsgid \"PACs\"\nmsgstr \"PAC\"\n\n#: src/SUMMARY.md:293\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crates\"\n\n#: src/SUMMARY.md:294\nmsgid \"Board Support Crates\"\nmsgstr \"Crate di supporto per Board\"\n\n#: src/SUMMARY.md:295\nmsgid \"The Type State Pattern\"\nmsgstr \"Il modello (Pattern) di Type State\"\n\n#: src/SUMMARY.md:296 src/bare-metal/microcontrollers/embedded-hal.md:1\n#, fuzzy\nmsgid \"`embedded-hal`\"\nmsgstr \"`hal incorporato`\"\n\n#: src/SUMMARY.md:297 src/bare-metal/microcontrollers/probe-rs.md:1\n#, fuzzy\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs`, `cargo-embed`\"\n\n#: src/SUMMARY.md:298 src/bare-metal/microcontrollers/debugging.md:1\nmsgid \"Debugging\"\nmsgstr \"Debugging\"\n\n#: src/SUMMARY.md:299 src/SUMMARY.md:320\nmsgid \"Other Projects\"\nmsgstr \"Altri Progetti\"\n\n#: src/SUMMARY.md:301 src/exercises/bare-metal/compass.md:1\n#: src/exercises/bare-metal/solutions-morning.md:3\nmsgid \"Compass\"\nmsgstr \"Bussola\"\n\n#: src/SUMMARY.md:302 src/SUMMARY.md:331 src/SUMMARY.md:354 src/SUMMARY.md:376\nmsgid \"Solutions\"\nmsgstr \"Soluzioni\"\n\n#: src/SUMMARY.md:304\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: Pomeriggio\"\n\n#: src/SUMMARY.md:306\nmsgid \"Application Processors\"\nmsgstr \"Processori di Applicazioni\"\n\n#: src/SUMMARY.md:307 src/bare-metal/aps/entry-point.md:1\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Preparativi per lavorare con Rust\"\n\n#: src/SUMMARY.md:308\nmsgid \"Inline Assembly\"\nmsgstr \"Inline Assembly\"\n\n#: src/SUMMARY.md:309\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md:310\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Scriviamo un driver UART\"\n\n#: src/SUMMARY.md:311\nmsgid \"More Traits\"\nmsgstr \"Traits addizionali\"\n\n#: src/SUMMARY.md:312\nmsgid \"A Better UART Driver\"\nmsgstr \"Un migliore driver UART\"\n\n#: src/SUMMARY.md:313 src/bare-metal/aps/better-uart/bitflags.md:1\nmsgid \"Bitflags\"\nmsgstr \"Bitflag\"\n\n#: src/SUMMARY.md:314\nmsgid \"Multiple Registers\"\nmsgstr \"Registri multipli\"\n\n#: src/SUMMARY.md:315 src/bare-metal/aps/better-uart/driver.md:1\nmsgid \"Driver\"\nmsgstr \"Driver\"\n\n#: src/SUMMARY.md:316 src/SUMMARY.md:318\nmsgid \"Using It\"\nmsgstr \"Usandolo\"\n\n#: src/SUMMARY.md:319 src/bare-metal/aps/exceptions.md:1\nmsgid \"Exceptions\"\nmsgstr \"Eccezioni\"\n\n#: src/SUMMARY.md:322 src/bare-metal/useful-crates/zerocopy.md:1\n#, fuzzy\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopia`\"\n\n#: src/SUMMARY.md:323 src/bare-metal/useful-crates/aarch64-paging.md:1\n#, fuzzy\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md:324 src/bare-metal/useful-crates/buddy_system_allocator.md:1\n#, fuzzy\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md:325 src/bare-metal/useful-crates/tinyvec.md:1\n#, fuzzy\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md:326 src/bare-metal/useful-crates/spin.md:1\n#, fuzzy\nmsgid \"`spin`\"\nmsgstr \"`gira`\"\n\n#: src/SUMMARY.md:328\n#, fuzzy\nmsgid \"`vmbase`\"\nmsgstr \"vmbase\"\n\n#: src/SUMMARY.md:330\nmsgid \"RTC Driver\"\nmsgstr \"Driver RTC\"\n\n#: src/SUMMARY.md:333\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concorrenza: Mattino\"\n\n#: src/SUMMARY.md:338 src/concurrency/threads.md:1\nmsgid \"Threads\"\nmsgstr \"Threads\"\n\n#: src/SUMMARY.md:339 src/concurrency/scoped-threads.md:1\nmsgid \"Scoped Threads\"\nmsgstr \"Thread con Scope (Scoped Threads)\"\n\n#: src/SUMMARY.md:340 src/concurrency/channels.md:1\nmsgid \"Channels\"\nmsgstr \"Canali (Channels)\"\n\n#: src/SUMMARY.md:341 src/concurrency/channels/unbounded.md:1\nmsgid \"Unbounded Channels\"\nmsgstr \"Canali illimitati (Unbounded Channels)\"\n\n#: src/SUMMARY.md:342 src/concurrency/channels/bounded.md:1\nmsgid \"Bounded Channels\"\nmsgstr \"Canali delimitati (Bounded Channels)\"\n\n#: src/SUMMARY.md:343 src/concurrency/send-sync.md:1\n#, fuzzy\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Invia` e `Sincronizza`\"\n\n#: src/SUMMARY.md:344 src/concurrency/send-sync/send.md:1\n#, fuzzy\nmsgid \"`Send`\"\nmsgstr \"`Invia`\"\n\n#: src/SUMMARY.md:345 src/concurrency/send-sync/sync.md:1\n#, fuzzy\nmsgid \"`Sync`\"\nmsgstr \"`Sincronizza`\"\n\n#: src/SUMMARY.md:346 src/concurrency/send-sync/examples.md:1\nmsgid \"Examples\"\nmsgstr \"Esempi\"\n\n#: src/SUMMARY.md:347 src/concurrency/shared_state.md:1\nmsgid \"Shared State\"\nmsgstr \"Stato Condiviso\"\n\n#: src/SUMMARY.md:348 src/concurrency/shared_state/arc.md:1\n#, fuzzy\nmsgid \"`Arc`\"\nmsgstr \"`Arco`\"\n\n#: src/SUMMARY.md:349 src/concurrency/shared_state/mutex.md:1\n#, fuzzy\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md:350 src/memory-management/review.md:16\n#: src/error-handling/try-conversions.md:23\n#: src/concurrency/shared_state/example.md:1\nmsgid \"Example\"\nmsgstr \"Esempio\"\n\n#: src/SUMMARY.md:352 src/SUMMARY.md:374\n#: src/exercises/concurrency/dining-philosophers.md:1\n#: src/exercises/concurrency/solutions-morning.md:3\nmsgid \"Dining Philosophers\"\nmsgstr \"Filosofi a tavola\"\n\n#: src/SUMMARY.md:353 src/exercises/concurrency/link-checker.md:1\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Correttore di Link a Thread multipli\"\n\n#: src/SUMMARY.md:356\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concorrenza: Pomeriggio\"\n\n#: src/SUMMARY.md:358\nmsgid \"Async Basics\"\nmsgstr \"Nozioni di base sulla programmazione Async (asincrona)\"\n\n#: src/SUMMARY.md:359 src/async/async-await.md:1\n#, fuzzy\nmsgid \"`async`/`await`\"\nmsgstr \"`asincrono`/`aspetta`\"\n\n#: src/SUMMARY.md:360 src/async/futures.md:1\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md:361 src/async/runtimes.md:1\nmsgid \"Runtimes\"\nmsgstr \"Esecutori\"\n\n#: src/SUMMARY.md:362 src/async/runtimes/tokio.md:1\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md:363 src/exercises/concurrency/link-checker.md:127\n#: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143\nmsgid \"Tasks\"\nmsgstr \"Compiti (Tasks)\"\n\n#: src/SUMMARY.md:364 src/async/channels.md:1\nmsgid \"Async Channels\"\nmsgstr \"Canali asincroni (Async Channels)\"\n\n#: src/SUMMARY.md:365\nmsgid \"Control Flow\"\nmsgstr \"Flusso di Controllo\"\n\n#: src/SUMMARY.md:366 src/async/control-flow/join.md:1\nmsgid \"Join\"\nmsgstr \"Giunzione (Join)\"\n\n#: src/SUMMARY.md:367 src/async/control-flow/select.md:1\nmsgid \"Select\"\nmsgstr \"Selezione (Select)\"\n\n#: src/SUMMARY.md:368\nmsgid \"Pitfalls\"\nmsgstr \"Insidie\"\n\n#: src/SUMMARY.md:369\nmsgid \"Blocking the Executor\"\nmsgstr \"Blocco dell’Esecutore\"\n\n#: src/SUMMARY.md:370 src/async/pitfalls/pin.md:1\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md:371 src/async/pitfalls/async-traits.md:1\nmsgid \"Async Traits\"\nmsgstr \"Trait asincroni (Async Trait)\"\n\n#: src/SUMMARY.md:372 src/async/pitfalls/cancellation.md:1\nmsgid \"Cancellation\"\nmsgstr \"Cancellazione (cancellation)\"\n\n#: src/SUMMARY.md:375 src/exercises/concurrency/chat-app.md:1\n#: src/exercises/concurrency/solutions-afternoon.md:95\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Applicazione Chat-Broadcast\"\n\n#: src/SUMMARY.md:378\nmsgid \"Final Words\"\nmsgstr \"Parole finali\"\n\n#: src/SUMMARY.md:382 src/thanks.md:1\nmsgid \"Thanks!\"\nmsgstr \"Grazie!\"\n\n#: src/SUMMARY.md:383 src/glossary.md:1\nmsgid \"Glossary\"\nmsgstr \"Glossario\"\n\n#: src/SUMMARY.md:384\nmsgid \"Other Resources\"\nmsgstr \"Altre risorse\"\n\n#: src/SUMMARY.md:385 src/credits.md:1\nmsgid \"Credits\"\nmsgstr \"Crediti\"\n\n#: src/index.md:3\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\n#: src/index.md:7\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Questo è un corso Rust di tre giorni sviluppato dal team Android. Il corso \"\n\"copre l'intero spettro di conoscenze su Rust, dalla sintassi di base ad \"\n\"argomenti avanzati come i generici e gestione degli errori. Nell’ultimo \"\n\"giorno include anche contenuti specifici per Android.\"\n\n#: src/index.md:11\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md:15\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"L'obiettivo del corso è insegnarti Rust. Partiamo dal presupposto che tu non \"\n\"sappia nulla su Rust e spero di:\"\n\n#: src/index.md:18\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\"Fornire una comprensione completa della sintassi e del linguaggio di Rust.\"\n\n#: src/index.md:19\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Consentono di modificare i programmi esistenti e scrivere nuovi programmi in \"\n\"Rust.\"\n\n#: src/index.md:20\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Mostra i comuni idiomi di Rust.\"\n\n#: src/index.md:22\n#, fuzzy\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"Ci riferiamo ai primi tre giorni di corso come “Fondamenti di Rust”.\"\n\n#: src/index.md:24\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"I primi tre giorni ti mostrano i fondamenti di Rust. A seguito di questo, \"\n\"sei invitato ad approfondire uno o più argomenti specialistici:\"\n\n#: src/index.md:26\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): un corso di mezza giornata sull'utilizzo della \"\n\"piattaforma Rust per Android sviluppo (AOSP). Ciò include l'interoperabilità \"\n\"con C, C++ e Java.\"\n\n#: src/index.md:28\n#, fuzzy\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Android](android.md): un corso di mezza giornata sull'utilizzo della \"\n\"piattaforma Rust per Android sviluppo (AOSP). Ciò include l'interoperabilità \"\n\"con C, C++ e Java.\"\n\n#: src/index.md:31\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): una lezione di un'intera giornata sull'utilizzo \"\n\"di Rust per bare-metal sviluppo (incorporato). Lo sono sia i \"\n\"microcontrollori che i processori applicativi coperto.\"\n\n#: src/index.md:34\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency.md): una lezione di un'intera giornata sulla \"\n\"concorrenza in Rust. Noi coprire sia la concorrenza classica (pianificazione \"\n\"preventiva utilizzando thread e mutextes) e async/await concurrency \"\n\"(multitasking cooperativo tramite futuri).\"\n\n#: src/index.md:38\nmsgid \"Non-Goals\"\nmsgstr \"Non goal\"\n\n#: src/index.md:40\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust è un linguaggio vasto e non saremo in grado di coprirlo tutto in pochi \"\n\"giorni. Alcuni non-obiettivi di questo corso sono:\"\n\n#: src/index.md:43\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Imparare come sviluppare le macro, per favore vedi ['Rust Book' (Capitolo \"\n\"19.5)](https://doc.rust-lang.org/book/ch19-06-macros.html) e [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md:48\nmsgid \"Assumptions\"\nmsgstr \"Ipotesi\"\n\n#: src/index.md:50\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Il corso presuppone che tu sappia già programmare. Rust è un linguaggio \"\n\"“tipato staticamente” (statically-typed) e talvolta faremo confronti con C e \"\n\"C++ per meglio spiegare o contrastare l'approccio di Rust.\"\n\n#: src/index.md:54\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Se sai come programmare in un linguaggio tipizzato dinamicamente come Python \"\n\"o JavaScript, allora sarai anche in grado di seguire bene.\"\n\n#: src/index.md:59\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Questo è un esempio di _nota del relatore_. Useremo questi per aggiungere \"\n\"ulteriori informazioni alle diapositive. Questi potrebbero essere punti \"\n\"chiave che l'istruttore dovrebbe copertina così come le risposte alle \"\n\"domande tipiche che sorgono in classe.\"\n\n#: src/running-the-course.md:3 src/running-the-course/course-structure.md:3\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Questa pagina è per l'istruttore del corso.\"\n\n#: src/running-the-course.md:5\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Ecco alcune informazioni di base su come abbiamo condotto il corso \"\n\"internamente a Google.\"\n\n#: src/running-the-course.md:8\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\n#: src/running-the-course.md:13\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Prima di eseguire il corso, vorrai:\"\n\n#: src/running-the-course.md:15\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Acquisisci familiarità con il materiale del corso. Abbiamo incluso le note \"\n\"del relatore per aiutare a evidenziare i punti chiave (per favore aiutateci \"\n\"contribuendo alle note!). Durante la presentazione, assicurati di aprire le \"\n\"note del relatore in formato una finestra popup (fare clic sul collegamento \"\n\"con una piccola freccia accanto a \\\"Note del relatore\\\"). In questo modo hai \"\n\"uno schermo pulito da presentare alla classe.\"\n\n#: src/running-the-course.md:21\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Seleziona le date. Poiché il corso richiede almeno 3 giorni interi, \"\n\"raccomandiamo che tu prenoti i giorni del corso distribuendoli su due \"\n\"settimane. Studenti del corso ci hanno comunicato di trovare utile avere gap \"\n\"tra i giorni del corso, perché aiuta a processare tutte le informazioni che \"\n\"gli vengono fornite.\"\n\n#: src/running-the-course.md:26\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Trova una stanza abbastanza grande per i tuoi partecipanti in presenza. \"\n\"Consigliamo un dimensione della classe di 15-25 persone. È abbastanza \"\n\"piccola da permettere alle persone di sentirsi a proprio agio nel fare \"\n\"domande — è anche abbastanza piccola che un istruttore avrà tempo per \"\n\"rispondere alle domande. Assicurati che la stanza abbia _scrivanie_ per te e \"\n\"per il studenti: dovrete essere tutti in grado di sedervi e lavorare con i \"\n\"vostri laptop. In particolare, scriverai molto codice dal vivo come \"\n\"istruttore, quindi un leggio non sarebbe molto utile.\"\n\n#: src/running-the-course.md:34\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Il giorno del corso, presentati in aula un po’ prima per sistemarla ed \"\n\"organizzarla. Ti consigliamo di presentare direttamente utilizzando `mdbook \"\n\"serve` in esecuzione sul tuo laptop (vedi le [istruzioni di installazione]\"\n\"(https://github.com/google/comprehensive-rust#building)). Ciò garantisce \"\n\"prestazioni ottimali senza ritardi quando si cambia pagina. L’uso del tuo \"\n\"laptop ti consentirà anche di correggere errori di battitura, se tu o i \"\n\"partecipanti ne individuate.\"\n\n#: src/running-the-course.md:40\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Lascia che le persone risolvano gli esercizi da sole o in piccoli gruppi. \"\n\"Solitamente noi spendiamo 30-45 minuti facendo esercizi al mattino e nel \"\n\"pomeriggio (includendo il tempo per revisionare le soluzioni). Assicurati di \"\n\"chiedere alle persone se sono bloccate o se c’è qualcosa in cui puoi \"\n\"aiutarle. Quando vedi che diverse persone hanno lo stesso problema, \"\n\"segnalalo alla classe e offri una soluzione, ad esempio mostrando alle \"\n\"persone dove trovare le informazioni pertinenti nella libreria standard.\"\n\n#: src/running-the-course.md:48\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Questo è tutto, buona fortuna con il corso! Speriamo che sarà altrettanto \"\n\"divertente per te come lo è stato per noi!\"\n\n#: src/running-the-course.md:51\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Si prega di [fornire feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) in seguito in modo che possiamo continuare a migliorare il \"\n\"corso. Ci piacerebbe sapere cosa ha funzionato bene per te e cosa si può \"\n\"fare Meglio. Anche i tuoi studenti sono i benvenuti a [inviarci feedback]\"\n\"(https://github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md:5\nmsgid \"Rust Fundamentals\"\nmsgstr \"Fondamenti di Rust\"\n\n#: src/running-the-course/course-structure.md:7\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:10\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"Struttura del corso\"\n\n#: src/running-the-course/course-structure.md:11\nmsgid \"Day 1 Morning (3 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:12\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:13\nmsgid \"[Hello, World](../hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:14\nmsgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:15\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:16\nmsgid \"Day 1 Afternoon (2 hours and 55 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:17\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:18\nmsgid \"[References](../references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:19\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:20\nmsgid \"Day 2 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:21\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:22\n#, fuzzy\nmsgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Vedi [pattern matching](../pattern-matching.md) per maggiori dettagli sui \"\n\"pattern in Rust.\"\n\n#: src/running-the-course/course-structure.md:23\nmsgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:24\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:25\n#, fuzzy\nmsgid \"Day 2 Afternoon (3 hours, including breaks)\"\nmsgstr \"Giorno 2 Esercizi pomeridiani\"\n\n#: src/running-the-course/course-structure.md:26\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:27\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:28\nmsgid \"Day 3 Morning (2 hours and 15 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:29\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:30\nmsgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:31\nmsgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:32\nmsgid \"Day 3 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:33\nmsgid \"[Borrowing](../borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:34\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:35\nmsgid \"Day 4 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:36\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:37\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:38\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:39\nmsgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:40\nmsgid \"Day 4 Afternoon (2 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:41\nmsgid \"[Error Handling](../error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:42\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:45\nmsgid \"Deep Dives\"\nmsgstr \"Immersioni profonde\"\n\n#: src/running-the-course/course-structure.md:47\n#, fuzzy\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Oltre alla lezione di 3 giorni sui fondamenti di Rust, ne copriamo altri \"\n\"argomenti specialistici:\"\n\n#: src/running-the-course/course-structure.md:50\nmsgid \"Rust in Android\"\nmsgstr \"Rust in Android\"\n\n#: src/running-the-course/course-structure.md:52\n#, fuzzy\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"L'[Android Deep Dive](../android.md) è un corso di mezza giornata \"\n\"sull'utilizzo di Rust per Sviluppo sulla piattaforma Android. Ciò include \"\n\"l'interoperabilità con C, C++ e Java.\"\n\n#: src/running-the-course/course-structure.md:56\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Avrai bisogno di un [checkout AOSP](https://source.android.com/docs/setup/\"\n\"download/downloading). Fai un checkout del [corso repository](https://github.\"\n\"com/google/comprehensive-rust) sulla stessa macchina e sposta la directory \"\n\"`src/android/` in la radice del tuo checkout AOSP. Ciò garantirà che il \"\n\"sistema di compilazione Android vede i file `Android.bp` in `src/android/`.\"\n\n#: src/running-the-course/course-structure.md:61\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Assicurati che `adb sync` funzioni con il tuo emulatore o dispositivo reale \"\n\"e precompila tutti gli esempi di Android che utilizzano `src/android/\"\n\"build_all.sh`. Leggi lo script per vedere i comandi che esegue e assicurati \"\n\"che funzionino quando li esegui a mano.\"\n\n#: src/running-the-course/course-structure.md:68\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust in Android\"\n\n#: src/running-the-course/course-structure.md:70\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:75\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md:79\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust su Bare-Metal\"\n\n#: src/running-the-course/course-structure.md:81\n#, fuzzy\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"Il [Bare-Metal Deep Dive](../bare-metal.md): una lezione di un'intera \"\n\"giornata sull'uso di Rust per sviluppo bare metal (embedded). Sono coperti \"\n\"sia i microcontrollori che i processori applicativi.\"\n\n#: src/running-the-course/course-structure.md:85\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Per la parte del microcontrollore, dovrai acquistare la scheda di sviluppo \"\n\"[BBC micro:bit v2](https://microbit.org/) in anticipo. Si dovranno \"\n\"installare un certo numero di pacchetti come descritto nel file [welcome \"\n\"page](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md:90\nmsgid \"Concurrency in Rust\"\nmsgstr \"Concorrenza in Rust\"\n\n#: src/running-the-course/course-structure.md:92\n#, fuzzy\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"L'[approfondimento sulla concorrenza](../concurrency.md) è un corso di \"\n\"un'intera giornata sulla concorrenza classica in Rust, così come la \"\n\"concorrenza `async`/`await`.\"\n\n#: src/running-the-course/course-structure.md:95\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Avrai bisogno di creare un nuovo progetto, con nuove dipendenze scaricate e \"\n\"pronte per l'utilizzo. Puoi quindi copiare/incollare gli esempi in `src/main.\"\n\"rs` per sperimentare attraverso di loro:\"\n\n#: src/running-the-course/course-structure.md:106\nmsgid \"Format\"\nmsgstr \"Formato\"\n\n#: src/running-the-course/course-structure.md:108\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Il corso è pensato per essere molto interattivo e si consiglia di lasciare \"\n\"che siano le domande a guidare l'esplorazione di Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md:3\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Ci sono diverse utili scorciatoie da tastiera in mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md:5\nmsgid \"Arrow-Left\"\nmsgstr \"Freccia-sinistra\"\n\n#: src/running-the-course/keyboard-shortcuts.md:5\nmsgid \": Navigate to the previous page.\"\nmsgstr \": passa alla pagina precedente.\"\n\n#: src/running-the-course/keyboard-shortcuts.md:6\nmsgid \"Arrow-Right\"\nmsgstr \"Freccia-destra\"\n\n#: src/running-the-course/keyboard-shortcuts.md:6\nmsgid \": Navigate to the next page.\"\nmsgstr \": passa alla pagina successiva.\"\n\n#: src/running-the-course/keyboard-shortcuts.md:7 src/cargo/code-samples.md:19\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Invio\"\n\n#: src/running-the-course/keyboard-shortcuts.md:7\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": esegue l'esempio di codice attivo.\"\n\n#: src/running-the-course/keyboard-shortcuts.md:8\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md:8\nmsgid \": Activate the search bar.\"\nmsgstr \": attiva la barra di ricerca.\"\n\n#: src/running-the-course/translations.md:3\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Il corso è stato tradotto in altre lingue da una serie di meravigliosi \"\n\"volontari:\"\n\n#: src/running-the-course/translations.md:6\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Portoghese Brasiliano](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"di [@rastringer](https://github.com/rastringer) e [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), e \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md:8\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Chinese (Semplificato)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"di [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), e [@SketchK](https://github.com/SketchK).\"\n\n#: src/running-the-course/translations.md:10\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Cinese (Traditionale)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"di [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), e [@johnathan79717]\"\n\"(https://github.com/johnathan79717).\"\n\n#: src/running-the-course/translations.md:12\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\nmsgstr \"\"\n\"[Coreano](https://google.github.io/comprehensive-rust/ko/) di [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) e \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\n\n#: src/running-the-course/translations.md:13\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Spagnolo](https://google.github.io/comprehensive-rust/es/) di [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md:15\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Usa il selettore di lingua nell'angolo in alto a destra per passare da una \"\n\"lingua all'altra.\"\n\n#: src/running-the-course/translations.md:17\nmsgid \"Incomplete Translations\"\nmsgstr \"Traduzioni\"\n\n#: src/running-the-course/translations.md:19\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md:22\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md:23\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md:24\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md:25\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md:27\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Se vuoi aiutare con questo sforzo, consulta \\\\[le nostre istruzioni\\\\] per \"\n\"sapere come farlo andare avanti. Le traduzioni sono coordinate su [issue \"\n\"tracker](https://github.com/google/comprehensive-rust/issues/282).\"\n\n#: src/cargo.md:3\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Quando inizi a leggere su Rust, incontrerai presto [Cargo](https://doc.rust-\"\n\"lang.org/cargo/), lo strumento standard utilizzato nell'ecosistema Rust per \"\n\"creare ed eseguire applicazioni Rust. Qui vogliamo fornire una breve \"\n\"panoramica di cos'è Cargo e di come si inserisce nell'ecosistema e in questa \"\n\"formazione.\"\n\n#: src/cargo.md:9\nmsgid \"Installation\"\nmsgstr \"Installazione\"\n\n#: src/cargo.md:11\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\n#: src/cargo.md:13\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Questo fornisce il “build tool” Cargo (`cargo`) e il compilatore Rust \"\n\"(`rustc`). Inoltre anche `rustup`, una utility da “command line” che può \"\n\"essere utilizzata per installare diverse versioni del compilatore.\"\n\n#: src/cargo.md:17\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md:25\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Su Debian/Ubuntu, puoi installare Cargo, i sorgenti di Rust e [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) con\"\n\n#: src/cargo/rust-ecosystem.md:1\nmsgid \"The Rust Ecosystem\"\nmsgstr \"L'ecosistema di Rust\"\n\n#: src/cargo/rust-ecosystem.md:3\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"L'ecosistema Rust è costituito da una serie di strumenti, di cui i \"\n\"principali sono:\"\n\n#: src/cargo/rust-ecosystem.md:5\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: il compilatore Rust che trasforma i file `.rs` in binari e altri \"\n\"formati intermedi.\"\n\n#: src/cargo/rust-ecosystem.md:8\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: il gestore delle dipendenze di Rust e lo strumento di compilazione. \"\n\"Cargo sa come scaricare le dipendenze ospitate su <https://crates.io> e le \"\n\"passerà a `rustc` quando costruisci il tuo progetto. Cargo include anche un \"\n\"gestore di test integrato che viene utilizzato per eseguire i test \"\n\"predisposti per il progetto (_unit tests_).\"\n\n#: src/cargo/rust-ecosystem.md:13\n#, fuzzy\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: il programma di installazione e aggiornamento della toolchain di \"\n\"Rust. Questo strumento è utilizzato per installare e aggiornare `rustc` e \"\n\"`cargo` quando vengono rilasciate nuove versioni di Rust. Inoltre, `rustup` \"\n\"può anche scaricare la documentazione per la libreria standard. Puoi avere \"\n\"più versioni di Rust installate contemporaneamente e `rustup` ti permetterà \"\n\"di passare da una all'altra secondo le necessità.\"\n\n#: src/cargo/rust-ecosystem.md:21 src/hello-world/hello-world.md:26\n#: src/tuples-and-arrays/tuples-and-arrays.md:39 src/references/exclusive.md:20\n#: src/pattern-matching/destructuring.md:69 src/memory-management/move.md:153\n#: src/error-handling/try.md:53 src/android/setup.md:18\n#: src/concurrency/threads.md:30 src/async/async-await.md:25\nmsgid \"Key points:\"\nmsgstr \"Punti chiave:\"\n\n#: src/cargo/rust-ecosystem.md:23\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust ha un programma di rilascio rapido con una nuova versione in uscita \"\n\"ogni sei settimane. Le nuove versioni mantengono la retrocompatibilità con \"\n\"vecchie versioni --- in più abilitano nuove funzionalità.\"\n\n#: src/cargo/rust-ecosystem.md:27\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Esistono tre canali di rilascio: \\\"stable\\\", \\\"beta\\\" e \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md:29\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Le nuove funzionalità vengono testate su \\\"nightly\\\", \\\"beta\\\" è ciò che \"\n\"diventa \\\"stabile\\\" ogni sei settimane.\"\n\n#: src/cargo/rust-ecosystem.md:32\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md:35\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust ha anche le \\\\[edizioni\\\\]: l'edizione attuale è Rust 2021. Le \"\n\"precedenti edizioni erano Rust 2015 e Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md:38\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Le edizioni possono apportare modifiche incompatibili con le versioni \"\n\"precedenti del linguaggio.\"\n\n#: src/cargo/rust-ecosystem.md:41\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Per evitare incompatibilità del codice, le edizioni sono opt-in: si può \"\n\"selezionare l'edizione di riferimento' attraverso il file `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md:44\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Per evitare di dividere l'ecosistema, i compilatori di Rust possono \"\n\"mescolare il codice scritto per diverse edizioni.\"\n\n#: src/cargo/rust-ecosystem.md:47\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Nota che è abbastanza raro usare il compilatore direttamente non attraverso \"\n\"`cargo` (la maggior parte degli utenti non lo fa mai).\"\n\n#: src/cargo/rust-ecosystem.md:50\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Potrebbe valere la pena accennare al fatto che Cargo stesso è uno strumento \"\n\"estremamente potente e completo. È in grado di offrire molte funzionalità \"\n\"avanzate, tra cui, a titolo esemplificativo ma non esaustivo: \"\n\n#: src/cargo/rust-ecosystem.md:53\nmsgid \"Project/package structure\"\nmsgstr \"Struttura del progetto/pacchetto\"\n\n#: src/cargo/rust-ecosystem.md:54\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\\\\[aree di lavoro\\\\]\"\n\n#: src/cargo/rust-ecosystem.md:55\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Dipendenze di sviluppo e gestione/memorizzazione nella cache delle \"\n\"dipendenze di runtime\"\n\n#: src/cargo/rust-ecosystem.md:56\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\\\\[costruzione script\\\\]\"\n\n#: src/cargo/rust-ecosystem.md:57\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\\\\[installazione globale\\\\]\"\n\n#: src/cargo/rust-ecosystem.md:58\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"È anche estensibile con plug-in di comandi secondari (come [cargo clippy]\"\n\"(https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md:60\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Leggi di più dall'[official Cargo Book](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md:1\nmsgid \"Code Samples in This Training\"\nmsgstr \"Esempi di codice in questo Corso\"\n\n#: src/cargo/code-samples.md:3\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Per questa formazione, esploreremo principalmente il linguaggio Rust \"\n\"attraverso esempi che possono essere eseguiti tramite il tuo browser. Questo \"\n\"rende la configurazione molto più semplice e garantisce un'esperienza \"\n\"coerente per tutti.\"\n\n#: src/cargo/code-samples.md:7\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"L'installazione di Cargo è ancora incoraggiata: ti renderà più facile fare \"\n\"gli esercizi. L'ultimo giorno faremo un esercizio più ampio che ti mostrerà \"\n\"come lavorare con le dipendenze e per questo hai bisogno di Cargo.\"\n\n#: src/cargo/code-samples.md:11\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"I blocchi di codice in questo corso sono completamente interattivi:\"\n\n#: src/cargo/code-samples.md:15 src/cargo/running-locally.md:46\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md:19\nmsgid \"You can use \"\nmsgstr \"Puoi usare \"\n\n#: src/cargo/code-samples.md:19\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" per eseguire il codice quando il focus è sulla casella di testo.\"\n\n#: src/cargo/code-samples.md:24\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"La maggior parte degli esempi di codice sono modificabili come mostrato \"\n\"sopra. Alcuni esempi di codice non sono modificabili per vari motivi:\"\n\n#: src/cargo/code-samples.md:27\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"I playground incorporati non possono eseguire unit test. Copia e incolla il \"\n\"codice e aprilo nel Playground reale per dimostrare le 'unit test'.\"\n\n#: src/cargo/code-samples.md:30\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"I playground incorporati perdono il loro stato nel momento in cui esci dalla \"\n\"pagina! Questo è il motivo per cui gli studenti dovrebbero risolvere gli \"\n\"esercizi utilizzando un'installazione locale di Rust o tramite Playground.\"\n\n#: src/cargo/running-locally.md:1\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Esecuzione del codice in locale con Cargo\"\n\n#: src/cargo/running-locally.md:3\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Se vuoi sperimentare il codice sul tuo sistema, avrai bisogno di per \"\n\"installare prima di tutto Rust. Fallo seguendo le [istruzioni nel 'Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch01-01-installation.html). Questo dovrebbe \"\n\"darti un `rustc` e un `cargo` funzionanti. Al monento della scrittura, \"\n\"l'ultima versione stabile di Rust ha questi numeri di versione:\"\n\n#: src/cargo/running-locally.md:16\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md:18\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Con questo è a posto, segui questi passaggi per creare un 'binario Rust' da \"\n\"uno degli esempi in questo training:\"\n\n#: src/cargo/running-locally.md:21\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Click sul bottone \\\"Copy to clipboard\\\" nell'esempio che si vuole copiare'.\"\n\n#: src/cargo/running-locally.md:23\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Usa `cargo new exercise` per creare una nuova directory `exercise/` per il \"\n\"tuo codice:\"\n\n#: src/cargo/running-locally.md:30\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Naviga in `exercise/` e usa `cargo run` per compilare ed eseguire \"\n\"l'esercizio:\"\n\n#: src/cargo/running-locally.md:41\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Sostituisci il codice predefinito in `src/main.rs` con il tuo codice. Per \"\n\"esempio, usando l'esempio della pagina precedente, cambia `src/main.rs` in\"\n\n#: src/cargo/running-locally.md:50\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"Usa `cargo run` per compilare ed eseguire il codice aggiornato:\"\n\n#: src/cargo/running-locally.md:60\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Usa `cargo check` per controllare rapidamente gli errori nel tuo progetto, \"\n\"usa `cargo build` per compilare senza eseguire. Per una compilazione normale \"\n\"di debug l'output si trova in `target/debug/`. Usa `cargo build --release` \"\n\"per produrre una versione ottimizzata del codice, in questo caso l'output si \"\n\"trova in `target/release/`.\"\n\n#: src/cargo/running-locally.md:65\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Puoi aggiungere dipendenze al tuo progetto modificando il file `Cargo.toml`. \"\n\"Quando si esegue il comando `cargo`, sono automaticamente scaricate e \"\n\"compilate le dipendenze mancanti.\"\n\n#: src/cargo/running-locally.md:73\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Cerca di incoraggiare i partecipanti alla classe a installare Cargo e \"\n\"utilizzare un editore locale. Semplificherà la loro vita poiché avranno un \"\n\"ambiente di sviluppo normale.\"\n\n#: src/welcome-day-1.md:1\nmsgid \"Welcome to Day 1\"\nmsgstr \"Benvenuto al primo giorno\"\n\n#: src/welcome-day-1.md:3\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Questo è il primo giorno di 'Comprehensive Rust'. Oggi copriremo un sacco di \"\n\"strada:\"\n\n#: src/welcome-day-1.md:5\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Sintassi di base di Rust: variabili, tipi scalari e composti, enum, struct, \"\n\"riferimenti, funzioni e metodi.\"\n\n#: src/welcome-day-1.md:7\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Inferenza del Tipo\"\n\n#: src/welcome-day-1.md:8\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:9\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:10\n#, fuzzy\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"Pattern matching: destrutturazione di enum, struct e array.\"\n\n#: src/welcome-day-1.md:12 src/welcome-day-2.md:12 src/welcome-day-3.md:9\n#: src/welcome-day-4.md:11\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:14 src/welcome-day-1-afternoon.md:3\n#: src/welcome-day-2.md:14 src/welcome-day-2-afternoon.md:3\n#: src/welcome-day-3.md:11 src/welcome-day-3-afternoon.md:3\n#: src/welcome-day-4.md:13 src/welcome-day-4-afternoon.md:3\nmsgid \"In this session:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:15\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:16\nmsgid \"[Hello, World](./hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:17\nmsgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:18\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:20 src/welcome-day-2-afternoon.md:7\nmsgid \"Including 10 minute breaks, this session should take about 3 hours\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:26\nmsgid \"Please remind the students that:\"\nmsgstr \"Si prega di ricordare agli studenti che:\"\n\n#: src/welcome-day-1.md:28\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Dovrebbero fare domande quando ne sentono il bisogno, non trattenerle fino \"\n\"alla fine.\"\n\n#: src/welcome-day-1.md:29\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"La lezione è pensata per essere interattiva e le discussioni sono molto \"\n\"incoraggiate!\"\n\n#: src/welcome-day-1.md:30\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"In qualità di istruttore, dovresti cercare di mantenere le discussioni \"\n\"pertinenti, ad es. mantieni la relazione con il modo in cui Rust fa le cose \"\n\"rispetto a qualche altro linguaggio. Può essere difficile trovare il giusto \"\n\"equilibrio, ma è meglio permettere discussioni che coinvolgono le persone \"\n\"piuttosto che una comunicazione unidirezionale.\"\n\n#: src/welcome-day-1.md:34\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Le domande probabilmente significheranno che parleremo di cose prima delle \"\n\"diapositive.\"\n\n#: src/welcome-day-1.md:35\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Questo è perfettamente okay! La ripetizione è una parte importante \"\n\"dell'apprendimento. Ricordare che le diapositive sono solo un supporto e sei \"\n\"libero di saltarle come preferisci.\"\n\n#: src/welcome-day-1.md:39\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md:43\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md:3 src/types-and-values.md:3 src/control-flow-basics.md:3\n#: src/tuples-and-arrays.md:3 src/references.md:3 src/user-defined-types.md:3\n#: src/pattern-matching.md:3 src/methods-and-traits.md:3 src/generics.md:3\n#: src/std-types.md:3 src/std-traits.md:3 src/memory-management.md:3\n#: src/smart-pointers.md:3 src/borrowing.md:3 src/slices-and-lifetimes.md:3\n#: src/iterators.md:3 src/modules.md:3 src/testing.md:3 src/error-handling.md:3\n#: src/unsafe-rust.md:3\nmsgid \"In this segment:\"\nmsgstr \"\"\n\n#: src/hello-world.md:4\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md:5\nmsgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md:6\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md:7\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md:9\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md:3\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust è un nuovo linguaggio di programmazione che ha avuto la sua [versione \"\n\"1.0 nel 2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md:5\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust è un linguaggio compilato staticamente in modo simile a C++\"\n\n#: src/hello-world/what-is-rust.md:6\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` utilizza LLVM come backend.\"\n\n#: src/hello-world/what-is-rust.md:7\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust supporta molte [piattaforme e architetture](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md:9\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md:10\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md:11\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust è utilizzato per un'ampia gamma di dispositivi:\"\n\n#: src/hello-world/what-is-rust.md:12\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware e _boot loaders_,\"\n\n#: src/hello-world/what-is-rust.md:13\nmsgid \"smart displays,\"\nmsgstr \"display 'smart',\"\n\n#: src/hello-world/what-is-rust.md:14\nmsgid \"mobile phones,\"\nmsgstr \"cellulari,\"\n\n#: src/hello-world/what-is-rust.md:15\nmsgid \"desktops,\"\nmsgstr \"desktop,\"\n\n#: src/hello-world/what-is-rust.md:16\nmsgid \"servers.\"\nmsgstr \"server.\"\n\n#: src/hello-world/what-is-rust.md:21\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust è usato nelle stesse aree di C++:\"\n\n#: src/hello-world/what-is-rust.md:23\nmsgid \"High flexibility.\"\nmsgstr \"Elevata flessibilità.\"\n\n#: src/hello-world/what-is-rust.md:24\nmsgid \"High level of control.\"\nmsgstr \"Alto livello di controllo.\"\n\n#: src/hello-world/what-is-rust.md:25\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Può essere adattato a dispositivi molto particolari come i telefoni \"\n\"cellulari.\"\n\n#: src/hello-world/what-is-rust.md:26\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Non ha runtime o garbage collection.\"\n\n#: src/hello-world/what-is-rust.md:27\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Si concentra su affidabilità e sicurezza senza sacrificare le prestazioni.\"\n\n#: src/hello-world/hello-world.md:3\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Passiamo al programma Rust più semplice possibile, un classico Hello World:\"\n\n#: src/hello-world/hello-world.md:8\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md:12\nmsgid \"What you see:\"\nmsgstr \"Quello che si vede:\"\n\n#: src/hello-world/hello-world.md:14\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Le funzioni sono introdotte con `fn`.\"\n\n#: src/hello-world/hello-world.md:15\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"I blocchi sono delimitati da parentesi graffe come in C e C++.\"\n\n#: src/hello-world/hello-world.md:16\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"La funzione `main` è il punto di ingresso del programma.\"\n\n#: src/hello-world/hello-world.md:17\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"\"\n\"Rust ha macro definite come 'igieniche' (_hygienic macros_), `println!` ne è \"\n\"un esempio.\"\n\n#: src/hello-world/hello-world.md:18\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Le stringhe Rust sono codificate in UTF-8 e possono contenere qualsiasi \"\n\"carattere Unicode.\"\n\n#: src/hello-world/hello-world.md:23\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Questa diapositiva cerca di mettere gli studenti a proprio agio con il \"\n\"codice Rust. Vedranno un sacco di Rust nei prossimi quattro giorni, quindi \"\n\"iniziamo in piccolo con qualcosa di familiare.\"\n\n#: src/hello-world/hello-world.md:28\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust è molto simile ad altri linguaggi della tradizione C/C++/Java. È \"\n\"imperativo (non funzionale) e non cerca di reinventare le cose a meno che \"\n\"non sia assolutamente necessario.\"\n\n#: src/hello-world/hello-world.md:31\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust è moderno con pieno supporto per cose come Unicode.\"\n\n#: src/hello-world/hello-world.md:33\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust utilizza le macro per le situazioni in cui si desidera avere un numero \"\n\"variabile di argomenti (nessun [overloading di funzione](basic-syntax/\"\n\"functions-interlude.md)).\"\n\n#: src/hello-world/hello-world.md:36\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Le macro definite \\\"igieniche\\\" significa che non catturano accidentalmente \"\n\"identificatori da l'ambito in cui vengono utilizzate. Le macro di Rust sono \"\n\"in realtà solo [parzialmente igieniche](https://veykril.github.io/tlborm/\"\n\"decl-macros/minutiae/hygiene.html).\"\n\n#: src/hello-world/hello-world.md:40\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md:3\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Alcuni punti di forza unici di Rust:\"\n\n#: src/hello-world/benefits.md:5\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md:7\nmsgid \"No uninitialized variables.\"\nmsgstr \"Nessuna variabile non inizializzata.\"\n\n#: src/hello-world/benefits.md:8\nmsgid \"No double-frees.\"\nmsgstr \"Nessun _double-frees_.\"\n\n#: src/hello-world/benefits.md:9\nmsgid \"No use-after-free.\"\nmsgstr \"Nessun _use-after-free_.\"\n\n#: src/hello-world/benefits.md:10\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Nessun puntatore `NULL`.\"\n\n#: src/hello-world/benefits.md:11\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Nessun mutex dimenticato bloccato.\"\n\n#: src/hello-world/benefits.md:12\nmsgid \"No data races between threads.\"\nmsgstr \"Nessuna 'situazione di corsa' (_race condition_) di dati tra i thread.\"\n\n#: src/hello-world/benefits.md:13\nmsgid \"No iterator invalidation.\"\nmsgstr \"Nessuna invalidazione dell'iteratore.\"\n\n#: src/hello-world/benefits.md:15\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md:17\nmsgid \"Array access is bounds checked.\"\nmsgstr \"L'accesso agli array è controllato dai loro limiti.\"\n\n#: src/hello-world/benefits.md:18\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"L'overflow di numeri interi è definito (panic or wrap-around).\"\n\n#: src/hello-world/benefits.md:20\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md:22\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enumerazioni (_Enums_) e pattern matching.\"\n\n#: src/hello-world/benefits.md:23\nmsgid \"Generics.\"\nmsgstr \"Generici (_generic_).\"\n\n#: src/hello-world/benefits.md:24\nmsgid \"No overhead FFI.\"\nmsgstr \"Nessun _overhead_ FFI.\"\n\n#: src/hello-world/benefits.md:25\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Astrazioni a costo zero (_Zero-cost abstractions_).\"\n\n#: src/hello-world/benefits.md:26\nmsgid \"Great compiler errors.\"\nmsgstr \"Ottimi errori del compilatore.\"\n\n#: src/hello-world/benefits.md:27\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Gestore delle dipendenze integrato.\"\n\n#: src/hello-world/benefits.md:28\nmsgid \"Built-in support for testing.\"\nmsgstr \"Supporto integrato per i test.\"\n\n#: src/hello-world/benefits.md:29\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Eccellente supporto del protocollo Language Server.\"\n\n#: src/hello-world/benefits.md:34\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md:37\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Assicurati di chiedere alla classe con quali linguaggi hanno esperienza. In \"\n\"base alla risposta puoi evidenziare diverse caratteristiche di Rust:\"\n\n#: src/hello-world/benefits.md:40\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Esperienza con C o C++: Rust elimina un'intera classe di _errori di runtime_ \"\n\"tramite il _borrow checker_. Ottiene prestazioni come in C e C++, ma non hai \"\n\"i problemi di sicurezza della memoria. Inoltre, si ha un linguaggio moderno \"\n\"con costrutti come il pattern matching e la gestione delle dipendenze \"\n\"incorporata.\"\n\n#: src/hello-world/benefits.md:45\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"Esperienza con Java, Go, Python, JavaScript...: Ottiene la stessa sicurezza \"\n\"della memoria come in quei linguaggi, più una sensazione simile ad un \"\n\"linguaggio di alto livello. Inoltre raggiunge prestazioni veloci e \"\n\"prevedibili come C e C++ (nessun Garbage Collector) così come l'accesso \"\n\"all'hardware di basso livello (quando serve)\"\n\n#: src/hello-world/playground.md:3\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md:8\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md:11\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md:15\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md:21\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values.md:4\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:5\nmsgid \"[Values](./types-and-values/values.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:6\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:7\nmsgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:8\nmsgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:9\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md:11 src/testing.md:12 src/unsafe-rust.md:12\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust fornisce sicurezza di tipo tramite tipizzazione statica. Le \"\n\"associazioni variabili sono immutabili da predefinito:\"\n\n#: src/types-and-values/variables.md:9 src/control-flow-basics/loops.md:30\n#: src/control-flow-basics/break-continue.md:34\n#: src/control-flow-basics/blocks-and-scopes.md:17\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md:10\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md:18\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md:21\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md:3\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md:6\n#: src/tuples-and-arrays/tuples-and-arrays.md:7 src/unsafe-rust/exercise.md:16\nmsgid \"Types\"\nmsgstr \"Tipi\"\n\n#: src/types-and-values/values.md:6\n#: src/tuples-and-arrays/tuples-and-arrays.md:7\nmsgid \"Literals\"\nmsgstr \"Letterali\"\n\n#: src/types-and-values/values.md:8\nmsgid \"Signed integers\"\nmsgstr \"Interi con segno\"\n\n#: src/types-and-values/values.md:8\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md:8\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123i64`\"\n\n#: src/types-and-values/values.md:9\nmsgid \"Unsigned integers\"\nmsgstr \"Interi senza segno\"\n\n#: src/types-and-values/values.md:9\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md:9\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10u16`\"\n\n#: src/types-and-values/values.md:10\nmsgid \"Floating point numbers\"\nmsgstr \"Numeri in virgola mobile\"\n\n#: src/types-and-values/values.md:10\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md:10\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2f32`\"\n\n#: src/types-and-values/values.md:11\nmsgid \"Unicode scalar values\"\nmsgstr \"Valori scalari Unicode\"\n\n#: src/types-and-values/values.md:11\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md:11\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md:12\nmsgid \"Booleans\"\nmsgstr \"Booleani\"\n\n#: src/types-and-values/values.md:12\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md:12\nmsgid \"`true`, `false`\"\nmsgstr \"`vero`, `falso`\"\n\n#: src/types-and-values/values.md:14\nmsgid \"The types have widths as follows:\"\nmsgstr \"I tipi hanno larghezze come segue:\"\n\n#: src/types-and-values/values.md:16\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` e `fN` sono larghi _N_ bit,\"\n\n#: src/types-and-values/values.md:17\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` e `usize` sono la larghezza di un puntatore,\"\n\n#: src/types-and-values/values.md:18\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` è largo 32 bit,\"\n\n#: src/types-and-values/values.md:19\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` è largo 8 bit.\"\n\n#: src/types-and-values/values.md:24\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Ci sono alcune sintassi che non sono mostrate sopra:\"\n\n#: src/types-and-values/values.md:26\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:9\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:16\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:20\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:22\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:26\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md:31\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:3\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:6\n#, fuzzy\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"`String` è un buffer di stringa mutabile.\"\n\n#: src/types-and-values/strings.md:7\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:11\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:12\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:15\nmsgid \"\\\", \\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:17\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:18 src/async/control-flow/join.md:30\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:19\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:26\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:29\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:31\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:34\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:37\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md:41\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Le stringhe non elaborate (_raw_) consentono di creare un valore `&str` con \"\n\"i caratteri di escape disabilitati: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Puoi \"\n\"racchiudere le doppie virgolette usando una quantità uguale di `#` su \"\n\"entrambi i lati delle virgolette:\"\n\n#: src/types-and-values/inference.md:3\n#, fuzzy\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust esaminerà come la variabile viene _usata_ per determinare il tipo:\"\n\n#: src/types-and-values/inference.md:29\n#, fuzzy\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Questa diapositiva mostra come il compilatore Rust deduce i tipi in base ai \"\n\"vincoli dati dalle dichiarazioni e dagli usi delle variabili.\"\n\n#: src/types-and-values/inference.md:32\n#, fuzzy\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"È molto importante sottolineare che le variabili dichiarate in questo modo \"\n\"non sono di una sorta di \\\"qualsiasi tipo\\\" dinamico che può detenere alcun \"\n\"dato. Il codice macchina generato da tale dichiarazione è identico alla \"\n\"dichiarazione esplicita di un tipo. Il compilatore fa il lavoro per noi e ci \"\n\"aiuta a scrivere codice più conciso.\"\n\n#: src/types-and-values/inference.md:37\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md:46\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md:3\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md:7\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md:13\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md:14 src/types-and-values/exercise.md:17\n#: src/control-flow-basics/exercise.md:27\n#: src/control-flow-basics/exercise.md:31\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"Implementazione\"\n\n#: src/types-and-values/exercise.md:16\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md:23 src/types-and-values/solution.md:14\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:4\nmsgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:5\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:6\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:7\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:8\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:9\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:10\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md:12 src/tuples-and-arrays.md:10 src/borrowing.md:9\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:3\nmsgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\nmsgstr \"Gran parte della sintassi di Rust ti sarà familiare da C, C++ o Java:\"\n\n#: src/control-flow-basics/conditionals.md:5\n#, fuzzy\nmsgid \"Blocks are delimited by curly braces.\"\nmsgstr \"I blocchi e gli ambiti sono delimitati da parentesi graffe.\"\n\n#: src/control-flow-basics/conditionals.md:6\nmsgid \"\"\n\"Line comments are started with `//`, block comments are delimited by `/* ... \"\n\"*/`.\"\nmsgstr \"\"\n\"I commenti di riga iniziano con `//`, i commenti di blocco sono delimitati \"\n\"da `/\\\\* ... \\\\*/`.\"\n\n#: src/control-flow-basics/conditionals.md:8\nmsgid \"Keywords like `if` and `while` work the same.\"\nmsgstr \"Parole chiave come `if` e `while` funzionano allo stesso modo.\"\n\n#: src/control-flow-basics/conditionals.md:9\nmsgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\nmsgstr \"\"\n\"L'assegnazione delle variabili viene eseguita con `=`, il confronto viene \"\n\"eseguito con `==`.\"\n\n#: src/control-flow-basics/conditionals.md:11\n#, fuzzy\nmsgid \"`if` expressions\"\nmsgstr \"Espressioni `if`\"\n\n#: src/control-flow-basics/conditionals.md:13\n#, fuzzy\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Tu usi [`if` espressioni](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-expressions) esattamente come le dichiarazioni `if` in altre \"\n\"lingue:\"\n\n#: src/control-flow-basics/conditionals.md:21\n#: src/control-flow-basics/conditionals.md:36\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:23\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:25\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:30\n#, fuzzy\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Inoltre, puoi usare \\\"if\\\" come espressione. L'ultima espressione di \"\n\"ciascuno block diventa il valore dell'espressione `if`:\"\n\n#: src/control-flow-basics/conditionals.md:36\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:37\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:44\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md:48\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:3\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:5\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"Cicli `while`\"\n\n#: src/control-flow-basics/loops.md:7\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"La [parola chiave `while`](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops) funziona in modo molto simile ad altre \"\n\"lingue:\"\n\n#: src/control-flow-basics/loops.md:18\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:22\n#, fuzzy\nmsgid \"`for`\"\nmsgstr \"Cicli `for`\"\n\n#: src/control-flow-basics/loops.md:24\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) usato per \"\n\"definire i distruttori.\"\n\n#: src/control-flow-basics/loops.md:35\nmsgid \"`loop`\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:37\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) usato per \"\n\"definire i distruttori.\"\n\n#: src/control-flow-basics/loops.md:45\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:56\nmsgid \"\"\n\"We will discuss iteration later; for now, just stick to range expressions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md:57\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md:3\n#, fuzzy\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Se vuoi uscire prima da un ciclo, usa [`break`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions),\"\n\n#: src/control-flow-basics/break-continue.md:8\n#, fuzzy\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Se vuoi iniziare subito l'iterazione successiva usa [`continue`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\n\n#: src/control-flow-basics/break-continue.md:24\nmsgid \"\\\"{result}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md:28\n#, fuzzy\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Sia `continue` che `break` possono facoltativamente accettare un argomento \"\n\"label che viene utilizzato per uscire dai cicli nidificati:\"\n\n#: src/control-flow-basics/break-continue.md:37\nmsgid \"\\\"x: {x}, i: {i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md:47\n#, fuzzy\nmsgid \"\"\n\"In this case we break the outer loop after 3 iterations of the inner loop.\"\nmsgstr \"\"\n\"In questo caso interrompiamo il ciclo esterno dopo 3 iterazioni del ciclo \"\n\"interno.\"\n\n#: src/control-flow-basics/break-continue.md:52\n#, fuzzy\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"Si noti che `loop` è l'unico costrutto di ciclo che restituisce un valore \"\n\"non banale valore. Questo perché è garantito che venga inserito almeno una \"\n\"volta (a differenza di cicli `while` e `for`).\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:3\nmsgid \"Blocks\"\nmsgstr \"Blocchi\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:5\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Un blocco in Rust contiene una sequenza di espressioni. Ogni blocco ha un \"\n\"valore ed un tipo, che corrispondono a quelli dell’ultima espressione nel \"\n\"blocco:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:14\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:21\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:23\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Scope e Shadowing\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:25\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:27\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Puoi applicare “shadowing” alle variabili, sia a quelle degli “scope” \"\n\"esterni che a quelle dallo stesso “scope”:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:33\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:35\n#: src/std-traits/from-and-into.md:7 src/std-traits/from-and-into.md:19\n#: src/slices-and-lifetimes/solution.md:225\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:36\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:39\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:42\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:49\n#, fuzzy\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Puoi mostrare come cambia il valore del blocco cambiando l'ultima riga nel \"\n\"blocco. Ad esempio, aggiungendo/rimuovendo un punto e virgola o utilizzando \"\n\"un `return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:51\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md:53\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Definizione: “shadowing” è diversa dalla mutazione, perché dopo lo shadowing \"\n\"le locazioni di memoria di entrambe le variabili esistono \"\n\"contemporaneamente. Entrambi sono disponibili con lo stesso nome, a seconda \"\n\"di dove lo usi nel codice. \"\n\n#: src/control-flow-basics/blocks-and-scopes.md:56\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"\"\n\"Una variable che fa “shadowing” di un’altra, può avere un tipo diverso. \"\n\n#: src/control-flow-basics/blocks-and-scopes.md:57\n#, fuzzy\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"L'ombreggiatura all'inizio sembra oscura, ma è utile per conservare i valori \"\n\"dopo `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md:22\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"I parametri di dichiarazione sono seguiti da un tipo (il contrario di alcuni \"\n\"linguaggi di programmazione) e quindi da un tipo restituito.\"\n\n#: src/control-flow-basics/functions.md:24\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"L'ultima espressione nel corpo di una funzione (o in qualsiasi blocco) \"\n\"diventa il valore restituito. Basta omettere `;` alla fine dell'espressione.\"\n\n#: src/control-flow-basics/functions.md:28\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Alcune funzioni non hanno alcun valore di ritorno e restituiscono il 'tipo \"\n\"di unità', `()`. Il compilatore lo dedurrà se il tipo restituito `->()` \"\n\"viene omesso.\"\n\n#: src/control-flow-basics/functions.md:30\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Ogni funzione ha una singola implementazione:\"\n\n#: src/control-flow-basics/functions.md:31\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md:33\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"Accetta sempre un singolo set di tipi di parametro.\"\n\n#: src/control-flow-basics/macros.md:3\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:7\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"L'overload degli operatori è implementato tramite i tratti in [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/control-flow-basics/macros.md:9\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:11\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:12\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:14\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:32\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:39\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md:43\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:3\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:4 src/control-flow-basics/exercise.md:10\n#, fuzzy\nmsgid \"1\"\nmsgstr \"12\"\n\n#: src/control-flow-basics/exercise.md:4\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:6 src/control-flow-basics/exercise.md:7\n#: src/control-flow-basics/exercise.md:8\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:6 src/control-flow-basics/exercise.md:7\n#: src/control-flow-basics/exercise.md:8\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:6\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:6\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:7\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:7 src/control-flow-basics/exercise.md:8\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:7\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:7\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:8\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:8\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:8\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:10\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:10\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:12\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:12\n#, fuzzy\nmsgid \"2\"\nmsgstr \"12\"\n\n#: src/control-flow-basics/exercise.md:12\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:13\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:13 src/bare-metal/aps/better-uart.md:22\n#, fuzzy\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md:13\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:14\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:14 src/bare-metal/aps/better-uart.md:10\n#, fuzzy\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md:14\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:15\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:15\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:15\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:16\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:16 src/bare-metal/aps/better-uart.md:14\n#: src/bare-metal/aps/better-uart.md:17\n#, fuzzy\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md:16\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:17\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:17\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:17\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:18\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:18 src/bare-metal/aps/better-uart.md:12\n#: src/bare-metal/aps/better-uart.md:15\n#, fuzzy\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md:18\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:19\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:21\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md:25 src/control-flow-basics/solution.md:4\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md:20 src/concurrency/scoped-threads.md:11\n#: src/concurrency/scoped-threads.md:30\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md:1 src/welcome-day-2-afternoon.md:1\n#: src/welcome-day-3-afternoon.md:1 src/welcome-day-4-afternoon.md:1\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Benvenuti\"\n\n#: src/welcome-day-1-afternoon.md:4\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md:5\nmsgid \"[References](./references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md:6\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md:8\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md:4\nmsgid \"\"\n\"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md:5\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md:6\nmsgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md:7\nmsgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md:8\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:3\nmsgid \"\"\n\"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n\"elements of an array have the same type, while tuples can accommodate \"\n\"different types. Both types have a size fixed at compile time.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:9\n#: src/tuples-and-arrays/destructuring.md:27\nmsgid \"Arrays\"\nmsgstr \"Array\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:9\nmsgid \"`[T; N]`\"\nmsgstr \"`[T; N]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:9\nmsgid \"`[20, 30, 40]`, `[0; 3]`\"\nmsgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:10\n#: src/tuples-and-arrays/destructuring.md:9\nmsgid \"Tuples\"\nmsgstr \"Tuple\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:10\nmsgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\nmsgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:10\nmsgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\nmsgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:12\nmsgid \"Array assignment and access:\"\nmsgstr \"Assegnazione e accesso all’Array:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:24\nmsgid \"Tuple assignment and access:\"\nmsgstr \"Assegnazione e accesso alla Tupla:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:41\nmsgid \"Arrays:\"\nmsgstr \"Array:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:43\n#, fuzzy\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Un valore di un array tipo `[T; N]` contiene `N` (una costante _compile-\"\n\"time_) elementi dello stesso tipo `T`. Nota che la lunghezza dell'array è \"\n\"_parte del suo tipo_, il che significa che `[u8; 3]` e `[u8; 4]` sono \"\n\"considerati due tipi diversi.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:49\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:53\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Si possono usare i letterali per assegnare i valori agli array.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:55\n#, fuzzy\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"Nalla funzione main, l'istruzione print richiede l'implementazione 'debug' \"\n\"con il parametro `?`: `{}` da l'output predefinito (_default_), `{:?}` da \"\n\"l'output tipo debug. Si sarebbe anche potuto usare `{a}` e `{a:?}` senza \"\n\"specificare il valore dopo la stringa formattata.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:60\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Aggiungendo `#`, eg `{a:#?}`, si invoca un formato \\\"pretty printing\\\", il \"\n\"quale può essere più facile da leggere.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:63\nmsgid \"Tuples:\"\nmsgstr \"Tuple:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:65\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Come gli array, le tuple hanno una lunghezza fissa.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:67\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Le tuple raggruppano valori di tipi diversi in un tipo composto.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:69\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"È possibile accedere ai campi di una tupla tramite il punto e l'indice del \"\n\"valore, ad es. `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:72\n#, fuzzy\nmsgid \"\"\n\"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n\"and the only valid value of that type --- that is to say both the type and \"\n\"its value are expressed as `()`. It is used to indicate, for example, that a \"\n\"function or expression has no return value, as we'll see in a future slide.\"\nmsgstr \"\"\n\"La tupla vuota `()` è anche nota come \\\"tipo di unità\\\". È sia un tipo che \"\n\"l'unico valore valido di quel tipo, vale a dire sia il tipo che il suo \"\n\"valore sono espressi come `()`. Viene utilizzato per indicare, ad esempio, \"\n\"che una funzione o espressione che non ha alcun valore di ritorno, come \"\n\"vedremo in una diapositiva futura. \"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md:76\n#, fuzzy\nmsgid \"\"\n\"You can think of it as `void` that can be familiar to you from other \"\n\"programming languages.\"\nmsgstr \"\"\n\"Puoi pensarlo come un \\\"vuoto\\\" che può esserti familiare da altri linguaggi \"\n\"di programmazione.\"\n\n#: src/tuples-and-arrays/iteration.md:3\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md:19\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md:22\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:3\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"La parola chiave `match` ti consente di confrontare un valore con uno o più \"\n\"_pattern_. IL i confronti vengono effettuati dall'alto verso il basso e \"\n\"vince la prima partita.\"\n\n#: src/tuples-and-arrays/match.md:6\n#, fuzzy\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"I modelli possono essere valori semplici, in modo simile a `switch` in C e C+\"\n\"+:\"\n\n#: src/tuples-and-arrays/match.md:11\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:13\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:13\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:14 src/std-traits/solution.md:16\n#: src/error-handling/exercise.md:62 src/error-handling/exercise.md:64\n#: src/error-handling/solution.md:62 src/error-handling/solution.md:64\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:14\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:14\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:14\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:14\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:15 src/error-handling/exercise.md:54\n#: src/error-handling/exercise.md:56 src/error-handling/exercise.md:64\n#: src/error-handling/solution.md:54 src/error-handling/solution.md:56\n#: src/error-handling/solution.md:64\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:15 src/error-handling/exercise.md:54\n#: src/error-handling/exercise.md:56 src/error-handling/exercise.md:64\n#: src/error-handling/solution.md:54 src/error-handling/solution.md:56\n#: src/error-handling/solution.md:64\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:15\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:16\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:17\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:22\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be irrefutable, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:26\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Come `if let`, ogni braccio di corrispondenza deve avere lo stesso tipo. Il \"\n\"tipo è l'ultimo espressione del blocco, se esiste. Nell'esempio precedente, \"\n\"il tipo è `()`.\"\n\n#: src/tuples-and-arrays/match.md:30\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:33\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md:38 src/user-defined-types/named-structs.md:35\n#: src/user-defined-types/enums.md:29 src/methods-and-traits/methods.md:69\nmsgid \"Key Points:\"\nmsgstr \"Punti chiave:\"\n\n#: src/tuples-and-arrays/match.md:40\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Potresti sottolineare come vengono utilizzati alcuni caratteri specifici \"\n\"quando in uno schema\"\n\n#: src/tuples-and-arrays/match.md:42\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` come un `or`\"\n\n#: src/tuples-and-arrays/match.md:43\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` può espandersi fino a quanto necessario\"\n\n#: src/tuples-and-arrays/match.md:44\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` rappresenta un intervallo inclusivo\"\n\n#: src/tuples-and-arrays/match.md:45\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` è un carattere jolly\"\n\n#: src/tuples-and-arrays/match.md:47\n#, fuzzy\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Le guardie di corrispondenza come caratteristica di sintassi separata sono \"\n\"importanti e necessarie quando desideriamo esprimere in modo conciso idee \"\n\"più complesse di quanto i soli schemi consentirebbero.\"\n\n#: src/tuples-and-arrays/match.md:49\n#, fuzzy\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Non sono la stessa cosa dell'espressione `if` separata all'interno del \"\n\"braccio della corrispondenza. Un'espressione `if` all'interno del blocco di \"\n\"diramazione (dopo `=>`) si verifica dopo che è stato selezionato il braccio \"\n\"di corrispondenza. Il fallimento della condizione \\\"if\\\" all'interno di quel \"\n\"blocco non comporterà altre braccia dell'espressione `match` originale \"\n\"considerata.\"\n\n#: src/tuples-and-arrays/match.md:53\n#, fuzzy\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"La condizione definita nella guardia si applica a ogni espressione in un \"\n\"modello con un `|`.\"\n\n#: src/tuples-and-arrays/destructuring.md:3\nmsgid \"\"\n\"Destructuring is a way of extracting data from a data structure by writing a \"\n\"pattern that is matched up to the data structure, binding variables to \"\n\"subcomponents of the data structure.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:7\n#, fuzzy\nmsgid \"You can destructure tuples and arrays by matching on their elements:\"\nmsgstr \"Puoi destrutturare array, tuple e slice abbinando i loro elementi:\"\n\n#: src/tuples-and-arrays/destructuring.md:18\nmsgid \"\\\"on Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:19\nmsgid \"\\\"on X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:20\nmsgid \"\\\"left of Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:21\nmsgid \"\\\"below X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:22\nmsgid \"\\\"first quadrant\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:33\nmsgid \"\\\"Tell me about {triple:?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:35\nmsgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:36\nmsgid \"\\\"First is 1 and the rest were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:37\nmsgid \"\\\"All elements were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:45\nmsgid \"Create a new array pattern using `_` to represent an element.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:46\nmsgid \"Add more values to the array.\"\nmsgstr \"Aggiungi più valori all’array.\"\n\n#: src/tuples-and-arrays/destructuring.md:47\nmsgid \"\"\n\"Point out that how `..` will expand to account for different number of \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md:49\nmsgid \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md:3\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md:9\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"Qual è il tipo di \\\"parola\\\" in ogni ciclo?\"\n\n#: src/tuples-and-arrays/exercise.md:11\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Usa quanto sopra per scrivere una funzione `pretty_print` che stampa in modo \"\n\"efficace una matrice e una funzione `transpose` che traspone una matrice \"\n\"(trasforma le righe in colonne):\"\n\n#: src/tuples-and-arrays/exercise.md:22\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"Implementa entrambe le funzioni per operare su matrici 3 × 3.\"\n\n#: src/tuples-and-arrays/exercise.md:24\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\"Copia il codice qui sotto in <https://play.rust-lang.org/> e implementa le \"\n\"funzioni:\"\n\n#: src/tuples-and-arrays/exercise.md:28 src/borrowing/exercise.md:14\n#: src/unsafe-rust/exercise.md:51\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md:37 src/tuples-and-arrays/solution.md:34\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md:42 src/tuples-and-arrays/solution.md:39\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md:44 src/tuples-and-arrays/solution.md:41\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/solution.md:17 src/tuples-and-arrays/solution.md:25\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/references.md:4\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md:5\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md:6\nmsgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/references.md:8 src/user-defined-types.md:11 src/pattern-matching.md:8\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/references/shared.md:3\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md:20\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md:24\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust proibirà staticamente i riferimenti penzolanti:\"\n\n#: src/references/shared.md:38\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md:43\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md:48\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md:51\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.count_ones()`). There is no need for an `->` operator like \"\n\"in C++.\"\nmsgstr \"\"\n\"In alcuni casi Rust dereferenzia automaticamente, in particolare durante \"\n\"l'invocazione di metodi (prova `ref_x.count_ones()`).\"\n\n#: src/references/shared.md:54\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md:58\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md:61\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md:66\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"Parleremo di più del _borrowing_ quando arriveremo alla proprietà \"\n\"(_ownership_).\"\n\n#: src/references/exclusive.md:3\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md:22\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md:27\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Assicurati di notare la differenza tra `let mut ref_x: &i32` e `let ref_x: \"\n\"&mut i32`. Il primo rappresenta un riferimento mutevole a cui può essere \"\n\"associato valori diversi, mentre il secondo rappresenta un riferimento a un \"\n\"valore mutabile.\"\n\n#: src/references/exercise.md:3\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md:7\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md:15\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md:23\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md:27 src/references/solution.md:22\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md:30 src/references/solution.md:25\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md:32 src/references/solution.md:27\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md:4\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md:12\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:4\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:5\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:6\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:7\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:8\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md:9\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:3\n#, fuzzy\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Come C e C++, Rust supporta le strutture personalizzate:\"\n\n#: src/user-defined-types/named-structs.md:12\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:16\n#: src/android/interoperability/with-c/bindgen.md:87\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:22\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:27\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:37\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Structs funzionano come in C o C++.\"\n\n#: src/user-defined-types/named-structs.md:38\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:39\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:40\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:42\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:45\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md:47\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Se disponi già di variabili con i nomi corretti, puoi creare il file struct \"\n\"usando una scorciatoia:\"\n\n#: src/user-defined-types/named-structs.md:49\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md:7\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Se i nomi dei campi non sono importanti, puoi utilizzare una struttura di \"\n\"tupla:\"\n\n#: src/user-defined-types/tuple-structs.md:14\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md:18\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Questo è spesso usato per i wrapper a campo singolo (chiamati newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md:25\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md:29\n#: src/android/interoperability/cpp/cpp-bridge.md:50\n#: src/bare-metal/microcontrollers/type-state.md:14\n#: src/async/pitfalls/cancellation.md:98 src/async/pitfalls/cancellation.md:101\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md:41\n#, fuzzy\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"I newtype sono un ottimo modo per codificare informazioni aggiuntive sul \"\n\"valore in un tipo primitivo, ad esempio:\"\n\n#: src/user-defined-types/tuple-structs.md:43\n#, fuzzy\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Il numero è misurato in alcune unità: `Newton` nell'esempio precedente.\"\n\n#: src/user-defined-types/tuple-structs.md:44\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Il valore ha superato una certa convalida quando è stato creato, quindi non \"\n\"è più necessario convalidarlo nuovamente a ogni utilizzo: 'Numero di \"\n\"telefono (Stringa)`o`Numero dispari (u32)\\\\`.\"\n\n#: src/user-defined-types/tuple-structs.md:47\n#, fuzzy\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Dimostra come aggiungere un valore `f64` a un tipo `Newtons` accedendo al \"\n\"singolo campo nel newtype.\"\n\n#: src/user-defined-types/tuple-structs.md:49\n#, fuzzy\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"A Rust in genere non piacciono le cose inesplicite, come l'unwrapping \"\n\"automatico o, ad esempio, l'uso di valori booleani come numeri interi.\"\n\n#: src/user-defined-types/tuple-structs.md:51\n#, fuzzy\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"Il sovraccarico degli operatori viene discusso il giorno 3 (generici).\"\n\n#: src/user-defined-types/tuple-structs.md:52\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:3\n#, fuzzy\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"La parola chiave `enum` consente la creazione di un tipo che ne ha alcuni \"\n\"diverse varianti:\"\n\n#: src/user-defined-types/enums.md:15\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:16\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:17\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:22\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:31\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Le enumerazioni consentono di raccogliere un insieme di valori in un unico \"\n\"tipo\"\n\n#: src/user-defined-types/enums.md:32\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:34\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:37\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"Questo potrebbe essere un buon momento per confrontare Struct ed Enum:\"\n\n#: src/user-defined-types/enums.md:38\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"In entrambi, puoi avere una versione semplice senza campi (unit struct) o \"\n\"una con diversi tipi di campi (variant payload).\"\n\n#: src/user-defined-types/enums.md:40\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Potresti persino implementare le diverse varianti di un'enumerazione con \"\n\"strutture separate, ma non sarebbero dello stesso tipo che sarebbero se \"\n\"fossero tutte definite in un'enumerazione.\"\n\n#: src/user-defined-types/enums.md:43\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:44\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:45\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:49\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:67\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:70\n#: src/user-defined-types/static-and-const.md:76\n#: src/memory-management/review.md:51 src/memory-management/move.md:100\n#: src/smart-pointers/box.md:84 src/borrowing/shared.md:33\nmsgid \"More to Explore\"\nmsgstr \"Ulteriori aspetti da Esplorare\"\n\n#: src/user-defined-types/enums.md:72\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:74\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md:78\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:3\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:6\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/static-and-const.md:8\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:31\n#, fuzzy\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Secondo il [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html) questi sono incorporati dopo l'uso.\"\n\n#: src/user-defined-types/static-and-const.md:33\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:36\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static-and-const.md:38\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:42\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Benvenuto al primo giorno\"\n\n#: src/user-defined-types/static-and-const.md:45\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:49\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Come notato nel [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), questi non sono allineati durante l'uso e hanno una \"\n\"posizione di memoria associata effettiva. Questo è utile per il codice non \"\n\"sicuro e incorporato e la variabile vive per tutta l'esecuzione del \"\n\"programma.\"\n\n#: src/user-defined-types/static-and-const.md:58\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"\"\n\"Menziona che `const` si comporta semanticamente in modo simile a `constexpr` \"\n\"del C++.\"\n\n#: src/user-defined-types/static-and-const.md:59\n#, fuzzy\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"\"\n\"`static`, d'altra parte, è molto più simile a una `const` o variabile \"\n\"globale mutabile in C++.\"\n\n#: src/user-defined-types/static-and-const.md:61\n#, fuzzy\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"Non è molto comune che si abbia bisogno di una costante valutata in fase di \"\n\"esecuzione, ma è utile e più sicura rispetto all'utilizzo di una statica.\"\n\n#: src/user-defined-types/static-and-const.md:63\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:66\nmsgid \"Properties table:\"\nmsgstr \"Tabella proprietà:\"\n\n#: src/user-defined-types/static-and-const.md:68\n#: src/chromium/adding-third-party-crates.md:6\nmsgid \"Property\"\nmsgstr \"Proprietà\"\n\n#: src/user-defined-types/static-and-const.md:68\nmsgid \"Static\"\nmsgstr \"Statico (Static)\"\n\n#: src/user-defined-types/static-and-const.md:68\nmsgid \"Constant\"\nmsgstr \"Costante\"\n\n#: src/user-defined-types/static-and-const.md:70\nmsgid \"Has an address in memory\"\nmsgstr \"Ha un indirizzo in memoria\"\n\n#: src/user-defined-types/static-and-const.md:70\n#: src/user-defined-types/static-and-const.md:71\n#: src/user-defined-types/static-and-const.md:73\n#: src/user-defined-types/static-and-const.md:74\n#: src/chromium/adding-third-party-crates/resolving-problems.md:12\n#: src/chromium/adding-third-party-crates/resolving-problems.md:13\n#: src/chromium/adding-third-party-crates/resolving-problems.md:14\nmsgid \"Yes\"\nmsgstr \"Si\"\n\n#: src/user-defined-types/static-and-const.md:70\nmsgid \"No (inlined)\"\nmsgstr \"No (inlined)\"\n\n#: src/user-defined-types/static-and-const.md:71\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"La funzione `main` “vive” per l’intera durata del programma\"\n\n#: src/user-defined-types/static-and-const.md:71\n#: src/user-defined-types/static-and-const.md:72\n#: src/user-defined-types/static-and-const.md:74\n#: src/chromium/adding-third-party-crates/resolving-problems.md:15\n#: src/chromium/adding-third-party-crates/resolving-problems.md:16\nmsgid \"No\"\nmsgstr \"No\"\n\n#: src/user-defined-types/static-and-const.md:72\nmsgid \"Can be mutable\"\nmsgstr \"Può essere “mutable” (mutabile)\"\n\n#: src/user-defined-types/static-and-const.md:72\nmsgid \"Yes (unsafe)\"\nmsgstr \"Si (“unsafe”)\"\n\n#: src/user-defined-types/static-and-const.md:73\nmsgid \"Evaluated at compile time\"\nmsgstr \"Valutato a tempo di compilazione\"\n\n#: src/user-defined-types/static-and-const.md:73\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"Si (inizializzato a tempo di compilazione)\"\n\n#: src/user-defined-types/static-and-const.md:74\nmsgid \"Inlined wherever it is used\"\nmsgstr \"Inlined tutte le volte che viene usato\"\n\n#: src/user-defined-types/static-and-const.md:78\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md:83\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md:3\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md:13\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md:23\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:3\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:7\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:12 src/user-defined-types/solution.md:4\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:15\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:17 src/user-defined-types/solution.md:22\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:24 src/user-defined-types/solution.md:39\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:29 src/user-defined-types/solution.md:44\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:34 src/user-defined-types/solution.md:49\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:39 src/user-defined-types/solution.md:54\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:44 src/user-defined-types/solution.md:59\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:52 src/user-defined-types/solution.md:67\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:55 src/user-defined-types/solution.md:70\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:56 src/user-defined-types/solution.md:71\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:58 src/user-defined-types/solution.md:73\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:61 src/user-defined-types/solution.md:76\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md:62 src/user-defined-types/solution.md:77\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:7\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:10\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:13\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:16\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:19\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:29\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:33\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md:36\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:1\nmsgid \"Welcome to Day 2\"\nmsgstr \"Benvenuto al giorno 2\"\n\n#: src/welcome-day-2.md:3\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Ora che abbiamo visto una discreta quantità di ruggine, continueremo con:\"\n\n#: src/welcome-day-2.md:6\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"Pattern matching: destrutturazione di enum, struct e array.\"\n\n#: src/welcome-day-2.md:7\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:8\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:9\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:10\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:15\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:16\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Vedi [pattern matching](../pattern-matching.md) per maggiori dettagli sui \"\n\"pattern in Rust.\"\n\n#: src/welcome-day-2.md:17\nmsgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:18\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md:20 src/welcome-day-4.md:19\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md:4\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md:5\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md:6\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:3\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:5\n#: src/pattern-matching/destructuring.md:59\nmsgid \"Structs\"\nmsgstr \"Strutture (Struct)\"\n\n#: src/pattern-matching/destructuring.md:17\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:18\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:19\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:26\n#, fuzzy\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"I modelli possono anche essere usati per associare variabili a parti dei \"\n\"tuoi valori. Questo è come ispezioni la struttura dei tuoi tipi. Iniziamo \"\n\"con un semplice tipo `enum`:\"\n\n#: src/pattern-matching/destructuring.md:39\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:46\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:47\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md:52\n#, fuzzy\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Qui abbiamo usato le braccia per _destrutturare_ il valore `Result`. Nel \"\n\"primo arm, \\\"half\\\" è legato al valore all'interno della variante \\\"Ok\\\". \"\n\"Nel secondo braccio, `msg` è associato al messaggio di errore.\"\n\n#: src/pattern-matching/destructuring.md:61\n#, fuzzy\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\"Cambia i valori letterali in `foo` in modo che corrispondano agli altri \"\n\"modelli.\"\n\n#: src/pattern-matching/destructuring.md:62\n#, fuzzy\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"Aggiungi un nuovo campo a \\\"Foo\\\" e apporta le modifiche al modello secondo \"\n\"necessità.\"\n\n#: src/pattern-matching/destructuring.md:63\n#, fuzzy\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"La distinzione tra una cattura e un'espressione costante può essere \"\n\"difficile da fare macchiare. Prova a cambiare il \\\"2\\\" nel secondo braccio \"\n\"in una variabile e osservalo sottilmente non funziona. Cambialo in un \"\n\"`const` e guardalo funzionare di nuovo.\"\n\n#: src/pattern-matching/destructuring.md:71\n#, fuzzy\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"L'espressione `if`/`else` restituisce un enum che viene successivamente \"\n\"decompresso con un `match`.\"\n\n#: src/pattern-matching/destructuring.md:73\n#, fuzzy\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Puoi provare ad aggiungere una terza variante alla definizione enum e \"\n\"visualizzare gli errori durante l'esecuzione del codice. Indica i punti in \"\n\"cui il tuo codice è ora inesausto e come il compilatore cerca di darti \"\n\"suggerimenti.\"\n\n#: src/pattern-matching/destructuring.md:76\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"È possibile accedere ai valori nelle varianti enum solo dopo essere stati \"\n\"abbinati al modello. Il modello lega i riferimenti ai campi nel \\\"match \"\n\"arm\\\" dopo il `=>`.\"\n\n#: src/pattern-matching/destructuring.md:78\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Dimostrare cosa succede quando la ricerca è inesauribile. Nota il vantaggio \"\n\"fornito dal compilatore Rust confermando quando tutti i casi vengono gestiti.\"\n\n#: src/pattern-matching/destructuring.md:80\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:3\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:6\n#: src/pattern-matching/let-control-flow.md:10\nmsgid \"`if let` expressions\"\nmsgstr \"Espressioni `if let`\"\n\n#: src/pattern-matching/let-control-flow.md:7\nmsgid \"`while let` expressions\"\nmsgstr \"espressioni `while let`\"\n\n#: src/pattern-matching/let-control-flow.md:8\nmsgid \"`match` expressions\"\nmsgstr \"Espressioni `match`\"\n\n#: src/pattern-matching/let-control-flow.md:12\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[L’espressione `if let`](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) consente di eseguire codice diverso a seconda \"\n\"che un valore corrisponda a un pattern o meno:\"\n\n#: src/pattern-matching/let-control-flow.md:24\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:33\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"espressioni `while let`\"\n\n#: src/pattern-matching/let-control-flow.md:35\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:45\n#: src/pattern-matching/let-control-flow.md:108\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:51\n#: src/pattern-matching/let-control-flow.md:112\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:57\n#: src/pattern-matching/let-control-flow.md:116\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:62\n#: src/pattern-matching/solution.md:113\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:62 src/generics/trait-bounds.md:16\n#: src/smart-pointers/solution.md:87 src/smart-pointers/solution.md:90\n#: src/testing/googletest.md:11 src/testing/googletest.md:12\n#: src/testing/solution.md:83\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:66\n#, fuzzy\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Come con `if let`, c'è un [`while let`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#predicate-pattern-loops) variante che verifica \"\n\"ripetutamente un valore rispetto a un modello:\"\n\n#: src/pattern-matching/let-control-flow.md:82\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Qui l'iteratore restituito da `v.iter()` restituirà una `Option<i32>` su \"\n\"ogni chiamata a `next()`. Restituisce `Some(x)` finché non è finito, \"\n\"dopodiché lo farà restituire \\\"Nessuno\\\". Il `while let` ci consente di \"\n\"continuare a scorrere tutti gli elementi.\"\n\n#: src/pattern-matching/let-control-flow.md:90\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:92\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:94\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:95\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:97\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:99\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:103\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md:123\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"Cicli `while let`\"\n\n#: src/pattern-matching/let-control-flow.md:125\n#, fuzzy\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Fai notare che il ciclo `while let` continuerà finché il valore corrisponde \"\n\"al modello.\"\n\n#: src/pattern-matching/let-control-flow.md:127\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Potresti riscrivere il ciclo `while let` come un ciclo infinito con \"\n\"un'istruzione if che si interrompe quando non c'è alcun valore da scartare \"\n\"per `iter.next()`. Il `while let` fornisce lo zucchero sintattico per lo \"\n\"scenario di cui sopra.\"\n\n#: src/pattern-matching/exercise.md:3\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:5\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:10\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:15\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:26\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:30 src/pattern-matching/solution.md:4\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:38 src/pattern-matching/solution.md:12\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:42 src/pattern-matching/solution.md:16\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:45 src/pattern-matching/solution.md:19\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md:104 src/pattern-matching/solution.md:40\n#: src/pattern-matching/solution.md:102\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md:112\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:4\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:5\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:6\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:7\nmsgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:8\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md:10\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust ti consente di associare funzioni ai tuoi nuovi tipi. Lo fai con un \"\n\"Blocco `impl`:\"\n\n#: src/methods-and-traits/methods.md:14\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:19\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:24\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:26\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:28\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:32\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:35\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:40\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:47\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md:51\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Il `&self` sopra indica che il metodo prende in prestito l'oggetto in modo \"\n\"immutabile. Là sono altri possibili ricevitori per un metodo:\"\n\n#: src/methods-and-traits/methods.md:54\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: prende in prestito l'oggetto dal chiamante usando un oggetto \"\n\"condiviso e immutabile riferimento. L'oggetto può essere riutilizzato in \"\n\"seguito.\"\n\n#: src/methods-and-traits/methods.md:56\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: prende in prestito l'oggetto dal chiamante usando un oggetto \"\n\"unico e mutabile riferimento. L'oggetto può essere riutilizzato in seguito.\"\n\n#: src/methods-and-traits/methods.md:58\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: assume la proprietà dell'oggetto e lo allontana dal chiamante. IL \"\n\"metodo diventa il proprietario dell'oggetto. L'oggetto verrà eliminato \"\n\"(deallocato) quando il metodo ritorna, a meno che la sua proprietà non sia \"\n\"esplicita trasmesso.\"\n\n#: src/methods-and-traits/methods.md:62\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\"`mut self`: come sopra, ma mentre il metodo possiede l'oggetto, può farlo \"\n\"muta anche questo. Proprietà completa non significa automaticamente \"\n\"mutabilità.\"\n\n#: src/methods-and-traits/methods.md:63\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Nessun ricevitore: questo diventa un metodo statico sulla struttura. \"\n\"Tipicamente utilizzato per creare costruttori che sono chiamati \\\"nuovi\\\" \"\n\"per convenzione.\"\n\n#: src/methods-and-traits/methods.md:71\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Può essere utile introdurre metodi confrontandoli con funzioni.\"\n\n#: src/methods-and-traits/methods.md:72\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"I metodi vengono chiamati su un'istanza di un tipo (come struct o enum), il \"\n\"primo parametro rappresenta l'istanza come `self`.\"\n\n#: src/methods-and-traits/methods.md:74\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Gli sviluppatori possono scegliere di utilizzare i metodi per sfruttare la \"\n\"sintassi del ricevitore del metodo e per mantenerli più organizzati. \"\n\"Utilizzando i metodi possiamo mantenere tutto il codice di implementazione \"\n\"in un posto prevedibile.\"\n\n#: src/methods-and-traits/methods.md:77\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Sottolinea l'uso della parola chiave `self`, un ricevitore di metodo.\"\n\n#: src/methods-and-traits/methods.md:78\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Mostra che è un termine abbreviato per `self:&Self` e forse mostra come \"\n\"potrebbe essere usato anche il nome struct.\"\n\n#: src/methods-and-traits/methods.md:80\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Spiega che `Self` è un alias di tipo per il tipo in cui si trova il blocco \"\n\"`impl` e può essere utilizzato altrove nel blocco.\"\n\n#: src/methods-and-traits/methods.md:82\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Nota come `self` viene utilizzato come altre strutture e la notazione con \"\n\"punto può essere utilizzata per fare riferimento a singoli campi.\"\n\n#: src/methods-and-traits/methods.md:84\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Questo potrebbe essere un buon momento per dimostrare in che modo `&self` \"\n\"differisce da `self` modificando il codice e provando a eseguire say_hello \"\n\"due volte.\"\n\n#: src/methods-and-traits/methods.md:86\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Oltre alle varianti su \\\"self\\\", ci sono anche [tipi di wrapper speciali]\"\n\"(https://doc.rust-lang.org/reference/special-types-and-traits.html) possono \"\n\"essere tipi di ricevitore, come `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust ti consente di astrarre sui tipi con tratti. Sono simili alle \"\n\"interfacce:\"\n\n#: src/methods-and-traits/traits.md:18\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:24\n#: src/methods-and-traits/trait-objects.md:20\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:30\n#: src/methods-and-traits/trait-objects.md:26\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:36\n#: src/methods-and-traits/trait-objects.md:33\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:46\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:49\nmsgid \"Traits are implemented in an `impl <trait> for <type> { .. }` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md:51\n#, fuzzy\nmsgid \"\"\n\"Traits may specify pre-implemented (provided) methods and methods that users \"\n\"are required to implement themselves. Provided methods can rely on required \"\n\"methods. In this case, `greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"I tratti possono specificare metodi pre-implementati (predefiniti) e metodi \"\n\"richiesti agli utenti implementare se stessi. I metodi con implementazioni \"\n\"predefinite possono fare affidamento sui metodi richiesti.\"\n\n#: src/methods-and-traits/deriving.md:3\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:15\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:16\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:17\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:18\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:19\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md:26\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:3\n#, fuzzy\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\"Gli oggetti tratto consentono valori di tipi diversi, ad esempio in una \"\n\"raccolta:\"\n\n#: src/methods-and-traits/trait-objects.md:36\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:41\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Layout della memoria dopo l'allocazione di \\\"animali domestici\\\":\"\n\n#: src/methods-and-traits/trait-objects.md:43\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:78\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:80\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:82\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:84\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:87\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:89\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:91\n#: src/methods-and-traits/trait-objects.md:92 src/std-traits/closures.md:63\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md:93\n#: src/methods-and-traits/trait-objects.md:94 src/std-traits/exercise.md:23\n#: src/std-traits/solution.md:29 src/modules/exercise.md:136\n#: src/modules/solution.md:78 src/android/build-rules/library.md:44\n#: src/android/interoperability/cpp/rust-bridge.md:17\n#: src/async/pitfalls/cancellation.md:59\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:3\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:8\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:12\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:20 src/methods-and-traits/solution.md:7\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:28 src/methods-and-traits/solution.md:15\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:33 src/methods-and-traits/solution.md:20\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:34 src/methods-and-traits/solution.md:21\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md:36\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md:23\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md:4\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md:5\nmsgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md:6\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md:7\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md:8\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md:10 src/smart-pointers.md:8 src/iterators.md:9\n#: src/error-handling.md:11\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust supporta i generici, che ti consentono di astrarre un algoritmo (come \"\n\"l'ordinamento) sui tipi utilizzati nell'algoritmo.\"\n\n#: src/generics/generic-functions.md:7\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:17\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:18\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:18\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:18\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:25\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:27\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md:33\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Questa è un'astrazione a costo zero: ottieni esattamente lo stesso risultato \"\n\"che se avessi codificato a mano le strutture dati senza l'astrazione.\"\n\n#: src/generics/generic-data.md:3\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"Puoi utilizzare i generici per astrarre sul tipo di campo concreto:\"\n\n#: src/generics/generic-data.md:17\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md:23\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md:24\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md:31\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_D:_ Perché `T` è specificato due volte in `impl<T> Point<T> {}`? Non è \"\n\"ridondante?\"\n\n#: src/generics/generic-data.md:33\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Questo perché si tratta di una sezione di implementazione generica per un \"\n\"tipo generico. Sono indipendentemente generici.\"\n\n#: src/generics/generic-data.md:35\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Significa che questi metodi sono definiti per qualsiasi `T`.\"\n\n#: src/generics/generic-data.md:36\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"È possibile scrivere `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md:37\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` è ancora generico e puoi usare `Point<f64>`, ma i metodi in questo \"\n\"blocco saranno disponibili solo per `Point<u32>`.\"\n\n#: src/generics/generic-data.md:40\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md:3\n#, fuzzy\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Quando si lavora con i generici, spesso si desidera richiedere i tipi da \"\n\"implementare qualche tratto, in modo da poter chiamare i metodi di questo \"\n\"tratto.\"\n\n#: src/generics/trait-bounds.md:6\n#, fuzzy\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Puoi farlo con `T: Trait` o `impl Trait`:\"\n\n#: src/generics/trait-bounds.md:12\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md:18\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md:25\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md:27\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md:29\n#, fuzzy\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Mostra una clausola `where`, gli studenti la incontreranno durante la \"\n\"lettura del codice.\"\n\n#: src/generics/trait-bounds.md:40\n#, fuzzy\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Riordina la firma della funzione se hai molti parametri.\"\n\n#: src/generics/trait-bounds.md:41\n#, fuzzy\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Ha funzionalità aggiuntive che lo rendono più potente.\"\n\n#: src/generics/trait-bounds.md:42\n#, fuzzy\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Se qualcuno lo chiede, la caratteristica extra è che il tipo a sinistra di \"\n\"\\\":\\\" può essere arbitrario, come `Option<T>`.\"\n\n#: src/generics/trait-bounds.md:45\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md:3\n#, fuzzy\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Simile ai limiti dei tratti, in funzione può essere utilizzata una sintassi \"\n\"`impl Trait` argomenti e valori restituiti:\"\n\n#: src/generics/impl-trait.md:7\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md:19\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md:21\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md:23\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md:30\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"Il significato di \\\"impl Trait\\\" è leggermente diverso nelle diverse \"\n\"posizioni.\"\n\n#: src/generics/impl-trait.md:33\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Per un parametro, `impl Trait` è come un parametro generico anonimo con un \"\n\"tratto associato.\"\n\n#: src/generics/impl-trait.md:36\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Per un tipo restituito, significa che il tipo restituito è un tipo concreto \"\n\"che implementa il tratto, senza nominare il tipo. Questo può essere utile \"\n\"quando non vuoi esporre il tipo concreto in a API pubblica.\"\n\n#: src/generics/impl-trait.md:40\n#, fuzzy\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"L'inferenza è difficile nella posizione di ritorno. Una funzione che \"\n\"restituisce le scelte `impl Foo` il tipo concreto che restituisce, senza \"\n\"scriverlo nella fonte. Una funzione restituire un tipo generico come \"\n\"`collect<B>() -> B` può restituire qualsiasi tipo soddisfacente `B`, e il \"\n\"chiamante potrebbe aver bisogno di sceglierne uno, come con `let x: Vec<_> = \"\n\"foo.collect()` o con il turbofish, `foo.collect::<Vec<_>>()`.\"\n\n#: src/generics/impl-trait.md:47\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md:3\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md:8 src/generics/solution.md:5\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md:29\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md:33 src/generics/solution.md:36\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md:34 src/generics/exercise.md:35\n#: src/generics/solution.md:37 src/generics/solution.md:38\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md:4\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md:5\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:4\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:5\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:6\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:7\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:8\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:9\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:10\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:11\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md:13 src/memory-management.md:13\n#: src/slices-and-lifetimes.md:11\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md:18\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust viene fornito con una libreria standard che aiuta a stabilire un \"\n\"insieme di tipi comuni utilizzato dalla libreria e dai programmi Rust. In \"\n\"questo modo, due librerie possono lavorare insieme senza problemi perché \"\n\"entrambi usano lo stesso tipo `Stringa`.\"\n\n#: src/std-types/std.md:7\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"Infatti, Rust contiene diversi strati della Libreria Standard: `core`, \"\n\"`alloc` e `std`.\"\n\n#: src/std-types/std.md:10\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` include i tipi e le funzioni più basilari che non dipendono da \"\n\"`libc`, allocator o anche la presenza di un sistema operativo.\"\n\n#: src/std-types/std.md:12\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` include tipi che richiedono un allocatore heap globale, come `Vec`, \"\n\"`Box` e `Arc`.\"\n\n#: src/std-types/std.md:14\n#, fuzzy\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Le applicazioni embedded di Rust spesso usano solo `core` e talvolta `alloc`.\"\n\n#: src/std-types/docs.md:3\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:5\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Se vuoi uscire prima da un ciclo, usa [`break`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions),\"\n\n#: src/std-types/docs.md:7\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:9\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) e [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/std-types/docs.md:13\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:16\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:27\n#, fuzzy\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"I contenuti sono trattati come Markdown. Tutti i _crate_ pubblicati della \"\n\"libreria Rust sono automaticamente documentati in [`docs.rs`](https://docs.\"\n\"rs) utilizzando lo strumento  [rustdoc](https://doc.rust-lang.org/rustdoc/\"\n\"what-is-rustdoc.html). È idiomatico per documentare tutti gli elementi \"\n\"pubblici in un'API utilizzando questo modello.\"\n\n#: src/std-types/docs.md:32\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:36\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md:42\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Mostra agli studenti i documenti generati per il _crate_ `rand` su [`docs.rs/\"\n\"rand`](https://docs.rs/rand).\"\n\n#: src/std-types/option.md:1\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Eccezioni\"\n\n#: src/std-types/option.md:3\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md:10\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md:11\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md:12 src/std-types/option.md:15\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md:14\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md:16\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md:23\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` e `Result` sono ampiamente usati non solo nella libreria standard.\"\n\n#: src/std-types/option.md:24\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md:26\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md:28\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md:30\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md:1\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md:3\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md:13\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md:18\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md:20\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md:24\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md:33\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Come con `Option`, il valore riuscito si trova all'interno di `Result`, \"\n\"costringendo lo sviluppatore a farlo estrarlo esplicitamente. Questo \"\n\"incoraggia il controllo degli errori. Nel caso in cui non dovesse mai \"\n\"verificarsi un errore, È possibile chiamare `unwrap()` o `expect()`, e anche \"\n\"questo è un segnale dell'intenzione dello sviluppatore.\"\n\n#: src/std-types/result.md:37\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"La documentazione `Result` è una lettura consigliata. Non durante il corso, \"\n\"ma vale la pena menzionarlo. Contiene molti metodi e funzioni utili che \"\n\"aiutano la programmazione in stile funzionale.\"\n\n#: src/std-types/result.md:40\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"\"\n\"`Result` è il tipo standard per implementare la gestione degli errori, come \"\n\"vedremo il giorno 3.\"\n\n#: src/std-types/string.md:1\nmsgid \"String\"\nmsgstr \"Stringa (String)\"\n\n#: src/std-types/string.md:3\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) è il \"\n\"buffer di stringa UTF-8 espandibile allocato nell'heap standard:\"\n\n#: src/std-types/string.md:8 src/std-traits/read-and-write.md:35\n#: src/memory-management/review.md:23 src/memory-management/review.md:58\n#: src/testing/unit-tests.md:32 src/testing/unit-tests.md:37\n#: src/concurrency/scoped-threads.md:9 src/concurrency/scoped-threads.md:26\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md:9\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md:13\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md:14\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md:16\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md:17\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md:21\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementa [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), il che significa che puoi \"\n\"chiamare tutti metodi `str` su una `stringa`.\"\n\n#: src/std-types/string.md:30\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:32\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md:34\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md:37\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:39\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:41\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:43\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:45\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:46\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:49\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md:50\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md:52\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) è il buffer \"\n\"ridimensionabile allocato nell'heap standard:\"\n\n#: src/std-types/vec.md:9\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:14\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:16\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:19\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:21 src/std-types/vec.md:25\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:23\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:29\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementa [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), il che significa che puoi chiamare \"\n\"slice metodi su un `Vec`.\"\n\n#: src/std-types/vec.md:38\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:41\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:44\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:46\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md:49\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:3\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Mappa hash standard con protezione dagli attacchi HashDoS:\"\n\n#: src/std-types/hashmap.md:10\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:11\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:12 src/std-types/hashmap.md:21\n#: src/std-types/hashmap.md:29\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:14\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:16\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:21 src/std-types/hashmap.md:29\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:23\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:24\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:28\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:34\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:41\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:42\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:48 src/std-types/hashmap.md:60\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:51 src/std-types/hashmap.md:61\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:54\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:55\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:65\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:67\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:70\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md:73\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:3\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:9\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:13\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:20 src/std-types/solution.md:6\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:27 src/std-types/solution.md:13\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:34 src/std-types/solution.md:18\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:43 src/std-types/solution.md:23\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:59 src/std-types/solution.md:39\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:63 src/std-types/exercise.md:65\n#: src/std-types/exercise.md:66 src/std-types/solution.md:43\n#: src/std-types/solution.md:45 src/std-types/solution.md:46\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:64 src/std-types/solution.md:44\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md:66 src/std-types/solution.md:46\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md:4\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:5\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:6\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:7\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:8\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:9\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:10\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:11\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md:13\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md:18\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md:21\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:3\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:6\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:8\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:23\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:27\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Leggi` e `Scrivi`\"\n\n#: src/std-traits/comparisons.md:29\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:49\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:54\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md:69\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md:3\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"L'overload degli operatori è implementato tramite i tratti in [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md:23\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md:30 src/memory-management/drop.md:48\nmsgid \"Discussion points:\"\nmsgstr \"Punti di discussione:\"\n\n#: src/std-traits/operators.md:32\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Puoi implementare `Aggiungi` per `&Punto`. In quali situazioni è utile?\"\n\n#: src/std-traits/operators.md:33\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Risposta: `Add:add` consuma `self`. Se digita \\\"T\\\" per cui sei \"\n\"l'overloading dell'operatore non è `Copy`, dovresti considerare \"\n\"l'overloading anche l'operatore per `&T`. Ciò evita inutili clonazioni sul \"\n\"file sito di chiamata.\"\n\n#: src/std-traits/operators.md:36\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Perché `Output` è un tipo associato? Potrebbe essere reso un parametro di \"\n\"tipo?\"\n\n#: src/std-traits/operators.md:38\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Risposta breve: i parametri di tipo sono controllati dal chiamante, ma i \"\n\"tipi associati (come `Output`) sono controllati dall'implementatore di a \"\n\"tratto.\"\n\n#: src/std-traits/operators.md:41\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md:3\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"I tipi implementano [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) e [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) \"\n\"per facilitare le conversioni di tipo:\"\n\n#: src/std-traits/from-and-into.md:11 src/std-traits/from-and-into.md:23\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md:15\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) viene \"\n\"implementato automaticamente quando [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) è implementato:\"\n\n#: src/std-traits/from-and-into.md:30\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Ecco perché è comune implementare solo `From`, poiché anche il tuo tipo \"\n\"otterrà l'implementazione di `Into`.\"\n\n#: src/std-traits/from-and-into.md:32\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Quando si dichiara un tipo di input per l'argomento di una funzione come \"\n\"\\\"qualsiasi cosa che può essere convertita in una `Stringa`\\\", la regola è \"\n\"opposta, si dovrebbe usare `Into`. La tua funzione accetterà tipi che \"\n\"implementano `From` e quelli che _solo_ implementano `Into`.\"\n\n#: src/std-traits/casting.md:3\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:9\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:10\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:11\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:15\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:19\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:25\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:33\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:35\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md:38\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:3\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Usando [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) e \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), puoi \"\n\"astrarre su fonti `u8`:\"\n\n#: src/std-traits/read-and-write.md:14\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:15\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:18\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:23\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Allo stesso modo, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.\"\n\"html) ti consente di astrarre sui sink `u8`:\"\n\n#: src/std-traits/read-and-write.md:30\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:36 src/slices-and-lifetimes/str.md:12\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md:37\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:1\nmsgid \"The `Default` Trait\"\nmsgstr \"Il trait `Default`\"\n\n#: src/std-traits/default.md:3\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"Il trait [`Default`](https://doc.rust-lang.org/std/default/trait.Default.\"\n\"html) produce un valore predefinito per un tipo.\"\n\n#: src/std-traits/default.md:18\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:24\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:27\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:28\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:31 src/slices-and-lifetimes/exercise.md:211\n#: src/slices-and-lifetimes/solution.md:214\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md:38\n#, fuzzy\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Può essere implementato direttamente o può essere derivato tramite \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md:39\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"L'implementazione derivata produrrà un'istanza in cui tutti i campi sono \"\n\"impostati sui valori predefiniti.\"\n\n#: src/std-traits/default.md:41\n#, fuzzy\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Ciò significa che anche tutti i tipi nella struttura devono implementare \"\n\"`Default`.\"\n\n#: src/std-traits/default.md:42\n#, fuzzy\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"I tipi Rust standard spesso implementano `Default` con valori ragionevoli \"\n\"(ad esempio `0`, `\\\"\\\"`, ecc.).\"\n\n#: src/std-traits/default.md:44\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"La copia parziale della struttura funziona bene con default.\"\n\n#: src/std-traits/default.md:45\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"La libreria standard di Rust sa che i tipi possono implementare `Default` e \"\n\"fornisce comodi metodi che lo utilizzano.\"\n\n#: src/std-traits/default.md:47\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:3\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Le chiusure o le espressioni lambda hanno tipi che non possono essere \"\n\"nominati. Tuttavia, loro implementare speciali [`Fn`](https://doc.rust-lang.\"\n\"org/std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/\"\n\"trait.FnMut.html) e [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnOnce.html) caratteristiche:\"\n\n#: src/std-traits/closures.md:10\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"Chiamare Funzioni Unsafe\"\n\n#: src/std-traits/closures.md:16 src/std-traits/closures.md:17\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:24 src/std-traits/closures.md:25\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:28\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:35\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Un \\\"Fn\\\" non consuma né muta i valori acquisiti, o forse non cattura nulla, \"\n\"quindi può farlo essere chiamato più volte contemporaneamente.\"\n\n#: src/std-traits/closures.md:38\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Un `FnMut` potrebbe mutare i valori catturati, quindi puoi chiamarlo più \"\n\"volte ma non contemporaneamente.\"\n\n#: src/std-traits/closures.md:41\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Se hai un `FnOnce`, puoi chiamarlo solo una volta. Potrebbe consumare i \"\n\"valori acquisiti.\"\n\n#: src/std-traits/closures.md:44\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"\\\"FnMut\\\" è un sottotipo di \\\"FnOnce\\\". \\\"Fn\\\" è un sottotipo di \\\"FnMut\\\" e \"\n\"\\\"FnOnce\\\". Cioè. puoi usare un `FnMut` ovunque sia richiesto un `FnOnce` e \"\n\"puoi usare un `Fn` ovunque sia `FnMut` o `FnOnce` è richiesto.\"\n\n#: src/std-traits/closures.md:48\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:52\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:55\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:58\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:67\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md:68\nmsgid \"\\\"there\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md:3\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md:15\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md:20 src/std-traits/exercise.md:33\n#: src/std-traits/solution.md:26 src/std-traits/solution.md:39\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md:36 src/std-traits/solution.md:42\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md:55\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md:16\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:1\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"Benvenuto al giorno 3\"\n\n#: src/welcome-day-3.md:3\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:5\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:7\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:12\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:13\nmsgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:14\nmsgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md:16\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md:4\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:5\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:6\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:7\nmsgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:8\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:9\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:10\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md:11\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:3\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:5\n#, fuzzy\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Stack: area continua di memoria per le variabili locali.\"\n\n#: src/memory-management/review.md:6\n#, fuzzy\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"I valori hanno dimensioni fisse note al momento della compilazione.\"\n\n#: src/memory-management/review.md:7\n#, fuzzy\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Estremamente veloce: basta spostare un puntatore dello stack.\"\n\n#: src/memory-management/review.md:8\n#, fuzzy\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Facile da gestire: segue le chiamate alle funzioni.\"\n\n#: src/memory-management/review.md:9\nmsgid \"Great memory locality.\"\nmsgstr \"Ottima località di memoria.\"\n\n#: src/memory-management/review.md:11\n#, fuzzy\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap: archiviazione di valori al di fuori delle chiamate di funzione.\"\n\n#: src/memory-management/review.md:12\n#, fuzzy\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"I valori hanno dimensioni dinamiche determinate in fase di esecuzione.\"\n\n#: src/memory-management/review.md:13\n#, fuzzy\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Leggermente più lento della pila: è necessaria un po' di contabilità.\"\n\n#: src/memory-management/review.md:14\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Nessuna garanzia di località di memoria.\"\n\n#: src/memory-management/review.md:18\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"La creazione di una `Stringa` mette i dati di dimensioni fisse nello stack e \"\n\"dimensionati dinamicamente dati sull'heap:\"\n\n#: src/memory-management/review.md:44\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:47\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:53\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:59 src/testing/unit-tests.md:15\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:60\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:61\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md:66\nmsgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:3\n#, fuzzy\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\"Tradizionalmente, le lingue sono state suddivise in due grandi categorie:\"\n\n#: src/memory-management/approaches.md:5\n#, fuzzy\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Controllo completo tramite gestione manuale della memoria: C, C++, \"\n\"Pascal, ...\"\n\n#: src/memory-management/approaches.md:6\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:7\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:8\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:9\n#, fuzzy\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Piena sicurezza tramite la gestione automatica della memoria in fase di \"\n\"esecuzione: Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md:11\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:13\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:15\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust offre un nuovo mix:\"\n\n#: src/memory-management/approaches.md:17\n#, fuzzy\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Pieno controllo _e_ sicurezza tramite applicazione in fase di compilazione \"\n\"della memoria corretta gestione.\"\n\n#: src/memory-management/approaches.md:20\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Lo fa con un concetto di ownership (proprietà) esplicito.\"\n\n#: src/memory-management/approaches.md:25\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:28\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:32\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:37\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md:42\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md:3\n#, fuzzy\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Tutte le associazioni di variabili hanno un _scope_ in cui sono valide ed è \"\n\"un errore usa una variabile al di fuori del suo ambito:\"\n\n#: src/memory-management/ownership.md:20\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"Diciamo che la variabile _possiede_ (“_owns_”) il valore.\"\n\n#: src/memory-management/ownership.md:23\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"Alla fine dell'ambito, la variabile viene _eliminata_ ei dati vengono \"\n\"liberati.\"\n\n#: src/memory-management/ownership.md:29\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:3\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Un'assegnazione trasferirà la proprietà tra le variabili:\"\n\n#: src/memory-management/move.md:7\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/memory-management/move.md:9 src/slices-and-lifetimes/str.md:16\n#: src/slices-and-lifetimes/str.md:18\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:10\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:14\n#, fuzzy\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"L'assegnazione di \\\"s1\\\" a \\\"s2\\\" trasferisce la proprietà.\"\n\n#: src/memory-management/move.md:15\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"Quando `s1` esce dall'ambito, non accade nulla: non ha proprietà.\"\n\n#: src/memory-management/move.md:16\n#, fuzzy\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"Quando `s2` esce dall'ambito, i dati della stringa vengono liberati.\"\n\n#: src/memory-management/move.md:18\nmsgid \"Before move to `s2`:\"\nmsgstr \"Prima di muovere a `s2`:\"\n\n#: src/memory-management/move.md:35\nmsgid \"After move to `s2`:\"\nmsgstr \"Dopo il muovere a `s2`:\"\n\n#: src/memory-management/move.md:37\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:58\n#, fuzzy\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Quando si passa un valore a una funzione, il valore viene assegnato alla \"\n\"funzione parametro. Questo trasferisce la proprietà:\"\n\n#: src/memory-management/move.md:63\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:67 src/android/interoperability/java.md:57\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Slice\"\n\n#: src/memory-management/move.md:69\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:76\n#, fuzzy\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Menziona che questo è l'opposto dei valori predefiniti in C++, che copia per \"\n\"valore a meno che tu non usi `std::move` (e il costruttore di movimento è \"\n\"definito!).\"\n\n#: src/memory-management/move.md:79\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:83\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:85\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"In Rust, i cloni sono espliciti (utilizzando `clone`).\"\n\n#: src/memory-management/move.md:87\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:89\n#, fuzzy\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Con la prima chiamata a `say_hello`, `main` rinuncia alla proprietà di \"\n\"`name`. Successivamente, `name` non può più essere utilizzato all'interno di \"\n\"`main`.\"\n\n#: src/memory-management/move.md:91\n#, fuzzy\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"La memoria heap allocata per `name` verrà liberata alla fine della funzione \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md:93\n#, fuzzy\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` può mantenere la proprietà se passa `name` come riferimento (`&name`) \"\n\"e se `say_hello` accetta un riferimento come parametro.\"\n\n#: src/memory-management/move.md:95\n#, fuzzy\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"In alternativa, `main` può passare un clone di `name` nella prima chiamata \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md:97\n#, fuzzy\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust rende più difficile del C++ creare copie inavvertitamente rendendo la \"\n\"semantica di spostamento l'impostazione predefinita e costringendo i \"\n\"programmatori a rendere espliciti i cloni.\"\n\n#: src/memory-management/move.md:102\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Copie difensive nel C++ Moderno\"\n\n#: src/memory-management/move.md:104\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"C++ moderno risolve questo problema in modo diverso:\"\n\n#: src/memory-management/move.md:107\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:108\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:111\n#, fuzzy\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"I dati dell'heap da `s1` vengono duplicati e `s2` ottiene la propria copia \"\n\"indipendente.\"\n\n#: src/memory-management/move.md:112\n#, fuzzy\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Quando `s1` e `s2` escono dall'ambito, ciascuno libera la propria memoria.\"\n\n#: src/memory-management/move.md:114\nmsgid \"Before copy-assignment:\"\nmsgstr \"Prima dell'assegnazione di copia (copy-assignment):\"\n\n#: src/memory-management/move.md:130\nmsgid \"After copy-assignment:\"\nmsgstr \"Dopo l'assegnazione di copia (copy-assignment):\"\n\n#: src/memory-management/move.md:155\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:159\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md:164\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md:1\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md:3\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md:24\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md:27\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md:7\n#, fuzzy\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Sebbene la semantica di spostamento sia l'impostazione predefinita, alcuni \"\n\"tipi vengono copiati per impostazione predefinita:\"\n\n#: src/memory-management/copy-types.md:20\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Questi tipi implementano il trait `Copy`.\"\n\n#: src/memory-management/copy-types.md:22\n#, fuzzy\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Puoi acconsentire esplicitamente ai tuoi tipi per utilizzare la semantica \"\n\"della copia:\"\n\n#: src/memory-management/copy-types.md:38\n#, fuzzy\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Dopo l'assegnazione, sia `p1` che `p2` possiedono i propri dati.\"\n\n#: src/memory-management/copy-types.md:39\n#, fuzzy\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"Possiamo anche usare `p1.clone()` per copiare esplicitamente i dati.\"\n\n#: src/memory-management/copy-types.md:44\n#, fuzzy\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Copiare e clonare non sono la stessa cosa:\"\n\n#: src/memory-management/copy-types.md:46\n#, fuzzy\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"La copia si riferisce a copie bit per bit di aree di memoria e non funziona \"\n\"su oggetti arbitrari.\"\n\n#: src/memory-management/copy-types.md:48\n#, fuzzy\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"La copia non consente la logica personalizzata (a differenza dei costruttori \"\n\"di copia in C++).\"\n\n#: src/memory-management/copy-types.md:49\n#, fuzzy\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"La clonazione è un'operazione più generale e consente anche un comportamento \"\n\"personalizzato implementando il tratto `Clone`.\"\n\n#: src/memory-management/copy-types.md:51\n#, fuzzy\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"La copia non funziona sui tipi che implementano il tratto `Drop`.\"\n\n#: src/memory-management/copy-types.md:53\nmsgid \"In the above example, try the following:\"\nmsgstr \"Nell'esempio sopra, prova quanto segue:\"\n\n#: src/memory-management/copy-types.md:55\n#, fuzzy\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Aggiungi un campo `String` a `struct Point`. Non verrà compilato perché \"\n\"`String` non è un tipo `Copy`.\"\n\n#: src/memory-management/copy-types.md:57\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Rimuovi `Copy` dall'attributo `derive`. L'errore del compilatore è ora in \"\n\"`println!` per `p1`.\"\n\n#: src/memory-management/copy-types.md:59\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Dimostra che funziona se invece cloni `p1`.\"\n\n#: src/memory-management/drop.md:1\nmsgid \"The `Drop` Trait\"\nmsgstr \"Il trait `Drop`\"\n\n#: src/memory-management/drop.md:3\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"I valori che implementano [`Drop`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Drop.html) possono specificare il codice da eseguire quando escono \"\n\"dall'ambito:\"\n\n#: src/memory-management/drop.md:13\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:18\n#: src/exercises/concurrency/link-checker.md:93\n#: src/exercises/concurrency/solutions-morning.md:125\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:20 src/testing/googletest.md:12\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:22\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:23\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:24\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:26\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:29\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:36\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:37\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:38\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:40\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:41\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:45\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md:50\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Perché `Drop::drop` non accetta `self`?\"\n\n#: src/memory-management/drop.md:51\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Risposta breve: se così fosse, `std::mem::drop` verrebbe chiamato alla fine \"\n\"di il blocco, risultando in un'altra chiamata a `Drop::drop` e uno stack \"\n\"traboccare!\"\n\n#: src/memory-management/drop.md:53\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Prova a sostituire `drop(a)` con `a.drop()`.\"\n\n#: src/memory-management/exercise.md:3\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:7\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:22 src/memory-management/solution.md:16\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:34 src/memory-management/solution.md:28\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:37\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:40 src/memory-management/solution.md:37\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:46\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:49 src/memory-management/solution.md:52\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:55 src/memory-management/solution.md:58\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:57\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:60 src/memory-management/solution.md:64\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:62\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:65 src/memory-management/solution.md:70\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:67\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:76 src/memory-management/solution.md:82\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:76 src/memory-management/solution.md:82\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:77 src/memory-management/solution.md:83\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:79 src/memory-management/solution.md:85\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:79 src/memory-management/solution.md:85\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:80 src/memory-management/solution.md:86\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:81 src/memory-management/solution.md:87\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:82 src/memory-management/solution.md:88\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:83 src/memory-management/solution.md:89\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md:87 src/memory-management/solution.md:93\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md:45\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md:4\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md:4\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md:5\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md:6\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) è un puntatore \"\n\"di proprietà ai dati sull'heap:\"\n\n#: src/smart-pointers/box.md:9\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:26\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementa `Deref<Target = T>`, il che significa che puoi [chiamare \"\n\"metodi da `T` direttamente su un `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md:30\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"I tipi di dati ricorsivi o i tipi di dati con dimensioni dinamiche devono \"\n\"utilizzare un `Box`:\"\n\n#: src/smart-pointers/box.md:35\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:37\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:44 src/smart-pointers/box.md:98\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:48\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md:64\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` è come `std::unique_ptr` in C++, tranne per il fatto che è garantito \"\n\"che non sia nullo.\"\n\n#: src/smart-pointers/box.md:66\n#, fuzzy\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Una `Box` può essere utile quando:\"\n\n#: src/smart-pointers/box.md:67\n#, fuzzy\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"hanno un tipo la cui dimensione non può essere conosciuta in fase di \"\n\"compilazione, ma il compilatore Rust vuole conoscere una dimensione esatta.\"\n\n#: src/smart-pointers/box.md:69\n#, fuzzy\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"desidera trasferire la proprietà di una grande quantità di dati. Per evitare \"\n\"di copiare grandi quantità di dati nello stack, archivia invece i dati \"\n\"nell'heap in un \\\"Box\\\" in modo che venga spostato solo il puntatore.\"\n\n#: src/smart-pointers/box.md:73\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not compute a fixed size of the struct in memory \"\n\"(`List` would be of infinite size).\"\nmsgstr \"\"\n\"Se la `Box` non è stata utilizzata qui e abbiamo tentato di incorporare una \"\n\"`Lista` direttamente nella `Lista`, il compilatore non calcolerebbe una \"\n\"dimensione fissa della struttura in memoria, sembrerebbe infinita.\"\n\n#: src/smart-pointers/box.md:77\n#, fuzzy\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` risolve questo problema poiché ha le stesse dimensioni di un normale \"\n\"puntatore e punta solo al successivo elemento della \\\"Lista\\\" nell'heap.\"\n\n#: src/smart-pointers/box.md:80\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. \"\n\"\\\"Recursive with indirection\\\" is a hint you might want to use a Box or \"\n\"reference of some kind, instead of storing a value directly.\"\nmsgstr \"\"\n\"Rimuovi il `Box` nella definizione dell'elenco e mostra l'errore del \"\n\"compilatore. \\\"Ricorsivo con indiretto\\\" è un suggerimento che potresti \"\n\"voler utilizzare un Box o un riferimento di qualche tipo, invece di \"\n\"memorizzare direttamente un valore.\"\n\n#: src/smart-pointers/box.md:86\nmsgid \"Niche Optimization\"\nmsgstr \"Ottimizzazioni di nicchia\"\n\n#: src/smart-pointers/box.md:102\n#, fuzzy\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\"Un `Box` non può essere vuoto, quindi il puntatore è sempre valido e non \"\n\"`null`. Questo consente al compilatore di ottimizzare il layout della \"\n\"memoria:\"\n\n#: src/smart-pointers/box.md:105\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) è un puntatore \"\n\"condiviso con conteggio dei riferimenti. Usalo quando hai bisogno di fare \"\n\"riferimento agli stessi dati da più posizioni:\"\n\n#: src/smart-pointers/rc.md:13\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md:14\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md:18\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Vedere [`Arc`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) se ci \"\n\"si trova in un contesto multi-thread.\"\n\n#: src/smart-pointers/rc.md:19\n#, fuzzy\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Puoi _declassare_ un puntatore condiviso in un puntatore [`Weak`](https://\"\n\"doc.rust-lang.org/std/rc/struct.Weak.html) per creare cicli che verrà \"\n\"abbandonato.\"\n\n#: src/smart-pointers/rc.md:30\n#, fuzzy\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"Il conteggio di `Rc` assicura che il suo valore contenuto sia valido finché \"\n\"ci sono riferimenti.\"\n\n#: src/smart-pointers/rc.md:32\n#, fuzzy\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Come `std::shared_ptr` di C++.\"\n\n#: src/smart-pointers/rc.md:33\n#, fuzzy\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` è economico: crea un puntatore alla stessa allocazione e aumenta \"\n\"il conteggio dei riferimenti. Non crea un clone profondo e generalmente può \"\n\"essere ignorato quando si cercano problemi di prestazioni nel codice.\"\n\n#: src/smart-pointers/rc.md:36\n#, fuzzy\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` in realtà clona il valore interno se necessario (\\\"clone-on-\"\n\"write\\\") e restituisce un riferimento mutabile.\"\n\n#: src/smart-pointers/rc.md:38\n#, fuzzy\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Usa `Rc::strong_count` per controllare il conteggio dei riferimenti.\"\n\n#: src/smart-pointers/rc.md:39\n#, fuzzy\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` fornisce un oggetto _debolmente contato_ a creare cicli che \"\n\"verranno eliminati correttamente (probabilmente in combinazione con \"\n\"`RefCella`).\"\n\n#: src/smart-pointers/exercise.md:3\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:8\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:10\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:14 src/smart-pointers/solution.md:5\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:21 src/smart-pointers/solution.md:13\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:25 src/smart-pointers/solution.md:17\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:33\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md:48 src/smart-pointers/solution.md:105\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md:89 src/testing/googletest.md:11\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md:4\nmsgid \"[Borrowing](./borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md:5\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md:7\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md:4\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md:5\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md:6\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md:7\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md:3\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Invece di trasferire la proprietà quando chiami una funzione, puoi lasciare \"\n\"che a funzione _prende in prestito_ il valore:\"\n\n#: src/borrowing/shared.md:24\n#, fuzzy\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\"La funzione `add` _prende in prestito_ due punti e restituisce un nuovo \"\n\"punto.\"\n\n#: src/borrowing/shared.md:25\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Il chiamante (caller) mantiene la proprietà (ownership) degli input.\"\n\n#: src/borrowing/shared.md:30\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md:35\nmsgid \"Notes on stack returns:\"\nmsgstr \"Note sugli stack returns:\"\n\n#: src/borrowing/shared.md:37\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md:63\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md:64\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Rust pone dei vincoli sui modi in cui puoi prendere in prestito i valori:\"\n\n#: src/borrowing/borrowck.md:6\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Puoi avere uno o più valori `&T` in qualsiasi momento, _oppure_\"\n\n#: src/borrowing/borrowck.md:7\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Puoi avere un unico valore `&mut T`.\"\n\n#: src/borrowing/borrowck.md:29\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md:31\n#, fuzzy\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Il codice precedente non viene compilato perché `a` è preso in prestito come \"\n\"mutabile (attraverso `c`) e come immutabile (attraverso `b`) allo stesso \"\n\"tempo.\"\n\n#: src/borrowing/borrowck.md:33\n#, fuzzy\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Sposta l'istruzione `println!` per `b` prima dell'ambito che introduce `c` \"\n\"per far compilare il codice.\"\n\n#: src/borrowing/borrowck.md:35\n#, fuzzy\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Dopo tale modifica, il compilatore si rende conto che `b` è sempre e solo \"\n\"usato prima del nuovo prestito mutabile da `a` a `c`. Questa è una \"\n\"caratteristica del controllo del prestito chiamata \\\"vita non lessicale\\\".\"\n\n#: src/borrowing/borrowck.md:38\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md:42\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:3\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:7\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:11\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCella<T>`\"\n\n#: src/borrowing/interior-mutability.md:41\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:42\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:46\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Cella<T>`\"\n\n#: src/borrowing/interior-mutability.md:48\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:55\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:59\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:64\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:68\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:72\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md:75\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md:3\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Stai lavorando all'implementazione di un sistema di monitoraggio sanitario. \"\n\"Come parte di questo, tu necessità di tenere traccia delle statistiche sulla \"\n\"salute degli utenti.\"\n\n#: src/borrowing/exercise.md:6\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Inizierai con alcune funzioni stubbed in un blocco `impl` così come in un \"\n\"`User` definizione di struttura. Il tuo obiettivo è implementare i metodi \"\n\"eliminati sul file `User` `struct` definito nel blocco `impl`.\"\n\n#: src/borrowing/exercise.md:10\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Copia il codice qui sotto in <https://play.rust-lang.org/> e inserisci \"\n\"quello mancante metodi:\"\n\n#: src/borrowing/exercise.md:51\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md:56 src/borrowing/exercise.md:62\n#: src/borrowing/exercise.md:68 src/borrowing/solution.md:58\n#: src/borrowing/solution.md:64 src/borrowing/solution.md:70\n#: src/android/build-rules/library.md:44 src/android/aidl/client.md:22\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md:57 src/borrowing/solution.md:59\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:4\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:5\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:6\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:7\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:8\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md:9\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md:1\nmsgid \"Slices\"\nmsgstr \"Slice\"\n\n#: src/slices-and-lifetimes/slices.md:3\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Una _slice_ ti offre una vista in una raccolta più ampia:\"\n\n#: src/slices-and-lifetimes/slices.md:18\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Le sezioni prendono in prestito i dati dal tipo della raccolta.\"\n\n#: src/slices-and-lifetimes/slices.md:19\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"Domanda: Cosa succede se modifichi `a[3]` prima di stampare `s`?\"\n\n#: src/slices-and-lifetimes/slices.md:24\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Creiamo una sezione prendendo in prestito `a` e specificando gli indici \"\n\"iniziale e finale tra parentesi.\"\n\n#: src/slices-and-lifetimes/slices.md:27\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Se la slice inizia all'indice 0, la sintassi dell'intervallo di Rust ci \"\n\"consente di eliminare l'indice iniziale, il che significa che `&a[0..a.\"\n\"len()]` e `&a[..a.len()]` sono identici .\"\n\n#: src/slices-and-lifetimes/slices.md:31\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Lo stesso vale per l'ultimo indice, quindi `&a[2..a.len()]` e `&a[2..]` sono \"\n\"identici.\"\n\n#: src/slices-and-lifetimes/slices.md:34\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Per creare facilmente una porzione dell'array completo, possiamo quindi \"\n\"utilizzare `&a[..]`.\"\n\n#: src/slices-and-lifetimes/slices.md:36\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` è un riferimento a una porzione di `i32`s. Si noti che il tipo di `s` \"\n\"(`&[i32]`) non menziona più la lunghezza dell'array. Questo ci permette di \"\n\"eseguire il calcolo su fette di diverse dimensioni.\"\n\n#: src/slices-and-lifetimes/slices.md:40\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Le fette prendono sempre in prestito da un altro oggetto. In questo esempio, \"\n\"`a` deve rimanere 'vivo' (nello scope) almeno quanto la nostra fetta. \"\n\n#: src/slices-and-lifetimes/slices.md:43\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"La domanda sulla modifica di `a[3]` può innescare una discussione \"\n\"interessante, ma la risposta è che per motivi di sicurezza della memoria non \"\n\"puoi farlo tramite \\\"a\\\" dopo aver creato una sezione, ma puoi leggere i \"\n\"dati sia da \\\"a\\\" che da \\\"s\\\" in modo sicuro. Maggiori dettagli saranno \"\n\"spiegati nella sezione controllo del prestito.\"\n\n#: src/slices-and-lifetimes/str.md:7\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md:13\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md:15\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Hello World!\"\n\n#: src/slices-and-lifetimes/str.md:21\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md:25\nmsgid \"Rust terminology:\"\nmsgstr \"Terminologia di Rust:\"\n\n#: src/slices-and-lifetimes/str.md:27\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"`&str` un riferimento immutabile a uno slice di stringa.\"\n\n#: src/slices-and-lifetimes/str.md:28\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"`String` è un buffer di stringa mutabile.\"\n\n#: src/slices-and-lifetimes/str.md:33\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` introduce una _string slice_, che è un riferimento immutabile a una  \"\n\"stringa codificata UTF-8 memorizzata in un blocco di memoria. Le Stringhe \"\n\"letterali (`”Hello”`), sono memorizzate all'interno del programma binario.\"\n\n#: src/slices-and-lifetimes/str.md:37\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Il tipo Rust `String` è costruito attorno a un vettore di bytes. Come con un \"\n\"`Vec<T>`, possiede i dati.\"\n\n#: src/slices-and-lifetimes/str.md:40\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Come con molti altri tipi, `String::from()` crea una stringa da un carattere \"\n\"letterale; `String::new()`  crea una stringa vuota a cui è possibile \"\n\"aggiungere dati utilizzando i metodi `push()` and `push_str()`.\"\n\n#: src/slices-and-lifetimes/str.md:44\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"La macro `format!()` è un modo conveniente per generare una stringa da \"\n\"valori dinamici. Accetta la stessa specifica di formato di `println!()`.\"\n\n#: src/slices-and-lifetimes/str.md:47\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md:52\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Per i programmatori C++: pensa a `&str` come a `const char*` da C++ ma che \"\n\"punta sempre a una stringa valida in memoria.  Rust `String` è \"\n\"approssimativamente equivalente a `std::string` da C++  (differenza \"\n\"principale: può contenere solo byte codificati UTF-8    e non utilizzerà mai \"\n\"l'ottimizzazione di stringhe piccole).\"\n\n#: src/slices-and-lifetimes/str.md:57\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"Le stringhe di byte consentono di creare direttamente un valore `&[u8]`:\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:3\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:6\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:11\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:15\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:36\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:37\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:44\nmsgid \"\"\n\"In this example, the the compiler does not know what lifetime to infer for \"\n\"`p3`. Looking inside the function body shows that it can only safely assume \"\n\"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, \"\n\"Rust requires explicit annotations of lifetimes on function arguments and \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:50\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:56\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md:59\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:1\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Lifetime in Chiamate a Funzione\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:3\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:8\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:9\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:11\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:53\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:55\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:58\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:64\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md:68\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:1\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Lifetime in Strutture Dati\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:3\n#, fuzzy\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Se un tipo di dati memorizza dati presi in prestito, deve essere annotato \"\n\"con una durata:\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:10\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:14\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:17\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:18\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:19\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:26\n#, fuzzy\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"Nell'esempio precedente, l'annotazione su \\\"Highlight\\\" impone che i dati \"\n\"sottostanti a \\\"&str\\\" contenuti durino almeno quanto qualsiasi istanza di \"\n\"\\\"Highlight\\\" che utilizza quei dati.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:29\n#, fuzzy\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Se `text` viene consumato prima della fine della vita di `fox` (o `dog`), il \"\n\"controllo del prestito genera un errore.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:31\n#, fuzzy\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"I tipi con dati presi in prestito costringono gli utenti a conservare i dati \"\n\"originali. Questo può essere utile per creare viste leggere, ma in genere le \"\n\"rende un po' più difficili da usare.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:34\n#, fuzzy\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Quando possibile, fare in modo che le strutture dati possiedano direttamente \"\n\"i propri dati.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md:35\n#, fuzzy\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Alcune strutture con più riferimenti all'interno possono avere più di \"\n\"un'annotazione di durata. Ciò può essere necessario se è necessario \"\n\"descrivere le relazioni di durata tra i riferimenti stessi, oltre alla \"\n\"durata della struttura stessa. Questi sono casi d'uso molto avanzati.\"\n\n#: src/slices-and-lifetimes/exercise.md:3\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:8\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:13\n#, fuzzy\nmsgid \"We'll use the following proto:\"\nmsgstr \"Puoi usare il seguente `Cargo.toml`:\"\n\n#: src/slices-and-lifetimes/exercise.md:28\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:33\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:38\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:49\n#: src/slices-and-lifetimes/solution.md:11\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:51\n#: src/slices-and-lifetimes/solution.md:13\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:53\n#: src/slices-and-lifetimes/solution.md:15\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:55\n#: src/slices-and-lifetimes/solution.md:17\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:57\n#: src/slices-and-lifetimes/solution.md:19\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:59\n#: src/slices-and-lifetimes/solution.md:21\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:62\n#: src/slices-and-lifetimes/solution.md:24\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:65\n#: src/slices-and-lifetimes/solution.md:27\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:67\n#: src/slices-and-lifetimes/solution.md:29\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:71\n#: src/slices-and-lifetimes/solution.md:33\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:76\n#: src/slices-and-lifetimes/solution.md:38\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:80\n#: src/slices-and-lifetimes/solution.md:42\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:85\n#: src/slices-and-lifetimes/solution.md:47\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:102\n#: src/slices-and-lifetimes/solution.md:64\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:132\n#: src/slices-and-lifetimes/solution.md:94\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:140\n#: src/slices-and-lifetimes/solution.md:102\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:150\n#: src/slices-and-lifetimes/solution.md:112\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:153\n#: src/slices-and-lifetimes/solution.md:115\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:161\n#: src/slices-and-lifetimes/solution.md:122\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:167\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:169\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:171\n#: src/slices-and-lifetimes/solution.md:153\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md:198\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md:146\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md:187\n#: src/slices-and-lifetimes/solution.md:198\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md:225\n#: src/slices-and-lifetimes/solution.md:232\n#: src/slices-and-lifetimes/solution.md:239\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:1\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Benvenuto al primo giorno\"\n\n#: src/welcome-day-4.md:3\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"Oggi tratteremo alcuni argomenti più avanzati di Rust:\"\n\n#: src/welcome-day-4.md:5\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:6\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:7\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Testare\"\n\n#: src/welcome-day-4.md:8\n#, fuzzy\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"Gestione degli errori: panic, `Result` e l'operatore try `?`.\"\n\n#: src/welcome-day-4.md:9\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:14\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:15\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:16\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md:17\nmsgid \"[Testing](./testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md:4\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md:5\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md:6\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md:7\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md:7\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md:31\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md:39\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"Il tratto `Iterator` implementa molte comuni operazioni di programmazione \"\n\"funzionale sulle raccolte (ad es. `map`, `filter`, `reduce`, ecc.). Questo è \"\n\"il tratto in cui puoi trovare tutta la documentazione su di loro. In Rust \"\n\"queste funzioni dovrebbero produrre il codice tanto efficiente quanto \"\n\"imperativo equivalente implementazioni.\"\n\n#: src/iterators/iterator.md:44\n#, fuzzy\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` è la caratteristica che fa funzionare i cicli for. È \"\n\"implementato da tipi di raccolta come `Vec<T>` e riferimenti ad essi come \"\n\"`&Vec<T>` e `&[T]`. Anche le gamme lo implementano. Ecco perché puoi iterare \"\n\"su un vettore con `for i in some_vec { .. }` ma `some_vec.next()` non esiste.\"\n\n#: src/iterators/intoiterator.md:3\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Il tratto `Iterator` ti dice come _iterare_ una volta che hai creato un file \"\n\"iteratore. Il tratto correlato `IntoIterator` ti dice come creare \"\n\"l'iteratore:\"\n\n#: src/iterators/intoiterator.md:49\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md:57\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"La sintassi qui significa che ogni implementazione di \\\"IntoIterator\\\" deve \"\n\"dichiarare due tipi:\"\n\n#: src/iterators/intoiterator.md:60\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: il tipo su cui iteriamo, come `i8`,\"\n\n#: src/iterators/intoiterator.md:61\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: il tipo `Iterator` restituito dal metodo `into_iter`.\"\n\n#: src/iterators/intoiterator.md:63\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Nota che \\\"IntoIter\\\" e \\\"Item\\\" sono collegati: l'iteratore deve avere lo \"\n\"stesso Tipo `Item`, che significa che restituisce `Option<Item>`\"\n\n#: src/iterators/intoiterator.md:66\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md:68\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md:71\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md:74\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md:1\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md:3\n#, fuzzy\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"consente di creare una raccolta da un [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md:9\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md:16\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iteratore`\"\n\n#: src/iterators/fromiterator.md:25\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md:27\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md:29\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md:32\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Ci sono anche implementazioni che ti permettono di fare cose interessanti \"\n\"come convertire un file `Iterator<Item = Result<V, E>>` in un \"\n\"`Result<Vec<V>, E>`.\"\n\n#: src/iterators/exercise.md:3\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Puoi implementare il tratto [`Iterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html) sui tuoi tipi:\"\n\n#: src/iterators/exercise.md:6\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Copia il seguente codice in <https://play.rust-lang.org/> ed esegui i test \"\n\"passaggio. Prova a evitare di assegnare un `Vec` per i tuoi risultati \"\n\"intermedi:\"\n\n#: src/iterators/exercise.md:11 src/iterators/solution.md:4\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md:4\nmsgid \"[Modules](./modules/modules.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md:5\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md:6\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md:7\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md:8\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md:10\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"\"\n\n#: src/modules/modules.md:3\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Abbiamo visto come i blocchi `impl` ci permettono di utilizzare lo spazio \"\n\"dei nomi per un tipo.\"\n\n#: src/modules/modules.md:5\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"Allo stesso modo, `mod` ci consente tipi e funzioni dello spazio dei nomi:\"\n\n#: src/modules/modules.md:10\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md:16\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md:29\n#, fuzzy\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"I pacchetti forniscono funzionalità e includono un file `Cargo.toml` che \"\n\"descrive come costruire un pacchetto di 1+ casse.\"\n\n#: src/modules/modules.md:31\n#, fuzzy\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"I crate sono un albero di moduli, in cui un crate binario crea un eseguibile \"\n\"e un crate di libreria viene compilato in una libreria.\"\n\n#: src/modules/modules.md:33\n#, fuzzy\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\"I moduli definiscono l'organizzazione, l'ambito e sono il fulcro di questa \"\n\"sezione.\"\n\n#: src/modules/filesystem.md:3\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:9\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:13\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"La radice di `crate` è in:\"\n\n#: src/modules/filesystem.md:15\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (per un crate di libreria)\"\n\n#: src/modules/filesystem.md:16\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (per una cassa binaria)\"\n\n#: src/modules/filesystem.md:18\n#, fuzzy\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"Anche i moduli definiti nei file possono essere documentati utilizzando \"\n\"\\\"commenti interni al documento\\\". Questi documentano l'elemento che li \"\n\"contiene, in questo caso un modulo.\"\n\n#: src/modules/filesystem.md:22\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:24\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:28\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:33\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:43\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:46\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:49\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:59\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:62\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md:66\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md:3\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"I moduli sono un limite di privacy:\"\n\n#: src/modules/visibility.md:5\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Gli elementi del modulo sono privati per impostazione predefinita (nasconde \"\n\"i dettagli di implementazione).\"\n\n#: src/modules/visibility.md:6\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Gli elementi dei genitori e dei fratelli sono sempre visibili.\"\n\n#: src/modules/visibility.md:7\n#, fuzzy\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"In altre parole, se un elemento è visibile nel modulo `foo`, è visibile in \"\n\"tutti i file discendenti di `foo`.\"\n\n#: src/modules/visibility.md:13\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md:17\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md:22\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md:26\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md:40\n#, fuzzy\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Usa la parola chiave `pub` per rendere pubblici i moduli.\"\n\n#: src/modules/visibility.md:42\n#, fuzzy\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"Inoltre, ci sono specificatori avanzati `pub(...)` per restringere l'ambito \"\n\"della visibilità pubblica.\"\n\n#: src/modules/visibility.md:45\n#, fuzzy\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Vedere il [riferimento Rust](https://doc.rust-lang.org/reference/visibility-\"\n\"and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md:47\n#, fuzzy\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\"La configurazione della visibilità di `pub(crate)` è un modello comune.\"\n\n#: src/modules/visibility.md:48\n#, fuzzy\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"Meno comunemente, puoi dare visibilità a un percorso specifico.\"\n\n#: src/modules/visibility.md:49\n#, fuzzy\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"In ogni caso, la visibilità deve essere concessa a un modulo predecessore \"\n\"(ea tutti i suoi discendenti).\"\n\n#: src/modules/paths.md:1\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md:3\n#, fuzzy\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"Un modulo può portare i simboli di un altro modulo nell'ambito con `use`. In \"\n\"genere vedrai qualcosa di simile nella parte superiore di ogni modulo:\"\n\n#: src/modules/paths.md:11\nmsgid \"Paths\"\nmsgstr \"Percorsi (Paths)\"\n\n#: src/modules/paths.md:13\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"I percorsi sono risolti come segue:\"\n\n#: src/modules/paths.md:15\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"Come percorso relativo:\"\n\n#: src/modules/paths.md:16\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` o `self::foo` si riferisce a `foo` nel modulo corrente,\"\n\n#: src/modules/paths.md:17\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` fa riferimento a `foo` nel modulo genitore.\"\n\n#: src/modules/paths.md:19\n#, fuzzy\nmsgid \"As an absolute path:\"\nmsgstr \"Come percorso assoluto:\"\n\n#: src/modules/paths.md:20\n#, fuzzy\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` fa riferimento a `foo` nella radice del crate corrente,\"\n\n#: src/modules/paths.md:21\n#, fuzzy\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` si riferisce a `foo` nella cassa `bar`.\"\n\n#: src/modules/paths.md:26\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md:36\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md:39\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md:45\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:3\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:7\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:10\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Setup\"\n\n#: src/modules/exercise.md:12\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:21\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:24\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:26\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:30 src/modules/solution.md:36\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:33 src/modules/solution.md:39\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:36 src/modules/solution.md:42\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:40 src/modules/solution.md:46\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:88\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:100\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:102 src/modules/exercise.md:108\n#: src/modules/solution.md:165 src/modules/solution.md:171\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:102 src/modules/exercise.md:104\n#: src/modules/exercise.md:108 src/modules/exercise.md:122\n#: src/modules/exercise.md:126 src/modules/solution.md:110\n#: src/modules/solution.md:114 src/modules/solution.md:165\n#: src/modules/solution.md:167 src/modules/solution.md:171\n#: src/testing/unit-tests.md:27 src/testing/solution.md:89\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:103 src/modules/solution.md:166\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:104 src/modules/solution.md:167\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:106 src/modules/solution.md:169\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:114 src/modules/solution.md:100\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:122 src/modules/exercise.md:126\n#: src/modules/solution.md:110 src/modules/solution.md:114\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:124 src/modules/solution.md:112\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:141 src/modules/solution.md:183\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:142 src/modules/solution.md:185\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:143 src/modules/solution.md:186\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md:151\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md:30\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:56\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:71\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:75\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:77\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:84\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:99\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:103\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:105\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:120\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:147\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:152\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:154\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:162\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md:177\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md:4\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:5\nmsgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:6\nmsgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:7\nmsgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:8\nmsgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:9\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md:10\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md:1\nmsgid \"Unit Tests\"\nmsgstr \"Test per unità\"\n\n#: src/testing/unit-tests.md:3\n#, fuzzy\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust e Cargo sono dotati di un semplice framework di unit test:\"\n\n#: src/testing/unit-tests.md:5\n#, fuzzy\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"I test unitari sono supportati in tutto il codice.\"\n\n#: src/testing/unit-tests.md:7\n#, fuzzy\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"I test di integrazione sono supportati tramite la directory `tests/`.\"\n\n#: src/testing/unit-tests.md:9\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md:37\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/testing/unit-tests.md:42\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Questo ti consente di testare unitamente gli aiutanti privati.\"\n\n#: src/testing/unit-tests.md:43\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"L'attributo `#[cfg(test)]` è attivo solo quando esegui `cargo test`.\"\n\n#: src/testing/unit-tests.md:48\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md:3\nmsgid \"Integration Tests\"\nmsgstr \"Test di integrazione\"\n\n#: src/testing/other.md:5\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Se desideri testare la tua libreria come client, utilizza un test di \"\n\"integrazione.\"\n\n#: src/testing/other.md:7\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Crea un file `.rs` in `tests/`:\"\n\n#: src/testing/other.md:10\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md:19\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Questi test hanno accesso solo all'API pubblica del tuo crate.\"\n\n#: src/testing/other.md:21\nmsgid \"Documentation Tests\"\nmsgstr \"Test nella documentazione\"\n\n#: src/testing/other.md:23\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust ha il supporto integrato per i test di documentazione:\"\n\n#: src/testing/other.md:26\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md:38\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"I blocchi di codice nei commenti `///` sono visti automaticamente come \"\n\"codice Rust.\"\n\n#: src/testing/other.md:39\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Il codice verrà compilato ed eseguito come parte di `cargo test`.\"\n\n#: src/testing/other.md:40\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md:42\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Prova il codice precedente su [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/useful-crates.md:3\n#, fuzzy\nmsgid \"Rust comes with only basic support for writing tests.\"\nmsgstr \"Rust ha il supporto integrato per i test di documentazione:\"\n\n#: src/testing/useful-crates.md:5\nmsgid \"Here are some additional crates which we recommend for writing tests:\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md:7\nmsgid \"\"\n\"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n\"library in the tradition of GoogleTest for C++.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md:9\nmsgid \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md:10\nmsgid \"\"\n\"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n\"tests.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:3\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:11\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:12\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:16\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:37\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:41\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:44\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:46\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings strings \"\n\"are shown as a diff:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:52\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:57\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:64\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:81\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md:86\nmsgid \"GoogleTest is available for use in AOSP.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:3\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:27\nmsgid \"\"\n\"The advice here is for Android (AOSP) where Mockall is the recommended \"\n\"mocking library. There are other [mocking libraries available on crates.io]\"\n\"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP \"\n\"services. The other mocking libraries work in a similar fashion as Mockall, \"\n\"meaning that they make it easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:34\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:39\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:44\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:48\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:52\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md:70\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/testing/lints.md:3\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md:14\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md:21\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md:25\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md:29\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:3\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algoritmo di Luhn\"\n\n#: src/testing/exercise.md:5\n#, fuzzy\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"L'[algoritmo di Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) viene \"\n\"utilizzato per convalidare i numeri di carta di credito. L'algoritmo prende \"\n\"una stringa come input e fa il seguente per convalidare il numero della \"\n\"carta di credito:\"\n\n#: src/testing/exercise.md:9\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with less than two digits.\"\nmsgstr \"Ignora tutti gli spazi. Rifiuta il numero con meno di due cifre.\"\n\n#: src/testing/exercise.md:11\n#, fuzzy\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"Spostandoti da destra a sinistra, raddoppia ogni seconda cifra: per il \"\n\"numero `1234`, raddoppiamo \\\"3\\\" e \\\"1\\\".\"\n\n#: src/testing/exercise.md:14\n#, fuzzy\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Dopo aver raddoppiato una cifra, somma le cifre. Quindi raddoppiando \\\"7\\\" \"\n\"diventa \\\"14\\\" which diventa \\\"5\\\".\"\n\n#: src/testing/exercise.md:17\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Somma tutte le cifre non raddoppiate e raddoppiate.\"\n\n#: src/testing/exercise.md:19\n#, fuzzy\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"Il numero della carta di credito è valido se la somma termina con `0`.\"\n\n#: src/testing/exercise.md:21\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:25\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Copia il codice qui sotto in <https://play.rust-lang.org/> e inserisci \"\n\"quello mancante funzioni e metodi:\"\n\n#: src/testing/exercise.md:57 src/testing/solution.md:69\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:58 src/testing/solution.md:70\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:59 src/testing/solution.md:71\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:64 src/testing/solution.md:76\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:65 src/testing/solution.md:77\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md:66 src/testing/solution.md:78\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:4\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md:27\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md:56\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:58\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:59\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:59\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:84\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:90\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:91\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:92\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:97\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md:102\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md:4\nmsgid \"[Error Handling](./error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md:5\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md:7\nmsgid \"Including 10 minute breaks, this session should take about 2 hours\"\nmsgstr \"\"\n\n#: src/error-handling.md:4\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md:5\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md:6\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md:7\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md:8\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md:9\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:3\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:5\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Rust attiverà un panico se si verifica un errore fatale in fase di \"\n\"esecuzione:\"\n\n#: src/error-handling/panics.md:10\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:14\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"I panico sono per errori irrecuperabili e imprevisti.\"\n\n#: src/error-handling/panics.md:15\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"I panici sono sintomi di bug nel programma.\"\n\n#: src/error-handling/panics.md:16\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:17\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:18\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:19\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:21\n#, fuzzy\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"Usa API senza panico (come `Vec::get`) se il crash non è accettabile.\"\n\n#: src/error-handling/panics.md:26\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"Per impostazione predefinita, un panico causerà lo srotolamento dello stack. \"\n\"Lo svolgimento può essere catturato:\"\n\n#: src/error-handling/panics.md:32\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:33 src/error-handling/panics.md:38\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:36\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:42\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md:44\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Questo può essere utile nei server che dovrebbero continuare a funzionare \"\n\"anche se un singolo la richiesta va in crash.\"\n\n#: src/error-handling/panics.md:46\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Questo non funziona se `panic = 'abort'` è impostato nel tuo `Cargo.toml`.\"\n\n#: src/error-handling/try.md:3\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md:15\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"nel molto più semplice\"\n\n#: src/error-handling/try.md:21\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Possiamo usarlo per semplificare il nostro codice di gestione degli errori:\"\n\n#: src/error-handling/try.md:42\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md:43 src/error-handling/try-conversions.md:65\n#: src/error-handling/thiserror-and-anyhow.md:36\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md:44 src/error-handling/try-conversions.md:66\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md:51\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md:55\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"La variabile `username` può essere `Ok(string)` o `Err(error)`.\"\n\n#: src/error-handling/try.md:56\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Usa la chiamata `fs::write` per testare i diversi scenari: nessun file, file \"\n\"vuoto, file con nome utente.\"\n\n#: src/error-handling/try.md:58\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process:Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:3\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"L'effettiva espansione di `?` è un po' più complicata di quanto \"\n\"precedentemente indicato:\"\n\n#: src/error-handling/try-conversions.md:10\nmsgid \"works the same as\"\nmsgstr \"funziona allo stesso modo di\"\n\n#: src/error-handling/try-conversions.md:19\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"La chiamata `From::from` qui significa che tentiamo di convertire il tipo di \"\n\"errore in tipo restituito dalla funzione:\"\n\n#: src/error-handling/try-conversions.md:42\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:43\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:64\n#: src/error-handling/thiserror-and-anyhow.md:35\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:73\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:79\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:82\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md:86\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:1\nmsgid \"Dynamic Error Types\"\nmsgstr \"Tipi di errori dinamici\"\n\n#: src/error-handling/error.md:3\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"A volte vogliamo consentire la restituzione di qualsiasi tipo di errore \"\n\"senza scrivere la nostra copertura enum tutte le diverse possibilità. `std::\"\n\"error::Error` lo rende facile.\"\n\n#: src/error-handling/error.md:20 src/error-handling/error.md:21\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:20\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:22\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:23\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:31\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md:34\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Ciò consente di risparmiare sul codice, ma rinuncia alla possibilità di \"\n\"gestire in modo pulito diversi casi di errore in modo diverso il programma. \"\n\"Pertanto, generalmente non è una buona idea utilizzare `Box<dyn Error>` \"\n\"nell'API pubblica di a library, ma può essere una buona opzione in un \"\n\"programma in cui si desidera solo visualizzare il messaggio di errore in \"\n\"qualche luogo.\"\n\n#: src/error-handling/error.md:40\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:3\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Il crate [thiserror](https://docs.rs/thiserror/) è un modo popolare per \"\n\"creare un error enum come abbiamo fatto nella pagina precedente:\"\n\n#: src/error-handling/thiserror-and-anyhow.md:7\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:9\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:19\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:25\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:27\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:37\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:38\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:46\n#, fuzzy\nmsgid \"`thiserror`\"\nmsgstr \"`Errore`\"\n\n#: src/error-handling/thiserror-and-anyhow.md:48\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:50\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:51\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:53\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md:55\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` è essenzialmente un wrapper attorno a `Box<dyn Error>`. In \"\n\"quanto tale, generalmente non lo è una buona scelta per l'API pubblica di \"\n\"una libreria, ma è ampiamente utilizzata nelle applicazioni.\"\n\n#: src/error-handling/thiserror-and-anyhow.md:58\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`comunque::Risultato<V>` è un alias di tipo per `Risultato<V, comunque::\"\n\"Errore>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md:59\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"Il tipo di errore effettivo all'interno di esso può essere estratto per \"\n\"l'esame, se necessario.\"\n\n#: src/error-handling/thiserror-and-anyhow.md:60\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"La funzionalità fornita da `anyhow::Result<T>` potrebbe essere familiare \"\n\"agli sviluppatori Go, in quanto fornisce modelli di utilizzo ed ergonomia \"\n\"simili a `(T, errore)` di Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md:63\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:1\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:3\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:8\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:15 src/error-handling/solution.md:9\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:22 src/error-handling/solution.md:16\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:30 src/error-handling/solution.md:24\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:34 src/error-handling/solution.md:28\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:36 src/error-handling/solution.md:30\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:38 src/error-handling/solution.md:32\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:62 src/error-handling/exercise.md:64\n#: src/error-handling/solution.md:62 src/error-handling/solution.md:64\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:64 src/error-handling/solution.md:64\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:70 src/error-handling/solution.md:70\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:71 src/error-handling/solution.md:71\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:72\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:82 src/error-handling/solution.md:81\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:86\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:90 src/error-handling/exercise.md:100\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:92 src/error-handling/solution.md:104\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:108 src/error-handling/solution.md:121\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md:109 src/error-handling/solution.md:122\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md:42\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md:79\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md:83\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md:85\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:4\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:5\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:6\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:7\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:8\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:9\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md:10\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md:3\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Il linguaggio Rust ha due parti:\"\n\n#: src/unsafe-rust/unsafe.md:5\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**Safe Rust:** memoria sicura, nessun comportamento indefinito possibile.\"\n\n#: src/unsafe-rust/unsafe.md:6\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Unsafe Rust:** può attivare un comportamento indefinito se vengono violate \"\n\"le precondizioni.\"\n\n#: src/unsafe-rust/unsafe.md:8\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"Vedremo Rust per lo più sicuro in questo corso, ma è importante saperlo \"\n\"cos'è Unsafe Rust.\"\n\n#: src/unsafe-rust/unsafe.md:11\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Il codice non sicuro è solitamente piccolo e isolato e la sua correttezza \"\n\"dovrebbe essere attentamente documentato. Di solito è racchiuso in uno \"\n\"strato di astrazione sicuro.\"\n\n#: src/unsafe-rust/unsafe.md:14\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Unsafe Rust ti dà accesso a cinque nuove funzionalità:\"\n\n#: src/unsafe-rust/unsafe.md:16\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Dereferenzia i puntatori grezzi.\"\n\n#: src/unsafe-rust/unsafe.md:17\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Accedi o modifica variabili statiche mutabili.\"\n\n#: src/unsafe-rust/unsafe.md:18\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Accedi ai campi `union`.\"\n\n#: src/unsafe-rust/unsafe.md:19\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"Richiama funzioni `non sicure`, comprese le funzioni `extern`.\"\n\n#: src/unsafe-rust/unsafe.md:20\n#, fuzzy\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementa i tratti \\\"non sicuri\\\".\"\n\n#: src/unsafe-rust/unsafe.md:22\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"Tratteremo brevemente le capacità non sicure in seguito. Per tutti i \"\n\"dettagli, vedere [Capitolo 19.1 nel Rust Book](https://doc.rust-lang.org/\"\n\"book/ch19-01-unsafe-rust.html) e il [Rustonomicon](https://doc.rust-lang.org/\"\n\"nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md:29\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Unsafe Rust non significa che il codice non sia corretto. Significa che gli \"\n\"sviluppatori hanno ha disattivato le funzionalità di sicurezza del \"\n\"compilatore e deve scrivere il codice corretto loro stessi. Significa che il \"\n\"compilatore non applica più le regole di sicurezza della memoria di Rust.\"\n\n#: src/unsafe-rust/dereferencing.md:3\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"La creazione di puntatori è sicura, ma la loro dereferenziazione richiede \"\n\"`unsafe`:\"\n\n#: src/unsafe-rust/dereferencing.md:7\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:12\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:18\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:19\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:20\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:23\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md:35\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"È buona norma (e richiesto dalla guida allo stile di Android Rust) scrivere \"\n\"un commento per ciascuno Blocco `unsafe` che spiega come il codice al suo \"\n\"interno soddisfi i requisiti di sicurezza dell'unsafe operazioni che sta \"\n\"compiendo.\"\n\n#: src/unsafe-rust/dereferencing.md:39\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"Nel caso di dereferenze puntatore, ciò significa che i puntatori devono \"\n\"essere [_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), \"\n\"ovvero:\"\n\n#: src/unsafe-rust/dereferencing.md:42\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Il puntatore deve essere diverso da null.\"\n\n#: src/unsafe-rust/dereferencing.md:43\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Il puntatore deve essere _dereferenceable_ (entro i limiti di un singolo \"\n\"oggetto allocato).\"\n\n#: src/unsafe-rust/dereferencing.md:45\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"L'oggetto non deve essere stato deallocato.\"\n\n#: src/unsafe-rust/dereferencing.md:46\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Non devono esserci accessi contemporanei alla stessa posizione.\"\n\n#: src/unsafe-rust/dereferencing.md:47\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Se il puntatore è stato ottenuto lanciando un riferimento, l'oggetto \"\n\"sottostante deve essere live e no riferimento può essere utilizzato per \"\n\"accedere alla memoria.\"\n\n#: src/unsafe-rust/dereferencing.md:50\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"Nella maggior parte dei casi anche il puntatore deve essere correttamente \"\n\"allineato.\"\n\n#: src/unsafe-rust/dereferencing.md:52\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md:3\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"È sicuro leggere una variabile statica immutabile:\"\n\n#: src/unsafe-rust/mutable-static.md:6\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/unsafe-rust/mutable-static.md:9\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md:13\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Tuttavia, poiché possono verificarsi corse di dati, non è sicuro leggere e \"\n\"scrivere mutabili variabili statiche:\"\n\n#: src/unsafe-rust/mutable-static.md:29\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md:37\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md:42\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"L'uso di una statica mutabile è generalmente una cattiva idea, ma ci sono \"\n\"alcuni casi in cui potrebbe avere senso nel codice `no_std` di basso \"\n\"livello, come implementare un allocatore di heap o lavorare con alcune API C.\"\n\n#: src/unsafe-rust/unions.md:3\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Le unioni sono come le enum, ma devi monitorare tu stesso il campo attivo:\"\n\n#: src/unsafe-rust/unions.md:14\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md:15\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md:15\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Nessun comportamento indefinito in fase di esecuzione:\"\n\n#: src/unsafe-rust/unions.md:22\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Le unioni sono molto raramente necessarie in Rust poiché di solito puoi \"\n\"usare un enum. Occasionalmente sono necessari per interagire con le API \"\n\"della libreria C.\"\n\n#: src/unsafe-rust/unions.md:25\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Se vuoi solo reinterpretare i byte come un tipo diverso, probabilmente lo \"\n\"vuoi [`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) o una cassaforte wrapper come la cassa [`zerocopy`](https://\"\n\"crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md:3 src/unsafe-rust/unsafe-functions.md:75\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Chiamare Funzioni Unsafe\"\n\n#: src/unsafe-rust/unsafe-functions.md:5\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Una funzione o un metodo può essere contrassegnato come \\\"non sicuro\\\" se ha \"\n\"precondizioni aggiuntive deve sostenere per evitare comportamenti indefiniti:\"\n\n#: src/unsafe-rust/unsafe-functions.md:9 src/unsafe-rust/exercise.md:91\n#: src/unsafe-rust/solution.md:41 src/android/interoperability/with-c.md:9\n#: src/android/interoperability/with-c/rust.md:15\n#: src/android/interoperability/with-c/rust.md:30\n#: src/android/interoperability/cpp/cpp-bridge.md:29\n#: src/android/interoperability/cpp/cpp-bridge.md:38\n#: src/exercises/chromium/build-rules.md:8\n#: src/exercises/chromium/build-rules.md:21\n#: src/bare-metal/aps/inline-assembly.md:19\n#: src/bare-metal/aps/better-uart/using.md:24\n#: src/bare-metal/aps/logging/using.md:23 src/exercises/bare-metal/rtc.md:49\n#: src/exercises/bare-metal/rtc.md:104 src/exercises/bare-metal/rtc.md:110\n#: src/exercises/bare-metal/rtc.md:118 src/exercises/bare-metal/rtc.md:124\n#: src/exercises/bare-metal/rtc.md:130 src/exercises/bare-metal/rtc.md:136\n#: src/exercises/bare-metal/rtc.md:142 src/exercises/bare-metal/rtc.md:148\n#: src/exercises/bare-metal/solutions-afternoon.md:43\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:14\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:16\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:19\n#: src/unsafe-rust/unsafe-functions.md:20\n#: src/unsafe-rust/unsafe-functions.md:21\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:24\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:27\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"Nessun comportamento indefinito in fase di esecuzione:\"\n\n#: src/unsafe-rust/unsafe-functions.md:28\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:31\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:42\n#: src/unsafe-rust/unsafe-functions.md:87\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Creare Funzioni Unsafe\"\n\n#: src/unsafe-rust/unsafe-functions.md:44\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Puoi contrassegnare le tue funzioni come \\\"non sicure\\\" se richiedono \"\n\"condizioni particolari per evitare undefined comportamento.\"\n\n#: src/unsafe-rust/unsafe-functions.md:48\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:63\nmsgid \"// Safe because ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:68\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:77\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Questo di solito è solo un problema per le funzioni esterne che fanno cose \"\n\"con i puntatori che potrebbero violare il modello di memoria di Rust, ma in \"\n\"generale qualsiasi funzione C potrebbe avere un comportamento indefinito \"\n\"sotto qualsiasi circostanze arbitrarie.\"\n\n#: src/unsafe-rust/unsafe-functions.md:84\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md:89\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"In realtà non useremmo i puntatori per questo perché può essere fatto in \"\n\"sicurezza con i riferimenti.\"\n\n#: src/unsafe-rust/unsafe-functions.md:92\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Si noti che il codice non sicuro è consentito all'interno di una funzione \"\n\"non sicura senza un blocco `unsafe`. Noi possiamo proibiscilo con \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Prova ad aggiungerlo e guarda cosa \"\n\"succede.\"\n\n#: src/unsafe-rust/unsafe-traits.md:1\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Implementare Unsafe Traits\"\n\n#: src/unsafe-rust/unsafe-traits.md:3\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Come con le funzioni, puoi contrassegnare un tratto come \\\"non sicuro\\\" se \"\n\"l'implementazione deve garantire condizioni particolari per evitare \"\n\"comportamenti indefiniti.\"\n\n#: src/unsafe-rust/unsafe-traits.md:6\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Ad esempio, la cassa \\\"zerocopy\\\" ha un tratto non sicuro che sembra \"\n\"[qualcosa del genere](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.\"\n\"html):\"\n\n#: src/unsafe-rust/unsafe-traits.md:12\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md:26\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md:34\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Dovrebbe esserci una sezione `# Safety` su Rustdoc per il tratto che spiega \"\n\"i requisiti per il tratto da implementare in modo sicuro.\"\n\n#: src/unsafe-rust/unsafe-traits.md:37\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"L'attuale sezione sulla sicurezza per `AsBytes` è piuttosto lunga e \"\n\"complicata.\"\n\n#: src/unsafe-rust/unsafe-traits.md:39\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"I tratti incorporati \\\"Invia\\\" e \\\"Sincronizza\\\" non sono sicuri.\"\n\n#: src/unsafe-rust/exercise.md:1\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Safe FFI Wrapper\"\n\n#: src/unsafe-rust/exercise.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust ha un ottimo supporto per le funzioni di chiamata attraverso una \"\n\"funzione _foreign interfaccia_ (FFI). Lo useremo per costruire un wrapper \"\n\"sicuro per `libc` funzioni che useresti da C per leggere i nomi dei file di \"\n\"una directory.\"\n\n#: src/unsafe-rust/exercise.md:7\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Ti consigliamo di consultare le pagine di manuale:\"\n\n#: src/unsafe-rust/exercise.md:9\n#, fuzzy\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md:10\n#, fuzzy\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md:11\n#, fuzzy\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md:13\n#, fuzzy\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"Dovrai anche sfogliare il modulo [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/). Lì trovi un numero di tipi di stringa necessari per l'esercizio:\"\n\n#: src/unsafe-rust/exercise.md:16\n#, fuzzy\nmsgid \"Encoding\"\nmsgstr \"Codifica\"\n\n#: src/unsafe-rust/exercise.md:16\n#, fuzzy\nmsgid \"Use\"\nmsgstr \"Usa\"\n\n#: src/unsafe-rust/exercise.md:18\n#, fuzzy\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) e [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md:18\n#, fuzzy\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md:18\n#, fuzzy\nmsgid \"Text processing in Rust\"\nmsgstr \"Elaborazione del testo in Rust\"\n\n#: src/unsafe-rust/exercise.md:19\n#, fuzzy\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) e [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md:19\n#, fuzzy\nmsgid \"NUL-terminated\"\nmsgstr \"con terminazione NUL\"\n\n#: src/unsafe-rust/exercise.md:19\n#, fuzzy\nmsgid \"Communicating with C functions\"\nmsgstr \"Comunicare con le funzioni C\"\n\n#: src/unsafe-rust/exercise.md:20\n#, fuzzy\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) e [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md:20\n#, fuzzy\nmsgid \"OS-specific\"\nmsgstr \"specifico del sistema operativo\"\n\n#: src/unsafe-rust/exercise.md:20\n#, fuzzy\nmsgid \"Communicating with the OS\"\nmsgstr \"Comunicazione con il sistema operativo\"\n\n#: src/unsafe-rust/exercise.md:22\n#, fuzzy\nmsgid \"You will convert between all these types:\"\nmsgstr \"Potrai convertire tra tutti questi tipi:\"\n\n#: src/unsafe-rust/exercise.md:24\n#, fuzzy\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"Da `&str` a `CString`: è necessario allocare spazio per un carattere finale \"\n\"`\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md:25\n#, fuzzy\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\"Da `CString` a `*const i8`: è necessario un puntatore per chiamare le \"\n\"funzioni C,\"\n\n#: src/unsafe-rust/exercise.md:26\n#, fuzzy\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"Da `*const i8` a `&CStr`: hai bisogno di qualcosa che possa trovare il \"\n\"carattere finale `\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md:28\n#, fuzzy\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"da `&CStr` a `&[u8]`: una fetta di byte è l'interfaccia universale per \"\n\"\\\"alcuni dati sconosciuti\\\",\"\n\n#: src/unsafe-rust/exercise.md:30\n#, fuzzy\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"Da `&[u8]` a `&OsStr`: `&OsStr` è un passo verso `OsString`, usa [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) per crearlo,\"\n\n#: src/unsafe-rust/exercise.md:33\n#, fuzzy\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr` a `OsString`: è necessario clonare i dati in `&OsStr` per poterlo \"\n\"restituire e chiamare `readdir` di nuovo.\"\n\n#: src/unsafe-rust/exercise.md:36\n#, fuzzy\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"Il [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) ha anche un \"\n\"capitolo molto utile su FFI.\"\n\n#: src/unsafe-rust/exercise.md:47\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Copia il codice qui sotto in <https://play.rust-lang.org/> e inserisci \"\n\"quello mancante funzioni e metodi:\"\n\n#: src/unsafe-rust/exercise.md:56 src/unsafe-rust/exercise.md:69\n#: src/unsafe-rust/exercise.md:80 src/unsafe-rust/exercise.md:94\n#: src/unsafe-rust/exercise.md:102 src/unsafe-rust/solution.md:6\n#: src/unsafe-rust/solution.md:19 src/unsafe-rust/solution.md:30\n#: src/unsafe-rust/solution.md:44 src/unsafe-rust/solution.md:52\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:59 src/unsafe-rust/solution.md:9\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:66 src/unsafe-rust/solution.md:16\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:79 src/unsafe-rust/solution.md:29\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:94 src/unsafe-rust/exercise.md:102\n#: src/unsafe-rust/solution.md:44 src/unsafe-rust/solution.md:52\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:97 src/unsafe-rust/solution.md:47\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:103 src/unsafe-rust/solution.md:53\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:121 src/unsafe-rust/solution.md:71\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:130\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:137 src/unsafe-rust/solution.md:105\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:143 src/unsafe-rust/solution.md:116\n#: src/unsafe-rust/solution.md:140 src/unsafe-rust/solution.md:155\n#: src/android/interoperability/with-c/rust.md:44\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md:144 src/unsafe-rust/solution.md:117\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:74\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:75\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:78\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:88\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:92\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:95\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:107\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:109\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:128\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:136 src/unsafe-rust/solution.md:151\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:140 src/unsafe-rust/solution.md:155\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:147 src/unsafe-rust/solution.md:155\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:147\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:148 src/unsafe-rust/solution.md:155\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:148\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:149 src/unsafe-rust/solution.md:155\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md:149\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md:1\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Benvenuto a Rust in Android\"\n\n#: src/android.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust è supportato per lo sviluppo della piattaforma nativa su Android. Ciò \"\n\"significa che puoi scrivere nuovi servizi del sistema operativo in Rust, \"\n\"oltre ad estenderli servizi esistenti.\"\n\n#: src/android.md:7\n#, fuzzy\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Oggi tenteremo di chiamare Rust da uno dei tuoi progetti. Quindi prova a \"\n\"trova un piccolo angolo della tua base di codice in cui possiamo spostare \"\n\"alcune righe di codice Ruggine. Minori sono le dipendenze e i tipi \"\n\"\\\"esotici\\\", meglio è. Qualcosa che analizza alcuni byte grezzi sarebbe \"\n\"l'ideale.\"\n\n#: src/android.md:14\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md:17\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md:20\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md:23\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md:26\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md:3\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Useremo un dispositivo virtuale Android per testare il nostro codice. \"\n\"Assicurati di avere accedi a uno o creane uno nuovo con:\"\n\n#: src/android/setup.md:12\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Si prega di consultare il [Sviluppatore Android Codelab](https://source.\"\n\"android.com/docs/setup/start) per i dettagli.\"\n\n#: src/android/setup.md:20\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md:23\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:3\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Il sistema di compilazione Android (Soong) supporta Rust tramite una serie \"\n\"di moduli:\"\n\n#: src/android/build-rules.md:5\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"Tipo di modulo\"\n\n#: src/android/build-rules.md:5\n#, fuzzy\nmsgid \"Description\"\nmsgstr \"Descrizione\"\n\n#: src/android/build-rules.md:7\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"`binario_ruggine`\"\n\n#: src/android/build-rules.md:7\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Produce un binario Rust.\"\n\n#: src/android/build-rules.md:8\n#, fuzzy\nmsgid \"`rust_library`\"\nmsgstr \"`libreria_ruggine`\"\n\n#: src/android/build-rules.md:8\n#, fuzzy\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Produce una libreria Rust e fornisce entrambe le varianti `rlib` e `dylib`.\"\n\n#: src/android/build-rules.md:9\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`ruggine_ffi`\"\n\n#: src/android/build-rules.md:9\n#, fuzzy\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Produce una libreria Rust C utilizzabile dai moduli `cc` e fornisce varianti \"\n\"sia statiche che condivise.\"\n\n#: src/android/build-rules.md:10\n#, fuzzy\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md:10\n#, fuzzy\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Produce una libreria Rust `proc-macro`. Questi sono analoghi ai plugin del \"\n\"compilatore.\"\n\n#: src/android/build-rules.md:11\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`test_ruggine`\"\n\n#: src/android/build-rules.md:11\n#, fuzzy\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Produce un file binario di test Rust che utilizza il cablaggio di test Rust \"\n\"standard.\"\n\n#: src/android/build-rules.md:12\n#, fuzzy\nmsgid \"`rust_fuzz`\"\nmsgstr \"`ruggine_fuzz`\"\n\n#: src/android/build-rules.md:12\n#, fuzzy\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Produce un binario fuzz di Rust sfruttando `libfuzzer`.\"\n\n#: src/android/build-rules.md:13\n#, fuzzy\nmsgid \"`rust_protobuf`\"\nmsgstr \"`protobuf_ruggine`\"\n\n#: src/android/build-rules.md:13\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Genera il codice sorgente e produce una libreria Rust che fornisce \"\n\"un'interfaccia per un particolare protobuf.\"\n\n#: src/android/build-rules.md:14\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`ruggine_bindgen`\"\n\n#: src/android/build-rules.md:14\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Genera il codice sorgente e produce una libreria Rust contenente \"\n\"collegamenti Rust alle librerie C.\"\n\n#: src/android/build-rules.md:16\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Vedremo successivamente `rust_binary` e `rust_library`.\"\n\n#: src/android/build-rules.md:20\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:22\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:25\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:28\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:31\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:37\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md:39\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md:1\n#, fuzzy\nmsgid \"Rust Binaries\"\nmsgstr \"Binari Rust\"\n\n#: src/android/build-rules/binary.md:3\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Iniziamo con una semplice applicazione. Alla radice di un checkout AOSP, \"\n\"create i seguenti file:\"\n\n#: src/android/build-rules/binary.md:6 src/android/build-rules/library.md:13\n#, fuzzy\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_ciao_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md:10 src/android/build-rules/binary.md:11\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md:12 src/android/build-rules/library.md:19\n#: src/android/logging.md:12\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"`src/principale.rs`:\"\n\n#: src/android/build-rules/binary.md:16 src/android/build-rules/library.md:34\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_ciao_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md:19 src/android/build-rules/library.md:37\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md:20 src/android/build-rules/library.md:41\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md:23 src/exercises/chromium/build-rules.md:9\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md:27\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Ora puoi creare, inviare ed eseguire il binario:\"\n\n#: src/android/build-rules/binary.md:29\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:1\n#, fuzzy\nmsgid \"Rust Libraries\"\nmsgstr \"Librerie ruggine\"\n\n#: src/android/build-rules/library.md:3\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"Usa `rust_library` per creare una nuova libreria Rust per Android.\"\n\n#: src/android/build-rules/library.md:5\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Qui dichiariamo una dipendenza da due librerie:\"\n\n#: src/android/build-rules/library.md:7\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, che definiamo di seguito,\"\n\n#: src/android/build-rules/library.md:8\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, che è una cassa già venduta [`external/rust/crates/`](https://\"\n\"cs.android.com/android/platform/superproject/+/master:external/rust/crates/).\"\n\n#: src/android/build-rules/library.md:17 src/android/build-rules/library.md:18\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:21 src/android/build-rules/library.md:28\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:22\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:24\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:29\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:30 src/android/aidl/implementation.md:29\n#: src/android/interoperability/java.md:39\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"`src/principale.rs`:\"\n\n#: src/android/build-rules/library.md:48\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_ciao_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md:51\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:52\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:55\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md:59\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Costruisci, spingi ed esegui il binario come prima:\"\n\n#: src/android/build-rules/library.md:61\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md:3\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Il [linguaggio di definizione dell'interfaccia Android (AIDL)](https://\"\n\"developer.android.com/guide/components/aidl) è supportato in Rust:\"\n\n#: src/android/aidl.md:8\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Il codice Rust può chiamare i server AIDL esistenti,\"\n\n#: src/android/aidl.md:9\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Puoi creare nuovi server AIDL in Rust.\"\n\n#: src/android/aidl/interface.md:1\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfacce AIDL\"\n\n#: src/android/aidl/interface.md:3\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Dichiari l'API del tuo servizio utilizzando un'interfaccia AIDL:\"\n\n#: src/android/aidl/interface.md:5\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md:9 src/android/aidl/changing.md:8\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md:12 src/android/aidl/changing.md:11\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md:17\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_servizio_compleanno/aidl/Android.bp_:\"\n\n#: src/android/aidl/interface.md:21\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md:22\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md:25\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md:32\n#, fuzzy\nmsgid \"\"\n\"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n\"vendor partition.\"\nmsgstr \"\"\n\"Aggiungi \\\"vendor_available: true\\\" se il tuo file AIDL è utilizzato da un \"\n\"file binario nel fornitore partizione.\"\n\n#: src/android/aidl/implementation.md:1\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Implementazione del servizio\"\n\n#: src/android/aidl/implementation.md:3\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Ora possiamo implementare il servizio AIDL:\"\n\n#: src/android/aidl/implementation.md:5\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_servizio_compleanno/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md:8\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md:11\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Implementazione del servizio\"\n\n#: src/android/aidl/implementation.md:19\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md:24 src/android/aidl/server.md:28\n#: src/android/aidl/client.md:36\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_servizio_compleanno/Android.bp_:\"\n\n#: src/android/aidl/implementation.md:28 src/android/aidl/server.md:38\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_servizio_compleanno/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md:30 src/android/aidl/server.md:13\n#: src/android/aidl/client.md:12\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_servizio_compleanno/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md:32 src/android/aidl/server.md:36\n#: src/android/aidl/client.md:44\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md:33 src/android/aidl/server.md:37\n#: src/android/aidl/client.md:45\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md:1\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"Server AIDL\"\n\n#: src/android/aidl/server.md:3\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Infine, possiamo creare un server che espone il servizio:\"\n\n#: src/android/aidl/server.md:5\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_servizio_compleanno/src/server.rs_:\"\n\n#: src/android/aidl/server.md:8 src/android/aidl/client.md:8\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md:14\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md:23\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md:32 src/android/aidl/server.md:33\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_servizio_compleanno/src/lib.rs_:\"\n\n#: src/android/aidl/server.md:34\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"`src/driver.rs`:\"\n\n#: src/android/aidl/server.md:40 src/android/aidl/client.md:47\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md:3\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Ora possiamo creare, inviare e avviare il servizio:\"\n\n#: src/android/aidl/deploy.md:5\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md:12\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"In un altro terminale, controlla che il servizio sia in esecuzione:\"\n\n#: src/android/aidl/deploy.md:22\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Puoi anche chiamare il servizio con `service call`:\"\n\n#: src/android/aidl/client.md:1\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"Cliente AIDL\"\n\n#: src/android/aidl/client.md:3\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"Infine, possiamo creare un client Rust per il nostro nuovo servizio.\"\n\n#: src/android/aidl/client.md:5\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_servizio_compleanno/src/client.rs_:\"\n\n#: src/android/aidl/client.md:13\nmsgid \"/// Connect to the BirthdayService.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md:19\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md:29\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md:31\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md:40 src/android/aidl/client.md:41\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_servizio_compleanno/src/client.rs_:\"\n\n#: src/android/aidl/client.md:42\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"`src/edificio.rs`:\"\n\n#: src/android/aidl/client.md:51\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Si noti che il client non dipende da `libbirthdayservice`.\"\n\n#: src/android/aidl/client.md:53\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Crea, invia ed esegui il client sul tuo dispositivo:\"\n\n#: src/android/aidl/client.md:55\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/changing.md:3\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Estendiamo l'API con più funzionalità: vogliamo consentire ai client di \"\n\"specificare a elenco delle righe per il biglietto d'auguri:\"\n\n#: src/android/logging.md:3\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Dovresti usare la cassa `log` per accedere automaticamente a `logcat` (sul \"\n\"dispositivo) o `stdout` (sull'host):\"\n\n#: src/android/logging.md:6\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_ciao_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md:10 src/android/logging.md:11\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"_ciao_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md:14\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:15\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:21\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_ciao_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md:24\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md:27\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md:32\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:35\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:36\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:37\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md:41 src/android/interoperability/with-c/bindgen.md:96\n#: src/android/interoperability/with-c/rust.md:72\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Crea, invia ed esegui il file binario sul tuo dispositivo:\"\n\n#: src/android/logging.md:43\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md:49\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"I log vengono visualizzati in `adb logcat`:\"\n\n#: src/android/interoperability.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust ha un eccellente supporto per l'interoperabilità con altri linguaggi. \"\n\"Questo significa che tu puoi:\"\n\n#: src/android/interoperability.md:6\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Richiama le funzioni di Rust da altre lingue.\"\n\n#: src/android/interoperability.md:7\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Funzioni di chiamata scritte in altri linguaggi da Rust.\"\n\n#: src/android/interoperability.md:9\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Quando chiami funzioni in una lingua straniera diciamo che stai usando a \"\n\"_interfaccia funzione straniera_, nota anche come FFI.\"\n\n#: src/android/interoperability/with-c.md:1\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperabilità con C\"\n\n#: src/android/interoperability/with-c.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust ha il pieno supporto per il collegamento di file oggetto con una \"\n\"convenzione di chiamata C. Allo stesso modo, puoi esportare le funzioni di \"\n\"Rust e chiamarle da C.\"\n\n#: src/android/interoperability/with-c.md:6\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Puoi farlo a mano se vuoi:\"\n\n#: src/android/interoperability/with-c.md:16\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md:20\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Lo abbiamo già visto nel [Safe FFI Wrapper esercizio](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md:23\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Ciò presuppone la piena conoscenza della piattaforma di destinazione. Non \"\n\"consigliato per produzione.\"\n\n#: src/android/interoperability/with-c.md:26\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"Vedremo le opzioni migliori in seguito.\"\n\n#: src/android/interoperability/with-c/bindgen.md:1\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Utilizzo di Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md:3\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Lo strumento [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) può generare automaticamente collegamenti da un file di intestazione C.\"\n\n#: src/android/interoperability/with-c/bindgen.md:6\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Per prima cosa crea una piccola libreria C:\"\n\n#: src/android/interoperability/with-c/bindgen.md:8\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperabilità/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md:19\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperabilità/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md:22\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:23\n#: src/android/interoperability/with-c/bindgen.md:50\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:26\n#: src/android/interoperability/with-c/bindgen.md:29\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:27\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:28\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:33\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Aggiungi questo al tuo file `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md:35\n#: src/android/interoperability/with-c/bindgen.md:55\n#: src/android/interoperability/with-c/bindgen.md:69\n#: src/android/interoperability/with-c/bindgen.md:106\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperabilità/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md:39\n#: src/android/interoperability/with-c/bindgen.md:63\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:40\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:44\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Crea un file di intestazione wrapper per la libreria (non strettamente \"\n\"necessario in questo esempio):\"\n\n#: src/android/interoperability/with-c/bindgen.md:47\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperabilità/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md:53\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Ora puoi generare automaticamente le associazioni:\"\n\n#: src/android/interoperability/with-c/bindgen.md:59\n#: src/android/interoperability/with-c/bindgen.md:75\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:60\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"`ruggine_bindgen`\"\n\n#: src/android/interoperability/with-c/bindgen.md:61\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:62\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:67\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Infine, possiamo usare i binding nel nostro programma Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md:73\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:74\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"`principale.rs`:\"\n\n#: src/android/interoperability/with-c/bindgen.md:79\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperabilità/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md:82\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:89\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:98\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:104\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Infine, possiamo eseguire test generati automaticamente per garantire che i \"\n\"binding funzionino:\"\n\n#: src/android/interoperability/with-c/bindgen.md:110\n#: src/android/interoperability/with-c/bindgen.md:112\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:111\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:113\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:115\n#: src/android/interoperability/with-c/bindgen.md:116\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md:115\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:1\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Calling Rust\"\n\n#: src/android/interoperability/with-c/rust.md:3\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Esportare le funzioni e i tipi di Rust in C è facile:\"\n\n#: src/android/interoperability/with-c/rust.md:5\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperabilità/ruggine/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md:8\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:12\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:17\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:19\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:24\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperabilità/ruggine/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md:37\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperabilità/ruggine/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md:41\n#: src/android/interoperability/with-c/rust.md:68\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:42\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:43\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:48\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Ora possiamo chiamarlo da un binario C:\"\n\n#: src/android/interoperability/with-c/rust.md:50\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperabilità/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md:53\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:62\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperabilità/ruggine/analisi/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md:66\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:67\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:74\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md:82\n#, fuzzy\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` disabilita la solita alterazione del nome di Rust, quindi il \"\n\"simbolo esportato sarà solo il nome di la funzione. Puoi anche usare \"\n\"`#[export_name = \\\"some_name\\\"]` per specificare il nome che desideri.\"\n\n#: src/android/interoperability/cpp.md:3\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"Il [CXX crate](https://cxx.rs/) rende possibile l'interoperabilità sicura \"\n\"tra Rust e C++.\"\n\n#: src/android/interoperability/cpp.md:6\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"L'approccio generale è simile al seguente:\"\n\n#: src/android/interoperability/cpp/bridge.md:3\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:9\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:11\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:17\n#: src/android/interoperability/cpp/generated-cpp.md:6\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:18\n#: src/android/interoperability/cpp/rust-bridge.md:6\n#: src/android/interoperability/cpp/generated-cpp.md:7\n#: src/android/interoperability/cpp/rust-result.md:6\n#: src/chromium/interoperability-with-cpp/example-bindings.md:9\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:10\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:9\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"Rustdoc\"\n\n#: src/android/interoperability/cpp/bridge.md:24\n#: src/android/interoperability/cpp/cpp-bridge.md:6\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:25\n#: src/android/interoperability/cpp/cpp-bridge.md:7\n#: src/android/interoperability/cpp/cpp-exception.md:6\n#: src/chromium/interoperability-with-cpp/example-bindings.md:15\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:26\n#: src/android/interoperability/cpp/cpp-bridge.md:8\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:40\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:41\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:44\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md:47\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:1\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:7\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:8\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:9\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Funzioni\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:28\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md:30\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md:15\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:1\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:20\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:30\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:39\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:56\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md:59\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md:9\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md:23\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md:24\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md:15\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"Unsafe Rust\"\n\n#: src/android/interoperability/cpp/shared-enums.md:33\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md:46\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md:13\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md:16\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md:22\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md:24\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md:27\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md:7\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md:14\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md:22\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md:24\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:3\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Ruggine con l'esempio\"\n\n#: src/android/interoperability/cpp/type-mapping.md:3\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Esempio C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md:5\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`ruggine_bindgen`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:6\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:6\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`test_ruggine`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:7\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"Stringa (String)\"\n\n#: src/android/interoperability/cpp/type-mapping.md:7\n#, fuzzy\nmsgid \"`std::string`\"\nmsgstr \"Stringa (String)\"\n\n#: src/android/interoperability/cpp/type-mapping.md:8\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:8\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`ruggine_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:9\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:10\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:10\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:11\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:11\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Ricevitore<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:12\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Cella<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:12\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Ricevitore<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md:16\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:18\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:20\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:21\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md:23\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:1\n#: src/android/interoperability/cpp/android-cpp-genrules.md:1\n#: src/android/interoperability/cpp/android-build-rust.md:1\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Rust in Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:3\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:8\n#: src/android/interoperability/cpp/android-build-rust.md:10\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:9\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:11\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:12\n#: src/android/interoperability/cpp/android-cpp-genrules.md:10\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:14\n#: src/android/interoperability/cpp/android-cpp-genrules.md:19\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:20\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:23\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md:25\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:3\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:7\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:11\n#: src/android/interoperability/cpp/android-cpp-genrules.md:20\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:12\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:13\n#: src/android/interoperability/cpp/android-cpp-genrules.md:22\n#: src/android/interoperability/cpp/android-build-rust.md:8\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:14\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:16\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:21\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:23\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:29\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md:31\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md:3\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md:7\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md:9\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:1\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Interoperabilità con Java\"\n\n#: src/android/interoperability/java.md:3\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java può caricare oggetti condivisi tramite [Java Native Interface (JNI)]\"\n\"(https://en.wikipedia.org/wiki/Java_Native_Interface). Il [`jni` crate]\"\n\"(https://docs.rs/jni/) consente di creare una libreria compatibile.\"\n\n#: src/android/interoperability/java.md:8\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Innanzitutto, creiamo una funzione Rust da esportare in Java:\"\n\n#: src/android/interoperability/java.md:10\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperabilità/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md:13\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:18\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:21\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:27\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:33\n#: src/android/interoperability/java.md:63\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperabilità/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md:37\n#: src/android/interoperability/java.md:70\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:38\n#: src/android/interoperability/java.md:53\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:40\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:44\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Infine, possiamo chiamare questa funzione da Java:\"\n\n#: src/android/interoperability/java.md:46\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperabilità/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md:67\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md:68\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/android/interoperability/java.md:69\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/android/interoperability/java.md:74\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"Infine, puoi creare, sincronizzare ed eseguire il binario:\"\n\n#: src/exercises/android/morning.md:3\n#, fuzzy\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Questo è un esercizio di gruppo: esamineremo uno dei progetti con cui lavori \"\n\"e prova a integrarci un po' di ruggine. Alcuni suggerimenti:\"\n\n#: src/exercises/android/morning.md:6\n#, fuzzy\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Chiama il tuo servizio AIDL con un client scritto in Rust.\"\n\n#: src/exercises/android/morning.md:8\n#, fuzzy\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Sposta una funzione dal tuo progetto a Rust e chiamala.\"\n\n#: src/exercises/android/morning.md:12\n#, fuzzy\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Nessuna soluzione viene fornita qui poiché questo è a tempo indeterminato: \"\n\"si basa su qualcuno dentro la classe ha un pezzo di codice che puoi \"\n\"consegnare a Rust al volo.\"\n\n#: src/chromium.md:1\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Benvenuto a Rust in Android\"\n\n#: src/chromium.md:3\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md:6\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:3\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:13\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:16\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:21\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:23\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md:25\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:3\nmsgid \"\"\n\"Rust community typically uses `cargo` and libraries from [crates.io](https://\"\n\"crates.io/). Chromium is built using `gn` and `ninja` and a curated set of \"\n\"dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:6\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:8\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:11\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:13\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:16\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:20\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Esercizi\"\n\n#: src/chromium/cargo.md:22\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:24\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:26\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:31\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:35\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:38\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:44\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:46\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:49\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:56\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:57\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:59\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:61\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:66\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:71\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:72\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:74\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:75\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:77\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:80\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, by `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:84\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:87\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:90\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:92\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:93\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:95\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:96\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md:98\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:1\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:3\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:7\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:12\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:15\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:30\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:33\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:35\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:36\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md:38\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:1\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Regole (Rules) di Build\"\n\n#: src/chromium/build-rules.md:3\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:7\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:9\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:11\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:20\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:25\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:31\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md:34\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md:1\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md:3\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md:7\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md:3\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md:5\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:3\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:6\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:8\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:10\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:16\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:19\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:22\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:23\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:25\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:27\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:29\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:32\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md:35\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:1\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Regole (Rules) di Build\"\n\n#: src/exercises/chromium/build-rules.md:3\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:13\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:16\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:24\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:28\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:32\n#: src/exercises/chromium/interoperability-with-cpp.md:48\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:34\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:35\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:36\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:37\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:38\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:44\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:48\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md:52\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:3\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:17\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:22\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:24\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:26\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:29\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:35\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:39\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:42\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md:47\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md:3\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md:5\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md:7\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md:10\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Esempio\"\n\n#: src/chromium/testing/build-gn.md:3\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md:6\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md:14\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md:17\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md:3\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md:12\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md:18\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md:26\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md:31\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:1\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Esercizi\"\n\n#: src/exercises/chromium/testing.md:3\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:5\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:7\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:10\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:11\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md:12\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:3\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:6\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:12\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Vedere il [tutorial CXX](https://cxx.rs/tutorial.html) per un esempio \"\n\"completo di utilizzo di questo.\"\n\n#: src/chromium/interoperability-with-cpp.md:19\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:23\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:27\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:31\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:32\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:37\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md:41\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:3\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:16\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:24\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:30\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:32\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:36\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:37\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Supporto integrato per i test.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:38\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:39\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md:41\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:3\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:5\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:7\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:8\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:11\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:14\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:26\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:28\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:29\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:3\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:6\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:7\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:9\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:10\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:12\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:16\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:17\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md:19\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:1\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Gestione degli errori\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:3\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:8\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:23\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:27\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md:32\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:1\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Gestione degli errori\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:3\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:7\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:10\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:14\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:21\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:32\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md:37\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:1\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:3\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:7\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:13\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:16\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:19\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:22\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:27\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:29\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:36\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:1\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Interoperabilità con C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:3\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:5\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:8\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:10\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:11\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:13\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:15\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:17\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:20\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Alcune note:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:22\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:23\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:25\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:27\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:29\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:30\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:31\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:33\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:35\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:37\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:39\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:40\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:42\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:44\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:50\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:51\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:57\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:59\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md:62\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:3\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:6\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"Libreria (Library)\"\n\n#: src/chromium/adding-third-party-crates.md:6\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Ecosistema di Rust\"\n\n#: src/chromium/adding-third-party-crates.md:8\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Ecosistema di Rust\"\n\n#: src/chromium/adding-third-party-crates.md:8\n#: src/chromium/adding-third-party-crates.md:10\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:8\n#, fuzzy\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Puoi usare il seguente `Cargo.toml`:\"\n\n#: src/chromium/adding-third-party-crates.md:9\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:9\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:9\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:10\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:10\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:12\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:14\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:16\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:19\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:21\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:22\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md:23\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:1\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:3\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:6\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:14\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:18\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:3\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:6\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:15\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:15\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:22\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:25\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:3\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:6\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:13\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:17\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:19\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"Crates utili\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:20\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:21\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md:24\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:3\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:9\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:11\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:13\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:15\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:17\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Vedere il [riferimento Rust](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:19\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:23\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:3\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:8\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:10\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:10\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:10\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:12\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:12\n#: src/chromium/adding-third-party-crates/resolving-problems.md:13\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:13\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:14\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Generics\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:14\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:15\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:15\n#: src/chromium/adding-third-party-crates/resolving-problems.md:16\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:16\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md:18\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:3\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:6\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:11\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:17\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:3\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:8\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:10\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:11\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:13\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:3\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:7\n#, fuzzy\nmsgid \"Specifically,\"\nmsgstr \"specifico del sistema operativo\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:9\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:17\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:1\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:3\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:9\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:11\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:13\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:17\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:18\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:21\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:22\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:23\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md:27\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:1\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:3\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:5\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:6\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:9\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:11\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:14\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md:17\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md:3\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:3\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:7\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:13\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:15\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:17\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"Costante\"\n\n#: src/exercises/chromium/third-party.md:18\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:19\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:20\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:21\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:22\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:23\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:24\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:26\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md:29\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:1\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:3\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:6\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:8\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:11\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:13\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:17\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:19\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:22\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:24\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:28\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:36\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:39\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:42\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:49\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md:52\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md:3\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md:1\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Benvenuto in Bare Metal Rust\"\n\n#: src/bare-metal.md:3\n#, fuzzy\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Questo è un corso autonomo di un giorno sul bare metal Rust, rivolto a \"\n\"persone che hanno familiarità con il nozioni di base di Rust (forse \"\n\"completando il corso completo di Rust), e idealmente anche averne alcune \"\n\"esperienza con la programmazione bare metal in qualche altro linguaggio come \"\n\"C.\"\n\n#: src/bare-metal.md:8\n#, fuzzy\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Oggi parleremo di Rust 'bare-metal': eseguire il codice Rust senza un \"\n\"sistema operativo sotto di noi. Questo sarà essere suddiviso in più parti:\"\n\n#: src/bare-metal.md:11\n#, fuzzy\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"Cos'è \\\"no_std\\\" Rust?\"\n\n#: src/bare-metal.md:12\n#, fuzzy\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Scrittura firmware per microcontrollori.\"\n\n#: src/bare-metal.md:13\n#, fuzzy\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\"Scrittura del codice bootloader/kernel per i processori delle applicazioni.\"\n\n#: src/bare-metal.md:14\n#, fuzzy\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Alcune casse utili per lo sviluppo di ruggine a metallo nudo.\"\n\n#: src/bare-metal.md:16\n#, fuzzy\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"Per la parte del corso sui microcontrollori utilizzeremo la [BBC micro:bit]\"\n\"(https://microbit.org/) v2 come esempio. È una [scheda di sviluppo](https://\"\n\"tech.microbit.org/hardware/) basata sul Nordic microcontrollore nRF51822 con \"\n\"alcuni LED e pulsanti, un accelerometro e una bussola collegati a I2C e un \"\n\"debugger SWD integrato.\"\n\n#: src/bare-metal.md:22\n#, fuzzy\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Per iniziare, installa alcuni strumenti che ci serviranno in seguito. Su \"\n\"gLinux o Debian:\"\n\n#: src/bare-metal.md:34\n#, fuzzy\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"E dai agli utenti del gruppo `plugdev` l'accesso al programmatore micro:bit:\"\n\n#: src/bare-metal.md:44 src/bare-metal/microcontrollers/debugging.md:33\n#, fuzzy\nmsgid \"On MacOS:\"\nmsgstr \"Su macOS:\"\n\n#: src/bare-metal/no_std.md:7\n#, fuzzy\nmsgid \"`core`\"\nmsgstr \"`nucleo`\"\n\n#: src/bare-metal/no_std.md:17\n#, fuzzy\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md:24\n#, fuzzy\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Fette, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md:25\n#, fuzzy\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md:26\n#, fuzzy\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Opzione`, `Risultato`\"\n\n#: src/bare-metal/no_std.md:27\n#, fuzzy\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md:29\n#, fuzzy\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panico!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md:30\n#, fuzzy\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` e tutte le solite funzioni relative ai puntatori\"\n\n#: src/bare-metal/no_std.md:31\n#, fuzzy\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` e `async`/`await`\"\n\n#: src/bare-metal/no_std.md:32\n#, fuzzy\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md:33\n#, fuzzy\nmsgid \"`Duration`\"\nmsgstr \"`Durata`\"\n\n#: src/bare-metal/no_std.md:38\n#, fuzzy\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Scatola`, `Mucca`, `Arco`, `Rc`\"\n\n#: src/bare-metal/no_std.md:39\n#, fuzzy\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md:40\n#, fuzzy\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`Stringa`, `CStringa`, `formato!`\"\n\n#: src/bare-metal/no_std.md:45\n#, fuzzy\nmsgid \"`Error`\"\nmsgstr \"`Errore`\"\n\n#: src/bare-metal/no_std.md:47\n#, fuzzy\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md:48\n#, fuzzy\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` e il resto di `fs`\"\n\n#: src/bare-metal/no_std.md:49\n#, fuzzy\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` e il resto di `io`\"\n\n#: src/bare-metal/no_std.md:50\n#, fuzzy\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Percorso`, `OsString`\"\n\n#: src/bare-metal/no_std.md:51\n#, fuzzy\nmsgid \"`net`\"\nmsgstr \"`rete`\"\n\n#: src/bare-metal/no_std.md:52\n#, fuzzy\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Comando`, `Figlio`, `CodiceUscita`\"\n\n#: src/bare-metal/no_std.md:53\n#, fuzzy\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` e il resto di `thread`\"\n\n#: src/bare-metal/no_std.md:54\n#, fuzzy\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md:62\n#, fuzzy\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` dipende da RNG.\"\n\n#: src/bare-metal/no_std.md:63\n#, fuzzy\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` riesporta il contenuto sia di `core` che di `alloc`.\"\n\n#: src/bare-metal/minimal.md:1\n#, fuzzy\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Un programma `no_std` minimo\"\n\n#: src/bare-metal/minimal.md:19\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md:20\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md:21\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md:22\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md:24\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:3\n#, fuzzy\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Per usare `alloc` devi implementare a [allocatore globale (heap)](https://\"\n\"doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md:23\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:25\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:29\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:31\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"Stringa (String)\"\n\n#: src/bare-metal/alloc.md:37\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:40\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:42\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:45\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md:47\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md:3\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"Il crate `cortex_m_rt` fornisce (tra le altre cose) un gestore di reset per \"\n\"i microcontrollori Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md:24\n#, fuzzy\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"Successivamente vedremo come accedere alle periferiche, con livelli \"\n\"crescenti di astrazione.\"\n\n#: src/bare-metal/microcontrollers.md:29\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"La macro `cortex_m_rt::entry` richiede che la funzione abbia il tipo `fn() -\"\n\"> !`, perché restituisce al gestore di ripristino non ha senso.\"\n\n#: src/bare-metal/microcontrollers.md:31\n#, fuzzy\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Esegui l'esempio con `cargo embed --bin minimal`\"\n\n#: src/bare-metal/microcontrollers/mmio.md:3\n#, fuzzy\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"La maggior parte dei microcontrollori accede alle periferiche tramite IO \"\n\"mappato in memoria. Proviamo ad accendere un LED sul nostro micro:bit:\"\n\n#: src/bare-metal/microcontrollers/mmio.md:16\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:19\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:24\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:34\n#: src/bare-metal/microcontrollers/pacs.md:21\n#: src/bare-metal/microcontrollers/hals.md:26\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:37\n#: src/bare-metal/microcontrollers/mmio.md:59\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:56\n#: src/bare-metal/microcontrollers/pacs.md:39\n#: src/bare-metal/microcontrollers/hals.md:30\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md:72\n#, fuzzy\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"Il pin 21 di GPIO 0 è collegato alla prima colonna della matrice LED e il \"\n\"pin 28 alla prima riga.\"\n\n#: src/bare-metal/microcontrollers/mmio.md:75\n#: src/bare-metal/microcontrollers/pacs.md:61\n#: src/bare-metal/microcontrollers/hals.md:44\n#: src/bare-metal/microcontrollers/board-support.md:37\n#, fuzzy\nmsgid \"Run the example with:\"\nmsgstr \"Esegui l'esempio con:\"\n\n#: src/bare-metal/microcontrollers/pacs.md:1\n#, fuzzy\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Casse di accesso periferico\"\n\n#: src/bare-metal/microcontrollers/pacs.md:3\n#, fuzzy\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) genera wrapper Rust per lo \"\n\"più sicuri per periferiche mappate in memoria da [CMSIS-SVD](https://www.\"\n\"keil.com/pack/doc/CMSIS/SVD/html/index.html) File.\"\n\n#: src/bare-metal/microcontrollers/pacs.md:49\n#, fuzzy\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"I file SVD (System View Description) sono file XML generalmente forniti da \"\n\"fornitori di silicio che descrivere la mappa di memoria del dispositivo.\"\n\n#: src/bare-metal/microcontrollers/pacs.md:51\n#, fuzzy\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Sono organizzati per periferica, registro, campo e valore, con nomi, \"\n\"descrizioni, indirizzi e così via.\"\n\n#: src/bare-metal/microcontrollers/pacs.md:53\n#, fuzzy\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"I file SVD sono spesso difettosi e incompleti, quindi ci sono vari progetti \"\n\"che correggono il file errori, aggiungere i dettagli mancanti e pubblicare \"\n\"le casse generate.\"\n\n#: src/bare-metal/microcontrollers/pacs.md:56\n#, fuzzy\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` fornisce la tabella dei vettori, tra le altre cose.\"\n\n#: src/bare-metal/microcontrollers/pacs.md:57\n#, fuzzy\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Se `cargo installi cargo-binutils` allora puoi eseguire `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` per vedere il binario risultante.\"\n\n#: src/bare-metal/microcontrollers/hals.md:1\n#, fuzzy\nmsgid \"HAL crates\"\nmsgstr \"casse HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md:3\n#, fuzzy\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"[Casse HAL](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) per molti microcontrollori forniscono wrapper attorno \"\n\"a varie periferiche. Questi generalmente implementano i tratti da [`embedded-\"\n\"hal`](https://crates.io/crates/embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md:23\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md:40\n#, fuzzy\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low` e `set_high` sono metodi sul tratto `embedded_hal` `OutputPin`.\"\n\n#: src/bare-metal/microcontrollers/hals.md:41\n#, fuzzy\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Esistono casse HAL per molti dispositivi Cortex-M e RISC-V, inclusi vari \"\n\"STM32, GD32, nRF, NXP, Microcontrollori MSP430, AVR e PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md:1\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"Casse di supporto della scheda\"\n\n#: src/bare-metal/microcontrollers/board-support.md:3\n#, fuzzy\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Le casse di supporto della tavola forniscono un ulteriore livello di \"\n\"avvolgimento per una tavola specifica per comodità.\"\n\n#: src/bare-metal/microcontrollers/board-support.md:31\n#, fuzzy\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"In questo caso la cassa di supporto della scheda fornisce solo nomi più \"\n\"utili e un po' di inizializzazione.\"\n\n#: src/bare-metal/microcontrollers/board-support.md:33\n#, fuzzy\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"Il crate può anche includere driver per alcuni dispositivi integrati al di \"\n\"fuori del microcontrollore si.\"\n\n#: src/bare-metal/microcontrollers/board-support.md:35\n#, fuzzy\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` include un semplice driver per la matrice LED.\"\n\n#: src/bare-metal/microcontrollers/type-state.md:1\n#, fuzzy\nmsgid \"The type state pattern\"\nmsgstr \"Il modello di stato del tipo\"\n\n#: src/bare-metal/microcontrollers/type-state.md:11\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md:19\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md:33\n#, fuzzy\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"I pin non implementano `Copy` o `Clone`, quindi può esistere solo un'istanza \"\n\"di ciascuno. Una volta che uno spillo è spostato fuori dalla struttura \"\n\"portuale nessun altro può prenderlo.\"\n\n#: src/bare-metal/microcontrollers/type-state.md:35\n#, fuzzy\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"La modifica della configurazione di un pin consuma la vecchia istanza del \"\n\"pin, quindi non puoi continuare a utilizzare il vecchio esempio dopo.\"\n\n#: src/bare-metal/microcontrollers/type-state.md:37\n#, fuzzy\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"Il tipo di un valore indica lo stato in cui si trova: ad es. in questo caso, \"\n\"lo stato di configurazione di un pin GPIO. Questo codifica la macchina a \"\n\"stati nel sistema di tipi e garantisce che non lo fai provare a utilizzare \"\n\"un pin in un certo modo senza prima configurarlo correttamente. Stato \"\n\"illegale le transizioni vengono rilevate in fase di compilazione.\"\n\n#: src/bare-metal/microcontrollers/type-state.md:42\n#, fuzzy\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Puoi chiamare `is_high` su un pin di input e `set_high` su un pin di output, \"\n\"ma non viceversa.\"\n\n#: src/bare-metal/microcontrollers/type-state.md:44\n#, fuzzy\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"Molte casse HAL seguono questo schema.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:3\n#, fuzzy\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\"Il crate [`embedded-hal`](https://crates.io/crates/embedded-hal) fornisce \"\n\"una serie di caratteristiche che copre le comuni periferiche del \"\n\"microcontrollore.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:6\n#, fuzzy\nmsgid \"GPIO\"\nmsgstr \"GPIO \\\\*ADC\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:7\n#, fuzzy\nmsgid \"ADC\"\nmsgstr \"I2C, SPI, UART, PUÒ\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:8\n#, fuzzy\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"RNG\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:9\n#, fuzzy\nmsgid \"RNG\"\nmsgstr \"Timer\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:10\n#, fuzzy\nmsgid \"Timers\"\nmsgstr \"Cani da guardia\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:11\nmsgid \"Watchdogs\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:13\n#, fuzzy\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\"Altre casse quindi implementano [driver](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in termini di questi tratti, ad es. un \"\n\"driver dell'accelerometro potrebbe richiedere un'implementazione del bus I2C \"\n\"o SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:20\n#, fuzzy\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Ci sono implementazioni per molti microcontrollori, così come altre \"\n\"piattaforme come Linux su Lampone Pi.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md:22\n#, fuzzy\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\"C'è lavoro in corso su una versione `async` di `embedded-hal`, ma non è \"\n\"ancora stabile.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:3\n#, fuzzy\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) è un utile set di strumenti per il debug \"\n\"integrato, come OpenOCD ma migliore integrato.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:6\n#, fuzzy\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \" e JTAG tramite sonde CMSIS-DAP, ST-Link e J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:7\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:8\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:10\n#, fuzzy\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\" emette e collega GDB. È configurato da un \\\"Embed.toml\\\" nella directory \"\n\"del progetto.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:16\n#, fuzzy\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) è \"\n\"uno standard Arm protocollo su USB per un debugger in-circuit per accedere \"\n\"alla porta di accesso di debug CoreSight di vari Processori Arm Cortex. È \"\n\"ciò che utilizza il debugger integrato sul micro: bit della BBC.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:20\n#, fuzzy\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link è una gamma di debugger in-circuit di ST Microelectronics, J-Link è \"\n\"una gamma di SEGGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:22\n#, fuzzy\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"La porta di accesso al debug è in genere un'interfaccia JTAG a 5 pin o un \"\n\"cavo di debug seriale a 2 pin.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:24\n#, fuzzy\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs è una libreria che puoi integrare nei tuoi strumenti se lo desideri.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:26\n#, fuzzy\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"Il [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) consente VSCode e altri IDE eseguono il debug del codice \"\n\"in esecuzione su qualsiasi microcontrollore supportato.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:30\n#, fuzzy\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed è un binario creato utilizzando la libreria probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md:31\n#, fuzzy\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) è un meccanismo per trasferire i dati tra l'host \"\n\"di debug e il target attraverso una serie di ringbuffer.\"\n\n#: src/bare-metal/microcontrollers/debugging.md:3\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"Incorpora.toml:\"\n\n#: src/bare-metal/microcontrollers/debugging.md:15\n#, fuzzy\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"In un terminale sotto `src/bare-metal/microcontrollers/examples/`:\"\n\n#: src/bare-metal/microcontrollers/debugging.md:23\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"In un altro terminale nella stessa directory:\"\n\n#: src/bare-metal/microcontrollers/debugging.md:25\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md:43\n#, fuzzy\nmsgid \"In GDB, try running:\"\nmsgstr \"In GDB, prova a eseguire:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:1\n#: src/bare-metal/aps/other-projects.md:1\n#, fuzzy\nmsgid \"Other projects\"\nmsgstr \"Altri progetti\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:3\n#, fuzzy\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:4\n#, fuzzy\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Concorrenza basata su interrupt in tempo reale\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:5\n#, fuzzy\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"Gestione delle risorse condivise, passaggio di messaggi, pianificazione \"\n\"delle attività, coda del timer\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:6\n#, fuzzy\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Ambasciata](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:7\n#, fuzzy\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"Esecutori `async` con priorità, timer, networking, USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:8\n#, fuzzy\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:9\n#, fuzzy\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS incentrato sulla sicurezza con pianificazione preventiva e supporto \"\n\"dell'unità di protezione della memoria\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:11\n#, fuzzy\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:12\n#, fuzzy\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"Microkernel RTOS di Oxide Computer Company con protezione della memoria, \"\n\"driver non privilegiati, IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:14\n#, fuzzy\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Binding per FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:15\n#, fuzzy\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Alcune piattaforme hanno implementazioni `std`, ad es. [esp-idf](https://esp-\"\n\"rs.github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:20\n#, fuzzy\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC può essere considerato un RTOS o un framework di concorrenza.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:21\n#, fuzzy\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"Non include nessun HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:22\n#, fuzzy\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Utilizza Cortex-M NVIC (Nested Virtual Interrupt Controller) per la \"\n\"pianificazione piuttosto che un kernel corretto.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:24\n#, fuzzy\nmsgid \"Cortex-M only.\"\nmsgstr \"Solo Cortex-M.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:25\n#, fuzzy\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"Google utilizza TockOS sul microcontrollore Haven per le chiavi di sicurezza \"\n\"Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md:26\n#, fuzzy\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS è principalmente scritto in C, ma ci sono collegamenti Rust per la \"\n\"scrittura di applicazioni.\"\n\n#: src/exercises/bare-metal/morning.md:3\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Leggeremo la direzione da una bussola I2C e registreremo le letture su una \"\n\"porta seriale.\"\n\n#: src/exercises/bare-metal/morning.md:8\n#: src/exercises/concurrency/morning.md:12\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Dopo aver esaminato l'esercizio, puoi esaminare la \\\\[soluzione\\\\] fornita.\"\n\n#: src/exercises/bare-metal/compass.md:3\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Leggeremo la direzione da una bussola I2C e registreremo le letture su una \"\n\"porta seriale. Se hai tempo, prova a visualizzarlo in qualche modo anche sui \"\n\"LED o usa i pulsanti in qualche modo.\"\n\n#: src/exercises/bare-metal/compass.md:7\n#, fuzzy\nmsgid \"Hints:\"\nmsgstr \"Suggerimenti:\"\n\n#: src/exercises/bare-metal/compass.md:9\n#, fuzzy\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Controlla la documentazione per [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) e [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) e le [micro:bit hardware](https://tech.microbit.org/hardware/).\"\n\n#: src/exercises/bare-metal/compass.md:13\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"L'unità di misura inerziale LSM303AGR è collegata al bus I2C interno.\"\n\n#: src/exercises/bare-metal/compass.md:14\n#, fuzzy\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI è un altro nome per I2C, quindi la periferica master I2C si chiama TWIM.\"\n\n#: src/exercises/bare-metal/compass.md:15\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"Il driver LSM303AGR necessita di qualcosa che implementi `embedded_hal::\"\n\"blocking::i2c::WriteRead` tratto. IL [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struttura implementa \"\n\"questo.\"\n\n#: src/exercises/bare-metal/compass.md:19\n#, fuzzy\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"Hai un [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct con campi per i vari pin e periferiche.\"\n\n#: src/exercises/bare-metal/compass.md:22\n#, fuzzy\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"Puoi anche guardare il [scheda tecnica nRF52833](https://infocenter.\"\n\"nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) se vuoi, ma non dovrebbe essere \"\n\"necessario per questo esercizio.\"\n\n#: src/exercises/bare-metal/compass.md:26\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Scarica il [modello di esercizio](../../comprehensive-rust-exercises.zip) e \"\n\"guarda nella `bussola` directory per i seguenti file.\"\n\n#: src/exercises/bare-metal/compass.md:29 src/exercises/bare-metal/rtc.md:22\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"`src/principale.rs`:\"\n\n#: src/exercises/bare-metal/compass.md:47\n#: src/exercises/bare-metal/solutions-morning.md:34\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md:55\n#: src/exercises/bare-metal/solutions-morning.md:42\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md:58\nmsgid \"\"\n\"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\"    // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md:61\n#: src/exercises/bare-metal/solutions-morning.md:71\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md:64\nmsgid \"\"\n\"// Read compass data and log it to the serial port.\\n\"\n\"        // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md:70 src/exercises/bare-metal/rtc.md:387\n#, fuzzy\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Cargo.toml` (non dovrebbe essere necessario modificarlo):\"\n\n#: src/exercises/bare-metal/compass.md:92\n#, fuzzy\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"`Embed.toml` (non dovrebbe essere necessario modificarlo):\"\n\n#: src/exercises/bare-metal/compass.md:108 src/exercises/bare-metal/rtc.md:988\n#, fuzzy\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"`.cargo/config.toml` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/compass.md:121\n#, fuzzy\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Guarda l'output seriale su Linux con:\"\n\n#: src/exercises/bare-metal/compass.md:129\n#, fuzzy\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"O su Mac OS qualcosa di simile (il nome del dispositivo potrebbe essere \"\n\"leggermente diverso):\"\n\n#: src/exercises/bare-metal/compass.md:137\n#, fuzzy\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Usa Ctrl+A Ctrl+Q per uscire da picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md:1\n#, fuzzy\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Esercizio mattutino ruggine metallo nudo\"\n\n#: src/exercises/bare-metal/solutions-morning.md:5\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([torna all'esercizio](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md:45\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md:46\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md:64\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md:74\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md:82\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md:120\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md:1\n#, fuzzy\nmsgid \"Application processors\"\nmsgstr \"Processori di applicazioni\"\n\n#: src/bare-metal/aps.md:3\n#, fuzzy\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Finora abbiamo parlato di microcontrollori, come la serie Arm Cortex-M. Ora \"\n\"proviamo a scrivere qualcosa per Cortex-A. Per semplicità lavoreremo solo \"\n\"con aarch64 di QEMU ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) scheda.\"\n\n#: src/bare-metal/aps.md:10\n#, fuzzy\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"In generale, i microcontrollori non hanno una MMU o più livelli di \"\n\"privilegio (eccezione livelli su CPU Arm, anelli su x86), mentre i \"\n\"processori delle applicazioni lo fanno.\"\n\n#: src/bare-metal/aps.md:13\n#, fuzzy\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU supporta l'emulazione di diverse macchine o modelli di scheda per \"\n\"ciascuna architettura. IL La scheda 'virt' non corrisponde a nessun \"\n\"particolare hardware reale, ma è progettata esclusivamente per macchine \"\n\"virtuali.\"\n\n#: src/bare-metal/aps/entry-point.md:3\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:5\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:77\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:79\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:84\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:86\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:88\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:92\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:99\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:103\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md:105\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:1\n#, fuzzy\nmsgid \"Inline assembly\"\nmsgstr \"Assemblaggio in linea\"\n\n#: src/bare-metal/aps/inline-assembly.md:3\n#, fuzzy\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"A volte abbiamo bisogno di usare l'assembly per fare cose che non sono \"\n\"possibili con il codice Rust. Per esempio, per effettuare un \"\n\n#: src/bare-metal/aps/inline-assembly.md:20\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:23\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:24\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:25\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:26\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:27\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:28\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:29\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:30\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:31\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md:40\n#, fuzzy\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Se vuoi davvero farlo, usa la cassa [`smccc`](https://crates.io/crates/\"\n\"smccc) che ha wrapper per tutte queste funzioni.)\"\n\n#: src/bare-metal/aps/inline-assembly.md:45\n#, fuzzy\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI è l'Arm Power State Coordination Interface, un insieme standard di \"\n\"funzioni per gestire il sistema e gli stati di alimentazione della CPU, tra \"\n\"le altre cose. È implementato dal firmware EL3 e dagli hypervisor su molti \"\n\"sistemi.\"\n\n#: src/bare-metal/aps/inline-assembly.md:48\n#, fuzzy\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"La sintassi `0 => _` significa inizializzare il registro a 0 prima di \"\n\"eseguire il codice assembly inline, e ignorarne il contenuto in seguito. \"\n\"Dobbiamo usare \\\"inout\\\" piuttosto che \\\"in\\\" perché la chiamata potrebbe \"\n\"potenzialmente intasare il contenuto dei registri.\"\n\n#: src/bare-metal/aps/inline-assembly.md:52\n#, fuzzy\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Questa funzione `main` deve essere `#[no_mangle]` e `extern \\\"C\\\"` perché \"\n\"viene chiamata dal nostro punto di ingresso in \\\"entry.S\\\".\"\n\n#: src/bare-metal/aps/inline-assembly.md:54\n#, fuzzy\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` sono i valori dei registri `x0`–`x3`, che sono convenzionalmente \"\n\"utilizzati dal bootloader per passare cose come un puntatore all'albero dei \"\n\"dispositivi. Secondo la chiamata standard aarch64 convenzione (che è ciò che \"\n\"`extern \\\"C\\\"` specifica di usare), i registri `x0`–`x7` sono usati per \"\n\"primi 8 argomenti passati a una funzione, quindi `entry.S` non ha bisogno di \"\n\"fare niente di speciale tranne assicurati che non modifichi questi registri.\"\n\n#: src/bare-metal/aps/inline-assembly.md:60\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Eseguire l'esempio in QEMU con `make qemu_psci` in `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/mmio.md:1\n#, fuzzy\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Accesso alla memoria volatile per MMIO\"\n\n#: src/bare-metal/aps/mmio.md:3\n#, fuzzy\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"Usa `pointer::read_volatile` e `pointer::write_volatile`.\"\n\n#: src/bare-metal/aps/mmio.md:4\n#, fuzzy\nmsgid \"Never hold a reference.\"\nmsgstr \"Non tenere mai un riferimento.\"\n\n#: src/bare-metal/aps/mmio.md:5\n#, fuzzy\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!` consente di ottenere campi di struct senza creare un riferimento \"\n\"intermedio.\"\n\n#: src/bare-metal/aps/mmio.md:10\n#, fuzzy\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Accesso volatile: le operazioni di lettura o scrittura possono avere effetti \"\n\"collaterali, quindi impedisci al compilatore o hardware dal riordinarli, \"\n\"duplicarli o eliminarli.\"\n\n#: src/bare-metal/aps/mmio.md:12\n#, fuzzy\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"Di solito se scrivi e poi leggi, ad es. tramite un riferimento mutabile, il \"\n\"compilatore può assumerlo il valore letto è uguale al valore appena scritto, \"\n\"e non disturba effettivamente la lettura della memoria.\"\n\n#: src/bare-metal/aps/mmio.md:15\n#, fuzzy\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Alcuni crate esistenti per l'accesso volatile all'hardware contengono \"\n\"riferimenti, ma questo non è corretto. Ogni volta che esiste un riferimento, \"\n\"il compilatore può scegliere di dereferenziarlo.\"\n\n#: src/bare-metal/aps/mmio.md:18\n#, fuzzy\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"Usa la macro `addr_of!` per ottenere i puntatori di campo struct da un \"\n\"puntatore alla struct.\"\n\n#: src/bare-metal/aps/uart.md:1\n#, fuzzy\nmsgid \"Let's write a UART driver\"\nmsgstr \"Scriviamo un driver UART\"\n\n#: src/bare-metal/aps/uart.md:3\n#, fuzzy\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"La macchina QEMU 'virt' ha un [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, quindi scriviamo un driver per quello.\"\n\n#: src/bare-metal/aps/uart.md:9\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:17 src/bare-metal/aps/better-uart/driver.md:13\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:29 src/bare-metal/aps/better-uart/driver.md:25\n#: src/exercises/bare-metal/rtc.md:337\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:31 src/bare-metal/aps/better-uart/driver.md:27\n#: src/exercises/bare-metal/rtc.md:339\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:34 src/bare-metal/aps/uart.md:46\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:37 src/bare-metal/aps/better-uart/driver.md:33\n#: src/exercises/bare-metal/rtc.md:345\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:41 src/bare-metal/aps/better-uart/driver.md:37\n#: src/exercises/bare-metal/rtc.md:349\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md:55\n#, fuzzy\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Nota che `Uart::new` non è sicuro mentre gli altri metodi sono sicuri. \"\n\"Questo perché finché il chiamante di `Uart::new` garantisce che i suoi \"\n\"requisiti di sicurezza siano soddisfatti (cioè che ci sia solo mai \"\n\"un'istanza del driver per un dato UART, e nient'altro che alias il suo \"\n\"spazio degli indirizzi), quindi è sempre sicuro chiamare `write_byte` in \"\n\"seguito perché possiamo assumere il necessario precondizioni.\"\n\n#: src/bare-metal/aps/uart.md:61\n#, fuzzy\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Avremmo potuto fare il contrario (rendere `new` sicuro ma `write_byte` non \"\n\"sicuro), ma quello sarebbe molto meno conveniente da usare poiché ogni posto \"\n\"che chiama `write_byte` dovrebbe ragionare sulla sicurezza\"\n\n#: src/bare-metal/aps/uart.md:64\n#, fuzzy\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Questo è un modello comune per scrivere wrapper sicuri di codice non sicuro: \"\n\"spostare l'onere della prova per solidità da un gran numero di posti a un \"\n\"numero minore di posti.\"\n\n#: src/bare-metal/aps/uart/traits.md:1\n#, fuzzy\nmsgid \"More traits\"\nmsgstr \"Altri tratti\"\n\n#: src/bare-metal/aps/uart/traits.md:3\n#, fuzzy\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Abbiamo derivato il tratto `Debug`. Sarebbe utile implementare anche qualche \"\n\"altro tratto.\"\n\n#: src/bare-metal/aps/uart/traits.md:17 src/exercises/bare-metal/rtc.md:381\n#: src/exercises/bare-metal/solutions-afternoon.md:223\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md:25\n#, fuzzy\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"L'implementazione di `Write` ci permette di usare le macro `write!` e \"\n\"`writeln!` con il nostro tipo `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md:27\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Esegui l'esempio in QEMU con `make qemu_minimal` sotto `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/better-uart.md:1\n#, fuzzy\nmsgid \"A better UART driver\"\nmsgstr \"Un driver UART migliore\"\n\n#: src/bare-metal/aps/better-uart.md:3\n#, fuzzy\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"Il PL011 in realtà ha [un mucchio di registri in più](https://developer.arm.\"\n\"com/documentation/ddi0183/g/programmers-model/summary-of-registers) e \"\n\"aggiunge offset per costruire puntatori a cui accedere è soggetto a errori e \"\n\"difficile da leggere. Inoltre, alcuni di loro sono campi di bit che \"\n\"sarebbero carini accedere in modo strutturato.\"\n\n#: src/bare-metal/aps/better-uart.md:7\n#, fuzzy\nmsgid \"Offset\"\nmsgstr \"Compensazione\"\n\n#: src/bare-metal/aps/better-uart.md:7\n#, fuzzy\nmsgid \"Register name\"\nmsgstr \"Registra nome\"\n\n#: src/bare-metal/aps/better-uart.md:7\n#, fuzzy\nmsgid \"Width\"\nmsgstr \"Larghezza\"\n\n#: src/bare-metal/aps/better-uart.md:9\n#, fuzzy\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md:9\n#, fuzzy\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md:9\n#, fuzzy\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md:10\n#, fuzzy\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md:10\n#, fuzzy\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md:11\n#, fuzzy\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md:11\n#, fuzzy\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md:11\n#, fuzzy\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md:12\n#, fuzzy\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md:12\n#, fuzzy\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md:13\n#, fuzzy\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md:13\n#, fuzzy\nmsgid \"IBRD\"\nmsgstr \"BIRS\"\n\n#: src/bare-metal/aps/better-uart.md:13 src/bare-metal/aps/better-uart.md:16\n#, fuzzy\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md:14\n#, fuzzy\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md:14\n#, fuzzy\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md:15\n#, fuzzy\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md:15\n#, fuzzy\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md:16\n#, fuzzy\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md:16\n#, fuzzy\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md:17\n#, fuzzy\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md:17\n#, fuzzy\nmsgid \"IFLS\"\nmsgstr \"IFL\"\n\n#: src/bare-metal/aps/better-uart.md:18\n#, fuzzy\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md:18\n#, fuzzy\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md:18 src/bare-metal/aps/better-uart.md:19\n#: src/bare-metal/aps/better-uart.md:20 src/bare-metal/aps/better-uart.md:21\n#, fuzzy\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md:19\n#, fuzzy\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md:19\n#, fuzzy\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md:20\n#, fuzzy\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md:20\n#, fuzzy\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md:21\n#, fuzzy\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md:21\n#, fuzzy\nmsgid \"ICR\"\nmsgstr \"CRI\"\n\n#: src/bare-metal/aps/better-uart.md:22\n#, fuzzy\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md:22\n#, fuzzy\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md:26\n#, fuzzy\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\"Sono inoltre presenti alcuni registri identificativi che per brevità sono \"\n\"stati omessi.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:3\n#, fuzzy\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"Il crate [`bitflags`](https://crates.io/crates/bitflags) è utile per \"\n\"lavorare con i bitflags.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:10\n#: src/exercises/bare-metal/rtc.md:241\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:14\n#: src/exercises/bare-metal/rtc.md:245\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:16\n#: src/exercises/bare-metal/rtc.md:247\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:18\n#: src/exercises/bare-metal/rtc.md:249\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:20\n#: src/exercises/bare-metal/rtc.md:251\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:22\n#: src/exercises/bare-metal/rtc.md:253\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:24\n#: src/exercises/bare-metal/rtc.md:255\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:26\n#: src/exercises/bare-metal/rtc.md:257\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:28\n#: src/exercises/bare-metal/rtc.md:259\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:30\n#: src/exercises/bare-metal/rtc.md:261\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md:38\n#, fuzzy\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"La macro `bitflags!` crea un nuovo tipo qualcosa come `Flags(u16)`, insieme \"\n\"a una serie di metodi implementazioni per ottenere e impostare flag.\"\n\n#: src/bare-metal/aps/better-uart/registers.md:1\n#, fuzzy\nmsgid \"Multiple registers\"\nmsgstr \"Più registri\"\n\n#: src/bare-metal/aps/better-uart/registers.md:3\n#, fuzzy\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Possiamo usare una struct per rappresentare il layout di memoria dei \"\n\"registri dell'UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md:43\n#, fuzzy\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) indica il compilatore per disporre i campi struct in ordine, \"\n\"seguendo le stesse regole di C. Questo è necessario affinché la nostra \"\n\"struttura abbia un layout prevedibile, poiché la rappresentazione \"\n\"predefinita di Rust lo consente compilatore per (tra le altre cose) \"\n\"riordinare i campi come meglio crede.\"\n\n#: src/bare-metal/aps/better-uart/driver.md:3\n#, fuzzy\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"Ora usiamo la nuova struttura `Registers` nel nostro driver.\"\n\n#: src/bare-metal/aps/better-uart/driver.md:6\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md:30\n#: src/bare-metal/aps/better-uart/driver.md:54\n#: src/exercises/bare-metal/rtc.md:342 src/exercises/bare-metal/rtc.md:366\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md:41\n#: src/exercises/bare-metal/rtc.md:353\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md:48\n#: src/exercises/bare-metal/rtc.md:360\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md:63\n#, fuzzy\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Notare l'uso di `addr_of!` / `addr_of_mut!` per ottenere puntatori a singoli \"\n\"campi senza creare un riferimento intermedio, che sarebbe errato.\"\n\n#: src/bare-metal/aps/better-uart/using.md:1\n#: src/bare-metal/aps/logging/using.md:1\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"Usandolo\"\n\n#: src/bare-metal/aps/better-uart/using.md:3\n#, fuzzy\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Scriviamo un piccolo programma usando il nostro driver per scrivere sulla \"\n\"console seriale ed echo in entrata byte.\"\n\n#: src/bare-metal/aps/better-uart/using.md:19\n#: src/bare-metal/aps/logging/using.md:18 src/exercises/bare-metal/rtc.md:44\n#: src/exercises/bare-metal/solutions-afternoon.md:33\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:25\n#: src/bare-metal/aps/logging/using.md:24 src/exercises/bare-metal/rtc.md:50\n#: src/exercises/bare-metal/solutions-afternoon.md:44\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:29\n#: src/bare-metal/aps/logging/using.md:29\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:35\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:36\n#: src/async/pitfalls/cancellation.md:27\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:38\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:44\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md:51\n#, fuzzy\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Come nell'esempio [inline assembly](../inline-assembly.md), questa funzione \"\n\"`main` è chiamata dal nostro codice del punto di ingresso in \\\"entry.S\\\". \"\n\"Vedi le note del relatore lì per i dettagli.\"\n\n#: src/bare-metal/aps/better-uart/using.md:54\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Esegui l'esempio in QEMU con `make qemu` sotto `src/bare-metal/aps/examples`.\"\n\n#: src/bare-metal/aps/logging.md:3\n#, fuzzy\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Sarebbe bello poter usare le macro di registrazione dalla cassa [`log`]\"\n\"(https://crates.io/crates/log). Possiamo farlo con implementando il tratto \"\n\"`Log`.\"\n\n#: src/bare-metal/aps/logging.md:26 src/exercises/bare-metal/rtc.md:193\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md:35 src/exercises/bare-metal/rtc.md:202\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md:48\n#, fuzzy\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"L'unwrap in `log` è sicuro perché inizializziamo `LOGGER` prima di chiamare \"\n\"`set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md:3\n#, fuzzy\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Dobbiamo inizializzare il logger prima di usarlo.\"\n\n#: src/bare-metal/aps/logging/using.md:38 src/exercises/bare-metal/rtc.md:72\n#: src/exercises/bare-metal/solutions-afternoon.md:115\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md:46\n#, fuzzy\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Nota che il nostro gestore del panico ora può registrare i dettagli dei \"\n\"panico.\"\n\n#: src/bare-metal/aps/logging/using.md:47\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Eseguire l'esempio in QEMU con `make qemu_logger` in `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/exceptions.md:3\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md:67\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md:68\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md:70\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md:72\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md:3\n#, fuzzy\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md:4\n#, fuzzy\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot senza la C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md:5\n#, fuzzy\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Supporta x86, aarch64 e RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md:6\n#, fuzzy\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"Si basa su LinuxBoot piuttosto che avere molti driver.\"\n\n#: src/bare-metal/aps/other-projects.md:7\n#, fuzzy\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Tutorial sul sistema operativo Rust RaspberryPi](https://github.com/rust-\"\n\"embedded/rust-raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md:8\n#, fuzzy\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"Inizializzazione, driver UART, bootloader semplice, JTAG, livelli di \"\n\"eccezione, gestione delle eccezioni, tabelle delle pagine\"\n\n#: src/bare-metal/aps/other-projects.md:10\n#, fuzzy\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"Non tutto molto ben scritto, quindi attenzione.\"\n\n#: src/bare-metal/aps/other-projects.md:12\n#, fuzzy\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md:13\n#, fuzzy\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Analisi statica per determinare l'utilizzo massimo dello stack.\"\n\n#: src/bare-metal/aps/other-projects.md:17\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md:19\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md:23\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md:1\nmsgid \"Useful crates\"\nmsgstr \"Crates utili\"\n\n#: src/bare-metal/useful-crates.md:3\n#, fuzzy\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"Esamineremo alcune casse che risolvono alcuni problemi comuni nella \"\n\"programmazione bare-metal.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:3\n#, fuzzy\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"La cassa [`zerocopy`](https://docs.rs/zerocopy/) (da Fuchsia) fornisce \"\n\"tratti e macro per la conversione sicura tra sequenze di byte e altri tipi.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:42\n#, fuzzy\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"Questo non è adatto per MMIO (poiché non utilizza letture e scritture \"\n\"volatili), ma può essere utile per lavorare con strutture condivise con \"\n\"l'hardware, ad es. tramite DMA o inviato tramite un'interfaccia esterna.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:48\n#, fuzzy\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` può essere implementato per i tipi per i quali qualsiasi modello \"\n\"di byte è valido, e quindi può tranquillamente esserlo convertito da una \"\n\"sequenza di byte non attendibile.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:50\n#, fuzzy\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Il tentativo di derivare `FromBytes` per questi tipi fallirebbe, perché \"\n\"`RequestType` non usa tutti possibili valori u32 come discriminanti, quindi \"\n\"non tutti i modelli di byte sono validi.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:53\n#, fuzzy\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` ha tipi per primitive numeriche che riconoscono \"\n\"l'ordine dei byte.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md:54\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Esegui l'esempio con `cargo run` sotto `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (Non lo farà eseguito nel Parco giochi a causa della \"\n\"dipendenza dalla cassa.)\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:3\n#, fuzzy\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"Il crate [`aarch64-paging`](https://crates.io/crates/aarch64-paging) \"\n\"consente di creare tabelle di pagine in base alla memoria virtuale AArch64 \"\n\"Architettura di sistema.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:14\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:16\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:21\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:28\n#, fuzzy\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Per ora supporta solo EL1, ma il supporto per altri livelli di eccezione \"\n\"dovrebbe essere semplice aggiungere.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:30\n#, fuzzy\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Viene utilizzato in Android per il [Firmware VM protetto](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md:31\n#, fuzzy\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"Non esiste un modo semplice per eseguire questo esempio, poiché deve essere \"\n\"eseguito su hardware reale o sotto QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md:3\n#, fuzzy\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"è un crate di terze parti che implementa un allocatore di sistema buddy di \"\n\"base. Può essere utilizzato sia per [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"che implementa [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) in modo da poter utilizzare il crate standard `alloc` \"\n\"(come abbiamo visto [prima](../alloc.md)), o per allocare altro spazio di \"\n\"indirizzi. Per esempio, potremmo voler allocare spazio MMIO per PCI BAR:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md:29\n#, fuzzy\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"Le barre PCI hanno sempre un allineamento uguale alla loro dimensione.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md:30\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Esegui l'esempio con `cargo run` sotto `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (Non lo farà eseguito nel Parco giochi a causa della \"\n\"dipendenza dalla cassa.)\"\n\n#: src/bare-metal/useful-crates/tinyvec.md:3\n#, fuzzy\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"A volte vuoi qualcosa che possa essere ridimensionato come un `Vec`, ma \"\n\"senza allocazione dell'heap. [`tinyvec`](https://crates.io/crates/tinyvec) \"\n\"fornisce questo: un vettore supportato da un array o da una slice, che \"\n\"potrebbe essere staticamente allocato o in pila, che tiene traccia di quanti \"\n\"elementi vengono utilizzati e va in panico se ci provi utilizzare più di \"\n\"quanto assegnato.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md:25\n#, fuzzy\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` richiede che il tipo di elemento implementi `Default` per \"\n\"l'inizializzazione.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md:27\n#, fuzzy\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playground include `tinyvec`, quindi questo esempio funzionerà \"\n\"correttamente in linea.\"\n\n#: src/bare-metal/useful-crates/spin.md:3\n#, fuzzy\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` e le altre primitive di sincronizzazione da `std::sync` \"\n\"non sono disponibili in `core` o `alloc`. Come gestire la sincronizzazione o \"\n\"la mutevolezza interiore, ad esempio per la condivisione stato tra diverse \"\n\"CPU?\"\n\n#: src/bare-metal/useful-crates/spin.md:7\n#, fuzzy\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"La cassa [`spin`](https://crates.io/crates/spin) fornisce equivalenti basati \"\n\"su spinlock di molte di queste primitive.\"\n\n#: src/bare-metal/useful-crates/spin.md:26\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md:27\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md:29\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md:31\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md:3\n#, fuzzy\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Per costruire un binario Rust bare-metal in AOSP, devi usare una regola \"\n\"`rust_ffi_static` Soong per costruire il tuo codice Rust, poi un `cc_binary` \"\n\"con uno script linker per produrre il binario stesso, e poi a `raw_binary` \"\n\"per convertire l'ELF in un binario grezzo pronto per essere eseguito.\"\n\n#: src/bare-metal/android/vmbase.md:1\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md:3\n#, fuzzy\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"Per le VM in esecuzione in crosvm su aarch64, la libreria [vmbase](https://\"\n\"android.googlesource.com/platform/packages/modules/Virtualization/+/refs/\"\n\"heads/master/vmbase/) fornisce uno script linker e utili impostazioni \"\n\"predefinite per le regole di compilazione, insieme a un punto di ingresso, \"\n\"la registrazione della console UART e altro ancora.\"\n\n#: src/bare-metal/android/vmbase.md:24\n#, fuzzy\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"La macro `main!` contrassegna la tua funzione principale, da chiamare dal \"\n\"punto di ingresso `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md:26\n#, fuzzy\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"Il punto di ingresso `vmbase` gestisce l'inizializzazione della console ed \"\n\"emette un PSCI_SYSTEM_OFF per l'arresto la VM se la tua funzione principale \"\n\"ritorna.\"\n\n#: src/exercises/bare-metal/afternoon.md:3\n#, fuzzy\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"Scriveremo un driver per il dispositivo orologio in tempo reale PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md:7\n#: src/exercises/concurrency/afternoon.md:13\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Dopo aver esaminato l'esercizio, puoi esaminare la \\\\[soluzione\\\\] fornita.\"\n\n#: src/exercises/bare-metal/rtc.md:1\n#: src/exercises/bare-metal/solutions-afternoon.md:3\n#, fuzzy\nmsgid \"RTC driver\"\nmsgstr \"Driver RTC\"\n\n#: src/exercises/bare-metal/rtc.md:3\n#, fuzzy\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"La macchina QEMU aarch64 virt ha un orologio in tempo reale [PL031](https://\"\n\"developer.arm.com/documentation/ddi0224/c) a 0x9010000. Per questo \"\n\"esercizio, tu dovrebbe scrivere un driver per esso.\"\n\n#: src/exercises/bare-metal/rtc.md:6\n#, fuzzy\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"Usalo per stampare l'ora corrente sulla console seriale. Puoi usare la cassa \"\n\"[`chrono`](https://crates.io/crates/chrono) per formattazione data/ora.\"\n\n#: src/exercises/bare-metal/rtc.md:8\n#, fuzzy\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"Utilizzare il registro delle corrispondenze e lo stato di interrupt non \"\n\"elaborato per attendere occupato fino a un determinato momento, ad es. 3 \"\n\"secondi in futuro. (Chiama [`core::hint::spin_loop`](https://doc.rust-lang.\"\n\"org/core/hint/fn.spin_loop.html) all'interno del ciclo.)\"\n\n#: src/exercises/bare-metal/rtc.md:11\n#, fuzzy\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"_Estensione se hai tempo:_ Abilita e gestisci l'interrupt generato dalla \"\n\"corrispondenza RTC. Puoi utilizzare il driver fornito nella cassa [`arm-gic`]\"\n\"(https://docs.rs/arm-gic/) per configurare Arm Generic Interrupt Controller.\"\n\n#: src/exercises/bare-metal/rtc.md:14\n#, fuzzy\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"Usa l'interrupt RTC, che è cablato al GIC come `IntId::spi(2)`.\"\n\n#: src/exercises/bare-metal/rtc.md:15\n#, fuzzy\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"Una volta abilitato l'interrupt, puoi mettere il core in sleep tramite \"\n\"`arm_gic::wfi()`, che farà dormire il core finché non riceve un interrupt.\"\n\n#: src/exercises/bare-metal/rtc.md:19\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Scarica il [modello di esercizio](../../comprehensive-rust-exercises.zip) e \"\n\"cerca in `rtc` directory per i seguenti file.\"\n\n#: src/exercises/bare-metal/rtc.md:40\n#: src/exercises/bare-metal/solutions-afternoon.md:29\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:55\n#: src/exercises/bare-metal/solutions-afternoon.md:49\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:57\n#: src/exercises/bare-metal/solutions-afternoon.md:51\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:63\nmsgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:65\nmsgid \"// TODO: Wait for 3 seconds.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:78\n#, fuzzy\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"`src/exceptions.rs` (dovresti solo cambiarlo per la terza parte \"\n\"dell'esercizio):\"\n\n#: src/exercises/bare-metal/rtc.md:84 src/exercises/bare-metal/rtc.md:159\n#: src/exercises/bare-metal/rtc.md:218 src/exercises/bare-metal/rtc.md:418\nmsgid \"\"\n\"// Copyright 2023 Google LLC\\n\"\n\"//\\n\"\n\"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\"// you may not use this file except in compliance with the License.\\n\"\n\"// You may obtain a copy of the License at\\n\"\n\"//\\n\"\n\"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n\"//\\n\"\n\"// Unless required by applicable law or agreed to in writing, software\\n\"\n\"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\"// See the License for the specific language governing permissions and\\n\"\n\"// limitations under the License.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:105\nmsgid \"\\\"sync_exception_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:111\nmsgid \"\\\"irq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:113\nmsgid \"\\\"No pending interrupt\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:114\nmsgid \"\\\"IRQ {intid:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:119\nmsgid \"\\\"fiq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:125\nmsgid \"\\\"serr_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:131\nmsgid \"\\\"sync_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:137\nmsgid \"\\\"irq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:143\nmsgid \"\\\"fiq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:149\nmsgid \"\\\"serr_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:154\n#, fuzzy\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"`src/logger.rs` (non dovrebbe essere necessario modificarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:172\nmsgid \"// ANCHOR: main\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:213\n#, fuzzy\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"`src/pl011.rs` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:236\nmsgid \"// ANCHOR: Flags\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:264\nmsgid \"// ANCHOR_END: Flags\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:268\nmsgid \"\"\n\"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:272\nmsgid \"/// Framing error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:274\nmsgid \"/// Parity error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:276\nmsgid \"/// Break error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:278\nmsgid \"/// Overrun error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:282\nmsgid \"// ANCHOR: Registers\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:314\nmsgid \"// ANCHOR_END: Registers\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:316\nmsgid \"\"\n\"// ANCHOR: Uart\\n\"\n\"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:325\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:370\nmsgid \"// ANCHOR_END: Uart\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:413\n#, fuzzy\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"`build.rs` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:436 src/exercises/bare-metal/rtc.md:438\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:437 src/exercises/bare-metal/rtc.md:439\nmsgid \"\\\"CROSS_COMPILE\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:437\n#, fuzzy\nmsgid \"\\\"aarch64-linux-gnu\\\"\"\nmsgstr \"paginazione aarch64 (aarch64-paging)\"\n\n#: src/exercises/bare-metal/rtc.md:439\nmsgid \"\\\"aarch64-none-elf\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:442\nmsgid \"\\\"entry.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:443\n#, fuzzy\nmsgid \"\\\"exceptions.S\\\"\"\nmsgstr \"Eccezioni\"\n\n#: src/exercises/bare-metal/rtc.md:444\nmsgid \"\\\"idmap.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:445\nmsgid \"\\\"empty\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:449\n#, fuzzy\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"`entry.S` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:453\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".macro adr_l, reg:req, sym:req\\n\"\n\"\\tadrp \\\\reg, \\\\sym\\n\"\n\"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n\".endm\\n\"\n\"\\n\"\n\".macro mov_i, reg:req, imm:req\\n\"\n\"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n\".endm\\n\"\n\"\\n\"\n\".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n\".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n\".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n\"\\n\"\n\"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n\".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n\"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n\".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n\"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n\"fault instead. */\\n\"\n\".set .L_TCR_EPD1, 0x1 << 23\\n\"\n\"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n\".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are outer write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are inner write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n\"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n\".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n\".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n\"L_TCR_RGN_OWB\\n\"\n\".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n\"L_TCR_T0SZ_512\\n\"\n\"\\n\"\n\"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n\"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n\".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n\"/* Stage 1 data access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n\"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n\".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n\"/* Privileged Access Never is unchanged on taking an exception to EL1. */\\n\"\n\".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n\"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n\"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n\".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n\"28) | (0x1 << 29)\\n\"\n\".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n\"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n\".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n\"L_SCTLR_EL1_RES1\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic entry point for an image. It carries out the operations \"\n\"required to prepare the\\n\"\n\" * loaded image to be run. Specifically, it zeroes the bss section using \"\n\"registers x25 and above,\\n\"\n\" * prepares the stack, enables floating point, and sets up the exception \"\n\"vector. It preserves x0-x3\\n\"\n\" * for the Rust entry point, as these may contain boot parameters.\\n\"\n\" */\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"\\t/* Load and apply the memory management configuration, ready to enable MMU \"\n\"and caches. */\\n\"\n\"\\tadrp x30, idmap\\n\"\n\"\\tmsr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lmairval\\n\"\n\"\\tmsr mair_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Ltcrval\\n\"\n\"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n\"\\tbfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"\\tmsr tcr_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Ensure everything before this point has completed, then invalidate any \"\n\"potentially stale\\n\"\n\"\\t * local TLB entries before they start being used.\\n\"\n\"\\t */\\n\"\n\"\\tisb\\n\"\n\"\\ttlbi vmalle1\\n\"\n\"\\tic iallu\\n\"\n\"\\tdsb nsh\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this has completed.\\n\"\n\"\\t */\\n\"\n\"\\tmsr sctlr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Disable trapping floating point access in EL1. */\\n\"\n\"\\tmrs x30, cpacr_el1\\n\"\n\"\\torr x30, x30, #(0x3 << 20)\\n\"\n\"\\tmsr cpacr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Zero out the bss section. */\\n\"\n\"\\tadr_l x29, bss_begin\\n\"\n\"\\tadr_l x30, bss_end\\n\"\n\"0:\\tcmp x29, x30\\n\"\n\"\\tb.hs 1f\\n\"\n\"\\tstp xzr, xzr, [x29], #16\\n\"\n\"\\tb 0b\\n\"\n\"\\n\"\n\"1:\\t/* Prepare the stack. */\\n\"\n\"\\tadr_l x30, boot_stack_end\\n\"\n\"\\tmov sp, x30\\n\"\n\"\\n\"\n\"\\t/* Set up exception vector. */\\n\"\n\"\\tadr x30, vector_table_el1\\n\"\n\"\\tmsr vbar_el1, x30\\n\"\n\"\\n\"\n\"\\t/* Call into Rust code. */\\n\"\n\"\\tbl main\\n\"\n\"\\n\"\n\"\\t/* Loop forever waiting for interrupts. */\\n\"\n\"2:\\twfi\\n\"\n\"\\tb 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:598\n#, fuzzy\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"`eccezioni.S` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:602\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers with 18 \"\n\"instructions\\n\"\n\" * left.\\n\"\n\" *\\n\"\n\" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n\"respectively,\\n\"\n\" * which can be used as the first and second arguments of a subsequent \"\n\"call.\\n\"\n\" */\\n\"\n\".macro save_volatile_to_stack\\n\"\n\"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n\"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n\"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tstr x18, [sp, #8 * 18]\\n\"\n\"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\\n\"\n\"\\t * and still be able to unwind.\\n\"\n\"\\t */\\n\"\n\"\\tmrs x0, elr_el1\\n\"\n\"\\tmrs x1, spsr_el1\\n\"\n\"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Restores the volatile registers from the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers while still leaving \"\n\"18\\n\"\n\" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n\" * instructions to spare.\\n\"\n\" */\\n\"\n\".macro restore_volatile_from_stack\\n\"\n\"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n\"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tldr x18, [sp, #8 * 18]\\n\"\n\"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n\"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n\"\\tmsr elr_el1, x0\\n\"\n\"\\tmsr spsr_el1, x1\\n\"\n\"\\n\"\n\"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n\"\\tldp x0, x1, [sp], #8 * 24\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n\"doing\\n\"\n\" * the work, then switching back to SP0 before returning.\\n\"\n\" *\\n\"\n\" * Switching to SPx and calling the Rust handler takes 16 instructions. To\\n\"\n\" * restore and return we need an additional 16 instructions, so we can \"\n\"implement\\n\"\n\" * the whole handler within the allotted 32 instructions.\\n\"\n\" */\\n\"\n\".macro current_exception_sp0 handler:req\\n\"\n\"\\tmsr spsel, #1\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\tmsr spsel, #0\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n\"volatile\\n\"\n\" * registers, then returns.\\n\"\n\" *\\n\"\n\" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n\" * non-volatile registers.\\n\"\n\" *\\n\"\n\" * Saving state and jumping to the Rust handler takes 15 instructions, and\\n\"\n\" * restoring and returning also takes 15 instructions, so we can fit the \"\n\"whole\\n\"\n\" * handler in 30 instructions, under the limit of 32.\\n\"\n\" */\\n\"\n\".macro current_exception_spx handler:req\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n\".global vector_table_el1\\n\"\n\".balign 0x800\\n\"\n\"vector_table_el1:\\n\"\n\"sync_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_cur_spx:\\n\"\n\"\\tcurrent_exception_spx sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_spx:\\n\"\n\"\\tcurrent_exception_spx serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_64:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_64:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_64:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_64:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_32:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_32:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_32:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_32:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:783\n#, fuzzy\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"`idmap.S` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:787\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n\".set .L_TT_TYPE_PAGE,  0x3\\n\"\n\".set .L_TT_TYPE_TABLE, 0x3\\n\"\n\"\\n\"\n\"/* Access flag. */\\n\"\n\".set .L_TT_AF, 0x1 << 10\\n\"\n\"/* Not global. */\\n\"\n\".set .L_TT_NG, 0x1 << 11\\n\"\n\".set .L_TT_XN, 0x3 << 53\\n\"\n\"\\n\"\n\".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n\".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n\"shareable\\n\"\n\"\\n\"\n\".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n\".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n\"\\n\"\n\".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n\".global idmap\\n\"\n\".align 12\\n\"\n\"idmap:\\n\"\n\"\\t/* level 1 */\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n\"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n\"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:832\n#, fuzzy\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"`image.ld` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:836\nmsgid \"\"\n\"```ld\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/*\\n\"\n\" * Code will start running at this symbol which is placed at the start of \"\n\"the\\n\"\n\" * image.\\n\"\n\" */\\n\"\n\"ENTRY(entry)\\n\"\n\"\\n\"\n\"MEMORY\\n\"\n\"{\\n\"\n\"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n\"}\\n\"\n\"\\n\"\n\"SECTIONS\\n\"\n\"{\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the code.\\n\"\n\"\\t */\\n\"\n\"\\t.init : ALIGN(4096) {\\n\"\n\"\\t\\ttext_begin = .;\\n\"\n\"\\t\\t*(.init.entry)\\n\"\n\"\\t\\t*(.init.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.text : {\\n\"\n\"\\t\\t*(.text.*)\\n\"\n\"\\t} >image\\n\"\n\"\\ttext_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together read-only data.\\n\"\n\"\\t */\\n\"\n\"\\t.rodata : ALIGN(4096) {\\n\"\n\"\\t\\trodata_begin = .;\\n\"\n\"\\t\\t*(.rodata.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.got : {\\n\"\n\"\\t\\t*(.got)\\n\"\n\"\\t} >image\\n\"\n\"\\trodata_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the read-write data including .bss at the end which\\n\"\n\"\\t * will be zero'd by the entry code.\\n\"\n\"\\t */\\n\"\n\"\\t.data : ALIGN(4096) {\\n\"\n\"\\t\\tdata_begin = .;\\n\"\n\"\\t\\t*(.data.*)\\n\"\n\"\\t\\t/*\\n\"\n\"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n\"\\t\\t * bytes long.\\n\"\n\"\\t\\t */\\n\"\n\"\\t\\t. = ALIGN(32);\\n\"\n\"\\t\\tdata_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n\"\\tbin_end = .;\\n\"\n\"\\n\"\n\"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n\"\\t.bss : ALIGN(16)  {\\n\"\n\"\\t\\tbss_begin = .;\\n\"\n\"\\t\\t*(.bss.*)\\n\"\n\"\\t\\t*(COMMON)\\n\"\n\"\\t\\t. = ALIGN(16);\\n\"\n\"\\t\\tbss_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n\"\\t\\tboot_stack_begin = .;\\n\"\n\"\\t\\t. += 40 * 4096;\\n\"\n\"\\t\\t. = ALIGN(4096);\\n\"\n\"\\t\\tboot_stack_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t. = ALIGN(4K);\\n\"\n\"\\tPROVIDE(dma_region = .);\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Remove unused sections from the image.\\n\"\n\"\\t */\\n\"\n\"\\t/DISCARD/ : {\\n\"\n\"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n\"\\t\\t*(.gnu.hash)\\n\"\n\"\\t\\t*(.hash)\\n\"\n\"\\t\\t*(.interp)\\n\"\n\"\\t\\t*(.eh_frame_hdr)\\n\"\n\"\\t\\t*(.eh_frame)\\n\"\n\"\\t\\t*(.note.gnu.build-id)\\n\"\n\"\\t}\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:943\n#, fuzzy\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"`Makefile` (non dovresti aver bisogno di cambiarlo):\"\n\n#: src/exercises/bare-metal/rtc.md:948\nmsgid \"# Copyright 2023 Google LLC\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:962\nmsgid \"$(shell uname -s)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:964\n#, fuzzy\nmsgid \"aarch64-linux-gnu\"\nmsgstr \"paginazione aarch64 (aarch64-paging)\"\n\n#: src/exercises/bare-metal/rtc.md:981\nmsgid \"stdio -display none -kernel $< -s\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:984\nmsgid \"cargo clean\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md:999\n#, fuzzy\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Esegui il codice in QEMU con `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:1\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Pomeriggio su Bare Metal Rust\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:5\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([torna all'esercizio](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:7\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"`principale.rs`:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:36\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:38\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:57\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:62\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:70\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:73\n#: src/exercises/bare-metal/solutions-afternoon.md:91\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:75\n#: src/exercises/bare-metal/solutions-afternoon.md:83\n#: src/exercises/bare-metal/solutions-afternoon.md:96\n#: src/exercises/bare-metal/solutions-afternoon.md:104\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:87\n#: src/exercises/bare-metal/solutions-afternoon.md:108\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:89\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:121\n#, fuzzy\nmsgid \"_pl031.rs_:\"\nmsgstr \"`pl031.rs`:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:128\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:130\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:132\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:134\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:137\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:140\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:143\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:146\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:150\n#, fuzzy\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"Scriveremo un driver per il dispositivo orologio in tempo reale PL031.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:158\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:170\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:172\n#: src/exercises/bare-metal/solutions-afternoon.md:180\n#: src/exercises/bare-metal/solutions-afternoon.md:188\n#: src/exercises/bare-metal/solutions-afternoon.md:199\n#: src/exercises/bare-metal/solutions-afternoon.md:211\n#: src/exercises/bare-metal/solutions-afternoon.md:218\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:177\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:185\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:194\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:205\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md:216\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md:1\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Benvenuti a Comprehensive Rust 🦀\"\n\n#: src/concurrency.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust ha il pieno supporto per la concorrenza utilizzando i thread del \"\n\"sistema operativo con mutex e canali.\"\n\n#: src/concurrency.md:6\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Il sistema di tipo Rust gioca un ruolo importante nella creazione di molti \"\n\"bug di concorrenza bug in fase di compilazione. Questo è spesso indicato \"\n\"come _concorrenza senza paura_ da quando tu può fare affidamento sul \"\n\"compilatore per garantire la correttezza in fase di esecuzione.\"\n\n#: src/concurrency/threads.md:3\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"I thread Rust funzionano in modo simile ai thread in altre lingue:\"\n\n#: src/concurrency/threads.md:12\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md:18\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md:24\n#, fuzzy\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\"I thread sono tutti thread demoni, il thread principale non li aspetta.\"\n\n#: src/concurrency/threads.md:25\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"I thread panic sono indipendenti l'uno dall'altro.\"\n\n#: src/concurrency/threads.md:26\n#, fuzzy\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Panics può trasportare un payload, che può essere decompresso con \"\n\"`downcast_ref`.\"\n\n#: src/concurrency/threads.md:32\n#, fuzzy\nmsgid \"\"\n\"Notice that the thread is stopped before it reaches 10 --- the main thread \"\n\"is not waiting.\"\nmsgstr \"\"\n\"Si noti che il thread viene interrotto prima che raggiunga 10 — il thread \"\n\"principale lo è non aspettare.\"\n\n#: src/concurrency/threads.md:35\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish.\"\nmsgstr \"\"\n\"Usa `let handle = thread::spawn(...)` e successivamente `handle.join()` per \"\n\"aspettare il filo per finire.\"\n\n#: src/concurrency/threads.md:38\n#, fuzzy\nmsgid \"Trigger a panic in the thread, notice how this doesn't affect `main`.\"\nmsgstr \"\"\n\"Attivare un panico nel thread, notare come questo non influisca su `main`.\"\n\n#: src/concurrency/threads.md:40\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"panic payload. This is a good time to talk about [`Any`](https://doc.rust-\"\n\"lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Usa il valore di ritorno `Result` da `handle.join()` per ottenere l'accesso \"\n\"al panico carico utile. Questo è un buon momento per parlare di [`Any`]\"\n\"(https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/scoped-threads.md:3\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"I thread normali non possono prendere in prestito dal loro ambiente:\"\n\n#: src/concurrency/scoped-threads.md:20\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Tuttavia, puoi utilizzare un [thread con ambito](https://doc.rust-lang.org/\"\n\"std/thread/fn.scope.html) per questo:\"\n\n#: src/concurrency/scoped-threads.md:40\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"La ragione di ciò è che quando la funzione `thread::scope` viene completata, \"\n\"è garantito che tutti i thread vengano uniti, in modo che possano restituire \"\n\"dati presi in prestito.\"\n\n#: src/concurrency/scoped-threads.md:42\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Si applicano le normali regole di prestito di Rust: puoi prendere in \"\n\"prestito in modo mutabile da un thread o immutabile da un numero qualsiasi \"\n\"di thread.\"\n\n#: src/concurrency/channels.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"I canali Rust hanno due parti: un `Sender<T>` e un `Receiver<T>`. Le due \"\n\"parti sono collegati tramite il canale, ma vedi solo i punti finali.\"\n\n#: src/concurrency/channels.md:15 src/concurrency/channels.md:16\n#: src/concurrency/channels.md:20\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md:26\n#, fuzzy\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` sta per Multi-Producer, Single-Consumer. `Sender` e `SyncSender` \"\n\"implementano `Clone` (quindi puoi creare più produttori) ma `Receiver` no.\"\n\n#: src/concurrency/channels.md:29\n#, fuzzy\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` e `recv()` restituiscono `Risultato`. Se restituiscono \\\"Err\\\", \"\n\"significa che la controparte \\\"Mittente\\\" o `Receiver` viene eliminato e il \"\n\"canale viene chiuso.\"\n\n#: src/concurrency/channels/unbounded.md:3\n#, fuzzy\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Ottieni un canale illimitato e asincrono con `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md:16\n#: src/concurrency/channels/bounded.md:16\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md:17\n#: src/concurrency/channels/bounded.md:17\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md:19\n#: src/concurrency/channels/bounded.md:19\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md:24\n#: src/concurrency/channels/bounded.md:24\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md:3\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"I canali limitati e sincroni fanno in modo che `send` blocchi il thread \"\n\"corrente:\"\n\n#: src/concurrency/channels/bounded.md:31\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md:34\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md:36\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md:3\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Come fa Rust a sapere di vietare l'accesso condiviso attraverso il thread? \"\n\"La risposta è in due tratti:\"\n\n#: src/concurrency/send-sync.md:6\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): un tipo `T` \"\n\"è `Send` se è sicuro spostare una `T` attraverso un thread confine.\"\n\n#: src/concurrency/send-sync.md:8\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): un tipo `T` \"\n\"è `Sync` se è sicuro spostare una `&T` attraverso un thread confine.\"\n\n#: src/concurrency/send-sync.md:11\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"\\\"Send\\\" e \\\"Sync\\\" sono [tratti non sicuri](../unsafe/unsafe-traits.md). Il \"\n\"compilatore li deriverà automaticamente per i tuoi tipi purché contengano \"\n\"solo i tipi \\\"Send\\\" e \\\"Sync\\\". Puoi anche implementarli manualmente quando \"\n\"tu sapere che è valido.\"\n\n#: src/concurrency/send-sync.md:21\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Si può pensare a questi tratti come indicatori che il tipo ha determinate \"\n\"proprietà di sicurezza del thread.\"\n\n#: src/concurrency/send-sync.md:23\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"Possono essere usati nei vincoli generici come tratti normali.\"\n\n#: src/concurrency/send-sync/send.md:3\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Un tipo `T` è [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"se è sicuro spostare un valore `T` in un altro thread.\"\n\n#: src/concurrency/send-sync/send.md:5\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"L'effetto dello spostamento della proprietà su un altro thread è che i \"\n\"_destructors_ verranno eseguiti in quel filo. Quindi la domanda è quando \"\n\"puoi allocare un valore in un thread e deallocarlo in un altro.\"\n\n#: src/concurrency/send-sync/send.md:13\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md:3\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Un tipo `T` è [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"se è sicuro accedere a un valore `T` da più thread contemporaneamente.\"\n\n#: src/concurrency/send-sync/sync.md:6\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Più precisamente la definizione è:\"\n\n#: src/concurrency/send-sync/sync.md:8\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` è `Sync` se e solo se `&T` è `Send`\"\n\n#: src/concurrency/send-sync/sync.md:14\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Questa affermazione è essenzialmente un modo abbreviato per dire che se un \"\n\"tipo è thread-safe per l'uso condiviso, è anche thread-safe per passarne i \"\n\"riferimenti attraverso i thread.\"\n\n#: src/concurrency/send-sync/sync.md:18\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Questo perché se un tipo è Sync significa che può essere condiviso tra più \"\n\"thread senza il rischio di corse di dati o altri problemi di \"\n\"sincronizzazione, quindi è sicuro spostarlo su un altro thread. Un \"\n\"riferimento al tipo è anche sicuro da spostare in un altro thread, perché è \"\n\"possibile accedere ai dati a cui fa riferimento da qualsiasi thread in modo \"\n\"sicuro.\"\n\n#: src/concurrency/send-sync/examples.md:3\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"\\\"Invia + Sincronizza\\\".\"\n\n#: src/concurrency/send-sync/examples.md:5\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\"La maggior parte dei tipi che incontri sono \\\"Invia + sincronizzazione\\\":\"\n\n#: src/concurrency/send-sync/examples.md:7\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:8\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:9\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:10\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:11\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:12\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md:14\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"I tipi generici sono in genere \\\"Send + Sync\\\" quando i parametri di tipo lo \"\n\"sono \\\"Invia + Sincronizza\\\".\"\n\n#: src/concurrency/send-sync/examples.md:17\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"\\\"Invia + !Sincronizza\\\".\"\n\n#: src/concurrency/send-sync/examples.md:19\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Questi tipi possono essere spostati in altri thread, ma non sono thread-\"\n\"safe. Tipicamente a causa della mutevolezza interna:\"\n\n#: src/concurrency/send-sync/examples.md:22\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md:23\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Ricevitore<T>`\"\n\n#: src/concurrency/send-sync/examples.md:24\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cella<T>`\"\n\n#: src/concurrency/send-sync/examples.md:25\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCella<T>`\"\n\n#: src/concurrency/send-sync/examples.md:27\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Invia + Sincronizza`\"\n\n#: src/concurrency/send-sync/examples.md:29\n#, fuzzy\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Questi tipi sono thread-safe, ma non possono essere spostati in un altro \"\n\"thread:\"\n\n#: src/concurrency/send-sync/examples.md:31\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: utilizza primitive a livello di sistema operativo che \"\n\"devono essere deallocate su thread che li ha creati.\"\n\n#: src/concurrency/send-sync/examples.md:34\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Invia + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md:36\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Questi tipi non sono thread-safe e non possono essere spostati in altri \"\n\"thread:\"\n\n#: src/concurrency/send-sync/examples.md:38\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: ogni `Rc<T>` ha un riferimento a un `RcBox<T>`, che contiene un \"\n\"conteggio dei riferimenti non atomici.\"\n\n#: src/concurrency/send-sync/examples.md:40\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust presuppone che i puntatori grezzi possano avere \"\n\"caratteri speciali considerazioni sulla concorrenza\"\n\n#: src/concurrency/shared_state.md:3\n#, fuzzy\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\"Rust utilizza il sistema dei tipi per imporre la sincronizzazione dei dati \"\n\"condivisi. Questo è fatto principalmente tramite due tipi:\"\n\n#: src/concurrency/shared_state.md:6\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), riferimento \"\n\"atomico contato `T`: gestisce la condivisione tra thread e si occupa di \"\n\"deallocare `T` quando viene eliminato l'ultimo riferimento,\"\n\n#: src/concurrency/shared_state.md:8\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n\"garantisce l'accesso mutuamente esclusivo al valore `T`.\"\n\n#: src/concurrency/shared_state/arc.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) consente \"\n\"l'accesso condiviso in sola lettura tramite `Arc::clone`:\"\n\n#: src/concurrency/shared_state/arc.md:16\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md:21\n#: src/concurrency/shared_state/example.md:17\n#: src/concurrency/shared_state/example.md:45\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md:29\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` sta per \\\"Atomic Reference Counted\\\", una versione thread-safe di `Rc` \"\n\"che usa atomic operazioni.\"\n\n#: src/concurrency/shared_state/arc.md:31\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementa `Clone` indipendentemente dal fatto che `T` lo faccia. \"\n\"Implementa `Send` e `Sync` se e solo `T` li implementa entrambi.\"\n\n#: src/concurrency/shared_state/arc.md:33\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` ha il costo delle operazioni atomiche che vengono eseguite, \"\n\"ma dopo ciò l'uso di `T` è gratuito.\"\n\n#: src/concurrency/shared_state/arc.md:35\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Attenzione ai cicli di riferimento, `Arc` non usa un garbage collector per \"\n\"rilevarli.\"\n\n#: src/concurrency/shared_state/arc.md:37\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` può aiutare.\"\n\n#: src/concurrency/shared_state/mutex.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) \"\n\"garantisce l'esclusione reciproca _e_ consente l'accesso mutabile a `T` \"\n\"dietro un'interfaccia di sola lettura:\"\n\n#: src/concurrency/shared_state/mutex.md:12\n#: src/concurrency/shared_state/mutex.md:19\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md:23\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Nota come abbiamo una coperta [`impl<T: Send> Sync per Mutex<T>`](https://\"\n\"doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E). \"\n\"implementazione.\"\n\n#: src/concurrency/shared_state/mutex.md:32\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` in Rust sembra una raccolta con un solo elemento: i dati protetti.\"\n\n#: src/concurrency/shared_state/mutex.md:34\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Non è possibile dimenticare di acquisire il mutex prima di accedere ai dati \"\n\"protetti.\"\n\n#: src/concurrency/shared_state/mutex.md:36\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Puoi ottenere un `&mut T` da un `&Mutex<T>` prendendo il lock. Il \"\n\"`MutexGuard` assicura che il file `&mut T` non sopravvive al blocco \"\n\"mantenuto.\"\n\n#: src/concurrency/shared_state/mutex.md:38\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"`Mutex<T>` implementa sia `Send` che `Sync` se `T` implementa `Send`.\"\n\n#: src/concurrency/shared_state/mutex.md:40\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Una controparte del blocco lettura-scrittura - `RwLock`.\"\n\n#: src/concurrency/shared_state/mutex.md:41\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Perché `lock()` restituisce un `Risultato`?\"\n\n#: src/concurrency/shared_state/mutex.md:42\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Se il thread che conteneva il `Mutex` va nel panico, il `Mutex` diventa \"\n\"\\\"avvelenato\\\" per segnalare che i dati protetti potrebbero trovarsi in uno \"\n\"stato incoerente. Chiamare `lock()` su un mutex avvelenato fallisce con un \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"Puoi chiamare `into_inner()` sull'errore per recuperare i dati \"\n\"indipendentemente.\"\n\n#: src/concurrency/shared_state/example.md:3\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Vediamo `Arc` e `Mutex` in azione:\"\n\n#: src/concurrency/shared_state/example.md:6\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md:23\n#, fuzzy\nmsgid \"Possible solution:\"\nmsgstr \"Possibile soluzione:\"\n\n#: src/concurrency/shared_state/example.md:49\n#, fuzzy\nmsgid \"Notable parts:\"\nmsgstr \"Parti notevoli:\"\n\n#: src/concurrency/shared_state/example.md:51\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` è racchiuso sia in `Arc` che in `Mutex`, perché i loro interessi sono \"\n\"ortogonali.\"\n\n#: src/concurrency/shared_state/example.md:53\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Avvolgere un `Mutex` in un `Arc` è un modello comune per condividere lo \"\n\"stato mutabile tra i thread.\"\n\n#: src/concurrency/shared_state/example.md:55\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` deve essere clonato come `v2` prima di poter essere spostato in \"\n\"un altro thread. Nota che \\\"move\\\" è stato aggiunto alla firma lambda.\"\n\n#: src/concurrency/shared_state/example.md:57\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"I blocchi vengono introdotti per restringere il più possibile l'ambito di \"\n\"`LockGuard`.\"\n\n#: src/exercises/concurrency/morning.md:3\n#, fuzzy\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"Mettiamo in pratica le nostre nuove abilità di concorrenza con\"\n\n#: src/exercises/concurrency/morning.md:5\n#, fuzzy\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"Filosofi a tavola: un classico problema in concorrenza.\"\n\n#: src/exercises/concurrency/morning.md:7\n#, fuzzy\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\"Verifica link multi-thread: un progetto più ampio in cui utilizzerai Cargo \"\n\"scaricare le dipendenze e quindi controllare i collegamenti in parallelo.\"\n\n#: src/exercises/concurrency/dining-philosophers.md:3\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Il problema dei filosofi da pranzo è un classico problema in concorrenza:\"\n\n#: src/exercises/concurrency/dining-philosophers.md:5\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Cinque filosofi cenano insieme alla stessa tavola. Ogni filosofo ha il suo \"\n\"proprio posto a tavola. C'è una forchetta tra ogni piatto. Il piatto servito \"\n\"è una specie di spaghetto che si mangia con due forchette. Ogni filosofo può \"\n\"solo alternativamente pensa e mangia. Inoltre, un filosofo può solo mangiare \"\n\"il loro gli spaghetti quando hanno sia la forchetta destra che quella \"\n\"sinistra. Quindi solo due forchette essere disponibile quando i loro due \"\n\"vicini più vicini stanno pensando, non mangiando. Dopo un singolo filosofo \"\n\"finisce di mangiare, metteranno giù entrambe le forchette.\"\n\n#: src/exercises/concurrency/dining-philosophers.md:13\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Avrai bisogno di un'[installazione Cargo](../../cargo/running-locally.md) \"\n\"locale per questo esercizio. Copia il codice qui sotto in un file chiamato \"\n\"`src/main.rs`, compila il file spazi vuoti e verificare che `cargo run` non \"\n\"vada in stallo:\"\n\n#: src/exercises/concurrency/dining-philosophers.md:28\n#: src/exercises/concurrency/dining-philosophers-async.md:23\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:36\n#: src/exercises/concurrency/solutions-morning.md:24\n#: src/exercises/concurrency/dining-philosophers-async.md:31\n#: src/exercises/concurrency/solutions-afternoon.md:25\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:41\n#: src/exercises/concurrency/dining-philosophers-async.md:37\n#: src/exercises/concurrency/solutions-afternoon.md:31\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:42\n#: src/exercises/concurrency/solutions-morning.md:33\n#: src/exercises/concurrency/dining-philosophers-async.md:38\n#: src/exercises/concurrency/solutions-afternoon.md:38\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:48\n#: src/exercises/concurrency/solutions-morning.md:39\n#: src/exercises/concurrency/dining-philosophers-async.md:44\n#: src/exercises/concurrency/solutions-afternoon.md:46\n#, fuzzy\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"casse HAL\"\n\n#: src/exercises/concurrency/dining-philosophers.md:48\n#: src/exercises/concurrency/solutions-morning.md:39\n#: src/exercises/concurrency/dining-philosophers-async.md:44\n#: src/exercises/concurrency/solutions-afternoon.md:46\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:48\n#: src/exercises/concurrency/solutions-morning.md:39\n#: src/exercises/concurrency/dining-philosophers-async.md:44\n#: src/exercises/concurrency/solutions-afternoon.md:46\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:48\n#: src/exercises/concurrency/solutions-morning.md:39\n#: src/exercises/concurrency/dining-philosophers-async.md:44\n#: src/exercises/concurrency/solutions-afternoon.md:46\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:48\n#: src/exercises/concurrency/solutions-morning.md:39\n#: src/exercises/concurrency/dining-philosophers-async.md:44\n#: src/exercises/concurrency/solutions-afternoon.md:46\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:51\n#: src/exercises/concurrency/dining-philosophers-async.md:48\n#: src/exercises/concurrency/solutions-afternoon.md:50\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:53\n#: src/exercises/concurrency/dining-philosophers-async.md:50\n#: src/exercises/concurrency/solutions-afternoon.md:54\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:55\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:57\n#: src/exercises/concurrency/dining-philosophers-async.md:54\n#: src/exercises/concurrency/solutions-afternoon.md:88\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md:61\n#, fuzzy\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Puoi usare il seguente `Cargo.toml`:\"\n\n#: src/exercises/concurrency/dining-philosophers.md:65\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:3\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Usiamo le nostre nuove conoscenze per creare un verificatore di collegamenti \"\n\"multi-thread. Dovrebbe iniziare da una pagina Web e verificare che i \"\n\"collegamenti sulla pagina siano validi. Dovrebbe controlla ricorsivamente \"\n\"altre pagine sullo stesso dominio e continua a farlo fino a quando all le \"\n\"pagine sono state convalidate.\"\n\n#: src/exercises/concurrency/link-checker.md:8\n#, fuzzy\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Per questo, avrai bisogno di un client HTTP come [`reqwest`](https://docs.rs/\"\n\"reqwest/). Crea un nuovo Progetto Cargo e `richiedilo` come dipendenza con:\"\n\n#: src/exercises/concurrency/link-checker.md:17\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Se `cargo add` fallisce con `error: no such subcommand`, modifica il file \"\n\"File `Cargo.toml` a mano. Aggiungere le dipendenze elencate di seguito.\"\n\n#: src/exercises/concurrency/link-checker.md:20\n#, fuzzy\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\"Avrai anche bisogno di un modo per trovare i link. Possiamo usare [`scraper`]\"\n\"(https://docs.rs/scraper/) per questo:\"\n\n#: src/exercises/concurrency/link-checker.md:26\n#, fuzzy\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\"Infine, avremo bisogno di un modo per gestire gli errori. Usiamo \"\n\"[`thiserror`](https://docs.rs/thiserror/) per Quello:\"\n\n#: src/exercises/concurrency/link-checker.md:33\n#, fuzzy\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Le chiamate `cargo add` aggiorneranno il file `Cargo.toml` in questo modo:\"\n\n#: src/exercises/concurrency/link-checker.md:37\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:50\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Ora puoi scaricare la pagina iniziale. Prova con un piccolo sito come \"\n\"`https://www.google.org/`.\"\n\n#: src/exercises/concurrency/link-checker.md:53\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Il tuo file `src/main.rs` dovrebbe assomigliare a questo:\"\n\n#: src/exercises/concurrency/link-checker.md:65\n#: src/exercises/concurrency/solutions-morning.md:97\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:67\n#: src/exercises/concurrency/solutions-morning.md:99\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:78\n#: src/exercises/concurrency/solutions-morning.md:110\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:96\n#: src/exercises/concurrency/solutions-morning.md:128\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:103\n#: src/exercises/concurrency/solutions-morning.md:135\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:112\n#: src/exercises/concurrency/solutions-morning.md:245\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:115\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:116\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md:121\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Esegui il codice in `src/main.rs` con\"\n\n#: src/exercises/concurrency/link-checker.md:129\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Usa i thread per controllare i collegamenti in parallelo: invia gli URL da \"\n\"controllare a a channel e lasciare che alcuni thread controllino gli URL in \"\n\"parallelo.\"\n\n#: src/exercises/concurrency/link-checker.md:131\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Estendilo per estrarre in modo ricorsivo i collegamenti da tutte le pagine \"\n\"del file dominio \\\"www.google.org\\\". Metti un limite massimo di 100 pagine o \"\n\"giù di lì in modo che tu non finire per essere bloccato dal sito.\"\n\n#: src/exercises/concurrency/solutions-morning.md:1\n#, fuzzy\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"Esercizio mattutino in concorrenza\"\n\n#: src/exercises/concurrency/solutions-morning.md:5\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([torna all'esercizio](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md:29\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:53\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:77\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:82\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Correttore di Link a Thread multipli\"\n\n#: src/exercises/concurrency/solutions-morning.md:84\n#, fuzzy\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([torna all'esercizio](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md:154\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:162\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:188\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:229\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md:247\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md:1\n#, fuzzy\nmsgid \"Async Rust\"\nmsgstr \"Ruggine asincrona\"\n\n#: src/async.md:3\n#, fuzzy\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"\\\"Async\\\" è un modello di concorrenza in cui più attività vengono eseguite \"\n\"contemporaneamente da eseguire ogni attività fino a quando non si \"\n\"bloccherebbe, quindi passare a un'altra attività che è pronto a fare \"\n\"progressi. Il modello consente di eseguire un numero maggiore di attività su \"\n\"a numero limitato di thread. Questo perché il sovraccarico per attività è in \"\n\"genere molto basso e i sistemi operativi forniscono primitive per \"\n\"l'identificazione efficiente I/O che è in grado di procedere.\"\n\n#: src/async.md:10\n#, fuzzy\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"L'operazione asincrona di Rust si basa sui \\\"futuri\\\", che rappresentano il \"\n\"lavoro che potrebbe essere completata in futuro. I futures vengono \"\n\"\\\"interrogati\\\" fino a quando non lo segnalano sono completi.\"\n\n#: src/async.md:14\n#, fuzzy\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"I futures vengono interrogati da un runtime asincrono e diversi runtime lo \"\n\"sono disponibile.\"\n\n#: src/async.md:19\n#, fuzzy\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python ha un modello simile nel suo `asyncio`. Tuttavia, il suo tipo \"\n\"\\\"Futuro\\\" è basato su callback e non su polling. I programmi Python \"\n\"asincroni richiedono un \\\"loop\\\", simile a un runtime in Rust.\"\n\n#: src/async.md:23\n#, fuzzy\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"La \\\"promessa\\\" di JavaScript è simile, ma ancora una volta basata su \"\n\"callback. La lingua runtime implementa il ciclo di eventi, tanti dei \"\n\"dettagli di Promise risoluzione sono nascosti.\"\n\n#: src/async/async-await.md:3\n#, fuzzy\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"Ad alto livello, il codice asincrono di Rust assomiglia molto al codice \"\n\"sequenziale \\\"normale\\\":\"\n\n#: src/async/async-await.md:10\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md:27\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md:30\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/async/async-await.md:31\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md:33\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md:36\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md:39\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md:42\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md:45\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md:3\n#, fuzzy\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Futuro`](https://doc.rust-lang.org/std/future/trait.Future.html) è un \"\n\"tratto, implementato da oggetti che rappresentano un'operazione che potrebbe \"\n\"non essere ancora completo. È possibile eseguire il polling di un futuro e \"\n\"`poll` restituisce a [`Sondaggio`](https://doc.rust-lang.org/std/task/enum.\"\n\"Poll.html).\"\n\n#: src/async/futures.md:23\n#, fuzzy\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"Una funzione asincrona restituisce un `impl Future`. È anche possibile (ma \"\n\"non comune). implementa `Future` per i tuoi tipi. Ad esempio, è stato \"\n\"restituito \\\"JoinHandle\\\". da `tokio::spawn` implementa `Future` per \"\n\"consentire l'unione ad esso.\"\n\n#: src/async/futures.md:27\n#, fuzzy\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"La parola chiave `.await`, applicata a un Future, fa sì che la funzione \"\n\"async corrente si attivi mettere in pausa fino a quando Future non è pronto, \"\n\"quindi valuta il suo output.\"\n\n#: src/async/futures.md:32\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md:35\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md:38\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md:41\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md:3\n#, fuzzy\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"Un _runtime_ fornisce supporto per l'esecuzione di operazioni in modo \"\n\"asincrono (a _reattore_) ed è responsabile dell'esecuzione dei futures (un \"\n\"_esecutore_). La ruggine non ha un runtime \\\"incorporato\\\", ma sono \"\n\"disponibili diverse opzioni:\"\n\n#: src/async/runtimes.md:7\n#, fuzzy\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/) - performante, con un ecosistema ben sviluppato \"\n\"di funzionalità come [Hyper](https://hyper.rs/) per HTTP o [Tonic](https://\"\n\"github.com/hyperium/tonic) per gRPC.\"\n\n#: src/async/runtimes.md:10\n#, fuzzy\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/) - mira a essere uno \\\"std per async\\\" e \"\n\"include un runtime di base in `async::task`.\"\n\n#: src/async/runtimes.md:12\n#, fuzzy\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/) - semplice e leggero\"\n\n#: src/async/runtimes.md:14\n#, fuzzy\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"Diverse applicazioni più grandi hanno i propri tempi di esecuzione. Per \"\n\"esempio, [Fucsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/\"\n\"src/lib/fuchsia-async/src/lib.rs) ne ha già uno.\"\n\n#: src/async/runtimes.md:20\n#, fuzzy\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"Si noti che dei runtime elencati, solo Tokio è supportato in Rust terreno di \"\n\"gioco. Anche il parco giochi non consente alcun I/O, quindi molto \"\n\"interessante le cose asincrone non possono essere eseguite nel parco giochi.\"\n\n#: src/async/runtimes.md:24\n#, fuzzy\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"I futures sono \\\"inerti\\\" in quanto non fanno nulla (nemmeno avviano un I/O \"\n\"operazione) a meno che non ci sia un esecutore che li interroga. Questo \"\n\"differisce da JS Promesse, ad esempio, che andranno a buon fine anche se non \"\n\"lo saranno mai usato.\"\n\n#: src/async/runtimes/tokio.md:3\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokyo fornisce:\"\n\n#: src/async/runtimes/tokio.md:5\n#, fuzzy\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"Un runtime multithread per l'esecuzione di codice asincrono.\"\n\n#: src/async/runtimes/tokio.md:6\n#, fuzzy\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"Una versione asincrona della libreria standard.\"\n\n#: src/async/runtimes/tokio.md:7\n#, fuzzy\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"Un grande ecosistema di biblioteche.\"\n\n#: src/async/runtimes/tokio.md:14\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md:24\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md:32\n#, fuzzy\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"Con la macro `tokio::main` ora possiamo rendere `main` asincrono.\"\n\n#: src/async/runtimes/tokio.md:34\n#, fuzzy\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"La funzione `spawn` crea un nuovo \\\"task\\\" simultaneo.\"\n\n#: src/async/runtimes/tokio.md:36\n#, fuzzy\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"Nota: `spawn` prende un `Future`, non devi chiamare `.await` su `count_to`.\"\n\n#: src/async/runtimes/tokio.md:38\n#, fuzzy\nmsgid \"**Further exploration:**\"\nmsgstr \"**Ulteriori esplorazioni:**\"\n\n#: src/async/runtimes/tokio.md:40\n#, fuzzy\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"Perché `count_to` non arriva (di solito) a 10? Questo è un esempio di async \"\n\"cancellazione. `tokio::spawn` restituisce un handle che può essere atteso \"\n\"per attendere finché non finisce.\"\n\n#: src/async/runtimes/tokio.md:44\n#, fuzzy\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"Prova `count_to(10).await` invece di spawnare.\"\n\n#: src/async/runtimes/tokio.md:46\n#, fuzzy\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"Prova ad attendere il task restituito da `tokio::spawn`.\"\n\n#: src/async/tasks.md:3\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md:5\n#, fuzzy\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"Un'attività ha un singolo futuro di primo livello che l'esecutore interroga \"\n\"per fare progressi. Quel futuro può avere uno o più futuri nidificati che il \"\n\"suo metodo \\\"poll\\\" esegue il polling, corrispondente vagamente a uno stack \"\n\"di chiamate. La concorrenza all'interno di un'attività è possibile tramite \"\n\"polling di più futuri figli, come correre un timer e un'operazione di I/O.\"\n\n#: src/async/tasks.md:16\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:17\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:22\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:25\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:25 src/async/tasks.md:28 src/async/tasks.md:31\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:30\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md:39 src/async/control-flow/join.md:36\n#, fuzzy\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"Copia questo esempio nel tuo `src/main.rs` preparato ed eseguilo da lì.\"\n\n#: src/async/tasks.md:41\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md:45\n#, fuzzy\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"Chiedi agli studenti di visualizzare quale sarebbe lo stato del server di \"\n\"esempio con a pochi client connessi. Quali compiti esistono? Quali sono i \"\n\"loro futuri?\"\n\n#: src/async/tasks.md:48\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"Questa è la prima volta che vediamo un blocco `async`. Questo è simile a a \"\n\"chiusura, ma non accetta argomenti. Il suo valore di ritorno è un Futuro, \"\n\"simile a un `async fn`.\"\n\n#: src/async/tasks.md:52\n#, fuzzy\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"Rifattorizzare il blocco asincrono in una funzione e migliorare la gestione \"\n\"degli errori utilizzando `?`.\"\n\n#: src/async/channels.md:3\n#, fuzzy\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\"Diversi crate hanno il supporto per `async`/`await`. Ad esempio i canali \"\n\"`tokio`:\"\n\n#: src/async/channels.md:13\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md:16\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md:24\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md:25\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md:29\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md:35\n#, fuzzy\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\"Cambia la dimensione del canale in \\\"3\\\" e guarda come influisce \"\n\"sull'esecuzione.\"\n\n#: src/async/channels.md:37\n#, fuzzy\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\"Nel complesso, l'interfaccia è simile ai canali `sync` come si vede nel file \"\n\"[lezione mattutina](concurrency/channels.md).\"\n\n#: src/async/channels.md:40\n#, fuzzy\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"Prova a rimuovere la chiamata `std::mem::drop`. Che succede? Perché?\"\n\n#: src/async/channels.md:42\n#, fuzzy\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"La cassa [Flume](https://docs.rs/flume/latest/flume/) ha canali che \"\n\"implementa sia `sync` che `async` `send` e `recv`. Questo può essere \"\n\"conveniente per applicazioni complesse con attività di elaborazione di CPU e \"\n\"IO pesanti.\"\n\n#: src/async/channels.md:46\n#, fuzzy\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"Ciò che rende preferibile lavorare con i canali `async` è la capacità di \"\n\"combinare loro con altri `futuri` per combinarli e creare un flusso di \"\n\"controllo complesso.\"\n\n#: src/async/control-flow.md:1\n#, fuzzy\nmsgid \"Futures Control Flow\"\nmsgstr \"Flusso di controllo dei futures\"\n\n#: src/async/control-flow.md:3\n#, fuzzy\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\"I futures possono essere combinati insieme per produrre grafici di flusso di \"\n\"calcolo simultanei. Noi ho già visto le attività, che funzionano come thread \"\n\"di esecuzione indipendenti.\"\n\n#: src/async/control-flow.md:6\n#, fuzzy\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"[Partecipa](control-flow/join.md)\"\n\n#: src/async/control-flow.md:7\n#, fuzzy\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"[Seleziona](control-flow/select.md)\"\n\n#: src/async/control-flow/join.md:3\n#, fuzzy\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"Un'operazione di join attende fino a quando tutti i futures sono pronti e \"\n\"restituisce una raccolta dei loro risultati. Questo è simile a \\\"Promise.\"\n\"all\\\" in JavaScript o `asyncio.gather` in Python.\"\n\n#: src/async/control-flow/join.md:21\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md:22\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md:23\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md:24\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md:38\n#, fuzzy\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"Per future multiple di tipi disgiunti, puoi usare `std::future::join!` ma \"\n\"devi sapere quanti futuri avrai al momento della compilazione. Questo è \"\n\"attualmente nella cassa `futures`, presto sarà stabilizzata in `std::future`.\"\n\n#: src/async/control-flow/join.md:42\n#, fuzzy\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"Il rischio di \\\"unirsi\\\" è che uno dei futuri potrebbe non risolversi mai, \"\n\"questo sì causare l'arresto del programma.\"\n\n#: src/async/control-flow/join.md:45\n#, fuzzy\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"Puoi anche combinare `join_all` con `join!`, ad esempio per unire tutte le \"\n\"richieste a un servizio http così come una query di database. Prova ad \"\n\"aggiungere un `tokio::time::sleep` nel futuro, usando `futures::join!`. \"\n\"Questo non è un timeout (che richiede `select!`, spiegato nel prossimo \"\n\"capitolo), ma dimostra `join!`.\"\n\n#: src/async/control-flow/select.md:3\n#, fuzzy\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"Un'operazione di selezione attende fino a quando uno qualsiasi di un insieme \"\n\"di futures è pronto e risponde a il risultato di quel futuro. In JavaScript, \"\n\"è simile a `Promise.race`. In Python, confronta con `asyncio.wait(task_set, \"\n\"return_when=asyncio.FIRST_COMPLETED)`.\"\n\n#: src/async/control-flow/select.md:8\n#, fuzzy\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"Di solito è una macro, simile a match, con ogni braccio della forma `pattern \"\n\"= futuro => istruzione`. Quando il futuro è pronto, l'istruzione viene \"\n\"eseguita con il variabile legata al risultato del futuro.\"\n\n#: src/async/control-flow/select.md:40\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:40\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:44\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:44\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:49\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:51\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md:57\n#, fuzzy\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"In questo esempio, abbiamo una gara tra un gatto e un cane. \"\n\"`first_animal_to_finish_race` ascolta entrambi i canali e sceglierà quello \"\n\"che preferisci arriva prima. Poiché il cane impiega 50 ms, vince contro il \"\n\"gatto prendere 500 ms secondi.\"\n\n#: src/async/control-flow/select.md:62\n#, fuzzy\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\"In questo esempio puoi usare i canali `oneshot` come dovrebbero ricevere un \"\n\"solo \\\"invio\\\".\"\n\n#: src/async/control-flow/select.md:65\n#, fuzzy\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\"Prova ad aggiungere una scadenza alla gara, dimostrando la selezione di \"\n\"diversi tipi di futuri.\"\n\n#: src/async/control-flow/select.md:68\n#, fuzzy\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"Nota che `select!` sposta i valori che gli vengono dati. È più facile da \"\n\"usare quando ogni esecuzione di `select!` crea nuovi futuri. Un'alternativa \"\n\"è passa `&mut future` invece del futuro stesso, ma questo può portare a \"\n\"problemi, ulteriormente discussi nella diapositiva di blocco.\"\n\n#: src/async/control-flow/select.md:71\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md:1\n#, fuzzy\nmsgid \"Pitfalls of async/await\"\nmsgstr \"Insidie di async/await\"\n\n#: src/async/pitfalls.md:3\n#, fuzzy\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\"Async / await fornisce un'astrazione comoda ed efficiente per la \"\n\"programmazione asincrona simultanea. Tuttavia, anche il modello async/await \"\n\"in Rust ha la sua parte di insidie e pistole. Ne illustriamo alcuni in \"\n\"questo capitolo:\"\n\n#: src/async/pitfalls.md:7\n#, fuzzy\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"[Blocco dell'esecutore](trappole/blocking-executor.md)\"\n\n#: src/async/pitfalls.md:8\n#, fuzzy\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"[Pin](trappole/pin.md)\"\n\n#: src/async/pitfalls.md:9\n#, fuzzy\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"[Tratti asincroni](trapano/async-traits.md)\"\n\n#: src/async/pitfalls.md:10\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md:1\n#, fuzzy\nmsgid \"Blocking the executor\"\nmsgstr \"Blocco dell'esecutore\"\n\n#: src/async/pitfalls/blocking-executor.md:3\n#, fuzzy\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"La maggior parte dei runtime asincroni consente solo l'esecuzione simultanea \"\n\"delle attività di I/O. Ciò significa che le attività di blocco della CPU \"\n\"bloccheranno l'esecutore e impediranno l'esecuzione di altre attività. Una \"\n\"soluzione semplice consiste nell'usare metodi equivalenti asincroni ove \"\n\"possibile.\"\n\n#: src/async/pitfalls/blocking-executor.md:14\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md:19\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md:29\n#, fuzzy\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"Esegui il codice e verifica che le interruzioni avvengano consecutivamente \"\n\"anziché in concomitanza.\"\n\n#: src/async/pitfalls/blocking-executor.md:32\n#, fuzzy\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"Il profilo `\\\"current_thread\\\"` pone tutte le attività su un singolo thread. \"\n\"Questo rende il effetto più evidente, ma il bug è ancora presente nel \"\n\"multithread gusto.\"\n\n#: src/async/pitfalls/blocking-executor.md:36\n#, fuzzy\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"Passa da `std::thread::sleep` a `tokio::time::sleep` e attendi il risultato.\"\n\n#: src/async/pitfalls/blocking-executor.md:38\n#, fuzzy\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"Un'altra soluzione potrebbe essere `tokio::task::spawn_blocking` che genera \"\n\"un file effettivo thread e trasforma il suo handle in un futuro senza \"\n\"bloccare l'esecutore.\"\n\n#: src/async/pitfalls/blocking-executor.md:41\n#, fuzzy\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"Non dovresti pensare alle attività come thread del sistema operativo. Non \"\n\"mappano 1 a 1 e la maggior parte gli esecutori consentiranno l'esecuzione di \"\n\"molte attività su un singolo thread del sistema operativo. Questo è \"\n\"particolarmente problematico quando si interagisce con altre biblioteche \"\n\"tramite FFI, dove quella libreria potrebbe dipendere dall'archiviazione \"\n\"locale del thread o essere mappata su un sistema operativo specifico thread \"\n\"(ad esempio, CUDA). Preferisci `tokio::task::spawn_blocking` in tali \"\n\"situazioni.\"\n\n#: src/async/pitfalls/blocking-executor.md:47\n#, fuzzy\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"Usa i mutex di sincronizzazione con attenzione. Mantenere un mutex sopra un \"\n\"`.await` può causarne un altro attività da bloccare e tale attività potrebbe \"\n\"essere in esecuzione sullo stesso thread.\"\n\n#: src/async/pitfalls/pin.md:3\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:7\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:11\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:20\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:28\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:35\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:38\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:41\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:45\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:52\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:53\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:62\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:69\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:72\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:75\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:78\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:89\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:103\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:107\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:111\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:114\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:120\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md:124\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md:3\n#, fuzzy\nmsgid \"\"\n\"Async methods in traits are not yet supported in the stable channel ([An \"\n\"experimental feature exists in nightly and should be stabilized in the mid \"\n\"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n\"nightly.html))\"\nmsgstr \"\"\n\"I metodi asincroni nei tratti non sono ancora supportati nel canale stabile \"\n\"(\\\\[Esiste una funzionalità sperimentale in nightly e dovrebbe essere \"\n\"stabilizzata a medio termine.\\\\](https://blog.rust-lang.org/inside-\"\n\"rust/2022/11 /17/async-fn-in-trait-nightly.html))\"\n\n#: src/async/pitfalls/async-traits.md:6\n#, fuzzy\nmsgid \"\"\n\"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"provides a workaround through a macro:\"\nmsgstr \"\"\n\"Il crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"fornisce una soluzione tramite una macro:\"\n\n#: src/async/pitfalls/async-traits.md:35\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md:39\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md:56\n#, fuzzy\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` è facile da usare, ma si noti che utilizza allocazioni di heap \"\n\"per raggiungere questo obiettivo. Questa allocazione dell'heap comporta un \"\n\"sovraccarico delle prestazioni.\"\n\n#: src/async/pitfalls/async-traits.md:59\n#, fuzzy\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"Le sfide nel supporto del linguaggio per `async trait` sono il profondo Rust \"\n\"e probabilmente non vale la pena descriverlo in modo approfondito. Niko \"\n\"Matsakis ha fatto un buon lavoro spiegandoli in [questo post](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) se sei interessato a scavare più a fondo.\"\n\n#: src/async/pitfalls/async-traits.md:65\n#, fuzzy\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"Prova a creare una nuova struttura dormiente che dormirà per un periodo di \"\n\"tempo casuale e aggiungendolo al Vec.\"\n\n#: src/async/pitfalls/cancellation.md:3\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:35\n#, fuzzy\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"UTF-8\"\n\n#: src/async/pitfalls/cancellation.md:51\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:57\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:72\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:75\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:78\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:80\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:83\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:97\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:106\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:110\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md:113\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md:3\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md:5\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md:8\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:1\n#: src/exercises/concurrency/solutions-afternoon.md:3\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Filosofi da pranzo\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:3\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:6\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Avrai bisogno di un'[installazione Cargo](../../cargo/running-locally.md) \"\n\"locale per questo esercizio. Copia il codice qui sotto in un file chiamato \"\n\"`src/main.rs`, compila il file spazi vuoti e verificare che `cargo run` non \"\n\"vada in stallo:\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:52\n#: src/exercises/concurrency/solutions-afternoon.md:78\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:58\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:63\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:73\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md:78\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:3\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:9\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:12\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:14\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:18\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:31\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:33\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:37\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:39\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:41\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:43\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:45\n#, fuzzy\nmsgid \"Two binaries\"\nmsgstr \"Binari Rust\"\n\n#: src/exercises/concurrency/chat-app.md:47\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:54\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:58\n#: src/exercises/concurrency/solutions-afternoon.md:99\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"`src/driver.rs`:\"\n\n#: src/exercises/concurrency/chat-app.md:77\n#: src/exercises/concurrency/chat-app.md:124\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:85\n#: src/exercises/concurrency/solutions-afternoon.md:149\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:86\n#: src/exercises/concurrency/solutions-afternoon.md:150\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:90\n#: src/exercises/concurrency/solutions-afternoon.md:154\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:93\n#: src/exercises/concurrency/solutions-afternoon.md:157\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:102\n#: src/exercises/concurrency/solutions-afternoon.md:166\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"`src/edificio.rs`:\"\n\n#: src/exercises/concurrency/chat-app.md:116\n#: src/exercises/concurrency/solutions-afternoon.md:178\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:129\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"Esecuzione del corso\"\n\n#: src/exercises/concurrency/chat-app.md:131\n#, fuzzy\nmsgid \"Run the server with:\"\nmsgstr \"Esegui l'esempio con:\"\n\n#: src/exercises/concurrency/chat-app.md:137\n#, fuzzy\nmsgid \"and the client with:\"\nmsgstr \"Esegui l'esempio con:\"\n\n#: src/exercises/concurrency/chat-app.md:145\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:146\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:149\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:150\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md:154\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:1\n#, fuzzy\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"Esercizio mattutino in concorrenza\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:5\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([torna all'esercizio](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:33\nmsgid \"\"\n\"// Add a delay before picking the second fork to allow the execution\\n\"\n\"        // to transfer to another task\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:41\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:61\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"            // somewhere. This will swap the forks without deinitializing\\n\"\n\"            // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:75\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:90\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:97\n#, fuzzy\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([torna all'esercizio](rtc.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:117\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:121\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:130\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:185\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md:192\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md:3\n#, fuzzy\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Grazie per aver preso Comprehensive Rust 🦀!_ Ci auguriamo che ti sia \"\n\"piaciuto e che sia così è stato utile.\"\n\n#: src/thanks.md:6\n#, fuzzy\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Ci siamo divertiti molto a mettere insieme il corso. Il corso non è \"\n\"perfetto, quindi se hai individuato errori o hai idee per miglioramenti, \"\n\"entra [contattaci su GitHub](https://github.com/google/comprehensive-rust/\"\n\"discussions). Ci piacerebbe avere tue notizie.\"\n\n#: src/glossary.md:3\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md:30\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:32\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md:34\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:37\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md:39\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:41\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md:43\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md:45\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md:48\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md:50\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:52\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md:54\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md:56\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:58\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md:60\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md:63\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md:65\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md:68\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md:70\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md:73\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md:75\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md:77\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md:80\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md:83\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md:85\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md:88\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md:91\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md:93\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md:97\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md:99\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md:102\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md:105\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:107\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:110\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:112\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md:115\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md:118\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md:121\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md:123\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:126\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md:128\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md:131\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:133\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md:136\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md:139\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md:141\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md:144\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 3 of this course.\"\nmsgstr \"\"\n\"Fondamenti di Rust:  \\n\"\n\"Giorni da 1 a 3 di questo corso.\"\n\n#: src/glossary.md:146\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:148\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md:150\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md:153\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md:155\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:157\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md:160\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md:163\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md:166\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md:169\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md:171\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md:174\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:177\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md:180\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md:183\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md:186\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md:189\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md:192\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md:194\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md:197\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md:199\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md:202\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md:1\n#, fuzzy\nmsgid \"Other Rust Resources\"\nmsgstr \"Altre risorse di ruggine\"\n\n#: src/other-resources.md:3\n#, fuzzy\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"La community di Rust ha creato una vasta gamma di risorse gratuite e di alta \"\n\"qualità in linea.\"\n\n#: src/other-resources.md:6\n#, fuzzy\nmsgid \"Official Documentation\"\nmsgstr \"Documentazione ufficiale\"\n\n#: src/other-resources.md:8\n#, fuzzy\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"Il progetto Rust ospita molte risorse. Questi coprono Rust in generale:\"\n\n#: src/other-resources.md:10\n#, fuzzy\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[Il linguaggio di programmazione Rust](https://doc.rust-lang.org/book/): the \"\n\"canonico libro gratuito su Rust. Copre la lingua in dettaglio e include a \"\n\"pochi progetti da costruire per le persone.\"\n\n#: src/other-resources.md:13\n#, fuzzy\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Ruggine per esempio](https://doc.rust-lang.org/rust-by-example/): copre la \"\n\"Ruggine sintassi attraverso una serie di esempi che mostrano diversi \"\n\"costrutti. A volte include piccoli esercizi in cui ti viene chiesto di \"\n\"espandere il codice nel file esempi.\"\n\n#: src/other-resources.md:17\n#, fuzzy\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): documentazione \"\n\"completa di la libreria standard per Rust.\"\n\n#: src/other-resources.md:19\n#, fuzzy\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): un libro \"\n\"incompleto che descrive la grammatica e il modello di memoria di Rust.\"\n\n#: src/other-resources.md:22\n#, fuzzy\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Guide più specializzate ospitate sul sito ufficiale di Rust:\"\n\n#: src/other-resources.md:24\n#, fuzzy\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): copre Rust non \"\n\"sicuro, compreso il lavoro con puntatori grezzi e l'interfacciamento con \"\n\"altre lingue (FFI).\"\n\n#: src/other-resources.md:27\n#, fuzzy\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Programmazione asincrona in Rust](https://rust-lang.github.io/async-book/): \"\n\"copre il nuovo modello di programmazione asincrona che è stato introdotto \"\n\"dopo il Rust Book è stato scritto.\"\n\n#: src/other-resources.md:30\n#, fuzzy\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduzione all'utilizzo di Rust su dispositivi embedded senza sistema \"\n\"operativo.\"\n\n#: src/other-resources.md:33\n#, fuzzy\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Materiale didattico non ufficiale\"\n\n#: src/other-resources.md:35\n#, fuzzy\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Una piccola selezione di altre guide e tutorial per Rust:\"\n\n#: src/other-resources.md:37\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Impara la ruggine in modo pericoloso](http://cliffle.com/p/dangerust/): \"\n\"copre Rust dal punto di vista dei programmatori C di basso livello.\"\n\n#: src/other-resources.md:39\n#, fuzzy\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Ruggine per Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): copre Rust da la prospettiva degli sviluppatori che scrivono \"\n\"firmware in C.\"\n\n#: src/other-resources.md:41\n#, fuzzy\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Ruggine per professionisti](https://overexact.com/rust-for-professionals/): \"\n\"copre la sintassi di Rust usando confronti fianco a fianco con altri \"\n\"linguaggi come C, C++, Java, JavaScript e Python.\"\n\n#: src/other-resources.md:44\n#, fuzzy\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): oltre 100 esercizi per \"\n\"aiutarti impari Ruggine.\"\n\n#: src/other-resources.md:46\n#, fuzzy\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Insegnamento ferroso Materiale](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a serie di piccole presentazioni che coprono sia la \"\n\"parte di base che quella avanzata del Linguaggio ruggine. Sono disponibili \"\n\"anche altri argomenti come WebAssembly e async/await coperto.\"\n\n#: src/other-resources.md:50\n#, fuzzy\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Serie per principianti a Ruggine](https://docs.microsoft.com/en-us/shows/\"\n\"beginners-series-to-rust/) e [Fai i tuoi primi passi con Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): due Guide Rust rivolte \"\n\"ai nuovi sviluppatori. Il primo è un set di 35 video e il il secondo è un \"\n\"set di 11 moduli che copre la sintassi di Rust ei costrutti di base.\"\n\n#: src/other-resources.md:56\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Impara la ruggine con troppi collegamenti Liste](https://rust-unofficial.\"\n\"github.io/too-many-lists/): approfondimento esplorazione delle regole di \"\n\"gestione della memoria di Rust, implementandone alcune diversi tipi di \"\n\"strutture di elenchi.\"\n\n#: src/other-resources.md:61\n#, fuzzy\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Si prega di consultare il [Little Book of Rust Books](https://lborb.github.\"\n\"io/book/) per ancora più libri di Rust.\"\n\n#: src/credits.md:3\n#, fuzzy\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Il materiale qui si basa sulle molte grandi fonti di documentazione di Rust. \"\n\"Vedere la pagina su [altre risorse](other-resources.md) per un elenco \"\n\"completo di utili risorse.\"\n\n#: src/credits.md:7\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Il materiale di Comprehensive Rust è concesso in licenza secondo i termini \"\n\"di Apache 2.0 licenza, vedere [`LICENSE`](../LICENSE) per i dettagli.\"\n\n#: src/credits.md:12\n#, fuzzy\nmsgid \"Rust by Example\"\nmsgstr \"Ruggine con l'esempio\"\n\n#: src/credits.md:14\n#, fuzzy\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Alcuni esempi ed esercizi sono stati copiati e adattati da [Rust by Esempio]\"\n\"(https://doc.rust-lang.org/rust-by-example/). Si prega di consultare il \"\n\"directory `Third_party/rust-by-example/` per i dettagli, inclusa la licenza \"\n\"termini.\"\n\n#: src/credits.md:19\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"Ruggine sull'esercizio\"\n\n#: src/credits.md:21\n#, fuzzy\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Alcuni esercizi sono stati copiati e adattati da [Rust on Esercizio fisico]\"\n\"(https://exercism.org/tracks/rust). Si prega di consultare il directory \"\n\"`Third_party/rust-on-exercism/` per i dettagli, inclusa la licenza termini.\"\n\n#: src/credits.md:26\n#, fuzzy\nmsgid \"CXX\"\nmsgstr \"\\\\##CXX\"\n\n#: src/credits.md:28\n#, fuzzy\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"La sezione [Interoperabilità con C++](android/interoperabilità/cpp.md) \"\n\"utilizza un file immagine da [CXX](https://cxx.rs/). Si prega di consultare \"\n\"la directory `Third_party/cxx/` per i dettagli, inclusi i termini di licenza.\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Piccolo esempio\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Perché Rust?\"\n\n#~ msgid \"An Example in C\"\n#~ msgstr \"Un esempio in C\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Garanzie alla Compilazione\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Garanzie all’Esecuzione\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Funzionalità moderne\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Sintassi di base\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"Differenza tra String e str\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"Rustdoc\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Overloading\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Array e Cicli for\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"espressioni IF\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"espressioni FOR\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"espressioni WHILE\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"espressioni LOOP\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Payload Variabili (Variant Payloads)\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Dimensione degli Enum\"\n\n#~ msgid \"Novel Control Flow\"\n#~ msgstr \"Flussi di Controllo “non-standard”\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"espressioni IF LET\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"espressioni WHILE LET\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"espressioni MATCH\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"Destrutturazione di Struct\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Destrutturazione di Array\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Match Guards\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stack vs Heap\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Memoria sullo Stack\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Gestione manuale della Memoria\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Gestione della Memoria basata su Scope\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Garbage Collection\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Gestione della Memoria in Rust\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Stringhe a cui è applicata move\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"Doppio applicazione di free in C++ moderno\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Move nelle Chiamate a Funzione\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Copiare (Copy) e Clonare (Clone)\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Prestito (Borrow) Condiviso (Shared) e Unico (Unique)\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Sintassi abbreviata per Campo (Field)\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"Ricevitore (Receiver) del Metodo\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"Memorizza i libri\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option e Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Tipi di dati ricorsivi\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Cell/RefCell\"\n#~ msgstr \"Cell/RefCell\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iteratori (Iterators) e Proprietà (Ownership)\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Stringhe (Strings) e Iteratori (Iterators)\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Metodi Generic\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Monomorfizzazione (Monomorphization)\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Metodi predefiniti (Default Methods)\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"impl Trait\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Trait importanti\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From e Into (Trait)\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Predefinito (Default)\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Operatori: Add, Mul, ...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"Closures: Fn, FnMut, FnOnce\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"Una semplice libreria per Interfacce Grafiche\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Punti e Poligoni\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Catturare lo Stack Unwinding\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Gestione strutturata degli errori\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Propagazione degli errori con ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Conversione dei tipi di errore\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Derivazione di Enumerazioni (Enums) di errori\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Aggiungere contesto agli errori\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"probe-rs, cargo-embed\"\n#~ msgstr \"probe-rs, cargo-embed\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"rotazione (spin)\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send e Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send (Inviare)\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync (Sincronizzare)\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"async/await\"\n#~ msgstr \"async/await\"\n\n#~ msgid \"Pin\"\n#~ msgstr \"Spillo (Pin)\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Giorno 1 Mattina\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Giorno 1 Pomeriggio\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Giorno 2 Mattina\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Giorno 2 Pomeriggio\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Giorno 3 Mattina\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Giorno 3 Pomeriggio\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Mattina su Bare Metal Rust\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Mattina su Concorrenza\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Giorno 1: Pomeriggio\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"Giorno 2: tipi di dati composti, pattern matching, libreria standard.\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Giorno 3: 'traits' e 'generics', gestione degli errori, test, Rust non \"\n#~ \"sicuro.\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Costrutti del flusso di controllo: `if`, `if let`, `while`, `while let`, \"\n#~ \"`break` e `continua`.\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"L'idea per il primo giorno è mostrare _quanto basta_ di Rust per poter \"\n#~ \"parlare sul famoso _borrow checker_. Il modo in cui Rust gestisce la \"\n#~ \"memoria è una caratteristica importante e dovremmo mostrarlo subito agli \"\n#~ \"studenti.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Se stai insegnando in un'aula, questo è un buon posto per esaminare il \"\n#~ \"programma. Suggeriamo di dividere la giornata in due parti (seguendo le \"\n#~ \"slide):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Mattina: dalle 9:00 alle 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Pomeriggio: dalle 13:00 alle 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Ovviamente puoi regolarlo se necessario. Assicurati di includere pause, \"\n#~ \"consigliamo una pausa ogni ora!\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Ecco un piccolo programma di esempio in Rust:\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Il codice implementa la congettura di Collatz: si ritiene che il ciclo \"\n#~ \"finirà sempre, ma questo non è ancora provato. Modifica il codice e gioca \"\n#~ \"con diversi ingressi.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Spiegare che tutte le variabili sono tipizzate staticamente. Prova a \"\n#~ \"rimuovere `i32` per attivare l'inferenza di tipo. Prova invece con `i8` e \"\n#~ \"attiva un overflow di runtime integer.\"\n\n#, fuzzy\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"\"\n#~ \"Modificare `let mut x` in `let x`, discutere l'errore del compilatore.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Mostra come `print!` restituisce un errore di compilazione se gli \"\n#~ \"argomenti non corrispondono al formato della stringa.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Mostra come devi usare `{}` come segnaposto se vuoi stampare un' \"\n#~ \"espressione che è più complessa di una singola variabile.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Mostra agli studenti la libreria standard, mostra loro come cercare `std::\"\n#~ \"fmt` che ha le regole del mini-linguaggio di formattazione. È importante \"\n#~ \"che il gli studenti acquisiscono familiarità con la ricerca nella \"\n#~ \"libreria standard.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Sicurezza della memoria al tempo di compilazione.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Mancanza di comportamento runtime non definito.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Funzionalità del linguaggio moderno.\"\n\n#~ msgid \"How many bugs do you spot?\"\n#~ msgstr \"Quanti bug hai notato?\"\n\n#~ msgid \"All `if` clauses require braces.\"\n#~ msgstr \"Tutte le clausole `if` richiedono parentesi.\"\n\n#~ msgid \"`match` mandates that all cases are handled.\"\n#~ msgstr \"`match` impone che tutti i casi siano gestiti.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Gestione statica della memoria in fase di compilazione:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Nessun _memory leaks_ (_principalmente_, vedi note).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"È possibile produrre perdite di memoria in Rust sicuro (Safe Rust). \"\n#~ \"Qualche esempio Sono:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Puoi usare [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) per far trapelare un puntatore. Un uso di questo \"\n#~ \"potrebbe essere quello di ottenere variabili statiche inizializzate/\"\n#~ \"dimensionate in runtime\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Puoi usare [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) per fare in modo che il compilatore \\\"dimentichi\\\" un valore \"\n#~ \"(il che significa che il distruttore non viene mai eseguito).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Puoi anche creare accidentalmente un _[reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html)_ con `Rc` o `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"In effetti, alcuni considereranno il popolamento infinito di una raccolta \"\n#~ \"un _memory leak_ e Rust non protegge da quello.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Ai fini di questo corso, si dovrebbe intendere \\\"Nessuna perdita di \"\n#~ \"memoria\\\". come \\\"Praticamente nessuna perdita di memoria _accidentale_\\\".\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"L'overflow di numeri interi è definito tramite il flag [`overflow-checks`]\"\n#~ \"(https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-\"\n#~ \"checks) in fase di compilazione. Se abilitato il programma _va in panico_ \"\n#~ \"(crash controllato del programma), altrimenti si ha un _wrap-around_. Per \"\n#~ \"impostazione predefinita, si ottiene il panico in modalità di debug \"\n#~ \"(`cargo build`) e wrap-around in modalità rilascio (`cargo build --\"\n#~ \"release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"Il controllo dei limiti non può essere disabilitato con un flag del \"\n#~ \"compilatore. Può anche non essere disabilitato direttamente con la parola \"\n#~ \"chiave `unsafe`. Tuttavia, `unsafe` ti permette di chiamare funzioni come \"\n#~ \"`slice::get_unchecked` che non esegue il controllo dei limiti.\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"Rust è costruito con tutta l'esperienza maturata negli ultimi 40 anni.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Caratteristiche del linguaggio\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Tooling\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Astrazioni a costo zero, simili a C++, significa che non devi \\\"pagare\\\" \"\n#~ \"per costrutti di programmazione di livello superiore con memoria o CPU. \"\n#~ \"Per esempio, scrivere un ciclo usando `for` dovrebbe comportare \"\n#~ \"all'incirca lo stesso livello di istruzioni come usare il costrutto `.\"\n#~ \"iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Potrebbe valere la pena ricordare che anche le enum di Rust sono \\\"tipi \"\n#~ \"di dati algebrici\\\" noti come \\\"tipi di somma\\\", che consentono al \"\n#~ \"sistema di tipi di esprimere cose come `Option<T>` e `Result<T, E>`.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Ricordare alle persone di leggere gli errori --- molti sviluppatori si \"\n#~ \"sono abituati a ignorare l'output del compilatore. Il compilatore Rust è \"\n#~ \"molto più \\\"loquace\\\" rispetto ad altri compilatori. Spesso fornirà \"\n#~ \"feedback _pronti all'uso_, pronti per il copia-incolla nel tuo codice.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"La libreria standard di Rust è piccola rispetto a linguaggi come Java, \"\n#~ \"Python, e Go. Rust non viene fornito con molte cose che potresti \"\n#~ \"considerare standard e essenziali:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"\"\n#~ \"un generatore di numeri casuali, ma vedi [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"supporto per SSL o TLS, ma vedi [rusttls](https://docs.rs/rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"supporto per JSON, ma vedi [serde_json](https://docs.rs/serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Il ragionamento alla base di ciò è che una funzionalità nella libreria \"\n#~ \"standard non può essere tolta, quindi deve essere molto stabile. Per gli \"\n#~ \"esempi precedenti, la comunità Rust sta ancora lavorando per trovare la \"\n#~ \"soluzione migliore --- e forse  non c'è un'unica \\\"soluzione migliore\\\" \"\n#~ \"per alcune di queste cose.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust viene fornito con un gestore di pacchetti integrato sotto forma di \"\n#~ \"Cargo e questo rende banale scaricare e compilare pacchetti di terze \"\n#~ \"parti (_crates_). Una conseguenza di ciò è che la libreria standard può \"\n#~ \"essere più piccola.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"La ricerca di buoni 'pacchetti' (_crates_) di terze parti può essere un \"\n#~ \"problema. Siti come <https://lib.rs/> aiutano in questo consentendo di \"\n#~ \"confrontare le metriche per specifiche _crate_ per trovarne uno buona e \"\n#~ \"affidabile.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) è un'implementazione \"\n#~ \"LSP ben supportata utilizzata neimaggiori IDE ed editor di testo.\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"pippo\\\"`, `\\\"due\\\\nrighe\\\"`\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Come C++, Rust ha riferimenti:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Dobbiamo dereferenziare `ref_x` quando lo assegni, in modo simile ai \"\n#~ \"puntatori C e C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"I riferimenti dichiarati come `mut` possono essere associati a valori \"\n#~ \"diversi nel corso della loro durata.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Si dice che un riferimento \\\"prenda in prestito\\\" (_borrow_) il valore a \"\n#~ \"cui si riferisce.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust tiene traccia delle vite di tutti i riferimenti per assicurarsi che \"\n#~ \"durino abbastanza a lungo.\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` vs `str`\"\n\n#~ msgid \"We can now understand the two string types in Rust:\"\n#~ msgstr \"Ora possiamo comprendere i due tipi di stringhe in Rust:\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Puoi prendere in prestito le sezioni `&str` da `String` con `&` e la \"\n#~ \"selezione dell'intervallo opzionale.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Una versione Rust del famoso gioco [FizzBuzz](https://en.wikipedia.org/\"\n#~ \"wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"In `main` ci si riferisce a una funzione scritta di seguito. Non sono \"\n#~ \"necessarie né pre-dichiarazioni né intestazioni. \"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"L'espressione di intervallo nel ciclo `for` in `fizzbuzz to()` contiene \"\n#~ \"`=n` che include il limite superiore.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Tutti gli elementi del linguaggio in Rust possono essere documentati \"\n#~ \"usando la sintassi speciale `///`.\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Questo corso non include rustdoc sulle diapositive, solo per risparmiare \"\n#~ \"spazio, ma nel contesto reale dovrebbe essere presente.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"I commenti interni al documento sono discussi più avanti (nella pagina \"\n#~ \"sui moduli) e non è necessario affrontarli qui.\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"I metodi sono funzioni associate a un tipo. L'argomento `self` di un \"\n#~ \"metodo è un'istanza del tipo a cui è associato:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Approfondiremo maggiormente i metodi nell'esercizio di oggi e nella \"\n#~ \"lezione di domani.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"Aggiungi un costruttore `Rectangle::new` e chiamalo da `main`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Aggiungi un costruttore `Rectangle::new_square(width: u32)` per \"\n#~ \"illustrare che i costruttori possono accettare parametri arbitrari.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Overloading di Funzione\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"L'Overloading non è supportato:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Accetta sempre un numero fisso di parametri.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"I valori predefiniti non sono supportati:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Tutti i siti di chiamata hanno lo stesso numero di argomenti.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Le macro sono talvolta utilizzate come alternativa.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Tuttavia, i parametri delle funzioni possono essere generici:\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"Quando si usano i generici, `Into<T>` della libreria standard può fornire \"\n#~ \"una sorta di polimorfismo limitato sui tipi dell'argomento. Vedremo \"\n#~ \"maggiori dettagli in una sezione successiva.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Giorno 1: Esercizi Mattutini\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"In questi esercizi esploreremo due parti di Rust:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Conversioni implicite tra tipi.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Array e cicli `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"Alcune cose da considerare durante la risoluzione degli esercizi:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Utilizzare un'installazione locale di Rust, se possibile. In questo modo \"\n#~ \"puoi ottenere completamento automatico nel tuo editor. Vedi la pagina su \"\n#~ \"[Using Cargo](../../cargo.md) per i dettagli sull'installazione di Rust.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"In alternativa, usa Rust Playground.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Gli snippet di codice non sono modificabili di proposito: gli snippet di \"\n#~ \"codice in linea perdono il loro stato se esci dalla pagina.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust non applicherà automaticamente le _conversioni implicite_ tra i tipi \"\n#~ \"([a differenza di C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Puoi vederlo in un programma come questo:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Tutti i tipi interi in Rust implementano i _traits_ [`From<T>`](https://\"\n#~ \"doc.rust-lang.org/std/convert/trait.From.html) e [`Into<T>`](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.Into.html) consentendo la conversione tra \"\n#~ \"di loro. Il _trait_ `From<T>` ha un singolo metodo `from()` e allo stesso \"\n#~ \"modo, il _trait_ `Into<T>` ha un singolo metodo `into()`. \"\n#~ \"L'implementazione di questi _traits_ esprime il modo in cui un tipo \"\n#~ \"consente  di essere convertito in un altro tipo.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"La libreria standard ha un'implementazione di `From<i8> for i16`, che \"\n#~ \"significa che possiamo convertire una variabile `x` di tipo `i8` in una \"\n#~ \"`i16` chiamando `i16::from(x)`. O, più semplicemente, con `x.into()`, \"\n#~ \"perché l'implementazione `From<i8> for i16` crea automaticamente \"\n#~ \"un'implementazione di `Into<i16> per i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"Lo stesso vale per le tue implementazioni `From` per i tuoi tipi, così è \"\n#~ \"sufficiente implementare solo `From` per ottenere automaticamente una \"\n#~ \"rispettiva implementazione `Into`.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"\"\n#~ \"Eseguire il programma precedente e osservare l'errore del compilatore.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Aggiornare il codice per utilizzare `into()` per eseguire la conversione.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Cambiare i tipi di `x` e `y` in altre cose (come `f32`, `bool`, `i128`) \"\n#~ \"per vedere quali tipi è possibile convertire in quali altri tipi. Provare \"\n#~ \"a convertire tipi \\\"piccoli\\\" in tipi \\\"grandi\\\" e viceversa. Controlla \"\n#~ \"la [documentazione della libreria standard](https://doc.rust-lang.org/std/\"\n#~ \"convert/trait.From.html) per vedere se `From<T>` è implementato per le \"\n#~ \"coppie che controlli.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Array e Cicli `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Abbiamo visto che un array può essere dichiarato in questo modo:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Puoi stampare un tale array chiedendo la sua rappresentazione di debug \"\n#~ \"con `{:?}`:\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust ti consente di iterare cose come array e intervalli usando la parola \"\n#~ \"chiave `for`:\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Domanda bonus\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Potresti usare _slices_ `&[i32]` invece di matrici 3 × 3 codificate per \"\n#~ \"il tuo argomento e tipi restituiti? Qualcosa come `&[&[i32]]` per un \"\n#~ \"oggetto bidimensionale _slice-di-slices_. Perché o perché no?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Guarda il _crate_ [`ndarray`](https://docs.rs/ndarray/) per una \"\n#~ \"implementazione di livello produzione (_production_).\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"La soluzione e la risposta alla sezione bonus sono disponibili nella \"\n#~ \"sezione [Soluzione](solutions-morning.md#arrays-and-for-loops).\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"Senza il `&`…\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Come abbiamo visto, \\\"if\\\" è un'espressione in Rust. È usato in modo \"\n#~ \"condizionale valutare uno dei due blocchi, ma i blocchi possono avere un \"\n#~ \"valore che poi diventa il valore dell'espressione \\\"if\\\". Altre \"\n#~ \"espressioni del flusso di controllo funzionano in modo simile a Ruggine.\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"La stessa regola viene utilizzata per le funzioni: il valore del corpo \"\n#~ \"della funzione è il valore di ritorno:\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"Lo scopo di questa slide è mostrare che i blocchi hanno un tipo e un \"\n#~ \"valore in Rust. \"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"Il [ciclo `for`](https://doc.rust-lang.org/std/keyword.for.html) è \"\n#~ \"strettamente relativo al [ciclo `while let`](while-let-expression.md). Lo \"\n#~ \"farà chiama automaticamente `into_iter()` sull'espressione e quindi itera \"\n#~ \"su di essa:\"\n\n#, fuzzy\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Puoi usare `break` e `continue` qui come al solito.\"\n\n#, fuzzy\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"L'iterazione dell'indice non è una sintassi speciale in Rust solo per \"\n#~ \"quel caso.\"\n\n#, fuzzy\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` è un intervallo che implementa un tratto `Iterator`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` è un metodo che restituisce un altro `Iterator` che salta ogni \"\n#~ \"altro elemento.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Modifica gli elementi nel vettore e spiega gli errori del compilatore. \"\n#~ \"Cambia il vettore `v` in modo che sia mutabile e il ciclo for in `for x \"\n#~ \"in v.iter_mut()`.\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"Espressioni `loop`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"Infine, c'è una [parola chiave `loop`](https://doc.rust-lang.org/\"\n#~ \"reference/expressions/loop-expr.html#infinite-loops) che crea un loop \"\n#~ \"infinito.\"\n\n#, fuzzy\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"Qui devi \\\"break\\\" o \\\"return\\\" per interrompere il ciclo:\"\n\n#, fuzzy\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"Interrompi il `loop` con un valore (ad es. `break 8`) e stampalo.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"A causa dell'inferenza del tipo, `i32` è facoltativo. Mostreremo \"\n#~ \"gradualmente i tipi sempre meno man mano che il corso procede.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"Il codice seguente indica al compilatore di copiare in un determinato \"\n#~ \"contenitore generico senza che il codice specifichi mai esplicitamente il \"\n#~ \"tipo contenuto, utilizzando `_` come segnaposto:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) si basa su `FromIterator`, che \\\\[`HashSet`\\\\]\"\n#~ \"(https:/ /doc.rust-lang.org/std/iter/trait.FromIterator.html) implementa.\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Variabili statiche e costanti\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"Il codice seguente dimostra perché il compilatore non può semplicemente \"\n#~ \"riutilizzare le posizioni di memoria durante lo shadowing di una \"\n#~ \"variabile immutabile in un ambito, anche se il tipo non cambia.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Questa pagina offre un tipo di enum `CoinFlip` con due varianti `Heads` e \"\n#~ \"`Tail`. Potresti notare lo spazio dei nomi quando usi le varianti.\"\n\n#, fuzzy\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"\"\n#~ \"In entrambi, le funzioni associate sono definite all'interno di un blocco \"\n#~ \"`impl`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"È possibile definire enumerazioni più ricche in cui le varianti \"\n#~ \"contengono dati. È quindi possibile utilizzare il istruzione `match` per \"\n#~ \"estrarre i dati da ciascuna variante:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"L'espressione viene confrontata con i modelli dall'alto verso il basso. \"\n#~ \"Non c'è fall-through come in C o C++.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"L'espressione di corrispondenza ha un valore. Il valore è l'ultima \"\n#~ \"espressione nel braccio di corrispondenza che è stata eseguita.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"Partendo dall'alto cerchiamo quale modello corrisponde al valore, quindi \"\n#~ \"eseguiamo il codice seguendo la freccia. Una volta trovata una \"\n#~ \"corrispondenza, ci fermiamo.\"\n\n#, fuzzy\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` ispeziona un campo discriminante nascosto in `enum`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"\"\n#~ \"È possibile recuperare il discriminante chiamando `std::mem::\"\n#~ \"discriminant()`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"Ciò è utile, ad esempio, se si implementa `PartialEq` per strutture in \"\n#~ \"cui il confronto dei valori dei campi non influisce sull'uguaglianza.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` non è esattamente la stessa cosa di `WebEvent::\"\n#~ \"Click(Click)` con una `struct Click { ... }` di primo livello. La \"\n#~ \"versione inline non può implementare tratti, per esempio.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Gli enum di Rust sono imballati strettamente, tenendo conto dei vincoli \"\n#~ \"dovuti all'allineamento:\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"Prova altri tipi come\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"La [parola chiave `match`](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/match-expr.html) viene utilizzato per confrontare un valore \"\n#~ \"con uno o più modelli. In questo senso funziona come una serie di \"\n#~ \"espressioni `if let`:\"\n\n#, fuzzy\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"Salva l'espressione di corrispondenza in una variabile e stampala.\"\n\n#, fuzzy\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"Rimuovi `.as_deref()` e spiega l'errore.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` restituisce un `Option<String>`, ma non \"\n#~ \"possiamo confrontare `String`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` trasforma una `Opzione<T>` in `Opzione<&T::Target>`. Nel \"\n#~ \"nostro caso, questo trasforma `Option<String>` in `Option<&str>`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"Ora possiamo usare il pattern matching per confrontare con `&str` \"\n#~ \"all'interno di `Option`.\"\n\n#, fuzzy\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"\"\n#~ \"Il modello `_` è un modello di caratteri jolly che corrisponde a \"\n#~ \"qualsiasi valore.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Può essere utile mostrare come funziona l'associazione, ad esempio \"\n#~ \"sostituendo un carattere jolly con una variabile o rimuovendo le \"\n#~ \"virgolette intorno a `q`.\"\n\n#, fuzzy\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Puoi dimostrare la corrispondenza su un riferimento.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Questo potrebbe essere un buon momento per far emergere il concetto di \"\n#~ \"modelli inconfutabili, poiché il termine può apparire nei messaggi di \"\n#~ \"errore.\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Puoi anche destrutturare `structs`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Durante la corrispondenza, puoi aggiungere una _guard_ a un pattern. \"\n#~ \"Questo è un booleano arbitrario espressione che verrà eseguita se il \"\n#~ \"modello corrisponde:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"È possibile utilizzare le variabili definite nel modello nell'espressione \"\n#~ \"if.\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Giorno 1: Esercizi pomeridiani\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Vedremo due cose:\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Algoritmo di Luhn,\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Esercizio su pattern matching.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"function.\"\n#~ msgstr \"\"\n#~ \"Copia il codice qui sotto in <https://play.rust-lang.org/> e implementa \"\n#~ \"le funzioni:\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Gestione della memoria: stack vs heap, gestione manuale della memoria, \"\n#~ \"memoria basata sull'ambito (scoped), garbage collection.\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Ownership: semantica di spostamento (move), copia e clonazione, prestito \"\n#~ \"(borrowing) e durata (lifetimes).\"\n\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Struct e metodi.\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"La libreria standard: `String`, `Option` e `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` e `Arc`.\"\n\n#, fuzzy\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"Moduli: visibilità, percorsi e gerarchia del filesystem.\"\n\n#, fuzzy\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"\"\n#~ \"Innanzitutto, aggiorniamo il funzionamento della gestione della memoria.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"Lo Stack (Pila) vs l’Heap\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Esempio di Stack e Heap\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Allocate e de-allocate voi stessi la memoria dell'heap.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Se non fatto con cura, ciò può portare a arresti anomali, bug, \"\n#~ \"vulnerabilità di sicurezza e perdite di memoria.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"Esempio C\"\n\n#, fuzzy\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"Devi chiamare `free` su ogni puntatore allocato con `malloc`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"La memoria viene persa se la funzione ritorna in anticipo tra `malloc` e \"\n#~ \"`free`: the puntatore è perso e non possiamo deallocare la memoria.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Costruttori e distruttori ti consentono di agganciarti alla vita di un \"\n#~ \"oggetto.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Avvolgendo un puntatore in un oggetto, puoi liberare memoria quando \"\n#~ \"l'oggetto è distrutto. Il compilatore garantisce che ciò accada, anche se \"\n#~ \"lo è un'eccezione sollevato.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Questo è spesso chiamato _l'acquisizione delle risorse è \"\n#~ \"l'inizializzazione_ (RAII) e dà puntatori intelligenti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"L'oggetto `std::unique_ptr` è allocato nello stack e punta a memoria \"\n#~ \"allocata nell'heap.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"Alla fine di `say_hello`, verrà eseguito il distruttore `std::unique_ptr`.\"\n\n#, fuzzy\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"Il distruttore libera l'oggetto `Person` a cui punta.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"I costruttori di mosse speciali vengono utilizzati quando si passa la \"\n#~ \"proprietà a una funzione:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Un'alternativa alla gestione della memoria manuale e basata sull'ambito è \"\n#~ \"la memoria automatica gestione:\"\n\n#, fuzzy\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"\"\n#~ \"Il programmatore non alloca o dealloca mai la memoria in modo esplicito.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Un Garbage Collector trova la memoria inutilizzata e la dealloca per il \"\n#~ \"programmatore.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Esempio Java\"\n\n#, fuzzy\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"\"\n#~ \"L'oggetto `person` non viene deallocato dopo che `sayHello` restituisce:\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Gestione della Memoria in Rust\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"La gestione della memoria in Rust è un mix:\"\n\n#, fuzzy\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Sicuro e corretto come Java, ma senza un garbage collector.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"Basato sull'ambito come C++, ma il compilatore applica la piena aderenza.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Un utente Rust può scegliere l'astrazione giusta per la situazione, \"\n#~ \"alcuni addirittura non hanno alcun costo in fase di esecuzione come C.\"\n\n#, fuzzy\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Raggiunge questo modellando _ownership_ in modo esplicito.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Se ti viene chiesto come a questo punto, puoi menzionare che in Rust \"\n#~ \"questo è solitamente gestito da tipi di wrapper RAII come [Box](https://\"\n#~ \"doc.rust-lang.org/std/boxed/struct.Box.html), [Vec](https://doc.rust-lang.\"\n#~ \"org/std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/std/rc/\"\n#~ \"struct.Rc.html) o [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.\"\n#~ \"html). Questi incapsulano la proprietà e l'allocazione della memoria \"\n#~ \"tramite vari mezzi e prevengono i potenziali errori in C.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"Qui ti potrebbe essere chiesto dei distruttori, il tratto [Drop](https://\"\n#~ \"doc.rust-lang.org/std/ops/trait.Drop.html) è l'equivalente di Rust.\"\n\n#, fuzzy\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Un distruttore può essere eseguito qui per liberare risorse.\"\n\n#, fuzzy\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"\"\n#~ \"C'è sempre _esattamente_ un legame di variabile che possiede un valore.\"\n\n#, fuzzy\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"I dati dell'heap da `s1` vengono riutilizzati per `s2`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"\"\n#~ \"Quando `s1` esce dall'ambito, non accade nulla (è stato spostato da).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Se gli studenti chiedono informazioni su `derive`, è sufficiente dire che \"\n#~ \"questo è un modo per generare codice in Rust in fase di compilazione. In \"\n#~ \"questo caso vengono generate le implementazioni predefinite dei tratti \"\n#~ \"`Copy` e `Clone`.\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"\"\n#~ \"Un valore preso in prestito (borrowed) ha un lifetime (i.e. _durata_):\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Leggi `&'a Point` come \\\"un `Punto` preso in prestito che è valido almeno \"\n#~ \"per il vita `a`\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Oltre a prendere in prestito i suoi argomenti, una funzione può \"\n#~ \"restituire un valore preso in prestito:\"\n\n#, fuzzy\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` è un parametro generico, viene dedotto dal compilatore.\"\n\n#, fuzzy\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"Le durate iniziano con `'` e `'a` è un tipico nome predefinito.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"La parte _almeno_ è importante quando i parametri si trovano in ambiti \"\n#~ \"diversi.\"\n\n#, fuzzy\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"Di seguito descriviamo la distinzione tra ricevitori di metodi.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"Prendi in considerazione l'enfasi su \\\"condiviso e immutabile\\\" e \\\"unico \"\n#~ \"e mutevole\\\". Questi vincoli arrivano sempre insieme in Rust a causa \"\n#~ \"delle regole del correttore in prestito, e \\\"self\\\" non fa eccezione. Non \"\n#~ \"è possibile fare riferimento a una struttura da più posizioni e chiamare \"\n#~ \"un metodo mutante (`&mut self`) su di essa.\"\n\n#, fuzzy\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"Tutti e quattro i metodi qui usano un ricevitore metodo diverso.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Puoi indicare come ciò cambia ciò che la funzione può fare con i valori \"\n#~ \"delle variabili e se/come può essere riutilizzata in `main`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Puoi mostrare l'errore che appare quando provi a chiamare `finish` due \"\n#~ \"volte.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Si noti che sebbene i destinatari del metodo siano diversi, le funzioni \"\n#~ \"non statiche sono chiamate allo stesso modo nel corpo principale. Rust \"\n#~ \"abilita la referenziazione e la dereferenziazione automatica quando si \"\n#~ \"chiamano i metodi. Rust aggiunge automaticamente `&`, `*`, `muts` in modo \"\n#~ \"che quell'oggetto corrisponda alla firma del metodo.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Potresti sottolineare che `print_laps` sta usando un vettore che viene \"\n#~ \"iterato. Descriviamo i vettori in modo più dettagliato nel pomeriggio.\"\n\n#, fuzzy\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Giorno 2: Esercizi mattutini\"\n\n#, fuzzy\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Esamineremo i metodi di implementazione in due contesti:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Impareremo molto di più sulle strutture e sul tipo `Vec<T>` domani. Per \"\n#~ \"adesso, devi solo conoscere parte della sua API:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Usalo per creare un'applicazione libreria. Copia il codice qui sotto per \"\n#~ \"<https://play.rust-lang.org/> e aggiorna i tipi per farlo compilare:\"\n\n#, fuzzy\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"I tipi di vocabolario comuni includono:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"[Tipi `Option` e `Result`](std/option-result.md): usati per valori \"\n#~ \"facoltativi e [gestione degli errori](error-handling.md).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"\"\n#~ \"[`String`](std/string.md): il tipo di stringa predefinito utilizzato per \"\n#~ \"i dati di proprietà.\"\n\n#, fuzzy\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md): un vettore estensibile standard.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"\"\n#~ \"[`HashMap`](std/hashmap.md): un tipo di mappa hash con un hash \"\n#~ \"configurabile algoritmo.\"\n\n#, fuzzy\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"\"\n#~ \"[`Box`](std/box.md): un puntatore di proprietà per i dati allocati \"\n#~ \"nell'heap.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"\"\n#~ \"[`Rc`](std/rc.md): un puntatore con conteggio dei riferimenti condiviso \"\n#~ \"per i dati allocati nell'heap.\"\n\n#, fuzzy\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Opzione` e `Risultato`\"\n\n#, fuzzy\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"I tipi rappresentano dati facoltativi:\"\n\n#, fuzzy\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"\"\n#~ \"`Option<&T>` ha un sovraccarico di spazio pari a zero rispetto a `&T`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"Nell'esempio sopra, puoi anche tralasciare `*` nell'istruzione `println!` \"\n#~ \"grazie a `Deref`.\"\n\n#, fuzzy\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Box con strutture dati ricorsive\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"Usando [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) e \"\n#~ \"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), puoi \"\n#~ \"astrarre su fonti `u8`:\"\n\n#, fuzzy\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Giorno 2: Esercizi pomeridiani\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Gli esercizi di questo pomeriggio si concentreranno su stringhe e \"\n#~ \"iteratori.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Il modello di proprietà di Rust influisce su molte API. Un esempio di \"\n#~ \"questo è il [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n#~ \"Iterator.html) e [`IntoIterator`](https://doc.rust-lang.org/std/iter/\"\n#~ \"trait.IntoIterator.html) tratti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"I tratti sono come interfacce: descrivono il comportamento (metodi) per \"\n#~ \"un tipo. IL Il tratto \\\"Iterator\\\" dice semplicemente che puoi chiamare \"\n#~ \"\\\"next\\\" fino a quando non ottieni \\\"Nessuno\\\":\"\n\n#, fuzzy\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Usi questo tratto in questo modo:\"\n\n#, fuzzy\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"\"\n#~ \"Qual è il tipo restituito dall'iteratore? Metti alla prova la tua \"\n#~ \"risposta qui:\"\n\n#, fuzzy\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Perché viene utilizzato questo tipo?\"\n\n#, fuzzy\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Come prima, qual è il tipo restituito dall'iteratore?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Ora che conosciamo sia `Iterator` che `IntoIterator`, possiamo creare \"\n#~ \"cicli `for`. Chiamano `into_iter()` su un'espressione e itera sul \"\n#~ \"risultato iteratore:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Sperimenta con il codice sopra e poi consulta la documentazione per \"\n#~ \"[`impl IntoIteratore per &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26%27a%20Vec%3CT%2C%20A%3E) e \"\n#~ \"[`impl IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html#impl-IntoIterator-for-Vec%3CT%2C%20A%3E) per controllare le tue \"\n#~ \"risposte.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"In questo esercizio, implementerai un componente di instradamento di un \"\n#~ \"server web. IL il server è configurato con un numero di _prefissi di \"\n#~ \"percorso_ che vengono confrontati _percorsi di richiesta_. I prefissi di \"\n#~ \"percorso possono contenere un carattere jolly che corrisponde a un \"\n#~ \"segmento completo. Vedere i test unitari di seguito.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"\"\n#~ \"Tratti: tratti derivati, metodi predefiniti e importante libreria \"\n#~ \"standard tratti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"\"\n#~ \"Generici: tipi di dati generici, metodi generici, monomorfizzazione e \"\n#~ \"tratto oggetti.\"\n\n#, fuzzy\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"Test: unit test, test di documentazione e test di integrazione.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"\"\n#~ \"Unsafe Rust: puntatori grezzi, variabili statiche, funzioni non sicure ed \"\n#~ \"extern funzioni.\"\n\n#, fuzzy\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Puoi dichiarare un tipo generico sul tuo blocco `impl`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Il codice generico viene trasformato in codice non generico in base ai \"\n#~ \"siti di chiamata:\"\n\n#, fuzzy\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"si comporta come se scrivessi\"\n\n#, fuzzy\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"Puoi lasciare che il compilatore derivi una serie di tratti:\"\n\n#, fuzzy\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"I tratti possono implementare il comportamento in termini di altri metodi \"\n#~ \"di tratto:\"\n\n#, fuzzy\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"Sposta il metodo `not_equal` in un nuovo tratto `NotEqual`.\"\n\n#, fuzzy\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"Rendi `NotEqual` un super tratto per `Equal`.\"\n\n#, fuzzy\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"\"\n#~ \"Con l'implementazione coperta, non hai più bisogno di \\\"NotEqual\\\" come \"\n#~ \"super tratto per \\\"Equal\\\".\"\n\n#, fuzzy\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait` ti permette di lavorare con tipi che non puoi nominare.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Questo esempio è fantastico, perché utilizza `impl Display` due volte. \"\n#~ \"Aiuta a spiegarlo nulla qui impone che sia _lo stesso_ tipo `impl \"\n#~ \"Display`. Se usiamo un singolo `T: Display`, imporrebbe il vincolo \"\n#~ \"secondo cui l'input `T` e il tipo restituito `T` sono dello stesso tipo. \"\n#~ \"Non funzionerebbe per questa particolare funzione, poiché probabilmente \"\n#~ \"non lo è il tipo che ci aspettiamo come input quale `formato!` \"\n#~ \"restituisce. Se volessimo fare lo stesso tramite la sintassi `: Display`, \"\n#~ \"ne avremmo bisogno di due parametri generici indipendenti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"Vedremo ora alcuni dei tratti più comuni della libreria standard di Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) e \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) usati nei cicli `for`,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) e [`Into`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) utilizzati per \"\n#~ \"convertire i valori,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) e [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) usati per IO,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... utilizzato per \"\n#~ \"l'overload degli operatori e\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n#~ \"used to construct a default instance of a type.\"\n#~ msgstr \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n#~ \"utilizzato per costruire un'istanza predefinita di un tipo.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"Implementa `Iterator` `fn collect<B>(self) -> B Dove B: \"\n#~ \"FromIterator<Self::Item>, Sé: dimensionato`\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Ad`, `Mul`, ...\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Giorno 3: Esercizi mattutini\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Progetteremo una libreria GUI classica di tratti e oggetti di tratto.\"\n\n#, fuzzy\n#~ msgid \"Drawing A Simple GUI\"\n#~ msgstr \"Una semplice libreria per Interfacce Grafiche\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects. We'll only implement the drawing of it (as text) for \"\n#~ \"simplicity.\"\n#~ msgstr \"\"\n#~ \"Progettiamo una libreria GUI classica utilizzando la nostra nuova \"\n#~ \"conoscenza dei tratti e oggetti di tratto.\"\n\n#, fuzzy\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"Avremo una serie di widget nella nostra libreria:\"\n\n#, fuzzy\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Window`: ha un `title` e contiene altri widget.\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`: ha una `label`.\"\n\n#, fuzzy\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"I widget implementeranno un tratto `Widget`, vedi sotto.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Copia il codice qui sotto in <https://play.rust-lang.org/>, inserisci i \"\n#~ \"campi mancanti metodi `draw_into` in modo da implementare il tratto \"\n#~ \"`Widget`:\"\n\n#, fuzzy\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"\"\n#~ \"L'output del programma sopra può essere qualcosa di semplice come questo:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Se vuoi disegnare un testo allineato, puoi usare il [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) operatori di \"\n#~ \"formattazione. In particolare, nota come puoi riempire con diversi \"\n#~ \"caratteri (qui un `'/'`) e come puoi controllare l'allineamento:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Usando tali trucchi di allineamento, puoi ad esempio produrre un output \"\n#~ \"come questo:\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Struct Polygon (Poligono)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Creeremo una struttura `Polygon` che contiene alcuni punti. Copia il \"\n#~ \"codice qui sotto a <https://play.rust-lang.org/> e inserire i metodi \"\n#~ \"mancanti per rendere il file i test superano:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Poiché le firme del metodo mancano nelle dichiarazioni del problema, la \"\n#~ \"parte chiave dell'esercizio è specificarli correttamente. Non è \"\n#~ \"necessario modificare i test.\"\n\n#, fuzzy\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Altre parti interessanti dell'esercizio:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Deriva un tratto `Copy` per alcune strutture, poiché nei test i metodi a \"\n#~ \"volte non prendono in prestito i loro argomenti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Scopri che il tratto `Add` deve essere implementato affinché due oggetti \"\n#~ \"possano essere aggiunti tramite \\\"+\\\". Si noti che non discuteremo di \"\n#~ \"farmaci generici fino al giorno 3.\"\n\n#, fuzzy\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"La gestione degli errori in Rust viene eseguita utilizzando un flusso di \"\n#~ \"controllo esplicito:\"\n\n#, fuzzy\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"\"\n#~ \"Le funzioni che possono avere errori lo elencano nel loro tipo di ritorno,\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Non ci sono eccezioni.\"\n\n#, fuzzy\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Catturare lo srotolamento della pila\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Abbiamo già visto l'enumerazione `Result`. Questo è usato in modo \"\n#~ \"pervasivo quando ci sono errori previsto come parte del normale \"\n#~ \"funzionamento:\"\n\n#, fuzzy\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Propagazione degli errori con `?`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"L'operatore try `?` viene utilizzato per restituire errori al chiamante. \"\n#~ \"Ti fa girare il comune\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"È buona pratica per tutti i tipi di errore implementare `std::error::\"\n#~ \"Error`, che richiede `Debug` e `Display`. In genere è utile per loro \"\n#~ \"implementare anche `Clone` e `Eq`, ove possibile, per fare vita più \"\n#~ \"facile per i test e i consumatori della tua libreria. In questo caso non \"\n#~ \"possiamo farlo facilmente, perché `io::Error` non li implementa.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"La macro deriva di `thiserror` implementa automaticamente `std::error::\"\n#~ \"Error` e facoltativamente `Display` (se vengono forniti gli attributi \"\n#~ \"`#[error(...)]`) e `From` (se viene aggiunto l'attributo `#[from]`). \"\n#~ \"Funziona anche per le strutture.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"Non influisce sulla tua API pubblica, il che lo rende utile per le \"\n#~ \"librerie.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"La cassa ampiamente utilizzata [comunque](https://docs.rs/anyhow/) può \"\n#~ \"aiutarti ad aggiungere informazioni contestuali ai tuoi errori e ti \"\n#~ \"permette di averne meno tipi di errore personalizzati:\"\n\n#, fuzzy\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Contrassegna i test unitari con `#[test]`:\"\n\n#, fuzzy\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"Usa `cargo test` per trovare ed eseguire i test unitari.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"I test unitari vengono spesso inseriti in un modulo nidificato (esegui \"\n#~ \"test sul file [Parco giochi](https://play.rust-lang.org/)):\"\n\n#, fuzzy\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"Casse utili\"\n\n#, fuzzy\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Chiamata codice esterno\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Le funzioni di altri linguaggi potrebbero violare le garanzie di Rust. \"\n#~ \"Chiamata loro è quindi pericoloso:\"\n\n#, fuzzy\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Giorno 3: Esercizi pomeridiani\"\n\n#, fuzzy\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"\"\n#~ \"Costruiamo un wrapper sicuro per leggere il contenuto della directory!\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Dopo aver esaminato l'esercizio, puoi esaminare la \\\\[soluzione\\\\] \"\n#~ \"fornita.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When you await a future, all local variables (that would ordinarily be \"\n#~ \"stored on a stack frame) are instead stored in the Future for the current \"\n#~ \"async block. If your future has pointers to data on the stack, those \"\n#~ \"pointers might get invalidated. This is unsafe.\"\n#~ msgstr \"\"\n#~ \"Quando aspetti un futuro, tutte le variabili locali (che normalmente \"\n#~ \"sarebbero memorizzate su uno stack frame) vengono invece archiviati in \"\n#~ \"Future per il blocco asincrono corrente. Se tuo future ha puntatori ai \"\n#~ \"dati nello stack, quei puntatori potrebbero essere invalidati. Questo non \"\n#~ \"è sicuro.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Therefore, you must guarantee that the addresses your future points to \"\n#~ \"don't change. That is why we need to `pin` futures. Using the same future \"\n#~ \"repeatedly in a `select!` often leads to issues with pinned values.\"\n#~ msgstr \"\"\n#~ \"Pertanto, è necessario garantire che gli indirizzi futuri puntino a non \"\n#~ \"farlo modifica. Ecco perché dobbiamo \\\"bloccare\\\" i futuri. Usando \"\n#~ \"ripetutamente lo stesso futuro in un `select!` spesso porta a problemi \"\n#~ \"con i valori bloccati.\"\n\n#, fuzzy\n#~ msgid \"concurrency:\"\n#~ msgstr \"Concorrenza\"\n\n#, fuzzy\n#~ msgid \"constant:\"\n#~ msgstr \"`const`\"\n\n#, fuzzy\n#~ msgid \"control flow:\"\n#~ msgstr \"Flusso di Controllo\"\n\n#, fuzzy\n#~ msgid \"enumeration:\"\n#~ msgstr \"`Durata`\"\n\n#, fuzzy\n#~ msgid \"error:\"\n#~ msgstr \"`Errore`\"\n\n#, fuzzy\n#~ msgid \"error handling:\"\n#~ msgstr \"Gestione degli errori\"\n\n#, fuzzy\n#~ msgid \"garbage collector:\"\n#~ msgstr \"Garbage Collection\"\n\n#, fuzzy\n#~ msgid \"generics:\"\n#~ msgstr \"Generics\"\n\n#, fuzzy\n#~ msgid \"integration test:\"\n#~ msgstr \"Test di integrazione\"\n\n#, fuzzy\n#~ msgid \"main function:\"\n#~ msgstr \"Chiamare Funzioni Unsafe\"\n\n#, fuzzy\n#~ msgid \"memory leak:\"\n#~ msgstr \"Perdite di memoria.\"\n\n#, fuzzy\n#~ msgid \"method:\"\n#~ msgstr \"Metodi\"\n\n#, fuzzy\n#~ msgid \"module:\"\n#~ msgstr \"Moduli\"\n\n#, fuzzy\n#~ msgid \"ownership:\"\n#~ msgstr \"Proprietà\"\n\n#, fuzzy\n#~ msgid \"panic:\"\n#~ msgstr \"Panico (Panics)\"\n\n#, fuzzy\n#~ msgid \"receiver:\"\n#~ msgstr \"Driver\"\n\n#, fuzzy\n#~ msgid \"standard library:\"\n#~ msgstr \"Libreria standard\"\n\n#, fuzzy\n#~ msgid \"static:\"\n#~ msgstr \"`static`\"\n\n#, fuzzy\n#~ msgid \"struct:\"\n#~ msgstr \"Strutture (Struct)\"\n\n#, fuzzy\n#~ msgid \"thread:\"\n#~ msgstr \"Threads\"\n\n#, fuzzy\n#~ msgid \"trait:\"\n#~ msgstr \"Traits\"\n\n#, fuzzy\n#~ msgid \"union:\"\n#~ msgstr \"Unioni\"\n\n#, fuzzy\n#~ msgid \"unit test:\"\n#~ msgstr \"Test per unità\"\n\n#, fuzzy\n#~ msgid \"variable:\\\\\"\n#~ msgstr \"Variabili\"\n\n#, fuzzy\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Troverai le soluzioni degli esercizi nelle pagine seguenti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Sentiti libero di fare domande sulle soluzioni [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Facci sapere se hai una \"\n#~ \"soluzione diversa o migliore di quella presentata qui.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Giorno 1 Esercizi mattutini\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([torna all'esercizio](for-loops.md))\"\n\n#, fuzzy\n#~ msgid \"Bonus question\"\n#~ msgstr \"Domanda bonus\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Richiede concetti più avanzati. Potrebbe sembrare che potremmo usare uno \"\n#~ \"slice-of-slice (`&[&[i32]]`) come tipo di input da trasporre e quindi \"\n#~ \"fare in modo che la nostra funzione gestisca qualsiasi dimensione di \"\n#~ \"matrice. Tuttavia, questo si interrompe rapidamente: il tipo restituito \"\n#~ \"non può essere `&[&[i32]]` poiché deve essere proprietario dei dati \"\n#~ \"restituiti.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Puoi provare a usare qualcosa come `Vec<Vec<i32>>`, ma neanche questo \"\n#~ \"funziona immediatamente: è difficile convertire da `Vec<Vec<i32>>` a \"\n#~ \"`&[ &[i32]]` quindi ora non puoi nemmeno usare facilmente `pretty_print`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"Una volta arrivati ai tratti e ai generici, saremo in grado di usare il \"\n#~ \"tratto [`std::convert::AsRef`](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.AsRef.html) per astrarre su tutto ciò che può essere referenziato \"\n#~ \"come slice.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Inoltre, il tipo stesso non imporrebbe che le sezioni figlie abbiano la \"\n#~ \"stessa lunghezza, quindi tale variabile potrebbe contenere una matrice \"\n#~ \"non valida.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"Giorno 1 Esercizi pomeridiani\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([torna all'esercizio](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Pattern Matching\"\n\n#, fuzzy\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"Giorno 2 Esercizi mattutini\"\n\n#, fuzzy\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Progettare una libreria\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([torna all'esercizio](book-library.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](health-statistics.md))\"\n#~ msgstr \"([torna all'esercizio](rtc.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([torna all'esercizio](strings-iterators.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"Giorno 3 Esercizio mattutino\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([torna all'esercizio](simple-gui.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([torna all'esercizio](points-polygons.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"Giorno 3 Esercizi pomeridiani\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([torna all'esercizio](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Match di Pattern\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Soluzione](solutions-afternoon.md#designing-a-library)\"\n\n#, fuzzy\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` restituisce `Result<usize, usize>`.\"\n\n#, fuzzy\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Se trovato, `Result::Ok` contiene l'indice in cui si trova l'elemento.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"Altrimenti, `Result::Err` contiene l'indice in cui tale elemento dovrebbe \"\n#~ \"essere inserito.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Button`: ha una `label` e una funzione di callback che viene richiamata \"\n#~ \"quando il pulsante viene premuto.\"\n\n#, fuzzy\n#~ msgid \"SWD\"\n#~ msgstr \"SWD\"\n\n#, fuzzy\n#~ msgid \"GDB stub and Microsoft \"\n#~ msgstr \"GDB stub e server Microsoft \"\n\n#, fuzzy\n#~ msgid \"DAP\"\n#~ msgstr \"DAP\"\n\n#, fuzzy\n#~ msgid \" server\"\n#~ msgstr \"Integrazione del carico\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`cargo-embed` is a cargo subcommand to build and flash binaries, log \"\n#~ msgstr \"\"\n#~ \"`cargo-embed` è un sottocomando cargo per compilare e aggiornare binari, \"\n#~ \"log \"\n\n#, fuzzy\n#~ msgid \"RTT\"\n#~ msgstr \"RTT\"\n\n#, fuzzy\n#~ msgid \"HVC\"\n#~ msgstr \"HVC\"\n\n#, fuzzy\n#~ msgid \" to tell the firmware to power off the system:\"\n#~ msgstr \" per dire al firmware di spegnere il sistema:\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Comparazione\"\n\n#~ msgid \"Build workflow\"\n#~ msgstr \"Stato Build\"\n\n#~ msgid \"GitHub contributors\"\n#~ msgstr \"Collaboratori di GitHub\"\n\n#~ msgid \"GitHub stars\"\n#~ msgstr \"Stelle di GitHub\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"Il corso è veloce e copre un sacco di terreno:\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"Giorno 1: Rust base, 'ownership' e 'borrow checker'.\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (consigliato)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Puoi seguire le istruzioni per installare il compilatore rust e cargo, \"\n#~ \"tra gli altri strumenti standard dell'ecosistema con lo strumento [rustup]\"\n#~ \"(https://rust-analyzer.github.io/), gestito dalla Rust Foundation.\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"Gestori di pacchetti\"\n\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n\n#~ msgid \"\"\n#~ \"This will allow \\\\[rust-analyzer\\\\]\\\\[1\\\\] to jump to the definitions. We \"\n#~ \"suggest using [VS Code](https://code.visualstudio.com/) to edit the code \"\n#~ \"(but any LSP compatible editor works).\"\n#~ msgstr \"\"\n#~ \"Ciò consentirà a \\\\[rust-analyzer\\\\]\\\\[1\\\\] di identificare le \"\n#~ \"definizioni. Si consiglia di utilizzare [VS Code](https://code.\"\n#~ \"visualstudio.com/) per editare il codice sorgente (ma qualsiasi editor \"\n#~ \"compatibile con LSP funziona).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Ad alcune persone piace anche usare la famiglia di IDE [JetBrains]\"\n#~ \"(https://www.jetbrains.com/clion/), che eseguono le proprie analisi ma \"\n#~ \"hanno i propri compromessi. Se li preferisci, puoi installare il [Rust \"\n#~ \"Plugin](https://www.jetbrains.com/rust/). Tieni presente che a partire da \"\n#~ \"gennaio 2023 il debug funziona solo sulla versione CLion della suite \"\n#~ \"JetBrains IDEA.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercises, you can look at the \\\\[solutions\\\\] \"\n#~ \"provided.\"\n#~ msgstr \"\"\n#~ \"Dopo aver esaminato gli esercizi, puoi esaminare le \\\\[solutions\\\\] \"\n#~ \"fornite.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that since `println!` is a macro, `x` is not moved, even using the \"\n#~ \"function like syntax of `println!(\\\"x: {}\\\", x)`\"\n#~ msgstr \"\"\n#~ \"Nota che poiché `println!` è una macro, `x` non viene spostata, anche \"\n#~ \"usando la sintassi di funzione simile a `println!(\\\"x: {}\\\", x)`\"\n\n#, fuzzy\n#~ msgid \"You can declare compile-time constants:\"\n#~ msgstr \"Puoi dichiarare costanti in fase di compilazione:\"\n\n#~ msgid \"You can also declare static variables:\"\n#~ msgstr \"Puoi anche dichiarare variabili statiche:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"A seconda dell'astrazione (o combinazione di astrazioni) scelta, può \"\n#~ \"trattarsi di un singolo puntatore univoco, del conteggio dei riferimenti \"\n#~ \"o del conteggio dei riferimenti atomici.\"\n\n#, fuzzy\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"\"\n#~ \"Ecco un confronto approssimativo delle tecniche di gestione della memoria.\"\n\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Vantaggi di Tecniche differenti di gestione della Memoria\"\n\n#, fuzzy\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Manuale come C:\"\n\n#, fuzzy\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Nessun sovraccarico di runtime.\"\n\n#, fuzzy\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Automatico come Java:\"\n\n#, fuzzy\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"Completamente automatico.\"\n\n#, fuzzy\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Sicuro e corretto.\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Basato sull'ambito come C++:\"\n\n#, fuzzy\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Parzialmente automatico.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Basato sull'ambito imposto dal compilatore come Rust:\"\n\n#, fuzzy\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Applicato dal compilatore.\"\n\n#, fuzzy\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Contro di diverse tecniche di gestione della memoria\"\n\n#, fuzzy\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Usa-dopo-gratis.\"\n\n#, fuzzy\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Doppia libera.\"\n\n#, fuzzy\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"La raccolta dei rifiuti si interrompe.\"\n\n#, fuzzy\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Ritardi del distruttore.\"\n\n#, fuzzy\n#~ msgid \"Complex, opt-in by programmer.\"\n#~ msgstr \"Complesso, opt-in dal programmatore.\"\n\n#, fuzzy\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"Potenziale per uso dopo-gratis.\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Applicato al compilatore e basato sull'ambito come Rust:\"\n\n#, fuzzy\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Qualche complessità iniziale.\"\n\n#, fuzzy\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Può rifiutare programmi validi.\"\n\n#, fuzzy\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"I dati sono stati _spostati_ da `s1` e `s1` non è più accessibile.\"\n\n#, fuzzy\n#~ msgid \"A small book library,\"\n#~ msgstr \"Una piccola biblioteca di libri,\"\n\n#, fuzzy\n#~ msgid \"Iterators and ownership (hard).\"\n#~ msgstr \"Iteratori e proprietà (hard).\"\n\n#, fuzzy\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"\"\n#~ \"Struttura semplice che tiene traccia delle statistiche sulla salute.\"\n\n#, fuzzy\n#~ msgid \"Multiple structs and enums for a drawing library.\"\n#~ msgstr \"Strutture multiple ed enum per una libreria di disegni.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you need to mutate the data inside an `Rc`, you will need to wrap the \"\n#~ \"data in a type such as [`Cell` or `RefCell`](../concurrency/shared_state/\"\n#~ \"arc.md).\"\n#~ msgstr \"\"\n#~ \"Se hai bisogno di mutare i dati all'interno di un `Rc`, dovrai \"\n#~ \"racchiudere i dati un tipo come [`Cell` o `RefCell`](../concurrency/\"\n#~ \"shared_state/arc.md).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Compare the different datatypes mentioned. `Box` enables (im)mutable \"\n#~ \"borrows that are enforced at compile time. `RefCell` enables (im)mutable \"\n#~ \"borrows that are enforced at run time and will panic if it fails at \"\n#~ \"runtime.\"\n#~ msgstr \"\"\n#~ \"Confronta i diversi tipi di dati menzionati. `Box` abilita i prestiti \"\n#~ \"(im)mutabili che vengono applicati in fase di compilazione. `RefCell` \"\n#~ \"abilita i prestiti (im)mutabili che vengono applicati in fase di \"\n#~ \"esecuzione e andranno in panico se falliscono in fase di esecuzione.\"\n\n#, fuzzy\n#~ msgid \"The module content can be omitted:\"\n#~ msgstr \"Il contenuto del modulo può essere omesso:\"\n\n#, fuzzy\n#~ msgid \"The `garden` module content is found at:\"\n#~ msgstr \"Il contenuto del modulo `garden` si trova in:\"\n\n#, fuzzy\n#~ msgid \"`src/garden.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden.rs` (moderno stile Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/mod.rs` (vecchio stile Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"Similarly, a `garden::vegetables` module can be found at:\"\n#~ msgstr \"\"\n#~ \"Allo stesso modo, un modulo `garden::vegetables` può essere trovato in:\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden/vegetables.rs` (moderno stile Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/vegetables/mod.rs` (vecchio stile Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the following code to <https://play.rust-lang.org/> and implement \"\n#~ \"the function:\"\n#~ msgstr \"\"\n#~ \"Copia il seguente codice in <https://play.rust-lang.org/> e implementa il \"\n#~ \"file funzione:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"trait NotEqual: Equals {\\n\"\n#~ \"    fn not_equal(&self, other: &Self) -> bool {\\n\"\n#~ \"        !self.equal(other)\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"Fornire un'implementazione globale di \\\"NotEqual\\\" per \\\"Equal\\\".\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Nota:** Si prega di ignorare `// ANCHOR: etichetta` e `// ANCHOR_END: \"\n#~ \"etichetta` commenti che vedi nelle soluzioni. Sono lì per renderlo \"\n#~ \"possibile riutilizzare parti delle soluzioni come esercizi.\"\n"
  },
  {
    "path": "po/ja.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-11-23T04:33:49Z\\n\"\n\"PO-Revision-Date: 2023-06-06 13:18+0900\\n\"\n\"Last-Translator: Kenta Aratani <kentaaratani@coinez.jp>\\n\"\n\"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\\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\"X-Generator: Poedit 3.3.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Comprehensive Rust 🦀 へようこそ\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"講座の運営について\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"講座の構成\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"キーボード ショートカット\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"翻訳\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Cargoの使用\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust エコシステム\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"コードサンプル\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"ローカル環境での実行\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Day 1： AM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"ようこそ\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hello, World\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Rustとは？\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Rustのメリット\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"プレイグラウンド\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"型と値\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"変数\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"値\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"算術\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"型推論\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"演習: フィボナッチ\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"解答\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"制御フローの基本\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"`if` 式\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"ループ\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` と `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"ブロックとスコープ\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"スコープとシャドーイング\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"関数\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"マクロ\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"演習: コラッツ数列\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Day 1： PM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"タプルと配列\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"配列\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"タプル\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"配列のイテレート\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"パターンとデストラクト\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"演習: ネストされた配列\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"参照\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"共有参照\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"排他参照\"\n\n#: src/SUMMARY.md src/references.md src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Slices\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"文字列\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"演習: ジオメトリ\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"ユーザー定義型\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"名前付き構造体\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"タプル構造体\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"列挙型（enums）\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"定数\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"静的\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"型エイリアス\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"演習: エレベーターでのイベント\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Day 2： AM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"パターンマッチング\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"構造体のデストラクト\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"列挙型のデストラクト\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Let制御フロー\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"演習: 式の評価\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"メソッド\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"トレイト（trait）\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"トレイトの実装\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"スーパートレイト\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"関連型\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"導出\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"演習: ジェネリックなロガー\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Day 2： PM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"ジェネリクス（generics）\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"ジェネリック関数\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"ジェネリックデータ型\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"ジェネリックトレイト\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"トレイト制約\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"演習: ジェネリックな `min`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"標準ライブラリ内の型\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"標準ライブラリ\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"ドキュメント\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"演習: カウンター\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"標準ライブラリ内のトレイト\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"他の言語との比較\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"演算子\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` と `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"キャスト\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` と `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`、構造体更新記法\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"クロージャ\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"演習: ROT13暗号\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Day 3： AM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"メモリ管理\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"プログラム メモリの見直し\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"メモリ管理のアプローチ\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"所有権\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"ムーブセマンティクス\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Copy 型\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"演習: ビルダー型\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"スマートポインタ\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"所有されたトレイトオブジェクト\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"演習: バイナリツリー\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Day 3： PM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"値の借用\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"借用チェック\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"内部可変性\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"演習: 健康に関する統計\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"ライフタイム\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"関数とライフタイム\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"ライフタイムの省略\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"構造体のライフタイム\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"演習: Protobufの解析\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Day 4： AM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"イテレータ\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"演習: イテレータのメソッドチェーン\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"モジュール\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"ファイルシステム階層\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"可視性\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`、`super`、`self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"演習: GUI ライブラリのモジュール\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"テスト\"\n\n#: src/SUMMARY.md src/testing.md\nmsgid \"Test Modules\"\nmsgstr \"テストモジュール\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"他のタイプのテスト\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"コンパイラの Lints と Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"演習: Luhnアルゴリズム\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Day 4： PM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"エラー処理\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"パニック（panic）\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Try演算子\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Try変換\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error`トレイト\"\n\n#: src/SUMMARY.md src/error-handling/thiserror.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/SUMMARY.md src/error-handling/anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"演習: `Result` を使用した書き換え\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Unsafe Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"アンセーフ\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"生ポインタの参照外し\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"可変なstatic変数\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"共用体\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Unsafe関数の呼び出し\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Unsafeなトレイトの実装\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"演習: FFIラッパー\"\n\n#: src/SUMMARY.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"セットアップ\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"ビルドのルール\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"バイナリ\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"ライブラリ\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL（Androidインターフェイス定義言語）\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"誕生日サービスのチュートリアル\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"インターフェイス\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"サービス\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"サーバ\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"デプロイ\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"クライアント\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"APIの変更\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"実装の更新\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"AIDL型\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"配列型\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"オブジェクトの送信\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"Parcelables\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"モック\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"ログ出力\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"相互運用性\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"BindgenによるCの呼び出し\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"CからRust呼び出し\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"ブリッジモジュール\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rustブリッジ\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"生成された C++\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ ブリッジ\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"共有の型\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"共有の列挙型\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Rustのエラー処理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"C++のエラー処理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"その他の型\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Android 向けのビルド: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Android 向けのビルド: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Android 向けのビルド: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Java\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Chromium と Cargo のエコシステムの比較\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"ポリシー\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"アンセーフなコード\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Chromium C++からRustのコードに依存させる\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"演習\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` ライブラリ\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Rust テスト用の GN ルール\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` マクロ\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"C++との相互運用性\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"バインディングの例\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"CXXの限界\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"CXXにおけるエラー処理\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"エラー処理: QRの例\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"エラー処理: PNGの例\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Chromium で CXX を使用する\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"サードパーティのクレートを追加する\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Cargo.toml を構成する\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"`gnrt_config.toml` を構成する\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"クレートをダウンロードする\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"`gn` ビルドルールを生成する\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"問題を解決する\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"コードを生成するビルドスクリプト\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"C++をビルドする、もしくは、任意のアクションを実行するビルドスクリプト\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"クレートへの依存を設定する\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"審査と監査\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Chromium ソースコードにチェックインする\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"クレートを最新の状態に保つ\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"まとめ - 演習\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"演習の解答\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"ベアメタル：午前\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"例\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"マイクロコントローラ\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"生MMIO（メモリマップドI/O）\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PACs\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HALクレート\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"ボードサポートクレート\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"タイプステートパターン\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs`と`cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"デバッグ\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"他のプロジェクト\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"練習問題\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"コンパス\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"解答\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"ベアメタル： PM\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"アプリケーションプロセッサ\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Rust の準備\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"インラインアセンブリ\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"UARTドライバを書いてみよう\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"他のトレイト\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"UARTドライバの改善\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"ビットフラッグ\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"複数のレジスタ\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"ドライバ\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"使用例\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"例外\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"便利クレート\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Bare-Metal on Android\"\nmsgstr \"Android上のベアメタル\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC（リアルタイムクロック）ドライバ\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"並行性： AM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"スレッド\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"プレーンなスレッド\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"スコープ付きスレッド\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"チャネル\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"送信側(Senders)と受信側(Receivers)\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Unboundedチャネル\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Boundedチャネル\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send`と`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"マーカートレイト\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"例\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"状態共有\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"例\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"食事する哲学者\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"マルチスレッド・リンクチェッカー\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"並行性： PM\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Asyncの基礎\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Future\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"ランタイム\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"タスク\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"チャネルと制御フロー\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Asyncチャネル\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"落とし穴\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"エグゼキュータのブロッキング\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Asyncトレイト\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"キャンセル\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"ブロードキャスト・チャットアプリ\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"最後に\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"ありがとうございました！\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"用語集\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"参考資料\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"クレジット\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"この資料は、GoogleのAndroidチームによって開発された3日間のRust講座です。本講\"\n\"座では、基本構文からジェネリクスやエラー処理など、幅広い内容をカバーします。\"\n\"また、最終日にはAndroid専用の内容も含まれています。\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"コースの最新バージョンは <https://google.github.io/comprehensive-rust/> にあ\"\n\"ります。他の場所でお読みの場合は、そちらで最新情報をご確認ください。\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"本講座の目的は、Rustを教える事です。Rustに関する前提知識は不要としており、次\"\n\"の目標を設定しています：\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Rustの基本構文と言語についての理解を深める。\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"既存のプログラムを修正したり、新規プログラムをRustで書けるようにする。\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"一般的なRustのイディオムを紹介する。\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"コースの最初の4日間を「Rust の基礎」と呼びます。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"最初の3日間は、Rustの基礎を学びます。その後、より専門的なトピックに進む事がで\"\n\"きます：\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md)： Androidオープンソースプラットフォーム（AOSP）でRustを\"\n\"使用するための半日講座。C、C++、およびJavaとの相互運用性も含まれます。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[ChromiumでのRust](../chromium.md) は半日コースで、Chromium ブラウザの一部と\"\n\"してRustを使用する方法について詳しく説明します。Chromium の `gn` ビルドシステ\"\n\"ムでRustを使用することで、サードパーティライブラリ（「クレート」）、および C+\"\n\"+ との相互運用性を導入できます。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md)： ベアメタル（組み込み）開発でRustを使用するため\"\n\"の1日講座。マイクロコントローラとアプリケーションプロセッサの両方が対象となり\"\n\"ます。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in \"\n\"Rust. We cover both classical concurrency (preemptively scheduling using \"\n\"threads and mutexes) and async/await concurrency (cooperative multitasking \"\n\"using futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency.md)： Rustの並行性についての1日講座。並行性（スレッ\"\n\"ドとミューテックスを用いたプリエンプティブなスケジューリング）と、async/await\"\n\"を使用した並行性（futuresを用いた協調的マルチタスク）がカバーされます。\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"本講座の対象外\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rustは非常に汎用性の高い言語であり、数日で全てを網羅する事はできません。本講\"\n\"座の目標として設定されていないものには、以下のようなものがあります：\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"マクロ（macro）の開発。マクロの詳細については、[Rust Book 日本語版 Ch. 19.5]\"\n\"(https://doc.rust-jp.rs/book-ja/ch19-06-macros.html)と[Rust by Example 日本語\"\n\"版 Ch.17](http://doc.rust-jp.rs/rust-by-example-ja/macros.html)を参照してくだ\"\n\"さい。\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"前提知識\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"本講座では、既にプログラミングの知識がある事を前提としています。Rustは静的型\"\n\"付け言語であり、Rustのアプローチをより分かりやすく説明するために、時折CやC+\"\n\"+との比較を行います。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"もし受講者の知識がPythonやJavaScriptなどの動的型付け言語に限定されている場合\"\n\"でも、本講座の受講は可能です。\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"これはスピーカーノートの一例です。これを使用してスライドを捕捉します。講師が\"\n\"カバーすべき要点や、授業でよく出る質問への回答などが含まれます。\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"このページは講師用です。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"以下は、Google内での講座の運営方法に関する情報です。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"クラスは通常午前9時から午後4時までで、途中で1時間の昼食休憩があります。つま\"\n\"り、午前のクラスが3時間、午後のクラスが3時間となります。どちらのセッションに\"\n\"も、休憩と、受講者が演習に取り組むための時間が複数回含まれています。\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"講座開始までに、以下にあげる準備を済ませておくと良いでしょう：\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"資料に慣れておいてください。要点を強調するためにスピーカーノートが用意されて\"\n\"います（内容の追加にご協力ください！）。プレゼン時には、スクリーンを見やすい\"\n\"状態で保つために、スピーカーノートはポップアップウィンドウで開いてください\"\n\"（スピーカーノートの横にある小さな矢印をクリック）。\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"あらかじめ日程を決めておいてください。講座は最低でも3日かかるため、2週間にわ\"\n\"たって日程を組む事を推奨しています。過去の受講者によると、講座の間に数日\"\n\"ギャップを設ける事で内容が吸収しやすくなります。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"十分な広さの部屋を確保しておいてください。15~25名程度のクラスを推奨していま\"\n\"す。受講者にとって質問がしやすい人数であり、1人の講師が質問に答える時間も確保\"\n\"できる規模だからです。また、皆さんはPCで作業をする必要があるため、講師を含め\"\n\"た人数分の机を用意しておいてください。ライブコーディング形式での実施を想定し\"\n\"ているため、講壇は不要です。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"当日は少し早めに到着して準備をしてください。自分のPCで実行する`mdbook serve`\"\n\"から直接プレゼンを行う事を推奨します（[インストール手順](https://github.com/\"\n\"google/comprehensive-rust#building)はこちら）。これにより、ページ切り替え時に\"\n\"遅延なしで最適なパフォーマンスが得られます。また、PCを使用する事で、受講者や\"\n\"自分自身が見つけたタイプミスなども修正可能になります。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"練習問題は個人か小さいグループで解いてください。回答をレビューする時間も含\"\n\"め、各練習問題に30~45分を費やします。受講者が行き詰まっているかどうか、何か質\"\n\"問があるかなど確認してください。複数の受講者が同じ問題で詰まっている場合、ク\"\n\"ラス全体に対してそれを共有し、解決策を提供してください。例えば、探している情\"\n\"報が標準ライブラリのどこにあるかを示す、など。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"以上です。運営頑張ってください！皆さんにとっても楽しい時間になりますように！\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"本講座の改善に向けて[フィードバック](https://github.com/google/comprehensive-\"\n\"rust/discussions/86)をお願いします。うまくいった点や改善点について幅広くご意\"\n\"見お聞かせください。[受講者からのフィードバック](https://github.com/google/\"\n\"comprehensive-rust/discussions/100)も歓迎しております！\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust の基礎\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"[Rust の基礎](../welcome-day-1.md) を構成する最初の 4 日間で、さまざまな項目\"\n\"を駆け足で学びます。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"コースのスケジュール:\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"3 日目の午前（休憩を含めて 2 時間 15 分）\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"Duration\"\nmsgstr \"`Duration`\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-4.md\nmsgid \"40 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"1 日目の午後（休憩を含めて 2 時間 55 分）\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md\n#: src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"3 日目の午前（休憩を含めて 2 時間 15 分）\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md\n#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\nmsgid \"1 hour\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"1 日目の午後（休憩を含めて 2 時間 55 分）\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"3 日目の午前（休憩を含めて 2 時間 15 分）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"1 日目の午後（休憩を含めて 2 時間 55 分）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"4 日目の午前（休憩を含めて 3 時間 5 分）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"1 日目の午後（休憩を含めて 2 時間 55 分）\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"[テスト](./testing.md)（1 時間 5 分）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"専門的なトピック\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Rustの基礎に関する3日間の講座に加え、いくつかのより専門的なトピックも用意され\"\n\"ています：\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Android\"\nmsgstr \"Android での Rust へようこそ\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Android編](../android.md)は、Androidオープンソースプラットフォーム（AOSP）で\"\n\"Rustを使用するための半日程度の講座です。C、C++、およびJavaとの相互運用性も含\"\n\"まれます。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"[AOSPのチェックアウト](https://source.android.com/docs/setup/download/\"\n\"downloading)が必要です。同じ端末から[講座のリポジトリ](https://github.com/\"\n\"google/comprehensive-rust)をチェックアウトし、`src/android/`ディレクトリを\"\n\"AOSPチェックアウトのルートに移動してください。これにより、Androidビルドシステ\"\n\"ムが`src/android/`内の`Android.bp`を確認できるようになります。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"エミュレータまたは実際のデバイスで`adb sync`が機能する事を確認し、`src/\"\n\"android/build_all.sh`を使用して全てのAndroidの例を事前にビルドしてください。\"\n\"スクリプトを読んで実行コマンドを確認し、手動で実行した際に正常に動作する事を\"\n\"確認してください。\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"Chromium の Rust へようこそ\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"[Chromium での Rust](../chromium.md) は半日コースで、Chromium ブラウザの一部\"\n\"として Rust を使用する方法について詳しく説明します。Chromium の `gn` ビルドシ\"\n\"ステムで Rust を使用することで、サードパーティ ライブラリ（「クレート」）、お\"\n\"よび C++ との相互運用性を導入できます。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"受講者は、Chromium をビルドできる必要があります。時間を短縮できるデバッグのコ\"\n\"ンポーネント ビルドを [推奨](../chromium/setup.md) しますが、どのようなビルド\"\n\"でも問題ありません。作成した Chromium ブラウザを実行できることを確認します。\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Bare-Metal Rust\"\nmsgstr \"ベアメタル\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[ベアメタル編](../bare-metal.md)は、ベアメタル（組み込み）開発でRustを使用す\"\n\"るための1日講座です。マイクロコントローラとアプリケーションプロセッサの両方が\"\n\"対象となります。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"マイクロコントローラの章では、事前に[BBCmicro:bit](https://microbit.org/)v2開\"\n\"発ボードを購入する必要があります。また、[welcomeページ](../bare-metal.md)で説\"\n\"明されているように、複数のパッケージをインストールする必要があります。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Rustでの並行性\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day \"\n\"class on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[並行性編](../concurrency.md) は、並行性とasync/awaitを使用した並行性について\"\n\"の1日講座です。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"新規クレートの作成と、依存関係（dependencies）のダウンロードが必要です。その\"\n\"後、例を`src/main.rs`にコピペして実行する事ができます：\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"2 日目の午前（休憩を含めて 3 時間 5 分）\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/methods-and-traits.md\n#: src/std-types.md src/memory-management.md src/borrowing.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"SendとSync\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"3 日目の午後（休憩を含めて 2 時間 20 分）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"フォーマット\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"本講座はインタラクティブな形式で行います。積極的に質問して、Rustへの理解を深\"\n\"めてください！\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"mdBookには、便利なショートカットキーがいくつか存在します：\"\n\n#: src/running-the-course/keyboard-shortcuts.md\n#, fuzzy\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"： 前のページに移動\"\n\n#: src/running-the-course/keyboard-shortcuts.md\n#, fuzzy\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"： 次のページに移動。\"\n\n#: src/running-the-course/keyboard-shortcuts.md\n#, fuzzy\nmsgid \"<kbd>Ctrl + Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"： フォーカスを持つコードサンプルを実行\"\n\n#: src/running-the-course/keyboard-shortcuts.md\n#, fuzzy\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"： 検索バーを起動\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"本資料は、ボランティアによって翻訳されています：\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[ポルトガル語（ブラジル）](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/): [@rastringer](https://github.com/rastringer)、[@hugojacob](https://\"\n\"github.com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes)、\"\n\"[@henrif75](https://github.com/henrif75)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp).\"\nmsgstr \"\"\n\"[中国語（簡体字）](https://google.github.io/comprehensive-rust/zh-CN/): \"\n\"[@suetfei](https://github.com/suetfei)、[@wnghl](https://github.com/wnghl)、\"\n\"[@anlunx](https://github.com/anlunx)、[@kongy](https://github.com/kongy)、\"\n\"[@noahdragon](https://github.com/noahdragon)、[@superwhd](https://github.com/\"\n\"superwhd)、[@SketchK](https://github.com/SketchK)、[@nodmp](https://github.\"\n\"com/nodmp)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[中国語（繁体字）](https://google.github.io/comprehensive-rust/zh-TW/): \"\n\"[@hueich](https://github.com/hueich)、[@victorhsieh](https://github.com/\"\n\"victorhsieh)、[@mingyc](https://github.com/mingyc)、[@kuanhungchen](https://\"\n\"github.com/kuanhungchen)、[@johnathan79717](https://github.com/\"\n\"johnathan79717)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) \"\n\"and [@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[中国語（繁体字）](https://google.github.io/comprehensive-rust/zh-TW/): \"\n\"[@hueich](https://github.com/hueich)、[@victorhsieh](https://github.com/\"\n\"victorhsieh)、[@mingyc](https://github.com/mingyc)、[@kuanhungchen](https://\"\n\"github.com/kuanhungchen)、[@johnathan79717](https://github.com/\"\n\"johnathan79717)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[日本語](https://google.github.io/comprehensive-rust/ja/): [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ)、[@momotaro1105](https://github.com/momotaro1105)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[韓国語](https://google.github.io/comprehensive-rust/ko/): [@keispace]\"\n\"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp)、\"\n\"[@jooyunghan](https://github.com/jooyunghan)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[スペイン語](https://google.github.io/comprehensive-rust/es/): [@deavid]\"\n\"(https://github.com/deavid)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[韓国語](https://google.github.io/comprehensive-rust/ko/): [@keispace]\"\n\"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp)、\"\n\"[@jooyunghan](https://github.com/jooyunghan)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) \"\n\"and [@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[中国語（繁体字）](https://google.github.io/comprehensive-rust/zh-TW/): \"\n\"[@hueich](https://github.com/hueich)、[@victorhsieh](https://github.com/\"\n\"victorhsieh)、[@mingyc](https://github.com/mingyc)、[@kuanhungchen](https://\"\n\"github.com/kuanhungchen)、[@johnathan79717](https://github.com/\"\n\"johnathan79717)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"画面右上の言語切り替えボタンから、切り替えを行なってください。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"Incomplete Translations\"\nmsgstr \"翻訳\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"進行中の翻訳が多数あります。最新の翻訳へのリンクを以下に示します。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[スペイン語](https://google.github.io/comprehensive-rust/es/): [@deavid]\"\n\"(https://github.com/deavid)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[ベンガル語](https://google.github.io/comprehensive-rust/bn/): [@raselmandol]\"\n\"(https://github.com/raselmandol)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[フランス語](https://google.github.io/comprehensive-rust/fr/): [@KookaS]\"\n\"(https://github.com/KookaS)、[@vcaen](https://github.com/vcaen)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[ドイツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn]\"\n\"(https://github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[ドイツ語](https://google.github.io/comprehensive-rust/de/): [@Throvn]\"\n\"(https://github.com/Throvn)、[@ronaldfw](https://github.com/ronaldfw)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"この取り組みにご協力いただける場合は、[our instructions](https://github.com/\"\n\"google/comprehensive-rust/blob/main/TRANSLATIONS.md)をご覧ください。翻訳は\"\n\"[issue tracker](https://github.com/google/comprehensive-rust/issues/282)で管\"\n\"理されています。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Rustを学び始めると、まもなくRustエコシステムで広く使われているビルドシステム\"\n\"兼パッケージマネージャである[Cargo](https://doc.rust-lang.org/cargo/)という標\"\n\"準ツールに出会います。ここでは、Cargoの概要や使用方法、そして本講座における重\"\n\"要性について簡単に説明します。\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"インストール\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**<https://rustup.rs/> の手順に沿ってインストールしてください。**\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Rustupも、cargoやrustcと一緒にコマンドラインユーティリティとしてインストール\"\n\"されます。Rustupを使用することで、ツールチェーンのインストールや切り替え、ク\"\n\"ロスコンパイルの設定などが行えます。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Rust をインストールしたら、Rust で動作するようにエディタまたは IDE を設定する\"\n\"必要があります。ほとんどのエディタでは、[rust-analyzer](https://rust-\"\n\"analyzer.github.io/) と通信することでこれを行います。rust-analyzer は、[VS \"\n\"Code](https://code.visualstudio.com/)、[Emacs](https://rust-analyzer.github.\"\n\"io/manual.html#emacs)、[Vim / Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) など、多くのエディタ向けにオートコンプリート機能と「定義に移\"\n\"動」機能を提供します。[RustRover](https://www.jetbrains.com/rust/) という別\"\n\"の IDE も用意されています。\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated Rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Debian/Ubuntuを使用している場合、以下のコマンドを使ってcargo、rustのソース\"\n\"コード、[Rust formatter](https://github.com/rust-lang/rustfmt)をインストール\"\n\"します\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Rust エコシステム\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"Rustエコシステムの主要ツールは以下の通りです：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`： Rustのコンパイラです。`.rs`ファイルをバイナリや他の中間形式に変換し\"\n\"ます。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`： Rustのビルドシステム兼パッケージマネージャです。<https://crates.io>\"\n\"でホストされている依存関係をダウンロードし、プロジェクトビルド時に`rustc`に渡\"\n\"します。Cargo に組み込まれたテストランナを使って、ユニットテストを実行するこ\"\n\"ともできます。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`： Rustのツールチェーンを管理するためのツールです。`rustc`や`cargo`の\"\n\"インストールやアップデートに使用されます。標準ライブラリのドキュメントをダウ\"\n\"ンロードする事も可能です。また、複数のRustのバージョンがインストールされてい\"\n\"る場合、`rustup`で切り替えが行えます。\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"要点：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust言語とコンパイラは、6週間のリリースサイクルを採用しています。新しいリリー\"\n\"スは、古いリリースとの後方互換性を維持しながら、新機能を提供します。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"リリースチャネルは3つあります：「stable」「beta」「nightly」。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"新機能は「nightly」でテストされ、「beta」が6週間毎に「stable」となります。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"依存関係は、代替の [レジストリ](https://doc.rust-lang.org/cargo/reference/\"\n\"registries.html)、git、フォルダなどから解決することもできます。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rustには[editions](https://doc.rust-lang.org/edition-guide/)（エディション）\"\n\"があります：現在のエディションはRust2021です。以前はRust2015とRust2018でし\"\n\"た。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"エディションでは、後方非互換な変更を加える事ができます。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"コードの破損を防ぐために、エディションはオプトイン方式です：`Cargo.toml`で、\"\n\"クレートに対して適用したいエディションを選択します。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"エコシステムの分断を避けるために、コンパイラは異なるエディションのコードを混\"\n\"在させる事ができます。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"コンパイラを直接使用する事は非常に稀であり、基本的には`cargo`を介します。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"`Cargo`は非常に包括的なツールであり、多くの機能を備えています：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"プロジェクト・パッケージの構造管理\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)（ワー\"\n\"クスペース）\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"開発用とランタイム用の依存関係管理・キャッシュ\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)（ビルドスクリプト）\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"[cargo clippy](https://github.com/rust-lang/rust-clippy)などのサブコマンドプ\"\n\"ラグインによる拡張\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"詳細は[official Cargo Book](https://doc.rust-lang.org/cargo/)を参照してくださ\"\n\"い。\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"講座のサンプルコード\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"本講座は、主にブラウザ内で実行可能な例を使います。こうする事で、セットアップ\"\n\"が容易になり、一貫した開発環境の提供が可能となります。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"ただし、できればCargoをインストールしてください： 練習問題で使えると便利で\"\n\"す。また最終日に依存関係を扱う課題を扱いますが、そこではCargoが必要になりま\"\n\"す。\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"講座のコードブロックはインタラクティブです：\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Edit me!\\\"\"\n\n#: src/cargo/code-samples.md\n#, fuzzy\nmsgid \"\"\n\"You can use <kbd>Ctrl + Enter</kbd> to execute the code when focus is in the \"\n\"text box.\"\nmsgstr \"を押すと、コードが実行されます。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"ほとんどのサンプルコードは上記のように編集可能ですが、一部だけ以下のような理\"\n\"由から編集不可となっています：\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"講座のページ内に埋め込まれたプレイグラウンドでユニットテストは実行できませ\"\n\"ん。コードを実際のプレイグラウンドで開き、デモンストレーションを行う必要があ\"\n\"ります。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"講座のページ内に埋め込まれたプレイグラウンドでは、ページ移動すると状態が失わ\"\n\"れます！故に、受講生はローカル環境や実際のプレイグラウンドを使用して問題を解\"\n\"く必要があります。\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Cargoを使ってローカルで実行\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"コードをローカルで試したい場合、[Rust Bookの手順](https://doc.rust-lang.org/\"\n\"book/ch01-01-installation.html)に従ってRustをインストールしてください。正常に\"\n\"インストールされたら、`rustc`と`cargo`が使えるようになります。最新のstableリ\"\n\"リースのバージョンは以下の通りです：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Rust は下位互換性を維持しているため、新しいバージョンを使用することもできま\"\n\"す。\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"次に、本講座の例を参考にしながら、以下の手順に従ってRustのバイナリをビルドし\"\n\"てください：\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"「Copy to clipboard」でコードをコピー。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"`cargo new exercise`で`exercise/`ディレクトリを作成：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"`exercise/`ディレクトリに移動し、`cargo run`でバイナリをビルドして実行：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"`src/main.rs`のボイラープレートコードを、コピーしたコードで置き換えてくださ\"\n\"い。例えば、前のページの例を使った場合、`src/main.rs`は以下のようになります。\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"`cargo run`で更新されたバイナリをビルドして実行：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"`cargo check`でプロジェクトのエラーチェックを行い、`cargo build`でコンパイル\"\n\"だけ（実行はせず）を行います。通常のデバッグビルドでは、生成されたファイルは\"\n\"`target/debug/`に格納されます。最適化されたリリースビルドには`cargo build —\"\n\"release`を使い、ファイルは`target/release/`に格納されます。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"プロジェクトに依存関係を追加するには、`Cargo.toml`を編集します。その後、\"\n\"`cargo`コマンドを実行すると、自動的に不足している依存関係がダウンロードされて\"\n\"コンパイルされます。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"受講者にCargoのインストールとローカルエディタの使用を勧めてください。通常の開\"\n\"発環境を持つ事で、作業がスムーズになります。\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Day 1へようこそ\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"「Comprehensive Rust」の初日です。本日は多岐にわたる内容をカバーします：\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Rustの基本的な構文： 変数、スカラー型と複合型、列挙型、構造体、参照、関数、メ\"\n\"ソッド。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"型推論\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"制御フローの構造: ループ、条件など。\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"ユーザー定義型: 構造体と列挙型。\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"パターン マッチング: 列挙型、構造体、配列の分解。\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"スケジュール\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 55 分です。\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"受講生に伝えてください：\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"分からない事があれば、最後まで待たずに質問をしてください。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"本講座はインタラクティブな形式で行うため、積極的にディスカッションをしてくだ\"\n\"さい！\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"講師の方へ： ディスカッションはなるべく関連性を有する範囲に留めましょう。例え\"\n\"ば、他言語との比較を行う場合には、あくまでもRustとどう違うのかまでを議論の範\"\n\"囲に設定してください。また、バランスの取り方が難しいかもしれませんが、一方的\"\n\"に話すよりもなるべくディスカッションを許容するように心がけてください。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"質問があった場合、おそらく将来的に話す内容に触れる事になります。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"これは全く問題ありません！復習は学びの重要な要素です。スライドはあくまでもサ\"\n\"ポートとして用意されているものであり、ご自身の判断でスキップも可能です。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"1 日目は、他の言語にも共通する Rust の「基本的な」事項を示します。Rust のより\"\n\"高度な部分については、後日説明します。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"教室で教える場合は、ここでスケジュールを確認することをおすすめします。各セグ\"\n\"メントの終わりに演習を行い、休憩を挟んでから答え合わせをしてください。上記の\"\n\"時間配分は、あくまでコースを予定どおりに進めるための目安ですので、必要に応じ\"\n\"て柔軟に調整してください。\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 55 分です\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rustは[2015年に1.0版がリリース](https://blog.rust-lang.org/2015/05/15/\"\n\"Rust-1.0.html)された新しいプログラミング言語です：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"RustはC++と同様に、静的にコンパイルされる言語です\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc`はバックエンドにLLVMを使用しています。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rustは多くの[プラットフォームとアーキテクチャ](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html)をサポートしています：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, …\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, …\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rustは様々なデバイスで使用されています：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"ファームウェアやブートローダ、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"スマートディスプレイ、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"携帯電話、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"デスクトップ、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"サーバ。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"RustとC++が似ているところ:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"高い柔軟性。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"高度な制御性。\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"携帯電話のようなデバイスにまでスケールダウンが可能\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"ランタイムやガベージコレクションがない。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"パフォーマンスを犠牲にせず、信頼性と安全性に焦点を当てている。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Rustのユニークなセールスポイントをいくつか紹介します：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_コンパイル時のメモリ安全性_ - クラス全体のメモリのバグをコンパイル時に防止し\"\n\"ます。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"未初期化の変数がない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"二重解放が起きない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"解放済みメモリ使用（use-after-free）がない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"`NULL`（ヌル）ポインタがない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"ミューテックス（mutex）のロックの解除忘れがない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"スレッド間でデータ競合しない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"イテレータが無効化されない。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_未定義のランタイム動作がない_ - Rust ステートメントで行われる処理が未規定の\"\n\"まま残ることはありません。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"配列へのアクセスには境界チェックが行われる。\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"整数オーバーフローの挙動が定義されている。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_最新の言語機能_ - 高水準言語に匹敵する表現力があり、人間が使いやすい機能を備\"\n\"えています。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"列挙型とパターンマッチング\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"ジェネリクス\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"オーバーヘッドのないFFI\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"ゼロコスト抽象化\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"優秀なコンパイルエラー。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"組み込みの依存関係マネージャ。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"組み込みのテストサポート。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Language Server Protocol（LSP）のサポート。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"ここにはあまり時間をかけないでください。これらのポイントについては、後ほど詳\"\n\"しく説明します。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"受講者にどの言語の経験があるかを尋ねてください。回答に応じて、Rustのさまざま\"\n\"な特徴を強調することができます：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"CまたはC++の経験がある場合： Rustは借用チェッカーを介して実行時エラーの一部を\"\n\"排除してくれます。それに加え、CやC++と同等のパフォーマンスを得ることができ、\"\n\"メモリ安全性の問題はありません。さらに、パターンマッチングや組み込みの依存関\"\n\"係管理などの構造要素を含む現代的な言語です。\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Java、Go、Python、JavaScriptなどの経験がある場合： これらの言語と同様のメモリ\"\n\"安全性と、高水準言語に近い感覚を得ることができます。また、CやC++のように高速\"\n\"かつ予測可能なパフォーマンス（ガベージコレクタがない）を得ることができ、（必\"\n\"要なら）低水準なハードウェアへのアクセスも可能です\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"このコースの例や演習には、短い Rust プログラムを簡単に実行できる [Rust プレイ\"\n\"グラウンド](https://play.rust-lang.org/) を使用します。最初の「hello-world」\"\n\"プログラムを実行してみましょう。次のような便利な機能があります。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"「Tools」 にある `rustfmt` オプションを使用して、コードを「standard」の形式で\"\n\"フォーマットします。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust には、コードを生成するための主要な「プロファイル」が 2 つあります。1 つ\"\n\"は Debug（追加のランタイムチェックがあり、最適化が少ない）で、もう 1 つは \"\n\"Release（ランタイムチェックが少なく、最適化が多い）です。これらは上部の \"\n\"[Debug] からアクセスできます。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"興味がある場合は、「...」 の下にある 「ASM」 を使用すると、生成されたアセンブ\"\n\"リ コードを確認できます。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"受講者が休憩に入ったら、プレイグラウンドを開いていろいろ試してみるよう促しま\"\n\"す。タブを開いたままにして、コースの残りの部分で学習したことを試すようすすめ\"\n\"ましょう。これは、Rust の最適化や生成されたアセンブリについて詳しく知りたい受\"\n\"講者に特に役立ちます。\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\n#, fuzzy\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 40 分です\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"さっそく一番シンプルなプログラムである定番のHello Worldからみてみましょう：\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"プログラムの中身：\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"関数は`fn`で導入されます。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"CやC++と同様に、ブロックは波括弧で囲みます。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"`main`関数はプログラムのエントリーポイントになります。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rustには衛生的なマクロがあり、`println!`はその一例です。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Rustの文字列はUTF-8でエンコードされ、どんなUnicode文字でも含む事ができます。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"このスライドの目的は、Rustのコードに慣れてもらう事です。この4日間で大量のRust\"\n\"コードを見る事になるので、馴染みのあるものから始めてみましょう。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rustは、C/C++/Java系統の言語によく似ています。Rustは、命令型（関数型ではな\"\n\"く）であり、必須でない限り機能の再発明はしません。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"RustはUnicodeなどにも完全に対応している現代的な言語です。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rustで可変長引数を用いたい場合は、マクロを使用します(関数[オーバーロード]\"\n\"(basic-syntax/functions-interlude.md)はありません)。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"マクロが「衛生的 (hygienic)」であるとは、そのマクロが呼び出されるスコープにあ\"\n\"る識別子と、そのマクロ内部の識別子が衝突しないことが保証されていることを言い\"\n\"ます。Rustのマクロは、実際には[部分的にしか衛生的](https://veykril.github.io/\"\n\"tlborm/decl-macros/minutiae/hygiene.html)ではありません。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust はマルチパラダイムです。たとえば、強力な [オブジェクト指向プログラミング\"\n\"機能](https://doc.rust-lang.org/book/ch17-00-oop.html) を備えている一方、非関\"\n\"数型言語であるにもかかわらず、さまざまな [関数的概念](https://doc.rust-lang.\"\n\"org/book/ch13-00-functional-features.html) を内包しています。\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust は静的型付けによって型安全性を提供します。変数のバインディングは `let` \"\n\"を使用して行います。\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"`x = 20` のコメント化を解除して、変数がデフォルトで不変であることを示します。\"\n\"変更を許可するには、`mut` キーワードを追加します。\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"ここでの `i32` は変数の型です。これはコンパイル時に指定する必要がありますが、\"\n\"多くの場合、プログラマーは型推論（後述）を使用することでこれを省略できます。\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"基本的な組み込み型と、各型のリテラル値の構文を以下に示します。\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"型\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"リテラル\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"符号付き整数\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`、`i16`、`i32`、`i64`、`i128`、`isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`、`0`、`1_000`、`123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"符号なし整数\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`、`u16`、`u32`、`u64`、`u128`、`usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`、`123`、`10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"浮動小数点数\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`、`f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`、`-10.0e20`、`2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Unicode スカラー値\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`、`'α'`、`'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"ブール値\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`、`false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"各型の幅は次のとおりです。\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`、`uN`、`fN` は _N_ ビット幅です。\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` と `usize` はポインタの幅です。\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` は 32 ビット幅です。\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` は 8 ビット幅です。\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"上記には示されていない構文もあります。\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"数字のアンダースコアはすべて省略できます。アンダースコアは読みやすくするため\"\n\"にのみ使用します。そのため、`1_000` は `1000`（または `10_00`）、`123_i64` \"\n\"は `123i64` と記述できます。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"`main` 以外の関数が出てきたのは今回が初めてですが、その意味は明確です。つま\"\n\"り、3 つの整数を取り、1 つの整数を返します。関数については、後で詳しく説明し\"\n\"ます。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"算術は他の言語とよく似ており、優先順位も類似しています。\"\n\n#: src/types-and-values/arithmetic.md\n#, fuzzy\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"整数オーバーフローはどうでしょうか。C と C++ では、 _符号付き_ 整数のオーバー\"\n\"フローは実際には未定義であり、プラットフォームやコンパイラによって動作が異な\"\n\"る場合があります。Rust では、整数オーバーフローが定義されています。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"`i32` を `i16` に変更して、整数オーバーフローを確認します。これは、デバッグビ\"\n\"ルドではパニックになり（チェックされ）、リリースビルドではラップされます。\"\n\"オーバーフロー、飽和、キャリーなどのオプションもあり、メソッド構文を使用して\"\n\"これらのオプションにアクセスします（例: `(a * b).saturating_add(b * c).\"\n\"saturating_add(c * a)`）。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"実際には、コンパイラは定数式のオーバーフローを検出します。この例で別の関数が\"\n\"必要になるのはそのためです。\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust は、どのように変数が _使用されているか_ を確認することで、型を判別しま\"\n\"す。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"このスライドは、変数の宣言と使用方法による制約に基づいて、Rust コンパイラが型\"\n\"を推測する仕組みを示しています。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"このように宣言された変数は、どのようなデータも保持できる動的な「任意の型」で\"\n\"はない、という点を強調することが非常に重要です。このような宣言によって生成さ\"\n\"れたマシンコードは、型の明示的な宣言と同一です。コンパイラが代わりに作業を行\"\n\"い、より簡潔なコードの作成を支援します。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"整数リテラルの型に制約がない場合、Rust はデフォルトで `i32` を使用します。こ\"\n\"れは、エラー メッセージに `{integer}` として表示されることがあります。同様\"\n\"に、浮動小数点リテラルはデフォルトで `f64` になります。\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// エラー: `{float} == {integer}` の実装がありません\\n\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"1 つ目と 2 つ目のフィボナッチ数はどちらも `1` です。n>2 の場合、n 番目のフィ\"\n\"ボナッチ数は、n-1 番目のフィボナッチ数と n-2 番目のフィボナッチ数の合計として\"\n\"再帰的に計算されます。\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"n 番目のフィボナッチ数を計算する関数 `fib(n)` を記述します。この関数はいつパ\"\n\"ニックするでしょうか。\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// ベースケース。\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"ここを実装してください\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// 再帰的なケース。\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\n#, fuzzy\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"if Expressions\"\nmsgstr \"if式\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"break and continue\"\nmsgstr \"`break` と `continue`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"`if` 式\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Rust の [`if` 式](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) は、他の言語における `if` 文と全く同じように使えます。\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"biggish\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"huge\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"さらに、`if` を式としても用いることができます。それぞれのブロックにある最後の\"\n\"式が、`if` 式の値となります。\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"small\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"large\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"number size: {}\\\"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"`if` は式であるため、1 つの決まった型を持たなくてはなりません。したがって、\"\n\"`if` 式の分岐ブロックは同一の型を持つ必要があります。2 つ目の例において、\"\n\"`x / 2` のあとに `;` を付け加えると何が起こるでしょうか。\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"An `if` expression should be used in the same way as the other expressions. \"\n\"For example, when it is used in a `let` statement, the statement must be \"\n\"terminated with a `;` as well. Remove the `;` before `println!` to see the \"\n\"compiler error.\"\nmsgstr \"\"\n\"式で `if` を使用する場合、次のステートメントと区切るために、式に `;` を含める\"\n\"必要があります。`println!` の前にある `;` を削除すると、コンパイラ エラーが表\"\n\"示されます。\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\"Rust には、`while`、`loop`、`for` の 3 つのループ キーワードがあります。\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[`while` キーワード](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) は、他の言語における `while` と非常によく似た働き\"\n\"をします。\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`for` ループ](https://doc.rust-lang.org/std/keyword.for.html) は、値の範囲を\"\n\"反復処理します。\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"なお、この `for` ループは `4` までしか反復処理しません。5 を範囲に含める場合\"\n\"の構文は `1..=5` であることを示します。\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`loop` ステートメント](https://doc.rust-lang.org/std/keyword.loop.html) は、\"\n\"`break` まで永久にループするだけです。\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"次のイテレーションをすぐさま開始したい場合は [`continue`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#continue-expressions) を使用し\"\n\"てください。\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). With \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions) を使用してください。\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"Note that `loop` is the only looping construct which can return a non-\"\n\"trivial value. This is because it's guaranteed to only return at a `break` \"\n\"statement (unlike `while` and `for` loops, which can also return when the \"\n\"condition fails).\"\nmsgstr \"\"\n\"注意が必要なのは、`loop` が唯一、非自明な値を返すことができるループ構造である\"\n\"という点です。これは、`loop` が少なくとも一度は必ず実行されることが保証されて\"\n\"いるからです（これに対して、while や for ループは必ずしも実行されるわけではあ\"\n\"りません）。\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"`continue` と `break` はオプションでラベル引数を取ることができます。ラベルは\"\n\"ネストしたループから抜け出すために使われます。\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"Labeled break also works on arbitrary blocks, e.g.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"This line gets skipped\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"コードブロック\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Rust におけるブロックの中にはいくつかの式が存在します。それぞれのブロックは値\"\n\"と型を持っており、ブロックの値や型はそのブロック内にある最後の式の値や型と一\"\n\"致します。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"最後の式が `;` で終了した場合、ブロック全体の値と型は `()` になります。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"ブロック内にある最後の行を変更することによって、ブロック全体の値が変わること\"\n\"が分かります。例えば、行末のセミコロンを追加/削除したり、`return` を使用した\"\n\"りすることで、ブロックの値は変化します。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"変数のスコープは、囲まれたブロック内に限定されます。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"外側のスコープの変数と、同じスコープの変数の両方をシャドーイングできます。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"shadowed in inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"after: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"最後の例の内側のブロックに `b` を追加し、そのブロックの外側でアクセスを試みる\"\n\"ことで、変数のスコープが制限されていることを示します。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variables' memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"シャドーイング後は両方の変数のメモリ位置が同時に存在するため、シャドーイング\"\n\"はミューテーションとは異なります。どちらも、コードで使用する場所に応じて同じ\"\n\"名前で使用できます。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"シャドーイング変数の型はさまざまです。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"シャドーイングは一見わかりにくいように見えますが、`.unwrap()` の後の値を保持\"\n\"する場合に便利です。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"宣言パラメータの後には型（一部のプログラミング言語と逆）、戻り値の型が続きま\"\n\"す。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"関数本体（または任意のブロック）内の最後の式が戻り値になります。式の末尾の `;\"\n\"` を省略します。`return` キーワードは早期リターンに使用できますが、関数の最後\"\n\"は「裸の値」の形式にするのが慣用的です（`return` を使用するには `gcd` をリ\"\n\"ファクタリングします）。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the return type is omitted.\"\nmsgstr \"\"\n\"戻り値がなく、'unit type'、`()` を返す関数もあります。`-> ()` の戻り値の型が\"\n\"省略されている場合、コンパイラはこれを推測します。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"オーバーロードはサポートされていません。各関数の実装は 1 つです。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"常に固定数のパラメータを受け取ります。デフォルトの引数はサポートされていませ\"\n\"ん。マクロを使用して可変関数をサポートできます。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"常に 1 つのパラメータ型セットを受け取ります。これらの型は汎用にすることもでき\"\n\"ますが、これについては後で説明します。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"マクロはコンパイル時に Rust コードに展開され、可変長引数を取ることができま\"\n\"す。これらは末尾の `!` で区別されます。Rust 標準ライブラリには、各種の便利な\"\n\"マクロが含まれています。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)`: [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.\"\n\"html) で説明されている書式を適用して、1 行を標準出力に出力します。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)`: `println!` と同様に機能しますが、結果を文字列として返\"\n\"します。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)`: 式の値をログに記録して返します。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()`: 一部のコードに未実装のマークを付けます。実行するとパニックが発生し\"\n\"ます。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()`: コードの一部をアクセス不能としてマークします。実行するとパ\"\n\"ニックが発生します。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"このセクションの要点は、マクロの一般的な利便性と、その使用方法を示すことにあ\"\n\"ります。マクロとして定義されている理由と、展開先は特に重要ではありません。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"マクロの定義についてはコースでは説明しませんが、後のセクションで導出マクロの\"\n\"使用について説明します。\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\"[コラッツ数列](https://en.wikipedia.org/wiki/Collatz_conjecture) は、ゼロより\"\n\"大きい任意の n\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"_ が 1 の場合、数列は _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"たとえば、_n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"数列は終了します。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"任意の初期値 `n` に対するコラッツ数列の長さを計算する関数を作成します。\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// `n` から始まるコラッツ数列の長さを決定。\\n\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"おかえり\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 55 分です。\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 55 分です\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"配列型 `[T; N]`には、同じ型 `T` の `N`（コンパイル時定数）個の要素が保持され\"\n\"ます。なお、配列の長さはその型の一部分です。つまり、`[u8; 3]` と `[u8; 4]` \"\n\"は 2 つの異なる型とみなされます。スライス（サイズが実行時に決定される）につい\"\n\"ては後で説明します。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"境界外の配列要素にアクセスしてみてください。配列アクセスは実行時にチェックさ\"\n\"れます。Rust では通常、これらのチェックを最適化により除去できます（Unsafe \"\n\"Rust を使用することで回避できます）。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"リテラルを使用して配列に値を代入することができます。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"`println!` マクロは、`?` 形式のパラメータを使用してデバッグ実装を要求します。\"\n\"つまり、`{}` はデフォルトの出力を、`{:?}` はデバッグ出力を提供します。整数や\"\n\"文字列などの型はデフォルトの出力を実装しますが、配列はデバッグ出力のみを実装\"\n\"します。そのため、ここではデバッグ出力を使用する必要があります。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"`#` を追加すると（例: `{a:#?}`）、読みやすい「プリティ プリント」形式が呼び出\"\n\"されます。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"配列と同様に、タプルの長さは固定されています。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"タプルは、異なる型の値を複合型にグループ化します。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"タプルのフィールドには、ピリオドと値のインデックス（例: `t.0`、`t.1`）でアク\"\n\"セスできます。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\"for ステートメントでは、配列の反復処理がサポートされています（タプルはサポー\"\n\"トされていません）。\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"この機能は `IntoIterator` トレイトを使用しますが、これはまだ説明していませ\"\n\"ん。\"\n\n#: src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked, while debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"ここでは `assert_ne!` マクロが新たに加わっていますが、他にも `assert_eq! マク\"\n\"ロと`assert!` マクロがあります。これらは常にチェックされますが、\"\n\"`debug_assert!` などのデバッグ専用の派生ツールは、リリースビルドでは何もコン\"\n\"パイルされません。\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"配列には他の配列を含めることができます。\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"非同期の呼び出しの返り値の型は？\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"上記のような配列を使用して、行列を転置（行を列に変換）する `transpose` 関数を\"\n\"記述します。\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"以下のコードを <https://play.rust-lang.org/> にコピーして、関数を実装します。\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: 実装が完了したら、これを削除します。\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- このコメントにより rustfmt で改行を追加\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transposed: {:#?}\\\"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 55 分です\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A reference provides a way to access another value without taking ownership \"\n\"of the value, and is also called \\\"borrowing\\\". Shared references are read-\"\n\"only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"参照を使用すると、値について責任を負うことなく別の値にアクセスできます。参照\"\n\"は「借用」とも呼ばれます。共有参照は読み取り専用であり、参照先のデータは変更\"\n\"できません。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"型 `T` への共有参照の型は `&T` です。参照値は `&` 演算子で作成されます。`*` \"\n\"演算子は参照を「逆参照」し、その値を生成します。\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust はダングリング参照を静的に禁止します。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References can never be null in Rust, so null checking is not necessary.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"参照とは、参照する値を「借用する」ことだと言われていますが、これはポインタに\"\n\"慣れていない受講者にとって理解しやすい説明です。コードでは参照を使用して値に\"\n\"アクセスできますが、その値は元の変数によって「所有」されたままとなります。所\"\n\"有については、コースの 3 日目で詳しく説明します。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"参照はポインタとして実装されます。主な利点は、参照先よりもはるかに小さくでき\"\n\"ることです。C または C++ に精通している受講者は、参照をポインタとして認識でき\"\n\"ます。このコースの後半で、未加工ポインタの使用によるメモリ安全性のバグを \"\n\"Rust で防止する方法について説明します。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"Rust は参照を自動的に作成しないため、常に `&` を付ける必要があります。\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust は、特にメソッドを呼び出すとき、自動的に逆参照する場合があります（`r.\"\n\"count_ones()` を試してください）。C++ のような `->` 演算子は必要ありません。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"この例では、`r` は可変であるため、再代入が可能です（`r = &b`）。これにより \"\n\"`r` が再バインドされ、他の値を参照するようになります。これは、参照に代入する\"\n\"と参照先の値が変更される C++ とは異なります。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"共有参照では、値が可変であっても、参照先の値は変更できません。`*r = 'X'` と指\"\n\"定してみてください。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust は、すべての参照のライフタイムを追跡して、十分な存続期間を確保していま\"\n\"す。安全な Rust では、ダングリング参照が発生することはありません。`x_axis` \"\n\"は `point` への参照を返しますが、関数が戻ると `point` の割り当てが解除される\"\n\"ため、コンパイルされません。\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"借用については所有権のところで詳しく説明します。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"排他参照は可変参照とも呼ばれ、参照先の値を変更できます。型は `&mut T` です。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"「排他」とは、この参照のみを使用して値にアクセスできることを意味します。他の\"\n\"参照（共有または排他）が同時に存在することはできず、排他参照が存在する間は参\"\n\"照先の値にアクセスできません。`x_coord` が有効な状態で `&point.0` を作成する\"\n\"か、`point.0` を変更してみてください。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"`let mut x_coord: &i32` と `let x_coord: &mut i32` の違いに注意してください。\"\n\"前者は異なる値にバインドできる共有参照を表すのに対し、後者は可変の値への排他\"\n\"参照を表します。\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"スライスは、より大きなコレクションに対するビューを提供します。\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"スライスは、スライスされた型からデータを借用します。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"スライスを作成するには、`a` を借用し、開始インデックスと終了インデックスを角\"\n\"かっこで囲んで指定します。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"スライスがインデックス 0 から始まる場合、Rust の範囲構文により開始インデック\"\n\"スを省略できます。つまり、`&a[0..a.len()]` と `&a[..a.len()]` は同じです。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"最後のインデックスについても同じことが言えるので、`&a[2..a.len()]` と \"\n\"`&a[2..]` は同じです。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"配列全体のスライスを簡単に作成するには、`&a[..]` と書くことが出来ます。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` は i32 のスライスへの参照です。`s` の型（`&[i32]`）に配列の長さが含まれな\"\n\"くなったことに注目してください。これにより、さまざまなサイズのスライスに対し\"\n\"て計算を実行できます。\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"スライスは常に別のオブジェクトから借用します。この例では、`a` は少なくともス\"\n\"ライスが存在する間は「存続」 している（スコープ内にある)必要があります。\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"World\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Hello \\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` は文字列スライスを導入します。これは、メモリブロックに保存されている \"\n\"UTF-8 でエンコードされた文字列データへの不変の参照です。文字列リテラル\"\n\"（`”Hello”`）は、プログラムのバイナリに格納されます。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Rust の `String` 型は、バイトのベクターのラッパーです。`Vec<T>` と同様、所有\"\n\"されます。\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"他の多くの型と同様に、`String::from()` は文字列リテラルから文字列を作成しま\"\n\"す。`String::new()` は新しい空の文字列を作成します。`push()` メソッドと \"\n\"`push_str()` メソッドを使用して、そこに文字列データを追加できます。\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"`format!()` マクロを使用すると、動的な値から所有文字列を簡単に生成できます。\"\n\"これは println!() と同じ形式指定を受け入れます。\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"`&` を使用して `String` から `&str` スライスを借用し、必要に応じて範囲を選択\"\n\"できます。文字境界に揃えられていないバイト範囲を選択すると、その式でパニック\"\n\"を起こします。`chars` イテレータは文字単位で処理するため、正しい文字境界を取\"\n\"得しようとすることよりも、このイテレータを使用するほうが望ましいです。\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"C++ プログラマー向けの説明：`&str` は常にメモリ上の有効な文字列を指しているよ\"\n\"うなC++ の std::string_view と考えられます。Rust の `String` は、C++ の \"\n\"`std::string` とおおむね同等です（主な違いは、UTF-8 でエンコードされたバイト\"\n\"のみを含めることができ、短い文字列に対する最適化が行われないことです）。\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"バイト文字列リテラルを使用すると、`&[u8]` 値を直接作成できます。\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"未加工の文字列を使用すると、エスケープを無効にして `&str` 値を作成できます\"\n\"（`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`）。二重引用符を埋め込むには、引用符の両側に同量の \"\n\"`#` を使用します。\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"ここでは、点を `[f64;3]` として表現する 3 次元ジオメトリのユーティリティ関数\"\n\"をいくつか作成します。関数シグネチャは任意で指定してください。\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// 座標の二乗を合計して平方根を取り、\\n\"\n\"// ベクターの大きさを計算します。`sqrt()` メソッドを使用して、`v.sqrt()` と同\"\n\"様に\\n\"\n\"// 平方根を計算します。\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// 大きさを計算し、すべての座標をその大きさで割ることで\\n\"\n\"// ベクターを正規化します。\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// 次の `main` を使用して処理をテストします。\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitude of a unit vector: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// 指定されたベクターの大きさを計算します。\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// 向きを変えずにベクターの大きさを 1.0 に変更します。\\n\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\n#, fuzzy\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 50 分です\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"C や C++ と同様に、Rust はカスタム構造体をサポートしています。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"キーポイント: \"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"構造体は、C や C++ においてと同じように機能します。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"C++ と同様に、また C とは異なり、型を定義するのに typedef は必要ありません。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"C++ とは異なり、構造体間に継承はありません。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"ここで、構造体にはさまざまな型があることを説明しましょう。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"サイズがゼロの構造体（例: `struct Foo;`）は、ある型にトレイトを実装しているも\"\n\"のの、値自体に格納するデータがない場合に使用できます。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"次のスライドでは、フィールド名が重要でない場合に使用されるタプル構造体を紹介\"\n\"します。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"適切な名前の変数がすでにある場合は、省略形を使用して構造体を作成できます。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"構文 `..avery` を使用すると、明示的にすべてのフィールドを入力しなくても、古い\"\n\"構造体のフィールドの大部分をコピーできます。この構文は、常に最後の要素にする\"\n\"必要があります。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"フィールド名が重要でない場合は、タプル構造体を使用できます。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"これは多くの場合、単一フィールド ラッパー（ニュータイプと呼ばれます）に使用さ\"\n\"れます。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Ask a rocket scientist at NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"ニュータイプは、プリミティブ型の値に関する追加情報をエンコードする優れた方法\"\n\"です。次に例を示します。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"数値はいくつかの単位で測定されます（上記の例では `Newtons`）。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"この値は作成時に検証に合格したため、`PhoneNumber(String)` または \"\n\"`OddNumber(u32)` を使用するたびに再検証する必要はありません。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"ニュータイプの 1 つのフィールドにアクセスして、`Newtons` 型に `f64` の値を追\"\n\"加する方法を示します。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust では通常、不明瞭なこと（自動ラップ解除や、整数としてのブール値の使用な\"\n\"ど）は好まれません。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"演算子のオーバーロードについては、3 日目（ジェネリクス）で説明します。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"この例は、[マーズ クライメイト オービター](https://en.wikipedia.org/wiki/\"\n\"Mars_Climate_Orbiter)の失敗を参考にしています。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"`enum` キーワードを使用すると、いくつかの異なるバリアントを持つ型を作成できま\"\n\"す。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// 単純なバリアント\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// 単純なバリアント\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// 構造体バリアント\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\\\"On this turn: {player_move:?}\\\"\"\nmsgstr \"\\\"On this turn: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"列挙型を使用すると、1 つの型で一連の値を収集できます。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` はバリアントを持つ型です。`Direction`には、`Direction::Left` と \"\n\"`Direction::Right` の 2 つの値があります。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` は、3 つのバリアントを持つ型です。Rust はペイロードに加えて判別\"\n\"式を格納することで、実行時にどのバリアントが `PlayerMove` 値に含まれているか\"\n\"を把握できるようにします。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"ここで構造体と列挙型を比較することをおすすめします。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"どちらでも、フィールドのないシンプルなバージョン（単位構造体）か、さまざまな\"\n\"フィールドがあるバージョン（バリアント ペイロード）を使用できます。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"個別の構造体を使用して、列挙型のさまざまなバリアントを実装することもできます\"\n\"が、その場合、それらがすべて列挙型で定義されている場合と同じ型にはなりませ\"\n\"ん。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust は判別式を保存するために最小限のスペースを使用します。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"必要に応じて、必要最小限のサイズの整数を格納します。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"許可されたバリアント値がすべてのビットパターンをカバーしていない場合、無効な\"\n\"ビットパターンを使用して判別式をエンコードします（「ニッチの最適化」）。たと\"\n\"えば、`Option<&u8>` には `None` バリアントに対する整数へのポインタまたは \"\n\"`NULL` が格納されます。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"必要に応じて（たとえば C との互換性を確保するために）判別式を制御できます。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"`repr` がない場合、10001 は 2 バイトに収まるため、判別式の型には 2 バイトが使\"\n\"用されます。\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/borrowing/shared.md\n#: src/error-handling/result.md src/error-handling/anyhow.md\nmsgid \"More to Explore\"\nmsgstr \"その他\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"Rust には、列挙型が占めるスペースを少なくするために使用できる最適化がいくつか\"\n\"あります。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"null ポインタの最適化: [一部の型](https://doc.rust-lang.org/std/option/\"\n\"#representation)で、Rust は `size_of::<T>()` が `size_of::<Option<T>>()` と等\"\n\"しいことを保証します。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"以下のサンプルコードは、ビット単位の表現が実際にどのようになるかを示していま\"\n\"す。コンパイラはこの表現に関して保証しないので、これはまったく安全ではないこ\"\n\"とに注意してください。\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"定数変数はコンパイル時に評価され、使用場所にかかわらずその値がインライン化さ\"\n\"れます。\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) \"\n\"によると、定数変数は使用時にインライン化されます。\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"コンパイル時に `const` 値を生成するために呼び出せるのは、`const` とマークされ\"\n\"た関数のみです。ただし、`const` 関数は実行時に呼び出すことができます。\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"`const` は C++ の `constexpr` と意味的によく似ていることを説明します。\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"実行時に評価される定数が必要になることはあまりありませんが、静的変数を使用す\"\n\"るよりも便利で安全です。\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"静的変数はプログラムの実行全体を通じて存続するため、移動しません。\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Welcome to RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"[Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.html) \"\n\"で説明されているように、静的変数は使用時にインライン化されず、実際の関連する\"\n\"メモリ位置に存在します。これは安全でないコードや埋め込みコードに有用であり、\"\n\"変数はプログラムの実行全体を通じて存続します。グローバル スコープの値にオブ\"\n\"ジェクト ID が必要ない場合は、一般的に `const` が使用されます。\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"一方、`static` は、C++ の `const` または可変グローバル変数にかなり似ていま\"\n\"す。\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` はオブジェクト ID（メモリ内のアドレス）と、内部可変性を持つ型に必要\"\n\"な状態（`Mutex<T>` など）を提供します。\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"`static` 変数はどのスレッドからでもアクセスできるため、`Sync` である必要があ\"\n\"ります。内部の可変性は、[`Mutex`](https://doc.rust-lang.org/std/sync/struct.\"\n\"Mutex.html) やアトミックなどの方法で実現できます。\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"マクロ `std::thread_local` を使用して、スレッド ローカルのデータを作成できま\"\n\"す。\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"型エイリアスは、別の型の名前を作成します。この 2 つの型は同じ意味で使用できま\"\n\"す。\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// エイリアスは長くて複雑な型に使用すると便利です。\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"C プログラマーは、これを `typedef` と同様のものと考えるでしょう。\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"エレベーター制御システムでイベントを表すデータ構造を作成します。さまざまなイ\"\n\"ベントを構築するための型と関数を自由に定義して構いません。`#[derive(Debug)]` \"\n\"を使用して、型を `{:?}` でフォーマットできるようにします。\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"この演習に必要なのは、`main` がエラーなしで実行されるように、データ構造を作成\"\n\"して入力することだけです。このコースの次のパートでは、これらの構造からデータ\"\n\"を取得する方法を説明します。\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// コントローラが反応する必要があるエレベーター システム内のイベント。\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: 必要なバリアントを追加する\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// 運転方向。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// かごが所定の階に到着した。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// かごのドアが開いた。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// かごのドアが閉まった。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"/// 所定の階のエレベーター ロビーで方向ボタンが押された。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// エレベーターのかごの階数ボタンが押された。\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"The car door opened: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"The car door closed: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// ボタンが押された。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// 車両が所定の階に到着した。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// かごのドアが開いた。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// かごのドアが閉まった。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// 階は整数として表される。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// ユーザーがアクセスできるボタン。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// 所定の階のエレベーター ロビーにあるボタン。\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// かご内の階数ボタン。\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"2日目の講座へようこそ\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Rust についてかなり多くのことを学んできましたが、今日は Rust の型システムに焦\"\n\"点を当てます。\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"パターン マッチング: 構造からのデータの抽出。\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"メソッド: 関数と型の関連付け。\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"トレイト: 複数の型で共有される挙動。\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"ジェネリクス: 他の型での型のパラメータ化。\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"標準ライブラリの型とトレイト: Rust の豊富な標準ライブラリの紹介。\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 15 分です。\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"このセグメントの所要時間は約 1 時間です\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"`match` キーワードを使用すると、1 つ以上のパターンに対して値を照合できます。\"\n\"上から順に照合が行われ、最初に一致したパターンのみが実行されます。\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"C や C++ の `switch` と同様に、パターンには単純な値を指定できます。\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Quitting\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Moving around\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Number input\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Lowercase: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Something else\\\"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"`_` パターンは、任意の値に一致するワイルドカード パターンです。式は論駁不可能\"\n\"でなければなりません。つまり、あらゆる可能性をカバーする必要があるため、最後\"\n\"のキャッチオール ケースとして `_` がよく使用されます。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"一致を式として使用できます。`if` と同様に、各マッチアームは同じ型にする必要が\"\n\"あります。型は、ブロックの最後の式です（存在する場合）。上記の例では、型は \"\n\"`()` です。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"パターンの変数（この例では `key`）により、マッチアーム内で使用できるバイン\"\n\"ディングが作成されます。\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"マッチガードにより、条件が true の場合にのみアームが一致します。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"特定の文字がパターンでどのように使用されるかを説明します。\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` を `or` として指定する\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` は必要に応じて展開できる\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` は 5 を含む範囲を表す\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` はワイルドカードを表す\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"パターンのみでは表現できない複雑な概念を簡潔に表現したい場合、独立した構文機\"\n\"能であるマッチガードは重要かつ必要です。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"マッチガードは、マッチアーム内の個別の `if` 式とは異なります。分岐ブロック内\"\n\"（`=>` の後）の `if` 式は、マッチアームが選択された後に実行されます。そのブ\"\n\"ロック内で `if` 条件が満たされなかった場合、元の `match` 式の他のアームは考慮\"\n\"されません。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"ガードで定義された条件は、`|` が付いたパターン内のすべての式に適用されます。\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"More To Explore\"\nmsgstr \"その他\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Another piece of pattern syntax you can show students is the `@` syntax \"\n\"which binds a part of a pattern to a variable. For example:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"outer: {outer:?}, inner: {inner}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"In this example `inner` has the value 123 which it pulled from the `Option` \"\n\"via destructuring, `outer` captures the entire `Some(inner)` expression, so \"\n\"it contains the full `Option::Some(123)`. This is rarely used but can be \"\n\"useful in more complex patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"構造体（structs）\"\n\n#: src/pattern-matching/destructuring-structs.md\n#, fuzzy\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\"タプルと同様に、構造体と列挙型もパターンマッチによりデストラクトできます。\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, other fields were ignored\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"`foo` のリテラル値を他のパターンと一致するように変更します。\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"`Foo` に新しいフィールドを追加し、必要に応じてパターンに変更を加えます。\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"キャプチャと定数式を区別しづらい場合があります。2 つ目のアームの `2` を変数に\"\n\"変更してみて、うまく機能しないことを確認します。これを `const` に変更して、再\"\n\"び動作することを確認します。\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"タプルと同様に、構造体と列挙型もパターンマッチによりデストラクトできます。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"パターンは、変数を値の一部にバインドするためにも使用できます。以下のようにし\"\n\"て、型の構造を調べることができます。単純な `enum` から始めましょう。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"cannot divide {n} into two equal parts\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} divided in two is {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"sorry, an error happened: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"ここでは、アーム（arm, パターンを並べたもの）を使用して `Result` 値の分解を\"\n\"行っています。最初のアームでは、`half` は `Ok` バリアント内の値にバインドされ\"\n\"ます。2 つ目のアームでは `msg` がエラー メッセージにバインドされます。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"`if`/`else` 式は、後で `match` でアンパックされる列挙型を返しています。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"列挙型の定義に 3 つ目のバリアント（列挙型の要素のこと）を追加し、コード実行時\"\n\"にエラーを表示してみましょう。コードが網羅されていない箇所を示し、コンパイラ\"\n\"がどのようにヒントを提供しようとしているかを説明します。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"列挙型バリアントの値には、パターンが一致した場合にのみアクセスできます。\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"検索が網羅的でない場合にどうなるかを示します。すべてのケースが処理されるタイ\"\n\"ミングを確認することで、Rust コンパイラの利点を強調します。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust には、他の言語とは異なる制御フロー構造がいくつかあります。これらはパター\"\n\"ン マッチングに使用されます。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"`if let` 式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"`let else` 式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"`while let` 式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[`if let` 式](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions) を使用すると、値がパターンに一致するかどうかに応じて\"\n\"異なるコードを実行できます。\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"slept for {duration:?}\\\"\"\nmsgstr \"\\\"slept for {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"パターンをマッチして関数から戻るという一般的なケースでは、[`let else`]\"\n\"(https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) を使用\"\n\"します。「else」ケースは発散する必要があります（`return`、`break`、パニックな\"\n\"ど、ブロックから抜けるもの以外のすべて）。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"not a hex digit\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"got empty string\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"got None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"`if let` に似た [`while let`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#predicate-pattern-loops) 派生物もあります。これ\"\n\"は、パターンに照らして値をテストします。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"ここで [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) は、文字列が空になるまで `Some(c)` を返し、その後 \"\n\"`None` を返します。`while let` を使用すると、すべてのアイテムに対して反復処理\"\n\"を続行できます。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"`match` とは異なり、`if let` ではすべての分岐を網羅する必要はないため、\"\n\"`match` よりも簡潔になります。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"一般的な使用方法は、`Option` を操作するときに `Some` 値を処理することです。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"`match` とは異なり、`if let` はパターン マッチングでガード節をサポートしてい\"\n\"ません。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"次に示すように、`if let` は積み重なってしまうことがあります。`let-else` の構\"\n\"成は、このネストされたコードを平坦にする助けとなります。読みづらいバージョン\"\n\"を受講者向けに書き直して、受講者が変化を確認できるようにします。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"書き換えたバージョンは次のとおりです。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"値がパターンに一致する限り、`while let` ループが繰り返されることを説明しま\"\n\"す。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"`name.pop()` でunwrapする値がない場合に中断する if ステートメントを使用して、\"\n\"`while let` ループを無限ループに書き換えることができます。`while let` は、上\"\n\"記のシナリオの糖衣構文として使用できます。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"演算式用の簡単な再帰エバリュエータを作成してみましょう。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"An example of a small arithmetic expression could be `10 + 20`, which \"\n\"evaluates to `30`. We can represent the expression as a tree:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, \"\n\"which evaluate to `85`. We represent this as a much bigger tree:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"In code, we will represent the tree with two types:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// 2 つのサブ式に対して実行する演算。\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// ツリー形式の式。\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// 2 つのサブ式に対する演算。\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// リテラル値\\n\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"ここでの `Box` 型はスマート ポインタです。詳細はこの講座で後ほど説明します。\"\n\"テストで見られるように、式は `Box::new` で「ボックス化」できます。ボックス化\"\n\"された式を評価するには、逆参照演算子（`*`）を使用して「ボックス化解除」します\"\n\"（`eval(*boxed_expr)`）。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"一部の式は評価できず、エラーが返されます。標準の [`Result<Value, String>`]\"\n\"(https://doc.rust-lang.org/std/result/enum.Result.html) 型は、成功した値\"\n\"（`Ok(Value)`）またはエラー（`Err(String)`）のいずれかを表す列挙型です。この\"\n\"型については、後ほど詳しく説明します。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"コードをコピーして Rust プレイグラウンドに貼り付け、`eval` の実装を開始しま\"\n\"す。完成したエバリュエータはテストに合格する必要があります。`todo!()` を使用\"\n\"して、テストを 1 つずつ実施することをおすすめします。`#[ignore]` を使用して、\"\n\"テストを一時的にスキップすることもできます。\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"division by zero\\\"\"\n\n#: src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"\\\"expr: {expr:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust を使用すると、関数を新しい型に関連付けることができます。これは `impl` ブ\"\n\"ロックで実行します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// レシーバなし、静的メソッド\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// 自身に対する排他的な読み取り / 書き込み借用アクセス\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// 自身に対する共有および読み取り専用の借用アクセス\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Recorded {} laps for {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Lap {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive ownership of self (covered later)\\n\"\nmsgstr \"// 自身の排他的所有権\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Race {} is finished, total lap time: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Monaco Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"`self` 引数は、「レシーバ」、つまりメソッドが操作するオブジェクトを指定しま\"\n\"す。メソッドの一般的なレシーバは次のとおりです。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: 共有の不変参照を使用して、呼び出し元からオブジェクトを借用します。こ\"\n\"のオブジェクトは後で再び使用できます。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: 一意の可変参照を使用して、呼び出し元からオブジェクトを借用しま\"\n\"す。このオブジェクトは後で再び使用できます。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: オブジェクトの所有権を取得し、呼び出し元から遠ざけます。メソッドがオ\"\n\"ブジェクトの所有者になります。所有権が明示的に送信されない限り、メソッドが戻\"\n\"ると、オブジェクトは破棄（デアロケート）されます。完全な所有権は、必ずしも可\"\n\"変性を意味するわけではありません。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: 上記と同じですが、メソッドはオブジェクトを変更できます。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"レシーバなし: 構造体の静的メソッドになります。通常は、`new` と呼ばれるコンス\"\n\"トラクタを作成するために使用されます。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"メソッドを関数と比較して紹介するとよいでしょう。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"メソッドは型（構造体や列挙型など）のインスタンスで呼び出されます。最初のパラ\"\n\"メータはインスタンスを `self` として表します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"デベロッパーは、メソッド レシーバ構文でコードを整理する目的で、メソッドを使用\"\n\"することもできます。メソッドを使用することで、すべての実装コードを 1 つの予測\"\n\"可能な場所にまとめることができます。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"メソッド レシーバである `self` というキーワードの使用について説明します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"`self: Self` の略語であることを示し、構造体名の使用方法についても説明すること\"\n\"をおすすめします。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"`Self` は `impl` ブロックが存在する型の型エイリアスであり、ブロック内の他の場\"\n\"所で使用できることを説明します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"`self` は他の構造体と同様に使用され、ドット表記を使用して個々のフィールドを参\"\n\"照できることを説明します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"ここで `finish` を 2 回実行して、`&self` と `self` の違いを示すことをおすすめ\"\n\"します。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"`self` のバリアント以外にも、レシーバ型として許可されている [特別なラッパー\"\n\"型](https://doc.rust-lang.org/reference/special-types-and-traits.html)\"\n\"（`Box<Self>` など）もあります。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rustでは、型に関しての抽象化をトレイトを用いて行うことができます。トレイトは\"\n\"インターフェースに似ています：\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"// このモジュールから型を再エクスポートします。\\n\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// 挨拶を標準出力に出力します。\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"トレイトは、そのトレイトを実装するために各型に必要な多数のメソッドを定義しま\"\n\"す。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Woof, my name is {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"トレイトは `impl <trait> for <type> { .. }` ブロックに実装されます。\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"トレイトは予め実装された（デフォルトの）メソッドと、ユーザが自身で実装する必\"\n\"要のあるメソッドを指定することができます。デフォルトの実装のあるメソッドは、\"\n\"その定義を実装必須のメソットに依存することができます。\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"サポートされているトレイトは、次のようにカスタム型に自動的に実装できます。\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// デフォルト トレイトで `default` コンストラクタを追加します。\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// クローン トレイトで `clone` メソッドを追加します。\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\"// デバッグ トレイトで、`{:?}` を使用した出力のサポートを追加します。\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\\\"{p1:?} vs. {p2:?}\\\"\"\nmsgstr \"\\\"{:?} vs. {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"導出はマクロで実装され、多くのクレートには有用な機能を追加するための便利な導\"\n\"出マクロが用意されています。たとえば、`serde` は `#[derive(Serialize)]` を使\"\n\"用して、構造体のシリアル化のサポートを導出できます。\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"演習: ジェネリックなロガー\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"トレイト `Logger` と `log` メソッドを使用して、シンプルなロギングユーティリ\"\n\"ティを設計してみましょう。進行状況をログに記録するコードは、その後に `&impl \"\n\"Logger` を受け取ることができます。この場合、テストではテストログファイルに\"\n\"メッセージが書き込まれますが、本番環境ビルドではログサーバーにメッセージが送\"\n\"信されます。\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"However, the `StdoutLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"ただし、以下の `StderrLogger` は、詳細度(verbosity)に関係なく、すべてのメッ\"\n\"セージをログに記録します。ここでのタスクは、最大の詳細度を超えるメッセージを\"\n\"無視する `VerbosityFilter` 型を作成することです。\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"これは一般的なパターンです。つまり、トレイト実装をラップして同じトレイトを実\"\n\"装し、その過程で挙動を追加していく構造体です。ロギングユーティリティでは他に\"\n\"どのような種類のラッパーが役立つでしょうか。\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// 指定された詳細度レベルでメッセージをログに記録します。\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosity={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: `VerbosityFilter` を定義して実装します。\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"FYI\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Uhoh\\\"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"/// 指定された詳細度レベルまでのメッセージのみをログに記録。\\n\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 3 時間 5 分です。\"\n\n#: src/generics.md src/iterators.md src/testing.md\n#, fuzzy\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 45 分です\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Trait\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"dyn Trait\"\nmsgstr \"Asyncトレイト\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"Exercise: Generic min\"\nmsgstr \"演習: ジェネリックな `min`\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rustはジェネリクス（generics）をサポートします。これにより、使用または保存す\"\n\"る型に関してアルゴリズムやデータ構造（ソートアルゴリズムや、二分木など）を抽\"\n\"象化することができます。\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// `n` の値に応じて `even` または `odd` を選択します。\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"picked a number: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"picked a string: {:?}\\\"\"\nmsgstr \"\\\"picked a tuple: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"Rust は引数と戻り値の型に基づいて T の型を推測します。\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"In this example we only use the primitive types `i32` and `&str` for `T`, \"\n\"but we can use any type here, including user-defined types:\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"これは C++ テンプレートに似ていますが、Rust はジェネリック関数を部分的にすぐ\"\n\"にコンパイルするため、その関数は制約に一致するすべての型に対して有効である必\"\n\"要があります。たとえば、`n == 0` の場合は `even + odd` を返すように `pick` を\"\n\"変更してみてください。整数を使用した `pick` インスタンス化のみが使用されてい\"\n\"る場合でも、Rust はそれを無効とみなします。C++ ではこれを行うことができます。\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"これはゼロコスト抽象化です：抽象化なしに手作業でデータ構造を書いたときと、全\"\n\"く同じ結果を得ることができます。\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\"ジェネリクスを使って、具体的なフィールドの型を抽象化することができます：\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} and {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_Q:_ なぜ`T`は２回も `impl<T> Point<T> {}` において指定されたのでしょうか？冗\"\n\"長ではありませんか？\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"なぜなら、これはジェネリクスに対してのジェネリックな実装の箇所だからです。そ\"\n\"れらは独立してジェネリックです。\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\"つまり、そのようなメソッドは任意の`T`に対して定義されるということです。\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"`impl Point<u32> { .. }`のように書くことも可能です。 \"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point`はそれでもなおジェネリックであり、 `Point<f64>`を使うことができます。\"\n\"しかし、このブロックでのメソッドは`Point<u32>`に対してのみ利用可能となりま\"\n\"す。\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"新しい変数 `let p = Point { x: 5, y: 10.0 };` を宣言してみてください。2 つの\"\n\"変数（`T` と `U` など）を使用して、異なる型の要素を持つポイントを許可するよう\"\n\"にコードを更新します。\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"ジェネリクスを用いるとき、あるトレイトのメソッドを呼び出せるように、型がその\"\n\"トレイトを実装していることを要求したいことがよくあります。（脚注：本教材では\"\n\"\\\"Trait bounds\\\"を「トレイト制約」と翻訳しましたが、Rustの日本語翻訳コミュニ\"\n\"ティでは「トレイト境界」と呼ぶ流派もあり、どちらの翻訳を採用するかについては\"\n\"[議論がなされています](https://github.com/rust-lang-ja/book-ja/\"\n\"issues/172)。）\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"You can do this with `T: Trait`:\"\nmsgstr \"そうしたことは`T: Trait` や `impl Trait`を用いて行えます：\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"// struct NotCloneable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"Try making a `NonCloneable` and passing it to `duplicate`.\"\nmsgstr \"`NonClonable` を作成して`duplicate` に渡してみてください。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"複数のトレイトが必要な場合は、`+` を使って結合します。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"`where` 節の使い方を示しましょう。受講生はコードを読んでいるときに、この\"\n\"`where`節に遭遇します。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\"たくさんのパラメタがある場合に、`where`節は関数のシグネチャを整理整頓してくれ\"\n\"ます。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"`where`節には更に強力な機能があります。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"誰かに聞かれた場合で良いですが、その機能というのは、\\\":\\\" の左側には \"\n\"`Option<T>` のように任意の型を表現できるというものです。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"なお、Rust はまだ特化(specialization)をサポートしていません。たとえば、元の \"\n\"`duplicate` がある場合は、特化された `duplicate(a: u32)` を追加することはでき\"\n\"ません。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"トレイト境界と似たように、構文 `impl Trait`は関数の引数と返り値においてのみ利\"\n\"用可能です：\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// 以下の糖衣構文:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"`impl Trait`の意味は、位置によって少し異なります。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"パラメタに対しては、`impl Trait`は、トレイト境界を持つ匿名のジェネリックパラ\"\n\"メタのようなものです。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"返り値の型に用いる場合は、特定のトレイトを実装する何らかの具象型を返すが、具\"\n\"体的な型名は明示しないということを意味します。このことは公開されるAPIに具象型\"\n\"を晒したくない場合に便利です。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"返り値の位置における型推論は困難です。`impl Foo`を返す関数は、それが返す具象\"\n\"型はソースコードに書かれることないまま、具象型を選びます。`collect<B>() -> B`\"\n\"のようなジェネリック型を返す関数は、`B`を満たすどのような型でも返すことがあり\"\n\"ます。 また、関数の呼び出し元はそのような型を一つを選ぶ必要があるかもしれませ\"\n\"ん。 それは、 `let x: Vec<_> = foo.collect()`としたり、turbofishを用いて`foo.\"\n\"collect::<Vec<_>>()`とすることで行えます。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"`debuggable` の型は何でしょうか。`let debuggable: () = ..` を試して、エラー \"\n\"メッセージの内容を確認してください。\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miau!\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Hello, who are you? {}\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"この短い演習では、`LessThan` トレイトを使用して、2 つの値の最小値を決定する\"\n\"ジェネリックな `min` 関数を実装します。\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: `main` で使用する `min` 関数を実装します。\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"'7'\"\nmsgstr \"'x'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"'1'\"\nmsgstr \"'x'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) と \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"文字列（String）\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"ベクタ（Vec）\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"ハッシュマップ（HashMap）\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"このセクションの各スライドでは、時間をかけてドキュメント ページを確認し、より\"\n\"一般的なメソッドをいくつか取り上げてください。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust には、Rust のライブラリとプログラムで使用される一般的な型のセットを確立\"\n\"するのに役立つ標準ライブラリが付属しています。2 つのライブラリをスムーズに連\"\n\"携させることができるのは、このように両方とも同じ `String` 型を使用しているた\"\n\"めです。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"実際、Rust には標準ライブラリ（`core`、`alloc`、`std`）の複数のレイヤが含まれ\"\n\"ています。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` には、`libc` やアロケータ、さらにはオペレーティング システムの存在にも\"\n\"依存しない、最も基本的な型と関数が含まれます。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` には、`Vec`、`Box`、`Arc` など、グローバルヒープアロケータを必要とす\"\n\"る型が含まれます。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"多くの場合、埋め込みの Rust アプリは `core` のみを使用し、場合によっては \"\n\"`alloc` を使用します。\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust には詳細なドキュメントが用意されています。次に例を示します。\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"ループから早く抜け出したい場合は [`break`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions) を使用してください。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"[`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.html) のようなプリミ\"\n\"ティブ型。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`Option`](https://doc.rust-lang.org/stable/std/option/enum.Option.html) や \"\n\"[`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct.\"\n\"BinaryHeap.html) などの標準ライブラリ型。\"\n\n#: src/std-types/docs.md\nmsgid \"Use `rustup doc --std` or <https://std.rs> to view the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"実際、独自のコードにドキュメントをつけることができます。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// 最初の引数が 2 番目の引数で割り切れるかどうかを判定します。\\n\"\n\"///\\n\"\n\"/// 2 番目の引数がゼロの場合、結果は false になります。\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"コンテンツはマークダウンとして扱われます。公開されたすべての Rust ライブラリ \"\n\"クレートは、[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.\"\n\"html) ツールを使用して、[`docs.rs`](https://docs.rs) で自動的にドキュメントが\"\n\"まとめられます。このパターンを使用して、すべての公開アイテムを API でドキュメ\"\n\"ント化するのが慣用的です。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"アイテム内（モジュール内など）からアイテムをドキュメント化するには、「内部ド\"\n\"キュメントのコメント」と呼ばれる `//!` または `/*! .. */` を使用します。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"//! このモジュールには、整数の整除に関連する機能が含まれています。\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"<https://docs.rs/rand> で `rand` クレート用に生成されたドキュメントを受講者に\"\n\"示します。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"`Option<T>` の使用方法についてはすでにいくつか見てきましたが、これは型 `T` の\"\n\"値を格納するか、何も格納しません。たとえば、[`String::find`](https://doc.\"\n\"rust-lang.org/stable/std/string/struct.String.html#method.find) は \"\n\"`Option<usize>` を返します。\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find returned {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Character not found\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"標準ライブラリの非同期バージョン。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` は `Option` 内の値を返すか、パニックになります。`expect` も同様です\"\n\"が、エラーメッセージを受け取ります。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"None でパニックになる場合もありますが、「誤って」None のチェックを忘れること\"\n\"はありません。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"何かを一緒にハッキングする場合は、あちこちで `unwrap`/`expect` を行うのが一般\"\n\"的ですが、本番環境のコードは通常、`None` をより適切に処理します。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The \\\"niche optimization\\\" means that `Option<T>` often has the same size in \"\n\"memory as `T`, if there is some representation that is not a valid value of \"\n\"T. For example, a reference cannot be NULL, so `Option<&T>` automatically \"\n\"uses NULL to represent the `None` variant, and thus can be stored in the \"\n\"same memory as `&T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` は `Option` に似ていますが、オペレーションの成功または失敗を、それぞ\"\n\"れ異なる型で示します。これは式の演習で定義されていた `Res` に似ているものの、\"\n\"汎用的で、`Result<T, E>` の形式を取ります（`T` は `Ok` バリアントで使用され、\"\n\"`E` は `Err` バリアントで使用されます）。\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Could not read file content\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"The diary could not be opened: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"`Option` と同様に、成功した値は `Result` の内部にあり、デベロッパーはそれを明\"\n\"示的に抽出する必要があります。これにより、エラーチェックが促進されます。エ\"\n\"ラーが発生してはならない場合は、`unwrap()` または `expect()` を呼び出すことが\"\n\"できます。これもデベロッパーのインテントのシグナルです。\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"`Result` のドキュメントを読むことをすすめましょう。この講座では取り上げません\"\n\"が、言及する価値があります。このドキュメントには、関数型プログラミングに役立\"\n\"つ便利なメソッドや関数が多数含まれています。\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"`Result` は、3 日目で説明するエラー処理を実装する標準型です。\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) は、標準\"\n\"的なヒープ割り当ての拡張可能な UTF-8 文字列バッファです。\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hello\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, number of chars = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` は [`Deref<Target = str>`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#deref-methods-str) を実装します。つまり、`String` のすべて\"\n\"の `str` メソッドを呼び出すことができます。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` は新しい空の文字列を返します。文字列にプッシュするデータの量が\"\n\"わかっている場合は `String::with_capacity` を使用します。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` は、`String` のサイズをバイト単位で返します（文字数とは異なる場\"\n\"合があります）。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` は、実際の文字のイテレータを返します。[書記素クラスタ]\"\n\"(https://docs.rs/unicode-segmentation/latest/unicode_segmentation/struct.\"\n\"Graphemes.html)により、`char` は人間が「文字」と見なすものとは異なる場合があ\"\n\"ります。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"人々が文字列について言及する場合、単に `&str` または `String` のことを話して\"\n\"いる可能性があります。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"型が `Deref<Target = T>` を実装している場合、コンパイラにより `T` からメソッ\"\n\"ドを透過的に呼び出せるようになります。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"`Deref` トレイトについてはまだ説明していないため、現時点では主にドキュメント\"\n\"のサイドバーの構造について説明しています。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` は `Deref<Target = str>` を実装し、`str` のメソッドへのアクセスを透\"\n\"過的に許可します。\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"`let s3 = s1.deref();` と `let s3 = &*s1;` を記述して比較します。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` はバイトのベクターのラッパーとして実装されます。ベクターでサポートさ\"\n\"れているオペレーションの多くは `String` でもサポートされていますが、いくつか\"\n\"の保証が追加されています。\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"`String` にインデックスを付けるさまざまな方法を比較します。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"文字には `s3.chars().nth(i).unwrap()` を使用します。ここで `i` は境界内の場合\"\n\"や境界外の場合を表します。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"部分文字列には `s3[0..4]` を使用します。このスライスは、文字境界にある場合と\"\n\"ない場合があります。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) は、サイズ変更可能\"\n\"な標準のヒープ割り当てバッファです。\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// 要素でベクターを初期化する正規マクロ。\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// 偶数要素のみを保持します。\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// 連続する重複を削除します。\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` は [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/struct.\"\n\"Vec.html#deref-methods-%5BT%5D) を実装しているため、`Vec` でスライス メソッド\"\n\"を呼び出すことができます。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` は、`String` および `HashMap` とともにコレクションの一種です。含まれて\"\n\"いるデータはヒープに格納されるため、コンパイル時にデータ量を把握する必要はあ\"\n\"りません。データ量は実行時に増加または減少する場合があります。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"`Vec<T>` もジェネリック型ですが、`T` を明示的に指定する必要はありません。\"\n\"Rust の型推論でいつも行われるように、最初の `push` 呼び出しで `T` が確立され\"\n\"ています。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` は `Vec::new()` の代わりに使用する正規のマクロで、ベクターへの初\"\n\"期要素の追加をサポートしています。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"ベクターにインデックスを付けるには `[` `]` を使用しますが、境界外の場合はパ\"\n\"ニックが発生します。または、`get` を使用すると `Option` が返されます。`pop` \"\n\"関数は最後の要素を削除します。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"スライスについては 3 日目に説明します。受講者は現時点では、型 `Vec` の値によ\"\n\"り、ドキュメントに記されたすべてのスライスメソッドにアクセスできることだけを\"\n\"知っていれば十分です。\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"HashDoS 攻撃から保護する標準のハッシュマップ:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Adventures of Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms' Fairy Tales\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Pride and Prejudice\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"We know about {} books, but not Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice's Adventure in Wonderland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} pages\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} is unknown.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// 何も見つからなかった場合は、.entry() メソッドを使用して値を挿入します。\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap` はプレリュードで定義されていないため、スコープに含める必要がありま\"\n\"す。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"次のコード行を試します。最初の行で、書籍がハッシュマップにあるかどうかを確認\"\n\"し、ない場合は代替値を返します。書籍が見つからなかった場合、2 行目でハッシュ\"\n\"マップに代替値を挿入します。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"`vec!` とは異なり、標準の `hashmap!` マクロはありません。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"しかし、Rust 1.56 以降では、HashMap は [`From<[(K, V); N]>`](https://doc.\"\n\"rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,\"\n\"+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) を実装しています。これによ\"\n\"り、リテラル配列からハッシュマップを簡単に初期化できます。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"別の方法として、HashMap は、Key-Value タプルを生成する任意の `Iterator` から\"\n\"作成することもできます。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"この型には、`std::collections::hash_map::Keys` などの「メソッド固有の」戻り値\"\n\"の型がいくつかあります。これらの型は、Rust ドキュメントの検索でよく使用されま\"\n\"す。この型のドキュメントと、`keys` メソッドに戻るのに役立つリンクを受講者に示\"\n\"します。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"この演習では、非常にシンプルなデータ構造を汎用的なものにします。[`std::\"\n\"collections::HashMap`](https://doc.rust-lang.org/stable/std/collections/\"\n\"struct.HashMap.html) を使用して、どの値が確認され、各値が何回出現したかを追跡\"\n\"します。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"`Counter` の初期バージョンは、`u32` の値でのみ機能するようにハードコードされ\"\n\"ています。追跡する値の型に対して構造体とそのメソッドをジェネリック化します。\"\n\"これにより、`Counter` であらゆる型の値を追跡できます。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"早めに終わった場合は、[`entry`](https://doc.rust-lang.org/stable/std/\"\n\"collections/struct.HashMap.html#method.entry) メソッドを使用して、`count` メ\"\n\"ソッドの実装に必要なハッシュ ルックアップの回数を半分にしてみましょう。\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"/// カウンタは型 T の各値が確認された回数をカウントします。\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// 新しいカウンタを作成します。\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// 指定された値の発生をカウントします。\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// 指定された値が確認された回数を返します。\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"saw {} values equal to {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"apple\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"orange\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"got {} apples\\\"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 1 時間 10 分です\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"FromとInto\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"Read and Write\"\nmsgstr \"`Read` と `Write`\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"Default, struct update syntax\"\nmsgstr \"`Default`、構造体更新記法\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"標準ライブラリ型と同様に、時間をかけて各トレイトのドキュメントを確認します。\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"このセクションは長いため、途中で休憩を取ってください。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"これらのトレイトは値の比較をサポートします。すべてのトレイトは、これらのトレ\"\n\"イトを実装するフィールドを含む型用に導出できます。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` と `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` は、必須のメソッド `eq` と指定されたメソッド `ne` を持つ部分的な\"\n\"等価関係です。`==` 演算子と `!=` 演算子は、これらのメソッドを呼び出します。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` は完全な等価関係（反射的、対称的、推移的）であり、`PartialEq` を意味しま\"\n\"す。完全な等価関係を必要とする関数は、トレイト境界として `Eq` を使用します。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` と `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` は `partial_cmp` メソッドを使って部分的な順序を定義します。これ\"\n\"は、`<`、`<=`、`>=`、`>` 演算子を実装するために使用されます。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` は全順序を示し、`cmp` は `Ordering` を返します。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` は異なる型の間で実装できますが、`Eq` は反射的であるため、実装でき\"\n\"ません。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"実際には、これらのトレイトを導出することは一般的ですが、実装するのは一般的で\"\n\"はありません。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"演算子のオーバーロードは、[`std::ops`](https://doc.rust-lang.org/std/ops/\"\n\"index.html) 内のトレイトを介して実装されます。\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"議論のポイント:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"`&Point` に `Add` を実装できます。これはどのような状況で役に立ちますか？\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"回答: `Add:add` は `self` を使用します。演算子をオーバーロードする型 `T` が \"\n\"`Copy` でない場合は、`&T` の演算子もオーバーロードすることを検討する必要があ\"\n\"ります。これにより、呼び出し箇所での不要なクローン作成を回避できます。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"`Output` が関連型であるのはなぜですか？これをメソッドの型パラメータにできるで\"\n\"しょうか？\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"短い回答: 関数型のパラメータは呼び出し元によって制御されますが、関連型\"\n\"（`Output` など）はトレイトの実装者によって制御されます。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"2 種類の型に対して `Add` を実装できます。たとえば、`impl Add<(i32, i32)> for \"\n\"Point` は `Point` にタプルを追加します。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"The `Not` trait (`!` operator) is notable because it does not \\\"boolify\\\" \"\n\"like the same operator in C-family languages; instead, for integer types it \"\n\"negates each bit of the number, which arithmetically is equivalent to \"\n\"subtracting it from -1: `!5 == -6`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions. Unlike `as`, these traits correspond to \"\n\"lossless, infallible conversions.\"\nmsgstr \"\"\n\"型は、型変換を容易にする [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html) と [`Into`](https://doc.rust-lang.org/std/convert/trait.\"\n\"Into.html) を実装しています。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\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\"に実装されます。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"このように `Into` も実装されるため、型には `From` のみを実装するのが一般的で\"\n\"す。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"「`String` に変換できるすべて」のような関数引数の入力型を宣言する場合、この\"\n\"ルールは逆となり、`Into`を使用する必要があります。関数は、`From` を実装する型\"\n\"と、`Into` _のみ_ を実装する型を受け入れます。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust には _暗黙的_ な型変換はありませんが、`as` による明示的なキャストはサ\"\n\"ポートされています。これらのキャストは通常、それらが定義されている C セマン\"\n\"ティクスに従います。\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"as u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"as i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"as u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"`as` の結果は Rust で _常に_ 定義され、プラットフォーム間で一貫しています。こ\"\n\"れは、正負の符号を変えたり、より小さな型にキャストしたりする際に得られる直感\"\n\"に反しているかもしれません。ドキュメントを確認し、明確にするためにコメントを\"\n\"記述してください。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"`as` を使用したキャストは比較的扱いにくく、誤って使用することが少なくありませ\"\n\"ん。また、将来のメンテナンス作業で、使用される型や型の値の範囲が変更された際\"\n\"に、わかりにくいバグが発生する可能性があります。キャストは、無条件の切り捨て\"\n\"を示すことを目的としている場合にのみ、最適に使用されます（たとえば、上位ビッ\"\n\"トの内容に関係なく、`as u32` で `u64` の下位 32 ビットを選択する場合）。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"絶対に正しいキャスト（例: `u32` から `u64` へのキャスト）では、キャストが実際\"\n\"に完璧であることを確認するために、`as` ではなく `From` または `Into` を使用す\"\n\"ることをおすすめします。正しくない可能性があるキャストについては、絶対に正し\"\n\"いキャストとは異なる方法でそれらを処理したい場合に、`TryFrom` と `TryInto` を\"\n\"使用できます。\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"このスライドの後で休憩を取ることを検討してください。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` は C++ の静的キャストに似ています。データが失われる可能性がある状況で \"\n\"`as` を使用することは、一般的に推奨されません。使用する場合は、少なくとも説明\"\n\"のコメントを記述することをおすすめします。\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"これは、整数を`usize` にキャストしてインデックスとして使用する場合に一般的で\"\n\"す。\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) と [`BufRead`]\"\n\"(https://doc.rust-lang.org/std/io/trait.BufRead.html) を使用することで、`u8` \"\n\"ソースを抽象化できます。\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"lines in slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"lines in file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"同様に、[`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) を使用す\"\n\"ると、`u8` シンクを抽象化できます。\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"Logged: {buffer:?}\\\"\"\nmsgstr \"\\\"Logged: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"`Default` トレイト\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) トレイ\"\n\"トは、型のデフォルト値を生成します。\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y is set!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"直接実装することも、`#[derive(Default)]` で導出することもできます。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"導出による実装では、すべてのフィールドがデフォルト値に設定された値が生成され\"\n\"ます。\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"つまり、構造体内のすべての型にも `Default` を実装する必要があります。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"標準の Rust 型は多くの場合、妥当な値（`0`、`\\\"\\\"` など）の `Default` を実装し\"\n\"ます。\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"部分的な構造体の初期化は、デフォルトで適切に機能します。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Rust 標準ライブラリは、型が `Default` を実装できることを認識しており、それを\"\n\"使用するコンビニエンス メソッドを提供しています。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"`..` 構文は、[構造体更新記法](https://doc.rust-lang.org/book/ch05-01-\"\n\"defining-structs.html#creating-instances-from-other-instances-with-struct-\"\n\"update-syntax)と呼ばれています。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\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)、[`FnOnce`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnOnce.html) トレイトを備えていま\"\n\"す。\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling {func_name}({input}): {}\\\"\"\nmsgstr \"\\\"Calling function on {input}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"add_3\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"accumulate\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"multiply_sum\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can \"\n\"be called needing only a shared reference to the closure, which means the \"\n\"closure can be executed repeatedly and even concurrently.\"\nmsgstr \"\"\n\"`Fn`（例: `add_3`）は、キャプチャした値を使用も変更もしないか、または何もキャ\"\n\"プチャしない場合があります。これは同時に複数回呼び出すことができます。\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure \"\n\"object is accessed via exclusive reference, so it can be called repeatedly \"\n\"but not concurrently.\"\nmsgstr \"\"\n\"`FnMut`（例: `accumulate`）は、キャプチャした値を変更することがあります。複数\"\n\"回呼び出すことはできますが、同時に呼び出すことはできません。\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. \"\n\"Doing so consumes the closure and any values captured by move.\"\nmsgstr \"\"\n\"`FnOnce`（例: `multiply_sum`）がある場合は、1 回だけ呼び出すことができます。\"\n\"これは、キャプチャした値を使用する場合があります。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` は `FnOnce` のサブタイプで、`Fn` は `FnMut` と `FnOnce` のサブタイプ\"\n\"です。つまり、`FnOnce` が呼び出される場合は常に `FnMut` を使用でき、`FnMut` \"\n\"または `FnOnce` が呼び出される場合は常に `Fn` を使用できます。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"クロージャを受け取る関数を定義する場合、可能であれば（1 回だけ呼び出す）\"\n\"`FnOnce` を使用し、次に `FnMut`、最後に `Fn` を使用するようにします。これによ\"\n\"り、呼び出し元に最も柔軟に対応できます。\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(which can be passed to a consumer of any of the 3 closure traits), then \"\n\"`FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"一方、クロージャがある場合、最も柔軟性の高い方法は、まず `Fn`（どこでも渡すこ\"\n\"とができるため）、次に `FnMut`、最後に `FnOnce` を使用することです。\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures. Function pointers \"\n\"(references to `fn` items) implement `Copy` and `Fn`.\"\nmsgstr \"\"\n\"コンパイラは、クロージャがキャプチャする内容に応じて、`Copy`（例: `add_3`）\"\n\"と `Clone`（例: `multiply_sum`）も推測します。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture each variable from an outer scope by the \"\n\"least demanding form of access they can (by shared reference if possible, \"\n\"then exclusive reference, then by move). The `move` keyword forces capture \"\n\"by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Hi\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Greetings\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"この例では、古典的な [「ROT13」暗号](https://en.wikipedia.org/wiki/ROT13)を実\"\n\"装します。このコードをプレイグラウンドにコピーし、欠落しているビットを実装し\"\n\"てください。結果が有効な UTF-8 のままになるように、ASCII アルファベット文字の\"\n\"みをローテーションします。\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// `RotDecoder` の `Read` トレイトを実装します。\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"それぞれが 13 文字ずつローテーションされる 2 つの `RotDecoder` インスタンスを\"\n\"連結するとどうなるでしょうか。\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"3 日目のトレーニングにようこそ\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"本日の内容:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"メモリ管理、ライフタイム、借用チェッカー: Rust がメモリの安全性を確保する仕組\"\n\"み。\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"スマートポインタ: 標準ライブラリのポインタ型。\"\n\n#: src/welcome-day-3.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 20 分です。\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"複製\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"Drop\"\nmsgstr \"`Drop`\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"プログラムは、次の 2 つの方法でメモリを割り当てます。\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"スタック: ローカル変数用の連続したメモリ領域。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"値のサイズは固定されており、コンパイル時に判明しています。\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"非常に高速: スタック ポインタを移動するだけです。\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"関数呼び出しによって行われるため、管理が容易です。\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"メモリ局所性に優れています。\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"ヒープ: 関数呼び出しに依存しない値の保持領域。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"値のサイズは動的で、実行時に決定されます。\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"スタックよりやや低速で、何らかののブックキーピングが必要です。\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"メモリの局所性が保証されません。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"`String` を作成すると、スタックには固定サイズのメタデータが配置され、ヒープに\"\n\"はサイズが動的に決定されるデータ（実際の文字列）が配置されます。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"`String` は `Vec` により実現されているため、容量と長さがあり、可変であれば\"\n\"ヒープ上の再割り当てによって拡張できることを説明します。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"受講者から尋ねられた場合は、[システム アロケータ](https://doc.rust-lang.org/\"\n\"std/alloc/struct.System.html)を使用してメモリ領域がヒープから割り当てられるこ\"\n\"と、[Allocator API](https://doc.rust-lang.org/std/alloc/index.html) を使用し\"\n\"てカスタム アロケータを実装できることを説明してください。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"`unsafe` Rust を使用してメモリ レイアウトを調べることが出来ます。ただし、これ\"\n\"は当然ながら安全でないことを指摘する必要があります。\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"world\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// 自宅では行わないでください。これは説明のみを目的としています。\\n\"\n\"    // String はそのレイアウトを保証しないため、未定義の動作が\\n\"\n\"    // 発生する可能性があります。\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"伝統的に、言語は大きく 2 つのカテゴリに分類されます。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"手動でのメモリ管理による完全な制御: C、C++、Pascal など\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\"プログラマーがヒープメモリを割り当てまたは解放するタイミングを決定します。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"プログラマーは、ポインタがまだ有効なメモリを指しているかどうかを判断する必要\"\n\"があります。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"調査によると、プログラマーは判断を誤ることがあります。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"実行時の自動メモリ管理による完全な安全性: Java、Python、Go、Haskell など\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"ランタイム システムにより、メモリは参照できなくなるまで解放されません。\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Typically implemented with reference counting or garbage collection.\"\nmsgstr \"\"\n\"通常、参照カウント、ガベージ コレクション、または RAII を使用して実装されま\"\n\"す。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust ではこの 2 つを融合することで、新たに以下の特徴を提供します。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"コンパイル時の適切なメモリ管理の適用による、完全な制御と安全性。\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"これは、明示的な所有権の概念によって実現されます。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"このスライドは、他の言語を習得済みの受講者に、その文脈の中で Rust を理解して\"\n\"もらうことを目的としています。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C では、`malloc` と `free` を使用してヒープを手動で管理する必要があります。よ\"\n\"くあるエラーとしては、`free`の呼び出しを忘れる、同じポインタに対して複数回呼\"\n\"び出す、ポイントしているメモリが解放された後にポインタを逆参照する、などがあ\"\n\"ります。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++ にはスマート ポインタ（`unique_ptr`、`shared_ptr` など）のツールがあり、\"\n\"デストラクタの呼び出しに関する言語保証を利用して、関数が戻ったときにメモリが\"\n\"解放されるようにします。これらのツールを誤用して C と同様のバグを作成すること\"\n\"がよくあります。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java、Go、Pythonでは、アクセスできなくなったメモリの特定と破棄をガーベジコレ\"\n\"クタに依存します。これにより、あらゆるポインタの逆参照が可能になり、解放後の\"\n\"使用などのバグがなくなります。ただし、GC (ガーベジコレクション) にはランタイ\"\n\"ムコストがかかり、適切なチューニングが困難です。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"Rust の所有権と借用モデルは、多くの場合、割り当てオペレーションと解放オペレー\"\n\"ションを正確に必要な場所で行うことにより、ゼロコストで C のパフォーマンスを実\"\n\"現できます。また、C++ のスマートポインタに似たツールも用意されています。必要\"\n\"に応じて、参照カウントなどの他のオプションを利用できます。また、ランタイムガ\"\n\"ベージコレクションをサポートするためのサードパーティのクレートも使用できます\"\n\"（このクラスでは扱いません）。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"すべての変数バインディングには有効なスコープがあり、スコープ外で変数を使用す\"\n\"るとエラーになります。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"これを、変数が値を _所有_ していると表現します。すべての Rustの値所有者は常\"\n\"に 1 人です。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"スコープから外れると変数が破棄 _(drop)_ され、データが解放されます。ここでデ\"\n\"ストラクタを実行してリソースを解放できます。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"ガベージ コレクションの実装に精通している受講者は、ガベージ コレクタが一連の\"\n\"「ルート」から開始して到達可能なすべてのメモリを見つけることを知っています。\"\n\"Rust の「単一オーナー」の原則も、同様の考え方に基づいています。\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"代入すると、変数間で _所有権_ が移動します。\"\n\n#: src/memory-management/move.md src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Hello!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"`s1` を `s2` に代入すると、所有権が移動します。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"`s1` がスコープ外になると、何も所有してないからです（何も所有しません）。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"`s2` がスコープ外になると、文字列データは解放されます。\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"`s2` に移動する前:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"`s2` に移動した後:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" スタック                             ヒープ\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"（アクセス不可）\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"次の例のように、関数に値を渡すと、その値は関数パラメータに代入されます。これ\"\n\"により、所有権が移動します。\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"これは、`std::move` を使用しない限り（かつムーブ コンストラクタが定義されてい\"\n\"ない限り）値をコピーする、C++ のデフォルトとは逆であることを説明します。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"移動するのは所有権のみです。データ自体を操作するためにマシンコードが生成され\"\n\"るかどうかは最適化の問題であり、そのようなコピーのためのマシンコードは積極的\"\n\"に最適化されてなくなります。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"単純な値（整数など）には `Copy` のマークを付けることができます（後のスライド\"\n\"を参照）。\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"Rust では、クローンは明示的に `clone` を使用して行われます。\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"`say_hello` の例の内容は次のとおりです。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"`say_hello` の最初の呼び出しで、`main` は `name` の所有権を放棄します。その後\"\n\"は `main` 内で `name` が使用できなくなります。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"`name` に割り当てられたヒープメモリは、`say_hello` 関数の最後で解放されます。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` が`name` を参照として渡し（`&name`）、`say_hello` がパラメータとして参\"\n\"照を受け入れる場合、`main` は所有権を保持できます。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"または、`main` が最初の呼び出しで `name` のクローン（`name.clone()`）を渡すこ\"\n\"ともできます。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust では、ムーブ セマンティクスをデフォルトにし、クローンをプログラマに明示\"\n\"的に行わせています。これにより、C++ に比べて意図せずコピーを作成するリスクが\"\n\"低減されています。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"現代C++の二重解放\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"最新の C++ では、この問題を別の方法で解決します。\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// s1 にデータを複製します。\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"`s1` からのヒープデータが複製され、`s2` は自身の独立したコピーを取得します。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"`s1` と `s2` がスコープ外になると、それぞれ自身のメモリを解放します。\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"コピー代入前:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"コピー代入後:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++ のアプローチは、Rust とは若干異なります。`=` を使用するとデータがコピーさ\"\n\"れるため、文字列データのクローンを作成する必要があるためです。そうしないと、\"\n\"いずれかの文字列がスコープ外になったときに二重解放が発生します。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ には [`std::move`](https://en.cppreference.com/w/cpp/utility/move) もあり\"\n\"ますが、これは値をムーブできるタイミングを示すために使用されます。この例で \"\n\"`s2 = std::move(s1)` となっていた場合は、ヒープ割り当ては行われません。ムーブ\"\n\"後、`s1` は有効であるものの、未指定の状態になります。Rust とは異なり、プログ\"\n\"ラマーは `s1` を引き続き使用できます。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"Rust とは異なり、C++ の `=` は、コピーまたは移動される型によって決定される任\"\n\"意のコードを実行できます。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"値のコピーを作成したい場合は、`Clone` トレイトを使用できます。\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"`Clone` はヒープ割当が起きる場所を見つけやすくすることを目的としたものです。\"\n\"`.clone()` のほか、`Vec::new` や `Box::new` などを探してください。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"借用チェッカーが通らない場合に「とりあえずクローンを作成して切り抜けておい\"\n\"て」、あとからクローンのないコードへの最適化を試みるのもよくあることです。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"言語としてのデフォルトはムーブセマンティクスですが、特定の型ではデフォルトで\"\n\"コピーが行われます。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"これらの型は `Copy` トレイトを実装しているからです。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"あなたが定義した独自の型のデフォルトをコピーセマンティクスにすることが出来ま\"\n\"す。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"代入後は、`p1` と `p2` の両方が独自のデータを所有します。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"`p1.clone()` を使用してデータを明示的にコピーすることもできます。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"コピーとクローン作成は同じではありません。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"コピーとは、メモリ領域のビット単位コピーのことであり、任意のオブジェクトでは\"\n\"機能しません。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"コピーではカスタムロジックは使用できません（C++ のコピーコンストラクタとは異\"\n\"なります）。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"クローン作成はより一般的なオペレーションであり、`Clone` トレイトを実装するこ\"\n\"とでカスタム動作も可能になります。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"`Drop` トレイトを実装している型では、コピーは出来ません。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"上記の例で、次の方法を試してください。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"`String` フィールドを`struct Point` に追加します。`String` が `Copy` 型ではな\"\n\"いため、コンパイルできなくなります。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"`derive` 属性から `Copy` を削除します。`p1` の `println!` でコンパイラ エラー\"\n\"が発生します。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"代わりに `p1` のクローンを作成すれば解決できることを示します。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because Rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"`Drop` トレイト\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) を実装している値\"\n\"では、スコープから外れるときに実行するコードを指定できます。\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropping {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Exiting block B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Exiting block A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Exiting main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"`std::mem::drop` は `std::ops::Drop::drop` と同じではありません。\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"スコープ外になると、値は自動的にドロップされます。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"値がドロップされる際、`std::ops::Drop` を実装している場合は、その `Drop::\"\n\"drop` 実装が呼び出されます。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"その後、`Drop` を実装しているかどうかにかかわらず、すべてのフィールドもドロッ\"\n\"プされます。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` は、任意の値を受け取る空の関数にすぎません。重要なのは、この\"\n\"関数が値の所有権を取得することで、スコープの最後で値がドロップされることで\"\n\"す。これは、スコープ外になる前に値を明示的にドロップするための便利な方法で\"\n\"す。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"この方法は、`drop` で何らかの処理（ロックの解放、ファイルのクローズなど）を行\"\n\"うオブジェクトに使用すると便利です。\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"`Drop::drop` が `self` をパラメータとして取らないのはなぜですか？\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"短い回答: その場合、ブロックの最後に `std::mem::drop` が呼び出されるため、別\"\n\"の `Drop::drop` が呼び出され、スタック オーバーフローが発生します。\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"`drop(a)` を `a.drop()` に置き換えてみてください。\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"この例では、すべてのデータを持つ複雑なデータ型を実装します。「ビルダー パター\"\n\"ン」で便利な関数を使用して、新しい値を 1 つずつ構築できるようにします。\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"抜けている部分を記入してください。\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// ソフトウェア パッケージの表現。\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// このパッケージの表現を依存関係として返し、\\n\"\n\"    /// 他のパッケージのビルドに使用します。\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// パッケージのビルダー。`build()` を使用して `Package` 自体を作成します。\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// パッケージのバージョンを設定します。\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// パッケージ作成者を設定します。\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// 依存関係を追加します。\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\"/// 言語を設定します。設定しない場合、言語はデフォルトで None になります。\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"Box<T>\"\nmsgstr \"`Box<T>`\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒープ上の\"\n\"データへの所有ポインタです。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` は `Deref<Target = T>` を実装しているため、[`Box<T>` に対して T のメ\"\n\"ソッドを直接呼び出す](https://doc.rust-lang.org/std/ops/trait.Deref.\"\n\"html#more-on-deref-coercion)ことができます。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes cannot be stored \"\n\"inline without a pointer indirection. `Box` accomplishes that indirection:\"\nmsgstr \"\"\n\"再帰データ型、またはサイズが動的なデータ型では、`Box` を使用する必要がありま\"\n\"す。\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// 空でないリスト: 最初の要素とリストの残り。\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// 空のリスト。\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` は C++ の `std::unique_ptr` と似ていますが、null ではないことが保証され\"\n\"ている点が異なります。\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"`Box` は次のような場合に役立ちます。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"have a type whose size can't be known at compile time, but the Rust compiler \"\n\"wants to know an exact size.\"\nmsgstr \"\"\n\"コンパイル時にサイズを把握できない型があるが、Rust コンパイラがその正確なサイ\"\n\"ズを知る必要がある場合。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"大量のデータの所有権をムーブしたい場合。スタック上の大量のデータがコピーされ\"\n\"ないようにするには、代わりに`Box` によりヒープ上にデータを格納し、ポインタの\"\n\"みが移動されるようにします。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\" 仮に`Box` を使用せずに `List` を `List` に直接埋め込もうとすると、コンパイラ\"\n\"はメモリ内の構造体の固定サイズを計算しようとしません（`List` は無限サイズにな\"\n\"ります）。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` がこの問題を解決できるのは、そのサイズが通常のポインタと同じであり、単\"\n\"にヒープ内の List の次の要素を指すだけだけだからです。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"List 定義の `Box` を削除して、コンパイラ エラーを表示します。\\\"Recursive \"\n\"with indirection\\\" は、値を直接保持するのではなく、Boxや何らかの参照を使用し\"\n\"たら良いことを示唆するものです。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums (the \\\"niche optimization\\\").\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) は、参照カウントされ\"\n\"た共有ポインタです。複数の場所から同じデータを参照する必要がある場合に使用し\"\n\"ます。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"マルチスレッドのコンテキストに関しては、[`Arc`](../concurrency/shared_state/\"\n\"arc.md) と [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) を\"\n\"ご覧ください。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"共有ポインタを [`Weak`](https://doc.rust-lang.org/std/rc/struct.Weak.html) ポ\"\n\"インタにダウングレード _(downgrade)_ すると、ドロップされるサイクルを作成でき\"\n\"ます。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"`Rc` のカウントは、参照がある限り有効であることを保証します。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Rust の `Rc` は C++ の `std::shared_ptr` に似ています。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone`の動作は軽量です。同じ割り当て領域へのポインタを作成し、参照カウン\"\n\"トを増やすだけです。デープクローンを作成しないので、性能上の問題箇所をコード\"\n\"から探す場合には通常無視することが出来ます。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` は、必要に応じて内部の値のクローンを作成し（「clone-on-write」）、\"\n\"可変参照を返します。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"`Rc::strong_count` を使用して参照カウントを確認します。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` は、（多くの場合、`RefCell` と組み合わせて）適切にドロップさ\"\n\"れるサイクルを作成するための弱参照カウント _(weakly reference-counted)_ オブ\"\n\"ジェクトを提供します。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"`pets`を割り当てた後のメモリレイアウト：\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" スタック                             ヒープ\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"同じトレイトを実装する型であってもそのサイズは異なることがあります。そのた\"\n\"め、上の例でVec<dyn Pet>と書くことはできません。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` はコンパイラに、この型が`Pet`トレイトを実装する動的なサイズの型であ\"\n\"ることを伝えます。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"上の例では `pets` はスタックに確保され、ベクターのデータはヒープ上にありま\"\n\"す。二つのベクターの要素は _ファットポインタ_ です：\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"ファットポインタはdouble-widthポインタです。これは二つの要素からなります：実\"\n\"際のオブジェクトへのポインタと、そのオブジェクトの`Pet`の実装のための[仮想関\"\n\"数テーブル](https://ja.wikipedia.org/wiki/\"\n\"%E4%BB%AE%E6%83%B3%E9%96%A2%E6%95%B0%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB) \"\n\"(vtable)です。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"\\\"Fido\\\"と名付けられた`Dog`のデータは`name` と `age` のフィールドに対応しま\"\n\"す。（訳注: \\\"Fido\\\"とはよくある犬の愛称で、日本語でいう「ポチ」のような名前\"\n\"です。）例の`Cat`には`lives` フィールドがあります。（訳注: ここで`Cat`が\"\n\"`lives`というフィールドを持ち、9で初期化しているのは\\\"A cat has nine lives\\\" \"\n\"—猫は９つの命を持つ—ということわざに由来します。）\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"上の例において、下のコードによる出力結果を比べてみましょう：\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"バイナリツリーは、すべてのノードに 2 つの子（左と右）があるツリー型のデータ構\"\n\"造です。ここでは、各ノードが値を格納するツリーを作成します。ある特定のノード \"\n\"N について、N の左側のサブツリー内のすべてのノードにはより小さい値が含まれ、\"\n\"N の右側のサブツリー内のすべてのノードにはより大きい値が含まれます。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"次の型を実装して、指定されたテストが通るようにします。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"追加の実習: バイナリツリーに値を順番に返すイテレータを実装します。\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// バイナリツリーのノード。\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// 空の可能性のあるサブツリー。\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// バイナリツリーを使用して一連の値を格納するコンテナ。\\n\"\n\"///\\n\"\n\"/// 同じ値が複数回追加された場合、その値は 1 回だけ格納される。\\n\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// `new`、`insert`、`len`、`has` を実装します。\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// 固有のアイテムではない\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 55 分です。\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"前に説明したように、関数を呼び出すときに所有権を移動する代わりに、関数で値を\"\n\"借用できます。\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"`add` 関数は 2 つのポイントを _借用_ し、新しいポイントを返します。\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"呼び出し元は入力の所有権を保持します。\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"このスライドでは、1 日目の参照に関する資料を振り返りですが、少し対象を広げ、\"\n\"関数の引数と戻り値も含めています。\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"スタックの戻り値に関する注意事項:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"コンパイラはコピー オペレーションを省略できるため、`add` からのリターンはコス\"\n\"トであることを示します。スタック アドレスを出力するように上記のコードを変更\"\n\"し、[Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671)\"\n\"で実行するか、[Godbolt](https://rust.godbolt.org/) のアセンブリを確認します。\"\n\"「DEBUG」最適化レベルではアドレスが変更されますが、「RELEASE」設定に変更した\"\n\"場合はアドレスが変更されません。\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Rust の _借用チェッカー_ は、値を借用する方法に制限を設けます。任意の値に対し\"\n\"て、常に次の制限が課されます。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"値への共有参照を 1 つ以上持つことが出来ます。または、\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"値への排他参照を 1 つだけ持つことが出来ます。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"要件は、競合する参照が同じ時点に存在しないことです。参照がどこで外されていて\"\n\"も構いません。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"上記のコードは、`a` が `c` を通じて可変として借用されていると同時に、`b` を通\"\n\"じて不変として借用されているため、コンパイルできません。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"`b` の `println!` ステートメントを `c` を導入するスコープの前に移動して、コー\"\n\"ドをコンパイル出来るようにします。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"この変更後、コンパイラは c を通じたa の可変参照よりも前にしかbが使われていな\"\n\"いことを認識します。これは「ノンレキシカル ライフタイム(_\\\"non-lexical \"\n\"lifetimes\\\"_)」と呼ばれる借用チェッカーの機能です。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"排他参照制約は非常に強力です。Rust はこの制約を使用して、データへの競合が発生\"\n\"しないようにするとともに、コードを最適化しています。たとえば、共有参照を通し\"\n\"て得られる値は、その参照が存続する間、安全にレジスタにキャッシュすることが出\"\n\"来ます\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"借用チェッカーは、構造体内の異なるフィールドへの排他参照を同時に取得するな\"\n\"ど、多くの一般的なパターンに対応するように設計されています。しかし、状況に\"\n\"よっては借用チェッカーがコードを正しく理解できず、「借用チェッカーとの戦い」\"\n\"に発展することが多くあります。\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"場合によっては、共有（読み取り専用）参照の背後にあるデータを変更する必要があ\"\n\"ります。たとえば、共有データ構造に内部キャッシュがあり、そのキャッシュを読み\"\n\"取り専用メソッドから更新する必要がある場合があります。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"「内部可変性」パターンは、共有参照を通した排他的（可変）アクセスを可能にしま\"\n\"す。標準ライブラリには、これを安全に行うための方法がいくつか用意されており、\"\n\"通常はランタイム チェックを実行することで安全性を確保します。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value using only a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the inner value. Since there are no references, borrowing rules cannot be \"\n\"broken.\"\nmsgstr \"\"\n\"`Cell` は、値をラップし、`Cell` の共有参照を通してでもその値を取得または設定\"\n\"可能にしています。ただし、その内包する値への参照は許していません。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` allows accessing and mutating a wrapped value by providing \"\n\"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without \"\n\"actually being Rust references.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"These types perform dynamic checks using a counter in the `RefCell` to \"\n\"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow \"\n\"calling methods on the inner value without allowing references to escape.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"このスライドで重要なのは、Rust には、共有参照の背後にあるデータを変更する安全\"\n\"な方法が用意されているということです。安全性を確保するにはさまざまな方法があ\"\n\"りますが、ここでは `RefCell` と `Cell` を取り上げます。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` は、ランタイム チェックとともに Rust の通常の借用ルール（複数の共有\"\n\"参照または単一の排他参照）を適用します。この場合、すべての借用は非常に短く、\"\n\"重複しないため、チェックは常に成功します。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` は安全性を確保するためのよりシンプルな手段であり、`&self` を受け取る \"\n\"`set` メソッドを備えています。ランタイム チェックは必要ありませんが、値を移動\"\n\"する必要があり、それによってコストが発生することがあります。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"健康管理システムの実装の一環として、ユーザーの健康に関する統計情報を追跡する\"\n\"必要があります。\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"`impl` ブロックのスタブ関数と、`User` 構造体の定義がある状態から開始します。\"\n\"`User` 構造体の `impl` ブロックにおいてスタブ化された関数を実装することです。\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"以下のコードを <https://play.rust-lang.org/> にコピーし、実体がないメソッドの\"\n\"中身を実装します。\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"I'm {} and my age is {}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"参照にはライフタイムがあり、これは参照する値よりも「長く存続」してはなりませ\"\n\"ん。これは借用チェッカーによって検証されます。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"これまで見てきたとおり、ライフタイムは暗黙に扱えますが、`&'a Point`、\"\n\"`&'document str` のように明示的に指定することもできます。ライフタイムは `'` \"\n\"で始まり、`'a` が一般的なデフォルト名です。`&'a Point` は、「少なくともライフ\"\n\"タイム `a` の間は有効な、借用した `Point`」とと解釈します。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"ライフタイムは常にコンパイラによって推測されます。自分でライフタイムを割り当\"\n\"てることはできません。明示的なライフタイム アノテーションを使用すると、あいま\"\n\"いなところに制約を課すことができます。それに対し、コンパイラはその制約を満た\"\n\"すライフタイムを設定できることを検証します。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"関数に値を渡し、関数から値を返すことを考慮する場合、ライフタイムはより複雑に\"\n\"なります。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// p3 のライフタイムは？\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"この例では、コンパイラは `p3` のライフライムを推測するこが出来ませんん。関数\"\n\"本体の内部を見ると、`p3` のライフタイムは `p1` と `p2` のいずれか短いしかし想\"\n\"定できることがわかります。ただし、型と同様に、Rust では関数の引数や戻り値にラ\"\n\"イフタイムの明示的なアノテーションが必要です。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"`left_most` に `'a` を適切に追加します。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"これは、「p1 と p2 の両方が `'a` より長く存続すると、戻り値は少なくとも `'a` \"\n\"の間存続する」という意味になります。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"一般的なケースでは、次のスライドで説明するようにライフタイムを省略できます。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"関数とライフタイム\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"関数の引数や戻り値のライフタイムは完全に指定する必要がありますが、Rust ではほ\"\n\"とんどの場合、[いくつかの簡単なルール](https://doc.rust-lang.org/nomicon/\"\n\"lifetime-elision.html)により、ライフタイムを省略できます。これは推論ではな\"\n\"く、構文の省略形にすぎません。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\"ライフタイム アノテーションが付いていない各引数には、1 つのライフタイムが与え\"\n\"られます。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"引数のライフタイムが 1 つしかない場合、アノテーションのない戻り値すべてにその\"\n\"ライフタイムが与えられます。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"引数のライフタイムが複数あり、最初のライフタイムが `self` である場合、アノ\"\n\"テーションのない戻り値すべてにそのライフタイムが与えられます。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\"この例では、`cab_distance` に関するライフタイムの記述は省略されています。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"`nearest` 関数は、明示的なアノテーションを必要とする複数の参照を引数に含む関\"\n\"数のもう一つの例です。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"返されるライフタイムについて嘘のアノテーションを付けるようにシグネチャを調整\"\n\"してみましょう。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"そうするとコンパイルが通らなくなります。これは、すなわち、コンパイラがアノ\"\n\"テーションの妥当性をチェックしているということを示すものです。ただし、これは\"\n\"生のポインタ（安全ではない）には当てはまりません。アンセーフRustを使用する場\"\n\"合に、これはよくあるエラーの原因となっています。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"ライフタイムをどのような場合に使うべきか、受講者から質問を受けるかもしれませ\"\n\"ん。Rust の借用では常にライフタイムを使用します。ほとんどの場合、省略や型推\"\n\"論 により、ライフタイムを記述する必要はありません。より複雑なケースでは、ライ\"\n\"フタイム アノテーションを使用することであいまいさを解決できます。多くの場合、\"\n\"特にプロトタイピングでは、必要に応じて値をクローニングして所有データを処理す\"\n\"る方が簡単です。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"データ構造とライフタイム\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"データ型が借用データを内部に保持する場合、ライフタイムアノテーションを付ける\"\n\"必要があります。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Bye {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// 消去（テキスト）;\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"上記の例では、`Highlight` のアノテーションにより、内包される`&str` の参照先の\"\n\"データは、少なくともそのデータを使用する `Highlight` のインスタンスが存在する\"\n\"限り存続しなければならなくなります。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"`fox`（または `dog`）のライフタイムが終了する前に `text` が使用されると、借用\"\n\"チェッカーはエラーをスローします。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"消費したデータが含まれる型では、ユーザーは元のデータを保持せざるを得なくなり\"\n\"ます。これは軽量のビューを作成する場合に便利ですが、一般的には使いにくくなり\"\n\"ます。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"可能であれば、データ構造がデータを直接所有できるようにします。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"内部に複数の参照がある構造体には、複数のライフタイム アノテーションが含まれる\"\n\"場合があります。これが必要になるのは、構造体自体のライフタイムだけでなく、参\"\n\"照同士のライフタイムの関係を記述する必要がある場合です。これは非常に高度な\"\n\"ユースケースです。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"この演習では、[protobuf バイナリ エンコード](https://protobuf.dev/\"\n\"programming-guides/encoding/)用のパーサーを作成します。見かけよりも簡単ですの\"\n\"で、心配はいりません。これは、データのスライスを渡す一般的な解析パターンを示\"\n\"しています。基になるデータ自体がコピーされることはありません。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"protobuf メッセージを完全に解析するには、フィールド番号でインデックス付けされ\"\n\"たフィールドの型を知る必要があります。これは通常、`proto` ファイルで提供され\"\n\"ます。この演習では、フィールドごとに呼び出される関数の `match` ステートメント\"\n\"に、その情報をエンコードします。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"次の proto を使用します。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"proto メッセージは、連続するフィールドとしてエンコードされます。それぞれが後\"\n\"ろに値を伴う「タグ」として実装されます。タグにはフィールド番号（例: `Person` \"\n\"メッセージの `id` フィールドには `2`）と、バイト ストリームからペイロードがど\"\n\"のように決定されるかを定義するワイヤータイプが含まれます。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"タグを含む整数は、VARINT と呼ばれる可変長エンコードで表されます。幸いにも、\"\n\"`parse_varint` は以下ですでに定義されています。また、このコードでは、\"\n\"`Person` フィールドと `PhoneNumber` フィールドを処理し、メッセージを解析して\"\n\"これらのコールバックに対する一連の呼び出しに変換するコールバックも定義してい\"\n\"ます。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"残る作業は、`parse_field` 関数と、`Person` および `PhoneNumber` の \"\n\"`ProtoMessage` トレイトを実装するだけです。\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// ワイヤー上で見えるワイヤータイプ。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// Varint WireType は、値が単一の VARINT であることを示します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    /// little-endian order containing a 64-bit signed integer or double \"\n\"type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64、  -- この演習では不要\\n\"\n\"    /// Len WireType は、値が VARINT で表され、その後にちょうどそのバイト数\"\n\"が\\n\"\n\"    /// 続くものであることを示します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float \"\n\"type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\"/// I32 WireType は、値が 32 ビット符号付き整数を含むリトル エンディアン\"\n\"で、\\n\"\n\"    /// 正確に 4 バイトであることを示します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// ワイヤータイプに基づいて型指定されたフィールドの値。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64（i64）、  -- この演習では不要\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//I32(i32),  -- not needed for this exercise\\n\"\nmsgstr \"//I64（i64）、  -- この演習では不要\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// フィールド番号とその値を含むフィールド。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64、  -- この演習では不要\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64、  -- この演習では不要\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\\\"Invalid wire-type\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\\\"Invalid varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"/// VARINT を解析し、解析した値と残りのバイトを返します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// これは VARINT の最後のバイトであるため、\\n\"\n\"            // u64 に変換して返します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// 7 バイトを超える値は無効です。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// タグをフィールド番号と WireType に変換します。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// フィールドを解析して残りのバイトを返します。\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"ワイヤータイプに応じて、フィールドを構築し、必要な量のバイトを消費しま\"\n\"す。\\\"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"フィールドと、未消費のバイトを返します。\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// 指定されたデータ内のメッセージを解析し、メッセージのフィールドごとに\\n\"\n\"/// `T::add_field` を呼び出します。\\n\"\n\"///\\n\"\n\"/// 入力全体が消費されます。\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Person と PhoneNumber の ProtoMessage を実装します。\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"Unexpected EOF\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// それ以外をすべてスキップ\\n\"\n\n#: src/lifetimes/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/testing/unit-tests.md src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"beautiful name\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Evan\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"+1234-777-9090\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"home\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"4 日目のトレーニングにようこそ\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"本日は、Rust での大規模なソフトウェアのビルドに関連するトピックを取り上げま\"\n\"す。\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"イテレータ: `Iterator` トレイトの詳細。\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"モジュールと可視性。\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"テスト\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"エラー処理: パニック、`Result`、try 演算子 `?`。\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"アンセーフRust: 安全な Rust では記述できない場合の回避策。\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 20 分です。\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"Iterator\"\nmsgstr \"イテレータ\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"IntoIterator\"\nmsgstr \"`IntoIterator`\"\n\n#: src/iterators.md src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) トレイト\"\n\"は、コレクション内の一連の要素に対して順番に処理を適用することを可能にしま\"\n\"す。このトレイトはnextメソッドを必要とし、それにより多くのメソッドを提供しま\"\n\"す。多くの標準ライブラリ型で `Iterator` が実装されていますが、自分で実装する\"\n\"こともできます。\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"`Iterator` トレイトは、コレクションに対する多くの一般的な関数型プログラミン\"\n\"グ オペレーション（例: `map`、`filter`、`reduce` など）を実装します。このトレ\"\n\"イトのドキュメントにおいて、これらのすべてのオペレーションに関する説明を確認\"\n\"できます。Rust では、これらの関数により、同等の命令型実装と同じくらい効率的な\"\n\"コードが生成されます。\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` は、forループを実現するためのトレイトです。コレクション型\"\n\"（`Vec<T>` など）と、それらに対する参照（`&Vec<T>`、`&[T]` など）において実装\"\n\"されています。また、範囲を表す型においても実装されています。`for i in \"\n\"some_vec { .. }` を使用してベクターを反復処理できるのに、`some_vec.next()` が\"\n\"存在しないのはこのためです。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"`Iterator` トレイトは、イテレータを作成した後に反復処理を行う方法を示します。\"\n\"関連するトレイト [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.\"\n\"IntoIterator.html) は、ある型に対するイテレータを作成する方法を定義します。こ\"\n\"れは `for` ループによって自動的に使用されます。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"`IntoIterator`のドキュメントをクリックしてご覧ください。`IntoIterator` のすべ\"\n\"ての実装で、次の 2 つの型を宣言する必要があります。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: 反復処理する型（`i8` など）。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: `into_iter` メソッドによって返される `Iterator` 型。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"`IntoIter`と`Item`は関連があり、イテレータは`Item`と同じ型を持つ必要がありま\"\n\"す。すなわち、`Option<Item>`を返します。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"この例は、x 座標と y 座標のすべての組み合わせを反復処理しています。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"`main` でグリッドを 2 回反復処理してみましょう。これはなぜ失敗するのでしょう\"\n\"か。`IntoIterator::into_iter` は `self` の所有権を取得することに着目してくだ\"\n\"さい。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"この問題を修正するには、`&Grid` に `IntoIterator` を実装し、`Grid` への参照\"\n\"を `GridIter` に保存します。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"標準ライブラリ型でも同じ問題が発生する可能性があります。`for e in \"\n\"some_vector` は、`some_vector` の所有権を取得し、そのベクターの所有要素を反復\"\n\"処理します。`some_vector` の要素への参照を反復処理するには、代わりに `for e \"\n\"in &some_vector` を使用します。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"を使用すると、[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html) からコレクションを作成できます。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator` の実装\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"このメソッドで `B` を指定するには、次の 2 つの方法があります。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"「turbofish」を使用する場合: 例えば、上記における、`some_iterator.collect::\"\n\"<COLLECTION_TYPE>()`。ここで使用されている_ はRustに`Vecの`要素の方を推測させ\"\n\"るためのものです。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"型推論を使用する場合: `let prime_squares: Vec<_> = some_iterator.collect()`。\"\n\"この形式を使用するように例を書き換えてください。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"`Vec` や `HashMap` などに `FromIterator` の基本的な実装が用意されています。ま\"\n\"た、`Iterator<Item = Result<V, E>>` を `Result<Vec<V>, E>` に変換できるものな\"\n\"ど、より特化した実装もあります。\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"この演習では、複雑な計算を実装するために[`Iterator`](https://doc.rust-lang.\"\n\"org/std/iter/trait.Iterator.html) トレイトで提供されているメソッドをいくつか\"\n\"を探して使用する必要があります。\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"次のコードを <https://play.rust-lang.org/> にコピーし、テストが通るようにして\"\n\"ください。イテレータ式を使用し、その結果を`collect`することで戻り値を生成しま\"\n\"す。\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// `values`において、`offset`だけ離れた要素間の差を計算します。\\n\"\n\"/// なお、`values`の末尾要素の次は先頭へ戻ることとします。\\n\"\n\"///\\n\"\n\"/// 結果の要素 `n` は `values[(n+offset)%len] - values[n]` です。\\n\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use、super、self\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"`impl` ブロックで関数を型の名前空間に所属させる方法はすでに見てきました。\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"同様に、`mod` を使用して型と関数の名前空間を指定できます。\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"In the foo module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"In the bar module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"パッケージ(package)は機能を提供するものであり、一つ以上のクレートをビルドする\"\n\"方法を記述した`Cargo.toml` ファイルを含むものです。\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"バイナリクレートの場合は実行可能ファイルを生成し、ライブラリクレートの場合は\"\n\"ライブラリを生成します。\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\"モジュールによって構成とスコープが定義されます。このセクションではモジュール\"\n\"に焦点を当てます。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\"モジュールの定義内容を省略すると、Rust はそれを別のファイルで探します。\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"This tells Rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"これにより、`garden` モジュールの定義内容が `src/garden.rs` にあることを \"\n\"Rust に伝えます。同様に、`garden::vegetables` モジュールは `src/garden/\"\n\"vegetables.rs` にあります。\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"`crate` ルートは以下の場所にあります。\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs`（ライブラリ クレートの場合）\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs`（バイナリ クレートの場合）\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"ファイルで定義されたモジュールに対して、「内部ドキュメント用コメント」を使用\"\n\"して説明を加えることもできます。これらのコメントは、それが含まれるアイテム\"\n\"（この場合はモジュール）に対する説明になります。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! このモジュールは畑を実装します（パフォーマンスの高い発芽の\\n\"\n\"//! 実装を含む）。\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// このモジュールから型を再エクスポートします。\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// 指定された種をまきます。\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// 十分に実っている畑で作物を収穫します。\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"Rust 2018 より前では、モジュールを `module.rs` ではなく `module/mod.rs` に配\"\n\"置する必要がありました。これは 2018 以降のエディションでも依然としてサポート\"\n\"されています。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"`filename/mod.rs` の代わりに `filename.rs` が導入された主な理由は、`mod.rs` \"\n\"という名前のファイルが多くあると、それらをIDEで区別するのが難しい場合があるか\"\n\"らです。\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"より深いネストでは、メイン モジュールがファイルであっても、フォルダを使用でき\"\n\"ます。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"Rust がモジュールを検索する場所は、コンパイラ ディレクティブで変更できます。\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"これは、たとえば Go でよく行われているように、`some_module_test.rs` という名\"\n\"前のファイルにモジュールのテストを配置する場合に便利です。\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"モジュールはプライバシーの境界です。\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"モジュール アイテムはデフォルトでプライベートです（実装の詳細は表示されませ\"\n\"ん）。\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"親アイテムと兄弟アイテムは常に見えます。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"言い換えれば、あるアイテムがモジュール `foo` から見える場合、そのアイテムは \"\n\"`foo` のすべての子孫から見えます。\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"モジュールを公開するには `pub` キーワードを使用します。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"また、高度な `pub(...)` 指定子を使用して、公開範囲を制限することもできます。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"[Rust リファレンス](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself) をご覧ください。\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"`pub(crate)` の可視性を設定するのは一般的なパターンです。\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\"それほど一般的ではありませんが、特定のパスに対して可視性を指定することが出来\"\n\"ます。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"どのような場合も、祖先モジュール（およびそのすべての子孫）に可視性を与える必\"\n\"要があります。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"モジュールは、`use` を使用して別のモジュールのシンボルをスコープに取り込むこ\"\n\"とができます。次のような記述はモジュールの先頭においてよく見られます。\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"パス\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"パスは次のように解決されます。\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"相対パスの場合:\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` または `self::foo` は、現在のモジュール内の `foo` を参照します。\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` は、親モジュール内の `foo` を参照します。\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"絶対パスの場合:\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` は、現在のクレートのルート内の `foo` を参照します。\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` は、`bar` クレート内の `foo` を参照します。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"シンボルは、より短いパスで「再エクスポート」するのが一般的です。たとえば、ク\"\n\"レート内の最上位の `lib.rs` に、以下のように記述します。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"これにより、短く使いやすいパスを使用して、`DiskStorage` と `NetworkStorage` \"\n\"を他のクレートで使用できるようになります。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"ほとんどの場合、`use` を指定する必要があるのはモジュール内で実際に直接使用さ\"\n\"れるアイテムのみです。ただし、あるトレイトを実装する型がすでにスコープに含ま\"\n\"れている場合でも、そのトレイトのメソッドを呼び出すには、そのトレイトがスコー\"\n\"プに含まれている必要があります。たとえば、`Read` トレイトを実装する型で \"\n\"`read_to_string` メソッドを使用するには、`use std::io::Read` という記述が必要\"\n\"になります。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"`use` ステートメントには `use std::io::*` というようにワイルドカードを含める\"\n\"ことができます。この方法は、どのアイテムがインポートされるのかが明確ではな\"\n\"く、時間の経過とともに変化する可能性があるため、おすすめしません。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"この演習では、小規模な GUI ライブラリ実装を再編成します。このライブラリでは、\"\n\"`Widget` トレイト、そのトレイトのいくつかの実装、`main` 関数を定義していま\"\n\"す。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"通常は、各型または密接に関連する型のセットを個別のモジュールに配置するので、\"\n\"ウィジェット タイプごとに独自のモジュールを用意する必要があります。\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"セットアップ\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"Rust プレイグラウンドは 1 つのファイルしかサポートしていないため、ローカル \"\n\"ファイル システムで Cargo プロジェクトを作成する必要があります。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"生成された `src/main.rs` を編集して `mod` ステートメントを追加し、`src` ディ\"\n\"レクトリにファイルを追加します。\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"ソース\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"GUI ライブラリの単一モジュール実装は次のとおりです。\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// `self` の自然な幅。\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// ウィジェットをバッファに描画します。\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// ウィジェットを標準出力に描画します。\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// 枠線用に 4 つのパディングを追加します。\\n\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Result<(), std::fmt::Error> を返すように draw_into を変更します。次\"\n\"に、.unwrap() の代わりに\\n\"\n\"        // ? 演算子を使用します。\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// パディングを少し追加します。\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"This is a small text GUI demo.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Click me!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"自分にとって自然な方法でコードを分割し、必要な `mod`、`use`、`pub` 宣言に慣れ\"\n\"るよう受講者に促します。その後、どの構成が最も慣用的であるかについて話し合い\"\n\"ます。\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // 枠線に 4 つのパディングを追加します。\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: エラー処理について学習した後で、\\n\"\n\"        // Result<(), std::fmt::Error> を返すように draw_into を変更できま\"\n\"す。次に、ここで\\n\"\n\"        // .unwrap() の代わりに ? 演算子を使用します。\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"ユニットテスト\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\"Rust と Cargo には、シンプルな単体テスト フレームワークが付属しています。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"単体テストはコードのあらゆる場所に記述可能です。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"統合テストは`tests/`ディレクトリ内に記述します。\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"テストには `#[test]` のマークが付きます。多くの場合、単体テストは通常ネストさ\"\n\"れた`tests`モジュールに配置され、`#[cfg(test)]`によりテストのビルド時にのみコ\"\n\"ンパイルされるようになります。\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Hello World\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"これにより、プライベート ヘルパーの単体テストを行えます。\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"`#[cfg(test)]` 属性が付与されたコードは `cargo test` の実行時にのみ有効になり\"\n\"ます。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"結果を表示するには、プレイグラウンドでテストを実行します。\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"インテグレーションテスト\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"ライブラリをクライアントとしてテストする場合は、統合テストを使用します。\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"`tests/` の下に `.rs` ファイルを作成します。\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"これらのテストでは、クレートの公開 API にのみアクセスできます。\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"ドキュメンテーションテスト\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust には、ドキュメントのテストに関する機能が組み込まれています。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// 指定した長さに文字列を短縮します。\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"`///` コメント内のコードブロックは、自動的に Rust コードとみなされます。\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"コードは `cargo test` の一環としてコンパイルされ、実行されます。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"コードに `#` を追加すると、ドキュメントには表示されなくなりますが、コンパイル\"\n\"と実行は引き続き行われます。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"[Rust プレイグラウンド](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) \"\n\"で上記のコードをテストします。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"Rust コンパイラは、読みやすいエラーおよびlintメッセージを生成します。[Clippy]\"\n\"(https://doc.rust-lang.org/clippy/) では、さらに多くの lint がグループにまと\"\n\"められており、プロジェクトごとに有効にできます。\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X probably fits in a u16, right? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"コードサンプルを実行してエラー メッセージを確認します。ここにも lint が表示さ\"\n\"れていますが、コードのコンパイルが一度コンパイル出来ると表示されなくなりま\"\n\"す。これらの lint を表示するには、プレイグラウンド サイトに切り替えます。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"lint を解決した後、プレイグラウンド サイトで `clippy` を実行して、Clippy の警\"\n\"告を表示します。Clippy には、lint に関する広範なドキュメントがあり、新しい \"\n\"lint（デフォルトでエラーになるリント を含む）が常に追加されています。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"`help: ...` が付くエラーや警告は、`cargo fix` またはエディタを使用して修正で\"\n\"きます。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[Luhn アルゴリズム](https://en.wikipedia.org/wiki/Luhn_algorithm) は、クレ\"\n\"ジット カード番号の検証に使用されます。このアルゴリズムは文字列を入力として受\"\n\"け取り、以下の処理を行ってクレジット カード番号を検証します。\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"すべてのスペースを無視し、2 桁未満の番号を拒否します。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"**右から左に**見ていきながら、それぞれ2桁目の数字を 2 倍にします。数値 \"\n\"`1234` の場合、`3` と `1` を 2 倍にします。数値 `98765` の場合、`6` と `8` \"\n\"を 2 倍にします。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"桁を 2 倍にした後、結果が 9 より大きい場合はその桁を合計します。したがって、\"\n\"`7` を 2 倍すると `14` になり、`1 + 4 = 5` になります。\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"2 倍にしていない数字と 2 倍にした数字をすべて合計します。\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"クレジット カード番号は、合計が `0` で終わる場合に有効です。\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"提供されているコードでは、luhn アルゴリズムのバグのある実装と、ほとんどのアル\"\n\"ゴリズムが正しく実装されていることを確認する 2 つの基本的な単体テストを提供し\"\n\"ています。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"以下のコードを <https://play.rust-lang.org/> にコピーし、提供された実装のバグ\"\n\"を発見するための追加のテストを記述し、見つけたバグを修正してください。\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// これは問題に記述されているバグのあるバージョンです。\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// これは解答で、以下のすべてのテストに合格します。\\n\"\n\n#: src/testing/solution.md\nmsgid \"// New: accept whitespace.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: reject all other characters.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: check that we have at least two digits\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"yes\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"no\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/error-handling.md src/unsafe-rust.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 1 時間 5 分です\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"Error Trait\"\nmsgstr \"`Error`トレイト\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"thiserror\"\nmsgstr \"`thiserror`\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"anyhow\"\nmsgstr \"`anyhow`\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"演習: Result を使用した書き換え\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust は「パニック」を使用して致命的なエラーを処理します。\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"実行時に致命的なエラーが発生すると、Rust はパニックをトリガーします。\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\"パニックは、回復不能なエラーや予期しないエラーに使用するためのものです。\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"パニックはプログラムにバグがあることの兆候です。\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\"ランタイム エラー（境界チェックの失敗など）は、パニックになる場合があります。\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"アサーション（`assert!` など）は失敗時にパニックになります。\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\"特定の目的でパニックさせてあい場合には、`panic!` マクロを使用できます。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"パニックが発生すると、スタックが「アンワインド」され、関数がリターンされたか\"\n\"のように値がドロップされます。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"クラッシュが許容されない場合は、パニックが発生しない API（`Vec::get` など）を\"\n\"使用します。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"デフォルトでは、パニックが発生するとスタックはアンワインドされます。アンワイ\"\n\"ンドは以下のようにキャッチできます。\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"No problem here!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"oh no!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\"キャッチは一般的ではないため、`catch_unwind` を使用して例外処理を実装しようと\"\n\"しないでください。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"これは、1 つのリクエストがクラッシュした場合でも実行し続ける必要があるサー\"\n\"バーで有用です。\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"これは、`Cargo.toml` で `panic = 'abort'` が設定されている場合は機能しませ\"\n\"ん。\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"connection-refused や file-not-found などのランタイム エラーは `Result` 型で\"\n\"処理されますが、すべての呼び出しでこの型を照合するのは面倒な場合があります。\"\n\"try 演算子 `?` は、呼び出し元にエラーを返すのに使用されます。これにより、一般\"\n\"的な以下のコードを、はるかにシンプルなコードに変換できます。\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"変換後のコード:\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"この演算子を使用することで、エラー処理コードを簡素化できます。\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"username or error: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"? を使用して `read_username` 関数を簡素化します。\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\"`username` 変数は、`Ok(string)` または `Err(error)` のいずれかになります。\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"`fs::write` 呼び出しを使用して、さまざまなシナリオ（ファイルがない、空のファ\"\n\"イル、ユーザー名のあるファイルなど）をテストします。\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"なお、`main` は `std::process:Termination` を実装している限り、Result<(), \"\n\"E>` を返すことができます。つまり、実際には `E` が`Debug` を実装していることを\"\n\"意味します。この実行可能ファイルはエラー発生時にErrバリアントを出力し、ゼロ以\"\n\"外の終了ステータスを返します。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"`?` を実際に展開すると、前述のコードよりも少し複雑なコードになります。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"上のコードは、以下と同じように動作します。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"ここでの `From::from` 呼び出しは、エラー型を関数が返す型に変換しようとしてい\"\n\"ることを意味します。これにより、エラーを上位レベルのエラーに簡単にカプセル化\"\n\"できます。\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\\\"I/O error: {e}\\\"\"\nmsgstr \"\\\"IO error: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Found no username in {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"`?` 演算子は、関数の戻り値の型と互換性のある値を返す必要があります。つまり、\"\n\"`Result` の場合、エラー型に互換性がなければなりません。`Result<T, \"\n\"ErrorOuter>` を返す関数は、`ErrorOuter` と `ErrorInner` が同じ型であるか、\"\n\"`ErrorOuter` が `From<ErrorInner>` を実装している場合にのみ、型 `Result<U, \"\n\"ErrorInner>` の値に `?` を使用できます。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"特に変換が 1 か所でのみ発生する場合は、`From` を実装する代わりに Result::\"\n\"map_err を使用するのが一般的です。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"`Option`には互換性の要件はありません。`Option<T>`を返す関数は、任意のT型とU型\"\n\"に対して、?演算子をOption<T>に適用できます。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"`Result` を返す関数では `Option` に `?` を使用できません。その逆も同様です。\"\n\"ただし、`Option::ok_or` は `Option` を `Result` に変換でき、`Result::ok` は \"\n\"`Result` を `Option` に変換できます。\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"動的なエラー型\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"さまざまな可能性をカバーする独自の列挙型を記述することなく、あらゆる種類のエ\"\n\"ラーを返せるようにしたい場合があります。`std::error::Error` トレイトを使用す\"\n\"ると、あらゆるエラーを含めることができるトレイト オブジェクトを簡単に作成でき\"\n\"ます。\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Count: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Error: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"`read_count` 関数は、`std::io::Error`（ファイル オペレーションから）または \"\n\"`std::num::ParseIntError`（`String::parse` から）を返すことができます。\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"エラーをボックス化することでコードを節約できますが、プログラムで異なるエラー\"\n\"ケースを異なる方法で適切に処理する機能が失われます。そのため、ライブラリの公\"\n\"開 API で `Box<dyn Error>` を使用することは通常おすすめしませんが、エラー \"\n\"メッセージをどこかに表示したいだけのプログラムでは適切な選択肢となりえます。\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) crate provides macros to help \"\n\"avoid boilerplate when defining error types. It provides derive macros that \"\n\"assist in implementing `From<T>`, `Display`, and the `Error` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\n#, fuzzy\nmsgid \"\\\"I/O error: {0}\\\"\"\nmsgstr \"\\\"IO error: {e}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Found no username in {0}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Username: {username}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Error: {err:?}\\\"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"`Error` 導出マクロは `thiserror` によって提供されます。このマクロには、エラー\"\n\"型を簡潔に定義するのに役立つ属性が数多く用意されています。\"\n\n#: src/error-handling/thiserror.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\"`#[error]` からのメッセージは、`Display` トレイトを導出するために使用されま\"\n\"す。\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"Note that the (`thiserror::`)`Error` derive macro, while it has the effect \"\n\"of implementing the (`std::error::`)`Error` trait, is not the same this; \"\n\"traits and macros do not share a namespace.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type \"\n\"with support for carrying additional contextual information, which can be \"\n\"used to provide a semantic trace of what the program was doing leading up to \"\n\"the error.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"This can be combined with the convenience macros from [`thiserror`](https://\"\n\"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom \"\n\"error types.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Failed to open {path}\\\"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Failed to read\\\"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` は基本的に `Box<dyn Error>` のラッパーとなっています。そのた\"\n\"め、ライブラリの公開 API としては一般的には適していませんが、アプリでは広く使\"\n\"用されています。\"\n\n#: src/error-handling/anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"`anyhow::Result<V>` は `Result<V, anyhow::Error>` の型エイリアスです。\"\n\n#: src/error-handling/anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Error` may be familiar to Go developers, \"\n\"as it provides similar behavior to the Go `error` type and `Result<T, \"\n\"anyhow::Error>` is much like a Go `(T, error)` (with the convention that \"\n\"only one element of the pair is meaningful).\"\nmsgstr \"\"\n\"`anyhow::Result<T>` が提供する機能は、Go の `(T, error)` と同様の使用パターン\"\n\"とエルゴノミクスを備えているため、Go デベロッパーにはなじみがあるかもしれませ\"\n\"ん。\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` は、標準の `Result` 型と `Option` 型に実装されたトレイトで\"\n\"す。これらの型で `.context()` と `.with_context()` を有効にするには、`use \"\n\"anyhow::Context` が必要です。\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the \"\n\"specific error type stored inside can be extracted for examination if \"\n\"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct.\"\n\"Error.html#method.downcast).\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/\"\n\"anyhow).\"\nmsgstr \"\"\n\"ここでは、式を表す言語の非常にシンプルなパーサーを実装します。ただし、エラー\"\n\"に対してはパニックしています。代わりに慣用的なエラー処理を使用し、`main` から\"\n\"の戻り値にエラーを伝播するように書き換えてください。`thiserror` と `anyhow`を\"\n\"自由に使用してかまいません。\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\"\n\"**Hint:** start by fixing error handling in the `parse` function. Once that \"\n\"is working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"ヒント: まず、`parse` 関数のエラー処理を修正します。それができたら\"\n\"`Iterator<Item=Result<Token, TokenizerError>>` を実装するように`Tokenizer` を\"\n\"更新し、その結果をパーサーで処理するようにしてください。\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// 算術演算子。\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// 式言語のトークン\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// 式言語の式\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// 変数への参照。\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// リテラル数値。\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// バイナリ演算。\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Unexpected character {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Unexpected end of input\\\"\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\\\"Invalid 32-bit integer\\\"\"\nmsgstr \"\\\"Invalid 32-bit integer'\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Unexpected token {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// バイナリ演算が存在する場合はパースします。\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Unexpected character '{0}' in input\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Tokenizer error: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Unexpected token {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Invalid number\\\"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Rust 言語は 2 つの部分で構成されています。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"**安全な Rust:** メモリセーフで、未定義の動作は起こりえません。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**アンセーフRust:** 前提条件に違反した場合、未定義の動作がトリガーされる可能\"\n\"性があります。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"このコースでは主に安全な Rust を見てきましたが、安全でない Rust とは何かを理\"\n\"解しておくことが重要です。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"アンセーフなコードは通常、小規模で分離されており、その正確性は慎重に文書化さ\"\n\"れている必要があります。通常は安全な抽象化レイヤでラップされています。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"アンセーフRustでは、次の 5 つの新機能を利用できます。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"生ポインタの参照外し。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"可変の静的変数へのアクセスまたは変更。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"`union` フィールドへのアクセス。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"`extern` 関数を含む `unsafe` 関数の呼び出し。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"`unsafe` トレイトの実装。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"次に、安全でない機能について簡単に説明します。詳しくは、[Rust Book の第 19.1 \"\n\"章](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html)と、\"\n\"[Rustonomicon](https://doc.rust-lang.org/nomicon/) をご覧ください。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"アンセーフRustは、コードが正しくないことを意味するものではありません。デベ\"\n\"ロッパーが一部のコンパイラ安全性機能をオフにし、自分で正しいコードを記述しな\"\n\"ければならないことを意味します。また、コンパイラがRustのメモリ安全性に関する\"\n\"ルールを強制しなくなるということを意味します。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"ポインタの作成は安全ですが、参照外しには `unsafe` が必要です。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"careful!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// 次の理由により安全: r1 と r2 は参照から取得されており、\\n\"\n\"    // 非 null で適切にアラインされていることが保証されています。\\n\"\n\"    // 取得元である参照の基になるオブジェクトは、\\n\"\n\"    // アンセーフブロック全体を通じて存続します。参照を介したアクセスや、\\n\"\n\"    // 他のポインタを介した同時アクセスは行われません。\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"uhoh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// 安全でないため、NOT SAFE。このような記述をしないでください。\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"`unsafe`ブロックごとにコメントを記述し、そのブロック内のコードが行うアンセー\"\n\"フな操作がどのように安全性要件を満たしているのかを記述することをおすすめしま\"\n\"す（Android Rust スタイルガイドでも必須とされています）。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"ポインタ参照外しの場合、これはポインタが [_valid_](https://doc.rust-lang.org/\"\n\"std/ptr/index.html#safety) でなければならないことを意味します。つまり、次のよ\"\n\"うになります。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"ポインタは null 以外でなければならないこと。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"ポインタは、（割り当てられた単一のオブジェクトの境界内で）参照外し可能でなけ\"\n\"ればならない。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"オブジェクトが解放されていないこと。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"同じロケーションに同時アクセスすることがないこと。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"参照をキャストしてポインタを取得した場合、基になるオブジェクトが存続しなけれ\"\n\"ばならず、他のいかなる参照を通してもそのメモリにアクセスがないこと\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"ほとんどの場合、ポインタも適切にアラインされる必要があります。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"\\\"NOT SAFE\\\"というコメントがあるところは、よくあるUBバグの例を示しています。\"\n\"`*r1` のライフタイムは `'static` であるため、`r3` の型は `&'static String` と\"\n\"なり、`s` より長く存続します。ポインタからの参照の作成には細心の注意が必要で\"\n\"す。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"不変の静的変数は安全に読み取ることができます。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"Hello, world!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"ただし、データ競合が発生する可能性があるため、可変静的変数の読み取りと書き込\"\n\"みは安全ではありません。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"このプログラムはシングルスレッドなので安全です。しかし、Rust コンパイラは保守\"\n\"的で、最悪の事態を想定します。`unsafe` を削除すると、複数のスレッドから静的変\"\n\"数を変更することは未定義の動作であることを説明するメッセージがコンパイラによ\"\n\"り表示されるはずです。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"一般的に、可変静的変数を使用することはおすすめしませんが、ヒープ アロケータの\"\n\"実装や一部の C API の操作など、低レベルの `no_std` コードでは適している場合も\"\n\"あります。\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"共用体は列挙型に似ていますが、アクティブ フィールドを自分でトラッキングする必\"\n\"要があります。\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// 未定義の動作\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Rust では、通常は列挙型を使用できるため、共用体はほとんど必要ありません。共用\"\n\"体は、C ライブラリ API とのやり取りで必要になることがあります。\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"バイトを別の型として再解釈したい場合は、[`std::mem::transmute`](https://doc.\"\n\"rust-lang.org/stable/std/mem/fn.transmute.html) か、[`zerocopy`](https://\"\n\"crates.io/crates/zerocopy) クレートのような安全なラッパーを使用することをおす\"\n\"すめします。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Unsafe関数の呼び出し\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"未定義の動作を回避するために満たす必要がある追加の前提条件がある関数またはメ\"\n\"ソッドは、`unsafe` とマークできます。\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// インデックスが正しい順序で文字列スライスの境界内にあり、\\n\"\n\"    // UTF-8 シーケンスの境界上にあるため、安全です。\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"char count: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Absolute value of -3 according to C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// UTF-8 エンコード要件を満たさない場合、メモリの安全性が損なわれます。\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Unsafe関数の書き方\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"未定義の動作を回避するために特定の条件が必要な場合は、独自の関数を `unsafe` \"\n\"とマークできます。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// 指定されたポインタが指す値をスワップします。\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// ポインタが有効で、適切にアラインされている必要があります。\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is unsafe for a different reason: \"\n\"it is an external function (FFI). Calling external functions is usually only \"\n\"a problem when those functions do things with pointers which might violate \"\n\"Rust's memory model, but in general any C function might have undefined \"\n\"behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"`get_unchecked` は多くの`_unchecked` 関数と同様に、範囲が正しくない場合に UB \"\n\"となる可能性があるため、安全ではありません。また、`abs`が安全でないのは、外部\"\n\"関数（FFI）であるからです。通常、外部関数の呼び出しが問題になるのポインタを使\"\n\"用してRustのメモリモデルに違反する処理を行う場合のみです。しかし、一般的に C \"\n\"関数には任意の状況下で未定義の動作が含まれる可能性があります。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"この例の `\\\"C\\\"` は ABI です（[他の ABI も使用できます](https://doc.rust-\"\n\"lang.org/reference/items/external-blocks.html)）。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"実際には、`swap` 関数ではポインタは使用しません。これは参照を使用することで安\"\n\"全に実行できます。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"アンセーフな関数内では、アンセーフなコードを`unsafe`ブロックなしに記述するこ\"\n\"とができます。これは `#[deny(unsafe_op_in_unsafe_fn)]` で禁止できます。追加す\"\n\"るとどうなるか見てみましょう。これは、今後の Rust エディションで変更される可\"\n\"能性があります。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Unsafeなトレイトの実装\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"関数と同様に、未定義の動作を回避するために実装で特定の条件を保証する必要があ\"\n\"る場合は、トレイトを `unsafe` としてマークできます。\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):\"\nmsgstr \"\"\n\"たとえば、`zerocopy` クレートには [このような](https://docs.rs/zerocopy/\"\n\"latest/zerocopy/trait.AsBytes.html) 安全でないトレイトがあります。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// 型には定義された表現が必要で、パディングがあってはなりません。\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"// u32 には定義された表現があり、パディングがないため、安全です。\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Rustdoc には、トレイトを安全に実装するための要件について説明した `# Safety` \"\n\"セクションが必要です。\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `IntoBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"`AsBytes` の実際の安全性セクションはより長く、複雑です。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"組み込みの `Send` トレイトと `Sync` トレイトはアンセーフです。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"安全なFFIラッパ\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust は、外部関数インターフェース（FFI）を介した関数呼び出しを強力にサポート\"\n\"しています。これを使用して、ディレクトリ内のファイル名を読み取るために Cプロ\"\n\"グラムで使用する `libc` 関数の安全なラッパーを作成します。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"以下のマニュアル ページをご覧ください。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"[`std::ffi`](https://doc.rust-lang.org/std/ffi/) モジュールも参照してくださ\"\n\"い。ここには、この演習で必要な文字列型が多数掲載されています。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"エンコード\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"使う\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) と [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"Rust でのテキスト処理\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) と [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"NUL終端文字列\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"C 関数との通信\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) と \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"OS 固有\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"OS との通信\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"以下のすべての型間で変換を行います。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`&str` から `CString`: 末尾の `\\\\0` 文字にも領域を割り当てる必要があります。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"`CString` から `*const i8`: C 関数を呼び出すためのポインタが必要です。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`*const i8` から `&CStr`: 末尾の `\\\\0` 文字を検出できるものが必要です。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"`&CStr` から `&[u8]`: バイトのスライスは「不明なデータ」用の汎用的な インター\"\n\"フェースです。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"`&[u8]` から `&OsStr`: `&OsStr` は `OsString` に変換するための中間ステップで\"\n\"あり、[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.\"\n\"html) を使用して作成します。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr`内のデータを返し、さらに再びreaddirを呼び出せるようにするためには\"\n\"`&OsStr`内のデータをクローンする必要があります。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) にも、FFI に関する有益\"\n\"な章があります。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"以下のコードを <https://play.rust-lang.org/> にコピーし、不足している関数とメ\"\n\"ソッドを記入します。\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\"// オペーク型。https://doc.rust-lang.org/nomicon/ffi.html をご覧ください。\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// readdir(3) の Linux マニュアル ページに沿ったレイアウト。ino_t と\\n\"\n\"    // off_t は\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h} の定義に\"\n\"従って解決されます。\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// macOSマニュアル ページのdir(5)に沿ったレイアウト。\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// https://github.com/rust-lang/libc/issues/414、および  macOS 版マニュアル \"\n\"ページのstat(2)における\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE に関するセクションをご覧ください。\\n\"\n\"        //\\n\"\n\"        // 「これらのアップデートが利用可能になる前に存在していたプラット\"\n\"フォーム(\\\"Platforms that existed before these updates were available\\\")」と\"\n\"は、\\n\"\n\"        // Intel および PowerPC 上の macOS（iOS / wearOS などではない）を指し\"\n\"ます。\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// opendir を呼び出し、成功した場合は Ok 値を返し、\\n\"\n\"        // それ以外の場合はメッセージとともに Err を返します。\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"// NULL ポインタが返されるまで readdir を呼び出し続けます。\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// 必要に応じて closedir を呼び出します。\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"files: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Invalid path: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SAFETY: path.as_ptr()がNULLであることはありません。\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"Could not open {path:?}\\\"\"\nmsgstr \"\\\"Could not open {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// NULL ポインタが返されるまで readdir を呼び出し続けます。\\n\"\n\"        // SAFETY: self.dir は決して NULL になりません。\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// ディレクトリの最後に到達しました。\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// 安全: dirent は NULL ではなく、dirent.d_name は NUL\\n\"\n\"        // 文字終端されています。\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Call closedir as needed.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// NULL ポインタが返されるまで readdir を呼び出し続けます。\\n\"\n\"        // SAFETY: self.dir は決して NULL になりません。\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Could not close {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Non UTF-8 character in path\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Android での Rust へようこそ\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust は Android のシステム ソフトウェアでサポートされています。つまり、新しい\"\n\"サービス、ライブラリ、ドライバ、さらにはファームウェアを Rust で作成できます\"\n\"（または、必要に応じて既存のコードを改善できます）。\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"Android で Rust が使用されることが増えているため、次のいずれかに言及すること\"\n\"をおすすめします。\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html).\"\nmsgstr \"\"\n\"サービスの例: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html).\"\nmsgstr \"\"\n\"ライブラリ: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/).\"\nmsgstr \"\"\n\"カーネル ドライバ: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html).\"\nmsgstr \"\"\n\"ファームウェア: [pKVM ファームウェア](https://security.googleblog.\"\n\"com/2023/10/bare-metal-rust-in-android.html)\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"コードのテストのためにCuttlefish Android Virtual Device を使用します。既存の\"\n\"Deviceがあればそれにアクセスできることを確認し、そうでなければ以下のコマンド\"\n\"により作成しておいてください。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"詳しくは、[Android デベロッパー Codelab](https://source.android.com/docs/\"\n\"setup/start) をご覧ください。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The code on the following pages can be found in the [`src/android/` \"\n\"directory](https://github.com/google/comprehensive-rust/tree/main/src/\"\n\"android) of the course material. Please `git clone` the repository to follow \"\n\"along.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish は、一般的な Linux デスクトップで動作するように設計されたリファレ\"\n\"ンス Android デバイスです。macOS のサポートも予定されています。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"Cuttlefish システム イメージは、実際のデバイスに対する高い忠実度を維持してい\"\n\"るため、多くの Rust ユースケースを実行するのに理想的なエミュレータです。\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Android ビルドシステム（Soong）は、さまざまなモジュールを通じて Rust をサポー\"\n\"トしています。\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"モジュール タイプ\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"説明\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Rust バイナリを生成します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Rust ライブラリを生成し、`rlib` と `dylib` の両方のバリアントを提供します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"`cc` モジュールで使用できる Rust C ライブラリを生成し、静的バリアントと共有バ\"\n\"リアントの両方を提供します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"`proc-macro` Rust ライブラリを生成します。これらはコンパイラ プラグインに似て\"\n\"います。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"標準の Rust テストハーネスを使用する Rust テストバイナリを生成します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"`libfuzzer` を利用して、Rust ファズバイナリを生成します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"ソースを生成し、特定の protobuf 用のインターフェースを提供する Rust ライブラ\"\n\"リを生成します。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"ソースを生成し、C ライブラリへの Rust バインディングを含む Rust ライブラリを\"\n\"生成します。\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"次に `rust_binary` と `rust_library` を見ていきます。\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"追加で次の項目に言及することをおすすめします。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo は多言語リポジトリ用に最適化されていません。また、インターネットから\"\n\"パッケージをダウンロードします。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"コンプライアンスおよびパフォーマンス上の理由から、Android ではクレートをツ\"\n\"リー内に配置する必要があります。また、C /C++ / Java コードとの相互運用性も必\"\n\"要です。Soong を使用することで、そのギャップを埋めることができます。\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Soong has many similarities to [Bazel](https://bazel.build/), which is the \"\n\"open-source variant of Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong には、Blaze（google3 で使用）のオープンソース版である Bazel と多くの類\"\n\"似点があります。\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\"豆知識: スタートレックの「データ」は、スン（Soong）型アンドロイドです。\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Rust バイナリ\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"簡単なアプリから始めましょう。AOSP チェックアウトのルートで、次のファイルを作\"\n\"成します。\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Rust のデモ。\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// 挨拶を標準出力に出力します。\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Hello from Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"これで、バイナリをビルド、push、実行できます。\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Rust ライブラリ\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"`rust_library` を使用して、Android 用の新しい Rust ライブラリを作成します。\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"ここでは、2 つのライブラリへの依存関係を宣言します。\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`: 以下で定義します。\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`: すでに[`external/rust/crates/`](https://cs.android.com/\"\n\"android/platform/superproject/+/master:external/rust/crates/) に取り込まれて\"\n\"いるクレートです。\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// ダイナミック リンク エラーを回避するために必要です。\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! 挨拶ライブラリ。\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// `name` に挨拶します。\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"前と同じようにバイナリをビルド、push、実行します。\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Rust では [Android インターフェース定義言語（AIDL）](https://developer.\"\n\"android.com/guide/components/aidl) がサポートされています。\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Rust コードは既存の AIDL サーバーを呼び出すことができます。\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Rust では新しい AIDL サーバーを作成できます。\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"AIDL インターフェース\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"サービスの API を宣言するには、AIDL インターフェースを使用します。\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** 誕生日サービスのインターフェース。*/\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** 「お誕生日おめでとう」というメッセージを生成します。*/\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust はデフォルトでは無効です。\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"生成された Rust:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"サービスの実装\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"次に、AIDL サービスを実装します。\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// `IBirthdayService` の実装。\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"AIDL サーバー\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"次に、サービスを公開するサーバーを作成します。\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! 誕生日サービス。\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// 誕生日サービスのエントリ ポイント。\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Failed to register service\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// ダイナミック リンク エラーを回避するためです。\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"次に、サービスをビルド、push、開始します。\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"別のターミナルで、サービスが実行されていることを確認します。\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"`service call` を使用してサービスを呼び出すこともできます。\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"AIDL クライアント\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"ようやくここで、新しいサービス用の Rust クライアントを作成します。\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// 誕生日サービスを呼び出します。\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Failed to connect to BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// Call the service.\\n\"\nmsgstr \"/// 誕生日サービスを呼び出します。\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\"クライアントが `libbirthdayservice` に依存していないことに注目してください。\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"デバイスでクライアントをビルド、push、実行します。\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"APIを拡張して、クライアントが誕生日カードに追加する複数行のメッセージを指定で\"\n\"きるようにします。\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL（Androidインターフェイス定義言語）\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Rust 型\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`bool`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Note that bytes are signed.\"\nmsgstr \"// 7 バイトを超える値は無効です。\\n\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"説明\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"スライス型\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"`int[3][4]`). In the Java backend, fixed-size arrays are represented as \"\n\"array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! `IBirthdayService` AIDL インターフェースの実装。\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! `IBirthdayService` AIDL インターフェースの実装。\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"/// 誕生日サービスを呼び出します。\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Invalid length\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"Android での Rust へようこそ\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! 挨拶ライブラリ。\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"これで、バインディングを自動生成できます。\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"全体的なアプローチは次のようになります。\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"[GoogleTest](https://docs.rs/googletest/) クレートにより、マッチャーを使用し\"\n\"た柔軟なテスト アサーションが可能になります。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"最後の要素を `\\\"!\\\"` に変更すると、テストは失敗し、エラー箇所を示す構造化され\"\n\"たエラー メッセージが表示されます。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest は Rust プレイグラウンドの一部ではないため、この例はローカル環境で\"\n\"実行する必要があります。`cargo add googletest` を使用して、既存の Cargo プロ\"\n\"ジェクトにすばやく追加します。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"`use googletest::prelude::*;` 行は、[一般的に使用されるマクロと型](https://\"\n\"docs.rs/googletest/latest/googletest/prelude/index.html)をインポートします。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://rust-exercises.com/advanced-testing/), a self-guided \"\n\"Rust course: it provides a guided introduction to the library, with \"\n\"exercises to help you get comfortable with `googletest` macros, its matchers \"\n\"and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"特に便利なのは、複数行の文字列の不一致が差分として表示される機能です。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"これにより、差分が色分けされます（ここでは色分けされていません）。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"このクレートは [GoogleTest for C++](https://google.github.io/googletest/) を\"\n\"Rustに移植したものです。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"モックには、[Mockall](https://docs.rs/mockall/) というライブラリが広く使用さ\"\n\"れています。トレイトを使用するようにコードをリファクタリングする必要がありま\"\n\"す。これにより、すぐにモックできるようになります。\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"ここでは、Mockall が推奨モック ライブラリである Android（AOSP）向けのアドバイ\"\n\"スを行います。特に HTTP サービスのモックに関しては、[crates.io で他のモック \"\n\"ライブラリが公開されています](https://crates.io/keywords/mock)。他のモック ラ\"\n\"イブラリも Mockall と 同様で、特定のトレイトのモック実装を簡単に得ることがで\"\n\"きます。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"モックを使用する際は少し注意が必要です。モックを使用すると、テストを依存関係\"\n\"から完全に分離できます。その結果、より高速で安定したテスト実行が可能になりま\"\n\"す。一方、モックが誤って構成され、実際の依存関係の動作とは異なる出力が返され\"\n\"る可能性があります。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"可能な限り、実際の依存関係を使用することをおすすめします。たとえば、多くの\"\n\"データベースではインメモリ バックエンドを構成できます。つまり、テストで正しい\"\n\"動作が得られ、しかも高速で、テスト後は自動的にクリーンアップされます。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"同様に、多くのウェブ フレームワークでは、`localhost` 上のランダムなポートにバ\"\n\"インドするプロセス内サーバーを起動できます。このような構成は実際の環境でコー\"\n\"ドをテストすることを可能にするので、フレームワークをモックすることよりも常に\"\n\"優先して利用しましょう。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall は Rust プレイグラウンドの一部ではないため、この例はローカル環境で実\"\n\"行する必要があります。`cargo add mockall` を使用して、Mockall を既存の Cargo \"\n\"プロジェクトにすばやく追加します。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall にはさらに多くの機能があります。特に、渡される引数に応じて期待値を設\"\n\"定できます。ここでは、最後に餌を与えてらえてから 3 時間後に空腹になる猫をモッ\"\n\"クするためにこれを使用します。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"`.times(n)` を使用すると、モックメソッドが呼び出される回数を`n` に制限できま\"\n\"す。これが満たされない場合、モックはドロップ時に自動的にパニックになります。\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"`log` クレートを使用して、自動的に （デバイス上では）`logcat` または （ホスト\"\n\"上では）`stdout`にログを記録するようにします。\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Rust ロギングのデモ。\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// 挨拶をログに記録します。\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Starting program.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Things are going fine.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Something went wrong!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"デバイスでバイナリをビルド、push、実行します。\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"`adb logcat` でログを表示できます。\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"The logger implementation in `liblogger` is only needed in the final binary, \"\n\"if you're logging from a library you only need the `log` facade crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"Rust は他の言語との相互運用性に優れているため、次のことが可能です。\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"他の言語から Rust 関数を呼び出す。\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Rust から他の言語で記述された関数を呼び出す。\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"他の言語の関数を呼び出す場合は、外部関数インターフェース（FFI: _foreign \"\n\"function interface_）を使用します。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"C との相互運用性\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust は、C の呼び出し規則によるオブジェクト ファイルのリンクを完全にサポート\"\n\"しています。同様に、Rust 関数をエクスポートして C から呼び出すことができま\"\n\"す。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"これは手動で行うこともできます。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/\"\n\"exercise.md).\"\nmsgstr \"\"\n\"これは、[安全な FFI ラッパーの演習](../../exercises/day-3/safe-ffi-wrapper.\"\n\"md)ですでに取り扱いました。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"これは、ターゲット プラットフォームを完全に理解していることを前提としていま\"\n\"す。本番環境での使用推奨されません。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"次に、より良い選択肢を見ていきます。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"Bindgen の使用\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"[bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) ツール\"\n\"を使用すると、C ヘッダー ファイルからバインディングを自動生成できます。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"まず、小さな C ライブラリを作成します。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| Happy Birthday %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"これを `Android.bp` ファイルに追加します。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"ライブラリのラッパー ヘッダー ファイルを作成します（この例では必須ではありま\"\n\"せん）。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"これで、バインディングを自動生成できます。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"これで、Rust プログラムでバインディングを使用できます。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen のデモ。\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"これで、自動生成されたテストを実行して、バインディングが機能していることを確\"\n\"認できます。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// 生成されたファイル、lint チェックをスキップ\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"Rust の呼び出し\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Rust の関数と型は、C に簡単にエクスポートできます。\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI のデモ。\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"/// Analyze the numbers.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) is smallest!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"これで、これを C バイナリから呼び出せるようになりました。\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported \"\n\"symbol will just be the name of the function. You can also use \"\n\"`#[unsafe(export_name = \\\"some_name\\\")]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` により Rust の通常の名前のマングリングが無効になるため、エクス\"\n\"ポートされたシンボルは単に関数の名前になります。`#[export_name = \"\n\"\\\"some_name\\\"]` を使用して任意の名前を指定することもできます。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"[CXX クレート](https://cxx.rs/)を使用すると、Rust と C++ の間で安全な相互運用\"\n\"性を確保できます。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"全体的なアプローチは次のようになります。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX は、各言語から他の言語に公開される関数シグネチャの記述に依存します。この\"\n\"記述は、`#[cxx::bridge]` 属性マクロでアノテーションされた Rust モジュール内\"\n\"の extern ブロックを使用して指定します。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// 両方の言語からアクセスできるフィールドを持つ共有構造体。\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// C++ に公開される Rust の型とシグネチャ。\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// Rust に公開される C++ の型とシグネチャ。\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"ブリッジは通常、クレート内の `ffi` モジュールで宣言します。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"ブリッジ モジュールで行われた宣言から、CXX はマッチする Rust と C++ の型 / 関\"\n\"数の定義を生成し、これらのアイテムを両方の言語に公開します。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"生成された Rust コードを表示するには、[cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) を使用して、展開された proc マクロを表示します。ほとん\"\n\"どの例では、`cargo expand ::ffi` を使用して `ffi` モジュールのみを展開します\"\n\"（ただし、これは Android プロジェクトには当てはまりません）。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"生成された C++ コードを表示するには、`target/cxxbridge` を確認します。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Rust のブリッジ宣言\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// オペーク型\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// `MyType` のメソッド\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"関数\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"親モジュールのスコープ内にある `extern \\\"Rust\\\"` 参照アイテムで宣言されたアイ\"\n\"テム。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"CXX コード ジェネレータは、`extern \\\"Rust\\\"` セクションを使用して、対応する \"\n\"C++ 宣言を含む C++ ヘッダー ファイルを生成します。生成されるヘッダーのパス\"\n\"は、rs.hというファイル拡張子部分を除き、ブリッジを含む Rust ソースファイルと\"\n\"同じになります。\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"おおよそ次のような C++ が生成されます。\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"C++ のブリッジ宣言\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"おおよそ次のような Rust が生成されます。\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"プログラマーは、入力したシグネチャが正確であることを保証する必要はありませ\"\n\"ん。CXX は、シグネチャが C++ で宣言されたものと完全に対応するということを静的\"\n\"に保証します。\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"`unsafe extern` ブロックを使用すると、Rust から安全に呼び出せる C++ 関数を宣\"\n\"言できます。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1、J=11、Q=12、K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"C のような（単位）列挙型のみがサポートされています。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"共有型の `#[derive()]` では、サポートされるトレイトの数が限られています。対応\"\n\"する機能は C++ コードでも生成されます。たとえば、`Hash` を導出すると、対応す\"\n\"る C++ 型の `std::hash` の実装も生成されます。\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"生成された Rust:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"生成された C++:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"Rust 側では、共有列挙型に対して生成されるコードは、実際には数値をラップした構\"\n\"造体です。これは、列挙型クラスがリストされたすべてのバリアントとは異なる値を\"\n\"保持することは C++ では UB ではなく、Rust 表現は同じ動作をする必要があるため\"\n\"です。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 requires depth > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Success!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"`Result` を返す Rust 関数は、C++ 側で例外に変換されます。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"スローされる例外は常に `rust::Error` 型で、主にエラー メッセージの文字列を取\"\n\"得する手段を提供します。エラー メッセージは、エラー型の `Display` の実装から\"\n\"取得されます。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"Rust から C++ にパニック アンワインドを行うと、プロセスは必ず直ちに終了しま\"\n\"す。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"`Result` を返すように宣言された C++ 関数は、C++ 側でスローされたあらゆる例外\"\n\"をキャッチし、呼び出し元の Rust 関数に `Err` 値として返します。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"CXX ブリッジでResultを返すように宣言されていないextern \\\"C++\\\"関数から例外が\"\n\"スローされると、`Result`が返されると、プログラムは C++ の`std::terminate`を呼\"\n\"び出します。この動作は、同じ例外が`noexcept` C++ 関数でスローされた場合と同等\"\n\"です。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"C++ 型\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"これらの型は、共有構造体のフィールドと、extern 関数の引数と戻り値で使用できま\"\n\"す。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"Rust の `String` は `std::string` に直接マッピングされません。これには次のよ\"\n\"うな理由があります。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` は、`String` が必要とする UTF-8 不変条件を満たしません。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"この 2 つの型はメモリ内のレイアウトが異なるため、言語間で直接渡すことはできま\"\n\"せん。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` は、Rust のムーブ セマンティクスと一致しないムーブコンストラク\"\n\"タを必要とするため、`std::string` を Rust に値で渡すことはできません。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Android 向けのビルド\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"`cc_library_static` を作成して、CXX で生成されたヘッダーとソースファイルを含\"\n\"む C++ ライブラリをビルドします。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"`libcxx_test_bridge_header` と `libcxx_test_bridge_code` が、CXX CXXにより生\"\n\"成される C++ バインディングに対する依存関係であることを説明します。次のスライ\"\n\"ドで、これらがどのような記述になっているかを説明します。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"また、一般的な CXX 定義を取得するためには、`cxx-bridge-header` ライブラリに依\"\n\"存する必要があることにも注意してください。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"Android で CXX を使用するための詳細なドキュメントについては、[Android のド\"\n\"キュメント](https://source.android.com/docs/setup/build/rust/building-rust-\"\n\"modules/android-rust-patterns#rust-cpp-interop-using-cxx)をご覧ください。その\"\n\"リンクをクラスと共有して、受講者が後で手順を確認できるようにすることをおすす\"\n\"めします。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"genrule を 2 つ作成します。1 つは CXX ヘッダーの生成用、もう 1 つは CXX ソー\"\n\"スファイルの生成用です。これらは `cc_library_static` への入力として使用されま\"\n\"す。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// lib.rs にある Rustからエクスポートされた関数に対する\\n\"\n\"// C++ バインディングを含む C++ ヘッダーを生成します。\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Rust が呼び出す C++ コードを生成します。\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"`cxxbridge` ツールは、ブリッジ モジュールの C++ 側を生成するスタンドアロン \"\n\"ツールです。Android に組み込まれており、Soong ツールとして利用できます。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"慣例として、Rust ソースファイルが `lib.rs` の場合、ヘッダー ファイルの名前は \"\n\"`lib.rs.h`、ソースファイルの名前は `lib.rs.cc` となります。ただし、この命名規\"\n\"則は強制ではありません。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"`libcxx` と `cc_library_static`に依存する `rust_binary` を作成します。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"Java との相互運用性\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java では、[Java Native Interface（JNI）](https://en.wikipedia.org/wiki/\"\n\"Java_Native_Interface) を介して共有オブジェクトを読み込むことができます。\"\n\"[`jni` クレート](https://docs.rs/jni/) を使用すると、互換性のあるライブラリを\"\n\"作成できます。\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"まず、Java にエクスポートする Rust 関数を作成します。\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI のデモ。\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"/// HelloWorld::hello method implementation.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"/// HelloWorld::hello メソッドの実装。\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Hello, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"次に、Java からこの関数を呼び出します。\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"最後に、バイナリをビルド、同期、実行します。\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Chromium の Rust へようこそ\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Rust は Chromium のサードパーティ ライブラリでサポートされています。Rust と既\"\n\"存の Chromium C++ コードを接続するには、ファースト パーティのグルーコードを使\"\n\"用します。\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"本日は、Rust で文字列を使って面白いことをしたいと思います。もし自分の担当部分\"\n\"にUTF8 文字列を表示するコードがある場合は、ここで述べた部分ではなく、自分の\"\n\"コードに対してこの手順を実行して構いません。\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"Chromium をビルドして実行できることを確認します。コードが比較的最近のもの\"\n\"（2023 年 11 月に対応するコミット位置 1223636 以降）であれば、任意のプラット\"\n\"フォームとビルドフラグのセットで問題ありません。\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"（反復処理の時間を最短にするには、コンポーネントのデバッグビルドをおすすめし\"\n\"ます。これがデフォルトです）\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"まだ確認していない場合は、[Chromium のビルド方法](https://www.chromium.org/\"\n\"developers/how-tos/get-the-code/) を確認してください。なお、Chromium をビルド\"\n\"するためのセットアップには時間がかかります。\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"また、Visual Studio Code をインストールしておくことをおすすめします。\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"演習について\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"コースのこのパートには、相互に関連した一連の演習があります。コースの最後だけ\"\n\"でなく、全体を通して演習を行います。特定のパートを完了する時間がない場合も、\"\n\"後で追いつけばよいため心配はいりません。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"Rust コミュニティでは通常、`cargo` と [crates.io](https://crates.io/) のライ\"\n\"ブラリを使用します。Chromium は、`gn` と `ninja`、および厳選された依存関係の\"\n\"セットを使用してビルドされています。\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"Rust でコードを記述する際は、次の選択肢があります。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"`//build/rust/*.gni` のテンプレート（例: 後で説明する `rust_static_library`）\"\n\"を参考にして、`gn` と `ninja` を使用します。これには、Chromium の監査済みの\"\n\"ツールチェーンとクレートが使用されます。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"`cargo` を使用しますが、実際の利用を[Chromium の監査済みのツールチェーンとク\"\n\"レートに制限します](https://chromium.googlesource.com/chromium/src/+/refs/\"\n\"heads/main/docs/rust.md#Using-cargo)。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"`cargo` を使用し、[ツールチェーン](https://rustup.rs/) や [インターネットから\"\n\"ダウンロードしたクレート](https://crates.io/) を信頼します。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"ここからは、`gn` と `ninja` に焦点を当てます。これらを使用することで、\"\n\"Chromium ブラウザに Rust コードを組み込むことができます。それとは別に、Cargo \"\n\"は Rust エコシステムの重要な部分であり、使いこなせるようになっているべきで\"\n\"す。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"練習問題\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"少人数のグループに分け、以下を行います。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"`cargo` がメリットをもたらす可能性のあるシナリオをブレインストーミングし、そ\"\n\"れらのシナリオのリスク プロファイルを評価します。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"`gn` や `ninja`、オフラインの `cargo` などを使用する際に、どのツール、ライブ\"\n\"ラリ、人々を信頼しなければならないかについて話し合います。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"受講者に、演習を完了する前にスピーカー ノートをのぞかないようお願いしてくださ\"\n\"い。コースの受講者同士が地理的に集まっていると仮定して、3～4 人の少人数のグ\"\n\"ループで話し合ってもらうようにお願いしてください。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"演習の前半に関するメモとヒント（「Cargo がメリットをもたらすシナリオ」）:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"ツールの作成時や Chromium の一部のプロトタイピング時に、crates.io ライブラリ\"\n\"の充実したエコシステムにアクセスできるのは素晴らしいことです。ほぼすべての事\"\n\"柄についてクレートが用意されており、大概の場合はとても快適に使用できます（コ\"\n\"マンドラインを解析するための `clap`、さまざまな形式との間でシリアル化または逆\"\n\"シリアル化を行うための `serde`、イテレータを操作するための `itertools` な\"\n\"ど）。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"`cargo` を使用すると、ライブラリを簡単に試すことができます（`Cargo.toml` に \"\n\"1 行追加してコードの記述を開始するだけです）。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"`perl` の普及に役立った CPAN や、`python` における `pip` と比較してみると良い\"\n\"かもしれません。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"主要な Rust ツール（ナイトリー、現在の安定版、古い安定版で動作する必要がある\"\n\"クレートをテストするときに、別の `rustc` バージョンに切り替えるのに使用する \"\n\"`rustup` など）だけでなく、サードパーティ ツールのエコシステム（Mozilla が提\"\n\"供するセキュリティ監査の容易化と共有のため `cargo vet`、ベンチマークを容易に\"\n\"実行する方法を提供する `criterion` クレートなど）により、開発エクスペリエンス\"\n\"は非常に快適となっています。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"`cargo` を使用すると、`cargo install --locked cargo-vet` を介してツールを簡単\"\n\"に追加できます。\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\"Chrome 拡張機能や VScode 拡張機能と比較してみるのも良いかもしれません。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"`cargo` が適切な選択となるような、幅広い汎用的なプロジェクトの例を以下に示し\"\n\"ます。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"意外かもしれませんが、業界ではコマンドライン ツールの作成に使用する言語とし\"\n\"て、Rust の人気が高まっています。ライブラリの幅とエルゴノミクスの点で Python \"\n\"に匹敵しつつも、豊富な型システムのおかげで堅牢で、（インタプリタ言語ではなく\"\n\"コンパイル言語なので）実行速度が高速です。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"Rust エコシステムに参加するには、Cargo などの標準の Rust ツールを使用する必要\"\n\"があります。外部からコントリビューションを受け、Chromium 以外（Bazel や \"\n\"Android / Soong のビルド環境など）での使用が推奨されるライブラリでは、Cargo \"\n\"を使用することをおすすめします。\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"`cargo` ベースの Chromium 関連プロジェクトの例:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient`（Google の他の部門でテストした結果、PR のパフォーマンス\"\n\"が向上）\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"`font-types` などのフォント化ライブラリ\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"`gnrt` ツール（このコースの後半で取り上げます）は、コマンドラインの解析には \"\n\"`clap` を使用し、構成ファイルには `toml` を使用します。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"免責条項: `cargo` を使用する唯一の理由は、Rust ツールチェーンのビルド中、\"\n\"Rust 標準ライブラリのビルドとブートストラップを行う際に `gn` を使用できないこ\"\n\"とでした。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` は、Chromiumプロジェクト内の `cargo` と `rustc` のコピーを使用\"\n\"します。`gnrt` はインターネットからダウンロードされたサードパーティ ライブラ\"\n\"リに依存しており、`run_gnrt.py` で `Cargo.lock` を介して `--locked` コンテン\"\n\"ツのみを許可することを `cargo` に要求します。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"以下のアイテムは、暗黙的または明示的に信頼されているとみなして構いません。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"LLVM ライブラリ、Clang コンパイラ、`rustc` ソース（GitHub から取得され、Rust \"\n\"コンパイラ チームによるレビューを受けたもの）、ブートストラップ用にダウンロー\"\n\"ドされたバイナリ Rust コンパイラに依存する `rustc`（Rust コンパイラ）\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup`（`rustup` は `rustc`と同じく https://github.com/rust-lang/ 組織の傘\"\n\"下で開発されていることを説明すると良いかもしれません）\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`、`rustfmt` など\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"さまざまな内部インフラストラクチャ（`rustc` をビルドする bot、事前構築済みの\"\n\"ツールチェーンを Chromium エンジニアに配布するためのシステムなど）\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"`cargo audit` や `cargo vet` などの Cargo ツール\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"`//third_party/rust` に取り込まれたRust ライブラリ（security@chromium.org が\"\n\"監査）\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\"その他の Rust ライブラリ（ニッチなものもあれば、非常に人気がありよく使用され\"\n\"るものもあります）\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Chromium の Rust ポリシー\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium では、Chromium の [エリア テクニカル リード](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:ATL_OWNERS) によって承認されている\"\n\"まれなケースを除き、ファースト パーティでのRust使用はまだ許可されていません。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"サードパーティ ライブラリに関する Chromium のポリシーについては、[こちら]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#rust) をご覧ください。Rust は、パフォーマンスやセ\"\n\"キュリティを高めるうえで最適な選択肢である場合を含め、さまざまな状況でサード\"\n\"パーティ ライブラリに使用することが許可されています。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"C / C++ API を直接公開する Rust ライブラリはほとんどないため、こうしたライブ\"\n\"ラリのほぼすべてで、少量のファースト パーティ グルーコードが必要になります。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": 既存の Chromium   :           :  \\\"Chromium Rust\\\"             \\\"既存の \"\n\"Rust\\\"  :\\n\"\n\": \\\"C++\\\"             :           :  \\\"ラッパー\\\"                  クレー\"\n\"ト       :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : 言語      : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : 境界      : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"特定のサードパーティ クレート用のファースト パーティ Rust グルーコードは通\"\n\"常、`third_party/rust/<crate>/<version>/wrapper` に置かれるべきです。\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"以上の理由から、本日のコースでは以下に焦点を当てます。\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"サードパーティの Rust ライブラリ（「クレート」）を導入する。\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"Chromium C++ からクレートを使用できるようにグルーコードを記述する。\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"このポリシーが変更された場合は、それに合わせてコースも変更されます。\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"ビルドのルール\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"Rust コードは通常、`cargo` を使用してビルドされます。Chromium は効率を高める\"\n\"ために `gn` と `ninja`を使用してビルドされますが、その静的ルールによって最大\"\n\"限の並列処理が可能になります。Rust も例外ではありません。\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"Chromium に Rust コードを追加する\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"Chromium の既存の `BUILD.gn` ファイルで、`rust_static_library` を宣言します。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"他の Rust ターゲットに `deps` を追加することもできます。後でこれを使用して、\"\n\"サードパーティのコードへの依存を設定します。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"クレートルートとソースの完全なリストの両方を指定する必要があります。\"\n\"`crate_root` は Rust コンパイラに渡されるファイルで、コンパイル単位のルート\"\n\"ファイル（通常は `lib.rs`）を表します。`sources` はすべてのソースファイルの完\"\n\"全なリストで、再ビルドが必要なタイミングを `ninja` が判断するために必要です。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"（Rust ではクレート全体がコンパイル単位であるため、`source_set`と呼べるような\"\n\"ものは存在しません。`static_library` が最小単位です）。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"受講者は、なぜ [Rust の静的ライブラリに対する gn の組み込みサポート](https://\"\n\"gn.googlesource.com/gn/+/main/docs/reference.md#func_static_library) ではな\"\n\"く、gn テンプレートを使用する必要があるのか疑問に思うかもしれません。その答え\"\n\"は、このテンプレートが CXX 相互運用、Rustのfeatures、単体テストをサポートして\"\n\"いるためです。その一部は後で使用します。\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"`unsafe` Rust コードの追加\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"安全でない Rust コードはデフォルトでは `rust_static_library` で禁止されてお\"\n\"り、コンパイルできません。安全でない Rust コードが必要な場合は、gn ターゲット\"\n\"に `allow_unsafe = true` を追加します（これが必要になる状況については、この\"\n\"コースの後半で説明します）。\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\"上記のターゲットをいくつかの Chromium C++ ターゲットの `deps` に追加するだけ\"\n\"です。\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# または source_set、static_library など\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Rust コードでは型が省略されているため、優れた IDE は C++ の場合よりもさらに有\"\n\"用です。Visual Studio Code は Chromium の Rust で適切に機能します。Visual \"\n\"Studio Code を使用するにあたり、以下の点を確認してください。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"VSCode に、以前の形式の Rust サポートではなく、`rust-analyzer` 拡張機能がある\"\n\"ことを確認\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"`gn gen out/Debug --export-rust-project`（またはあなたのプロジェクトにおける\"\n\"同様の出力ディレクトリ）\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"IDE に懐疑的な受講者に対しては、rust-analyzer のコード アノテーションと探索機\"\n\"能のデモを行うと良いかもしれません。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"以下の手順に沿ってデモを行うことをおすすめします（代わりに自分が最も精通して\"\n\"いる Chromium 関連の Rustコードを使用しても構いません）。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\"`components/qr_code_generator/qr_code_generator_ffi_glue.rs` を開きます。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"\\\\`qr_code_generator_ffi_glue.rs の `QrCode::new` 呼び出し（26 行目付近）に\"\n\"カーソルを合わせます。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"**show documentation** のデモを行います（一般的なバインディング: vscode = \"\n\"ctrl ki、vim/CoC = K）。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"**go to definition** のデモを行います（一般的なバインディング: vscode = F12、\"\n\"vim/CoC = g d）（これにより、`//third_party/rust/.../qr_code-.../src/lib.rs` \"\n\"に移動します）。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"**outline** のデモを行い、`QrCode::with_bits` メソッドに移動します（164 行目\"\n\"付近。アウトラインは VSCode のファイル エクスプローラ ペインにあります。一般\"\n\"的な vim/CoC バインディング = space o）。\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"**type annotations**のデモを行います（`QrCode::with_bits` メソッドにいくつか\"\n\"の適切な例があります）。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"`BUILD.gn` ファイルの編集後は `gn gen ... --export-rust-project` を再実行する\"\n\"必要があることを説明してください（このセッションの演習全体で数回行います）。\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"ビルドのルールに関する演習\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"Chromium のビルドで、以下を含む新しい Rust ターゲットを `//ui/base/BUILD.gn` \"\n\"に追加します。\"\n\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**重要**: ここでの `no_mangle` は Rust コンパイラでは安全でない型とみなされる\"\n\"ため、`gn` ターゲットで安全でないコードを許可する必要があります。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"この新しい Rust ターゲットを `//ui/base:base` の依存関係として追加します。こ\"\n\"の関数を `ui/base/resource/resource_bundle.cc` の先頭で宣言します（後ほど、バ\"\n\"インディング生成ツールでこれを自動化する方法を説明します）。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"この関数を `ui/base/resource/resource_bundle.cc` 内のどこかから呼び出します。\"\n\"おすすめは`ResourceBundle::MaybeMangleLocalizedString` の先頭から呼び出すこと\"\n\"です。Chromium をビルドして実行し、\\\"Hello from Rust!\\\" が何度も出力されてい\"\n\"ることを確認します。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"VSCode を使用している場合は、VSCode で適切に動作するように Rust を設定しま\"\n\"す。これは、後続の演習で役立ちます。設定が完了したら、`println!` で \\\"Go to \"\n\"definition\\\" を右クリックで利用できるようになります。\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"参考情報\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` gn テンプレート](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16) で使用できるオプ\"\n\"ション\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/\"\n\"reference/abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"[`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/abi.html#the-\"\n\"no_mangle-attribute) に関する情報\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"[`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.extern.html) に関する\"\n\"情報\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"gn の [`--export-rust-project`](https://gn.googlesource.com/gn/+/main/docs/\"\n\"reference.md#compilation-database) スイッチに関する情報\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[VSCode に rust-analyzer をインストールする方法](https://code.visualstudio.\"\n\"com/docs/languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"この例は、共通の相互運用言語である C に集約されているため、一般的ではありませ\"\n\"ん。C++ と Rust はどちらも、C ABI 関数をネイティブに宣言して呼び出すことがで\"\n\"きます。コースの後半で、C++ を Rust に直接接続します。\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might \"\n\"allow Rust to generate two functions with the same name, and Rust can no \"\n\"longer guarantee that the right one is called.\"\nmsgstr \"\"\n\"ここで `allow_unsafe = true` は必須です。`#[no_mangle]` により、Rust は同じ名\"\n\"前の関数を2つ生成するようになり、Rust は正しい関数が呼び出されることを保証で\"\n\"きなくなるためです。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"純粋な Rust 実行可能ファイルが必要な場合は、`rust_executable` gn テンプレート\"\n\"を使用して行うこともできます。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"Rust コミュニティは通常、テスト対象のコードと同じソースファイルに配置されたモ\"\n\"ジュールで単体テストを作成します。これは本コースの [前の部分](../testing.md) \"\n\"で説明しており、以下のようになります。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"Chromium では単体テストを別のソースファイルに配置しており、Rust でもこの方針\"\n\"を継続します。これにより、テストが常に検出可能になり、2 度目に（`test` 構成\"\n\"で）`.rs` ファイルを再ビルドする必要がなくなります。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\"その結果、Chromium で Rust コードをテストするための次の選択肢が提供されます。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"ネイティブ Rust テスト（例: `#[test]`）。`//third_party/rust` 以外では推奨さ\"\n\"れません。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"C++ で作成され、FFI 呼び出しを介して Rust を実行する `gtest` テスト。Rust \"\n\"コードが単なる薄いFFI レイヤであり、既存の単体テストで今後この機能が漏れなく\"\n\"カバーされる場合には十分です。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"Rust で作成され、公開 API を介してテスト対象のクレートを使用する `gtest` テス\"\n\"ト（必要に応じて `pub mod for_testing { ... }` を使用）。これについては、次の\"\n\"数枚のスライドで説明します。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"サードパーティ クレートのネイティブ Rust テストが最終的に Chromium bot によっ\"\n\"て実行される必要があることを説明します（このようなテストが必要になることは\"\n\"めったになく、サードパーティのクレートを追加または更新した後にのみ必要となり\"\n\"ます）。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"C++ の`gtest` と Rust の`gtest` をどのような場合に使うべきか、いくつかの例を\"\n\"使って説明するとよいでしょう。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR には、ファースト パーティの Rust レイヤの機能はほとんどありません（単なる\"\n\"シン FFI グルーです）。そのため、C++ と Rust の実装の両方をテストするには、既\"\n\"存の C++ 単体テストを使用します（テストをパラメータ化し、`ScopedFeatureList` \"\n\"を使用して Rust を有効化または無効化できるようになっています）。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"仮定の、または開発中の PNG 統合では、`libpng` では提供されているのに、`png` \"\n\"クレートでは欠落しているピクセル変換（RGBA => BGRA、ガンマ補正など）のメモリ\"\n\"セーフな実装が必要となる場合があります。このような機能の開発においては、別途\"\n\"Rustでテストを作成することが役立つ場合があります。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"[`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/main/\"\n\"testing/rust_gtest_interop/README.md) ライブラリを使用すると、次のことができ\"\n\"ます。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"Rust 関数を `gtest` テストケースとして使用する（`#[gtest(...)]` 属性を使\"\n\"用）。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"`expect_eq!` などのマクロを使用する（`assert_eq!`と似ていますが、アサーション\"\n\"が失敗してもパニックせず、テストを終了しません）。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"例\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"Rust の `gtest` テストをビルドする最も簡単な方法は、C++ で作成されたテストが\"\n\"すでに含まれている既存のテストバイナリに追加することです。次に例を示します。\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"別途、`static_library` で Rust テストを作成することも可能ですが、サポート ラ\"\n\"イブラリへの依存関係を手動で宣言する必要があります。\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"GN の `deps` に `:my_rust_lib` を追加した後も、`my_rust_lib_unittest.rs` か\"\n\"ら `my_rust_lib` をインポートして使用する方法について学ぶ必要があります。\"\n\"`my_rust_lib` には明示的な `crate_name` が指定されていないため、クレート名は\"\n\"ターゲットのフルパスと名前に基づいて生成されます。幸い、自動的にインポートさ\"\n\"れる `chromium` クレートから `chromium::import!` マクロを使用すれば、このよう\"\n\"な扱いにくい名前の使用を回避できます。\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"内部で、マクロは次のように展開されます。\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"詳しくは、`chromium::import` マクロの [ドキュメント コメント](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) をご覧ください。\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"`rust_static_library` は、`crate_name` プロパティによる明示的な名前の指定をサ\"\n\"ポートしていますが、クレート名はグローバルに一意である必要があるため、これは\"\n\"推奨されません。crates.io はクレート名の一意性を保証しているため、\"\n\"`cargo_crate` GN ターゲット（後述の `gnrt` ツールで生成）は短いクレート名を使\"\n\"用します。\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"練習問題\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"新たな演習の時間です！\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"Chromium ビルドで以下を行ってください。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"`hello_from_rust` の横にテスト可能な関数を追加します。たとえば、引数として受\"\n\"け取った 2 つの整数を追加する、n 番目のフィボナッチ数を計算する、スライス内の\"\n\"整数を合計する、などが考えられます。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\"新しい関数のテストを含む別個の `..._unittest.rs` ファイルを追加します。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"新しいテストを `BUILD.gn` に追加します。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"テストをビルドして実行し、新しいテストが機能することを確認します。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"Rust コミュニティには C++ と Rust の相互運用のためのオプションが複数用意され\"\n\"ており、絶えず新しいツールが開発されています。現在のところ、Chromium では \"\n\"CXX というツールを使用しています。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"言語境界全体をインターフェース定義言語（Rust によく似ています）で記述すると、\"\n\"CXX ツールが Rust と C++ の両方で関数と型の宣言を生成します。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"CXX の詳細な使用例については、[CXX チュートリアル](https://cxx.rs/tutorial.\"\n\"html) をご覧ください。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"図を見ながら話しましょう。裏で行われる処理は以前とまったく同じであり、このプ\"\n\"ロセスを自動化すると次のようなメリットがあることを説明します。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"このツールは、C++ 側と Rust 側が一致することを保証します（たとえば、`#[cxx::\"\n\"bridge]` が実際の C++ または Rust の定義と一致しない場合、コンパイル エラーが\"\n\"発生しますが、同期されていない手動バインディングを使用すると、未定義の動作が\"\n\"発生します）。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"このツールは、C 以外の機能に対する FFI サンク（小さな C-ABI 互換のフリー関\"\n\"数）の生成を自動化します（Rust または C++ メソッドへの FFI 呼び出しの有効化な\"\n\"ど。手動バインディングでは、このようなトップレベルのフリー関数を手動で作成す\"\n\"る必要があります）。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"ツールとライブラリは、次のような一連の主要な型を処理できます。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` は、特定の ABI やメモリ レイアウトを保証するものではありませんが、FFI \"\n\"の境界を超えて渡すことができます。手動バインディングでは、`std::span<T>` / \"\n\"`&[T]` を手動で分離し、ポインタと長さから再構築する必要があります。言語ごとに\"\n\"空のスライスの表現方法が若干異なるため、エラーが発生しやすくなります。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"`std::unique_ptr<T>`、`std::shared_ptr<T>`、`Box` などのスマート ポインタは、\"\n\"ネイティブにサポートされています。手動バインディングでは、C-ABI 互換の未加工\"\n\"ポインタを渡す必要があるため、ライフタイムとメモリ安全性に関するリスクが高ま\"\n\"ります。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"`rust::String` 型と `CxxString` 型は、言語間の文字列表現の違いを理解し、維持\"\n\"します（たとえば、`rust::String::lossy` は、非 UTF8 の入力から Rust 文字列を\"\n\"作成できます。また、`rust::String::c_str` は文字列を NUL 終端できます）。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"CXX では、C++ と Rust の境界全体を `.rs` ソースコード内の `cxx::bridge` モ\"\n\"ジュールで宣言する必要があります。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// Rust の型と関数の定義をここに記述します。\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"以下を説明します。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"これは通常の Rust `mod` のように見えますが、`#[cxx::bridge]` プロシージャル \"\n\"マクロはこれに対して複雑な処理を行います。生成されるコードはもっと洗練されて\"\n\"いますが、それでもコードには `ffi` という `mod` が作成されます。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Rust での C++ の `std::unique_ptr` のネイティブ サポート\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Rust での C++ の `std::unique_ptr` のネイティブ サポート\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"C++ から Rust および Rust の型への呼び出し（上部）\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"Rust から C++ および C++ の型への呼び出し（下部）\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**よくある誤解**: Rust で C++ ヘッダーが解析されているように見えますが、これ\"\n\"は誤解です。このヘッダーは Rust では解釈されず、C++ コンパイラのために生成さ\"\n\"れた C++ コードに `#include` されているだけです。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"CXX を使用するときに最も役立つページは、[型リファレンス](https://cxx.rs/\"\n\"bindings.html) です。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX は基本的に、次のようなケースに適しています。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"Rust-C++ インターフェースが十分にシンプルで、すべてを宣言できる場合。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"すでに CXX でネイティブにサポートされている型のみを使用している場合（例: \"\n\"`std::unique_ptr`、`std::string`、`&[u8]`）。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"Rust の `Option` 型がサポートされていないなど、CXX には多くの制限があります。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"こうした制限により、Chromium では 任意の Rust と C++ の相互運用は行われず、\"\n\"Rustの使用は十分に独立したコードに限定されています。Chromium での Rust のユー\"\n\"スケースを検討する際は、まず、言語境界の CXX バインディングの下書きを作成し\"\n\"て、シンプルに見えるかどうかを確認することをおすすめします。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\"また、CXX のその他の厄介な点を説明する必要があります。次に例を示します。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"エラー処理が C++ 例外に基づいて行われる（次のスライドを参照）。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"関数ポインタが使いにくい。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"CXX の [`Result<T,E>` のサポート](https://cxx.rs/binding/result.html) は、C+\"\n\"+ 例外に依存しているため、Chromium では使用できません。以下の代替手段がありま\"\n\"す。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"`Result<T, E>` の `T` の部分:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"out パラメータを介して返すことができます（例: `&mut T`）。そのためには、`T` \"\n\"を FFI の境界を越えて渡せる必要があります。たとえば、`T` には以下を指定する必\"\n\"要があります。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"プリミティブ型（`u32`、`usize` など）\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"(`Box<T>` とは異なり)適切なデフォルト値を持つ`cxx` でネイティブにサポートされ\"\n\"ている型（`UniquePtr<T>` など）。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"Rust 側で保持し、参照を介して公開できます。これは、`T` が Rust 型の場合に必要\"\n\"になることがあります。Rust 型は FFI の境界を超えて渡すことができず、\"\n\"`UniquePtr<T>` に格納することもできません。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"`Result<T, E>` の `E` の部分:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"ブール値として返すことができます（たとえば、`true` は成功、`false` は失敗を表\"\n\"します）。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"理論上はエラーの詳細を保持できますが、これまでは実際に必要になることはありま\"\n\"せんでした。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"エラー処理\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"QR コード生成ツールは、ブール値が成功または失敗を伝達し、成功の結果を FFI の\"\n\"境界を超えて受け渡すことができる [一例](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) です。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"受講者は `out_qr_size` 出力のセマンティクスに関心を持っている可能性がありま\"\n\"す。これはベクターのサイズではなく、QR コードのサイズです（つまり、この情報は\"\n\"冗長であり、ベクターのサイズの平方根に相当します）。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"Rust 関数を呼び出す前に `out_qr_size` を初期化することの重要性を説明しましょ\"\n\"う。初期化されていないメモリを指す Rust 参照を作成すると、未定義の動作となり\"\n\"ます（そのようなメモリを逆参照する操作のみが UB になるC++ とは異なります）。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"`Pin` について受講者から尋ねられた場合は、CXX が C++ データへの可変参照のため\"\n\"に `Pin` を必要とする理由を説明します。つまり、C++ のデータには自己参照ポイン\"\n\"タが含まれている可能性があるため、Rust のデータのように移動することができませ\"\n\"ん。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"エラー処理\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"PNG デコーダのプロトタイプは、成功した結果を FFI の境界を越えて渡せない場合に\"\n\"何ができるかを示しています。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// これは `Result<PngReader<'a>,()>` と同等の FFI 対応の結果を\\n\"\n\"        /// 返します。\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// `crate::png::ResultOfPngReader` 型の C++ バインディング\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// `crate::png::PngReader` 型の C++ バインディング\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` と `ResultOfPngReader`は Rust 型です。これらの型のオブジェクト\"\n\"は、`Box<T>` を介さずに FFI 境界を越えることはできません。CXX では Rust オブ\"\n\"ジェクトを値で格納できないため、`out_parameter: &mut PngReader` と書くことは\"\n\"できません。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"この例は、CXX が任意のジェネリクスやテンプレートをサポートしていなくても、手\"\n\"動で非ジェネリック型に特化 / 単相化することで、FFI 境界を越えて渡せることを示\"\n\"しています。この例では、`ResultOfPngReader` は`Result<T, E>` の適切なメソッド\"\n\"（`is_err`、`unwrap`、`as_mut` など）に渡される非ジェネリック型です。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"Chromium で cxx を使用する\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"Chromium では、Rust を使用するリーフノードごとに独立した `#[cxx::bridge] \"\n\"mod` を定義します。通常は、`rust_static_library` ごとに 1 つずつになります。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # すべてのソースファイルではなく、#[cxx::bridge] を含むファイルのリスト\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"上記のコードを、`crate_root` や `sources`と並んで、既存の \"\n\"`rust_static_library` ターゲットに追加するだけです。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\"C++ ヘッダーは適切な場所で生成されるため、次のようにインクルードできます。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"`//base` には、Chromium C++ 型から CXX Rust 型（およびその逆方向）への変換を\"\n\"行うためのユーティリティ関数がいくつかあります（例: [`SpanToRustSlice`]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:base/containers/\"\n\"span_rust.h;l=21)）。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"受講者から、`allow_unsafe = true` がなぜここでも必要なのかを尋ねられる可能性\"\n\"があります。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"大まかに答えると、C/C++ コードは通常の Rust 標準では「安全」ではありません。\"\n\"Rust から C/C++ に行ったり来たりすると、メモリに対して任意の処理が行われ、\"\n\"Rust 独自のデータ レイアウトの安全性が損なわれる可能性があります。C/C++ の相\"\n\"互運用で `unsafe` キーワードが多すぎると、`unsafe`に対する注目度が薄れるの\"\n\"で、これには [賛否両論があります](https://steveklabnik.com/writing/the-cxx-\"\n\"debate)。ただし厳密には、外部コードを Rust バイナリに取り込むと、Rust の観点\"\n\"からは想定していない動作が発生する可能性があります。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"具体的な答えは、[このページ](../interoperability-with-cpp.md) の上部の図にあ\"\n\"ります。裏では、CXX は Rust の `unsafe` 関数と `extern \\\"C\\\"` 関数を生成しま\"\n\"す。これは前のセクションで手動で行ったのとまったく同じです。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"演習: C++との相互運用性\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"パート 1\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"先ほど作成した Rust ファイルに、C++ から呼び出す単一の関数を示す `#[cxx::\"\n\"bridge]` を追加します。これは `hello_from_rust` という関数で、パラメータを受\"\n\"け取らず、値も返しません。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[unsafe(no_mangle)]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"前の `hello_from_rust` 関数を変更して `extern \\\"C\\\"` と `#[no_mangle]` を削除\"\n\"します。これで標準の Rust 関数になります。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"`gn` ターゲットを変更して、これらのバインディングをビルドします。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"C++ コードで、`hello_from_rust` の前方宣言を削除し、代わりに生成されたヘッ\"\n\"ダー ファイルをインクルードします。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"ビルドして実行します。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"パート 2\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"CXX を少し使ってみて、Chromium における Rust の柔軟性について理解を深めましょ\"\n\"う。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"以下を試してください。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"Rust から C++ を呼び出します。これには以下が必要です。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"`cxx::bridge` から `include!` できる追加のヘッダー ファイル。その新しいヘッ\"\n\"ダー ファイルで C++ 関数を宣言する必要があります。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"このような関数を呼び出す `unsafe` ブロック。または [こちら](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions) に記載されているとおり、\"\n\"`#[cxx::bridge]` 内で `unsafe` キーワードを指定する必要があります。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"`#include \\\"third_party/rust/cxx/v1/crate/include/cxx.h\\\"` も必要になるかもし\"\n\"れません。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"C++ から Rust に C++ 文字列を渡します。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"C++ オブジェクトへの参照を Rust に渡します。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"意図的に`#[cxx::bridge]`と一致しないようにRust 関数のシグネチャを変更し、表示\"\n\"されるエラーに慣れるようにします。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"意図的に`#[cxx::bridge]`と一致しないようにC++ 関数のシグネチャを変更し、表示\"\n\"されるエラーに慣れるようにします。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"なんらかの型の `std::unique_ptr` を C++ から Rust に渡して、Rust がいくつか\"\n\"の C++ オブジェクトを所有できるようにします。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"Rust オブジェクトを作成して C++ に渡して、C++ がそれを所有できるようにします\"\n\"（ヒント: `Box` が必要です）。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"C++ 型でいくつかのメソッドを宣言し、Rust から呼び出します。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"Rust 型に対していくつかのメソッドを宣言し、C++ から呼び出します。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"パート 3\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"CXX の相互運用性の長所と制限事項について理解したところで、インターフェースが\"\n\"非常にシンプルな、Chromium での Rust のユースケースをいくつか考えてみましょ\"\n\"う。このインターフェースをどのように定義すればよいか考えてみましょう。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"[`cxx` バインディング リファレンス](https://cxx.rs/bindings.html)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` gn テンプレート](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"次のような質問が寄せられる可能性があります。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"X と Y の両方が関数型である場合に、型 X の変数を型 Y で初期化すると問題が発生\"\n\"します。これは、C++ 関数が `cxx::bridge` 内の宣言と完全に一致しないためです。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"C++ 参照を Rust 参照に自由に変換できるようですが、UB のリスクはないでしょう\"\n\"か？CXX の不透明型の場合、サイズがゼロであるため、そのリスクはありません。\"\n\"CXX のトリビアル型では UB が発生する可能性がありますが、CXX の設計上、そのよ\"\n\"うな例を作成するのは非常に困難です。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Rust ライブラリは「クレート」と呼ばれ、[crates.io](https://crates.io) にあり\"\n\"ます。Rust クレートを互いに依存させるのは非常に簡単であり、実際にそのように\"\n\"なっています\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"プロパティ\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"ライブラリ\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Rustクレート\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"ビルドシステム\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"多数\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"一貫して `Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"一般的なライブラリ サイズ\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"やや大\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"小\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"推移的依存関係\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"少\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"Chromium のエンジニアにとって、クレートには長所と短所があります。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"すべてのクレートが共通のビルドシステムを使用しているため、Chromium への取り込\"\n\"みを自動化できます。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"しかし、クレートには通常、推移的依存関係があるため、複数のライブラリを取り込\"\n\"むことが必要になる可能性があります。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"議論する内容は次のとおりです。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"Chromium ソースコード ツリーにクレートを配置する方法\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"クレート用の `gn` ビルドルールを作成する方法\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"クレートのソースコードの十分な安全性を監査する方法。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \" `Cargo.toml` ファイルによりクレートを追加する方法\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium には、一元管理される直接的なクレート依存関係が 1 セットあります。こ\"\n\"れらは単一の [`Cargo.toml`](https://source.chromium.org/chromium/chromium/\"\n\"src/+/main:third_party/rust/chromium_crates_io/Cargo.toml) で管理されます。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"他の `Cargo.toml` と同様に、[依存関係の詳細](https://doc.rust-lang.org/cargo/\"\n\"reference/specifying-dependencies.html) を指定できます。通常は、クレートで有\"\n\"効にする `features` を指定します。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"Chromium にクレートを追加する際は、多くの場合、 `gnrt_config.toml`という追加\"\n\"ファイルに情報を指定する必要があります。これについては後で説明します。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"`Cargo.toml` のほかに、[`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml) があります。これには、クレートを扱うための Chromium 固有の拡張機能が含\"\n\"まれています。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"新しいクレートを追加する場合は、少なくとも次のいずれかの `group` を指定する必\"\n\"要があります。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"次に例を示します。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"クレートのソースコードのレイアウトによっては、このファイルを使用して \"\n\"`LICENSE` ファイルを見つける場所も指定する必要があります。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"後ほど、いくつかの問題を解決するためにこのファイルに指定する必要がある設定に\"\n\"ついて取り扱います。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"`gnrt` というツールは、クレートのダウンロード方法と `BUILD.gn` ルールの生成方\"\n\"法を把握しています。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"まず、必要なクレートを次のようにダウンロードします。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"`gnrt` ツールは Chromium のソースコードの一部ですが、このコマンドを実行する\"\n\"と、`crates.io` から依存関係をダウンロードして実行します。これに関するセキュ\"\n\"リティ上の決定については、[前のセクション](../cargo.md) をご覧ください。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"この `vendor` コマンドにより、以下がダウンロードされる場合があります。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"あなたのクレート\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"直接的および推移的依存関係\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\" `cargo` によって指示される、Chromium で必要となるクレートの完全セットを得る\"\n\"ための他のクレートの新しいバージョン。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium では、一部のクレートに対するパッチが `//third_party/rust/\"\n\"chromium_crates_io/patches` に保存されています。これらは自動的に再適用されま\"\n\"すが、パッチ適用が失敗した場合は、手動による解決が必要になる場合があります。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\"クレートをダウンロードしたら、以下のように `BUILD.gn` ファイルを作成します。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"`git status` を実行し、以下を確認します。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"`third_party/rust/chromium_crates_io/vendor` に 1 つ以上の新しいクレート ソー\"\n\"スコードがあること\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"`third_party/rust/<crate name>/v<major semver version>` に 1 つ以上の新しい \"\n\"`BUILD.gn` があること\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"適切な `README.chromium` があること\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)（ワー\"\n\"クスペース）\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"特に `third_party/rust` 以下に生成されるものをよく確認してください。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"semver について、特に Chromium では互換性のないクレートのバージョンが複数許可\"\n\"されることを説明しておきましょう。これは推奨されませんが、Cargo エコシステム\"\n\"で必要になることがあります。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"ビルドが失敗した場合、`build.rs`（ビルド時に任意の処理を行うプログラム）が原\"\n\"因である可能性があります。これは、ビルドの並列性と再現性を最大化するために静\"\n\"的で決定的なビルドルールを目指す `gn` と `ninja` の設計とは、基本的に矛盾して\"\n\"います。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"一部の `build.rs` アクションは自動的にサポートされますが、他のアクションには\"\n\"対応が必要です。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"ビルド スクリプトの効果\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"gn テンプレートによるサポート\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"必要な作業\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"rustc のバージョンを確認して機能を有効または無効にする\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"はい\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"なし\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"プラットフォームまたは CPU を確認して機能を有効または無効にする\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"コードの生成\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"あり - `gnrt_config.toml` で指定する\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"C/C++ のビルド\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"いいえ\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"パッチを適用する\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"その他の任意のアクション\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"幸い、ほとんどのクレートにはビルド スクリプトが含まれておらず、ほとんどのビル\"\n\"ド スクリプトは上位 2 つのアクションのみを実行します。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"`ninja`がファイルを見つけられないというメッセージを表示する場合は、`build.\"\n\"rs` がソースコード ファイルを作成しているかどうかを確認します。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"もしファイルが作成されるようになっていたら、[`gnrt_config.toml`](../\"\n\"configuring-gnrt-config-toml.md) を変更して、クレートに `build-script-\"\n\"outputs` を追加します。これが推移的依存関係（Chromium コードが直接依存すべき\"\n\"でない依存関係）の場合は、`allow-first-party-usage=false` も追加します。この\"\n\"ファイルには、すでにいくつかの例が含まれています。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"次に、[`gnrt.py -- gen`](../generating-gn-build-rules.md) を再実行して \"\n\"`BUILD.gn` ファイルを再生成し、この特定の出力ファイルが後続のビルドステップで\"\n\"入力されることを ninja に教えます。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"一部のクレートは、[`cc`](https://crates.io/crates/cc) クレートを使用して、\"\n\"C / C++ ライブラリのビルドとリンクを行います。他のクレートは、ビルド スクリプ\"\n\"ト内で [`bindgen`](https://crates.io/crates/bindgen) を使用して C / C++ を解\"\n\"析します。これらのアクションは、Chromium のコンテキストではサポートできませ\"\n\"ん。Chromiumの gn、ninja、LLVM ビルドシステムは、ビルド アクション間の関係を\"\n\"非常に具体的に表現するためです。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"したがって、次のようなオプションがあります。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"これらのクレートを使用しない\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"クレートにパッチを適用する\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"パッチは `third_party/rust/chromium_crates_io/patches/<crate>` に保存する必要\"\n\"があります。たとえば、[`cxx` クレートに対するパッチ](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/\"\n\"cxx/) をご覧ください。また、パッチはクレートがアップグレードされるたびに \"\n\"`gnrt` によって自動的に適用されます。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"サードパーティ クレートを追加してビルドルールを生成したら、クレートへの依存を\"\n\"簡単に設定できます。`rust_static_library` ターゲットを見つけて、クレート内の \"\n\"`:lib` ターゲットに `dep` を追加します。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"具体的には次のようにします。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +------------------------------+\\n\"\n\"\\\"//third_party/rust\\\" | クレート名 | \\\"/v\\\" | semver のメジャー バージョン \"\n\"| \\\":lib\\\"\\n\"\n\"                     +------------+      +------------------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"サードパーティ クレートの監査\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"新しいライブラリを追加する場合、Chromium の標準の [ポリシー](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review) が適用されますが、当然ながらセキュリティ審査の対象にも\"\n\"なります。1 つのクレートだけでなく推移的依存関係も取り込む場合、審査すべき\"\n\"コードが多数存在することがあります。その一方で、安全な Rust コードの取り込み\"\n\"に関しては、悪い副作用は限定的となります。クレートの審査はどのように行われる\"\n\"べきでしょうか。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"Chromium は今後 [cargo vet](https://mozilla.github.io/cargo-vet/) を中心とし\"\n\"たプロセスに移行されていく予定ですが、\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\"それまでの間、新しいクレートが追加されるたびに、以下のチェックを行います。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"各クレートが使用されている理由と、クレート同士の関係を理解します。各クレート\"\n\"のビルドシステムに`build.rs` または手続き型マクロが含まれている場合は、その目\"\n\"的を調べます。また、Chromium の通常のビルド方法と互換性があるかどうかも確認し\"\n\"ます。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"各クレートが十分にメンテナンスされているか確認します。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"`cd third-party/rust/chromium_crates_io; cargo audit` を使用して既知の脆弱性\"\n\"をチェックします（最初に `cargo install cargo-audit` を実行する必要があります\"\n\"が、皮肉なことに、これによってインターネットから多くの依存関係をダウンロード\"\n\"することになります [2](../cargo.md)）。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"`unsafe` なコードが [Rule of Two](https://chromium.googlesource.com/chromium/\"\n\"src/+/main/docs/security/rule-of-2.md#unsafe-code-in-safe-languages) を満たし\"\n\"ていることを確認します。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"`fs`および`net`のAPI が使用されているかどうかを確認します。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"悪意を持って不正に挿入された可能性のある部分がないか探すのに十分なレベルで\"\n\"コードを読みます（多くの場合、コードが多すぎて完璧にチェックすることはできま\"\n\"せん）。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"これらはガイドラインにすぎません。`security@chromium.org` の審査担当者と協力\"\n\"して、自信を持ってクレートを使用するための適切な方法を見つけてください。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"クレートを Chromium ソースコードにチェックインする\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` を実行すると、以下を確認できます。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"`//third_party/rust/chromium_crates_io` にあるクレートコード\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"`//third_party/rust/<crate>/<version>` にあるメタデータ（`BUILD.gn` と \"\n\"`README.chromium`）\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"後者の場所に `OWNERS` ファイルも追加してください。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"これらすべてを、`Cargo.toml` および `gnrt_config.toml` の変更とともに \"\n\"Chromium リポジトリに追加する必要があります。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**重要**: `git add -f` を使用する必要があります。そうしないと、`.gitignore` \"\n\"ファイルによって一部のファイルがスキップされる可能性があるためです。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"その際、インクルーシブでない表現が原因で presubmit チェックが失敗することがあ\"\n\"ります。これは、Rust のクレートデータには Git ブランチの名前が含まれている傾\"\n\"向があり、多くのプロジェクトで依然としてインクルーシブでない表現が使用されて\"\n\"いるためです。そのため、以下を実行する必要があります。\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"サードパーティの Chromium 依存関係の所有者は、[セキュリティに関する修正を行っ\"\n\"て依存関係を最新の状態に保つことが求められます](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#add-\"\n\"owners)。これはまもなく自動化されることが期待されていますが、現状は他のサード\"\n\"パーティの依存関係の場合と同様に、デベロッパーがその責任を負います。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"Chromium に [uwuify](https://crates.io/crates/uwuify) を追加し、クレートの \"\n\"[デフォルトの機能](https://doc.rust-lang.org/cargo/reference/features.\"\n\"html#the-default-feature) を無効にします。クレートは Chromium の公開板で使用\"\n\"されますが、信頼できない入力の処理には使用されないと仮定してください。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"（次の演習で Chromium の uwuify を使用しますが、ここで行っても構いません。ま\"\n\"たは、`uwuify` を使用する新しい [`rust_executable` ターゲット](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/rust_executable.\"\n\"gni) を作成することもできます）。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"受講者は多数の推移的依存関係をダウンロードする必要があります。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"必要なクレートは次のとおりです。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"`instant`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"受講者が上記以外のクレートをダウンロードしている場合は、デフォルトの機能を無\"\n\"効にするのを忘れている可能性があります。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"このクレートに協力してくれた [Daniel Liu](https://github.com/Daniel-Liu-\"\n\"c0deb0t) に感謝します。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"まとめ --- 演習\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"この演習では、Chromium の新しい機能を追加しながら、これまで学んだことをまとめ\"\n\"ます。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"プロダクト マネジメント部門からのブリーフィング\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"人里離れた熱帯雨林に生息するピクシー（妖精の一種）の村が発見されました。ピク\"\n\"シー向けの Chromium をできるだけ早く提供することが重要です。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"要件は、Chromium のすべての UI 文字列をピクシーの言語に翻訳することです。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"正式な翻訳を行っている時間はありませんが、幸いにもピクシーの言語は英語に非常\"\n\"に近く、その翻訳を行う Rust クレートがあることがわかりました。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"実は、[前の演習でそのクレートをインポートしています](https://crates.io/\"\n\"crates/uwuify)。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"（言うまでもなく、Chrome を実際に翻訳するには細心の注意と努力が必要ですので、\"\n\"これは公開しないでください）。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"手順\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"表示前にすべての文字列を翻訳するように `ResourceBundle::\"\n\"MaybeMangleLocalizedString` を変更します。Chromium のこの特別なビルドでは、\"\n\"`mangle_localized_strings_` の設定に関係なく、常にこのようにします。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"ここまでの演習をすべて正しく終わらせれていれば、これでピクシー向けの Chrome \"\n\"が完成しているはずです。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 と UTF8 について、受講者は Rust 文字列が常に UTF8 であることに注意する\"\n\"必要があります。おそらく、C++ 側で `base::UTF16ToUTF8` を使用して変換、逆変換\"\n\"する方がよいと判断するでしょう。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"Rust 側で変換を行う場合は、[`String::from_utf16`](https://doc.rust-lang.org/\"\n\"std/string/struct.String.html#method.from_utf16)の利用、エラー処理、[多くの \"\n\"u16s を転送可能な CXX でサポートされている型](https://cxx.rs/binding/slice.\"\n\"html) はどれかを検討する必要があります。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"受講者はいくつかの異なる方法で C++ と Rust の境界を設計できます。たとえば、文\"\n\"字列を値で取得して返す、または文字列への可変参照を取得するなどです。可変参照\"\n\"が使用されている場合は、おそらく CXX は [`Pin`](https://doc.rust-lang.org/\"\n\"std/pin/) を使用する必要がある旨のメッセージを表示します。`Pin` の機能を説明\"\n\"し、C++ データへの可変参照のために CXX で `Pin` が必要になる理由を説明する必\"\n\"要があるかもしれません。答えは、C++ データには自己参照ポインタが含まれている\"\n\"可能性があるため、Rust データのように移動できないためです。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"`ResourceBundle::MaybeMangleLocalizedString` を含む C++ ターゲットは、\"\n\"`rust_static_library` ターゲットに依存する必要があります。受講者はすでにこれ\"\n\"を行っているはずです。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"`rust_static_library` ターゲットは `//third_party/rust/uwuify/v0_2:lib` に依\"\n\"存する必要があります。\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"Chromium の演習の解答については、[こちらの CL シリーズ](https://chromium-\"\n\"review.googlesource.com/c/chromium/src/+/5096560) をご覧ください。\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"ベアメタルRustへようこそ\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"こちらはベアメタルRustに関する独立した１日コースです。対象としているのは、\"\n\"Rustの基本的な部分に関しては習得済みな人で（例えば、本講座で）、Cなどの他の言\"\n\"語でベアメタル開発の経験があると理想的です。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"今日、取り扱うのは、ベアメタルRustです。すなわち、OSなしでRustのコードを実行\"\n\"します。この章は以下のような構成になります:\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"`no_std` Rustとは?\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"マイクロコントローラ向けのファームウェア開発。\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"アプリケーションプロセッサ向けのブートローダ／カーネル開発。\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"ベアメタルRust開発に役立つクレートの紹介。\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"マイクロコントローラ向けの学習では[BBC micro:bit](https://microbit.org/) v2を\"\n\"題材として使います。これは、Nordic nRF51822マイコンベースの[開発ボード]\"\n\"(https://tech.microbit.org/hardware/) で、いくつかのLEDやボタンスイッチ、I2C\"\n\"接続の加速度センサやコンパス、そしてオンボードSWDデバッガを搭載しています。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"まずはじめに、後ほど必要となるいくつかのツールをインストールします。gLinuxま\"\n\"たはDebianの場合は以下のようになります:\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"さらに、`plugdev`グループにmicro:bitプログラム用デバイスへのアクセスを付与し\"\n\"ます:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"MacOSの場合は以下のようになります:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slice、`&str`、`CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8` など\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`、`Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`、`Debug`、`write!` など\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`、`assert_eq!` など\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` とポインターに関する全ての一般的な関数\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` と `async` / `await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`、`AtomicBool`、`AtomicPtr`、`AtomicU32` など\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`、`Cow`、`Arc`、`Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`、`BinaryHeap`、`BtreeMap`、`LinkedList`、`VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`、`CString`、`format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`、`Condvar`、`Barrier`、`Once`、`RwLock`、`mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File`、残りの `fs`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`、`Read`、`Write`、`Stdin`、`Stdout`、残りの `io`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`、`OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`、`Child`、`ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`、`sleep`、残りの `thread`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`、`Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap`はRNGに依存します。\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std`は`core`と`alloc`の両方を再エクスポートします。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"最小限の`no_std`プログラム\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"このコードは空のバイナリにコンパイルされます。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\"パニックハンドラは`std`が提供するので、それを使わない場合は自分で提供する必要\"\n\"があります。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\"あるいは、`panic-halt`のような別のクレートが提供するパニックハンドラを利用す\"\n\"ることもできます。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"ターゲットによっては、`eh_personality`に関するエラーを回避するために`panic = \"\n\"\\\"abort\\\"`を指定してコンパイルする必要があります。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"なお、`main`のようなプログラムの規定エントリポイントはないので、自分でエント\"\n\"リポイントを定義する必要があります。通常、Rustコードを実行できるようにするた\"\n\"めには、リンカスクリプトとある程度のアセンブリコードを必要とします。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"`alloc`を使うためには、[グローバル（ヒープ）アロケータ](https://doc.rust-\"\n\"lang.org/stable/std/alloc/trait.GlobalAlloc.html)を実装しなければなりません。\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// `HEAP` はここでのみ使用され、`entry` は一度だけ呼び出されるため、安全で\"\n\"す。\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// アロケーターにメモリを割り当てます。\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\"// これで、ヒープ割り当てを必要とする処理を実行できるようになりました。\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\\\"A string\\\"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator`はサードパーティのクレートで、単純なバディシステムア\"\n\"ロケータです。その他にも利用できるクレートはありますし、自前で実装したり、別\"\n\"のアロケータに自分のコードをフックすることも可能です。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"パラメータ定数`LockedHeap`はアロケータの最大オーダを示します。この場合、\"\n\"2\\\\*\\\\*32バイトの領域を確保することが可能です。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"もし依存関係にあるクレートが`alloc`に依存する場合、必ずバイナリファイルあたり\"\n\"一つだけのグローバルなアロケータが存在するようにしなければなりません。通常、\"\n\"これはトップレベルのバイナリを生成するクレートにより制御されます。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"`extern crate panic_halt as _` という部分は、`panic_halt`クレートを確実にリン\"\n\"クし、パニックハンドラを利用可能にするために必要です。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\"この例で示したコードはビルドできますが、エントリポイントがないので実行するこ\"\n\"とはできません。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"`cortex_m_rt`クレートはCortex Mマイクロコントローラ向けのリセットハンドラ（と\"\n\"その他もろもろ）を提供します。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"次は、抽象度の低いレベルから順に周辺I/Oにアクセスする方法について見ていきま\"\n\"す。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"リセットハンドラはリターンしないので、`cortex_m_rt::entry`マクロは対象関数が\"\n\"`fn() -> !`という型であることを要求します。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"この例は`cargo embed --bin minimal`により実行します\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"大半のマイクロコントローラはメモリマップドRIO空間を通して周辺I/Oにアクセスし\"\n\"ます。micro:bitのLEDを光らせてみましょう:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// GPIO 0 番ポートの周辺アドレス\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// GPIO 周辺機器オフセット\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// PIN_CNF フィールド\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\"// GPIO 0 の 21 番ピンと 28 番ピンをプッシュプル出力として設定します。\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// ポインタは有効な周辺機器制御レジスタを指しており、\\n\"\n\"    // エイリアスが存在しないため、安全です。\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// 28 番ピンをロー、21 番ピンをハイに設定して LED をオンにします。\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"GPIO 0のピン21はマトリクスLEDの一番目の列に、ピン28は最初の行に接続されていま\"\n\"す。\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"例の実行方法:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"周辺I/Oへアクセスするためのクレート（PACs）\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) は[CMSIS-SVD](https://www.\"\n\"keil.com/pack/doc/CMSIS/SVD/html/index.html) ファイルから、メモリマップされた\"\n\"周辺I/Oに対するほぼ安全（mostly-safe）なRustラッパーを生成します。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"SVD (System View Description)ファイルはXMLファイルでデバイスのメモリマップを\"\n\"記述したものであり、通常シリコンベンダにより提供されます。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"周辺I/Oごとに、レジスタ、フィールドと値、名前、説明、アドレスなどにより構成さ\"\n\"れています。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"SVDファイルにはよく誤りがあり、また情報が不足していることも多いので、様々なプ\"\n\"ロジェクトがそれを修正・追加し、クレートとして公開しています。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt`はベクタテーブルも提供します。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"もし`cargo install cargo-binutils`を実行していれば、`cargo objdump --bin pac \"\n\"-- -d --no-show-raw-insn`を実行することにより生成されたバイナリの中身を見るこ\"\n\"とができます。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"HALクレート\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"多くのマイクロコントローラに対する[HALクレート](https://github.com/rust-\"\n\"embedded/awesome-embedded-rust#hal-implementation-crates)が様々な周辺I/Oに対\"\n\"するラッパーを提供しています。これらのクレートの多くは[`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal)が定義するトレイトを実装しています。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// GPIO 0 番ポートの HAL ラッパーを作成します。\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low`と`set_high`は`embedded_hal`の`OutputPin`トレイトの定義するメソッド\"\n\"です。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Cortex-MやRISC-Vの多くのデバイスに対してHALクレートが存在し、これらには\"\n\"STM32、GD32、nRF、NXP、MSP430、AVR、PICマイクロコントローラなどが含まれます。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"ボードサポートクレート\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"ボードサポートクレードは特定のボードに対して更に利便性を向上させるラッパーを\"\n\"提供します。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"この例では、ボードサポートクレートは単に分かりやすい名前を提供し、少しの初期\"\n\"化を実施しているだけです。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"マイクロコントローラの外に実装されたオンボードデバイスに対するドライバも提供\"\n\"されていることがあります。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2`はマトリクスLEDに対する簡単なドライバを含んでいます。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"タイプステートパターン\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // エラー、移動済み。\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // エラー、移動済み。\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"この例では、ピンを表すタイプは`Copy`も`Clone`も実装していません。そのため、た\"\n\"だ一つのインスタンスだけが存在可能です。ピンがポート構造体からムーブされる\"\n\"と、他の誰もそのピンにアクセスすることはできなくなります。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"ピンの設定を変更することは古いピンのインスタンスを消費することになります。そ\"\n\"のため、それ以降は古いインスタンスを使い続けることはできなくなります。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"変数の型はその状態を表すようになっています。例えば、この例では型がGPIOピンの\"\n\"状態を表しています。このようにステートマシンをタイプシステムに織り込むこと\"\n\"で、正しい設定をせずにピンを使ってしまうことがなくなります。不正な状態遷移に\"\n\"関してはコンパイル時に発見されるようになります。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"インプットピンに対して`is_high`を呼び出すことは可能で、アウトプットピンに対し\"\n\"て`set_high`を呼び出すことも可能です。しかし、その逆の組み合わせは不可能で\"\n\"す。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"多くのHALクレートがこのパターンを用いています。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン\"\n\"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"多くのクレートはこれらのトレイトに対応することで[ドライバ](https://github.\"\n\"com/rust-embedded/awesome-embedded-rust#driver-crates)を実装します。例えば、\"\n\"加速度センサのドライバにはI2CやSPIバスの実装が必要かもしれません。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"多くのマイクロコントローラに対する実装に加えて、Raspberry Pi上のLinux向けの実\"\n\"装も存在します。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン\"\n\"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal)クレートはマイクロコン\"\n\"トローラの周辺I/Oに関して共通に必要とされる多くのトレイトを提供します。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/)は組み込み向けデバッグに有用なツールセットです。\"\n\"これはOpenOCDのようなものですが、より高度に統合されています。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\"SWD (Serial Wire Debug) やCMSIS-DAP経由のJTAG、 ST-LinkやJ-Linkプローブ\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDBスタブやMicrosoft DAP (Debug Adapter Protocol)サーバ\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Cargoとのインテグレーション\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed`はcargoのサブコマンドであり、バイナリをビルドしたり、フラッシュ\"\n\"したり、RTT（Real Time Transfers）の出力ログを取得したり、GDBに接続するための\"\n\"ものです。設定は対象とするプロジェクトディレクトリにおける`Embed.toml`ファイ\"\n\"ルにより行います。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) はUSB\"\n\"上のARM標準プロトコルで、インサーキット・デバッガが様々なArm Cortexプロセッサ\"\n\"のコアサイト・デバッグ・アクセスポートにアクセスするためのものです。BBC \"\n\"micro:bit のオンボード・デバッガもこれを利用しています。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link はST Microelectronicsによるインサーキット・デバッガの総称で、 J-Link\"\n\"はSEGGERによるインサーキット・デバッガの総称です。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"デバッグ・アクセスポートは通常５ピンのJTAGインタフェースか、2ピンのシリアルワ\"\n\"イヤデバッグです。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rsは自分で独自のツールを統合したい場合に利用できるライブラリです。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-\"\n\"protocol/) はVSCodeや他のIDEから、サポートされたマイクロコントローラ上で実行\"\n\"されているコードをデバッグすることを可能にします。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embedはprobe-rsライブラリを利用して生成されたバイナリです。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers)はデバッグホストとターゲット間のデータを多くのリング\"\n\"バッファを介してやりとりするためのメカニズムです。\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\"ひとつのターミナルで、`src/bare-metal/microcontrollers/examples/`において下記\"\n\"を実行:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"別のターミナルで、同じディレクトリで下記を実行:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"gLinuxまたはDebianの場合:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"GDBで下記を実行してみてください:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"他のプロジェクト\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\".\"\nmsgstr \"\\\"Real-Time Interrupt-driven Concurrency\\\"の略\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue.\"\nmsgstr \"\"\n\"共有リソース管理、メッセージパッシング、タスクスケジューリング、タイマキュー\"\n\"を提供\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"`async` executors with priorities, timers, networking, USB.\"\nmsgstr \"優先度付き`async` エグゼキュータ、タイマ、ネットワーク、USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support.\"\nmsgstr \"\"\n\"セキュリティに焦点をあてたRTOSで、プリエンプティブ・スケジューリングとMemory \"\n\"Protection Unitをサポート\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC.\"\nmsgstr \"\"\n\"Oxide Computer CompanyによるマイクロカーネルのRTOSでメモリ保護、非特権ドライ\"\n\"バ、IPCを提供\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust).\"\nmsgstr \"\"\n\"[FreeRTOSに対するRustバインディング](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"いくつかのプラットフォームでは `std`の実装あり、例えば [esp-idf](https://esp-\"\n\"rs.github.io/book/overview/using-the-standard-library.html)。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\"RTICはRTOSとして捉えることもできますし、並行実行のフレームワークとして捉える\"\n\"こともできます。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"他のHALを全く含んでいません。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"スケジューリングはカーネルではなく、Cortex-M NVIC (Nested Virtual Interrupt \"\n\"Controller)を利用して行います。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"Cortex-Mのみの対応です。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"GoogleはTockOSをTitanセキュリティキーのHavenマイクロコントローラで利用してい\"\n\"ます。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS はほとんどCで書かれていますが、アプリケーションを開発するためのRust\"\n\"バインディングが存在します。\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"I2C接続のコンパスから方位を読み取り、その結果をシリアルポートに出力します。\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"練習問題に取り組んだあとは、 [解答](solutions-morning.md)をみても構いません。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"I2C接続のコンパスから方位を読み取り、その結果をシリアルポートに出力します。も\"\n\"し時間があれば、LEDやボタンをなんとか利用して方位を出力してみてください。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"ヒント:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"[`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) クレートと \"\n\"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/)クレートのドキュ\"\n\"メント、ならびに[micro:bitハードウェア仕様](https://tech.microbit.org/\"\n\"hardware/)を確認してみてください。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"LSM303AGR慣性計測器は内部のI2Cバスに接続されています。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"TWIはI2Cの別名なので、I2CマスタはTWIMという名前になっています。\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"LSM303AGRドライバは`embedded_hal::blocking::i2c::WriteRead`を実装するものを必\"\n\"要とします。 [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html)構造体がこれを実装しています。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"様々なピンや周辺I/Oのための [`microbit::Board`](https://docs.rs/microbit-v2/\"\n\"latest/microbit/struct.Board.html)という構造体があります。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"[nRF52833データシート](https://infocenter.nordicsemi.com/pdf/\"\n\"nRF52833_PS_v1.5.pdf)を見ることもできますが、この練習問題のためには必要ないは\"\n\"ずです。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"[練習問題のテンプレート](../../comprehensive-rust-exercises.zip) をダウンロー\"\n\"ドして、`compass`というディレクトリの中にある下記のファイルを見てください。\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_ (変更は不要なはずです):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_ (変更は不要なはずです):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"_.cargo/config.toml_ (変更は不要なはずです):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Linuxではシリアルポート出力を下記のコマンドで確認します:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"Mac OSではこんな感じになります（デバイス名が少し違うかもしれません）:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Ctrl+A Ctrl+Q でpicocomを終了します。\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"ベアメタル Rust の午前の演習\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"（[演習に戻る](compass.md)）\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// シリアルポートを設定します。\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// システム タイマーを遅延目的で使用します。\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// I2C コントローラと慣性測定ユニットをセットアップします。\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Setting up IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// ディスプレイとタイマーをセットアップします。\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Ready.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// コンパスデータを読み取り、シリアルポートに記録します。\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// ボタン A が押された場合、次のモードに切り替えてすべての LED を短時間点滅\\n\"\n\"        // させます。\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"アプリケーションプロセッサ\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"ここまではArm Cortex-Mシリーズのようなマイクロコントローラについて見てきまし\"\n\"た。今度はCortex-Aを対象として何かを書いてみましょう。簡単化のために、ここで\"\n\"は（本物のハードウェアではなく）QEMUのaarch64 ['virt'](https://qemu-project.\"\n\"gitlab.io/qemu/system/arm/virt.html)ボードを利用します。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"大まかに言って、マイクロコントローラがMMUや複数の特権レベル（Arm CPUにおける\"\n\"例外レベル、x86におけるリング）を持たないのに対し、アプリケーションプロセッサ\"\n\"はこれらを持っています。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU は個々のアーキテクチャに対して様々な異なるマシンやボードモデルをサポート\"\n\"しています。今回使う 'virt' ボードは特定の本物のハードウェアに対応したもので\"\n\"はなく、純粋に仮想マシンとして設計されたものです。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"Rustのコードを実行できるようになる前にいくつかの初期化が必要です。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * メモリ管理に関するコンフィギュレーションを読み込んで適用し、MMU と\"\n\"キャッシュを有効にする準備を\\n\"\n\"     * します。\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* サポートされている PA 範囲を TCR_EL1.IPS にコピーします。*/\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * ここより前のすべての処理が完了していることを確認してから、\\n\"\n\"     * 古くなった可能性のあるローカル TLB エントリを使用開始前に無効にしま\"\n\"す。\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * MMU とキャッシュを有効にするように sctlr_el1 を設定し、\\n\"\n\"     * これが完了するまでは先に進まないようにします。\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* EL1 の浮動小数点アクセスのトラップを無効にします。*/\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* bss セクションをゼロにします。*/\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* スタックを準備します。*/\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* 例外ベクターを設定します。*/\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Rust コードを呼び出します。*/\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* 割り込みを待機して永久にループします。*/\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"この初期化内容はCの場合と同じになります。プロセッサ状態を初期化して、BSSをゼ\"\n\"ロ埋めして、スタックポインタを設定します。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"BSS（歴史的な理由によりblock starting symbolと呼ばれているもの）はオブジェク\"\n\"トファイルにおいてゼロ初期化される静的な変数を含む部分です。この部分はゼロに\"\n\"よる領域の浪費を避けるためにイメージからは除外されています。コンパイラはロー\"\n\"ダがこの領域をゼロ初期化することを想定しているのです。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"メモリの初期化方法やイメージのロード方法によってはBSSはすでにゼロ埋めされてい\"\n\"ることがありますが、ここでは念の為にゼロ埋めしています。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"いかなるメモリのreadやwriteよりも前にMMUとキャッシュを有効化する必要がありま\"\n\"す。それをしないと：\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"アラインされていないアクセスがフォールトになります。我々はコンパイラがアライ\"\n\"ンされていないアクセスを生成しないように`+strict-align`オプション を設定する\"\n\"`aarch64-unknown-none` ターゲット向けにRustコードをビルドします。そのためここ\"\n\"では問題にはなりませんが、一般的にはそうとは言えません。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことが\"\n\"あります。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしてい\"\n\"るのに対し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしま\"\n\"うということです。ホストが仮に明示的にメモリにアクセスしないとしても、投機的\"\n\"なアクセスによりキャッシュフィルが起きることがあります。そうなると、ホストが\"\n\"キャッシュをフラッシュするかVMがキャッシュを有効化したときに、VMかホストのど\"\n\"ちらかによる変更が失われてしまいます。（キャッシュは仮想アドレスやIPAではなく\"\n\"物理アドレスをキーとしてアクセスされます）\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"単純化のために、ハードコードしたページテーブル（`idmap.S`参照）を利用します。\"\n\"このページテーブルは最初の1GiBをデバイス用に、次の1GiBをDRAM用に、次の1GiBを\"\n\"さらなるデバイス用に透過的にマップします。これはQEMUのメモリレイアウトに合致\"\n\"します。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"例外ベクタ（`vbar_el1`）も設定します。これに関しては後ほど詳しく見ます。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"今日の午後に扱うすべての例は例外レベル１（EL1）で実行されることを想定していま\"\n\"す。もし、別の例外レベルで実行する必要がある場合には、`entry.S`をそれに合わせ\"\n\"て変更する必要があります。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"インラインアセンブリ\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"時折Rustコードでは書けないことを行うためにアセンブリ言語を使う必要がありま\"\n\"す。例えば、電源を落とすためにファームウェアに対してHVC（ハイパーバイザコー\"\n\"ル）を発行する場合です：\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// 宣言されたレジスタのみを使用し、メモリについては\\n\"\n\"    // 何もしないため、安全です。\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"（もし実際に電源を落とすプログラムを書きたい場合は、これらのすべての機能に対\"\n\"するラッパーを提供している[`smccc`](https://crates.io/crates/smccc)を使うと良\"\n\"いでしょう。）\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI はArmのPower State Coordination Interfaceのことであり、これはシステムや\"\n\"CPU電力状態管理の機能を含む標準的なセットです。これは多くのシステムでEL3\"\n\"ファームウェアとハイパーバイザにより実装されています。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"`0 => _` というシンタックスは、インラインアセンブリを実行する前にレジスタをゼ\"\n\"ロで初期化し、実行後はその値は気にしないということを示しています。`in`ではな\"\n\"く`inout`を使う必要があるのは、この実行でレジスタの値を上書きしてしまう可能性\"\n\"があるからです。\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \\\"C\\\"` \"\n\"because it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"この `main` 関数は`entry.S`にあるエントリポイントから呼ばれるため、\"\n\"`#[no_mangle]`と`extern \\\"C\\\"`を必要とします。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3`はレジスタ`x0`–`x3`の値であり、慣習的にブートロードがデバイスツ\"\n\"リーなどへのポインタを渡すのに利用されています。（`extern \\\"C\\\"`により指定さ\"\n\"れた）aarch64 の関数コール規約ではレジスタ`x0`–`x7`は最初の８個の引数を関数に\"\n\"渡すのに利用されることになっているため、`entry.S` はこれらの値を変更しないよ\"\n\"うにする以外の特別なことをする必要はありません。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"この例を`src/bare-metal/aps/examples`において`make qemu_psci`とすることでQEMU\"\n\"により実行してみましょう。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"MMIOに対するvolatileアクセス\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/\"\n\"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]\"\n\"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.\"\n\"write_volatile).\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) と [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"絶対に参照を保持してはいけません。\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Use `&raw` to get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!`を用いると、中間的な参照を作らずに構造体のフィールドにアクセスする\"\n\"ことができます。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Volatileアクセス：MMIO領域に対するreadやwriteは副作用があることがあるので、コ\"\n\"ンパイラやハードウェアが実行順序を変更したり、複製したり、省略したりできない\"\n\"ようにするためのものです。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"通常は、例えばある可変参照に対してライトしリードすると、コンパイラはライトし\"\n\"たのと同じ値がリードで読み出されると想定し、実際にメモリをリードする必要はな\"\n\"いと判断します。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"ハードウェアへのvolatileアクセスを行うための既存のクレートには参照を保持する\"\n\"ものがありますが、これは健全ではありません。参照が存在する間はいつでもコンパ\"\n\"イラがその参照を外して（MMIO領域にアクセスして）しまう可能性があります。\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Use `&raw` to get struct field pointers from a pointer to the struct.\"\nmsgstr \"\"\n\"構造体のポインタからそのフィールドへのポインタを得るには`addr_of!` マクロを\"\n\"使ってください。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"For compatibility with old versions of Rust you can use the [`addr_of!`]\"\n\"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"UARTドライバを書いてみましょう\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"QEMUの'virt' マシンには[PL011](https://developer.arm.com/documentation/\"\n\"ddi0183/g)というUARTがあるので、それに対するドライバを書いてみましょう。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// PL011 UARTの最小ドライバ。\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// 指定されたベースアドレスに存在する\\n\"\n\"    /// PL011 デバイス用の UART ドライバの新しいインスタンスを作成します。\\n\"\n\"    ///\\n\"\n\"    /// # 安全性\\n\"\n\"    ///\\n\"\n\"    /// 指定されたベースアドレスは PL011 デバイスの 8 つの MMIO 制御レジスタ\"\n\"を指していなければなりません。\\n\"\n\"    /// これらはデバイスメモリとしてプロセスのアドレス空間に\\n\"\n\"    /// マッピングされ、他のエイリアスはありません。\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// UART に 1 バイトを書き込みます。\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// TX バッファに空きができるまで待機します。\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// ベースアドレスが、適切にマッピングされた PL011 デバイスのコントロール レジ\"\n\"スタを\\n\"\n\"        // 指していることがわかっているため、安全です。\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// TX バッファに書き込みます。\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// UART がビジーでなくなるまで待機します。\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"`Uart::new`がアンセーフでその他のメソッドがセーフであるということに注目してく\"\n\"ださい。これは、`Uart::new`の安全性要求が満たされている（すなわち特定のUARTに\"\n\"対して一つしかドライバのインスタンスが存在せず、そのアドレス空間に対してエイ\"\n\"リアスが全く存在しない）ことをその呼び出し元が保証する限り、それ以降は必要な\"\n\"事前条件が満たされていると想定することができ`write_byte`を常に安全に呼び出す\"\n\"ことができるようになることが理由です。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"逆に（`new`をセーフにして、`write_byte` をアンセーフに）することもできました\"\n\"が、そうすると`write_byte`の全呼び出し箇所において安全性を考慮しなければなら\"\n\"なくなり、利便性が低下します\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"これはアンセーフなコードに対してセーフなラッパーを構築する場合の共通パターン\"\n\"です：健全性に関する証明に関する労力を多数の場所から少数の場所に集約します。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"他のトレイト\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"ここでは`Debug`トレイトを導出しました。この他にもいくつかのトレイトを実装する\"\n\"と良いでしょう。\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// デバイスメモリへのポインタのみが含まれ、どのコンテキストからでも\\n\"\n\"// アクセスできるため、安全です。\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"`Write`を実装すると、`Uart` タイプに対して `write!`と`writeln!`マクロが利用で\"\n\"きるようになります。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"この例を`src/bare-metal/aps/examples`において`make qemu_minimal`とすること\"\n\"で、QEMUにより実行してみましょう。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"UARTドライバの改善\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"実際のところPL011には[もっと多くのレジスタ](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers)があり、それら\"\n\"にアクセスするためにオフセットを足してポインタを得ることは間違えになりやす\"\n\"く、可読性を低下させます。さらに、いくつかはビットフィールドなので、構造化さ\"\n\"れた方法でアクセスできたほうが良いでしょう。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"オフセット\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"レジスタ名\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"幅\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"いくつかのIDレジスタは簡単化のための省略しています。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"[`bitflags`](https://crates.io/crates/bitflags) クレートはビットフラグを扱う\"\n\"のに便利です。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// UART フラグレジスタからのフラグ。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// 送信可。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// データセット レディ。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// データキャリア検出。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART はデータ送信のためビジー状態。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// 受信 FIFO が空。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// 送信 FIFO が満杯。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// 受信 FIFO が満杯。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// 送信 FIFO が空。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// 着呼表示。\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"`bitflags!`マクロは`Flags(u16)`のような新しいタイプを生成し、フラグを読み書き\"\n\"するための多くのメソッド実装を一緒に提供します。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"複数のレジスタ\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"構造体を使ってUARTのレジスタのメモリレイアウトを表現することができます。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) はコンパイラに対して、Cと同じ規則に従って構造体のフィールドを\"\n\"定義されている順番で配置することを指示します。これは構造体のレイアウトを予測\"\n\"可能にするために必要です。なぜならば、Rust標準の表現はコンパイラがフィールド\"\n\"を好きなように並び替えること（他にも色々とありますが）を許しているからです。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"新しく定義した`Registers` 構造体を我々のドライバで使ってみましょう。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// PL011 UART のドライバ。\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レ\"\n\"ジスタを\\n\"\n\"        // 指していることがわかっているため、安全です。\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// 保留中のバイトを読み取り、何も受け取っていない場合は`None` を\\n\"\n\"    /// 返します。\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// self.registers が、適切にマッピングされた PL011 デバイスのコントロール レ\"\n\"ジスタを\\n\"\n\"        // 指していることがわかっているため、安全です。\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: ビット 8～11 でエラー状態をチェックします。\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"Note the use of `&raw const` / `&raw mut` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"`addr_of!`と`addr_of_mut!` を使用して個々のフィールドに対するポインタを取得す\"\n\"ることで、不健全となってしまう中間的な参照を作らずに済んでいることに注目して\"\n\"ください。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"使用例\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"我々のドライバを使って、シリアルコンソールにライトし、そして入力されたバイト\"\n\"をエコーする小さなプログラムを書いてみましょう。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// プライマリ PL011 UART のベースアドレス。\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// `PL011_BASE_ADDRESS` が PL011 デバイスのベースアドレスであり、\\n\"\n\"    // 他からこのアドレス範囲にアクセスされることがないため、安全です。\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\\\"\\\\n\\\\nBye!\\\"\"\nmsgstr \"\\\"Bye!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"[インラインアセンブリ](../inline-assembly.md) の例と同じように、この`main`関\"\n\"数は`entry.S`におけるエントリポイントから呼び出されます。詳細はそちらの\"\n\"speaker notesを参照してください。\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"この例を`src/bare-metal/aps/examples`において`make qemu`とすることでQEMUによ\"\n\"り実行してみましょう。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"[`log`](https://crates.io/crates/log) クレートが提供するログ用マクロを使える\"\n\"と良いでしょう。これは`Log`トレイトを実装することで可能になります。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// UART ロガーを初期化します。\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"`LOGGER` を`set_logger`を呼び出す前に初期化しているので、log` におけるunwrap\"\n\"はセーフです。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"使用前にloggerを初期化する必要があります。\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"我々のパニックハンドラがパニックの詳細についてログ出力できるようになったこと\"\n\"に注目してください。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"この例を`src/bare-metal/aps/examples`において`make qemu_logger`とすることで\"\n\"QEMUにより実行してみましょう。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64は16エントリを持つ例外ベクターテーブルを定義しており、これらは４つのス\"\n\"テート（現在のELでSP0利用、現在のELでSPx利用、低位のELでAArch64、低位のELで\"\n\"AArch32）における４つのタイプの例外（同期、IRQ、FIQ、SError）に対応します。こ\"\n\"こではRustコードの呼び出し前に揮発レジスタの値をスタックに退避するためにベク\"\n\"ターテーブルをアセンブリ言語で実装しています：\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\"ELは例外レベルです。本日の午後に扱ったすべての例はEL1で実行されています。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"簡単化のために、ここでは現在のEL例外におけるSP0とSPｘの違い、低位のELレベルに\"\n\"おけるAArch32とAArch64の違いを区別していません。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"ここではこれらの例外が発生しないはずなので、ただ例外に関するログを出力し、電\"\n\"源を落としています。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"例外ハンドラとメインの実行コンテキストは異なるスレッドのようなものだと考える\"\n\"ことができます。ちょうどスレッド間の共有と同じように、[`Send`と`Sync`](../../\"\n\"concurrency/send-sync.md)により何を共有するかを制御することができます。例え\"\n\"ば、例外ハンドラとプログラムの他のコンテキストでとある値を共有したい場合に、\"\n\"もしそれが `Send`であり`Sync`でなければ、`Mutex` のようなものでラップして、\"\n\"staticに定義しなければなりません。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\\\"coreboot without the C\\\".\"\nmsgstr \"\\\"Cのない（つまり、C言語を使わない）coreboot\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"アーキテクチャはx86、aarch64ならびにRISC-Vをサポート。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"自身で多くのドライバを抱えずにLinuxBootに依存。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Rust RaspberryPi OS のチュートリアル](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables.\"\nmsgstr \"\"\n\"初期化、UARTドライバ、単純なブートローダ、JTAG、例外レベル、例外ハンドラ、\"\n\"ページテーブル\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"キャッシュメンテナンスとRustの初期化に関してちょっと疑わしいところがあるの\"\n\"で、製品コードで真似するには必ずしも良い例ではありません。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"スタックの最大使用量に関する静的解析。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"RaspberryPi OS チュートリアルはMMUやキャッシュを有効化する前にRustコードを実\"\n\"行しています。これにより、例えばスタックメモリをreadしたりwriteしたりすること\"\n\"になります。しかし：\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"MMUとキャッシュを有効化していないと、アラインされていないアクセスはフォールト\"\n\"を引き起こします。そのチュートリアルでは、コンパイラがアラインされていないア\"\n\"クセスを生成しない`+strict-align`オプションをセットする`aarch64-unknown-none`\"\n\"をターゲットとしてビルドしているので大丈夫なはずですが、一般的には大丈夫とは\"\n\"限りません。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"もしVM上で実行していたとすると、キャッシュコヒーレンシーの問題を起こすことが\"\n\"あります。問題なのはVMがキャッシュを無効化したまま直接メモリにアクセスしてい\"\n\"るのに対し、ホストは同じメモリに対してキャッシュ可能なエイリアスを持ってしま\"\n\"うということです。ホストが仮に明示的にメモリにアクセスしないとしても、投機的\"\n\"なアクセスによりキャッシュフィルが起きることがあり、そうなるとVMかホストのど\"\n\"ちらかによる変更が失われてしまいます。この（ハイパーバイザなしで直接ハード\"\n\"ウェアで実行する）場合には問題にはなりませんが、一般的には良くないパターンで\"\n\"す。\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"便利クレート\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"ベアメタルプログラミングにおいて共通に発生する問題に対する解を与えるクレート\"\n\"についていくつか紹介します。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"（Fuchsiaの）[`zerocopy`](https://docs.rs/zerocopy/)クレートはバイトシーケン\"\n\"スとその他の型の変換を安全に行うためのトレイトやマクロを提供します。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"これは（volatile read、writeを使用していないため）MMIOには適してませんが、例\"\n\"えばDMAのようなハードウェアと共有するデータ構造あるいは外部インタフェースを通\"\n\"して送信するデータ構造を扱うに場合には有用です。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes`はいかなるバイトパターンも有効な値となる型に対して実装することがで\"\n\"き、信用できないバイトシーケンスからの安全な変換を可能にします。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"`RequestType`はu32型のすべての値を有効なenum値として定義していないので、すべ\"\n\"てのバイトパターンが有効とはならず、これらに対する`FromBytes`の導出はフェール\"\n\"するでしょう。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder`はバイトオーダを気にする数値プリミティブに関する型を提供\"\n\"します。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"この例を`src/bare-metal/useful-crates/zerocopy-example/`において`cargo run`と\"\n\"とすることで実行してみましょう。（Playgroundではこの例が依存するクレートを利\"\n\"用できないため実行できません）\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"[`aarch64-paging`](https://crates.io/crates/aarch64-paging)クレートはAArch64\"\n\"仮想メモリシステムアーキテクチャに則ったページテーブルの生成を可能にします。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// 仮想物理同一となる新しいページテーブルを作成します。\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"// 2 MiB のメモリ領域を読み取り専用としてマッピングします。\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// `TTBR0_EL1` を設定してページテーブルを有効にします。\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"現時点ではEL1しかサポートされていませんが、他の例外レベルのサポートも簡単に追\"\n\"加できるはずです。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"これはAndroidで[Protected VM Firmware](https://cs.android.com/android/\"\n\"platform/superproject/+/master:packages/modules/Virtualization/pvmfw/)のため\"\n\"に利用されています。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"この例は本物のハードウェアかQEMUを必要とするので、簡単には実行できません。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"はサードパーティのクレートで、基本的なバディシステムアローケータを実装してい\"\n\"ます。このクレートは[`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/\"\n\"trait.GlobalAlloc.html) を実装する [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"により（ [以前](../alloc.md)見たように）標準の`alloc` クレートを利用可能にす\"\n\"るために使えますし、別のアドレス空間をアロケートするためにも使えます。例え\"\n\"ば、PCI BARに対するMMIO領域をアロケートしたい場合には以下のようにできます：\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"PCI BARは常にサイズと同じアラインになります。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"この例を`src/bare-metal/useful-crates/allocator-example/`において `cargo run`\"\n\"とすることで実行してみましょう。（Playgroundではこの例が依存するクレートを利\"\n\"用できないため実行できません）\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"時には`Vec`のようにリサイズできる領域をヒープを使わずに確保したいと思うことが\"\n\"あります。[`tinyvec`](https://crates.io/crates/tinyvec)は静的に確保、またはス\"\n\"タック上に確保した配列またはスライスを割当領域とするベクタを提供します。この\"\n\"実装では、いくつの要素が使われているかが管理され、確保された以上に使おうとす\"\n\"るとパニックします。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` は初期化のために要素となるタイプが`Default`を実装することを必要とし\"\n\"ます。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playgroundは`tinyvec`を内包しているので、オンラインでこの例を実行するこ\"\n\"とができます。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync`が提供する`std::sync::Mutex` とその他の同期プリミティブは`core`ま\"\n\"たは`alloc`では利用できません。となると、例えば異なるCPU間での状態共有のため\"\n\"の、同期や内部可変性はどのように実現したら良いのでしょうか？\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"[`spin`](https://crates.io/crates/spin) クレートはこれらの多くのプリミティブ\"\n\"と等価なスピンロックベースのものを提供します。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"割り込みハンドラでロックを取得する場合にはデッドロックを引き起こさないように\"\n\"気をつけてください。\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` はチケットロックのミューテックス実装も持っています。これは`std::sync`\"\n\"における`RwLock`, `Barrier`、`Once` と等価であり、またレイジー初期化の観点で\"\n\"は`Lazy`と等価なものです。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"[`once_cell`](https://crates.io/crates/once_cell) クレートも`spin::once::\"\n\"Once`とは少し異なるアプローチの遅延初期化のための有用な型をいくつか持っていま\"\n\"す。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playgroundは`spin`を内包しているので、この例はオンラインで実行できます。\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"AOSPにおいてベアメタルRustバイナリをビルドするためには、Rustコードをビルドす\"\n\"るための`rust_ffi_static`というSoongルール、リンカスクリプトとそれを使ってバ\"\n\"イナリを生成するための`cc_binary`というルール、さらにELFを実行可能な形式の生\"\n\"バイナリに変換する`raw_binary`というルールが必要です。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/\"\n\"libs/libvmbase/) library provides a linker script and useful defaults for \"\n\"the build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"[vmbase](https://android.googlesource.com/platform/packages/modules/\"\n\"Virtualization/+/refs/heads/master/vmbase/)というライブラリは、aarch64上の\"\n\"crosvm下で実行されるVMに対して、エントリポイント、UARTコンソールロギングなど\"\n\"に加えて、リンカスクリプトと有用なデフォルトビルドルールを提供してくれます。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"`main!`というマクロはメイン関数を指定するもので、指定された関数は`vmbase`のエ\"\n\"ントリポイントから呼び出されることになります。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"`vmbase`のエントリポイントはコンソールの初期化を行い、メイン関数がリターンし\"\n\"た場合にはPSCI_SYSTEM_OFF を発行しVMをシャットダウンします。\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"PL031 リアルタイム クロック デバイス用のドライバを作成します。\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"演習の終了後は、提供されている [ソリューション](solutions-afternoon.md) を確\"\n\"認してください。\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"RTC ドライバ\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"QEMU aarch64 virt マシンの 0x9010000 には、[PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) リアルタイム クロックが搭載されています。この演習で\"\n\"は、そのドライバを作成する必要があります。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"これを使用して現在の時刻をシリアル コンソールに出力します。日時の形式には \"\n\"[`chrono`](https://crates.io/crates/chrono) クレートを使用できます。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"一致レジスタと未加工の割り込みステータスを使用して、指定時刻（たとえば 3 秒\"\n\"後）までビジーウェイトします（ループ内で [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) を呼び出します）。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"時間がある場合は、RTC の一致によって生成された割り込みを有効にして処理しま\"\n\"す。[`arm-gic`](https://docs.rs/arm-gic/) クレートで提供されているドライバを\"\n\"使用して、Arm 汎用割り込みコントローラを設定して構いません。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\"RTC 割り込みを使用します。この割り込みは GIC に `IntId::spi(2)` として接続さ\"\n\"れています。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"割り込みを有効にすると、`arm_gic::wfi()` を使用してコアをスリープさせることが\"\n\"できます。これにより、コアは割り込みを受けるまでスリープ状態になります。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"[演習テンプレート](../../comprehensive-rust-exercises.zip) をダウンロードし、\"\n\"`rtc` ディレクトリで以下のファイルを探します。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"_src/exceptions.rs_（この演習の 3 番目のパートでのみ変更する必要があります）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/logger.rs_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_（変更する必要はありません）:\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"`make qemu`によりQEMU でコードを実行します。\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"ベアメタルRust PM\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"（[演習に戻る](rtc.md)）\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// GICv3 のベースアドレス。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// PL031 RTC のベースアドレス。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// PL031 RTC が使用する IRQ。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// `GICD_BASE_ADDRESS` と `GICR_BASE_ADDRESS` がそれぞれ GICv3 の\\n\"\n\"    // ディストリビューターと再ディストリビューターのベースアドレスであり、\\n\"\n\"    // 他にはこれらのアドレス範囲にアクセスするものがないため、安全です。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// `PL031_BASE_ADDRESS` が PL031 デバイスのベースアドレスであり、\\n\"\n\"    // それ以外はこのアドレス範囲にアクセスしないため、安全です。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// 割り込みなしで 3 秒間待機します。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Waiting for {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Finished waiting\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// 割り込みまでさらに 3 秒待ちます。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// データレジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// 一致レジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// 読み込みレジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// 制御レジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// 割り込みマスクセットまたはクリアレジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// 未加工の割り込みステータス\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// マスクされた割り込みステータス\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// 割り込みクリアレジスタ\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// PL031 リアルタイム クロック用のドライバ。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// 指定されたベースアドレスに\\n\"\n\"    /// PL031 デバイス用の RTC ドライバの新しいインスタンスを作成します。\\n\"\n\"    ///\\n\"\n\"    /// # 安全性\\n\"\n\"    ///\\n\"\n\"    /// 指定されたベースアドレスは PL031 デバイスの MMIO 制御レジスタを指して\"\n\"いる必要があります。\\n\"\n\"    /// これらはデバイスメモリとしてプロセスのアドレス空間に\\n\"\n\"    /// マッピングされ、他のエイリアスはありません。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// 現在の RTC 値を読み取ります。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// self.registers が、適切にマッピングされた PL031 デバイスのコントロール レ\"\n\"ジスタを\\n\"\n\"        // 指していることがわかっているため、安全です。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// 一致値を書き込みます。RTC 値がこれに一致すると、割り込みが生成されます\\n\"\n\"    /// （割り込みが有効になっている場合）。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// 割り込みが有効になっているかどうかに関係なく、一致レジスタが RTC 値と\\n\"\n\"    /// 一致するかどうかを返します。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// 現在保留中の割り込みがあるかどうかを返します。\\n\"\n\"    ///\\n\"\n\"    /// これは `matched` が true を返し、割り込みがマスクされている場合にの\"\n\"み\\n\"\n\"    /// true になります。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// 割り込みマスクを設定またはクリアします。\\n\"\n\"    ///\\n\"\n\"    /// マスクが true の場合、割り込みは有効になります。false の場合、\\n\"\n\"    /// 割り込みは無効になります。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// 保留中の割り込みがあればクリアします。\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// デバイスメモリへのポインタのみが含まれ、どのコンテキストからでも\\n\"\n\"// アクセスできるため、安全です。\\n\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Rustでの並行性へようこそ\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rustはミューテックスとチャネルを用いてOSスレッドを扱う並行性を十分にサポート\"\n\"しています。\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Rustの型システムは多くの並行性にまつわるバグをコンパイル時のバグにとどめると\"\n\"いう点で、重要な役割を果たします。これは時に _fearless concurrency_ （「怖く\"\n\"ない並行性」） と呼ばれます。なぜなら、コンパイラに実行時での正しさを保証する\"\n\"ことをまかせてよいためです。\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 20 分です。\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 20 分です\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Rustのスレッドは他の言語のスレッドと似た挙動をします:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Count in thread: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Main thread: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Spawning new threads does not automatically delay program termination at the \"\n\"end of `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"スレッドパニックは互いに独立です。\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]\"\n\"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref).\"\nmsgstr \"\"\n\"パニックはペイロードを保持していることがあり、それは`downcast_ref`で展開可能\"\n\"です。\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"例の実行方法:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because `main` ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) は、ヒープ上の\"\n\"データへの所有ポインタです。\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"`let handle = thread::spawn(…)`と後に`handle.join()`を使って、スレッドが完了\"\n\"するのを待ってみてください。\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html)を使うことができます:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得\"\n\"てみてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)\"\n\"について話すのに良いタイミングです。\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\"スレッド内でパニックを引き起こしてみて、それがどのように`main`に影響しないか\"\n\"を観察してみてください。\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"`handle.join()`の返り値の`Result`を使って、パニックペイロードへのアクセスを得\"\n\"てみてください。 これは[`Any`](https://doc.rust-lang.org/std/any/index.html)\"\n\"について話すのに良いタイミングです。\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? See next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"通常のスレッドはそれらの環境から借用することはできません:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"しかし、そのために[スコープ付きスレッド](https://doc.rust-lang.org/std/\"\n\"thread/fn.scope.html)を使うことができます:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"この理由は、関数`thread::scope`が完了するとき、全てのスレッドはjoinされること\"\n\"が保証されているので、スレッドが借用したデータを返すことができるためです。\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"通常のRustの借用のルールが適用されます:　一つのスレッドがミュータブルで借用す\"\n\"ること、または任意の数のスレッドからイミュータブルで借用すること。\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"このセグメントの所要時間は約 20 分です\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a [`Sender<T>`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.Sender.html) and a [`Receiver<T>`](https://doc.rust-lang.\"\n\"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the \"\n\"channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Rustのチャネルには二つの部品があります： `Sender<T>` と`Receiver<T>`です。こ\"\n\"の２つの部品はチャネルによって繋がっていますが、見ることができるのはエンドポ\"\n\"イントだけです。\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Received: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for \"\n\"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` \"\n\"(so you can make multiple producers) but `Receiver` does not.\"\nmsgstr \"\"\n\"`mpsc` は Multi-Producer, Single-Consumerの略称です。 `Sender`と`SyncSender`\"\n\"は`Clone`を実装している（よって複数のproducerが作成可能）のですが、`Receiver`\"\n\"についてはそうではありません。\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.\"\n\"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv) return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()`と`recv()`は`Result`を返します。もし`Err`が返された場合、これは、対応\"\n\"する`Sender`か`Receiver`のいずれかがドロップされ、チャンネルが閉じられたこと\"\n\"を意味します。\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"\"\n\"You get an unbounded and asynchronous channel with [`mpsc::channel()`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):\"\nmsgstr \"Unboundedで非同期的なチャネルは`mpsc::channel()`によって得られます：\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: sent Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: done\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/\"\n\"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current \"\n\"thread:\"\nmsgstr \"\"\n\"Bounded（かつ同期的）なチャネルを用いたとき、`send`は現在のスレッドをブロック\"\n\"することがあります：\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"Calling `send()` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"`send`を呼んだときにチャネルに空きがなければ、現在のスレッドはブロックされま\"\n\"す。もし誰もチャネルから値を読み取らない場合は、このスレッドは無期限にブロッ\"\n\"クされることがあります。\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A call to `send()` will abort with an error (that is why it returns \"\n\"`Result`) if the channel is closed. A channel is closed when the receiver is \"\n\"dropped.\"\nmsgstr \"\"\n\"もしもチャネルが閉じられた場合、`send`の呼び出しはエラーとともに中断します。\"\n\"（`send`が`Result`を返すのはこのためです。）受け取り側がドロップされたとき\"\n\"に、チャネルは閉じられます。\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls \"\n\"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv).\"\nmsgstr \"\"\n\"サイズが０のBoundedチャネルは「ランデブーチャネル」と呼ばれます。別のスレッド\"\n\"が`read`を呼ぶまでは、それぞれのsendは現在のスレッドをブロックします。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"Send\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"Sync\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Rustはどのようにスレッド間での値の共有アクセスを禁止するのでしょうか？その答\"\n\"えとなるのが、以下の２つのトレイトです：\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): スレッド境界\"\n\"をまたいでの型`T`のムーブが安全に行える場合、型`T`は`Send`である。\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): スレッド境界\"\n\"をまたいで`&T`のムーブが安全に行える場合、型`T`は`Sync`である。\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"`Send`と`Sync`は[unsafeなトレイト](../unsafe/unsafe-traits.md)です。 あなたが\"\n\"新たに定義する型が`Send`と`Sync`の型のみを含む場合、コンパイラはその新しい型\"\n\"に対して`Send`と`Sync`を自動的に導出します。そうでなくても妥当であるならば\"\n\"`Send`と`Sync`を自分自身で実装することもできます。\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"これらのトレイトは、ある型が特定のスレッドセーフの特性を持っていることを示す\"\n\"マーカーと考えることもできます。\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"これらは通常のトレイトと同じように、ジェネリック境界の中で利用することができ\"\n\"ます。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"型`T`の値を安全に別のスレッドにムーブできる場合、型`T`は[`Send`](https://doc.\"\n\"rust-lang.org/std/marker/trait.Send.html)である。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"所有権を別のスレットにムーブするということは、_デストラクタ_ がそのスレッドで\"\n\"実行されるということです。つまり、あるスレッドでアロケートされた値を別のス\"\n\"レッドで解放しても良いかというのが判断基準になります。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"例を挙げると、SQLiteライブラリへのコネクションは、一つのスレッドからのみアク\"\n\"セスされる必要があります。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"型`T`の値を複数のスレッドから同時にアクセスしても安全な場合、型`T`は [`Sync`]\"\n\"(https://doc.rust-lang.org/std/marker/trait.Sync.html) である。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"より正確には、以下のような定義です：\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`&T`が`Send`である場合、かつその場合に限り、`T`は`Sync`である\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"これはつまり、「ある型の共有がスレッドセーフであれば、その参照をスレッド間で\"\n\"受け渡すこともスレッドセーフである」ということを手短に表したものです。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"なぜなら、ある型がSyncである場合、データ競合や他の同期の問題などのリスクなし\"\n\"にその型を複数のスレッド間で共有でき、その型を別のスレッドにムーブしても安全\"\n\"だからです。また、型への参照は別のスレッドにムーブしても安全です。それは、そ\"\n\"れが参照するデータは任意のスレッドから安全にアクセスすることができるからで\"\n\"す。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"見かけるほとんどの型は`Send + Sync`です：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`、`f32`、`bool`、`char`、`&str` など\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`、`[T; N]`、`&[T]`、`struct { x: T }` など\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`、`Option<T>`、`Vec<T>`、`Box<T>` など\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"`Arc<T>`: アトミック参照カウントにより、明示的にスレッドセーフ。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`: 内部ロックにより明示的にスレッドセーフ。\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"`AtomicBool`, `AtomicU8`, …: 特別なアトミック命令を利用。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"ジェネリクスは、型パラメタが`Send + Sync`であるとき、通常は`Send + Sync`で\"\n\"す。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"これらの型は別のスレッドにムーブすることができますが、このようなムーブはス\"\n\"レッドセーフではありません。通常は内部可変性がその原因です：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are safe to access (via shared references) from multiple \"\n\"threads, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"このような型はスレッドセーフですが、別のスレッドにムーブすることはできませ\"\n\"ん：\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them. However, an already-locked mutex can have its \"\n\"guarded variable read by any thread with which the guard is shared.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: プリミティブを作成したスレッド自身により、割り当てを解除され\"\n\"るべきであるようなOSレベルのプリミティブを利用。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"このような型はスレッドセーフではないため、別のスレッドにムーブすることはでき\"\n\"ません：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: それぞれの `Rc<T>` は`RcBox<T>`への参照を持っています。これは、アト\"\n\"ミックでない参照カウントを持っています。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust は、生ポインターは同時実行性に関する特別な考慮事項\"\n\"がある可能性があることを仮定しています。\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) は読み取り専用\"\n\"の共有アクセスを`Arc::clone`により可能にします：\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` は\\\"Atomic Reference Counted\\\"の略で、アトミック操作を利用するという点\"\n\"で、`Rc`がスレッド安全になったバージョンのようなものです。\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` は `Clone` を実装します。このことは`T`が`Clone`を実装するしないに関\"\n\"係ありません。`T`が`Send`と`Sync`の両方を実装している場合で、かつその場合に限\"\n\"り、`Arc<T>` は両者を実装します。\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()`にはアトミック操作のコストがかかります。ただ、その後は、`T`の利\"\n\"用に関するコストはかかりません。\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"参照サイクルに気をつけてください。`Arc` には参照サイクルを検知するためのガ\"\n\"ベージコレクタはありません。\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` が役立ちます。\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability.md)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) は相互排他\"\n\"を保証し、 _かつ_ 読み取り専用のインターフェースの裏側で `T` へのミュータブル\"\n\"なアクセスを可能にします：\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"[`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-lang.org/std/sync/\"\n\"struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) のブランケット実装があることに\"\n\"注目してください。\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"Rustにおける`Mutex`とは、保護されるデータである、たった一つの要素から構成され\"\n\"たコレクションのようなものです。\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"保護されたデータにアクセスする前に、ミューテックスを確保し忘れることはありま\"\n\"せん。\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"`&Mutex<T>` からロックを取得することで、`&mut T`を得ることができます。この\"\n\"`MutexGuard`は`&mut T`が保持されているロックよりも長く存続しないことを保証し\"\n\"ます。\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` if and only if `T` implements \"\n\"`Send`.\"\nmsgstr \"\"\n\"`T`が`Send`を実装している場合で、かつその場合に限り、`Mutex<T>` は`Send`と\"\n\"`Sync`の両方を実装します。\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"読み書きのロックの場合に対応するものがあります： `RwLock`。\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"なぜ`lock()`は`Result`を返すのでしょう？\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Mutex`を保持したスレッドがパニックを起こした場合、保護すべきデータが整合性の\"\n\"欠けた状態にある可能性を伝えるため、`Mutex`は「ポイゾンされた」\"\n\"（\\\"poisoned\\\"）状態になります。ポイゾンされたMutexに対して `lock()` をコール\"\n\"すると、[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.\"\n\"PoisonError.html)とともに失敗します。`into_inner()` を用いることで、そのエ\"\n\"ラーにおいて、とりあえずデータを回復することはできます。\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"`Arc` と `Mutex` の動作を見てみましょう：\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"考えられる対処法：\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"注目するとよい箇所：\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v`は `Arc` と `Mutex`の両方でラップされています。なぜなら、それらの関心は互\"\n\"いに独立なものであるからです。\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"`Mutex`を`Arc`でラップすることは、スレッド間でミュータブルな状態を共有するた\"\n\"めによく見られるパターンです。\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>`は別のスレッドにムーブされる前に、`v2`としてクローンされる必要があ\"\n\"ります。`move` がラムダ式に追加されたことに注意してください。\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"ブロックは`LockGuard`のスコープを可能な限り狭めるために導入されています。\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"食事する哲学者の問題は、並行性に関する古典的な問題です。\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"5 人の哲学者が同じテーブルで食事をしています。それぞれの哲学者がテーブルの定\"\n\"位置に座り、皿の間にはフォークが 1 本置かれています。提供される料理はスパゲッ\"\n\"ティで、2 本のフォークで食べる必要があります。哲学者は思索と食事を交互に繰り\"\n\"返すことしかできません。さらに、哲学者は左右両方のフォークを持っている場合に\"\n\"のみ、スパゲッティを食べることができます。したがって、2 つのフォークは、両隣\"\n\"の哲学者が食べるのではなく考えている場合にのみ使用できます。それぞれの哲学者\"\n\"は、食べ終わった後、両方のフォークを置きます。\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"この演習では、ローカルの [Cargo インストール](../../cargo/running-locally.md)\"\n\"が必要です。以下のコードを `src/main.rs` というファイルにコピーし、空欄を埋め\"\n\"て、`cargo run` がデッドロックしないことを確認します。\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Eureka! {} has a new idea!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Pick up forks...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} is eating...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Socrates\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hypatia\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Plato\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristotle\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// フォークを作成する\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// 哲学者を作成する\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// それぞれの哲学者が思索と食事を 100 回行うようにする\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// 哲学者の思索を出力する\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"次の `Cargo.toml` を使用できます。\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"新たに身に付けた知識を活かして、マルチスレッド リンク チェッカーを作成しま\"\n\"しょう。まず、ウェブページ上のリンクが有効かどうかを確認する必要があります。\"\n\"同じドメインの他のページを再帰的にチェックし、すべてのページの検証が完了する\"\n\"までこの処理を繰り返します。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"新しい Cargo プロジェクトを作成し、次の依存関係を追加します。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"`cargo add` が `error: no such subcommand` で失敗する場合は、`Cargo.toml` \"\n\"ファイルを手動で編集してください。下記の依存関係を追加します。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"`cargo add` の呼び出しにより、`Cargo.toml` ファイルは次のように更新されます。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"これで、スタートページをダウンロードできるようになりました。`https://www.\"\n\"google.org/` のような小規模なサイトで試してみましょう。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"`src/main.rs` ファイルは次のようになります。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"request error: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Checking {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Links: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Could not extract links: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"`src/main.rs` 内のコードを、次のコマンドで実行します。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"スレッドを使用してリンクを同時にチェックします。つまり、チェックする URL を\"\n\"チャンネルに送信し、いくつかのスレッドで同時に URL を確認します。\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"これを拡張して、`www.google.org` ドメインのすべてのページからリンクを再帰的に\"\n\"抽出します。サイトがブロックされないように、ページ数の上限を 100 程度に設定し\"\n\"ます。\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} is trying to eat\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// デッドロックを避けるために、どこかで対称性を\\n\"\n\"        // 崩す必要があります。下記のコードでは、\\n\"\n\"        // 領域を開放することなく2つのフォークを交換します。\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"マルチスレッド・リンクチェッカー\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"/// 指定されたページ内のリンクを抽出するかどうかを決定します。\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// 指定されたページを訪問済みとしてマークし、すでに訪問済みであれば\\n\"\n\"    /// false を返します。\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// 送信者がドロップされました。今後コマンドは受信されません。\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Got crawling error: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"Bad URLs: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"「Async」は複数のタスクが並行処理される並行性モデルです。それぞれのタスクはブ\"\n\"ロックされるまで実行され、そして次に進むことのできる他のタスクに切り替えるこ\"\n\"とにより実現されます。このモデルは限られた数のスレッド上でより多くのタスクを\"\n\"実行することを可能にします。なぜなら、タスクごとのオーバーヘッドは通常はとて\"\n\"も低く、効率的に実行可能なI/Oを特定するために必要なプリミティブをOSが提供して\"\n\"くれるからです。\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"Rustの非同期的な操作は「future」に基づいていて、これは将来に完了するかもしれ\"\n\"ない作業を表しています。Futureは、タスクが完了したことを知らせるシグナルが得\"\n\"られるまでポーリングされます。\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"Futureは非同期的なランタイムによりポーリングされます。ランタイムにはいくつか\"\n\"の選択肢があります。\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Pythonには似たようなモデルが`asyncio`として搭載されています。しかし、ここでの\"\n\"`Future`型はコールバックに基づくものであって、ポーリングによるものではありま\"\n\"せん。Pythonの非同期プログラムは「ループ」を必要とし、Rustのランタイムに似て\"\n\"います。\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"JavaScriptの`Promise`は似ているものの、これもまたもやコールバックに基づきま\"\n\"す。 この言語のランタイムはイベントループにより実装されているため、多くの\"\n\"Promise解決の詳細は隠されています。\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"async/await\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"おおまかには、Rustの非同期コードはほとんど「通常の」逐次的なコードのように見\"\n\"えます:\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Count is: {i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"これは構文を示すための単純化された例であることに注意してください。長く実行さ\"\n\"れうる操作や本物の並行処理はここには含まれません。\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"「async」キーワードは糖衣構文です。コンパイラは返り値をfutureに置き換えます。\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"コンパイラに対して、返されたfutureの値をその後どう扱うべきかという、追加の指\"\n\"示を含めない限り、`main`をasyncにすることはできません。\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"非同期のコードを実行するためには、エグゼキュータが必要です。`block_on`は、与\"\n\"えられたfutureが最後まで実行されるまで、現在のスレッドをブロックします。\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await`は非同期的に他の操作の完了を待ちます。`block_on`とは異なり、`.await`\"\n\"は現在のスレッドをブロックしません。\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"`.await`はasync関数(またはasync ブロック)の中でのみ利用できます。(async関数・\"\n\"ブロックについては後ほど紹介します。)\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html)はトレイト\"\n\"であり、まだ完了してないかもしれない操作を表現するオブジェクトにより実装され\"\n\"ます。Futureはポーリングされることがあり、`poll`は[`Poll`](https://doc.rust-\"\n\"lang.org/std/task/enum.Poll.html)を返します。\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"非同期の関数は`impl Future`を返します。自分で定義した型に対して`Future`を実装\"\n\"することも（あまりないことですが）可能です。例えば、`tokio::spawn`から返され\"\n\"る`JoinHandle`は`Future`を実装することにより、joinすることを可能にしていま\"\n\"す。\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"Futureに適用される`.await`キーワードは、そのFutureの準備ができるまで、現在の\"\n\"非同期の関数の一時停止を起こし、そしてその出力を評価します。\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"`Future`と`Poll`の型はまさに示されたように実装されます; ドキュメントの具体的\"\n\"な実装を見るにはリンクをクリックしてください。\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"`Pin`と`Context`については詳しくは扱いません。なぜなら、新しく非同期のプリミ\"\n\"ティブを作るよりも、非同期のコードを書くことに我々は重点を置くつもりだからで\"\n\"す。簡潔には以下で説明されます：\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"`Context`は、特定のイベントが発生した時に、Futureが自分自身を再びポーリングさ\"\n\"れるようにスケジュールすることを可能にします。\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin`はfutureへのポインタが有効であり続けるために、Futureがメモリの中で移動さ\"\n\"れないことを確実にします。これは、参照が`.await`の後に有効であり続けるために\"\n\"必要です。\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"\\\\_runtime_は非同期な演算（_reactor_）のサポートを提供し、また、futureを実行\"\n\"すること（_executor_）を担当しています。Rustには「ビルトイン」のランタイムは\"\n\"ありませんが、いくつかのランタイムの選択肢があります: \"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/) - パフォーマンスが高い。HTTP向けの[Hyper](https://\"\n\"hyper.rs/)やgRPC向けの[Tonic](https://github.com/hyperium/tonic)のような発達\"\n\"したエコシステムも持っている\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/) - 「async」のための「std」であることを目指した\"\n\"もの。また、`async::task`に基本的なランタイムを含む。\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/) - シンプルで軽量\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"いくつかのより巨大なアプリケーションは、独自のランタイムを備えています。例え\"\n\"ば[Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/\"\n\"lib/fuchsia-async/src/lib.rs)はそのようなものをすでに備えています。\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"上で挙げられたランタイムのうち、TokioのみがRustプレイグラウンドでサポートされ\"\n\"ています。このプレイグラウンドではいかなる入出力操作も許可されていないため、\"\n\"大抵の興味深い非同期のあれこれは、プレイグラウンドで実行することはできませ\"\n\"ん。\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"Futureは、ポーリングを行うエグゼキュータの存在なしには何も行わない（入出力操\"\n\"作さえ始めない）という点で「怠惰」です。例えば、これは、エグゼキュータがなく\"\n\"とも最後まで実行されるJavaScriptのPromiseとは異なります。\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokioは以下を提供します: \"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"非同期のコードを実行するためのマルチスレッドのランタイム。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"標準ライブラリの非同期バージョン。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"大きなライブラリのエコシステム。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Count in task: {i}!\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Main task: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"`tokio::main`のマクロにより、`main`の非同期処理を作ることができます。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"`spawn`関数は新しい並行の「タスク」を作成します。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"注意：`spawn`は`Future`を引数に取るため、`count_to`に対して`.await`を呼ぶこと\"\n\"はありません。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**さらなる探求:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"どうして`count_to`は（通常は）10に辿り着かないのでしょうか？これは非同期処理\"\n\"のキャンセルの例です。 `tokio::spawn`は完了まで待機するためのハンドラを返しま\"\n\"す。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\"プロセスを新しく作る代わりに、`count_to(10).await`を試してみてください。\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"`tokio::spawn`から返されたタスクを待機してみてください。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust には、軽量のスレッド形式の一種であるタスクシステムがあります。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"タスクには、単一のトップレベルのfutureがあり、これはエグゼキュータが先に進む\"\n\"ためにポーリングする対象となります。そのfutureには一つまたは複数のfutureがネ\"\n\"ストされていることもあり、トップレベルのfutureの`poll`メソッドがポーリングす\"\n\"ることになり、大まかにはコールスタックに対応すると言えます。タスクにおける並\"\n\"行処理は、例えば競合タイマーや入出力操作など、複数の子のfutureをポーリングす\"\n\"ることにより可能になります。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"listening on port {}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"connection from {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Who are you?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"socket error\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"この例を準備した`src/main.rs`にコピーして、そこから実行してみましょう。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"[nc](https://www.unix.com/man-page/linux/1/nc/) や [telnet](https://www.unix.\"\n\"com/man-page/linux/1/telnet/) などの TCP 接続ツールを使用して接続してみてくだ\"\n\"さい。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"例のサーバーがどのような状態の時に、いくつかのクライアントと接続された状態に\"\n\"あるのかを、可視化するように受講者に指示してください。どんなタスクが存在して\"\n\"いますか？それらのfutureは何ですか？\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"私たちが`async`ブロックを見かけるのは初めてですね。これはクロージャと似ていま\"\n\"すが、何も引数は取りません。この返り値はFutureであり、`async fn`と似ていま\"\n\"す。\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"mainのasyncブロックを関数にリファクタして、`?`を使ったエラーハンドリングを改\"\n\"善してみましょう。\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\"いくつかのクレートは`async`/`await`をサポートしています。例えば、`tokio`チャ\"\n\"ネルは:\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Received {count} pings so far.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler complete\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Sent {} pings so far.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Something went wrong in ping handler task.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\"チャネルサイズを `3`に変えてみて、これがどのように処理に影響するか確認してみ\"\n\"ましょう。\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\"一般的に、このインターフェースは、[朝の講座](concurrency/channels.md)で見られ\"\n\"たような`sync`チャネルに似ています。\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\"`std::mem::drop`の呼び出しを除いてみましょう。何か起こるでしょうか？それはな\"\n\"ぜでしょうか？\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"[Flume](https://docs.rs/flume/latest/flume/)クレートには`sync`と`async`や\"\n\"`send`と`recv`の両方を実装するチャネルがあります。 これは入出力と重いCPUの処\"\n\"理のタスクの両方を含む、複雑なアプリケーションで便利です。\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"`async`チャネルを扱うことを好ましくするのは、チャネルと繋げるためにや、複雑な\"\n\"コントロールフローを作るために、チャネルを他の`future`と繋げられることです。\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"Joinという操作では、futureの集合の準備が整うまで待機し、その後に結果をまとめ\"\n\"て返します。これはJavaScriptにおける `Promise.all` やPythonにおける`asyncio.\"\n\"gather`に似ています。\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\\\"{page_sizes_dict:?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"複数の互いに素な型のfutureに対しては、`std::future::join!`を利用できます。し\"\n\"かし、いくつのfutureがコンパイル時に存在しているのかを把握しておく必要があり\"\n\"ます。これは現在`futures`クレートにありますが、近いうちに`std::future`に統合\"\n\"される予定です。\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"`join`のリスクは、複数のfutureのうちの１つでも解決されないとプログラムがス\"\n\"トールしてしまうということです。 \"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"また、`join_all`と`join!`を組み合わせることもできます。それは、例えばデータ\"\n\"ベースのクエリと一緒にhttpサービスへの全てのリクエストをjoinする場合です。\"\n\"futureに`futures::join!`を用いて、`tokio::time::sleep`を追加してみてくださ\"\n\"い。これは（次のチャプターで説明する、`select!`を必要とする）タイムアウトでは\"\n\"ありませんが、`join!`の良い実演となっています。\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"Selectという操作では、futureの集合のうち、いずれか１つの準備が整うまで待機\"\n\"し、そのfutureが提供する結果に対して応答します。これはJavaScriptにおける\"\n\"`Promise.race`に似ています。また、Pythonにおける `asyncio.wait(task_set, \"\n\"return_when=asyncio.FIRST_COMPLETED)`と比べることができます。\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"Matchステートメントのように、`select!`の本体にはいくつかの 「腕」があり、それ\"\n\"ぞれは`pattern = future => statement`の形をとっています。 `future`の準備が\"\n\"整った時、その`statement`は`future`の結果に紐づく`pattern`の変数を用いて実行\"\n\"されます。\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"got: {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"timeout\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Failed to send greeting\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Listener failed\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"The `listener` async block here is a common form: wait for some async event, \"\n\"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why \"\n\"does the `send` also fail in this situation?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"`select!` is also often used in a loop in \\\"actor\\\" architectures, where a \"\n\"task reacts to events in a loop. That has some pitfalls, which will be \"\n\"discussed in the next segment.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"async / await は、同時実行非同期プログラミングのための便利で効率的な抽象化を\"\n\"提供します。しかし、Rust の async / await モデルには、注意点や誤用されやすい\"\n\"機能もいくつかあるため、この章ではその点について説明します。\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"Pin\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"エグゼキュータのブロック\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"ほとんどの非同期ランタイムは、IO タスクの同時実行のみを許可します。つまり、\"\n\"CPU ブロックタスクはエグゼキュータをブロックし、他のタスクの実行を妨げます。\"\n\"簡単な回避策は、可能であれば非同期の同等のメソッドを使用することです。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"コードを続けて、スリープが同時ではなく連続して発生することを確認します。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"`\\\"current_thread\\\"` フレーバーは、すべてのタスクを 1 つのスレッドに配置しま\"\n\"す。これにより、影響はより明確になりますが、バグはまだマルチスレッド フレー\"\n\"バーに存在します。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"`std::thread::sleep` を `tokio::time::sleep` に切り替えて、その結果を待ちま\"\n\"す。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"もう 1 つの修正策は、`tokio::task::spawn_blocking` を使用することです。これ\"\n\"は、実際のスレッドを生成し、エグゼキュータをブロックせずにそのハンドルを \"\n\"Future に変換します。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"タスクは OS スレッドとはみなすべきではありません。これらは 1 対 1 に対応して\"\n\"おらず、ほとんどのエグゼキュータは、単一の OS スレッドで多くのタスクを実行す\"\n\"ることを許可します。これは、FFI を介して他のライブラリとやり取りする場合に特\"\n\"に問題となります。FFI では、そのライブラリはスレッド ローカル ストレージに依\"\n\"存しているか、特定の OS スレッド（CUDA など）にマッピングされている可能性があ\"\n\"るためです。そのような場合は `tokio::task::spawn_blocking` を使用することをお\"\n\"すすめします。\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"同期ミューテックスは慎重に使用してください。`.await` でミューテックスを保持す\"\n\"ると、別のタスクがブロックされ、そのタスクが同じスレッドで実行される可能性が\"\n\"あります。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"非同期ブロックと関数は、`Future` トレイトを実装する型を返します。返される型\"\n\"は、ローカル変数を Future の内部に格納されるデータに変換するコンパイラ変換の\"\n\"結果です。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"これらの変数の一部は、他のローカル変数へのポインタを保持できます。これらのポ\"\n\"インタが無効になるため、Futureを別のメモリ位置に移動しないでください。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"メモリ内の Future 型が移動するのを防ぐには、固定されたポインタのみを介して\"\n\"ポーリングするようにします。`Pin` は参照のラッパーで、参照先のインスタンスを\"\n\"別のメモリ位置に移動するオペレーションをすべて禁止します。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// 作業アイテム。この場合、指定された時間だけスリープし、\\n\"\n\"// `respond_on` チャンネルでメッセージを返します。\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// キュー上の処理をリッスンして実行するワーカー。\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Pretend to work.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"failed to send response\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: 100 ミリ秒ごとの反復処理の回数をレポート\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"// 処理をリクエストし、処理が完了するまで待機するリクエスト元。\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"failed to send on work queue\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"failed waiting for response\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"work result for iteration {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"これはアクターのパターンの一例です。アクターは通常、ループ内で `select!` を呼\"\n\"び出します。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\"これはこれまでのレッスンの一部をまとめたものですので、時間をかけて復習してく\"\n\"ださい。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"`_ = sleep(Duration::from_millis(100)) => { println!(..) }` を `select!` に追\"\n\"加しただけでは、実行されません。なぜでしょうか？\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\"代わりに、`loop` の外側で、その Future を含む `timeout_fut` を追加します。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"これでもうまくいきません。コンパイルエラーにあるように、`select!` 内の \"\n\"`timeout_fut` に `&mut` を追加して移動を回避してから、`Box::pin` を使用しま\"\n\"す。\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\"これはコンパイルされますが、タイムアウトになると、すべての反復処理で `Poll::\"\n\"Ready` になります（融合された Future がこれに役立ちます）。期限が切れるたび\"\n\"に `timeout_fut` をリセットするように更新します。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box でヒープに割り当てます。場合によっては `std::pin::pin!`（最近安定化された\"\n\"ばかりで、古いコードでは多くの場合に `tokio::pin!` を使用します）も使用できま\"\n\"すが、再割り当てされる Future に使用することは困難です。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"別の方法としては、`pin` をまったく使用せずに、100 ミリ秒ごとに `oneshot` チャ\"\n\"ネルに送信する別のタスクを生成するという方法もあります。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"それ自体へのポインタを含むデータは、自己参照と呼ばれます。通常、Rust 借用\"\n\"チェッカーは、参照が参照先のデータより長く存続できないため、自己参照データの\"\n\"移動を防ぎます。ただし、非同期ブロックと関数のコード変換は、借用チェッカーに\"\n\"よって検証されません。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` は参照のラッパーです。固定されたポインタを使用して、オブジェクトをその\"\n\"場所から移動することはできません。ただし、固定されていないポインタを介して移\"\n\"動することは可能です。\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"`Future` トレイトの `poll` メソッドは、`&mut Self` ではなく `Pin<&mut Self>` \"\n\"を使用してインスタンスを参照します。固定されたポインタでのみ呼び出すことがで\"\n\"きるのはこのためです。\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized in the 1.75 release. This \"\n\"required support for using return-position `impl Trait` in traits, as the \"\n\"desugaring for `async fn` includes `-> impl Future<Output = ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support, there are some pitfalls around `async \"\n\"fn`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position `impl Trait` captures all in-scope lifetimes (so some \"\n\"patterns of borrowing cannot be expressed).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async traits cannot be used with [trait objects](../../smart-pointers/trait-\"\n\"objects.md) (`dyn Trait` support).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround \"\n\"for `dyn` support through a macro, with some caveats:\"\nmsgstr \"\"\n\"クレート [async_trait](https://docs.rs/async-trait/latest/async_trait/) は、\"\n\"マクロによる回避策を提供します。\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"Running all sleepers...\\\"\"\nmsgstr \"\\\"running all sleepers..\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"Slept for {} ms\\\"\"\nmsgstr \"\\\"slept for {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` は簡単に使用できますが、ヒープ割り当てを使用してこれを実現して\"\n\"います。このヒープ割り当てには、パフォーマンス オーバーヘッドが伴います。\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"The challenges in language support for `async trait` are too deep to \"\n\"describe in-depth in this class. See [this blog post](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) by Niko Matsakis if you are interested in digging deeper. See also \"\n\"these keywords:\"\nmsgstr \"\"\n\"`async trait` の言語サポートにおける課題は、Rust の中でも難解な部類に入るた\"\n\"め、ここでは詳しく説明する必要はないでしょう。Niko Matsakis が [こちらの投稿]\"\n\"(https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-\"\n\"are-hard/) で詳しく説明していますので、深く掘り下げたい方はご覧ください。\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-\"\n\"return-types): short for [return-position `impl Trait`](../../generics/impl-\"\n\"trait.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.\"\n\"html): short for return-position `impl Trait` in trait (RPIT in trait).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the `Vec`.\"\nmsgstr \"\"\n\"ランダムな時間スリープする新しいスリーパー構造体を作成し、Vec に追加してみま\"\n\"しょう。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"Future をドロップすると、その Future を再度ポーリングすることはできません。こ\"\n\"れはキャンセルと呼ばれ、どの `await` ポイントでも発生する可能性があります。そ\"\n\"のため、Future がキャンセルされた場合でも、システムが正常に動作するようにして\"\n\"おく必要があります。たとえば、デッドロックやデータの消失があってはなりませ\"\n\"ん。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\\\"not UTF-8\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"コンパイラではキャンセル安全性を確保できません。API ドキュメントを読み、\"\n\"`async fn` が保持する状態を考慮する必要があります。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"`panic` や `?`とは異なり、キャンセルは（エラー処理ではなく）通常の制御フロー\"\n\"の一部です。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"この例では、文字列の一部が失われています。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"`tick()` 分岐が先に終了するたびに、`next()` とその `buf` がドロップされます。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\"`buf` を構造体の一部にすることで、`LinesReader` にキャンセル安全性を持たせる\"\n\"ことができます。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// buf と bytes の先頭に self を付加します。\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) は、ティックが「配信済み」かどうかを追跡しているため、安全\"\n\"にキャンセルできます。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) は、データを返すか、データを読み取らないかのい\"\n\"ずれかであるため、安全にキャンセルできます。\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) はこの例と類似しており、安全にキャンセ\"\n\"ルできません。詳細と代替方法については、ドキュメントをご覧ください。\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"食事する哲学者\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a \"\n\"description of the problem.\"\nmsgstr \"\"\n\"この問題の詳細については、[食事する哲学者](dining-philosophers.md) をご覧くだ\"\n\"さい。\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"前と同様に、この演習でもローカルの [Cargo インストール](../../cargo/running-\"\n\"locally.md) が必要です。以下のコードを `src/main.rs` というファイルにコピー\"\n\"し、空欄を埋めて、`cargo run` がデッドロックしないことを確認します。\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// 哲学者が思索と食事を行うようにする\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"今回は非同期 Rust を使用するため、`tokio` 依存関係が必要になります。次の \"\n\"`Cargo.toml` を使用できます。\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"また、今度は `tokio` クレートの `Mutex` モジュールと `mpsc` モジュールを使用\"\n\"する必要があることにも注意してください。\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"実装をシングルスレッドにできますか？\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"この演習では、新たに身に付けた知識を活かしてブロードキャスト チャット アプリ\"\n\"を実装します。クライアントが接続してメッセージを公開するチャット サーバーがあ\"\n\"ります。クライアントは標準入力からユーザー メッセージを読み取り、サーバーに送\"\n\"信します。チャット サーバーは受信した各メッセージをすべてのクライアントにブ\"\n\"ロードキャストします。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"このために、サーバー上の [ブロードキャスト チャンネル](https://docs.rs/tokio/\"\n\"latest/tokio/sync/broadcast/fn.channel.html) を使用し、クライアントとサーバー\"\n\"間の通信には [`tokio_websockets`](https://docs.rs/tokio-websockets/) を使用し\"\n\"ます。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"新しい Cargo プロジェクトを作成し、次の依存関係を追加します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.31\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.41.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.10.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"必要な API\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"`tokio` と [`tokio_websockets`](https://docs.rs/tokio-websockets/) の以下の関\"\n\"数が必要になります。少し時間をかけて API に対する理解を深めてください。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"`WebSocketStream` によって実装された [StreamExt::next()](https://docs.rs/\"\n\"futures-util/0.3.28/futures_util/stream/trait.StreamExt.html#method.next): \"\n\"Websocket Stream からのメッセージを非同期で読み取ります。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"`WebSocketStream` によって実装された [SinkExt::send()](https://docs.rs/\"\n\"futures-util/0.3.28/futures_util/sink/trait.SinkExt.html#method.send): \"\n\"Websocket Stream 上でメッセージを非同期で送信します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): 標準入力からのユーザー メッセージを非同期で読み取りま\"\n\"す。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): ブロードキャスト チャンネルをサブスクラ\"\n\"イブします。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"2 つのバイナリ\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"通常、Cargo プロジェクトに含めることができるのは 1 つのバイナリと 1 つの \"\n\"`src/main.rs` ファイルのみです。このプロジェクトには 2 つのバイナリが必要で\"\n\"す。1 つはクライアント用、もう 1 つはサーバー用です。2 つの独立した Cargo プ\"\n\"ロジェクトを作成することもできますが、ここでは 1 つの Cargo プロジェクトに 2 \"\n\"つのバイナリを入れます。そのためには、クライアントとサーバーのコードを `src/\"\n\"bin` に配置する必要があります（[ドキュメント](https://doc.rust-lang.org/\"\n\"cargo/reference/cargo-targets.html#binaries) をご覧ください）。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"次のサーバーとクライアントのコードを、それぞれ`src/bin/server.rs` と `src/\"\n\"bin/client.rs` にコピーします。ここでのタスクは、以下で説明するように、これら\"\n\"のファイルを完成させることです。\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"// TODO: ヒントについては、以下のタスクの説明をご覧ください。\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"listening on port 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"New connection from {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// 未加工の TCP ストリームを WebSocket にラップします。\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"バイナリの実行\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"次のコマンドでサーバーを実行します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"次のコマンドでクライアントを実行します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"`src/bin/server.rs` に `handle_connection` 関数を実装します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"ヒント: 2 つのタスクを連続ループで同時に実行するには、`tokio::select!` を使用\"\n\"します。1 つのタスクは、クライアントからメッセージを受信してブロードキャスト\"\n\"します。もう 1 つのタスクは、サーバーで受信したメッセージをクライアントに送信\"\n\"します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"`src/bin/client.rs` のメイン関数を完成させます。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"ヒント: 前の例と同様に、`tokio::select!` を連続ループで使用し、（1）標準入力\"\n\"からユーザー メッセージを読み取ってサーバーに送信するタスクと、（2）サーバー\"\n\"からメッセージを受信してユーザーに表示するタスクを同時に実行します。\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"省略可: 完了したら、メッセージの送信者以外のすべてのクライアントにメッセージ\"\n\"をブロードキャストするようにコードを変更します。\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// Keep trying until we have both forks\\n\"\n\"        // Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// ここでロックがドロップされます。\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\"// tx はここでドロップされるので、後で明示的に削除する必要はありません。\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Here is a thought: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Welcome to chat! Type a message\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// (1) `ws_stream` からメッセージを受信してブロードキャストするタスクと、\\n\"\n\"    // （2）`bcast_rx` でメッセージを受信してクライアントに送信しするタスク\"\n\"を\\n\"\n\"    // 同時に実行するための連続ループ。\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"From client {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// メッセージの同時送受信のための継続的なループ。\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"From server: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"Comprehensive Rust 🦀! を受講いただきありがとうございました。\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"ここまで多くのことを学んできましたが、このコースは完璧ではないため、間違いを\"\n\"見つけた場合や改善のアイデアがある場合は [GitHub でお知らせください](https://\"\n\"github.com/google/comprehensive-rust/discussions)。皆さんからのフィードバック\"\n\"をお待ちしています。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"以下は、Rust の多くの用語を簡単に定義することを目的とした用語集です。翻訳時に\"\n\"用語を英語の原文に関連付けるのにも役立ちます。\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/review.md).\"\nmsgstr \"\"\n\"割り当て（allocate）:  \\n\"\n\"[ヒープ](memory-management/stack-vs-heap.md) での動的メモリ割り当て。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"引数（argument）:  \\n\"\n\"関数またはメソッドに渡される情報。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"associated type:  \\n\"\n\"A type associated with a specific trait. Useful for defining the \"\n\"relationship between types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"ベアメタル Rust（Bare-metal Rust）:  \\n\"\n\"低レベルの Rust 開発。多くの場合、オペレーティング システムのないシステムにデ\"\n\"プロイされます。[ベアメタル Rust](bare-metal.md) をご覧ください。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_.\"\nmsgstr \"\"\n\"ブロック（block）:  \\n\"\n\"[ブロック](control-flow/blocks.md) とスコープをご覧ください。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](borrowing/shared.md).\"\nmsgstr \"\"\n\"借用（borrow）:  \\n\"\n\"[借用](ownership/borrowing.md) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"借用チェッカー（borrow checker）:  \\n\"\n\"Rust コンパイラの一部。すべての借用が有効かどうかをチェックします。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"中かっこ（brace）:  \\n\"\n\"`{` and `}`。ブロックを区切ります。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"ビルド（build）:  \\n\"\n\"ソースコードを実行可能なコードまたは使用可能なプログラムに変換するプロセス。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"呼び出し（call）:  \\n\"\n\"関数またはメソッドを呼び出します。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"チャンネル（channel）:  \\n\"\n\"[スレッド間](concurrency/channels.md) でメッセージを安全に渡すために使用され\"\n\"ます。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"このコースは、まとめて Comprehensive Rust 🦀 と呼びます。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"同時実行（concurrency）:  \\n\"\n\"複数のタスクまたはプロセスを同時に実行することを指します。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency/welcome.md).\"\nmsgstr \"\"\n\"Rust での同時実行（Concurrency in Rust）:  \\n\"\n\"[Rust での同時実行](concurrency.md) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"定数（constant）:  \\n\"\n\"プログラムの実行中に変更されない値。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"制御フロー（control flow）:  \\n\"\n\"個々のステートメントまたは命令がプログラム内で実行される順序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"クラッシュ（crash）:  \\n\"\n\"予期しない制御不能なエラーまたは終了。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"列挙型（enumeration）:  \\n\"\n\"複数の名前付き定数のうちの 1 つを保持するデータ型。関連するタプルまたは構造体\"\n\"を伴う場合があります。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"エラー（error）:  \\n\"\n\"想定された動作から逸脱した、予期しない条件または結果。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"エラー処理（error handling）:  \\n\"\n\"プログラムの実行中に発生するエラーを管理し、それに対応するプロセス。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"演習（exercise:）:  \\n\"\n\"プログラミング スキルの向上とテストを目的としたタスクまたは問題。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"関数（function）:  \\n\"\n\"特定のタスクを実行する再利用可能なコードブロック。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"ガベージ コレクタ（garbage collector）:  \\n\"\n\"使用されなくなったオブジェクトが占有していたメモリを自動的に解放するメカニズ\"\n\"ム。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"ジェネリクス（generics）:  \\n\"\n\"型のプレースホルダを使用してコードを記述し、さまざまなデータ型でコードを再利\"\n\"用できるようにする機能。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"不変（immutable）:  \\n\"\n\" 作成後に変更できないこと。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"統合テスト（integration test）:  \\n\"\n\"システムのさまざまな部分やコンポーネント間の相互作用を検証するテストの一種。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"キーワード（keyword）:  \\n\"\n\"特定の意味を持ち、識別子として使用できない、プログラミング言語の予約語。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"ライブラリ（library）:  \\n\"\n\"プログラムで使用できるプリコンパイル済みのルーチンまたはコードのコレクショ\"\n\"ン。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"マクロ（macro）:  \\n\"\n\"Rust マクロは名前に `!` を含めることで認識できます。マクロは、通常の関数では\"\n\"不十分な場合に使用されます。典型的な例が `format!` です。これは可変長引数を取\"\n\"りますが、Rust 関数ではサポートされていません。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` 関数（`main` function）:  \\n\"\n\"Rust プログラムの実行は `main` 関数で開始されます。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"一致（match）:  \\n\"\n\"式の値に対するパターン マッチングを可能にする、Rust の制御フロー構造。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"メモリリーク（memory leak）:  \\n\"\n\"プログラムで不要になったメモリの解放に失敗し、メモリ使用量が徐々に増加する状\"\n\"況。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"メソッド（method）:  \\n\"\n\"Rust のオブジェクトまたは型に関連付けられた関数。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"モジュール（module）:  \\n\"\n\"関数、型、トレイトなどの定義を含む名前空間。Rust でコードを整理するために使用\"\n\"されます。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"移動（move）:  \\n\"\n\"Rust である変数から別の変数に値の所有権を移動すること。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"可変（mutable）:  \\n\"\n\"宣言後の変数の変更を可能にする Rust のプロパティ。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"所有権（ownership）:  \\n\"\n\"値に関連付けられたメモリの管理をコードのどの部分が担うかを定義する Rust の概\"\n\"念。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"パニック（panic）:  \\n\"\n\"プログラムの終了を引き起こす、Rust の回復不能なエラー状態。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"パラメータ（parameter）:  \\n\"\n\"関数またはメソッドが呼び出されたときに渡される値。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"パターン（pattern）:  \\n\"\n\"Rust の式と照合できる値、リテラル、構造体の組み合わせ。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"ペイロード（payload）:  \\n\"\n\"メッセージ、イベント、またはデータ構造体で保持されるデータまたは情報。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"プログラム（program）:  \\n\"\n\"特定のタスクを実行したり、特定の問題を解決したりするためにコンピュータが実行\"\n\"できる一連の命令。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"プログラミング言語（programming language）:  \\n\"\n\"コンピュータに命令を伝えるために使用される正式なシステム（Rust など）。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"レシーバ（receiver）:  \\n\"\n\"メソッドが呼び出されたインスタンスを表す Rust メソッドの最初のパラメータ。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"参照カウント（reference counting）:  \\n\"\n\"オブジェクトへの参照の数をトラッキングし、カウントがゼロになるとオブジェクト\"\n\"の割り当てを解除するメモリ管理技術。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"戻り値（return）:  \\n\"\n\"関数から返される値を示すために使用される Rust のキーワード。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"安全性、パフォーマンス、同時実行に重点を置いたシステム プログラミング言語。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Rust の基礎（Rust Fundamentals）:  \\n\"\n\"このコースの 1～3 日目。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Android での Rust（Rust in Android）:  \\n\"\n\"[Android での Rust](android.md) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Chromium での Rust（Rust in Chromium）:  \\n\"\n\"[Chromium での Rust](chromium.md) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"安全（safe）:  \\n\"\n\"Rust の所有権と借用に関するルールに従って、メモリ関連のエラーを防止するコード\"\n\"を指します。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"スコープ（scope）:  \\n\"\n\"変数が有効かつ使用可能なプログラムの領域。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"標準ライブラリ（standard library）:  \\n\"\n\"Rust の必須機能を提供するモジュールのコレクション。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"静的（static）:  \\n\"\n\"静的な変数や `'static` ライフタイムを持つアイテムを定義するために使用される \"\n\"Rust のキーワード。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\"文字列（string）:  \\n\"\n\"テキストデータを格納するデータ型。詳しくは、[`String` と `str`](basic-syntax/\"\n\"string-slices.html) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"構造体（struct）:  \\n\"\n\"異なる型の変数を 1 つの名前でグループ化する Rust の複合データ型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"テスト（test）:  \\n\"\n\"他の関数の正しさをテストする関数を含む Rust モジュール。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"スレッド（thread）:  \\n\"\n\"同時実行を可能にする、プログラム内の独立した実行シーケンス。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"スレッドセーフ（thread safety）:  \\n\"\n\"マルチスレッド環境で正しい動作を保証するプログラムの特性。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"トレイト（trait）:  \\n\"\n\"未知の型に対して定義されたメソッドのコレクション。Rust でポリモーフィズムを実\"\n\"現する方法を提供します。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"トレイト境界（trait bound）:  \\n\"\n\"特定のトレイトを実装するために型を要求できる抽象化。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"タプル（tuple）:  \\n\"\n\"さまざまな型の変数を含む複合データ型。タプル フィールドには名前がなく、序数で\"\n\"アクセスします。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"型（type）:  \\n\"\n\"Rust の特定の種類の値に対してどのオペレーションを実行できるかを指定する分類。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"型推論（type inference）:  \\n\"\n\"変数または式の型を推測する Rust コンパイラの機能。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"未定義の動作（undefined behavior）:  \\n\"\n\"結果が指定されていない Rust のアクションまたは条件。多くの場合、プログラムの\"\n\"予測不能な動作を引き起こします。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"共用体（union）:  \\n\"\n\"異なる型の値を一度に 1 つだけ保持できるデータ型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"単体テスト（unit test）:  \\n\"\n\"Rust には、小規模な単体テストと大規模な統合テストを実行するための組み込みサ\"\n\"ポートが付属しています。[単体テスト](testing/unit-tests.html) をご覧くださ\"\n\"い。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"ユニット型（unit type）:  \\n\"\n\"データを保持しない型。メンバーのないタプルとして記述されます。\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe-rust/unsafe.md).\"\nmsgstr \"\"\n\"安全でない（unsafe）:  \\n\"\n\"未定義の動作をトリガーできる Rust のサブセット。[安全でない Rust](unsafe.\"\n\"html) をご覧ください。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"変数（variable）:  \\n\"\n\"データを格納するメモリの場所。変数はスコープ内で有効です。\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Rust のその他のリソース\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Rust コミュニティは、高品質な無料のリソースをオンラインで多数提供しています。\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"正式なドキュメント\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"Rust プロジェクトは多くのリソースをホストしており、これらは Rust 全般に対応し\"\n\"ています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): Rust の標準\"\n\"的な書籍で、無料で利用できます。Rust について詳しく説明されているほか、ビルド\"\n\"できるプロジェクトがいくつか含まれています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): さまざまな構造\"\n\"を示す一連のサンプルを使用して、Rust の構文を解説しています。小規模な演習がい\"\n\"くつか用意されており、そこでサンプルのコードを拡張するよう求められます。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): Rust の標準ライブラ\"\n\"リの完全なドキュメントです。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): Rust の文法とメモ\"\n\"リモデルについて説明している未完成の書籍です。\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Rust の公式サイトでホストされている、より専門的なガイド:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): 未加工のポインタの操\"\n\"作や、他の言語（FFI）とのやり取りなど、安全でない Rust について説明していま\"\n\"す。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"Rust Book の執筆後に導入された新しい非同期プログラミング モデルについて説明し\"\n\"ています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): オ\"\n\"ペレーティング システムのない組み込みデバイスで Rust を使用する方法を紹介して\"\n\"います。\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"非公式の学習教材\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Rust に関するその他のガイドとチュートリアル:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): 高度な知識を\"\n\"持たない C プログラマーの視点で Rust を解説しています。\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): covers Rust from the perspective of developers who \"\n\"write firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): ファームウェアを C で記述するデベロッパーの観点から Rust を解説\"\n\"しています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): 他の\"\n\"言語（C、C++、Java、JavaScript、Python など）と並べて比較しながら、Rust の構\"\n\"文について説明しています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): Rust の学習に役立つ \"\n\"100 以上の演習が用意されています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): Rust 言語の基本的な部分と高度な部分の両方をカバーした、\"\n\"一連のコンパクトなプレゼンテーションです。WebAssembly、async / await などの他\"\n\"のトピックも扱っています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-\"\n\"testing/): a self-paced workshop that goes beyond Rust's built-in testing \"\n\"framework. It covers `googletest`, snapshot testing, mocking as well as how \"\n\"to write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/ja-jp/shows/beginners-\"\n\"series-to-rust/) および [Take your first steps with Rust](https://docs.\"\n\"microsoft. com/en-us/learn/paths/rust-first-steps/): 初心者のデベロッパーを対\"\n\"象とした 2 つの Rust ガイドです。1 つ目は 35 個の動画で構成され、2 つ目は \"\n\"Rust の構文と基本的な構造を説明する 11 のモジュールで構成されています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): いくつかの異なるタイプのリスト構造の実装を通じ\"\n\"て、Rust のメモリ管理ルールを深く掘り下げています。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Rust に関するその他の書籍については、[Little Book of Rust Books](https://\"\n\"lborb.github.io/book/) をご覧ください。\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"ここで紹介する教材は、多くの優れた Rust ドキュメントのソースに基づいていま\"\n\"す。役立つリソースの一覧については、[その他のリソース](other-resources.md) の\"\n\"ページをご覧ください。\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Comprehensive Rust の教材は、Apache 2.0 ライセンスの規約により使用が許諾され\"\n\"ています。詳細については、[`LICENSE`](https://github.com/google/\"\n\"comprehensive-rust/blob/main/LICENSE) をご覧ください。\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"一部の例と演習は、[Rust by Example](https://doc.rust-lang.org/rust-by-\"\n\"example/) からコピーして編集したものです。ライセンス規約などの詳細について\"\n\"は、`third_party/rust-by-example/` ディレクトリを参照してください。\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"一部の演習は、[Rust on Exercism](https://exercism.org/tracks/rust) をコピーし\"\n\"て編集したものです。ライセンス規約などの詳細については、`third_party/rust-on-\"\n\"exercism/` ディレクトリを参照してください。\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"[C++ との相互運用性](android/interoperability/cpp.md) セクションでは、[CXX]\"\n\"(https://cxx.rs/) の画像を使用しています。ライセンス規約などの詳細について\"\n\"は、`third_party/cxx/` ディレクトリを参照してください。\"\n\n#, fuzzy\n#~ msgid \"Slices: `&[T]`\"\n#~ msgstr \"スライス型\"\n\n#~ msgid \"`thiserror` and `anyhow`\"\n#~ msgstr \"`thiserror` と `anyhow`\"\n\n#, fuzzy\n#~ msgid \"Slices: &\\\\[T\\\\]\"\n#~ msgstr \"スライス型\"\n\n#~ msgid \"\"\n#~ \"Question: What happens if you modify `a[3]` right before printing `s`?\"\n#~ msgstr \"質問: `s` を出力する直前に `a[3]` を変更するとどうなるでしょうか？\"\n\n#~ msgid \"\"\n#~ \"The question about modifying `a[3]` can spark an interesting discussion, \"\n#~ \"but the answer is that for memory safety reasons you cannot do it through \"\n#~ \"`a` at this point in the execution, but you can read the data from both \"\n#~ \"`a` and `s` safely. It works before you created the slice, and again \"\n#~ \"after the `println`, when the slice is no longer used.\"\n#~ msgstr \"\"\n#~ \"`a[3]` の変更に関する質問は興味深い議論のきっかけになるかもしれませんが、\"\n#~ \"メモリ安全性上の理由から、この時点では `a` を使用して変更することはできな\"\n#~ \"い、という回答になります。ただし、`a` と `s` の両方のデータを安全に読み取\"\n#~ \"ることはできます。これは、スライスを作成する前と、`println` の後でスライス\"\n#~ \"が使用されなくなったあとであれば、変更することが出来ます。\"\n\n#~ msgid \"\"\n#~ \"Save the result of `divide_in_two` in the `result` variable and `match` \"\n#~ \"it in a loop. That won't compile because `msg` is consumed when matched. \"\n#~ \"To fix it, match `&result` instead of `result`. That will make `msg` a \"\n#~ \"reference so it won't be consumed. This [\\\"match ergonomics\\\"](https://\"\n#~ \"rust-lang.github.io/rfcs/2005-match-ergonomics.html) appeared in Rust \"\n#~ \"2018. If you want to support older Rust, replace `msg` with `ref msg` in \"\n#~ \"the pattern.\"\n#~ msgstr \"\"\n#~ \"`divide_in_two` の結果を `result` 変数に保存し、ループで `match` します。\"\n#~ \"一致した場合は `msg` が使用されるため、コンパイルされません。これを修正す\"\n#~ \"るには、`result` ではなく `&result` でマッチします。これにより、`msg` は参\"\n#~ \"照になるため、使用されなくなります。この [「マッチエルゴノミクス」]\"\n#~ \"(https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) は、Rust \"\n#~ \"2018 で登場しました。古いRustをサポートする場合は、パターン内の`msg`を\"\n#~ \"`ref msg` に置き換えてください。\"\n\n#~ msgid \"\"\n#~ \"If you finish early, try writing a test that results in division by zero \"\n#~ \"or integer overflow. How could you handle this with `Result` instead of a \"\n#~ \"panic?\"\n#~ msgstr \"\"\n#~ \"早めに終了した場合は、ゼロ除算や整数オーバーフローが発生するテストを記述し\"\n#~ \"てみてください。`Result` を使用して、パニックを発生させずにこれを処理する\"\n#~ \"にはどうすればよいでしょうか。\"\n\n#~ msgid \"\"\n#~ \"The niche optimization means that `Option<T>` often has the same size in \"\n#~ \"memory as `T`.\"\n#~ msgstr \"\"\n#~ \"ニッチな最適化とは、`Option<T>` がメモリ内で `T` と同じサイズであることが\"\n#~ \"多いということです。\"\n\n#~ msgid \"\"\n#~ \"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to \"\n#~ \"make examples easier. Using references in collections can, of course, be \"\n#~ \"done, but it can lead into complications with the borrow checker.\"\n#~ msgstr \"\"\n#~ \"ここでは `HashMap<String, i32>` を示していますが、例を簡単にするために \"\n#~ \"`&str` をキーとして使用しないようにしています。もちろん、コレクション内で\"\n#~ \"参照を使用することもできますが、それによって借用チェッカーが複雑になる可能\"\n#~ \"性があります。\"\n\n#~ msgid \"\"\n#~ \"Try removing `to_string()` from the example above and see if it still \"\n#~ \"compiles. Where do you think we might run into issues?\"\n#~ msgstr \"\"\n#~ \"上記の例から `to_string()` を削除して、まだコンパイルできるかどうかを確認\"\n#~ \"します。どこで問題が発生するでしょうか。\"\n\n#~ msgid \"\"\n#~ \"By default, closures will capture by reference if they can. The `move` \"\n#~ \"keyword makes them capture by value.\"\n#~ msgstr \"\"\n#~ \"デフォルトでは、可能であれば、クロージャは参照によってキャプチャします。\"\n#~ \"`move` キーワードを使用すると、クロージャは値によってキャプチャします。\"\n\n#~ msgid \"Niche Optimization\"\n#~ msgstr \"Niche最適化\"\n\n#, fuzzy\n#~ msgid \"\\\"Optional box\\\"\"\n#~ msgstr \"Option\"\n\n#, fuzzy\n#~ msgid \"\\\"Size of none: {}\\\"\"\n#~ msgstr \"\\\"before: {a}\\\"\"\n\n#~ msgid \"Luhn Algorithm\"\n#~ msgstr \"Luhnアルゴリズム\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n#~ \"minutes. It contains:\"\n#~ msgstr \"\"\n#~ \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間 15 分です。\"\n\n#, fuzzy\n#~ msgid \"thiserror and anyhow\"\n#~ msgstr \"`thiserror` と `anyhow`\"\n\n#~ msgid \"\"\n#~ \"Make sure to implement the `std::error::Error` trait when defining a \"\n#~ \"custom error type so it can be boxed. But if you need to support the \"\n#~ \"`no_std` attribute, keep in mind that the `std::error::Error` trait is \"\n#~ \"currently compatible with `no_std` in [nightly](https://github.com/rust-\"\n#~ \"lang/rust/issues/103765) only.\"\n#~ msgstr \"\"\n#~ \"カスタムのエラー型を定義する際は、必ず `std::error::Error` トレイトを実装\"\n#~ \"し、ボックス化できるようにしてください。ただし `no_std` 属性をサポートする\"\n#~ \"必要がある場合は、`std::error::Error` トレイトは現在、[ナイトリー]\"\n#~ \"(https://github.com/rust-lang/rust/issues/103765) においてのみ`no_std`と互\"\n#~ \"換性があることに注意してください。\"\n\n#~ msgid \"\"\n#~ \"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.\"\n#~ \"rs/anyhow/) crates are widely used to simplify error handling.\"\n#~ msgstr \"\"\n#~ \"[`thiserror`](https://docs.rs/thiserror/) クレートと [`anyhow`](https://\"\n#~ \"docs.rs/anyhow/) クレートは、エラー処理を簡素化するために広く使用されてい\"\n#~ \"ます。\"\n\n#~ msgid \"\"\n#~ \"`thiserror` is often used in libraries to create custom error types that \"\n#~ \"implement `From<T>`.\"\n#~ msgstr \"\"\n#~ \"`thiserror`は、`From<T>` を実装するカスタムのエラー型を作成するためにライ\"\n#~ \"ブラリで頻繁に使用されます。\"\n\n#~ msgid \"\"\n#~ \"`anyhow` is often used by applications to help with error handling in \"\n#~ \"functions, including adding contextual information to your errors.\"\n#~ msgstr \"\"\n#~ \"`anyhow` は、エラーにコンテキスト情報を追加するなど、関数内でのエラー処理\"\n#~ \"のためにアプリでよく使用されます。\"\n\n#~ msgid \"The `std::error::Error` trait is derived automatically.\"\n#~ msgstr \"`std::error::Error` トレイトは自動的に導出されます。\"\n\n#~ msgid \"\"\n#~ \"Actual error type inside of it can be extracted for examination if \"\n#~ \"necessary.\"\n#~ msgstr \"必要に応じて、内部の実際のエラー型を抽出して調べることができます。\"\n\n#~ msgid \"// SAFETY: self.dir is not NULL.\\n\"\n#~ msgstr \"// 安全: self.dir は NULL ではありません。\\n\"\n\n#~ msgid \"\"\n#~ \"We will attempt to call Rust from one of your own projects today. So try \"\n#~ \"to find a little corner of your code base where we can move some lines of \"\n#~ \"code to Rust. The fewer dependencies and \\\"exotic\\\" types the better. \"\n#~ \"Something that parses some raw bytes would be ideal.\"\n#~ msgstr \"\"\n#~ \"本日は、皆さんのプロジェクトの一つから Rust を呼び出してみたいと思います。\"\n#~ \"コードベースの小さな隅を見つけて、数行のコードを Rust に書き換えてみましょ\"\n#~ \"う。依存関係が少なく、「珍しい」型がよいでしょう。未加工のバイトを解析する\"\n#~ \"ものが理想的です。\"\n\n#~ msgid \"\"\n#~ \"There is a plan to transition [Android](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n#~ \"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction) to Bazel.\"\n#~ msgstr \"\"\n#~ \"[Android](https://source.android.com/docs/setup/build/bazel/\"\n#~ \"introduction)、[ChromeOS](https://chromium.googlesource.com/chromiumos/\"\n#~ \"bazel/)、[Fuchsia](https://source.android.com/docs/setup/build/bazel/\"\n#~ \"introduction) を Bazel に移行する計画があります。\"\n\n#~ msgid \"\"\n#~ \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\n#~ msgstr \"\"\n#~ \"Bazel のようなビルドルールを学ぶことは、すべての Rust OS デベロッパーに役\"\n#~ \"立ちます。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.\"\n#~ \"aidl**:\"\n#~ msgstr \"\"\n#~ \"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#, fuzzy\n#~ msgid \"**birthday_service/src/client.rs**:\"\n#~ msgstr \"_birthday_service/src/client.rs_:\"\n\n#, fuzzy\n#~ msgid \"**birthday_service/src/lib.rs**:\"\n#~ msgstr \"_birthday_service/src/lib.rs_:\"\n\n#~ msgid \"/// Analyze the numbers.\\n\"\n#~ msgstr \"/// 数値を分析します。\\n\"\n\n#~ msgid \"\"\n#~ \"This is a group exercise: We will look at one of the projects you work \"\n#~ \"with and try to integrate some Rust into it. Some suggestions:\"\n#~ msgstr \"\"\n#~ \"これはグループ演習です。皆さんが取り組んでいるプロジェクトの一つを題材に、\"\n#~ \"そこに Rust を統合してみましょう。以下にヒントを示します。\"\n\n#~ msgid \"Call your AIDL service with a client written in Rust.\"\n#~ msgstr \"\"\n#~ \"Rust で記述されたクライアントを使用して AIDL サービスを呼び出します。\"\n\n#~ msgid \"Move a function from your project to Rust and call it.\"\n#~ msgstr \"プロジェクトから Rust に関数を移動して呼び出します。\"\n\n#~ msgid \"\"\n#~ \"No solution is provided here since this is open-ended: it relies on \"\n#~ \"someone in the class having a piece of code which you can turn in to Rust \"\n#~ \"on the fly.\"\n#~ msgstr \"\"\n#~ \"この演習は自由回答形式であるため、解答は用意されていません。クラスの誰かが\"\n#~ \"コードを持っていて、その場で Rust に変換できることを前提としています。\"\n\n#~ msgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\n#~ msgstr \"`pointer::read_volatile`と`pointer::write_volatile`を使います。\"\n\n#~ msgid \"What is the return type of an async call?\"\n#~ msgstr \"非同期の呼び出しの返り値の型は？\"\n\n#~ msgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\n#~ msgstr \"\"\n#~ \"型を知るために`main`で`let future: () = async_main(10);`を使ってみてくださ\"\n#~ \"い。\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"条件文\"\n\n#, fuzzy\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"ライフタイム\"\n\n#~ msgid \"String References\"\n#~ msgstr \"Stringの参照\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"制御フロー\"\n\n#~ msgid \"Day 1 Morning (3 hours, including breaks)\"\n#~ msgstr \"1 日目の午前（休憩を含めて 3 時間）\"\n\n#~ msgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[ようこそ](../welcome-day-1.md)（5 分）\"\n\n#~ msgid \"[Hello, World](../hello-world.md) (20 minutes)\"\n#~ msgstr \"[Hello, World](../hello-world.md)（20 分）\"\n\n#~ msgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[型と値](../types-and-values.md)（1 時間 5 分）\"\n\n#~ msgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\n#~ msgstr \"[制御フローの基本](../control-flow-basics.md)（1 時間）\"\n\n#~ msgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\n#~ msgstr \"[タプルと配列](../tuples-and-arrays.md)（1 時間）\"\n\n#~ msgid \"[References](../references.md) (50 minutes)\"\n#~ msgstr \"[参照](../references.md)（50 分）\"\n\n#~ msgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\n#~ msgstr \"[ユーザー定義型](../user-defined-types.md)（50 分）\"\n\n#~ msgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](../welcome-day-2.md)（3 分）\"\n\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[パターン マッチング](../pattern-matching.md)（50 分）\"\n\n#~ msgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[メソッドとトレイト](../methods-and-train.md)（55 分）\"\n\n#~ msgid \"[Generics](../generics.md) (45 minutes)\"\n#~ msgstr \"[ジェネリクス](../generics.md)（45 分）\"\n\n#~ msgid \"Day 2 Afternoon (3 hours, including breaks)\"\n#~ msgstr \"2 日目の午後（休憩を含めて 3 時間）\"\n\n#~ msgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[標準ライブラリ型](../std-types.md)（1 時間 10 分）\"\n\n#~ msgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"[標準ライブラリ トレイト](../std-train.md)（1 時間 40 分）\"\n\n#~ msgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](../welcome-day-3.md)（3 分）\"\n\n#~ msgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[メモリ管理](../memory-management.md)（1 時間 10 分）\"\n\n#~ msgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[スマート ポインタ](../smart-pointers.md)（45 分）\"\n\n#~ msgid \"[Borrowing](../borrowing.md) (1 hour)\"\n#~ msgstr \"[借用](../borrowing.md)（1 時間）\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[スライスとライフタイム](../slices-and-lifetimes.md)（1 時間 10 分）\"\n\n#~ msgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](../welcome-day-4.md)（3 分）\"\n\n#~ msgid \"[Iterators](../iterators.md) (45 minutes)\"\n#~ msgstr \"[イテレータ](../iterators.md)（45 分）\"\n\n#~ msgid \"[Modules](../modules.md) (40 minutes)\"\n#~ msgstr \"[モジュール](../modules.md)（40 分）\"\n\n#~ msgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[テスト](../testing.md)（1 時間 5 分）\"\n\n#~ msgid \"Day 4 Afternoon (2 hours, including breaks)\"\n#~ msgstr \"4 日目の午後（休憩を含めて 2 時間）\"\n\n#~ msgid \"[Error Handling](../error-handling.md) (45 minutes)\"\n#~ msgstr \"[エラー処理](../error-handling.md)（45 分）\"\n\n#~ msgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Unsafe Rust](../unsafe-rust.md)（1 時間 5 分）\"\n\n#~ msgid \"Arrow-Left\"\n#~ msgstr \"Arrow-Left\"\n\n#~ msgid \"Arrow-Right\"\n#~ msgstr \"Arrow-Right\"\n\n#~ msgid \"Ctrl + Enter\"\n#~ msgstr \"Ctrl + Enter\"\n\n#~ msgid \"s\"\n#~ msgstr \"s\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"ボックス内にフォーカスがある状態で\"\n\n#~ msgid \"In this session:\"\n#~ msgstr \"このセッションの内容:\"\n\n#~ msgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[ようこそ](./welcome-day-1.md)（5 分）\"\n\n#~ msgid \"[Hello, World](./hello-world.md) (20 minutes)\"\n#~ msgstr \"[Hello, World](./hello-world.md)（20 分）\"\n\n#~ msgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[型と値](./types-and-values.md)（1 時間 5 分）\"\n\n#~ msgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\n#~ msgstr \"[制御フローの基本](./control-flow-basics.md)（1 時間）\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 3 hours\"\n#~ msgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 3 時間です。\"\n\n#~ msgid \"In this segment:\"\n#~ msgstr \"このセグメントの内容:\"\n\n#~ msgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\n#~ msgstr \"[Rust とは](./hello-world/what-is-rust.md)（10 分）\"\n\n#~ msgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\n#~ msgstr \"[Hello, World](./hello-world/hello-world.md)（5 分）\"\n\n#~ msgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\n#~ msgstr \"[Rust のメリット](./hello-world/benefits.md)（3 分）\"\n\n#~ msgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\n#~ msgstr \"[プレイグラウンド](./hello-world/playground.md)（2 分）\"\n\n#~ msgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\n#~ msgstr \"[変数](./types-and-values/variables.md)（5 分）\"\n\n#~ msgid \"[Values](./types-and-values/values.md) (10 minutes)\"\n#~ msgstr \"[値](./types-and-values/values.md)（10 分）\"\n\n#~ msgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\n#~ msgstr \"[算術](./types-and-values/arithmetic.md)（5 分）\"\n\n#~ msgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\n#~ msgstr \"[文字列](./types-and-values/strings.md)（10 分）\"\n\n#~ msgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\n#~ msgstr \"[型推論](./types-and-values/inference.md)（5 分）\"\n\n#~ msgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: フィボナッチ](./types-and-values/exercise.md)（30 分）\"\n\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"Rust には文字列を表す 2 つの型があります。どちらも後ほど詳しく説明します。\"\n#~ \"両方とも、 _常に_ UTF-8 でエンコードされた文字列を格納します。\"\n\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` - 変更可能で、所有権をもつ文字列。\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"`&str` - 読み取り専用の文字列。文字列リテラルはこの型です。\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"final sentence: {}\\\"\"\n\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"このスライドでは文字列を紹介します。ここで取り上げた内容については後ほど詳\"\n#~ \"しく説明しますが、以降のスライドや演習で文字列を使用するにはこれで十分で\"\n#~ \"す。\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"文字列内の無効な UTF-8 は UB であり、Safe Rust では許可されません。\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String` は、コンストラクタ（`::new()` と `s.push_str(..)` などのメソッ\"\n#~ \"ド）を持つユーザー定義型です。\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"`&str` 内の `&` は、これが参照であることを示します。参照については後ほど説\"\n#~ \"明しますので、ここでは `&str` を、「読み取り専用の文字列」を意味する単位と\"\n#~ \"考えてください。\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"コメントアウトされた行は、バイト位置で文字列をインデックス化しています。\"\n#~ \"`12..13` は文字境界で終わっていないため、プログラムはパニックします。エ\"\n#~ \"ラー メッセージに基づいて、適切な範囲に調整してください。\"\n\n#~ msgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\n#~ msgstr \"[条件文](./control-flow-basics/conditionals.md)（5 分）\"\n\n#~ msgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\n#~ msgstr \"[ループ](./control-flow-basics/loops.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[break と continue](./control-flow-basics/break-continue.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[ブロックとスコープ](./control-flow-basics/blocks-and-scopes.md)（10 分）\"\n\n#~ msgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\n#~ msgstr \"[関数](./control-flow-basics/functions.md)（3 分）\"\n\n#~ msgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\n#~ msgstr \"[マクロ](./control-flow-basics/macros.md)（2 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"[演習: コラッツ数列](./control-flow-basics/exercise.md)（30 分）\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"Rust の構文の多くは、C、C++、Java で見覚えがあるでしょう。\"\n\n#, fuzzy\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"CやC++と同様に、ブロックは波括弧で囲みます。\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"行コメントは `//` で始まり、ブロック コメントは `/* ... */` で区切られま\"\n#~ \"す。\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"`if` や `while` などのキーワードの動作は同じです。\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"変数の代入は `=` で行われ、比較は `==` で行われます。\"\n\n#~ msgid \"\"\n#~ \"We will discuss iteration later; for now, just stick to range expressions.\"\n#~ msgstr \"\"\n#~ \"反復処理については後で説明しますので、ここでは範囲式だけに注目してくださ\"\n#~ \"い。\"\n\n#~ msgid \"\\\"{result}\\\"\"\n#~ msgstr \"\\\"{result}\\\"\"\n\n#~ msgid \"\\\"x: {x}, i: {i}\\\"\"\n#~ msgstr \"\\\"x: {x}, i: {i}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"上の例では、内側のループを 3 回イテレーションしたのちに外側のループを抜け\"\n#~ \"ることになります。\"\n\n#~ msgid \"1\"\n#~ msgstr \"1\"\n\n#~ msgid \" greater than zero:\"\n#~ msgstr \"  に対して、次のように定義されます。\"\n\n#~ msgid \"If _n\"\n#~ msgstr \"_n\"\n\n#~ msgid \"i\"\n#~ msgstr \"i\"\n\n#~ msgid \"_.\"\n#~ msgstr \"_で終了します。\"\n\n#~ msgid \"_ is even, then _n\"\n#~ msgstr \"_ が偶数の場合、_n\"\n\n#~ msgid \"i+1\"\n#~ msgstr \"i+1\"\n\n#~ msgid \" = n\"\n#~ msgstr \" = n\"\n\n#~ msgid \" / 2_.\"\n#~ msgstr \" / 2_ になります。\"\n\n#~ msgid \"_ is odd, then _n\"\n#~ msgstr \"_ が奇数の場合、_n\"\n\n#~ msgid \" = 3 * n\"\n#~ msgstr \" = 3 * n\"\n\n#~ msgid \" + 1_.\"\n#~ msgstr \" + 1_ になります。\"\n\n#~ msgid \"_ = 3:\"\n#~ msgstr \"_ = 3 で始まる場合は以下のようになります。\"\n\n#~ msgid \"3 is odd, so _n\"\n#~ msgstr \"3 は奇数なので、_n\"\n\n#~ msgid \"2\"\n#~ msgstr \"2\"\n\n#~ msgid \"_ = 3 * 3 + 1 = 10;\"\n#~ msgstr \"_ = 3 * 3 + 1 = 10 になります。\"\n\n#~ msgid \"10 is even, so _n\"\n#~ msgstr \"10 は偶数なので、_n\"\n\n#~ msgid \"_ = 10 / 2 = 5;\"\n#~ msgstr \"_ = 10 / 2 = 5 になります。\"\n\n#~ msgid \"5 is odd, so _n\"\n#~ msgstr \"5 は奇数なので、_n\"\n\n#~ msgid \"_ = 3 * 5 + 1 = 16;\"\n#~ msgstr \"_ = 3 * 5 + 1 = 16 になります。\"\n\n#~ msgid \"16 is even, so _n\"\n#~ msgstr \"16 は偶数なので、_n\"\n\n#~ msgid \"5\"\n#~ msgstr \"5\"\n\n#~ msgid \"_ = 16 / 2 = 8;\"\n#~ msgstr \"_ = 16 / 2 = 8 になります。\"\n\n#~ msgid \"8 is even, so _n\"\n#~ msgstr \"8 は偶数なので、_n\"\n\n#~ msgid \"_ = 8 / 2 = 4;\"\n#~ msgstr \"_ = 8 / 2 = 4 になります。\"\n\n#~ msgid \"4 is even, so _n\"\n#~ msgstr \"4 は偶数なので、_n\"\n\n#~ msgid \"7\"\n#~ msgstr \"7\"\n\n#~ msgid \"_ = 4 / 2 = 2;\"\n#~ msgstr \"_ = 4 / 2 = 2 になります。\"\n\n#~ msgid \"2 is even, so _n\"\n#~ msgstr \"2 は偶数なので、_n\"\n\n#~ msgid \"_ = 1; and\"\n#~ msgstr \"_ = 1 になります。\"\n\n#~ msgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\n#~ msgstr \"[タプルと配列](./tuples-and-arrays.md)（1 時間）\"\n\n#~ msgid \"[References](./references.md) (50 minutes)\"\n#~ msgstr \"[参照](./references.md)（50 分）\"\n\n#~ msgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\n#~ msgstr \"[ユーザー定義型](./user-defined-types.md)（50 分）\"\n\n#~ msgid \"\"\n#~ \"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\n#~ msgstr \"[タプルと配列](./tuples-and-arrays/tuples-and-arrays.md)（10 分）\"\n\n#~ msgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\n#~ msgstr \"[配列の反復処理](./tuples-and-arrays/iteration.md)（3 分）\"\n\n#~ msgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\n#~ msgstr \"[パターン マッチング](./tuples-and-arrays/match.md)（10 分）\"\n\n#~ msgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\n#~ msgstr \"[分解](./tuples-and-arrays/destructuring.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: ネストされた配列](./tuples-and-arrays/exercise.md)（30 分）\"\n\n#~ msgid \"\"\n#~ \"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n#~ \"elements of an array have the same type, while tuples can accommodate \"\n#~ \"different types. Both types have a size fixed at compile time.\"\n#~ msgstr \"\"\n#~ \"タプルと配列は、このコースで初めて扱う「複合」型です。配列のすべての要素の\"\n#~ \"型は同じですが、タプルは異なる型に対応できます。どちらの型もコンパイル時に\"\n#~ \"サイズが固定されます。\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`、`[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`、`(T,)`、`(T1, T2)`、...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`、`('x',)`、`('x', 1.2)`、...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"配列の代入とアクセス:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"タプルの代入とアクセス:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"配列:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"タプル:\"\n\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"空のタプル `()` は、「ユニット型」とも呼ばれます。これは型であるとともに、\"\n#~ \"その型で唯一の有効な値です。つまり、型とその値の両方が `()` として表現され\"\n#~ \"ます。以降のスライドで説明するように、これは関数や式に戻り値がないことを示\"\n#~ \"す場合などに使用されます。\"\n\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"これは、他のプログラミング言語で馴染みのある `void` と考えることができま\"\n#~ \"す。\"\n\n#~ msgid \"\"\n#~ \"Destructuring is a way of extracting data from a data structure by \"\n#~ \"writing a pattern that is matched up to the data structure, binding \"\n#~ \"variables to subcomponents of the data structure.\"\n#~ msgstr \"\"\n#~ \"分解とは、データ構造に一致するパターンを記述し、変数をデータ構造のサブコン\"\n#~ \"ポーネントにバインドすることで、データ構造からデータを抽出する方法です。\"\n\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"タプルと配列は、要素を照合することで分解できます。\"\n\n#~ msgid \"\\\"on Y axis\\\"\"\n#~ msgstr \"\\\"on Y axis\\\"\"\n\n#~ msgid \"\\\"on X axis\\\"\"\n#~ msgstr \"\\\"on X axis\\\"\"\n\n#~ msgid \"\\\"left of Y axis\\\"\"\n#~ msgstr \"\\\"left of Y axis\\\"\"\n\n#~ msgid \"\\\"below X axis\\\"\"\n#~ msgstr \"\\\"below X axis\\\"\"\n\n#~ msgid \"\\\"first quadrant\\\"\"\n#~ msgstr \"\\\"first quadrant\\\"\"\n\n#~ msgid \"\\\"Tell me about {triple:?}\\\"\"\n#~ msgstr \"\\\"Tell me about {triple:?}\\\"\"\n\n#~ msgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n#~ msgstr \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n\n#~ msgid \"\\\"First is 1 and the rest were ignored\\\"\"\n#~ msgstr \"\\\"First is 1 and the rest were ignored\\\"\"\n\n#~ msgid \"\\\"All elements were ignored\\\"\"\n#~ msgstr \"\\\"All elements were ignored\\\"\"\n\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"`_` を使用して要素を表す新しい配列パターンを作成します。\"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"配列に値を追加します。\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"要素数が異なる場合に `..` がどのように展開されるかを説明します。\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"パターン `[.., b]` と `[a@..,b]` で末尾を照合します。\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"3 × 3 の行列で動作するように、両方の関数をハードコードします。\"\n\n#~ msgid \"[Shared References](./references/shared.md) (10 minutes)\"\n#~ msgstr \"[共有参照](./references/shared.md)（10 分）\"\n\n#~ msgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\n#~ msgstr \"[排他参照](./references/except.md)（10 分）\"\n\n#~ msgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: ジオメトリ](./references/exercise.md)（30 分）\"\n\n#~ msgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\n#~ msgstr \"[名前付き構造体](./user-defined-types/named-structs.md)（10 分）\"\n\n#~ msgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\n#~ msgstr \"[タプル構造体](./user-defined-types/tuple-structs.md)（10 分）\"\n\n#~ msgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\n#~ msgstr \"[列挙型](./user-defined-types/enums.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\n#~ msgstr \"[static と const](./user-defined-types/static-and-const.md)（5 分）\"\n\n#~ msgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\n#~ msgstr \"[型エイリアス](./user-defined-types/aliases.md)（2 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[演習: エレベーター イベント](./user-defined-types/exercise.md)（15 分）\"\n\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"静的変数と定数変数は、プログラムの実行中に移動または再割り当てできないグ\"\n#~ \"ローバル スコープの値を作成するための、2 つの異なる方法です。\"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"プロパティの表:\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"メモリ内にアドレスがある\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"いいえ（インライン化）\"\n\n#, fuzzy\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"`main`関数はプログラムのエントリーポイントになります。\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"変更可能\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"はい（安全でない）\"\n\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"コンパイル時に評価\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"はい（コンパイル時に初期化）\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"使用場所にかかわらずインライン化\"\n\n#~ msgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](./welcome-day-2.md)（3 分）\"\n\n#~ msgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[パターン マッチング](./pattern-matching.md)（50 分）\"\n\n#, fuzzy\n#~ msgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[メソッドとトレイト](./methods-and-train.md)（45 分）\"\n\n#~ msgid \"[Generics](./generics.md) (45 minutes)\"\n#~ msgstr \"[ジェネリクス](./generics.md)（45 分）\"\n\n#~ msgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\n#~ msgstr \"[デストラクト](./pattern-matching/destructuring.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[let による制御フロー](./pattern-matching/let-control-flow.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"[演習: 式の評価](./pattern-matching/exercise.md)（30 分）\"\n\n#~ msgid \"`match` expressions\"\n#~ msgstr \"`match` 式\"\n\n#~ msgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\n#~ msgstr \"[メソッド](./methods-and-train/methods.md)（10 分）\"\n\n#~ msgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\n#~ msgstr \"[トレイト](./methods-and-features/train.md)（10 分）\"\n\n#~ msgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\n#~ msgstr \"[導出](./methods-and-train/deriving.md)（5 分）\"\n\n#~ msgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\n#~ msgstr \"[トレイトオブジェクト](./methods-and-features/train.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\n#~ msgstr \"\"\n#~ \"[演習: ジェネリックなロガー](./methods-and-train/exercise.md)（20 分）\"\n\n#~ msgid \"\"\n#~ \"Trait objects allow for values of different types, for instance in a \"\n#~ \"collection:\"\n#~ msgstr \"\"\n#~ \"トレイトオブジェクトは異なる型の値をひとつのコレクションにまとめることを可\"\n#~ \"能にします：\"\n\n#~ msgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\n#~ msgstr \"[ジェネリック関数](./generics/generic-functions.md)（5 分）\"\n\n#~ msgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\n#~ msgstr \"[ジェネリック データ型](./generics/generic-data.md)（15 分）\"\n\n#~ msgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\n#~ msgstr \"[トレイト境界](./generics/trait-bounds.md)（10 分）\"\n\n#~ msgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\n#~ msgstr \"[impl トレイト](./generics/impl-trait.md)（5 分）\"\n\n#~ msgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\n#~ msgstr \"[演習: ジェネリックな min](./generics/exercise.md)（10 分）\"\n\n#~ msgid \"// fn set_x(&mut self, x: T)\\n\"\n#~ msgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#~ msgid \"/// Return true if self is less than other.\\n\"\n#~ msgstr \"/// 自身がその他より小さい場合は true を返します。\\n\"\n\n#~ msgid \"\\\"Shapiro\\\"\"\n#~ msgstr \"\\\"Shapiro\\\"\"\n\n#~ msgid \"\\\"Baumann\\\"\"\n#~ msgstr \"\\\"Baumann\\\"\"\n\n#~ msgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[標準ライブラリ型](./std-types.md)（1 時間 10 分）\"\n\n#~ msgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"[標準ライブラリ トレイト](./std-train.md)（1 時間 40 分）\"\n\n#~ msgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\n#~ msgstr \"[標準ライブラリ](./std-types/std.md)（3 分）\"\n\n#~ msgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\n#~ msgstr \"[ドキュメント](./std-types/docs.md)（5 分）\"\n\n#~ msgid \"[Option](./std-types/option.md) (10 minutes)\"\n#~ msgstr \"[Option](./std-types/option.md)（10 分）\"\n\n#~ msgid \"[Result](./std-types/result.md) (10 minutes)\"\n#~ msgstr \"[Result](./std-types/result.md)（10 分）\"\n\n#~ msgid \"[String](./std-types/string.md) (10 minutes)\"\n#~ msgstr \"[String](./std-types/string.md)（10 分）\"\n\n#~ msgid \"[Vec](./std-types/vec.md) (10 minutes)\"\n#~ msgstr \"[Vec](./std-types/vec.md)（10 分）\"\n\n#~ msgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\n#~ msgstr \"[HashMap](./std-types/hashmap.md)（10 分）\"\n\n#~ msgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\n#~ msgstr \"[演習: カウンタ](./std-types/exercise.md)（10 分）\"\n\n#~ msgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\n#~ msgstr \"[比較](./std-lets/comparisons.md)（10 分）\"\n\n#~ msgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\n#~ msgstr \"[演算子](./std-train/operators.md)（10 分）\"\n\n#~ msgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\n#~ msgstr \"[From と Into](./std-lets/from-and-into.md)（10 分）\"\n\n#~ msgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\n#~ msgstr \"[キャスト](./std-train/casting.md)（5 分）\"\n\n#~ msgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\n#~ msgstr \"[読み取りと書き込み](./std-train/read-and-write.md)（10 分）\"\n\n#~ msgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\n#~ msgstr \"[Default、構造体更新記法](./std-lets/default.md)（5 分）\"\n\n#~ msgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\n#~ msgstr \"[クロージャ](./std-lets/closures.md)（20 分）\"\n\n#~ msgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: ROT13](./std-train/exercise.md)（30 分）\"\n\n#~ msgid \"This segment should take about 1 hour and 40 minutes\"\n#~ msgstr \"このセグメントの所要時間は約 1 時間 40 分です\"\n\n#~ msgid \"\\\"there\\\"\"\n#~ msgstr \"\\\"there\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](./welcome-day-3.md)（3 分）\"\n\n#~ msgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[メモリ管理](./memory-management.md)（1 時間 10 分）\"\n\n#~ msgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[スマート ポインタ](./smart-pointers.md)（45 分）\"\n\n#~ msgid \"\"\n#~ \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\n#~ msgstr \"[プログラム メモリの復習](./memory-management/review.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n#~ \"minutes)\"\n#~ msgstr \"[メモリ管理の方法](./memory-management/approaches.md)（10 分）\"\n\n#~ msgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\n#~ msgstr \"[所有権](./memory-management/ownership.md)（5 分）\"\n\n#~ msgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\n#~ msgstr \"[ムーブ セマンティクス](./memory-management/move.md)（10 分）\"\n\n#~ msgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\n#~ msgstr \"[Clone](./memory-management/clone.md)（2 分）\"\n\n#~ msgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\n#~ msgstr \"[Copy 型](./memory-management/copy-types.md)（5 分）\"\n\n#~ msgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\n#~ msgstr \"[Drop](./memory-management/drop.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\n#~ msgstr \"[演習: ビルダー型](./memory-management/exercise.md)（20 分）\"\n\n#~ msgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n#~ msgstr \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n\n#~ msgid \"[Box\"\n#~ msgstr \"[Box\"\n\n#~ msgid \"](./smart-pointers/box.md) (10 minutes)\"\n#~ msgstr \"](./smart-pointers/box.md)（10 分）\"\n\n#~ msgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\n#~ msgstr \"[Rc](./smart-pointers/rc.md)（5 分）\"\n\n#~ msgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: バイナリツリー](./smart-pointers/exercise.md)（30 分）\"\n\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. \"\n#~ \"This allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"`Box` を空にすることはできないため、ポインタは常に有効かつ非 `null` になり\"\n#~ \"ます。これにより、コンパイラがメモリ レイアウトを最適化できます。\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    list                    :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    list                    :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"[Borrowing](./borrowing.md) (1 hour)\"\n#~ msgstr \"[借用](./borrowing.md)（1 時間）\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[スライスとライフタイム](./slices-and-lifetimes.md)（1 時間 10 分）\"\n\n#~ msgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\n#~ msgstr \"[値の借用](./borrowing/shared.md)（10 分）\"\n\n#~ msgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\n#~ msgstr \"[借用チェック](./borrowing/borrowck.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\n#~ msgstr \"[内部可変性](./borrowing/interior-mutability.md)（10 分）\"\n\n#~ msgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: 健康に関する統計情報](./borrowing/exercise.md)（30 分）\"\n\n#~ msgid \"The Rust compiler can do return value optimization (RVO).\"\n#~ msgstr \"Rust コンパイラは戻り値の最適化（RVO）を行うことができます。\"\n\n#~ msgid \"\"\n#~ \"In C++, copy elision has to be defined in the language specification \"\n#~ \"because constructors can have side effects. In Rust, this is not an issue \"\n#~ \"at all. If RVO did not happen, Rust will always perform a simple and \"\n#~ \"efficient `memcpy` copy.\"\n#~ msgstr \"\"\n#~ \"C++ では、コンストラクタが副作用をもたらす可能性があるため、言語仕様でコ\"\n#~ \"ピー省略を定義する必要があります。Rust では、これはまったく問題になりませ\"\n#~ \"ん。RVO が行われなかった場合でも、Rust は常にシンプルで効率的な `memcpy` \"\n#~ \"コピーを実行します。\"\n\n#~ msgid \"\\\"graph: {root:#?}\\\"\"\n#~ msgstr \"\\\"graph: {root:#?}\\\"\"\n\n#~ msgid \"\\\"graph sum: {}\\\"\"\n#~ msgstr \"\\\"graph sum: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"`Rc` only allows shared (read-only) access to its contents, since its \"\n#~ \"purpose is to allow (and count) many references. But we want to modify \"\n#~ \"the value, so we need interior mutability.\"\n#~ msgstr \"\"\n#~ \"`Rc` は多くの参照を許可（およびカウント）することを目的としているため、コ\"\n#~ \"ンテンツへの共有（読み取り専用）アクセスのみを許可します。しかし、ここでは\"\n#~ \"値を変更したいので、内部可変性が必要です。\"\n\n#~ msgid \"\"\n#~ \"Demonstrate that reference loops can be created by adding `root` to \"\n#~ \"`subtree.children`.\"\n#~ msgstr \"\"\n#~ \"`subtree.children` に `root` を追加して参照ループを作成できることを示しま\"\n#~ \"す。\"\n\n#~ msgid \"\"\n#~ \"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n#~ \"`self.value` and calls the same method on its children. This will panic \"\n#~ \"in the presence of the reference loop, with `thread 'main' panicked at \"\n#~ \"'already borrowed: BorrowMutError'`.\"\n#~ msgstr \"\"\n#~ \"実行時のパニックを示すため、`self.value` をインクリメントしてその子に対し\"\n#~ \"て同じメソッドを呼び出す `fn inc(&mut self)` を追加します。これは、参照\"\n#~ \"ループがあるとパニックとなり、`thread 'main' panicked at 'already \"\n#~ \"borrowed: BorrowMutError'` というエラーが出力されます。\"\n\n#~ msgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\n#~ msgstr \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md)（10 分）\"\n\n#~ msgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\n#~ msgstr \"[文字列参照](./slices-and-lifetimes/str.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) \"\n#~ \"(10 minutes)\"\n#~ msgstr \"\"\n#~ \"[ライフタイム アノテーション](./slices-and-lifetimes/lifetime-annotations.\"\n#~ \"md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[ライフタイムの省略](./slices-and-lifetimes/lifetime-elision.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[構造体のライフタイム](./slices-and-lifetimes/struct-lifetimes.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[演習: Protobuf の解析](./slices-and-lifetimes/exercise.md)（30 分）\"\n\n#~ msgid \"\"\n#~ \"We can now understand the two string types in Rust: `&str` is almost like \"\n#~ \"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\n#~ msgstr \"\"\n#~ \"これで、Rust の 2 つの文字列型を理解できるようになりました。`&str` は \"\n#~ \"`&[char]` とほぼ同じですが、そのデータは可変長エンコード（UTF-8）で保存さ\"\n#~ \"れます。\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Rust の用語:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str`: 文字列スライスへの不変の参照。\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String`: 可変の文字列バッファ。\"\n\n#~ msgid \"\\\"Unexpected wire-type)\\\"\"\n#~ msgstr \"\\\"Unexpected wire-type)\\\"\"\n\n#~ msgid \"\\\"Invalid string (not UTF-8)\\\"\"\n#~ msgstr \"\\\"Invalid string (not UTF-8)\\\"\"\n\n#~ msgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\n#~ msgstr \"\"\n#~ \"// `value` の長さは明らかに 4 バイトであるため、エラーをアンラップしま\"\n#~ \"す。\\n\"\n\n#~ msgid \"b\\\"hello\\\"\"\n#~ msgstr \"b\\\"hello\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[ようこそ](./welcome-day-4.md)（3 分）\"\n\n#~ msgid \"[Iterators](./iterators.md) (45 minutes)\"\n#~ msgstr \"[イテレータ](./iterators.md)（45 分）\"\n\n#~ msgid \"[Modules](./modules.md) (40 minutes)\"\n#~ msgstr \"[モジュール](./modules.md)（40 分）\"\n\n#~ msgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\n#~ msgstr \"[Iterator](./iterators/iterator.md)（5 分）\"\n\n#~ msgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\n#~ msgstr \"[IntoIterator](./iterators/intoiterator.md)（5 分）\"\n\n#~ msgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\n#~ msgstr \"[FromIterator](./iterators/fromiterator.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[演習: イテレータ メソッドのチェーン化](./iterators/exercise.md)（30 分）\"\n\n#~ msgid \"[Modules](./modules/modules.md) (5 minutes)\"\n#~ msgstr \"[モジュール](./modules/modules.md)（5 分）\"\n\n#~ msgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\n#~ msgstr \"[ファイル システム階層](./modules/filesystem.md)（5 分）\"\n\n#~ msgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\n#~ msgstr \"[可視性](./modules/visibility.md)（5 分）\"\n\n#~ msgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\n#~ msgstr \"[use、super、self](./modules/paths.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\n#~ msgstr \"[演習: GUI ライブラリのモジュール](./modules/exercise.md)（15 分）\"\n\n#~ msgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\n#~ msgstr \"[テスト] モジュール(./testing/unit-tests.md)（5 分）\"\n\n#~ msgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\n#~ msgstr \"[その他の種類のテスト](./testing/other.md)（10 分）\"\n\n#~ msgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\n#~ msgstr \"[便利なクレート](./testing/useful-crates.md)（3 分）\"\n\n#~ msgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\n#~ msgstr \"[GoogleTest](./testing/googletest.md)（5 分）\"\n\n#~ msgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\n#~ msgstr \"[モック](./testing/mocking.md)（5 分）\"\n\n#~ msgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\n#~ msgstr \"[コンパイラの リント と Clippy](./testing/lints.md)（5 分）\"\n\n#~ msgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: Luhn アルゴリズム](./testing/exercise.md)（30 分）\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust は、テストを作成するための基本的なサポートのみを提供します。\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"テストを作成する際に推奨されるその他のクレートを以下に示します。\"\n\n#~ msgid \"\"\n#~ \"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n#~ \"library in the tradition of GoogleTest for C++.\"\n#~ msgstr \"\"\n#~ \"[googletest](https://docs.rs/googletest): 従来の C++ 向け GoogleTestのよう\"\n#~ \"な包括的なテスト アサーション ライブラリです。\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"\"\n#~ \"[proptest](https://docs.rs/proptest): Rust のプロパティ ベースのテストで\"\n#~ \"す。\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"\"\n#~ \"[rstest](https://docs.rs/rstest): フィクスチャとパラメータ化されたテストを\"\n#~ \"サポートします。\"\n\n#~ msgid \"This just scratches the surface, there are many builtin matchers.\"\n#~ msgstr \"\"\n#~ \"ここで扱っているものはごく一部であり、他にも多くの組み込みマッチャーがあり\"\n#~ \"ます。\"\n\n#~ msgid \"GoogleTest is available for use in AOSP.\"\n#~ msgstr \"GoogleTest は AOSP で使用できます。\"\n\n#~ msgid \"[Error Handling](./error-handling.md) (45 minutes)\"\n#~ msgstr \"[エラー処理](./error-handling.md)（45 分）\"\n\n#~ msgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[アンセーフRust](./unsafe-rust.md)（1 時間 5 分）\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 2 hours\"\n#~ msgstr \"このセッションの所要時間は、10 分間の休憩を入れて約 2 時間です。\"\n\n#~ msgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\n#~ msgstr \"[パニック](./error-handling/panics.md)（3 分）\"\n\n#~ msgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\n#~ msgstr \"[try 演算子](./error-handling/try.md)（5 分）\"\n\n#~ msgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\n#~ msgstr \"[try 変換](./error-handling/try-conversions.md)（5 分）\"\n\n#~ msgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\n#~ msgstr \"[エラートレイト](./error-handling/error.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[thiserror と anyhow](./error-handling/thiserror-and-anyhow.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[演習: Result を使用した書き換え](./error-handling/exercise.md)（20 分）\"\n\n#~ msgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\n#~ msgstr \"[アンセーフRust](./unsafe-rust/unsafe.md)（5 分）\"\n\n#~ msgid \"\"\n#~ \"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\n#~ msgstr \"[未加工ポインタの参照外し](./unsafe-rust/dereferencing.md)（10 分）\"\n\n#~ msgid \"\"\n#~ \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\n#~ msgstr \"[可変の静的変数](./unsafe-rust/mutable-static.md)（5 分）\"\n\n#~ msgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\n#~ msgstr \"[共用体](./unsafe-rust/unions.md)（5 分）\"\n\n#~ msgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\n#~ msgstr \"[アンセーフな関数](./unsafe-rust/unsafe-functions.md)（5 分）\"\n\n#~ msgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\n#~ msgstr \"[アンセーフなトレイト](./unsafe-rust/unsafe-traits.md)（5 分）\"\n\n#~ msgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\n#~ msgstr \"[演習: FFI ラッパー](./unsafe-rust/exercise.md)（30 分）\"\n\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"// abs 誤動作の場合の動作は未定義。\\n\"\n\n#~ msgid \"// Safe because ...\\n\"\n#~ msgstr \"// 安全です。理由は...\\n\"\n\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"AIDL ファイルがベンダー パーティション内のバイナリで使用されている場合は、\"\n#~ \"`vendor_available: true` を追加します。\"\n\n#~ msgid \"/// Connect to the BirthdayService.\\n\"\n#~ msgstr \"/// BirthdayService に接続します。\\n\"\n\n#~ msgid \"\"\n#~ \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\n#~ msgstr \"\"\n#~ \"// SAFETY: `print_card` は有効な `card` ポインタで安全に呼び出せます。\\n\"\n\n#~ msgid \"ADC\"\n#~ msgstr \"ADC\"\n\n#~ msgid \"I2C, SPI, UART, CAN\"\n#~ msgstr \"I2C、SPI、UART、CAN\"\n\n#~ msgid \"RNG\"\n#~ msgstr \"RNG\"\n\n#~ msgid \"Timers\"\n#~ msgstr \"タイマー\"\n\n#~ msgid \"Watchdogs\"\n#~ msgstr \"ウォッチドッグ\"\n\n#~ msgid \"\"\n#~ \"There is work in progress on an `async` version of `embedded-hal`, but it \"\n#~ \"isn't stable yet.\"\n#~ msgstr \"\"\n#~ \"`embedded-hal`の`async`バージョンも開発中ですが、まだ安定してはいません。\"\n\n#~ msgid \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// I2C コントローラと慣性測定ユニットをセットアップします。\\n\"\n#~ \"    // TODO\\n\"\n\n#~ msgid \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// コンパスデータを読み取り、シリアルポートに記録します。\\n\"\n#~ \"        // TODO\\n\"\n\n#~ msgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\n#~ msgstr \"\"\n#~ \"// TODO: RTC ドライバのインスタンスを作成し、現在の時刻を出力します。\\n\"\n\n#~ msgid \"// TODO: Wait for 3 seconds.\\n\"\n#~ msgstr \"// TODO: 3 秒間待機します。\\n\"\n\n#~ msgid \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ msgstr \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// バージョン 2.0 の Apache ライセンス（以下「本ライセンス」）により使用が\"\n#~ \"許諾されています。\\n\"\n#~ \"// このファイルを使用するには、本ライセンスに準拠する必要があります。\\n\"\n#~ \" // 本ライセンスのコピーは下記のリンクから入手できます。\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// 本ライセンスで配布されるソフトウェアは、\\n\"\n#~ \"// 適用される法律によって要求される場合または書面で合意した場合を除き、\\n\"\n#~ \"// 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現\"\n#~ \"状有姿」で提供されます。\\n\"\n#~ \"// 本ライセンスの下で適用される具体的な許可および制限については、\\n\"\n#~ \"// ライセンス本文をご覧ください。\\n\"\n\n#~ msgid \"\\\"sync_exception_current\\\"\"\n#~ msgstr \"\\\"sync_exception_current\\\"\"\n\n#~ msgid \"\\\"irq_current\\\"\"\n#~ msgstr \"\\\"irq_current\\\"\"\n\n#~ msgid \"\\\"No pending interrupt\\\"\"\n#~ msgstr \"\\\"No pending interrupt\\\"\"\n\n#~ msgid \"\\\"IRQ {intid:?}\\\"\"\n#~ msgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#~ msgid \"\\\"fiq_current\\\"\"\n#~ msgstr \"\\\"fiq_current\\\"\"\n\n#~ msgid \"\\\"serr_current\\\"\"\n#~ msgstr \"\\\"serr_current\\\"\"\n\n#~ msgid \"\\\"sync_lower\\\"\"\n#~ msgstr \"\\\"sync_lower\\\"\"\n\n#~ msgid \"\\\"irq_lower\\\"\"\n#~ msgstr \"\\\"irq_lower\\\"\"\n\n#~ msgid \"\\\"fiq_lower\\\"\"\n#~ msgstr \"\\\"fiq_lower\\\"\"\n\n#~ msgid \"\\\"serr_lower\\\"\"\n#~ msgstr \"\\\"serr_lower\\\"\"\n\n#~ msgid \"// ANCHOR: main\\n\"\n#~ msgstr \"// ANCHOR: main\\n\"\n\n#~ msgid \"// ANCHOR: Flags\\n\"\n#~ msgstr \"// ANCHOR: Flags\\n\"\n\n#~ msgid \"// ANCHOR_END: Flags\\n\"\n#~ msgstr \"// ANCHOR_END: Flags\\n\"\n\n#~ msgid \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n#~ msgstr \"\"\n#~ \"/// UART 受信ステータス レジスタ / エラー クリア レジスタからのフラグ\\n\"\n\n#~ msgid \"/// Framing error.\\n\"\n#~ msgstr \"/// フレーム処理エラー。\\n\"\n\n#~ msgid \"/// Parity error.\\n\"\n#~ msgstr \"/// パリティエラー。\\n\"\n\n#~ msgid \"/// Break error.\\n\"\n#~ msgstr \"/// ブレイクエラー。\\n\"\n\n#~ msgid \"/// Overrun error.\\n\"\n#~ msgstr \"/// オーバーラン エラー。\\n\"\n\n#~ msgid \"// ANCHOR: Registers\\n\"\n#~ msgstr \"// ANCHOR: Registers\\n\"\n\n#~ msgid \"// ANCHOR_END: Registers\\n\"\n#~ msgstr \"// ANCHOR_END: Registers\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// PL011 UART のドライバ。\\n\"\n\n#~ msgid \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n#~ msgstr \"\"\n#~ \"/// 指定されたベースアドレスに存在する\\n\"\n#~ \"    /// PL011 デバイス用の UART ドライバの新しいインスタンスを作成しま\"\n#~ \"す。\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # 安全性\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// 指定されたベースアドレスは PL011 デバイスの MMIO 制御レジスタを指\"\n#~ \"している必要があります。\\n\"\n#~ \"    /// これらはデバイスメモリとしてプロセスのアドレス空間に\\n\"\n#~ \"    /// マッピングされ、他のエイリアスはありません。\\n\"\n\n#~ msgid \"// ANCHOR_END: Uart\\n\"\n#~ msgstr \"// ANCHOR_END: Uart\\n\"\n\n#~ msgid \"\\\"linux\\\"\"\n#~ msgstr \"\\\"linux\\\"\"\n\n#~ msgid \"\\\"CROSS_COMPILE\\\"\"\n#~ msgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"\\\"aarch64-linux-gnu\\\"\"\n\n#~ msgid \"\\\"aarch64-none-elf\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#~ msgid \"\\\"entry.S\\\"\"\n#~ msgstr \"\\\"entry.S\\\"\"\n\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"\\\"exceptions.S\\\"\"\n\n#~ msgid \"\\\"idmap.S\\\"\"\n#~ msgstr \"\\\"idmap.S\\\"\"\n\n#~ msgid \"\\\"empty\\\"\"\n#~ msgstr \"\\\"empty\\\"\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic entry point for an image. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * バージョン 2.0 の Apache ライセンス（以下「本ライセンス」）により使用が\"\n#~ \"許諾されています。\\n\"\n#~ \" * このファイルを使用するには、本ライセンスに準拠する必要があります。\\n\"\n#~ \" * 本ライセンスのコピーは下記のリンクから入手できます。\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * 本ライセンスで配布されるソフトウェアは、\\n\"\n#~ \" * 適用される法律によって要求される場合または書面で合意した場合を除き、\\n\"\n#~ \" * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現\"\n#~ \"状有姿」で提供されます。\\n\"\n#~ \" * 本ライセンスの下で適用される具体的な許可および制限については、\\n\"\n#~ \" * ライセンス本文をご覧ください。\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* TTBR0_EL1におけるページサイズを4KiB単位に設定。*/\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* TTBR1_EL1におけるページサイズを4KiB単位に設定。*/\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* TTBR1_EL1 の変換テーブル ウォークを無効にして、代わりに変換エラーを生成\"\n#~ \"します。*/\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* TTBR0_EL1 の変換テーブル ウォークは内部共有可能です。*/\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * TTBR0_EL1 の変換テーブル ウォークは、外部書き戻し、読み取り割り当て、書\"\n#~ \"き込み割り当ての\\n\"\n#~ \" * キャッシュが可能です。\\n\"\n#~ \" */\\n\"\n#~ \".set . L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * TTBR0_EL1 の変換テーブル ウォークは、内部書き戻し、読み取り割り当て、書\"\n#~ \"き込み割り当ての\\n\"\n#~ \" * キャッシュが可能です。\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* TTBR0_EL1 のサイズ オフセットは 2**39 バイト（512 GiB）です。*/\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* ステージ 1 の命令アクセスのキャッシュ可能設定は影響を受けません。*/\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP が 16 バイト境界にアライメントされていない場合の SP アライメント \"\n#~ \"フォールト。*/\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* ステージ 1 のデータアクセスのキャッシュ可能性設定は影響を受けません。\"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 および EL1 ステージ 1 MMU が有効になっています。*/\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* EL1 の例外を受け取っても、特権アクセスは変更されません。*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* aarch32 モードの EL0 で SETEND 命令が無効になっています。*/\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* さまざまな IT 命令が aarch32 モードの EL0 で無効になっています。*/\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * これはイメージの一般的なエントリ ポイントです。読み込まれたイメージの実\"\n#~ \"行を\\n\"\n#~ \" * 準備するために必要なオペレーションを実行します。具体的には、x25 以上の\"\n#~ \"レジスタを使用して bss セクションをゼロにし、\\n\"\n#~ \" * スタックを準備し、浮動小数点数を有効にして、例外ベクターを設定します。\"\n#~ \"Rust エントリ ポイントのために x0-x3\\n\"\n#~ \" * には下の値を保持します。これは起動パラメータを含む可能性があるためで\"\n#~ \"す。\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* メモリ管理に関する設定を読み込んで適用し、MMU とキャッシュを有効にす\"\n#~ \"る準備をします。*/\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* サポートしている PA 範囲を TCR_EL1.IPS にコピーします。*/\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * ここより前のすべての処理が完了していることを確認してから、\\n\"\n#~ \"\\t * 古くなった可能性のあるローカル TLB エントリを使用開始前に無効にしま\"\n#~ \"す。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * MMU とキャッシュを有効にするように sctlr_el1 を構成し、これが完了する\"\n#~ \"までは先に進みません。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* EL1 の浮動小数点アクセスのトラップを無効にします。*/\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* bss セクションをゼロにします。*/\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* スタックを準備します。*/\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* 例外ベクターを設定します。*/\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Rust コードを呼び出します。*/\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* 割り込みを待機して永久にループします。*/\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * バージョン 2.0 の Apache ライセンス（以下「本ライセンス」）により使用が\"\n#~ \"許諾されています。\\n\"\n#~ \" * このファイルを使用するには、本ライセンスに準拠する必要があります。\\n\"\n#~ \" * 本ライセンスのコピーは下記のリンクから入手できます。\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * 本ライセンスで配布されるソフトウェアは、\\n\"\n#~ \" * 適用される法律によって要求される場合または書面で合意した場合を除き、\\n\"\n#~ \" * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現\"\n#~ \"状有姿」で提供されます。\\n\"\n#~ \" * 本ライセンスの下で適用される具体的な許可および制限については、\\n\"\n#~ \" * ライセンス本文をご覧ください。\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * 揮発性レジスタをスタックに保存します。この部分は現在 14 個の\\n\"\n#~ \" * 命令で構成されているので、例外ハンドラで\\n\"\n#~ \" * 使用できます。その場合、残りは18命令分になります。\\n\"\n#~ \" *\\n\"\n#~ \" * 戻った際に、x0 と x1 はそれぞれ elr_el2 と spsr_el2 に初期化され、\\n\"\n#~ \" * これらは後続の呼び出しの 1 つ目と 2 つ目の引数として使用できます。\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* スタック空間を予約し、レジスタ x0～x18、x29、x30 を保存します。*/\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * elr_el1 と spsr_el1 を保存します。これにより、ネストされた例外を受付\"\n#~ \"可能になり、\\n\"\n#~ \"\\t * また、アンワインドできるようになります。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * スタックから揮発性レジスタを復元します。この部分は現在14 個の\\n\"\n#~ \" * 命令で構成されているので、\\n\"\n#~ \" * 例外ハンドラで使用できます。また、その場合18命令分の領域が残ります。\"\n#~ \"save_volatile_to_stack と組み合わせた場合、\\n\"\n#~ \" * 4 個の命令が残ります。\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* レジスタ x2～x18、x29、x30 を復元します。*/\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* x0 と x1 をスクラッチとして使用して、レジスタ elr_el1 および \"\n#~ \"spsr_el1 を復元します。*/\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* x0 と x1 を復元し、スタック空間を解放します。*/\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * これは、SP0 の使用中に現在の EL で取得される例外の\\n\"\n#~ \" * 汎用ハンドラです。SPx の場合と同様に、最初に SPx に切り替えて処理を実行\"\n#~ \"し、\\n\"\n#~ \" * 戻る前に再度 SP0 に切り替えます。\\n\"\n#~ \" *\\n\"\n#~ \" * SPx に切り替えて Rust ハンドラを呼び出すには、16 個の命令が必要です。復\"\n#~ \"元して戻るには、\\n\"\n#~ \" * さらに 16 個の命令が必要であるため、割り当てられた 32 個の命令の中で\\n\"\n#~ \" * ハンドラ全体を実装できます。\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * これは、\\n\"\n#~ \" * SPx の使用中に現在の EL で受け付けた例外の汎用ハンドラです。揮発性レジ\"\n#~ \"スタを保存し、Rust ハンドラを呼び出し、揮発性レジスタを\\n\"\n#~ \" * してから戻ります。\\n\"\n#~ \" *\\n\"\n#~ \" * 不揮発性レジスタを考慮しなければ、EL0 から取得した例外に対しても\\n\"\n#~ \" * 機能します。\\n\"\n#~ \" *\\n\"\n#~ \" * 状態の保存と Rust ハンドラへのジャンプには 15 個の命令が必要で、\\n\"\n#~ \" * 復元して戻るのにも 15 個の命令が必要であるため、\\n\"\n#~ \" * ハンドラ全体を 32 個の制限内である 30 個の命令に収めることができま\"\n#~ \"す。\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* Access flag. */\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* Not global. */\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n#~ \"shareable\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* level 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * バージョン 2.0 の Apache ライセンス（以下「本ライセンス」）により使用が\"\n#~ \"許諾されています。\\n\"\n#~ \" * このファイルを使用するには、本ライセンスに準拠する必要があります。\\n\"\n#~ \" * 本ライセンスのコピーは下記のリンクから入手できます。\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * 本ライセンスで配布されるソフトウェアは、\\n\"\n#~ \" * 適用される法律によって要求される場合または書面で合意した場合を除き、\\n\"\n#~ \" * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現\"\n#~ \"状有姿」で提供されます。\\n\"\n#~ \" * 本ライセンスの下で適用される具体的な許可および制限については、\\n\"\n#~ \" * ライセンス本文をご覧ください。\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* アクセスフラグ。*/\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* グローバルではありません。*/\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA)、内部共\"\n#~ \"有可能\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* レベル 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    //  1 GiB のデバイス マッピング\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB の DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB のマッピングされていない VA 空間\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB のデバイス マッピング\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB の残りの VA 空間\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * バージョン 2.0 の Apache ライセンス（以下「本ライセンス」）により使用が\"\n#~ \"許諾されています。\\n\"\n#~ \" * このファイルを使用するには、本ライセンスに準拠する必要があります。\\n\"\n#~ \" * 本ライセンスのコピーは下記のリンクから入手できます。\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * 本ライセンスで配布されるソフトウェアは、\\n\"\n#~ \" * 適用される法律によって要求される場合または書面で合意した場合を除き、\\n\"\n#~ \" * 明示されるか黙示されるかを問わず、いかなる種類の保証も条件もなく、「現\"\n#~ \"状有姿」で提供されます。\\n\"\n#~ \" * 本ライセンスの下で適用される具体的な許可および制限については、\\n\"\n#~ \" * ライセンス本文をご覧ください。\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * コードの実行は、イメージの先頭にあるこのシンボルから\\n\"\n#~ \" * 開始されます。\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * コードを集約します\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * 読み取り専用データを集約します。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * エントリコードによってゼロ初期化される.bssを末尾に含む、書き込み可能\"\n#~ \"データを集約します。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * このエントリポイントは.dataの大きさが32バイトの倍数になっていること\"\n#~ \"を前提としています。\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* これ以降はすべてバイナリに含まれません。*/\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* このエントリ ポイント コードは、.bss が 16 バイトでアラインされている\"\n#~ \"ことを前提としています。*/\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * 使用されていないセクションをイメージから削除します。\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* イメージは自分自身によりロードされるのでこれらのセクションは不要で\"\n#~ \"す。*/\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"# Copyright 2023 Google LLC\"\n#~ msgstr \"# Copyright 2023 Google LLC\"\n\n#~ msgid \"$(shell uname -s)\"\n#~ msgstr \"$(shell uname -s)\"\n\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-linux-gnu\"\n\n#~ msgid \"stdio -display none -kernel $< -s\"\n#~ msgstr \"stdio -display none -kernel $< -s\"\n\n#~ msgid \"cargo clean\"\n#~ msgstr \"cargo clean\"\n\n#~ msgid \"\"\n#~ \"Threads are all daemon threads, the main thread does not wait for them.\"\n#~ msgstr \"\"\n#~ \"スレッドはすべてデーモンスレッドで、メインスレッドはそれらを待ちません。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 --- the main \"\n#~ \"thread is not waiting.\"\n#~ msgstr \"\"\n#~ \"スレッドはカウントが10に到達するまでに止められます。メインのスレッドは待機\"\n#~ \"しません。\"\n\n#~ msgid \"\"\n#~ \"Rust uses the type system to enforce synchronization of shared data. This \"\n#~ \"is primarily done via two types:\"\n#~ msgstr \"\"\n#~ \"Rustは共有データを確実に同期するために型システムを利用します。これは主に2\"\n#~ \"つの型により行われます：\"\n\n#~ msgid \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T`: handles sharing between threads and takes care to \"\n#~ \"deallocate `T` when the last reference is dropped,\"\n#~ msgstr \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T` : スレッド間の共有を扱い、最後の参照がドロップされた\"\n#~ \"とき `T` をデアロケートすることを担当する、\"\n\n#~ msgid \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"ensures mutually exclusive access to the `T` value.\"\n#~ msgstr \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): `T`型\"\n#~ \"の値への相互排他的なアクセスを保証する。\"\n\n#~ msgid \"Let us practice our new concurrency skills with\"\n#~ msgstr \"次の演習を行い、並行性に関する新しいスキルを獲得しましょう。\"\n\n#~ msgid \"Dining philosophers: a classic problem in concurrency.\"\n#~ msgstr \"食事する哲学者：並行性に関する古典的な問題。\"\n\n#~ msgid \"\"\n#~ \"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n#~ \"download dependencies and then check links in parallel.\"\n#~ msgstr \"\"\n#~ \"マルチスレッド リンク チェッカー: Cargo を使用して依存関係をダウンロード\"\n#~ \"し、リンクを同時にチェックする大規模なプロジェクト。\"\n\n#~ msgid \"\"\n#~ \"For this, you will need an HTTP client such as [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency \"\n#~ \"with:\"\n#~ msgstr \"\"\n#~ \"そのためには、[`reqwest`](https://docs.rs/reqwest/) などの HTTP クライアン\"\n#~ \"トが必要です。次のコマンドで新しい Cargo プロジェクトを作成し、依存関係と\"\n#~ \"して `reqwest` を追加します。\"\n\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://\"\n#~ \"docs.rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"また、リンクを見つける方法も必要です。これには [`scraper`](https://docs.\"\n#~ \"rs/scraper/) を使用します。\"\n\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"最後に、エラーを処理する方法が必要になります。これには [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) を使用します。\"\n\n#~ msgid \"Concurrency Morning Exercise\"\n#~ msgstr \"並行性に関する午前のエクササイズ\"\n\n#~ msgid \"([back to exercise](dining-philosophers.md))\"\n#~ msgstr \"（[演習に戻る](dining-philosophers.md)）\"\n\n#~ msgid \"([back to exercise](link-checker.md))\"\n#~ msgstr \"（[演習に戻る](link-checker.md)）\"\n\n#~ msgid \"Async Rust\"\n#~ msgstr \"Asyncの基礎\"\n\n#~ msgid \"Futures Control Flow\"\n#~ msgstr \"Futureの制御フロー\"\n\n#~ msgid \"\"\n#~ \"Futures can be combined together to produce concurrent compute flow \"\n#~ \"graphs. We have already seen tasks, that function as independent threads \"\n#~ \"of execution.\"\n#~ msgstr \"\"\n#~ \"並行計算フローグラフを生成するために、futureを組み合わせることができます。\"\n#~ \"すでに独立したスレッドとして機能するタスクを見てきました。\"\n\n#~ msgid \"[Join](control-flow/join.md)\"\n#~ msgstr \"[結合](control-flow/join.md)\"\n\n#~ msgid \"[Select](control-flow/select.md)\"\n#~ msgstr \"[選択](control-flow/select.md)\"\n\n#~ msgid \"\\\"Felix\\\"\"\n#~ msgstr \"\\\"Felix\\\"\"\n\n#~ msgid \"\\\"Failed to send cat.\\\"\"\n#~ msgstr \"\\\"Failed to send cat.\\\"\"\n\n#~ msgid \"\\\"Failed to send dog.\\\"\"\n#~ msgstr \"\\\"Failed to send dog.\\\"\"\n\n#~ msgid \"\\\"Failed to receive winner\\\"\"\n#~ msgstr \"\\\"Failed to receive winner\\\"\"\n\n#~ msgid \"\\\"Winner is {winner:?}\\\"\"\n#~ msgstr \"\\\"Winner is {winner:?}\\\"\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this example, we have a race between a cat and a dog. \"\n#~ \"`first_animal_to_finish_race` listens to both channels and will pick \"\n#~ \"whichever arrives first. Since the dog takes 50ms, it wins against the \"\n#~ \"cat that take 500ms.\"\n#~ msgstr \"\"\n#~ \"この例では、猫と犬のレースを扱っています。`first_animal_to_finish_race`は\"\n#~ \"両方のチャネルをリッスンし、先に到着した方を選びます。犬は到着まで50msかか\"\n#~ \"るので、500msかかる猫に勝ちます。\"\n\n#~ msgid \"\"\n#~ \"You can use `oneshot` channels in this example as the channels are \"\n#~ \"supposed to receive only one `send`.\"\n#~ msgstr \"\"\n#~ \"この例では`oneshot`チャネルを使うこともできます。なぜなら、チャネルは一回\"\n#~ \"きりの`send`を受け取ることになっているからです。\"\n\n#~ msgid \"\"\n#~ \"Try adding a deadline to the race, demonstrating selecting different \"\n#~ \"sorts of futures.\"\n#~ msgstr \"\"\n#~ \"レースに制限時間を追加することによって、違う種類のfutureをselectすることを\"\n#~ \"実演してみてください。\"\n\n#~ msgid \"\"\n#~ \"Note that `select!` drops unmatched branches, which cancels their \"\n#~ \"futures. It is easiest to use when every execution of `select!` creates \"\n#~ \"new futures.\"\n#~ msgstr \"\"\n#~ \"`select!`はマッチしなかったブランチをドロップすることに注意してください。\"\n#~ \"これは、そうしたブランチのfutureがキャンセルされることにつながります。\"\n#~ \"`select!`を毎回実行する際に新たなfutureが作成されるときに、`select!`を使う\"\n#~ \"のが最も簡単です。\"\n\n#~ msgid \"\"\n#~ \"An alternative is to pass `&mut future` instead of the future itself, but \"\n#~ \"this can lead to issues, further discussed in the pinning slide.\"\n#~ msgstr \"\"\n#~ \"Futureそのものでなく、`&mut future`を渡すという代替案もあります。しかし、\"\n#~ \"これは問題につながることもあります。このことはPinに関するスライドで詳細に\"\n#~ \"議論します。\"\n\n#~ msgid \"Pitfalls of async/await\"\n#~ msgstr \"async / await の注意点\"\n\n#~ msgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\n#~ msgstr \"[エグゼキュータのブロック](pitfalls/blocking-executor.md)\"\n\n#~ msgid \"[Pin](pitfalls/pin.md)\"\n#~ msgstr \"[Pin](pitfalls/pin.md)\"\n\n#~ msgid \"[Async Traits](pitfalls/async-traits.md)\"\n#~ msgstr \"[Async トレイト](pitfalls/async-traits.md)\"\n\n#~ msgid \"[Cancellation](pitfalls/cancellation.md)\"\n#~ msgstr \"[キャンセル](pitfalls/cancellation.md)\"\n\n#~ msgid \"\"\n#~ \"Async methods in traits are not yet supported in the stable channel ([An \"\n#~ \"experimental feature exists in nightly and should be stabilized in the \"\n#~ \"mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-\"\n#~ \"trait-nightly.html))\"\n#~ msgstr \"\"\n#~ \"トレイトの非同期メソッドは、Stable チャンネルではまだサポートされていませ\"\n#~ \"ん（[試験運用版の機能はナイトリーに存在するため、中期的には安定するはずで\"\n#~ \"す。](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n#~ \"nightly.html)）\"\n\n#~ msgid \"\"\n#~ \"To practice your Async Rust skills, we have again two exercises for you:\"\n#~ msgstr \"非同期 Rust のスキルを磨くため、ここでも 2 つの演習を行います。\"\n\n#~ msgid \"\"\n#~ \"Dining philosophers: we already saw this problem in the morning. This \"\n#~ \"time you are going to implement it with Async Rust.\"\n#~ msgstr \"\"\n#~ \"食事する哲学者: この問題は午前の部ですでに取り上げましたが、今回は非同期 \"\n#~ \"Rust を使用してこれを実装します。\"\n\n#~ msgid \"\"\n#~ \"A Broadcast Chat Application: this is a larger project that allows you \"\n#~ \"experiment with more advanced Async Rust features.\"\n#~ msgstr \"\"\n#~ \"ブロードキャスト チャット アプリ: より高度な非同期 Rust 機能をテストできる\"\n#~ \"大規模なプロジェクトです。\"\n\n#~ msgid \"Concurrency Afternoon Exercise\"\n#~ msgstr \"午後の同時実行のエクササイズ\"\n\n#~ msgid \"([back to exercise](dining-philosophers-async.md))\"\n#~ msgstr \"（[演習に戻る](dining-philosophers-async.md)）\"\n\n#~ msgid \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n#~ msgstr \"\"\n#~ \"// 実行を別のタスクに転送できるよう、2 番目のフォークを選択する前に\\n\"\n#~ \"        // 遅延を追加します。\\n\"\n\n#~ msgid \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n#~ msgstr \"\"\n#~ \"// デッドロックを避けるために、どこかで対称性を\\n\"\n#~ \"            // 崩す必要があります。これにより、いずれのフォークも初期化解\"\n#~ \"除することなく、フォークが\\n\"\n#~ \"            // スワップされます。\\n\"\n\n#~ msgid \"([back to exercise](chat-app.md))\"\n#~ msgstr \"（[演習に戻る](chat-app.md)）\"\n\n#, fuzzy\n#~ msgid \"With C++)\"\n#~ msgstr \"C++\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"プログラムの例\"\n\n#, fuzzy\n#~ msgid \"An Example in C\"\n#~ msgstr \"例\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"コンパイル時の保証\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"実行時の保証\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"現代的な機能\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"文字列（String） vs 文字列スライス（str）\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"Rustdoc\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"オーバーロード\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"配列とforループ\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for式\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while式\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop式\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"列挙子のペイロード\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"列挙型のサイズ\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let式\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"while let式\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"match式\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"配列編\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"マッチガード\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"スタック vs ヒープ\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"スタックメモリ\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"手動でのメモリ管理\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"スコープに基づくメモリ管理\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"ガベージコレクション\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"文字列のムーブ\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"現代C++の二重解放\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"関数とムーブ\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"コピーとクローン\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"共有参照と固有参照\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"フィールドの省略\"\n\n#, fuzzy\n#~ msgid \"Storing Books\"\n#~ msgstr \"文字列（String）\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"OptionとResult\"\n\n#~ msgid \"Box\"\n#~ msgstr \"ボックス（Box）\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"イテレータと所有権\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"文字列とイテレータ\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"ジェネリックメソッド\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"単相化\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"デフォルトメソッド\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"重要なトレイト\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"演算子： Add, Mul, …\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"クロージャ：Fn, FnMut, FnOnce\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"ポイントとポリゴン\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"スタックの巻き戻し\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"構造化されたエラー処理\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"？でエラーを伝播する\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"エラーの型変換\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"列挙型エラーの導出\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"コンテキストをエラーに追加\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"aarch64-paging\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"spin\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Day 1 AM\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Day 1 PM\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Day 2 AM\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Day 2 PM\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Day 3 AM\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Day 3 PM\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"ベアメタルRust AM\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"並行性 AM\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"並行性 PM\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"Day 2： 複合データ型、パターンマッチング、標準ライブラリ\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"Day 3： トレイトとジェネリクス、エラー処理、テスト、unsafe Rust\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"本日の目的は、Rust特有の借用チェッカーについて話ができるように、Rustについ\"\n#~ \"て最低限の情報提供を行う事です。Rustがメモリをどのように扱うかは重要な機能\"\n#~ \"であり、なるべく早く受講生に説明すべき内容です。\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"この時点でスケジュール確認を行なってください。以下のように1日を２パートに\"\n#~ \"分けて実施する事を推奨しています：\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"AM： 9:00 ~ 12:00\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"PM： 13:00 ~ 16:00\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"必要に応じて調整してください。また、1時間ごとに休憩を取る事をおすすめしま\"\n#~ \"す！\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"ここでは、Rustによる小さなサンプルプログラムを紹介します：\"\n\n#~ msgid \"// Program entry point\\n\"\n#~ msgstr \"// プログラムのエントリーポイント\\n\"\n\n#~ msgid \"// Macro for printing, like printf\\n\"\n#~ msgstr \"// printfのような、出力用マクロ\\n\"\n\n#~ msgid \"// No parenthesis around expression\\n\"\n#~ msgstr \"// 式を囲む括弧は不要\\n\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"この例はCollatz予想を実装したものです： このループは必ず終了すると言われて\"\n#~ \"いますが、まだ証明はされていません。コードを編集して、異なる入力値で試して\"\n#~ \"みてください。\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"すべての変数が静的型付けされている事を説明してください。`i32`を削除して型\"\n#~ \"推論を試してください。代わりに`i8`を使用して、実行時に整数オーバーフローを\"\n#~ \"引き起こしてみてください。\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"\"\n#~ \"`let mut x`を`let x`に変更し、コンパイルエラーについて説明してください。\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"`print!`の引数がフォーマット文字列と一致しない場合、コンパイルエラーが発生\"\n#~ \"する事を実演してください。\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"単一の変数よりも複雑な式を表示したい場合は、`{}`をプレースホルダとして使用\"\n#~ \"する必要がある事を実演してください。\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"受講生に標準ライブラリを紹介し、`std::fmt`の検索方法を説明してください。\"\n#~ \"`std::fmt`には、フォーマット機能のルールや構文が説明されています。受講者が\"\n#~ \"標準ライブラリの検索に慣れておく事は重要です。\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"コンパイル時のメモリ安全性。\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"未定義の実行時動作がない。\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"現代的な言語機能。\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"コンパイル時の静的メモリの管理：\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"メモリリークの心配が（ほとんど）ない (ノートを参照)。\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"SafeなRustの範囲内でメモリリークを引き起こすことは可能です。例として以下の\"\n#~ \"ような手段があります：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"[`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.html#method.\"\n#~ \"leak)を使ってポインタをリークさせることができます。この関数は実行時に初期\"\n#~ \"化され、実行時にサイズが決まるstatic変数の取得などに使われます。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"[`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.html)を\"\n#~ \"使って、コンパイラに値を忘れさせることができます (つまり、デストラクタが実\"\n#~ \"行されない)。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"`Rc`や`Arc`を使って\\\\[循環参照（reference cycle）\\\\]を誤って作成することが\"\n#~ \"あります。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"コレクションを無限に拡張し続けることをメモリリークと見なす場合があり、Rust\"\n#~ \"にはこれを防ぐ機能はありません。\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"本講座での「メモリリークが起きない」は「\\\\_意図しない_メモリリークはほとん\"\n#~ \"ど起きない」と解釈すべきです。\"\n\n#~ msgid \"No undefined behavior at runtime:\"\n#~ msgstr \"実行時に未定義の動作はありません：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"整数オーバーフローは、コンパイル時のフラグで定義されます。選択肢として、パ\"\n#~ \"ニック（プログラムの制御されたクラッシュ）またはラップアラウンドのセマン\"\n#~ \"ティクスがあります。デフォルトとして、デバッグモード（`cargo build`）では\"\n#~ \"パニックが発生し、リリースモード（`cargo build —release`）ではラップアラウ\"\n#~ \"ンドが行われます。\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"境界チェックは、コンパイル時のフラグで無効にすることはできません。また、\"\n#~ \"`unsafe`のキーワードを使って直接無効にすることもできません。しかし、\"\n#~ \"`unsafe`を使って境界チェックを行わない`slice::get_unchecked`のような関数を\"\n#~ \"呼び出すことができます。\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rustは過去40年間の経験を基に構築されています。\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"言語の特徴\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"C++と同様に、ゼロコスト抽象化とは、より高水準なプログラミング構造の利用に\"\n#~ \"メモリやCPUのコストを支払う必要がないことを意味します。例えば、`for`を使っ\"\n#~ \"たループの場合、`iter().fold()`構文を使った場合とおおよそ同じ低水準の処理\"\n#~ \"になります。\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Rustの列挙型は「代数的データ型」であり、「直和型」と呼ばれます。\"\n#~ \"`Option<T>`や`Result<T, E>`のような要素を表現することができます。\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"エラーをちゃんと確認するよう注意してください。多くの開発者は、長いコンパイ\"\n#~ \"ラ出力を無視することに慣れてしまっています。Rustのコンパイラは他のコンパイ\"\n#~ \"ラよりもわかりやすく実用的なフィードバックを提供してくれます。そして多くの\"\n#~ \"場合、コードにそのままコピペできるようなフィードバックが提供されます。\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"Rustの標準ライブラリは、Java、Python、Goなどのそれと比べると小規模です。\"\n#~ \"Rustには標準的かつ必須と思われるいくつかの機能が含まれていません：\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"乱数生成器。[rand](https://docs.rs/rand/)を確認してください。\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"SSLやTLSのサポート。[rusttls](https://docs.rs/rustls/)を確認してください。\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"JSONのサポート。[serde_json](https://docs.rs/serde_json/)を確認してくださ\"\n#~ \"い。 \"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"この理由は、標準ライブラリの機能は消えることがなく、非常に安定したものでな\"\n#~ \"ければならないからです。上記の例については、Rustコミュニティが未だに最適な\"\n#~ \"解決策を探し続けています。そもそも、これらに対する「最適解」は一つであると\"\n#~ \"は限らないのです。\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rustには、Cargoという外部クレートのダウンロードからコンパイルまでを簡単に\"\n#~ \"行ってくれるパッケージマネージャが組み込まれています。これにより、標準ライ\"\n#~ \"ブラリを小規模に保つことができています。\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"良い外部クレートを見つけるのは難しいときがあります。<https://lib.rs/>のよ\"\n#~ \"うなサイトを使うことで、クレートの評価基準を参考にしながら比較を行うことが\"\n#~ \"できます。\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/)は、主要IDEやテキストエ\"\n#~ \"ディタで使用できる、サポートが充実しているLSPの実装です。\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"今まで見てきたように、Rust において `if` は式です。`if` 式のブロックは値を\"\n#~ \"持っており、条件判定の結果に応じて評価されたブロックの値が `if` 式の値とな\"\n#~ \"ります。Rust では他の制御フローの式も同様の動作をします。\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"同じルールが関数についても適用されます。関数の body ブロックの値が、その関\"\n#~ \"数の返り値となります。\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"このスライドのポイントは、Rust におけるブロックは型と値を持つということで\"\n#~ \"す。\"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"[`for` loop](https://doc.rust-lang.org/std/keyword.for.html) は、[`while \"\n#~ \"let` loop](while-let-expressions.md) とよく似ています。`for` ループは \"\n#~ \"`in` キーワードの右側にある式に対して自動的に `into_iter()` を呼び出し、そ\"\n#~ \"の結果生成されたイテレータを用いて走査を行います。\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"\"\n#~ \"`for` ループの中では、いつも通り `break` や `continue` を使うことができま\"\n#~ \"す。\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"Rust では、インデックスによる反復処理のために特別な構文は提供されていませ\"\n#~ \"ん。\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` は Range 型であり、`Iterator` トレイトを実装しています。\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` は、元のイテレータとは別の、各要素をスキップする `Iterator` を返\"\n#~ \"すメソッドです。\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"ベクタ内の要素を変更してみて、その結果生じるコンパイルエラーについて説明し\"\n#~ \"てください。また、ベクタ `v` をミュータブルに、for ループを `for x in v.\"\n#~ \"iter_mut()` に変更してみましょう。\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"`loop` 式\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"最後に、無限ループを作る [`loop` キーワード](https://doc.rust-lang.org/\"\n#~ \"reference/expressions/loop-expr.html#infinite-loops) について説明します。\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"\"\n#~ \"下の例で、ループから抜けるためには `break` あるいは `return` を使う必要が\"\n#~ \"あります。\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"\"\n#~ \"例えば `break 8` のようにループを値と共に抜け、それを print してみましょ\"\n#~ \"う。\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Luhnアルゴリズム\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"列挙型とパターンマッチング\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"メモリ管理： スタック vs ヒープ、手動でのメモリ管理、スコープに基づくメモ\"\n#~ \"リ管理、ガベージコレクション。\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"所有権： ムーブセマンティクス、コピーとクローン、借用、ライフタイム。\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"文字列とイテレータ\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"スタック vs ヒープ\"\n\n#~ msgid \"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\"\n#~ msgstr \"\"\n#~ \"次のような新しい変数を宣言してみてください `let p = Point { x: 5, y: \"\n#~ \"10.0 };`.\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"異なる型の要素を持つ点を許容するように、コードを修正してください。\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"`impl`に対して、ジェネリックな型を宣言することもできます：\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"ジェネリクスのコードは呼び出し箇所に基づいて、ジェネリックでないコードに変\"\n#~ \"換されます：\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"上のコードは、次のように書いた時と同じように動作します\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"\"\n#~ \"Rustのderiveマクロは、データ構造体に対して、指定されたトレイトを実装する\"\n#~ \"コードを自動的に生成します。\"\n\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"\"\n#~ \"コンパイラには、以下のような多くのトレイトを導出させることができます：\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"トレイトでは、別のトレイトメソッドを用いて挙動を定義することが可能です：\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"\"\n#~ \"メソッド `not_equals` を新しいトレイト `NotEquals` に移してみましょう。\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"`Equals` を `NotEquals` のスーパートレイトにしてみましょう。\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"`Equals`に対する`NotEquals`のブランケット実装を示してみましょう。\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"\"\n#~ \"ブランケット実装を用いれば、`Equals` を`NotEqual`のスーパートレイトとする\"\n#~ \"必要はなくなります。\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait`を用いれば、型名を明示せずに型を限定することができます。\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"この例は素晴らしい例です。なぜなら、 `impl Display`を２回用いているからで\"\n#~ \"す。 ここでは `impl Display` の型が同一になることを強制するものはない、と\"\n#~ \"いう説明をするのに役立ちます。もし単一の`T: Display`を用いた場合、入力の\"\n#~ \"`T`と返り値の`T`が同一の型であることが強制されてしまいます。例で示した関数\"\n#~ \"ではうまくいかないでしょう。なぜなら、我々が期待する入力の型は、`format!`\"\n#~ \"が返すものではおそらくないからです。もしも同じことを`: Display`の構文で行\"\n#~ \"いたい場合、２つの独立したジェネリックなパラメタが必要となるでしょう。\"\n\n#, fuzzy\n#~ msgid \"Drawing A Simple GUI\"\n#~ msgstr \"GUIライブラリ\"\n\n#, fuzzy\n#~ msgid \"concurrency:\"\n#~ msgstr \"並行性\"\n\n#, fuzzy\n#~ msgid \"control flow:\"\n#~ msgstr \"制御フロー\"\n\n#, fuzzy\n#~ msgid \"enumeration:\"\n#~ msgstr \"実装\"\n\n#, fuzzy\n#~ msgid \"error handling:\"\n#~ msgstr \"エラー処理\"\n\n#, fuzzy\n#~ msgid \"garbage collector:\"\n#~ msgstr \"ガベージコレクション\"\n\n#, fuzzy\n#~ msgid \"generics:\"\n#~ msgstr \"ジェネリクス（generics）\"\n\n#, fuzzy\n#~ msgid \"integration test:\"\n#~ msgstr \"インテグレーションテスト\"\n\n#, fuzzy\n#~ msgid \"main function:\"\n#~ msgstr \"Unsafe関数の呼び出し\"\n\n#, fuzzy\n#~ msgid \"method:\"\n#~ msgstr \"メソッド\"\n\n#, fuzzy\n#~ msgid \"module:\"\n#~ msgstr \"モジュール\"\n\n#, fuzzy\n#~ msgid \"ownership:\"\n#~ msgstr \"所有権\"\n\n#, fuzzy\n#~ msgid \"panic:\"\n#~ msgstr \"パニック（panic）\"\n\n#, fuzzy\n#~ msgid \"receiver:\"\n#~ msgstr \"ドライバ\"\n\n#, fuzzy\n#~ msgid \"standard library:\"\n#~ msgstr \"標準ライブラリ\"\n\n#, fuzzy\n#~ msgid \"struct:\"\n#~ msgstr \"構造体（structs）\"\n\n#, fuzzy\n#~ msgid \"thread:\"\n#~ msgstr \"スレッド\"\n\n#, fuzzy\n#~ msgid \"trait:\"\n#~ msgstr \"トレイト（trait）\"\n\n#, fuzzy\n#~ msgid \"undefined behavior:\"\n#~ msgstr \"実行時に未定義の動作はありません：\"\n\n#, fuzzy\n#~ msgid \"union:\"\n#~ msgstr \"共用体\"\n\n#, fuzzy\n#~ msgid \"unit test:\"\n#~ msgstr \"ユニットテスト\"\n\n#, fuzzy\n#~ msgid \"variable:\\\\\"\n#~ msgstr \"変数\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"パターンマッチング\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"ライブラリをデザイン\"\n"
  },
  {
    "path": "po/pl.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-01-24T13:24:49+01:00\\n\"\n\"PO-Revision-Date: 2023-08-25 14:19-0700\\n\"\n\"Last-Translator: Kuba Jaroszewski <jakub.jaroszewski@gmail.com>\\n\"\n\"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\\n\"\n\"Language: pl\\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=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 \"\n\"|| n%100>=20) ? 1 : 2);\\n\"\n\"X-Generator: Poedit 3.3.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Witamy w Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Prowadzenie kursu\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Struktura kursu\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Skróty klawiszowe\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Tłumaczenia\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Korzystanie z Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Ekosystem Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Próbki kodu\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Lokalne uruchamianie Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Dzień 1: Rano\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"Witamy\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"Hello, World\"\nmsgstr \"Witaj świecie!\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Co to jest Rust?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Zmienne\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/strings.md\nmsgid \"Strings\"\nmsgstr \"Łańcuchy znaków\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Wnioskowanie typów\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/slices-and-lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md\n#: src/error-handling/solution.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"Solution\"\nmsgstr \"Rozwiązania\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#, fuzzy\nmsgid \"Control Flow Basics\"\nmsgstr \"Kontrola przepływu\"\n\n#: src/SUMMARY.md src/control-flow-basics/conditionals.md\nmsgid \"Conditionals\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"Pętle `for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"`break` and `continue`\"\nmsgstr \"`przerwij` i `kontynuuj`\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funkcje\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Dzień 1: Popołudnie\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"Array Iteration\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/match.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Dopasowywanie wzorców\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"Destrukturyzacja wyliczeń\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Referencje\"\n\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Referencje\"\n\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Wiszące referencje\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"Struktury\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Struktury krotkowe\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Wyliczenia\"\n\n#: src/SUMMARY.md src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static and Const\"\nmsgstr \"static i const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Dzień 2: Rano\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"Kontrola przepływu\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Read i Write\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Metody\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Cechy\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"Wyprowadzanie cech\"\n\n#: src/SUMMARY.md src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"Trait Objects\"\nmsgstr \"Obiekty cech\"\n\n#: src/SUMMARY.md src/methods-and-traits/exercise.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Generyki\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Funkcje zewnętrzne\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Generyczne typy danych\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"Trait Bounds\"\nmsgstr \"Granice cech\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\n#, fuzzy\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Cecha`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Dzień 2: Popołudnie\"\n\n#: src/SUMMARY.md src/std-types.md\n#, fuzzy\nmsgid \"Standard Library Types\"\nmsgstr \"Biblioteka standardowa\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Biblioteka standardowa\"\n\n#: src/SUMMARY.md src/std-types/docs.md\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"Testy dokumentacyjne\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Option`\"\nmsgstr \"`Option` i `Result`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Result`\"\nmsgstr \"`Option` i `Result`\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`String`\"\nmsgstr \"String\"\n\n#: src/SUMMARY.md src/std-types/vec.md\n#, fuzzy\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Counter\"\nmsgstr \"Ćwiczenia\"\n\n#: src/SUMMARY.md src/std-traits.md\n#, fuzzy\nmsgid \"Standard Library Traits\"\nmsgstr \"Biblioteka standardowa\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\n#, fuzzy\nmsgid \"Comparisons\"\nmsgstr \"Porównanie\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"Iteratory\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"`From` and `Into`\"\nmsgstr \"`Od` i `do`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\n#, fuzzy\nmsgid \"Casting\"\nmsgstr \"Testowanie\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Odczyt` i `Zapis`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Domknięcia\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: ROT13\"\nmsgstr \"Ćwiczenia\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Dzień 3: Rano\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Zarządzanie pamięcią\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Automatyczne zarządzanie pamięcią\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Własność\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Semantyka przenoszenia\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copy Types\"\nmsgstr \"Typy złożone\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Drop`\"\nmsgstr \"Drop\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Box<T>`\"\nmsgstr \"`Pudełko`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Dzień 3: Popołudnie\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Pożyczanie\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"Pożyczanie\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"Pożyczanie\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"Interior Mutability\"\nmsgstr \"Interoperacyjność\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Statystyki zdrowia\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes.md\n#, fuzzy\nmsgid \"Slices and Lifetimes\"\nmsgstr \"Czas życia\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Wycinki\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"String References\"\nmsgstr \"Wiszące referencje\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"Czas życia w wywołaniach funkcji\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"Czas życia\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"Czas życia\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Dzień 4: Rano\"\n\n#: src/SUMMARY.md src/iterators.md\n#, fuzzy\nmsgid \"Iterators\"\nmsgstr \"Iteratory\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`FromIterator`\"\nmsgstr \"FromIterator\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Moduły\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Hierarchia systemu plików\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Widoczność\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Testowanie\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Moduły testowe\"\n\n#: src/SUMMARY.md src/testing/other.md\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"Inne zasoby\"\n\n#: src/SUMMARY.md src/testing/useful-crates.md\nmsgid \"Useful Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Algorytm Luhna\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Dzień 4: Popołudnie\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panikowanie\"\n\n#: src/SUMMARY.md src/error-handling/try.md\n#, fuzzy\nmsgid \"Try Operator\"\nmsgstr \"Iterator\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Niejawne konwersje\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"Cecha „Upuść”.\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`Od` i `do`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Strukturalna obsługa błędów za pomocą `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Niebezpieczny Rust\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe\"\nmsgstr \"Niebezpieczny Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Dereferencja surowych wskaźników\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Mutowalne zmienne statyczne\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Unie\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"Wywoływanie niebezpiecznych funkcji\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"Wdrażanie niebezpiecznych cech\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Bezpieczne opakowanie FFI\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Przygotowanie\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Reguły budowania\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Pliki binarne\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Biblioteka\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Interfejs\"\n\n#: src/SUMMARY.md\nmsgid \"Implementation\"\nmsgstr \"Implementacja\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Serwer\"\n\n#: src/SUMMARY.md src/android/aidl/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Wdrażanie\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Klient\"\n\n#: src/SUMMARY.md src/android/aidl/changing.md\nmsgid \"Changing API\"\nmsgstr \"Zmiana API\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Logowanie\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interoperacyjność\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Z językiem C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Wywołanie C z Bindgenem\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Wywołanie Rusta z C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Z językiem C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"The Bridge Module\"\nmsgstr \"Moduły testowe\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Rust Bridge\"\nmsgstr \"Binaria Rusta\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Typy skalarne\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"Rust Error Handling\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"C++ Error Handling\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Budowanie komponentów Androida w Ruście.\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Building for Android: Rust\"\nmsgstr \"Budowanie komponentów Androida w Ruście.\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Z Javą\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"Ćwiczenia\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"Niebezpieczny Rust\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Exercise\"\nmsgstr \"Ćwiczenia\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperacyjność z C\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"Przykłady\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"CXX Error Handling\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Obsługa błędów\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"Rozwiązania\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Dzień 1: Rano\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"A Minimal Example\"\nmsgstr \"Mały przykład\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"Debugging\"\nmsgstr \"Logowanie\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Other Projects\"\nmsgstr \"Inne zasoby\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"Compass\"\nmsgstr \"Porównanie\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"Rozwiązania\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Dzień 1: Popołudnie\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"More Traits\"\nmsgstr \"Cechy\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Using It\"\nmsgstr \"Korzystanie z Cargo\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"Exceptions\"\nmsgstr \"Funkcje\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Concurrency: Morning\"\nmsgstr \"Współbieżność\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Wątki\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"Wątki z zakresem\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Kanały\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Nieograniczone kanały\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Ograniczone kanały\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Wyślij` i `Synchronizacja`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"`Send`\"\nmsgstr \"`Wyślij`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`Sync`\"\nmsgstr \"`Synchronizacja`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Przykłady\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"Współdzielony stan\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`Arc`\"\nmsgstr \"`Łuk`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"Przykład\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Ucztujący filozofowie\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Wielowątkowe narzędzie do sprawdzania linków\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Współbieżność\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/runtimes.md\n#, fuzzy\nmsgid \"Runtimes\"\nmsgstr \"Gwarancje podczas działania\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Tasks\"\nmsgstr \"Zadania\"\n\n#: src/SUMMARY.md src/async/channels.md\n#, fuzzy\nmsgid \"Async Channels\"\nmsgstr \"Kanały\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"Kontrola przepływu\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\n#, fuzzy\nmsgid \"Async Traits\"\nmsgstr \"Cechy\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"Cancellation\"\nmsgstr \"Instalacja\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Ostatnie słowa\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Dzięki!\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Inne zasoby\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Uznania\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"To jest czterodniowy kurs Rust opracowany przez zespół Androida. Kurs \"\n\"obejmuje pełne spektrum Rusta, od podstawowej składni po zaawansowane \"\n\"tematy, takie jak programowanie uogólnione i obsługę błędów. Ostatni dzień \"\n\"obejmuje również treści specyficzne dla Androida.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Celem kursu jest nauczenie Cię języka Rust. Zakładamy, że nic nie wiesz o \"\n\"Ruście i mamy nadzieję, że:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Damy Ci kompleksowe zrozumienie składni i języka Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Umożliwimy modyfikowanie istniejących programów i pisanie nowych programów w \"\n\"Ruście.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Pokażemy powszechne idiomy Rusta.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Poza zakresem\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust to duży język i nie będziemy w stanie omówić go w całości w ciągu kilku \"\n\"dni. Niektóre cele będące poza zakresem tego kursu to:\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Tworzenie makr, zamiast tego zobacz [Rozdział 19.5 w Język Programowanie \"\n\"Rust](http://rust.w8.pl/book/ch19-06-macros.html) i [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Założenia\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Kurs zakłada, że wiesz już, jak programować. Rust to statycznie typowany \"\n\"język i aby było lepiej wyjaśnić lub przeciwstawić podejście Rusta czasami \"\n\"będziemy dokonywać porównań z C i C++.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Jeśli wiesz, jak programować w języku o dynamicznym typowaniu, takim jak \"\n\"Python lub JavaScript, to też dasz sobie radę.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"To jest przykład _notatki dla prowadzącego_. Użyjemy ich, aby dodać \"\n\"dodatkowe informacje do slajdów. Mogą to być kluczowe punkty, które \"\n\"prowadzący powinien omówić, a także odpowiedzi na typowe pytania, które \"\n\"pojawiają się na zajęciach.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Ta strona jest dla prowadzącego kurs.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Oto trochę podstawowych informacji o tym, jak prowadziliśmy ten kurs \"\n\"wewnętrznie w Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Aby prowadzić kurs należy:\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Zapoznaj się z materiałem kursu. Dołączyliśmy notatki prowadzącego na \"\n\"niektórych stronach, aby podkreślić kluczowe punkty (pomóż nam dodając \"\n\"więcej notatek dla prowadzącego!). Powinieneś upewnić się, że notatki są \"\n\"otwarte w wyskakującym okienku (kliknij łącze z małą strzałką obok „Notatki \"\n\"Prowadzącego\\\"). W ten sposób masz czysty ekran do zaprezentowania klasie.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Zdecyduj o datach. Ponieważ kurs jest duży, zalecamy zaplanowanie czterech \"\n\"dni w przeciągu dwóch tygodni. Uczestnicy kursu uważają, że luka w kursie \"\n\"jest pomocna, ponieważ pomaga im przetworzyć wszystkie informacje, które im \"\n\"przekazujemy.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Znajdź pokój wystarczająco duży dla uczestników. Polecamy grupy w wielkości \"\n\"15-20 osób. To na tyle mało, że ludzie czują się komfortowo w zadawaniu \"\n\"pytań --- jest również na tyle mało, że jeden prowadzący będzie miał czas na \"\n\"odpowiedzenie na pytania.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"W dniu kursu przyjdź na salę nieco wcześniej, aby wszystko ustawić. Zalecamy \"\n\"prezentację bezpośrednio przy użyciu `mdbook serve` uruchomionego na twoim \"\n\"laptopie (zobacz [instrukcja instalacji](https://github.com/google/\"\n\"comprehensive-rust#building)). Zapewnia to optymalną wydajność bez opóźnień \"\n\"podczas zmiany stron. Korzystanie z laptopa pozwoli Ci również poprawiać \"\n\"literówki jak ty lub uczestnicy kursu je dostrzegą.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Pozwól uczestnikom rozwiązywać ćwiczenia samodzielnie lub w małych grupach. \"\n\"Upewnij się, że pytasz uczestników, czy utknęli lub czy jest coś, w czym \"\n\"możesz pomóc. Gdy widzisz, że kilka osób ma ten sam problem, powiedz o tym \"\n\"klasie i zaoferuj rozwiązanie, np. pokazując gdzie znaleźć odpowiednie \"\n\"informacje w bibliotece standardowej.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"To wszystko, powodzenia w prowadzeniu kursu! Mamy nadzieję, że będzie to dla \"\n\"Ciebie równie zabawne jak dla nas!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Prosimy o późniejsze [przekazanie opinii](https://github.com/google/\"\n\"comprehensive-rust/discussions/86), abyśmy mogli dalej ulepszać kurs. \"\n\"Chętnie dowiemy się, co sprawdziło się u Ciebie, a co można ulepszyć. \"\n\"Uczestników również zachęcamy do [przesłania nam swoich opinii](https://\"\n\"github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust Fundamentals\"\nmsgstr \"Binaria Rusta\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"Struktura kursu\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (3 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 55 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Zobacz [dopasowywanie wzorców](../pattern-matching.md), aby uzyskać więcej \"\n\"informacji na temat wzorców w Rdza.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Afternoon (3 hours, including breaks)\"\nmsgstr \"Dzień 2 Ćwiczenia popołudniowe\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 15 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (3 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Android\"\nmsgstr \"Binaria Rusta\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Jeśli nie pomijasz części związanych z Androidem w dniu 4, będziesz \"\n\"potrzebować [AOSP](https://source.android.com/docs/setup/download/\"\n\"downloading). Ściągnij [repozytorium kursu](https://github.com/google/\"\n\"comprehensive-rust) na tym samym komputerze i przenieś katalog `src/android/\"\n\"` do katalogu głównego AOSP. Zapewni to, że system kompilacji Androida \"\n\"zobaczy pliki `Android.bp` w `src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Upewnij się, że `adb sync` działa z twoim emulatorem lub prawdziwym \"\n\"urządzeniem i prekompiluj wszystkie przykłady Androida używając `src/android/\"\n\"build_all.sh`. Przeczytaj skrypt, żeby zobaczyć polecenia, które uruchamia, \"\n\"i upewnij się, że działają, gdy uruchamiasz je ręcznie.\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"Binaria Rusta\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Concurrency in Rust\"\nmsgstr \"Współbieżność\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Format\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Kurs ma być bardzo interaktywny i zalecamy pozwalanie żeby pytania napędzały \"\n\"eksplorację Rusta!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Istnieje kilka przydatnych skrótów klawiaturowych w mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Strzałka w lewo\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Przejdź do poprzedniej strony.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Strzałka w prawo\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Przejdź do następnej strony.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Wykonaj przykładowy kod, który ma fokus.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Aktywuj pasek wyszukiwania.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Kurs został przetłumaczony na inne języki przez zespół cudownych \"\n\"wolontariuszy:\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\nmsgstr \"\"\n\"[koreański](https://google.github.io/comprehensive-rust/ko/) autorstwa \"\n\"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com/\"\n\"jiyongp) i [@jooyunghan](https://github.com/jooyunghan).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Użyj selektora języka w prawym górnym rogu, aby przełączać się między \"\n\"językami.\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"Incomplete Translations\"\nmsgstr \"Tłumaczenia\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[brazylijski portugalski](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) autorstwa [@rastringer](https://github.com/rastringer) i [@hugojacob]\"\n\"(https://github.com/hugojacob).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Jeśli chcesz w tym pomóc, zapoznaj się z [naszymi instrukcjami](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) aby \"\n\"dowiedzieć się, jak to zacząć. Tłumaczenia są koordynowane w [narzędziu do \"\n\"śledzenia problemów](https://github.com/google/comprehensive-rust/\"\n\"issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Kiedy zaczniesz czytać o Ruście, wkrótce poznasz [Cargo](https://doc.rust-\"\n\"lang.org/cargo/), jest to standardowe narzędzie używany w ekosystemie Rusta \"\n\"do tworzenia i uruchamiania aplikacji Rusta. Tutaj chcemy krótko opisać, \"\n\"czym jest Cargo i jak pasuje do szerszego ekosystemu i do tego szkolenia.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Instalacja\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Wraz z cargo i rustc, Rustup zainstaluje się jako narzędzie wiersza poleceń, \"\n\"którego można użyć do instalacji/przełączenia łańcuchów narzędzi, \"\n\"konfiguracji skrośnej kompilacji itp.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Na Debianie/Ubuntu możesz zainstalować Cargo, źródło Rusta i [narzędzie do \"\n\"formatowania Rusta](https://github.com/rust-lang/rustfmt) za pomocą\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Ekosystem Rusta\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"Ekosystem Rusta składa się z wielu narzędzi, z których główne to:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: kompilator Rusta, który zmienia pliki `.rs` na pliki binarne i inne \"\n\"formaty pośrednie.\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: menedżer zależności Rusta i narzędzie do budowania. Cargo wie, jak \"\n\"pobrać zależności hostowane na <https://crates.io> i przekazać je do `rustc` \"\n\"podczas budowania projektu. Cargo ma również wbudowane narzędzie do \"\n\"uruchamiania testów, które jest używane do wykonywania testów jednostkowych.\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: instalator i aktualizator pakietu narzędzi Rusta. To narzędzie \"\n\"służy do instalowania i aktualizacji `rustc` i `cargo`, gdy zostaną wydane \"\n\"nowe wersje Rusta. Ponadto `rustup` może również pobrać dokumentację \"\n\"biblioteki standardowej. Możesz mieć jednocześnie zainstalowanych wiele \"\n\"wersji Rusta i `rustup` pozwoli ci przełączać się między nimi w razie \"\n\"potrzeby.\"\n\n#: src/cargo/rust-ecosystem.md src/hello-world/hello-world.md\n#: src/tuples-and-arrays/tuples-and-arrays.md src/references/exclusive.md\n#: src/pattern-matching/destructuring.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md src/concurrency/threads.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Kluczowe punkty:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust ma szybki harmonogram wydań z nową wersją co sześć tygodni. Nowe wersje \"\n\"zachowują kompatybilność wsteczną z starymi wersjami --- plus umożliwiają \"\n\"nowe funkcjonalności.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"Istnieją trzy kanały wydania: \\\"stable\\\" (\\\"stabilny\\\"), \\\"beta\\\" i \"\n\"\\\"nightly\\\" (\\\"nocny\\\").\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Nowe funkcje są testowane na \\\"nightly\\\", \\\"beta\\\" jest tym, co staje się \"\n\"\\\"stable\\\" co sześć tygodni.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust ma również [edycje](https://doc.rust-lang.org/edition-guide/): obecna \"\n\"edycja to Rust 2021. Poprzednie edycje to Rust 2015 i Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"Edycje mogą wprowadzać do języka zmiany niekompatybilne wstecznie.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Aby zapobiec niekompatybilności kodu, edycje są opcjonalne: wybierasz edycję \"\n\"swojej skrzyni za pomocą pliku `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Aby uniknąć podziału ekosystemu, kompilatory Rusta mogą mieszać kod napisany \"\n\"dla różnych edycji.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Wspomnij, że dość rzadko używa się kompilatora bezpośrednio, a nie przez \"\n\"`cargo` (większość użytkowników nigdy tego nie robi).\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Warto wspomnieć, że samo Cargo jest niezwykle potężnym i wszechstronnym \"\n\"narzędziem. Jest zdolne do wielu zaawansowanych funkcji, w tym między innymi:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Struktura projektu/pakietu\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[obszary robocze](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"Zarządzanie/buforowanie zależności\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[tworzenie skryptów](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[instalacja globalna](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Jest również rozszerzalne za pomocą wtyczek poleceń podrzędnych (takich jak \"\n\"[cargo clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Przeczytaj więcej w [oficjalnej księdze Cargo](https://doc.rust-lang.org/\"\n\"cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Próbki kodu\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Na tym szkoleniu będziemy głównie poznawać język Rust poprzez przykłady \"\n\"które można wykonać za pośrednictwem przeglądarki. To znacznie ułatwia \"\n\"konfigurację i zapewnia spójne wrażenia dla wszystkich.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Nadal zachęcamy do instalowania Cargo: ułatwi ci to wykonanie ćwiczeń. \"\n\"Ostatniego dnia wykonamy większe ćwiczenie, które pokaże ci, jak pracować z \"\n\"zależnościami i do tego potrzebujesz Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Bloki kodu w tym kursie są w pełni interaktywne:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Możesz użyć \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \", aby wykonać kod, gdy fokus znajduje się w polu tekstowym.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Większość przykładów kodu można edytować, jak pokazano powyżej. Kilku próbek \"\n\"kodu nie można edytować z różnych powodów:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Wbudowane playground nie mogą wykonywać testów jednostkowych. Kopiuj-wklej \"\n\"kod i otwórz go na prawdziwym Playground, aby zademonstrować testy \"\n\"jednostkowe.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Wbudowane playground tracą swój stan w momencie nawigacji z dala od strony! \"\n\"To jest powód, dla którego uczniowie powinni rozwiązywać ćwiczenia \"\n\"korzystając z lokalnej instalacji Rusta lub za pośrednictwem prawdziwego \"\n\"Playground.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Uruchamianie kodu lokalnie z Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Jeśli chcesz eksperymentować z kodem we własnym systemie, będziesz musieć \"\n\"najpierw zainstalować Rusta. Zrób to, postępując zgodnie z [instrukcjami w \"\n\"książce Język Programowania Rust](http://rust.w8.pl/book/ch01-01-\"\n\"installation.html). To powinno dać działające `rustc` i `cargo`. Aktualnie \"\n\"najnowsza stabilna wersja Rusta ma następujące numery wersji:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\n#, fuzzy\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Następnie wykonaj następujące kroki, aby zbudować plik binarny Rusta z \"\n\"jednego z przykładów w tym szkoleniu:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Kliknij przycisk „Kopiuj do schowka” na przykładzie, który chcesz skopiować.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Użyj polecenia `cargo new exercise`, aby utworzyć nowy katalog `exercise/` \"\n\"dla swojego kodu:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Przejdź do `exercise/` i użyj `cargo run`, aby zbudować i uruchomić plik \"\n\"binarny:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Zastąp kod w `src/main.rs` własnym kodem. Na przykład, korzystając z \"\n\"przykładu na poprzedniej stronie, spraw, aby `src/main.rs` wyglądał tak\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Użyj polecenia `cargo run`, aby zbudować i uruchomić zaktualizowany plik \"\n\"binarny:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Użyj `cargo check`, aby szybko sprawdzić swój projekt pod kątem błędów, użyj \"\n\"`cargo build` aby skompilować go bez uruchamiania. Dane wyjściowe znajdziesz \"\n\"w `target/debug/` dla normalnej kompilacji do debugowania. Użyj polecenia \"\n\"`cargo build --release`, aby utworzyć zoptymalizowany plik do wydania w \"\n\"`target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Możesz dodać zależności dla swojego projektu, edytując `Cargo.toml`. Kiedy \"\n\"uruchamiasz polecenia `cargo`, Cargo automatycznie pobierze i skompiluje \"\n\"brakujące zależności dla Ciebie.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Spróbuj zachęcić uczestników zajęć do zainstalowania Cargo i korzystania z \"\n\"edytora tekstu. Ułatwi im to życie, ponieważ będą mieli normalne środowisko \"\n\"programistyczne.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Witamy w dniu 1\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"To pierwszy dzień Comprehensive Rust. Przerobimy dziś dużo materiału:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Podstawowa składnia Rusta: zmienne, typy skalarne i złożone, wyliczenia, \"\n\"struktury, referencje, funkcje i metody.\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"Wnioskowanie typów\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"Dopasowywanie wzorców: destrukturyzacja wyliczeń, struktur i tablic.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 3 hours\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Proszę przypomnieć uczniom, że:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Powinni zadawać pytania, kiedy je dostaną, nich ich nie zachowują do końca.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"Klasa ma być interaktywna, a dyskusje są bardzo mile widziane!\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Jako prowadzący powinieneś starać się, aby dyskusje były istotne, tj. \"\n\"zachowaj związek z tym, jak Rust robi rzeczy w porównaniu z innym językiem. \"\n\"Może być ciężko znaleźć właściwą równowagę, ale skłaniaj się do zezwalania \"\n\"na dyskusje ponieważ angażują ludzi znacznie bardziej niż jednokierunkowa \"\n\"komunikacja.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Pytania prawdopodobnie oznaczają, że rozmawiamy o rzeczach przed slajdami.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"To jest całkowicie w porządku! Powtarzanie jest ważną częścią uczenia się. \"\n\"Pamiętaj, że slajdy są tylko wsparciem i jeżeli chcesz to możesz je pominąć.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/slices-and-lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Hello, World](./hello-world/hello-world.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust to nowy język programowania, który miał swoje [wydanie 1.0 w 2015 roku]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust to język kompilowany statycznie, pełniący podobną rolę jak C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` używa LLVM jako backendu.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust obsługuje wiele [platform i architektur](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows,...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust jest używany w szerokiej gamie urządzeń:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware i bootloadery,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"inteligentne wyświetlacze,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"telefony komórkowe,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"komputery stacjonarne,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"serwery.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust pasuje do tego samego obszaru co C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Wysoka elastyczność.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Wysoki poziom kontroli.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Można skalować do bardzo ograniczonych urządzeń, takich jak telefony \"\n\"komórkowe.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Nie ma biblioteki uruchomieniowej ani odśmiecania pamięci.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Koncentruje się na niezawodności i bezpieczeństwie bez poświęcania \"\n\"wydajności.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Przejdźmy do najprostszego możliwego programu Rust, klasycznego Hello World \"\n\"program:\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Co widać:\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Funkcje są wprowadzane za pomocą `fn`.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Bloki są oddzielone nawiasami klamrowymi, jak w C i C++.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Funkcja `main` jest punktem wejścia programu.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust ma higieniczne makra, `println!` jest tego przykładem.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Łańcuchy znaków w Ruście są zakodowane w UTF-8 i mogą zawierać dowolne znaki \"\n\"Unicode.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Ten slajd ma na celu zapoznanie uczniów z kodem Rusta. Zobaczą tego dużo w \"\n\"ciągu następnych czterech dni, więc zaczniemy od czegoś znajomego.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust jest bardzo podobny do innych języków w tradycji C/C++/Java. Jest \"\n\"imperatywny (nie funkcjonalny) i nie próbuje wymyślać rzeczy na nowo jeśli \"\n\"nie ma takiej potrzeby.\"\n\n#: src/hello-world/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust jest nowoczesny, ma pełne wsparcie dla rzeczy takich jak Unicode.\"\n\n#: src/hello-world/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust używa makr w sytuacjach, w których chcesz mieć zmienną liczbę argumenty \"\n\"(brak [przeciążania funkcji](basic-syntax/functions-interlude.md)).\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/hello-world/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Niektóre unikalne zalety Rusta:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Brak niezainicjowanych zmiennych.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Brak podwójnych zwolnień pamięci.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Brak użycia po zwolnieniu.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Brak wskaźników `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Żadnych zapomnianych zablokowanych muteksów.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Brak wyścigów danych między wątkami.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Brak unieważniania iteratora.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Zakres dostępu do tablicy jest sprawdzany.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Zdefiniowano przepełnienie całkowitoliczbowe.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Wyliczenia i dopasowywanie wzorców.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Generyczne typy i funkcje.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"Brak narzutu przy FFI.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Abstrakcje o zerowych kosztach.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Świetne błędy kompilatora.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Wbudowany menedżer zależności.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Wbudowana obsługa testów.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Doskonała obsługa protokołu serwera językowego.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Pamiętaj, aby zapytać klasę, z jakimi językami mają doświadczenie. W \"\n\"zależności od odpowiedzi możesz wyróżnić różne funkcje Rusta:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Doświadczenie z C lub C++: Rust eliminuje całą klasę błędów _w czasie \"\n\"działania_ za pośrednictwem nadzorcy pożyczania. Otrzymujesz wydajność jak w \"\n\"C i C++, ale bez problemów z bezpieczeństwem pamięci. Ponadto otrzymujesz \"\n\"nowoczesny język z konstrukcjami, jak dopasowywanie wzorców i wbudowane \"\n\"zarządzanie zależnościami.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"Doświadczenie z Javą, Go, Pythonem, JavaScript...: Otrzymujesz takie samo \"\n\"bezpieczeństwo pamięci jak w tych językach, plus podobne uczucie języka \"\n\"wysokiego poziomu. Ponadto otrzymujesz szybką i przewidywalną wydajność jak \"\n\"w C i C++ (bez Garbage Collectora) a także dostęp do sprzętu na niskim \"\n\"poziomie (jeśli go potrzebujesz)\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Strings](./types-and-values/strings.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md src/testing.md src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust zapewnia bezpieczeństwo typów dzięki statycznemu typowaniu. Wiązania \"\n\"zmiennych są domyślnie niezmienne:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops.md\n#: src/control-flow-basics/break-continue.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\n#: src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Typy\"\n\n#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Literals\"\nmsgstr \"Literały\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Liczby całkowite ze znakiem\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Liczby całkowite bez znaku\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Liczby zmiennoprzecinkowe\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Wartości skalarne Unicode\"\n\n#: src/types-and-values/values.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Logiczne\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Typy mają następujące rozmiary:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` i `fN` mają wielkość _N_ bitów,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` i `usize` mają wielkość wskaźnika,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` ma 32 bitów,\"\n\n#: src/types-and-values/values.md\n#, fuzzy\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` ma 8 bitów.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\n#, fuzzy\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"`String` to zmienny bufor łańcucha znaków.\"\n\n#: src/types-and-values/strings.md\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\", \\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust sprawdzi, w jaki sposób zmienna jest _używana_ do określenia typu:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Ten slajd pokazuje, w jaki sposób kompilator Rusta wnioskuje o typach na \"\n\"podstawie ograniczeń nałożonych przez deklaracje i zastosowania zmiennych.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Bardzo ważne jest podkreślenie, że zmienne zadeklarowane w ten sposób nie są \"\n\"jakimś dynamicznym „dowolnym typem”, który może przechowywać dowolne dane. \"\n\"Kod maszynowy generowany przez taką deklarację jest identyczny z jawną \"\n\"deklaracją typu. Kompilator wykonuje to za nas i pomaga nam pisać bardziej \"\n\"zwięzły kod.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"Implementacja\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md src/tuples-and-arrays.md src/borrowing.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\nmsgstr \"Większość składni Rusta będzie Ci znana z C, C++ lub Javy:\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"Blocks are delimited by curly braces.\"\nmsgstr \"Bloki i zakresy są oddzielone nawiasami klamrowymi.\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"Line comments are started with `//`, block comments are delimited by `/* ... \"\n\"*/`.\"\nmsgstr \"\"\n\"Komentarze wierszowe rozpoczynają się od `//`, komentarze blokowe są \"\n\"rozdzielane przez `/*... */`.\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Keywords like `if` and `while` work the same.\"\nmsgstr \"Słowa kluczowe, takie jak `if` i `while`, działają tak samo.\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\nmsgstr \"\"\n\"Przypisanie zmiennej odbywa się za pomocą `=`, porównanie za pomocą `==`.\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"`if` expressions\"\nmsgstr \"wyrażenia `jeśli`\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\n#, fuzzy\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"Ponadto możesz użyć go jako wyrażenia. Robi to samo, co powyżej:\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/conditionals.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"Wyrażenia `while`\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"Podobnie jak w przypadku `if`, istnieje wariant `while let`, który \"\n\"wielokrotnie sprawdza wartość wbrew wzorowi:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`for`\"\nmsgstr \"Pętle `for`\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) używane do \"\n\"definiowania destruktorów.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`loop`\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) używane do \"\n\"definiowania destruktorów.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"We will discuss iteration later; for now, just stick to range expressions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\\\"{result}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Jeśli chcesz wyjść z pętli wcześniej, użyj `break`, jeśli chcesz natychmiast \"\n\"rozpocząć w następnej iteracji użyj polecenia „kontynuuj”. Zarówno \"\n\"`continue`, jak i `break` mogą opcjonalnie weź argument etykiety, który \"\n\"służy do wyrwania się z zagnieżdżonych pętli:\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\\\"x: {x}, i: {i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"In this case we break the outer loop after 3 iterations of the inner loop.\"\nmsgstr \"\"\n\"W tym przypadku przerywamy zewnętrzną pętlę po 3 iteracjach wewnętrznej \"\n\"pętli.\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Bloki\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"Blok w Rust ma wartość i typ: wartość jest ostatnim wyrażeniem blok:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Zakresy i przesłanianie\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Możesz przesłaniać zmienne, zarówno te z zakresów zewnętrznych, jak i \"\n\"zmienne z tego samego zakresu:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md src/std-traits/from-and-into.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Możesz pokazać, jak zmienia się wartość bloku, zmieniając ostatnią linię w \"\n\"bloku. Na przykład dodanie/usunięcie średnika lub użycie zwrotu.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Definicja: Przesłanianie różni się od mutacji, ponieważ po przesłanianiu \"\n\"obie lokalizacje pamięci istnieją w tym samym czasie. Obie są dostępne pod \"\n\"tą samą nazwą, w zależności od tego, gdzie używasz ich w kodzie.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Zmienna przesłaniająca może mieć inny typ.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Przesłanianie na pierwszy rzut oka wygląda niejasno, ale jest wygodne do \"\n\"trzymania wartości po `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Deklarowane parametry są poprzedzają typ (na odwrót w porównaniu do \"\n\"niektórych języków programowania), potem zwracany typ.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Ostatnie wyrażenie w ciele funkcji (lub bloku) staje się zwracaną wartością. \"\n\"Wystarczy pominąć `;` na końcu wyrażenia.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Niektóre funkcje nie zwracają wartości, ich zwracany typ to 'typ \"\n\"jednostkowy', `()`. Kompilator to wywnioskuje jeżeli `-> ()` jest pominięte.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Każda funkcja ma jedną implementację:\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"Zawsze przyjmuje jeden zestaw typów parametrów.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"Przeciążanie operatora jest realizowane poprzez cechy w [`std::ops`](https://\"\n\"doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"Witamy\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n\"elements of an array have the same type, while tuples can accommodate \"\n\"different types. Both types have a size fixed at compile time.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Arrays\"\nmsgstr \"Tablice\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[T; N]`\"\nmsgstr \"`[T; N]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`[20, 30, 40]`, `[0; 3]`\"\nmsgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Tuples\"\nmsgstr \"Krotki\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\nmsgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\nmsgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Array assignment and access:\"\nmsgstr \"Przypisanie i dostęp do tablicy:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuple assignment and access:\"\nmsgstr \"Przypisanie i dostęp do krotki:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Arrays:\"\nmsgstr \"Tablice:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Tablice mają elementy tego samego typu, `T`, i długość, `N`, która jest \"\n\"stałą czasu kompilacji. Zauważ, że długość tablicy to _część jej typu_, to \"\n\"znaczy, że `[u8; 3]` i `[u8; 4]` to dwa różne typy.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Możemy użyć literałów do przypisania wartości do tablic.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"W funkcji main instrukcja print pyta o implementację do debugowania za \"\n\"pomocą parametru formatowania `?`: `{}` daje domyślne wyjście, `{:?}` daje \"\n\"wyjście do debugowania. Mogliśmy również użyć `{a}` i `{a:?}` bez określania \"\n\"wartości po łańcuchu formatującym.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Dodanie `#`, np. `{a:#?}`, wywołuje format \\\"ładnego druku\\\", który może być \"\n\"łatwiejszy do odczytania.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples:\"\nmsgstr \"Krotki:\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Podobnie jak tablice, krotki mają stałą długość.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Krotki grupują wartości różnych typów w typ złożony.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Dostęp do pól krotki można uzyskać po kropce i indeksie wartości, np. `t.0`, \"\n\"`t.1`.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a type, \"\n\"and the only valid value of that type --- that is to say both the type and \"\n\"its value are expressed as `()`. It is used to indicate, for example, that a \"\n\"function or expression has no return value, as we'll see in a future slide.\"\nmsgstr \"\"\n\"Pusta krotka `()` jest również znana jako \\\"typ jednostkowy\\\". Jest to \"\n\"zarówno typ, jak i jedyna poprawna wartość tego typu — to znaczy zarówno \"\n\"typ, jak i jego wartość są wyrażone jako `()`. Służy do wskazania, na \"\n\"przykład, że funkcja lub wyrażenie nie zwraca żadnej wartości, co zobaczymy \"\n\"na kolejnym slajdzie.\"\n\n#: src/tuples-and-arrays/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"You can think of it as `void` that can be familiar to you from other \"\n\"programming languages.\"\nmsgstr \"\"\n\"Możesz myśleć o tym jako o „pustce” (ang. `void`), która może być ci znana z \"\n\"innych języków programowania.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"Słowo kluczowe `match` pozwala dopasować wartość do jednego lub więcej \"\n\"_wzorców_. The porównania są wykonywane od góry do dołu, a pierwszy mecz \"\n\"wygrywa.\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"Wzorce mogą być prostymi wartościami, podobnie jak `switch` w C i C++:\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be irrefutable, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Podobnie jak `if let`, każde ramię dopasowania musi być tego samego typu. \"\n\"Typ jest ostatni wyrażenie bloku, jeśli istnieje. W powyższym przykładzie \"\n\"typem jest `()`.\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/match.md src/user-defined-types/named-structs.md\n#: src/user-defined-types/enums.md src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Key Points:\"\nmsgstr \"Kluczowe punkty:\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Możesz wskazać, w jaki sposób niektóre określone znaki są używane we wzorcu\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` jako `lub`\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` może rozwinąć się tak bardzo, jak to konieczne\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` reprezentuje zakres włącznie\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` to symbol wieloznaczny\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Osłony dopasowujące jako oddzielna funkcja składni są ważne i konieczne, gdy \"\n\"chcemy zwięźle wyrazić bardziej złożone idee, niż pozwalają na to same \"\n\"wzorce.\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Nie są tym samym, co osobne wyrażenie `if` wewnątrz ramienia dopasowania. \"\n\"Wyrażenie `if` wewnątrz bloku rozgałęzienia (po `=>`) następuje po wybraniu \"\n\"ramienia dopasowania. Niepowodzenie warunku `if` wewnątrz tego bloku nie \"\n\"spowoduje powstania innych ramion oryginalnego wyrażenia „dopasuj”, które \"\n\"jest brane pod uwagę.\"\n\n#: src/tuples-and-arrays/match.md\n#, fuzzy\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Warunek zdefiniowany w strażniku dotyczy każdego wyrażenia we wzorcu ze \"\n\"znakiem `|`.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Destructuring is a way of extracting data from a data structure by writing a \"\n\"pattern that is matched up to the data structure, binding variables to \"\n\"subcomponents of the data structure.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"You can destructure tuples and arrays by matching on their elements:\"\nmsgstr \"Możesz niszczyć tablice, krotki i plasterki, dopasowując ich elementy:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"on X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left of Y axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"below X axis\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"first quadrant\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"Tell me about {triple:?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"First is 1 and the rest were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"All elements were ignored\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Create a new array pattern using `_` to represent an element.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Add more values to the array.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Point out that how `..` will expand to account for different number of \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"Jaki jest typ słowa w każdej pętli?\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Użyj powyższego, aby napisać funkcję `pretty_print`, która ładnie drukuje \"\n\"macierz i funkcję `transpose`, która transponuje macierz (zamienia wiersze \"\n\"na kolumny):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"Zakoduj na stałe obie funkcje, aby działały na macierzach 3 × 3.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"\"\n\"Skopiuj poniższy kod do <https://play.rust-lang.org/> i zaimplementuj \"\n\"funkcje:\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\"```rust\\n\"\n\"// TODO: usuń to jak skończysz implementację.\\n\"\n\"#![allow(unused_variables, dead_code)]\\n\"\n\"```\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/references.md src/user-defined-types.md src/pattern-matching.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust będzie statycznie zabraniał wiszących referencji:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.count_ones()`). There is no need for an `->` operator like \"\n\"in C++.\"\nmsgstr \"\"\n\"W niektórych przypadkach Rust dokona automatycznej dereferencji, w \"\n\"szczególności podczas wywoływania metod (spróbuj `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"Porozmawiamy więcej o pożyczaniu, kiedy przejdziemy do własności.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Pamiętaj o różnicy między `let mut ref_x: &i32` i `let ref_x: &mut i32`. \"\n\"Pierwsza reprezentuje zmienną referencję, z którą można powiązać różne \"\n\"wartości, podczas gdy druga reprezentuje odwołanie do zmiennej wartości.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Podobnie jak C i C++, Rust obsługuje niestandardowe struktury:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Jeśli masz już zmienne o odpowiednich nazwach, możesz je utworzyć struct za \"\n\"pomocą skrótu:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"Jeśli nazwy pól są nieistotne, możesz użyć struktury krotki:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Jest to często używane w przypadku opakowań z jednym polem (zwanych \"\n\"newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Nowe typy to świetny sposób na zakodowanie dodatkowych informacji o wartości \"\n\"w typie pierwotnym, na przykład:\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Liczba jest mierzona w niektórych jednostkach: „Newtons” w powyższym \"\n\"przykładzie.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Wartość przeszła walidację podczas tworzenia, więc nie musisz już \"\n\"weryfikować jej ponownie przy każdym użyciu: „PhoneNumber(String)” lub \"\n\"„OddNumber(u32)”.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Zademonstruj, jak dodać wartość `f64` do typu `Newtons`, uzyskując dostęp do \"\n\"pojedynczego pola w newtype.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust generalnie nie lubi niejasnych rzeczy, takich jak automatyczne \"\n\"rozpakowywanie lub na przykład używanie wartości boolowskich jako liczb \"\n\"całkowitych.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"Przeciążenie operatora jest omówione w dniu 3 (leki generyczne).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Słowo kluczowe `enum` pozwala na utworzenie typu, który ma kilka różne \"\n\"warianty:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Wyliczenia umożliwiają zebranie zestawu wartości w ramach jednego typu\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"To może być dobry moment na porównanie Structs i Enums:\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"W obu przypadkach możesz mieć prostą wersję bez pól (struktura jednostek) \"\n\"lub wersję z różnymi typami pól (wariantowe ładunki).\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Można nawet zaimplementować różne warianty wyliczenia z osobnymi \"\n\"strukturami, ale wtedy nie byłyby one tego samego typu, co gdyby wszystkie \"\n\"były zdefiniowane w wyliczeniu.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"Wyliczenie `Bar` pokazuje, że istnieje sposób kontrolowania wartości i typu \"\n\"wyróżnika. Jeśli usunie się `repr`, typ dyskryminacyjny zajmuje 2 bajty, \"\n\"ponieważ 10001 mieści 2 bajty.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Dla [niektórych typów](https://doc.rust-lang.org/std/option/\"\n\"#representation), Rust gwarantuje, że `size_of::<T>()` równa się `size_of::\"\n\"<Option<T> >()`.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Przykładowy kod, jeśli chcesz pokazać, jak reprezentacja bitowa _może_ \"\n\"wyglądać w praktyce. Należy zauważyć, że kompilator nie zapewnia żadnych \"\n\"gwarancji dotyczących tej reprezentacji, dlatego jest to całkowicie \"\n\"niebezpieczne.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Zgodnie z [książką Rust RFC](https://rust-lang.github.io/rfcs/0246-const-vs-\"\n\"static.html) są one wstawiane podczas użycia.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Witamy w dniu 1\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Jak zauważono w [książce Rust RFC](https://rust-lang.github.io/rfcs/0246-\"\n\"const-vs-static.html), nie są one wstawiane podczas użycia i mają \"\n\"rzeczywistą powiązaną lokalizację pamięci. Jest to przydatne w przypadku \"\n\"niebezpiecznego i osadzonego kodu, a zmienna żyje przez całe wykonanie \"\n\"programu.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"\"\n\"Wspomnij, że `const` zachowuje się semantycznie podobnie do `constexpr` C++.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"\"\n\"Z drugiej strony `static` jest znacznie bardziej podobny do `const` lub \"\n\"mutowalnej zmiennej globalnej w C++.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Nie jest bardzo powszechne, że ktoś potrzebowałby stałej wyliczanej w czasie \"\n\"wykonywania, ale jest to pomocne i bezpieczniejsze niż używanie zmiennej \"\n\"statycznej.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Properties table:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Constant\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Has an address in memory\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"No (inlined)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"Funkcja `main` jest punktem wejścia programu.\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Can be mutable\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (unsafe)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Evaluated at compile time\"\nmsgstr \"Wartości mają stałe rozmiary znane w czasie kompilacji.\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Inlined wherever it is used\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Witamy w dniu 2\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"Teraz, gdy widzieliśmy już sporo Rust, będziemy kontynuować:\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"Dopasowywanie wzorców: destrukturyzacja wyliczeń, struktur i tablic.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\nmsgstr \"\"\n\"Zobacz [dopasowywanie wzorców](../pattern-matching.md), aby uzyskać więcej \"\n\"informacji na temat wzorców w Rdza.\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"Struktury\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Wzorców można również używać do wiązania zmiennych z częściami wartości. Oto \"\n\"jak sprawdzasz strukturę swoich typów. Zacznijmy od prostego typu `enum`:\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Tutaj użyliśmy ramion do _destrukturyzacji_ wartości `Result`. Na początku \"\n\"arm, `half` jest powiązany z wartością wewnątrz wariantu `Ok`. W drugim \"\n\"ramieniu `msg` jest powiązany z komunikatem o błędzie.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"Zmień wartości literalne w `foo`, aby dopasować je do innych wzorców.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"Dodaj nowe pole do `Foo` i w razie potrzeby wprowadź zmiany we wzorcu.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"Wyrażenie `if`/`else` zwraca wyliczenie, które jest później rozpakowywane z \"\n\"`match`.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Możesz spróbować dodać trzeci wariant do definicji enum i wyświetlić błędy \"\n\"podczas uruchamiania kodu. Wskaż miejsca, w których Twój kod jest teraz \"\n\"niewyczerpany i jak kompilator próbuje udzielić Ci wskazówek.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Dostęp do wartości w wariantach enum można uzyskać dopiero po dopasowaniu do \"\n\"wzorca. Wzorzec wiąże odniesienia do pól w „ramię dopasowania” po `=>`.\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Zademonstruj, co się dzieje, gdy wyszukiwanie jest niewyczerpujące. Zwróć \"\n\"uwagę na zalety kompilatora Rusta, który potwierdza, kiedy wszystkie \"\n\"przypadki są obsługiwane.\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`if let` expressions\"\nmsgstr \"wyrażenia `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"wyrażenia `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`match` expressions\"\nmsgstr \"`dopasuj` wyrażenia\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"wyrażenia `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"Ciągi bajtów\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/googletest.md\n#: src/testing/solution.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Podobnie jak w przypadku `if`, istnieje wariant `while let`, który \"\n\"wielokrotnie sprawdza wartość wbrew wzorowi:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Tutaj iterator zwrócony przez `v.iter()` zwróci `Option<i32>` przy każdym \"\n\"wywołanie funkcji „następny()”. Zwraca `Some(x)` dopóki nie skończy, po czym \"\n\"to zrobi zwróć „Brak”. Polecenie „while let” pozwala nam przeglądać \"\n\"wszystkie elementy.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"W przeciwieństwie do `match`, `if let` nie obsługuje klauzul ochronnych dla \"\n\"dopasowywania wzorców.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"Typowym zastosowaniem jest obsługa wartości `Some` podczas pracy z `Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"W przeciwieństwie do `match`, `if let` nie obsługuje klauzul ochronnych dla \"\n\"dopasowywania wzorców.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"wyrażenia `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Zwróć uwagę, że pętla „while let” będzie działać tak długo, jak długo \"\n\"wartość będzie pasować do wzorca.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Możesz przepisać pętlę `while let` jako pętlę nieskończoną z instrukcją if, \"\n\"która przerywa działanie, gdy nie ma wartości do rozpakowania dla `iter.\"\n\"next()`. Opcja `while let` zapewnia cukier składniowy dla powyższego \"\n\"scenariusza.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust umożliwia powiązanie funkcji z nowymi typami. Robisz to z blok `impl`:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"„&self” powyżej wskazuje, że metoda niezmiennie pożycza obiekt. Tam są \"\n\"innymi możliwymi odbiorcami metody:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: pożycza obiekt od dzwoniącego za pomocą współdzielonego i \"\n\"niezmiennego odniesienie. Obiekt może być później ponownie użyty.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: pożycza obiekt od wywołującego używając unikalnego i zmiennego \"\n\"odniesienie. Obiekt może być później ponownie użyty.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: przejmuje obiekt na własność i oddala go od dzwoniącego. The metoda \"\n\"staje się właścicielem obiektu. Obiekt zostanie usunięty (cofnięty \"\n\"przydział) gdy metoda zwraca, chyba że jej własność jest wyraźnie określona \"\n\"przekazywane.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Brak odbiornika: staje się to metodą statyczną w strukturze. Zwykle \"\n\"przyzwyczajony tworzyć konstruktory, które zgodnie z konwencją nazywane są \"\n\"„nowymi”.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\"Pomocne może być wprowadzenie metod poprzez porównanie ich z funkcjami.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Metody są wywoływane na instancji typu (takiej jak struct lub enum), \"\n\"pierwszy parametr reprezentuje instancję jako `self`.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Deweloperzy mogą zdecydować się na użycie metod, aby skorzystać ze składni \"\n\"odbiornika metod i pomóc w ich lepszej organizacji. Dzięki metodom możemy \"\n\"przechowywać cały kod implementacji w jednym przewidywalnym miejscu.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Zwróć uwagę na użycie słowa kluczowego `self`, odbiornika metody.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Pokaż, że jest to skrócony termin dla `self:&Self` i być może pokaż, jak \"\n\"można również użyć nazwy struktury.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Wyjaśnij, że `Self` jest aliasem typu dla typu, w którym znajduje się blok \"\n\"`impl` i może być użyty w innym miejscu bloku.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Zwróć uwagę, jak `self` jest używane jak inne struktury, a notacja kropkowa \"\n\"może być używana do odwoływania się do poszczególnych pól.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"To może być dobry moment, aby zademonstrować, czym `&self` różni się od \"\n\"`self` poprzez modyfikację kodu i próbę dwukrotnego uruchomienia say_hello.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Oprócz wariantów na „ja”, istnieją również [specjalne typy opakowań](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) mogą być typami \"\n\"odbiorników, takimi jak `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust pozwala na abstrakcję nad typami z cechami. Są podobne do interfejsów:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"Traits are implemented in an `impl <trait> for <type> { .. }` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Traits may specify pre-implemented (provided) methods and methods that users \"\n\"are required to implement themselves. Provided methods can rely on required \"\n\"methods. In this case, `greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Cechy mogą określać wstępnie zaimplementowane (domyślne) metody i metody, \"\n\"które użytkownicy muszą sami zaimplementować. Metody z domyślnymi \"\n\"implementacjami mogą polegać na metodach wymaganych.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"Krotki grupują wartości różnych typów w typ złożony.\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Układ pamięci po przydzieleniu `xs`:\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stos                              Sterta\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n\":                           :     :                       :\\n\"\n\":    s1                     :     :                       :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n\":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n\":   | capacity  |     3 |   :     :                       :\\n\"\n\":   +-----------+-------+   :     :                       :\\n\"\n\":                           :     :                       :\\n\"\n\":    s2                     :     :                       :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n\":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n\":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n\":   | capacity  |     3 |   :     :                       :\\n\"\n\":   +-----------+-------+   :     :                       :\\n\"\n\":                           :     `- - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Typy realizujące daną cechę mogą mieć różne rozmiary. To sprawia, że \"\n\"niemożliwe jest posiadanie rzeczy takich jak `Vec<Greet>` w powyższym \"\n\"przykładzie.\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Greet` to sposób poinformowania kompilatora o typie o dynamicznym \"\n\"rozmiarze, który implementuje `Greet`.\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"W przykładzie `pets` przechowuje Fat Pointers do obiektów, które \"\n\"implementują `Greet`. Fat Pointer składa się z dwóch komponentów, wskaźnika \"\n\"do rzeczywistego obiektu i wskaźnika do wirtualnej tabeli metod dla \"\n\"implementacji `Greet` tego konkretnego obiektu.\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/closures.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/trait-objects.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md src/smart-pointers.md src/iterators.md src/error-handling.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust obsługuje typy ogólne, które pozwalają wyodrębnić algorytm (taki jak \"\n\"sortowanie) nad typami używanymi w algorytmie.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Jest to abstrakcja o zerowych kosztach: otrzymujesz dokładnie taki sam \"\n\"wynik, jakbyś miał ręcznie zakodował struktury danych bez abstrakcji.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"Możesz użyć generycznych do abstrakcji nad konkretnym typem pola:\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"\"\n\"```\\n\"\n\"// fn set_x(&mut self, x: T)\\n\"\n\"```\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_P:_ Dlaczego `T` jest określone dwukrotnie w `impl<T> Point<T> {}`? Czy to \"\n\"nie jest zbędne?\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Dzieje się tak, ponieważ jest to ogólna sekcja implementacji dla typu \"\n\"ogólnego. Są niezależnie ogólne.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Oznacza to, że te metody są zdefiniowane dla dowolnego `T`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Można napisać `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` jest nadal ogólny i możesz użyć `Point<f64>`, ale metody w tym bloku \"\n\"będą dostępne tylko dla `Point<u32>`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Podczas pracy z typami ogólnymi często chcesz wymagać implementacji typów \"\n\"jakąś cechę, aby można było wywołać metody tej cechy.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Możesz to zrobić za pomocą `T: Cecha` lub `impl Cecha`:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Odczytuje sygnaturę funkcji, jeśli masz wiele parametrów.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Posiada dodatkowe funkcje, dzięki którym jest potężniejszy.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Jeśli ktoś zapyta, dodatkową cechą jest to, że typ po lewej stronie „:” może \"\n\"być dowolny, na przykład `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Podobnie jak w przypadku granic cech, składnia `impl Trait` może być używana \"\n\"w funkcji argumenty i zwracane wartości:\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"// Cukier syntaktyczny do: // fn add_42_millions\\\\<T: Into\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"Znaczenie „impl Cecha” jest nieco inne w różnych pozycjach.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"W przypadku parametru „impl Trait” jest jak anonimowy parametr ogólny z \"\n\"powiązaniem z cechą.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"W przypadku typu zwracanego oznacza to, że typ zwracany jest jakimś \"\n\"konkretnym typem, który implementuje cechę, bez określania rodzaju. Może to \"\n\"być przydatne, gdy nie chcesz ujawniać konkretnego typu w pliku publiczne \"\n\"API.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md src/memory-management.md src/slices-and-lifetimes.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust jest dostarczany ze standardową biblioteką, która pomaga ustalić zestaw \"\n\"typowych typów używany przez bibliotekę i programy Rusta. W ten sposób dwie \"\n\"biblioteki mogą ze sobą współpracować płynnie, ponieważ oba używają tego \"\n\"samego typu `String`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"W rzeczywistości Rust zawiera kilka warstw Biblioteki Standardowej: `core`, \"\n\"`alloc` i `std`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` zawiera najbardziej podstawowe typy i funkcje, które nie zależą od \"\n\"`libc`, alokatora lub nawet obecność systemu operacyjnego.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` obejmuje typy, które wymagają globalnego alokatora sterty, takie jak \"\n\"`Vec`, `Box` i `Arc`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Aplikacje Embedded Rust często używają tylko `core`, a czasami `alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Zobacz [Odniesienie do Rust](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) używane do IO,\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"Funkcje\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Opcja` i `Wynik` są szeroko stosowane nie tylko w standardowej bibliotece.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"Jako optymalizacja niszowa dyskryminator wyliczeniowy jest łączony ze \"\n\"wskaźnikiem, dzięki czemu `Option<&Foo>` ma taki sam rozmiar jak `&Foo`.\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Podobnie jak w przypadku `Opcji`, pomyślna wartość znajduje się wewnątrz \"\n\"`Result`, zmuszając programistę do tego wyraźnie go wyodrębnić. To zachęca \"\n\"do sprawdzania błędów. W przypadku, gdy błąd nigdy nie powinien się \"\n\"wydarzyć, Można wywołać `unwrap()` lub `expect()`, co również jest sygnałem \"\n\"intencji programisty.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"Dokumentacja `Result` jest zalecaną lekturą. Nie w trakcie kursu, ale warto \"\n\"o tym wspomnieć. Zawiera wiele wygodnych metod i funkcji, które pomagają \"\n\"programować w stylu funkcjonalnym.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"\"\n\"`Result` to standardowy typ implementacji obsługi błędów, jak zobaczymy w \"\n\"dniu 3.\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) to \"\n\"standardowy bufor ciągów znaków UTF-8 przydzielony na stercie:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementuje [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), co oznacza, że możesz wywołać \"\n\"wszystkie Metody `str` na `Stringu`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) to standardowy \"\n\"bufor alokowany na stercie o zmiennym rozmiarze:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementuje [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-[T]), co oznacza, że możesz wywołać slice \"\n\"metody na `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Standardowa mapa haszująca z ochroną przed atakami HashDoS:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap` nie jest zdefiniowany we wstępie i musi zostać uwzględniony w \"\n\"zakresie.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Wypróbuj następujące wiersze kodu. Pierwsza linia pokaże, czy książka \"\n\"znajduje się w mapie skrótów, a jeśli nie, zwróci wartość alternatywną. \"\n\"Drugi wiersz wstawi alternatywną wartość do mapy skrótów, jeśli książka nie \"\n\"zostanie znaleziona.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"Alternatywnie HashMap można zbudować z dowolnego `Iteratora`, który daje \"\n\"krotki klucz-wartość.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"Pokazujemy `HashMap<String, i32>` i unikamy używania `&str` jako klucza, aby \"\n\"ułatwić przykłady. Korzystanie z referencji w kolekcjach jest oczywiście \"\n\"możliwe, ale może to prowadzić do komplikacji z sprawdzaniem pożyczek.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"Spróbuj usunąć `to_string()` z powyższego przykładu i sprawdź, czy nadal się \"\n\"kompiluje. Jak myślisz, gdzie możemy napotkać problemy?\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Odczyt` i `Zapis`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Przeciążanie operatora jest realizowane poprzez cechy w [`std::ops`](https://\"\n\"doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\n#, fuzzy\nmsgid \"Discussion points:\"\nmsgstr \"Punkty dyskusji:\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Możesz zaimplementować `Add` dla `&Point`. W jakich sytuacjach jest to \"\n\"przydatne?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Odpowiedź: `Add:add` zużywa `self`. Jeśli wpisz `T` za którym jesteś \"\n\"przeciążanie operatora nie jest `Kopiuj`, powinieneś rozważyć przeciążanie \"\n\"operator dla `&T` również. Pozwala to uniknąć niepotrzebnego klonowania w \"\n\"pliku Zadzwoń do serwisu.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Dlaczego `Output` jest powiązanym typem? Czy można go ustawić jako parametr \"\n\"typu?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Krótka odpowiedź: Parametry typu są kontrolowane przez dzwoniącego, ale \"\n\"powiązane typy (takie jak `Output`) są kontrolowane przez implementatora a \"\n\"cecha.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Typy implementują [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) i [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) w \"\n\"celu ułatwienia konwersji typów:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) jest \"\n\"automatycznie implementowane po zaimplementowaniu [`From`](https://doc.rust-\"\n\"lang.org/std/convert/trait.From.html):\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Dlatego często implementuje się tylko `From`, ponieważ twój typ również \"\n\"otrzyma implementację `Into`.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Deklarując typ wejściowy argumentu funkcji, taki jak „wszystko, co można \"\n\"przekonwertować na `String`”, zasada jest odwrotna, należy użyć `Into`. \"\n\"Twoja funkcja akceptuje typy, które implementują `From` i te, które _tylko_ \"\n\"implementują `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Używając [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), możesz \"\n\"wyodrębnić źródła `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Podobnie, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"pozwala na abstrakcję nad ujściami `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The `Default` Trait\"\nmsgstr \"Cecha „Domyślna”.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"Cecha [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"zapewnia domyślną implementację cechy.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Może być zaimplementowany bezpośrednio lub wyprowadzony przez \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"Implementacja pochodna utworzy instancję, w której wszystkie pola zostaną \"\n\"ustawione na wartości domyślne.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Oznacza to, że wszystkie typy w strukturze muszą również implementować \"\n\"`Default`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Standardowe typy Rust często implementują `Default` z rozsądnymi wartościami \"\n\"(np. `0`, `\\\"\\\"` itp.).\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"Częściowa kopia struktury dobrze działa z ustawieniami domyślnymi.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Standardowa biblioteka Rust jest świadoma, że typy mogą implementować \"\n\"`Default` i zapewnia wygodne metody, które z niej korzystają.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Domknięcia lub wyrażenia lambda mają typy, których nie można nazwać. Jednak \"\n\"oni zaimplementować specjalne [`Fn`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html) oraz \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) cechy:\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"Wywoływanie niebezpiecznych funkcji\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"`Fn` ani nie konsumuje, ani nie mutuje przechwyconych wartości, a być może w \"\n\"ogóle nie przechwytuje niczego, więc może być wywoływane wiele razy \"\n\"jednocześnie.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"`FnMut` może zmutować przechwycone wartości, więc możesz go wywoływać wiele \"\n\"razy, ale nie jednocześnie.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Jeśli masz `FnOnce`, możesz wywołać go tylko raz. Może zużywać przechwycone \"\n\"wartości.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` jest podtypem `FnOnce`. `Fn` jest podtypem `FnMut` i `FnOnce`. Tj. \"\n\"możesz użyć `FnMut` wszędzie tam, gdzie wymagane jest `FnOnce`, a `Fn` można \"\n\"użyć wszędzie tam, gdzie `FnMut` lub `FnOnce` jest wezwany.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"there\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Witamy w dniu 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Stos: ciągły obszar pamięci dla zmiennych lokalnych.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Wartości mają stałe rozmiary znane w czasie kompilacji.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Niezwykle szybki: wystarczy przesunąć wskaźnik stosu.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Łatwy w zarządzaniu: podąża za wywołaniami funkcji.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Świetna lokalność pamięci.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Sterta: Przechowywanie wartości poza wywołaniami funkcji.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Wartości mają dynamiczne rozmiary określone w czasie wykonywania.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Nieco wolniejsza niż stos: potrzebne trochę księgowości.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Brak gwarancji lokalności pamięci.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Utworzenie `String` powoduje umieszczenie danych o stałym rozmiarze na \"\n\"stosie i danych o dynamicznym rozmiarze na stercie:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Wspomnij, że `String` jest oparty o `Vec`, więc ma pojemność i długość, i \"\n\"jeżeli jest mutowalny to może rosnąć poprzez realokację na stercie.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Jeżeli uczniowie o to zapytają to możesz wspomnieć, że pamięć na stercie \"\n\"jest alokowana za pomocą [alokatora systemowego](https://doc.rust-lang.org/\"\n\"std/alloc/struct.System.html) I własny alokator może być zaimplementowany \"\n\"używając [API alokatora](https://doc.rust-lang.org/std/alloc/index.html)\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Możemy zrobić inspekcję rozłożenia pamięci w niebezpiecznym (`unsafe`) \"\n\"kodzie. Jednak należy zauważyć, że jest to niebezpieczne!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Tradycyjnie języki dzieliły się na dwie szerokie kategorie:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Pełna kontrola poprzez ręczne zarządzanie pamięcią: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Pełne bezpieczeństwo dzięki automatycznemu zarządzaniu pamięcią w czasie \"\n\"wykonywania: Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust oferuje nową mieszankę:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Pełna kontrola _i_ bezpieczeństwo poprzez egzekwowanie poprawnego \"\n\"zarządzania pamięcią w czasie kompilacji.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Czyni to z wyraźną koncepcją własności.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Wszystkie przywiązania zmiennych mają _zakres_, w którym są prawidłowe. \"\n\"Użycie zmiennej poza jej zakresem jest błędem:\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"Mówi się, że zmienna _posiada_ wartość.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"Na końcu zakresu, zmienna jest _upuszczana_ i dane są zwalniane.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Przypisanie przeniesie własność pomiędzy zmiennymi:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/memory-management/move.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\"```\\n\"\n\"println!(\\\"potem: {a}\\\");\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"Przypisanie `s1` do `s2` przenosi własność.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Kiedy zmienna `s1` wychodzi poza zakres, nic się nie dzieje: nie ma \"\n\"własności.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"Kiedy zmienna `s2` wychodzi poza zakres, dane łańcucha znaków są zwalniane.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"Przed przeniesieniem do `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"Po przeniesieniu do `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stos                              Sterta\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Kiedy przekazujesz wartość do funkcji, wartość jest przypisywana do \"\n\"parametru funkcji. To przenosi własność:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Wycinki\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Wspomnij, że jest to na odwrót niż w C++, który domyślnie kopiuje wartości \"\n\"chyba, że jest użyte `std::move` (i zdefiniowany konstruktor przenoszenia!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"W Ruście, klonowanie jest jawne (za pomocą `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Przy pierwszym wywołaniu `say_hello`, `main` oddaje własność `name`. Potem \"\n\"`name` nie może być już użyte wewnątrz `main`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"Dane zaalokowane na stercie dla `name` będą zwolnione na końcu wywołania \"\n\"funkcji `say_hello`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` może zachować własność jeżeli przekaże `name` jako referencję \"\n\"(`&name`) i jeżeli `say_hello` akceptuje referencję jako parameter.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternatywnie, `main` może przekazać klona `name` w pierwszym wywołaniu \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Przez używanie semantyki przenoszenia domyślnie i przez zmuszanie \"\n\"programistów do jawnego tworzenia klonów, Rust powoduje, że przypadkowe \"\n\"tworzenie kopii jest trudniejsze niż w C++.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Podwójne zwalnianie pamięci w nowoczesnym C++\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Nowoczesny C++ rozwiązuje to inaczej:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Dane sterty z `s1` są zduplikowane i `s2` dostaje swoją niezależną kopię.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Kiedy `s1` i `s2` wychodzą poza zakres, obydwie zmienne zwalniają swoją \"\n\"pamięć.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"Przed przypisywaniem kopiującym:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"Po przypisaniu kopiującym:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Semantyka przenoszenia jest domyślna, ale niektóre typy są domyślnie \"\n\"kopiowane:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Te typy implementują cechę `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Możesz spowodować żeby semantyka kopiowania była używana dla twoich własnych \"\n\"typów:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\"Po przypisaniu, obydwie zmienne `p1` i `p2` mają swoje dane na własność.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"Możemy też użyć `p1.clone()` żeby jawnie skopiować dane.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Kopiowanie i klonowanie to nie to samo:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Kopiowanie odnosi się do bezpośredniego kopiowania pamięci i nie działa dla \"\n\"wszystkich obiektów.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Kopiowanie nie pozwala na własną logikę (jak konstruktory kopiowania w C++).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Klonowanie jest ogólniejszą operacją i pozwala na własne zachowanie poprzez \"\n\"implementację cechy `Clone`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"Kopiowanie nie działa na typach, które implementują cechę `Drop`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"W powyższym przykładzie spróbuj następującego:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Dodaj pole `String` do `struct Point`. Nie skompiluje się bo `String` nie \"\n\"jest typem `Copy`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Usuń `Copy` z atrybutu `derive`. Kompilator teraz zwróci błąd w `println!` \"\n\"dla `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Pokaż, że zadziała jeżeli zamiast tego sklonujesz `p1`.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"The `Drop` Trait\"\nmsgstr \"Cecha „Upuść”.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Wartości, które implementują [`Drop`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Drop.html), mogą określać kod do wykonania, gdy wykraczają poza zakres:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Dlaczego `Drop::drop` nie przyjmuje `self`?\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Krótka odpowiedź: gdyby tak było, `std::mem::drop` zostałoby wywołane na \"\n\"końcu blok, co skutkuje kolejnym wywołaniem `Drop::drop` i stosem przelewowy!\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Spróbuj zamienić `drop(a)` na `a.drop()`.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) jest posiadanym \"\n\"wskaźnikiem do danych na stercie:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementuje `Deref<Target = T>`, co oznacza, że możesz [wywoływać \"\n\"metody z `T` bezpośrednio na `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Rekurencyjne typy danych lub typy danych o dynamicznych rozmiarach muszą \"\n\"używać `Box`:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stos                             Sterta\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` jest jak `std::unique_ptr` w C++, z tą różnicą, że nie jest puste.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Pudełko może być przydatne, gdy:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"mieć typ, którego rozmiar nie może być znany w czasie kompilacji, ale \"\n\"kompilator Rust chce znać dokładny rozmiar.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"chcesz przenieść własność dużej ilości danych. Aby uniknąć kopiowania dużych \"\n\"ilości danych na stosie, zamiast tego przechowuj dane na stercie w `Box`, \"\n\"tak aby przesuwany był tylko wskaźnik.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not compute a fixed size of the struct in memory \"\n\"(`List` would be of infinite size).\"\nmsgstr \"\"\n\"Jeśli `Box` nie został tutaj użyty i próbowaliśmy osadzić `List` \"\n\"bezpośrednio w `List`, kompilator nie obliczyłby stałego rozmiaru struktury \"\n\"w pamięci, wyglądałby na nieskończony.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` rozwiązuje ten problem, ponieważ ma taki sam rozmiar jak zwykły \"\n\"wskaźnik i po prostu wskazuje następny element „Listy” w stercie.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. \"\n\"\\\"Recursive with indirection\\\" is a hint you might want to use a Box or \"\n\"reference of some kind, instead of storing a value directly.\"\nmsgstr \"\"\n\"Usuń `Box` w definicji listy i pokaż błąd kompilatora. „Rekurencyjne z \"\n\"kierunkiem” to wskazówka, że możesz chcieć użyć pewnego rodzaju pudełka lub \"\n\"odniesienia, zamiast bezpośrednio przechowywać wartość.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Niszowa optymalizacja\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\"`Box` nie może być pusty, więc wskaźnik jest zawsze ważny i nie ma wartości \"\n\"`null`. Ten pozwala kompilatorowi zoptymalizować układ pamięci:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stos                             Sterta\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) jest współdzielonym \"\n\"wskaźnikiem zliczanym przez referencje. Użyj tego, gdy potrzebujesz się \"\n\"odnieść do tych samych danych z wielu miejsc:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Zobacz [`Arc`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), jeśli \"\n\"pracujesz w kontekście wielowątkowym.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Możesz _zmniejszyć_ współdzielony wskaźnik do wskaźnika [`Weak`](https://doc.\"\n\"rust-lang.org/std/rc/struct.Weak.html), aby tworzyć cykle że zostanie \"\n\"upuszczony.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`clone` jest tanie: tworzy wskaźnik do tej samej alokacji i zwiększa liczbę \"\n\"odwołań.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` faktycznie klonuje wewnętrzną wartość, jeśli to konieczne („clone-\"\n\"on-write”) i zwraca mutowalną referencję.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"Możesz `downgrade()` `Rc` do obiektu _słabo zliczanego_, aby tworzyć cykle, \"\n\"które zostaną poprawnie upuszczone (prawdopodobnie w połączeniu z `Komórka \"\n\"Ref`).\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Zamiast przekazywania własności w momencie wywołania funkcji, możesz \"\n\"_pożyczyć_ funkcji wartość:\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"Funkcja `add` _pożycza_ dwa punkty i zwraca nowy punkt.\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Wywołujący funkcję zachowuje własność.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"Kilka notatek na temat zwracania przez stos:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"Pokaż, że zwracanie z `add` jest tanie bo kompilator eliminuje kopiowanie. \"\n\"Zmień powyższy kod żeby pokazać adresy na stosie i uruchom w [Playground]\"\n\"(https://play.rust-lang.org/). W optymalizacji \\\"DEBUG\\\" adresy powinny się \"\n\"zmienić, ale przy użyciu ustawienia \\\"RELEASE\\\" powinny pozostać te same:\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\"```\\n\"\n\"* Kompilator Rusta może zoptymalizować zwracanie przez wartość (ang. _return \"\n\"value optimization_ (RVO)).\\n\"\n\"* W C++, usuwanie kopii musi być zdefiniowane w specyfikacji języka bo \"\n\"konstruktory mogą mieć skutki uboczne. W Ruście nie stanowi to problemu. \"\n\"Jeżeli RVO nie było zastosowane, to Rust użyje prostej i wydajnej kopii \"\n\"`memcpy`.\\n\"\n\"```\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"Rust narzuca ograniczenia na sposób w jaki można pożyczać wartości:\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\"Możesz mieć jedno lub więcej pożyczeń wartości `&T` w tym samym czasie, \"\n\"_albo_\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Możesz mieć dokładnie jedno pożyczenie wartości `&mut T`.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Powyższy kod się nie kompiluje ponieważ `a` jest pożyczone jako mutowalne \"\n\"(przez `c`) i jako niemutowalne (przez `b`) w tym samym czasie.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Przenieś instrukcję `println!` dla `b` przed zakres, który wprowadza `c`, \"\n\"żeby kod się kompilował.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Po zmianie, kompilator uświadomi sobie, że `b` jest tylko używane przed \"\n\"mutowalnym pożyczeniem `a` przez `c`. Ta funkcja nadzorcy pożyczania nazywa \"\n\"się \\\"nieleksykalne czasy życia\\\" (ang. _non-lexical lifetimes_).\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefKomórka<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Komórka<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Pracujesz nad wdrożeniem systemu monitorowania stanu. W ramach tego ty muszą \"\n\"śledzić statystyki dotyczące zdrowia użytkowników.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Zaczniesz od niektórych funkcji skrótowych w bloku `impl`, jak również \"\n\"`Użytkownika` definicja struktury. Twoim celem jest zaimplementowanie \"\n\"wygaszonych metod na `User` `struct` zdefiniowana w bloku `impl`.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Skopiuj poniższy kod na <https://play.rust-lang.org/> i uzupełnij brakujące \"\n\"metody:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md src/android/aidl/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices\"\nmsgstr \"Wycinki\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Wycinek daje wgląd w większą kolekcję:\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Wycinki pożyczają dane od ciętego typu.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"Pytanie: Co się stanie, jeśli zmodyfikujesz `a[3]`?\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Tworzymy wycinek, pożyczając `a` i określając indeksy początkowe i końcowe w \"\n\"nawiasach.\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Jeśli wycinek zaczyna się od indeksu 0, składnia zakresu Rusta pozwala nam \"\n\"pominąć indeks początkowy, co oznacza, że `&a[0..a.len()]` i `&a[..a.len()]` \"\n\"są identyczne .\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"To samo dotyczy ostatniego indeksu, więc `&a[2..a.len()]` i `&a[2..]` są \"\n\"identyczne.\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"Aby łatwo utworzyć wycinek pełnej tablicy, możemy zatem użyć `&a[..]`.\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` jest referencją do wycinka elementów `i32`. Zauważ, że typ `s` \"\n\"(`&[i32]`) nie wspomina już o długości tablicy. To pozwala nam wykonywać \"\n\"obliczenia na wycinkach o różnych rozmiarach.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Wycinki zawsze pożyczają od innego obiektu. W tym przykładzie `a` musi \"\n\"pozostać 'żywe' (w zakresie) przynajmniej tak długo, jak nasz wycinek.\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"Pytanie o modyfikację `a[3]` może wywołać interesującą dyskusję, ale \"\n\"odpowiedź jest taka, że ze względów bezpieczeństwa pamięci nie możesz tego \"\n\"zrobić przez `a` po utworzeniu wycinka, ale możesz bezpiecznie odczytać dane \"\n\"zarówno z `a` jak i `s`. Więcej szczegółów zostanie wyjaśnionych w sekcji o \"\n\"nadzorcy pożyczania.\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"Rust terminology:\"\nmsgstr \"Terminologia Rusta:\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"`&str` to niezmienna referencja do wycinka łańcucha.\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"`String` to zmienny bufor łańcucha znaków.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` wprowadza fragment łańcucha, który jest niezmiennym odniesieniem do \"\n\"danych łańcuchowych zakodowanych w UTF-8 przechowywanych w bloku pamięci. \"\n\"Literały łańcuchowe (`\\\"Witaj\\\"`) są przechowywane w pliku binarnym programu.\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Typ `String` to opakowanie dla wektora bajtów. Tak jak `Vec<T>`, ma dane na \"\n\"własność.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Tak jak z wieloma innymi typami `String::from()` tworzy łańcuch z literału \"\n\"znaków; `String::new()`  tworzy pusty łańcuch, do którego można dodać dane \"\n\"za pomocą metod `push()` i `push_str()`.\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"Makro `format!()` jest wygodnym sposobem generowania posiadanego łańcucha z \"\n\"wartości dynamicznych. Akceptuje tę samą specyfikację formatu co `println!\"\n\"()`.\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Dla programistów C++: myśl o `&str` jako o `const char*` z C++, ale tym, \"\n\"które zawsze wskazuje do prawidłowego ciągu w pamięci. Rust `String` jest \"\n\"przybliżonym odpowiednikiem `std::string` z C++ (główna różnica: może \"\n\"zawierać tylko bajty zakodowane w UTF-8 i nigdy nie użyje optymalizacji \"\n\"małych ciągów).\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Wyliczenia umożliwiają zebranie zestawu wartości w ramach jednego typu\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"Adnotacje czasu życia tworzą ograniczenia; kompilator weryfikuje, że \"\n\"istnieje prawidłowe rozwiązanie.\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the the compiler does not know what lifetime to infer for \"\n\"`p3`. Looking inside the function body shows that it can only safely assume \"\n\"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, \"\n\"Rust requires explicit annotations of lifetimes on function arguments and \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Czas życia w wywołaniach funkcji\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Czasy życia w strukturach danych\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Jeżeli typ danych przechowuje pożyczone dane, to muszą one mieć adnotcję \"\n\"czasu życia:\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"W powyższym przykładzie, adnotacja na `Highlight` wymaga żeby dane w \"\n\"zawartym `&str` żyły co najmniej tak długo jak instancja `Highlight`, która \"\n\"używa tych danych.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Jeżeli `text` jest skonsumowany przed końcem życia `fox` (lub `dog`), to \"\n\"nadzorca pożyczania pokaże błąd.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Typy z pożyczonymi danymi wymagają od użytkowników utrzymywania oryginalnych \"\n\"danych. Jest to przydatne przy tworzeniu lekkich widoków, ale generalnie \"\n\"powoduje, że są trudniejsze w użyciu.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Jeżeli możliwe twórz struktury danych, które bezpośrednio są właścicielami \"\n\"swoich danych.\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Niektóre struktury z wieloma referencjami mogą mieć więcej niż jedną \"\n\"adnotację cyklu życia. To może być potrzebne jeżeli potrzebujesz opisać \"\n\"relację cyklu życia pomiędzy referencjami w dodatku do cyklu życia samej \"\n\"struktury. Są to bardzo zaawansowane przypadki użycia.\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"Witamy w dniu 4\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"Dzisiaj omówimy kilka bardziej zaawansowanych zagadnień związanych z Rust:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Testowanie\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"Obsługa błędów: paniki, `Result` i operator try `?`.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"Cecha `Iterator` implementuje wiele typowych operacji programowania \"\n\"funkcyjnego na kolekcjach (np. `mapa`, `filtr`, `zmniejsz` itp.). Jest to \"\n\"cecha, w której można znaleźć całą dokumentację o nich. W Rust te funkcje \"\n\"powinny generować kod tak wydajny, jak równoważny imperatyw wdrożenia.\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` to cecha, która sprawia, że pętle for działają. Jest \"\n\"implementowany przez typy kolekcji, takie jak `Vec<T>` i odniesienia do \"\n\"nich, takie jak `&Vec<T>` i `&[T]`. Realizują to również zakresy.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Cecha `Iterator` mówi ci, jak _iterować_ po utworzeniu iterator. Powiązana \"\n\"cecha `IntoIterator` mówi ci, jak stworzyć iterator:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Składnia tutaj oznacza, że każda implementacja `IntoIterator` musi \"\n\"zadeklarować dwa typy:\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: typ, który iterujemy, na przykład `i8`,\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: typ `Iterator` zwracany przez metodę `into_iter`.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Zauważ, że `IntoIter` i `Item` są połączone: iterator musi mieć to samo Typ \"\n\"`Item`, co oznacza, że zwraca `Option<Item>`\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"pozwala zbudować kolekcję z [`Iterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator`\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Istnieją również implementacje, które pozwalają robić fajne rzeczy, takie \"\n\"jak konwersja pliku `Iterator<Pozycja = Wynik<V, E>>` w `Wynik<Vec<V>, E>`.\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Możesz zaimplementować cechę [`Iterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html) na swoich własnych typach:\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Skopiuj poniższy kod do <https://play.rust-lang.org/> i wykonaj testy \"\n\"przechodzić. Staraj się unikać przydzielania `Vec` dla wyników pośrednich:\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Widzieliśmy, jak bloki `impl` pozwalają nam funkcjonować w przestrzeni nazw \"\n\"dla typu.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"Podobnie `mod` pozwala nam na typy i funkcje przestrzeni nazw:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Pakiety zapewniają funkcjonalność i zawierają plik `Cargo.toml`, który \"\n\"opisuje, jak zbudować pakiet 1+ skrzynek.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Skrzynki to drzewo modułów, w którym binarna skrzynia tworzy plik \"\n\"wykonywalny, a skrzynka biblioteczna kompiluje się do biblioteki.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"Moduły określają organizację, zakres i są tematem tej sekcji.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"Korzeń `crate` znajduje się w:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (dla skrzynki bibliotecznej)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (dla skrzynki binarnej)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"Głównym powodem zmiany jest uniemożliwienie wielu plików o nazwie `mod.rs`, \"\n\"co może być trudne rozróżniać w IDE.\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"Rust będzie szukał modułów w `modulename/mod.rs` i `modulename.rs`, ale \"\n\"można to zmienić z dyrektywą kompilatora:\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"Jest to przydatne na przykład, jeśli chcesz umieścić testy modułu w pliku o \"\n\"nazwie `some_module_test.rs`, podobnie do konwencji w Go.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Moduły stanowią granicę prywatności:\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Elementy modułu są domyślnie prywatne (ukrywa szczegóły implementacji).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Elementy nadrzędne i rodzeństwo są zawsze widoczne.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"Innymi słowy, jeśli element jest widoczny w module `foo`, jest widoczny we \"\n\"wszystkich modułach potomkowie `foo`.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Użyj słowa kluczowego `pub`, aby upublicznić moduły.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"Dodatkowo istnieją zaawansowane specyfikatory `pub(...)` ograniczające \"\n\"zakres publicznej widoczności.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Zobacz [Odniesienie do Rust](https://doc.rust-lang.org/reference/visibility-\"\n\"and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself)).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"Konfigurowanie widoczności `pub(crate)` jest powszechnym wzorcem.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"Rzadziej można zapewnić widoczność określonej ścieżce.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"W każdym przypadku widoczność musi być przyznana modułowi przodka (i \"\n\"wszystkim jego potomkom).\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Ścieżki\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Ścieżki są rozstrzygane w następujący sposób:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"Jako ścieżka względna:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` lub `self::foo` odnosi się do `foo` w bieżącym module,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` odnosi się do `foo` w module nadrzędnym.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As an absolute path:\"\nmsgstr \"Jako ścieżka bezwzględna:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` odnosi się do `foo` w katalogu głównym bieżącej skrzynki,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` odnosi się do `foo` w skrzynce `bar`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Przygotowanie\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"To jest mała tekstowa demonstracja GUI.\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"} // ANCHOR_END: unit-tests\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"} // ANCHOR_END: unit-tests\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Testy jednostkowe\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\"Rust i Cargo są dostarczane z prostym frameworkiem do testów jednostkowych:\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Testy jednostkowe są obsługiwane w całym kodzie.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"Testy integracyjne są obsługiwane przez katalog `tests/`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"To pozwala testować prywatnych pomocników jednostkowych.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"Atrybut `#[cfg(test)]` jest aktywny tylko po uruchomieniu `cargo test`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Testy integracyjne\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Jeśli chcesz przetestować swoją bibliotekę jako klient, użyj testu \"\n\"integracji.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Utwórz plik `.rs` w `tests/`:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Te testy mają dostęp tylko do publicznego API Twojej skrzynki.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Testy dokumentacyjne\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust ma wbudowaną obsługę testów dokumentacji:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Bloki kodu w komentarzach `///` są automatycznie postrzegane jako kod Rusta.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Kod zostanie skompilowany i wykonany w ramach testu ładunku.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Przetestuj powyższy kod na [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/useful-crates.md\n#, fuzzy\nmsgid \"Rust comes with only basic support for writing tests.\"\nmsgstr \"Rust ma wbudowaną obsługę testów dokumentacji:\"\n\n#: src/testing/useful-crates.md\nmsgid \"Here are some additional crates which we recommend for writing tests:\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n\"library in the tradition of GoogleTest for C++.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\nmsgstr \"\"\n\n#: src/testing/useful-crates.md\nmsgid \"\"\n\"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n\"tests.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings strings \"\n\"are shown as a diff:\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/testing/googletest.md\nmsgid \"GoogleTest is available for use in AOSP.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"The advice here is for Android (AOSP) where Mockall is the recommended \"\n\"mocking library. There are other [mocking libraries available on crates.io]\"\n\"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP \"\n\"services. The other mocking libraries work in a similar fashion as Mockall, \"\n\"meaning that they make it easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algorytm Luhna\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[Algorytm Luhna](https://en.wikipedia.org/wiki/Luhn_algorithm) służy do \"\n\"zweryfikować numery kart kredytowych. Algorytm pobiera ciąg jako dane \"\n\"wejściowe i wykonuje aby zweryfikować numer karty kredytowej:\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with less than two digits.\"\nmsgstr \"\"\n\"Zignoruj wszystkie spacje. Odrzuć numer zawierający mniej niż dwie cyfry.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"Przechodząc od prawej do lewej, podwajaj co drugą cyfrę: dla liczby `1234`, \"\n\"podwajamy „3” i „1”.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Po podwojeniu cyfry zsumuj cyfry. Więc podwojenie „7” daje „14”, co staje \"\n\"się „5”.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Zsumuj wszystkie niepodwojone i podwojone cyfry.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"Numer karty kredytowej jest ważny, jeśli suma kończy się na `0`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Skopiuj poniższy kod na <https://play.rust-lang.org/> i uzupełnij brakujące \"\n\"funkcje i metody:\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 2 hours\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"Rust wywoła panikę, jeśli w czasie wykonywania wystąpi błąd krytyczny:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Paniki dotyczą nieodwracalnych i nieoczekiwanych błędów.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Paniki to objawy błędów w programie.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Używaj niepanikujących interfejsów API (takich jak `Vec::get`), jeśli awaria \"\n\"jest nie do zaakceptowania.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"Domyślnie panika spowoduje wycofanie stosu. Odwijanie można złapać:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Może to być przydatne na serwerach, które powinny działać, nawet jeśli są \"\n\"pojedyncze żądania awarii.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"To nie działa, jeśli w twoim `Cargo.toml` ustawiono `panic = 'abort'`.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"w dużo prostsze\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"Możemy użyć tego, aby uprościć nasz kod przekazywania błędów:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"Zmienna `username` może mieć postać `Ok(string)` lub `Err(error)`.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Użyj wywołania `fs::write`, aby przetestować różne scenariusze: brak pliku, \"\n\"pusty plik, plik z nazwą użytkownika.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process:Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"Efektywna interpretacja znaku `?` jest nieco bardziej skomplikowana niż \"\n\"wskazano wcześniej:\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"works the same as\"\nmsgstr \"działa tak samo jak\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Wywołanie `From::from` oznacza, że próbujemy przekonwertować typ błędu na \"\n\"typ zwracany przez funkcję:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Dynamiczne typy błędów\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Czasami chcemy zezwolić na zwrócenie dowolnego rodzaju błędu bez pisania \"\n\"własnego pokrycia wyliczeniowego wszystkie różne możliwości. `std::error::\"\n\"Error` ułatwia to zadanie.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Oszczędza to kod, ale rezygnuje z możliwości czystego radzenia sobie z \"\n\"różnymi przypadkami błędów w inny sposób program. W związku z tym generalnie \"\n\"nie jest dobrym pomysłem używanie `Box<dyn Error>` w publicznym API \"\n\"aplikacji a Library, ale może to być dobra opcja w programie, w którym \"\n\"chcesz tylko wyświetlić komunikat o błędzie gdzieś.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Skrzynka [thiserror](https://docs.rs/thiserror/) to popularny sposób \"\n\"tworzenia enum błędu, tak jak zrobiliśmy to na poprzedniej stronie:\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`w każdym razie::Błąd` jest zasadniczo opakowaniem wokół `Box<dyn Error>`. \"\n\"Jako taki to znowu generalnie nie dobry wybór dla publicznego interfejsu API \"\n\"biblioteki, ale jest szeroko stosowany w aplikacjach.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"`anyhow::Result<V>` jest aliasem typu dla `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"Rzeczywisty typ błędu w nim można wyodrębnić w celu zbadania, jeśli to \"\n\"konieczne.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"Funkcjonalność zapewniana przez `anyhow::Result<T>` może być znana \"\n\"programistom Go, ponieważ zapewnia podobne wzorce użytkowania i ergonomia do \"\n\"`(T, error)` z Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Język Rust składa się z dwóch części:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**Bezpieczna rdza:** bezpieczna pamięć, niemożliwe niezdefiniowane \"\n\"zachowanie.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Niebezpieczna rdza:** może wywołać niezdefiniowane zachowanie, jeśli \"\n\"zostaną naruszone warunki wstępne.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"W tym kursie zobaczymy głównie bezpieczną Rust, ale ważne jest, aby wiedzieć \"\n\"czym jest niebezpieczna rdza.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Niebezpieczny kod jest zwykle mały i izolowany, a jego poprawność powinna \"\n\"być ostrożna udokumentowane. Zwykle jest opakowany w bezpieczną warstwę \"\n\"abstrakcji.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Unsafe Rust zapewnia dostęp do pięciu nowych możliwości:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Wyłuskaj surowe wskaźniki.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Uzyskaj dostęp lub modyfikuj zmienne zmienne statyczne.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Dostęp do pól „unii”.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"Wywołaj funkcje `niebezpieczne`, w tym funkcje `extern`.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementuj „niebezpieczne” cechy.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"W dalszej części krótko omówimy niebezpieczne możliwości. Aby uzyskać \"\n\"szczegółowe informacje, zobacz [Rozdział 19.1 w Księdze Rusta](https://doc.\"\n\"rust-lang.org/book/ch19-01-unsafe-rust.html) oraz [Rustonomicon](https://doc.\"\n\"rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Niebezpieczny Rust nie oznacza, że kod jest nieprawidłowy. Oznacza to, że \"\n\"deweloperzy mają wyłączył funkcje bezpieczeństwa kompilatora i musiał \"\n\"napisać poprawny kod wg sobie. Oznacza to, że kompilator nie egzekwuje już \"\n\"zasad bezpieczeństwa pamięci Rusta.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"Tworzenie wskaźników jest bezpieczne, ale dereferencja wymaga \"\n\"„niebezpiecznego”:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Dobrą praktyką (i wymaganą przez przewodnik stylistyczny Android Rust) jest \"\n\"napisanie komentarza dla każdego Blok `niebezpieczny` wyjaśniający, w jaki \"\n\"sposób znajdujący się w nim kod spełnia wymagania bezpieczeństwa \"\n\"niebezpiecznego operacje, które wykonuje.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"W przypadku dereferencji wskaźników oznacza to, że wskaźniki muszą być \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), czyli:\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Wskaźnik musi być inny niż null.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Wskaźnik musi być _dereferenceable_ (w granicach pojedynczego przydzielonego \"\n\"obiektu).\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"Obiekt nie może być cofnięty.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Nie może być jednoczesnych dostępów do tej samej lokalizacji.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Jeśli wskaźnik został uzyskany przez rzutowanie odniesienia, obiekt leżący \"\n\"pod spodem musi być żywy i nie odwołanie może być użyte do uzyskania dostępu \"\n\"do pamięci.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"W większości przypadków wskaźnik musi być również odpowiednio wyrównany.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Odczyt niezmiennej zmiennej statycznej jest bezpieczny:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Ponieważ jednak mogą wystąpić wyścigi danych, odczytywanie i zapisywanie \"\n\"zmiennych jest niebezpieczne zmienne statyczne:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Używanie zmiennej statyki jest generalnie złym pomysłem, ale są przypadki, w \"\n\"których może to mieć sens w kodzie niskiego poziomu `no_std`, takim jak \"\n\"implementacja alokatora sterty lub praca z niektórymi interfejsami API C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"Unie są jak wyliczenia, ale musisz samodzielnie śledzić aktywne pole:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Brak niezdefiniowanego zachowania w czasie wykonywania:\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Unie są bardzo rzadko potrzebne w Rust, ponieważ zwykle można użyć \"\n\"wyliczenia. Czasami są potrzebne do interakcji z interfejsami API biblioteki \"\n\"C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Jeśli chcesz po prostu ponownie zinterpretować bajty jako inny typ, \"\n\"prawdopodobnie chcesz [`std::mem::transmute`](https://doc.rust-lang.org/\"\n\"stable/std/mem/fn.transmute.html) lub sejf opakowanie, takie jak skrzynka \"\n\"[`zerocopy`](https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Wywoływanie niebezpiecznych funkcji\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Funkcja lub metoda może zostać oznaczona jako „niebezpieczna”, jeśli ma \"\n\"dodatkowe warunki wstępne których należy przestrzegać, aby uniknąć \"\n\"niezdefiniowanych zachowań:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"Brak niezdefiniowanego zachowania w czasie wykonywania:\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Pisanie niebezpiecznych funkcji\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Możesz oznaczyć własne funkcje jako „niebezpieczne”, jeśli wymagają \"\n\"określonych warunków, aby uniknąć niezdefiniowanych zachowanie.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Zwykle jest to problem tylko w przypadku funkcji extern, które robią rzeczy \"\n\"ze wskaźnikami, które mogą naruszają model pamięci Rusta, ale ogólnie każda \"\n\"funkcja C może mieć niezdefiniowane zachowanie pod dowolnym arbitralne \"\n\"okoliczności.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"W rzeczywistości nie używalibyśmy do tego wskaźników, ponieważ można to \"\n\"zrobić bezpiecznie za pomocą referencji.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Należy zauważyć, że niebezpieczny kod jest dozwolony w niebezpiecznej \"\n\"funkcji bez bloku `unsafe`. Możemy zabronić tego za pomocą \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Spróbuj go dodać i zobacz, co się stanie.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Wdrażanie niebezpiecznych cech\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Podobnie jak w przypadku funkcji, możesz oznaczyć cechę jako \"\n\"„niebezpieczną”, jeśli implementacja musi gwarantować szczególne warunki, \"\n\"aby uniknąć nieokreślonego zachowania.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Na przykład skrzynka „zerocopy” ma niebezpieczną cechę, która wygląda [coś \"\n\"takiego](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Powinna istnieć sekcja `# Safety` w Rustdoc dla cechy wyjaśniającej \"\n\"wymagania dla cecha, którą należy bezpiecznie wdrożyć.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"Właściwa sekcja bezpieczeństwa dla `AsBytes` jest raczej dłuższa i bardziej \"\n\"skomplikowana.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Wbudowane cechy „Wyślij” i „Synchronizacja” są niebezpieczne.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Bezpieczne opakowanie FFI\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust ma świetne wsparcie dla wywoływania funkcji poprzez funkcję _foreign \"\n\"interfejs_ (FFI). Użyjemy tego do zbudowania bezpiecznego opakowania dla \"\n\"`libc` funkcje, których użyłbyś z C do odczytania nazw plików z katalogu.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Będziesz chciał zapoznać się ze stronami podręcznika:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) używane do IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Text processing in Rust\"\nmsgstr \"Przenoszenie String w Ruście\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) używane do IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i [`Write`]\"\n\"(https://doc.rust-lang.org/std/io/trait.Write.html) używane do IO,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Skopiuj poniższy kod na <https://play.rust-lang.org/> i uzupełnij brakujące \"\n\"funkcje i metody:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"impl DirectoryIterator { fn new(path: &str) -> Result\\\\<DirectoryIterator, \"\n\"String> { // Call opendir and return a Ok value if that worked, // otherwise \"\n\"return Err with a message. unimplemented!() } }\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\" { // Wywołuj readdir do uzyskania wskaźnika NULL. unimplemented!() } }\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\" { // Wywołuj readdir do uzyskania wskaźnika NULL. unimplemented!() } }\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust jest obsługiwany w przypadku tworzenia natywnych platform na Androida. \"\n\"To znaczy że możesz pisać nowe usługi systemu operacyjnego w Rust, a także \"\n\"rozszerzać istniejące usługi.\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Spróbujemy dzisiaj wywołać Rusta z jednego z twoich własnych projektów. Więc \"\n\"spróbuj znajdź mały zakątek swojej bazy kodu, do którego możemy przenieść \"\n\"kilka linii kodu Rdza. Im mniej zależności i typów „egzotycznych”, tym \"\n\"lepiej. Coś takiego analizuje kilka nieprzetworzonych bajtów byłoby idealnie.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Będziemy używać urządzenia wirtualnego z Androidem do testowania naszego \"\n\"kodu. Upewnij się że masz dostęp do jednego lub utwórz nowy z:\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Zobacz [Android Developer Codelab](https://source.android.com/docs/setup/\"\n\"start), aby uzyskać szczegółowe informacje.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"System kompilacji Androida (Soong) obsługuje Rusta za pośrednictwem wielu \"\n\"modułów:\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"Typ modułu\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Description\"\nmsgstr \"Opis\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Tworzy plik binarny Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_library`\"\nmsgstr \"`rust_biblioteka`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Tworzy bibliotekę Rust i udostępnia zarówno warianty `rlib`, jak i `dylib`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Tworzy bibliotekę Rust C używaną przez moduły `cc` i zapewnia zarówno \"\n\"statyczne, jak i współdzielone warianty.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Tworzy bibliotekę `proc-macro` Rusta. Są one analogiczne do wtyczek \"\n\"kompilatora.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`test_rdzy`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Tworzy plik binarny testu Rust, który używa standardowej wiązki testowej \"\n\"Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Tworzy plik binarny Rust fuzz wykorzystujący `libfuzzer`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Generuje źródło i tworzy bibliotekę Rust, która zapewnia interfejs dla \"\n\"określonego protobuf.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rdza_powiązanie`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Generuje źródło i tworzy bibliotekę Rust zawierającą powiązania Rusta z \"\n\"bibliotekami C.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Następnie przyjrzymy się `rust_binary` i `rust_library`.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Binaria Rusta\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Zacznijmy od prostej aplikacji. W katalogu głównym kasy AOSP utwórz \"\n\"następujące pliki:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\"```rust\\n\"\n\"//! Rust demo.\\n\"\n\"```\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Możesz teraz budować, przesyłać i uruchamiać plik binarny:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Biblioteki Rusta\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Używasz `rust_library` do tworzenia nowej biblioteki Rust dla Androida.\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Tutaj deklarujemy zależność od dwóch bibliotek:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, które definiujemy poniżej,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, która jest już sprzedawaną skrzynką [`zewnętrzne/rdza/\"\n\"skrzynie/`](https://cs.android.com/android/platform/superproject/+/master:\"\n\"external/rust/crates/).\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md src/android/aidl/implementation.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Budujesz, wypychasz i uruchamiasz plik binarny tak jak poprzednio:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"[Język definicji interfejsu Androida (AIDL)](https://developer.android.com/\"\n\"guide/components/aidl) jest obsługiwany w Rust:\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Kod Rusta może wywoływać istniejące serwery AIDL,\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Możesz tworzyć nowe serwery AIDL w Rust.\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfejsy AIDL\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Deklarujesz API swojej usługi za pomocą interfejsu AIDL:\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_urodziny_serwis/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md src/android/aidl/changing.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_urodziny_serwis/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/interface.md\n#, fuzzy\nmsgid \"\"\n\"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n\"vendor partition.\"\nmsgstr \"\"\n\"Dodaj „vendor_available: true”, jeśli plik AIDL jest używany przez plik \"\n\"binarny dostawcy przegroda.\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Implementacja usługi\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Możemy teraz wdrożyć usługę AIDL:\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Implementacja usługi\"\n\n#: src/android/aidl/implementation.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/implementation.md src/android/aidl/server.md\n#: src/android/aidl/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"Serwer AIDL\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Na koniec możemy stworzyć serwer, który eksponuje usługę:\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"serwery.\"\n\n#: src/android/aidl/server.md src/android/aidl/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Możemy teraz zbudować, wypchnąć i uruchomić usługę:\"\n\n#: src/android/aidl/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"W innym terminalu sprawdź, czy usługa działa:\"\n\n#: src/android/aidl/deploy.md\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Możesz również zadzwonić do serwisu za pomocą `wezwania serwisowego`:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"Klient AIDL\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"Wreszcie możemy stworzyć klienta Rust dla naszej nowej usługi.\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"/// Connect to the BirthdayService.\\n\"\nmsgstr \"\"\n\"/// Połącz się z usługą BirthdayService. pub fn connect() -> Wynik\\\\<binder::\"\n\"Strong\"\n\n#: src/android/aidl/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"impl binder::Interfejs dla BirthdayService {}\"\n\n#: src/android/aidl/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Zauważ, że klient nie jest zależny od `libbirthdayservice`.\"\n\n#: src/android/aidl/client.md\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Zbuduj, wypchnij i uruchom klienta na swoim urządzeniu:\"\n\n#: src/android/aidl/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/changing.md\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Rozszerzmy API o więcej funkcji: chcemy pozwolić klientom określić lista \"\n\"wierszy na kartkę urodzinową:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Powinieneś użyć skrzynki `log`, aby automatycznie zalogować się do `logcat` \"\n\"(na urządzeniu) lub `stdout` (na hoście):\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\"```rust\\n\"\n\"//! Rust demo.\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Zbuduj, wypchnij i uruchom plik binarny na swoim urządzeniu:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Dzienniki pojawiają się w `adb logcat`:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust ma doskonałe wsparcie dla interoperacyjności z innymi językami. To \"\n\"znaczy że możesz:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Wywołaj funkcje Rust z innych języków.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Funkcje wywołania napisane w innych językach z Rust.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Kiedy wywołujesz funkcje w języku obcym, mówimy, że używasz a _interfejs \"\n\"funkcji obcych_, znany również jako FFI.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperacyjność z C\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust ma pełne wsparcie dla łączenia plików obiektowych z konwencją \"\n\"wywoływania C. Podobnie możesz eksportować funkcje Rust i wywoływać je z C.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Możesz to zrobić ręcznie, jeśli chcesz:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Widzieliśmy to już w [Safe FFI Wrapper ćwiczenie](../../ćwiczenia/dzień-3/\"\n\"safe-ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Zakłada to pełną znajomość platformy docelowej. Nie zalecane dla produkcja.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"W następnej kolejności przyjrzymy się lepszym opcjom.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Korzystanie z Cargo\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Narzędzie [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) może automatycznie generować powiązania z pliku nagłówkowego C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Najpierw utwórz małą bibliotekę C:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Dodaj to do swojego pliku `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperacyjność/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Utwórz plik nagłówkowy opakowania dla biblioteki (nie jest to bezwzględnie \"\n\"potrzebne w tym przypadku przykład):\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Możesz teraz automatycznie generować powiązania:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"`rdza_powiązanie`\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Na koniec możemy użyć powiązań w naszym programie Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperacyjność/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Na koniec możemy uruchomić automatycznie generowane testy, aby upewnić się, \"\n\"że powiązania działają:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Ekosystem Rust\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Eksportowanie funkcji i typów Rust do C jest łatwe:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\"```rust\\n\"\n\"//! Rust demo.\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperacyjność/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Możemy teraz wywołać to z pliku binarnego C:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperacyjność/rust/analiza/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperacyjność/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` wyłącza zwykłe zniekształcanie nazw Rusta, więc eksportowany \"\n\"symbol będzie po prostu nazwą funkcja. Możesz także użyć `#[nazwa_eksportu = \"\n\"\\\"jakaś_nazwa\\\"]`, aby określić dowolną nazwę.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"[Skrzynia CXX](https://cxx.rs/) umożliwia bezpieczną interoperacyjność \"\n\"między Rust i C++.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"Ogólne podejście wygląda następująco:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"Funkcje\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"Niebezpieczny Rust\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rust by Example\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Przykład C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rdza_powiązanie`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`test_rdzy`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Odbiornik<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Komórka<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Odbiornik<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Binaria Rusta\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Współpraca z Javą\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java może ładować udostępnione obiekty za pośrednictwem [Java Native \"\n\"Interface (JNI)](https://en.wikipedia.org/wiki/Java_Native_Interface). \"\n\"[`jni` crate](https://docs.rs/jni/) umożliwia utworzenie kompatybilnej \"\n\"biblioteki.\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Najpierw tworzymy funkcję Rust do eksportu do Javy:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperacyjność/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperacyjność/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"Na koniec możemy wywołać tę funkcję z Javy:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperacyjność/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Witaj świecie!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"Na koniec możesz zbudować, zsynchronizować i uruchomić plik binarny:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"W ostatnim ćwiczeniu przyjrzymy się jednemu z projektów, nad którymi \"\n\"pracujesz. Pozwól nam zbierzcie się i zróbcie to razem. Jakieś sugestie:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Zadzwoń do swojego serwisu AIDL z klientem napisanym w Rust.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Przenieś funkcję z projektu do Rusta i wywołaj ją.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Nie podano tutaj żadnego rozwiązania, ponieważ jest ono otwarte: polega na \"\n\"kimś w klasa posiadająca fragment kodu, który można przekazać Rustowi w \"\n\"locie.\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust community typically uses `cargo` and libraries from [crates.io](https://\"\n\"crates.io/). Chromium is built using `gn` and `ninja` and a curated set of \"\n\"dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"Ćwiczenia\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, by `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stos                             Sterta\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Reguły budowania\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Reguły budowania\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"Przykład\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"Rust on Exercism\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Zobacz [samouczek CXX](https://cxx.rs/tutorial.html), aby zapoznać się z \"\n\"pełnym przykładem użycia tego.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Wbudowana obsługa testów.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Obsługa błędów\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Obsługa błędów\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Interoperacyjność z C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Niektóre uwagi:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"Biblioteka\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Ekosystem Rust\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Ekosystem Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Zobacz [Odniesienie do Rust](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Generyki\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Witamy w Comprehensive Rust 🦀\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"Co to jest Rust?\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option` i `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"Ciągi bajtów\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"W innym terminalu sprawdź, czy usługa działa:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Other projects\"\nmsgstr \"Inne zasoby\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Po obejrzeniu ćwiczenia możesz spojrzeć na podane [rozwiązanie](solutions-\"\n\"afternoon.md).\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\"    // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"// Read compass data and log it to the serial port.\\n\"\n\"        // TODO\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Dzień 3 Poranna gimnastyka\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([powrót do ćwiczenia](for-loops.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"Korzystanie z Cargo\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"`libtextwrap`, która jest już sprzedawaną skrzynką [`zewnętrzne/rdza/\"\n\"skrzynie/`](https://cs.android.com/android/platform/superproject/+/master:\"\n\"external/rust/crates/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Po obejrzeniu ćwiczenia możesz spojrzeć na podane [rozwiązanie](solutions-\"\n\"afternoon.md).\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"// TODO: Wait for 3 seconds.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// Copyright 2023 Google LLC\\n\"\n\"//\\n\"\n\"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\"// you may not use this file except in compliance with the License.\\n\"\n\"// You may obtain a copy of the License at\\n\"\n\"//\\n\"\n\"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n\"//\\n\"\n\"// Unless required by applicable law or agreed to in writing, software\\n\"\n\"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\"// See the License for the specific language governing permissions and\\n\"\n\"// limitations under the License.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_exception_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"No pending interrupt\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"IRQ {intid:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_current\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"sync_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"irq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"fiq_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"serr_lower\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR: main\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR: Flags\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Flags\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Framing error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Parity error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Break error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"/// Overrun error.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR: Registers\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Registers\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"// ANCHOR: Uart\\n\"\n\"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Uart\\n\"\nmsgstr \"// ANCHOR_END: setup\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"linux\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"CROSS_COMPILE\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-linux-gnu\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"aarch64-none-elf\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"entry.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\\\"exceptions.S\\\"\"\nmsgstr \"Funkcje\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"idmap.S\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\\\"empty\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".macro adr_l, reg:req, sym:req\\n\"\n\"\\tadrp \\\\reg, \\\\sym\\n\"\n\"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n\".endm\\n\"\n\"\\n\"\n\".macro mov_i, reg:req, imm:req\\n\"\n\"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n\"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n\".endm\\n\"\n\"\\n\"\n\".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n\".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n\".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n\"\\n\"\n\"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n\".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n\"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n\".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n\"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n\"fault instead. */\\n\"\n\".set .L_TCR_EPD1, 0x1 << 23\\n\"\n\"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n\".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are outer write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n\"/*\\n\"\n\" * Translation table walks for TTBR0_EL1 are inner write-back read-allocate \"\n\"write-allocate\\n\"\n\" * cacheable.\\n\"\n\" */\\n\"\n\".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n\"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n\".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n\".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n\"L_TCR_RGN_OWB\\n\"\n\".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n\"L_TCR_T0SZ_512\\n\"\n\"\\n\"\n\"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n\"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n\".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n\"/* Stage 1 data access cacheability is unaffected. */\\n\"\n\".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n\"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n\".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n\"/* Privileged Access Never is unchanged on taking an exception to EL1. */\\n\"\n\".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n\"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n\"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n\".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n\".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n\"28) | (0x1 << 29)\\n\"\n\".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n\"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n\".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n\"L_SCTLR_EL1_RES1\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic entry point for an image. It carries out the operations \"\n\"required to prepare the\\n\"\n\" * loaded image to be run. Specifically, it zeroes the bss section using \"\n\"registers x25 and above,\\n\"\n\" * prepares the stack, enables floating point, and sets up the exception \"\n\"vector. It preserves x0-x3\\n\"\n\" * for the Rust entry point, as these may contain boot parameters.\\n\"\n\" */\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"\\t/* Load and apply the memory management configuration, ready to enable MMU \"\n\"and caches. */\\n\"\n\"\\tadrp x30, idmap\\n\"\n\"\\tmsr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lmairval\\n\"\n\"\\tmsr mair_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Ltcrval\\n\"\n\"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n\"\\tbfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"\\tmsr tcr_el1, x30\\n\"\n\"\\n\"\n\"\\tmov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Ensure everything before this point has completed, then invalidate any \"\n\"potentially stale\\n\"\n\"\\t * local TLB entries before they start being used.\\n\"\n\"\\t */\\n\"\n\"\\tisb\\n\"\n\"\\ttlbi vmalle1\\n\"\n\"\\tic iallu\\n\"\n\"\\tdsb nsh\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this has completed.\\n\"\n\"\\t */\\n\"\n\"\\tmsr sctlr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Disable trapping floating point access in EL1. */\\n\"\n\"\\tmrs x30, cpacr_el1\\n\"\n\"\\torr x30, x30, #(0x3 << 20)\\n\"\n\"\\tmsr cpacr_el1, x30\\n\"\n\"\\tisb\\n\"\n\"\\n\"\n\"\\t/* Zero out the bss section. */\\n\"\n\"\\tadr_l x29, bss_begin\\n\"\n\"\\tadr_l x30, bss_end\\n\"\n\"0:\\tcmp x29, x30\\n\"\n\"\\tb.hs 1f\\n\"\n\"\\tstp xzr, xzr, [x29], #16\\n\"\n\"\\tb 0b\\n\"\n\"\\n\"\n\"1:\\t/* Prepare the stack. */\\n\"\n\"\\tadr_l x30, boot_stack_end\\n\"\n\"\\tmov sp, x30\\n\"\n\"\\n\"\n\"\\t/* Set up exception vector. */\\n\"\n\"\\tadr x30, vector_table_el1\\n\"\n\"\\tmsr vbar_el1, x30\\n\"\n\"\\n\"\n\"\\t/* Call into Rust code. */\\n\"\n\"\\tbl main\\n\"\n\"\\n\"\n\"\\t/* Loop forever waiting for interrupts. */\\n\"\n\"2:\\twfi\\n\"\n\"\\tb 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers with 18 \"\n\"instructions\\n\"\n\" * left.\\n\"\n\" *\\n\"\n\" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n\"respectively,\\n\"\n\" * which can be used as the first and second arguments of a subsequent \"\n\"call.\\n\"\n\" */\\n\"\n\".macro save_volatile_to_stack\\n\"\n\"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n\"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n\"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tstr x18, [sp, #8 * 18]\\n\"\n\"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\\n\"\n\"\\t * and still be able to unwind.\\n\"\n\"\\t */\\n\"\n\"\\tmrs x0, elr_el1\\n\"\n\"\\tmrs x1, spsr_el1\\n\"\n\"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * Restores the volatile registers from the stack. This currently takes 14\\n\"\n\" * instructions, so it can be used in exception handlers while still leaving \"\n\"18\\n\"\n\" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n\" * instructions to spare.\\n\"\n\" */\\n\"\n\".macro restore_volatile_from_stack\\n\"\n\"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n\"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n\"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n\"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n\"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n\"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n\"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n\"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n\"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n\"\\tldr x18, [sp, #8 * 18]\\n\"\n\"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n\"\\n\"\n\"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n\"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n\"\\tmsr elr_el1, x0\\n\"\n\"\\tmsr spsr_el1, x1\\n\"\n\"\\n\"\n\"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n\"\\tldp x0, x1, [sp], #8 * 24\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n\"doing\\n\"\n\" * the work, then switching back to SP0 before returning.\\n\"\n\" *\\n\"\n\" * Switching to SPx and calling the Rust handler takes 16 instructions. To\\n\"\n\" * restore and return we need an additional 16 instructions, so we can \"\n\"implement\\n\"\n\" * the whole handler within the allotted 32 instructions.\\n\"\n\" */\\n\"\n\".macro current_exception_sp0 handler:req\\n\"\n\"\\tmsr spsel, #1\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\tmsr spsel, #0\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\"/**\\n\"\n\" * This is a generic handler for exceptions taken at the current EL while \"\n\"using\\n\"\n\" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n\"volatile\\n\"\n\" * registers, then returns.\\n\"\n\" *\\n\"\n\" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n\" * non-volatile registers.\\n\"\n\" *\\n\"\n\" * Saving state and jumping to the Rust handler takes 15 instructions, and\\n\"\n\" * restoring and returning also takes 15 instructions, so we can fit the \"\n\"whole\\n\"\n\" * handler in 30 instructions, under the limit of 32.\\n\"\n\" */\\n\"\n\".macro current_exception_spx handler:req\\n\"\n\"\\tsave_volatile_to_stack\\n\"\n\"\\tbl \\\\handler\\n\"\n\"\\trestore_volatile_from_stack\\n\"\n\"\\teret\\n\"\n\".endm\\n\"\n\"\\n\"\n\".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n\".global vector_table_el1\\n\"\n\".balign 0x800\\n\"\n\"vector_table_el1:\\n\"\n\"sync_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_sp0:\\n\"\n\"\\tcurrent_exception_sp0 serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_cur_spx:\\n\"\n\"\\tcurrent_exception_spx sync_exception_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx irq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_cur_spx:\\n\"\n\"\\tcurrent_exception_spx fiq_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_cur_spx:\\n\"\n\"\\tcurrent_exception_spx serr_current\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_64:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_64:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_64:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_64:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"sync_lower_32:\\n\"\n\"\\tcurrent_exception_spx sync_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"irq_lower_32:\\n\"\n\"\\tcurrent_exception_spx irq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"fiq_lower_32:\\n\"\n\"\\tcurrent_exception_spx fiq_lower\\n\"\n\"\\n\"\n\".balign 0x80\\n\"\n\"serr_lower_32:\\n\"\n\"\\tcurrent_exception_spx serr_lower\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n\".set .L_TT_TYPE_PAGE,  0x3\\n\"\n\".set .L_TT_TYPE_TABLE, 0x3\\n\"\n\"\\n\"\n\"/* Access flag. */\\n\"\n\".set .L_TT_AF, 0x1 << 10\\n\"\n\"/* Not global. */\\n\"\n\".set .L_TT_NG, 0x1 << 11\\n\"\n\".set .L_TT_XN, 0x3 << 53\\n\"\n\"\\n\"\n\".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n\".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n\"shareable\\n\"\n\"\\n\"\n\".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n\".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n\"\\n\"\n\".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n\".global idmap\\n\"\n\".align 12\\n\"\n\"idmap:\\n\"\n\"\\t/* level 1 */\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n\"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n\"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n\"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"```ld\\n\"\n\"/*\\n\"\n\" * Copyright 2023 Google LLC\\n\"\n\" *\\n\"\n\" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n\" * you may not use this file except in compliance with the License.\\n\"\n\" * You may obtain a copy of the License at\\n\"\n\" *\\n\"\n\" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n\" *\\n\"\n\" * Unless required by applicable law or agreed to in writing, software\\n\"\n\" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n\" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\"\n\" * See the License for the specific language governing permissions and\\n\"\n\" * limitations under the License.\\n\"\n\" */\\n\"\n\"\\n\"\n\"/*\\n\"\n\" * Code will start running at this symbol which is placed at the start of \"\n\"the\\n\"\n\" * image.\\n\"\n\" */\\n\"\n\"ENTRY(entry)\\n\"\n\"\\n\"\n\"MEMORY\\n\"\n\"{\\n\"\n\"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n\"}\\n\"\n\"\\n\"\n\"SECTIONS\\n\"\n\"{\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the code.\\n\"\n\"\\t */\\n\"\n\"\\t.init : ALIGN(4096) {\\n\"\n\"\\t\\ttext_begin = .;\\n\"\n\"\\t\\t*(.init.entry)\\n\"\n\"\\t\\t*(.init.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.text : {\\n\"\n\"\\t\\t*(.text.*)\\n\"\n\"\\t} >image\\n\"\n\"\\ttext_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together read-only data.\\n\"\n\"\\t */\\n\"\n\"\\t.rodata : ALIGN(4096) {\\n\"\n\"\\t\\trodata_begin = .;\\n\"\n\"\\t\\t*(.rodata.*)\\n\"\n\"\\t} >image\\n\"\n\"\\t.got : {\\n\"\n\"\\t\\t*(.got)\\n\"\n\"\\t} >image\\n\"\n\"\\trodata_end = .;\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Collect together the read-write data including .bss at the end which\\n\"\n\"\\t * will be zero'd by the entry code.\\n\"\n\"\\t */\\n\"\n\"\\t.data : ALIGN(4096) {\\n\"\n\"\\t\\tdata_begin = .;\\n\"\n\"\\t\\t*(.data.*)\\n\"\n\"\\t\\t/*\\n\"\n\"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n\"\\t\\t * bytes long.\\n\"\n\"\\t\\t */\\n\"\n\"\\t\\t. = ALIGN(32);\\n\"\n\"\\t\\tdata_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n\"\\tbin_end = .;\\n\"\n\"\\n\"\n\"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n\"\\t.bss : ALIGN(16)  {\\n\"\n\"\\t\\tbss_begin = .;\\n\"\n\"\\t\\t*(.bss.*)\\n\"\n\"\\t\\t*(COMMON)\\n\"\n\"\\t\\t. = ALIGN(16);\\n\"\n\"\\t\\tbss_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n\"\\t\\tboot_stack_begin = .;\\n\"\n\"\\t\\t. += 40 * 4096;\\n\"\n\"\\t\\t. = ALIGN(4096);\\n\"\n\"\\t\\tboot_stack_end = .;\\n\"\n\"\\t} >image\\n\"\n\"\\n\"\n\"\\t. = ALIGN(4K);\\n\"\n\"\\tPROVIDE(dma_region = .);\\n\"\n\"\\n\"\n\"\\t/*\\n\"\n\"\\t * Remove unused sections from the image.\\n\"\n\"\\t */\\n\"\n\"\\t/DISCARD/ : {\\n\"\n\"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n\"\\t\\t*(.gnu.hash)\\n\"\n\"\\t\\t*(.hash)\\n\"\n\"\\t\\t*(.interp)\\n\"\n\"\\t\\t*(.eh_frame_hdr)\\n\"\n\"\\t\\t*(.eh_frame)\\n\"\n\"\\t\\t*(.note.gnu.build-id)\\n\"\n\"\\t}\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"# Copyright 2023 Google LLC\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"$(shell uname -s)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"aarch64-linux-gnu\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"stdio -display none -kernel $< -s\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"cargo clean\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Dzień 1 Popołudnie\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([powrót do ćwiczenia](luhn.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Witamy w Comprehensive Rust 🦀\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust ma pełne wsparcie dla współbieżności przy użyciu wątków systemu \"\n\"operacyjnego z muteksami i kanały.\"\n\n#: src/concurrency.md\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"System typu Rust odgrywa ważną rolę w tworzeniu wielu błędów współbieżności \"\n\"skompilować błędy czasowe. Od tego czasu jest to często określane jako \"\n\"_nieustraszona współbieżność_ może polegać na kompilatorze, aby zapewnić \"\n\"poprawność w czasie wykonywania.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Wątki Rust działają podobnie do wątków w innych językach:\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"Wątki to wszystkie wątki demonów, główny wątek na nie nie czeka.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Paniki wątków są od siebie niezależne.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Paniki mogą przenosić ładunek, który można rozpakować za pomocą \"\n\"`downcast_ref`.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Notice that the thread is stopped before it reaches 10 --- the main thread \"\n\"is not waiting.\"\nmsgstr \"\"\n\"Zauważ, że wątek jest zatrzymywany, zanim osiągnie 10 — główny wątek jest \"\n\"nie czekać.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish.\"\nmsgstr \"\"\n\"Użyj `let handle = thread::spawn(...)` a później `handle.join()` aby czekać \"\n\"wątek do końca.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread, notice how this doesn't affect `main`.\"\nmsgstr \"Wywołaj panikę w wątku, zauważ, że nie wpływa to na `main`.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"panic payload. This is a good time to talk about [`Any`](https://doc.rust-\"\n\"lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Użyj wartości zwracanej przez `Result` z `handle.join()`, aby uzyskać dostęp \"\n\"do paniki ładunek. To dobry moment, aby porozmawiać o [`Dowolny`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Normalne wątki nie mogą pożyczać ze swojego środowiska:\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"W tym celu możesz jednak użyć \\\\[wątku z zakresem\\\\] [1](https://doc.rust-\"\n\"lang.org/std/thread/fn.scope.html):\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"Powodem tego jest to, że gdy funkcja `thread::scope` zakończy działanie, \"\n\"wszystkie wątki zostaną połączone, więc będą mogły zwrócić pożyczone dane.\"\n\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Obowiązują normalne zasady pożyczania Rusta: możesz pożyczać zmiennie o \"\n\"jeden wątek lub niezmiennie o dowolną liczbę wątków.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Kanały Rusta mają dwie części: `Sender<T>` i `Receiver<T>`. Dwie części są \"\n\"połączone kanałem, ale widzisz tylko punkty końcowe.\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` oznacza Multi-Producer, Single-Consumer. `Sender` i `SyncSender` \"\n\"implementują `Clone` (tzw możesz stworzyć wielu producentów), ale `Receiver` \"\n\"nie.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` i `recv()` zwracają `Result`. Jeśli zwracają `Błąd`, oznacza to \"\n\"odpowiednik `Nadawca` lub `Odbiornik` jest odrzucany i kanał jest zamykany.\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Otrzymujesz nieograniczony i asynchroniczny kanał z `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"Ograniczone i synchroniczne kanały sprawiają, że `send` blokuje bieżący \"\n\"wątek:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Skąd Rust wie, jak zabronić współdzielonego dostępu między wątkami? \"\n\"Odpowiedź tkwi w dwóch cechach:\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Wyślij`](https://doc.rust-lang.org/std/marker/trait.Send.html): typ `T` to \"\n\"`Wyślij`, jeśli bezpieczne jest przeniesienie `T` w wątku granica.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): typ `T` to \"\n\"`Sync`, jeśli bezpieczne jest przeniesienie `&T` w wątku granica.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"`Wyślij` i `Synchronizacja` to [niebezpieczne cechy](../unsafe/unsafe-traits.\"\n\"md). Kompilator automatycznie wyprowadzi je dla twoich typów o ile zawierają \"\n\"tylko typy `Send` i `Sync`. Możesz także zaimplementować je ręcznie, gdy ty \"\n\"wiedzieć, że jest ważny.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Można myśleć o tych cechach jako o znacznikach, że typ ma pewne właściwości \"\n\"bezpieczeństwa wątków.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"Mogą być używane w ogólnych ograniczeniach jako normalne cechy.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Typ `T` to [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html), \"\n\"jeśli przeniesienie wartości `T` do innego wątku jest bezpieczne.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"Efektem przeniesienia własności do innego wątku jest uruchomienie \"\n\"_destruktorów_ w tym wątku. Pytanie brzmi, kiedy można przydzielić wartość w \"\n\"jednym wątku i zwolnij go w innym.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Typ `T` to [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html), \"\n\"jeśli dostęp do wartości `T` z wielu wątków jednocześnie.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Dokładniej, definicja brzmi:\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` to `Sync` wtedy i tylko wtedy, gdy `&T` to `Wyślij`\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"To stwierdzenie jest zasadniczo skrótowym sposobem stwierdzenia, że jeśli \"\n\"typ jest bezpieczny dla wątków do wspólnego użytku, bezpieczne jest również \"\n\"przekazywanie odwołań do niego między wątkami.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Dzieje się tak, ponieważ jeśli typem jest synchronizacja, oznacza to, że \"\n\"można go udostępniać w wielu wątkach bez ryzyka wyścigu danych lub innych \"\n\"problemów z synchronizacją, więc przeniesienie go do innego wątku jest \"\n\"bezpieczne. Odwołanie do typu można również bezpiecznie przenieść do innego \"\n\"wątku, ponieważ do danych, do których się odwołuje, można bezpiecznie \"\n\"uzyskać dostęp z dowolnego wątku.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"`Wyślij + synchronizuj`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"Większość spotykanych typów to `Wyślij + synchronizuj`:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Typy ogólne to zazwyczaj `Wyślij + synchronizacja`, gdy są to parametry typu \"\n\"`Wyślij + synchronizuj`.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Wyślij +!Synchronizacja`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Te typy można przenosić do innych wątków, ale nie są one bezpieczne dla \"\n\"wątków. Zazwyczaj z powodu wewnętrznej zmienności:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"`mpsc::Nadawca<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Odbiornik<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Komórka<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefKomórka<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Wyślij + synchronizuj`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Te typy są bezpieczne dla wątków, ale nie można ich przenieść do innego \"\n\"wątku:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: Używa prymitywów na poziomie systemu operacyjnego, które \"\n\"muszą zostać zwolnione na wątek, który je stworzył.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Wyślij + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Te typy nie są bezpieczne dla wątków i nie można ich przenosić do innych \"\n\"wątków:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: każdy `Rc<T>` ma odniesienie do `RcBox<T>`, który zawiera \"\n\"nieatomowa liczba referencji.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust zakłada, że surowe wskaźniki mogą mieć specjalne \"\n\"względy współbieżności.\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"\"\n\"Rust używa systemu typów do wymuszania synchronizacji współdzielonych \"\n\"danych. To jest odbywa się głównie za pomocą dwóch typów:\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), referencja \"\n\"atomowa liczona `T`: obsługuje udostępnianie między wątkami i dba o \"\n\"zwolnienie `T`, gdy ostatnie odwołanie zostanie usunięte,\"\n\n#: src/concurrency/shared_state.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): zapewnia \"\n\"wzajemnie wykluczający się dostęp do wartości `T`.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) umożliwia \"\n\"współdzielony dostęp tylko do odczytu poprzez swoją metodę `clone`:\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` oznacza \\\"Atomic Reference Counted\\\", bezpieczną dla wątków wersję \"\n\"`Rc`, która wykorzystuje operacje.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementuje `Clone` niezależnie od tego, czy `T` to robi. \"\n\"Implementuje `Wyślij` i `Sync` iff `T` realizuje je obie.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` ma koszt wykonania operacji atomowych, ale później użycie `T` \"\n\"jest darmowe.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Uważaj na cykle referencyjne, `Arc` nie używa modułu wyrzucania elementów \"\n\"bezużytecznych do ich wykrywania.\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` może pomóc.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) zapewnia \"\n\"wzajemne wykluczanie _i_ umożliwia zmienny dostęp do `T` za interfejsem \"\n\"tylko do odczytu:\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Zauważ, że mamy koc [`impl<T:Send> Sync for Mutex<T>`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E). realizacja.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` w Rust wygląda jak kolekcja z tylko jednym elementem - chronionymi \"\n\"danymi.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Nie można zapomnieć o zdobyciu muteksu przed uzyskaniem dostępu do \"\n\"chronionych danych.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Możesz uzyskać `&mut T` z `&Mutex<T>`, biorąc blokadę. `MutexGuard` \"\n\"zapewnia, że `&mut T` nie przetrwa utrzymywanej blokady.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implementuje zarówno `Send`, jak i `Sync`, jeśli `T` implementuje \"\n\"`Send`.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Odpowiednik blokady odczytu i zapisu - `RwLock`.\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Dlaczego `lock()` zwraca `Result`?\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Jeśli wątek, który zawierał `Mutex` wpadł w panikę, `Mutex` zostaje \"\n\"„zatruty”, aby zasygnalizować, że chronione dane mogą być w niespójnym \"\n\"stanie. Wywołanie `lock()` na zatrutym muteksie kończy się niepowodzeniem z \"\n\"błędem [`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.\"\n\"html). Możesz wywołać `into_inner()` w przypadku błędu, aby odzyskać dane \"\n\"mimo wszystko.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Zobaczmy `Arc` i `Mutex` w akcji:\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` jest opakowane zarówno w `Arc`, jak i `Mutex`, ponieważ ich \"\n\"zainteresowania są ortogonalne.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Zawijanie `Mutex` w `Arc` to powszechny wzorzec udostępniania zmiennego \"\n\"stanu między wątkami.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` musi zostać sklonowany jako `v2` zanim będzie można go przenieść \"\n\"do innego wątku. Uwaga: do sygnatury lambda dodano słowo „move”.\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Blokady są wprowadzane w celu maksymalnego zawężenia zakresu `LockGuard`.\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"Przećwiczmy nasze nowe umiejętności współbieżności z\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"Filozofowie jadalni: klasyczny problem współbieżności.\"\n\n#: src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\"Wielowątkowe narzędzie do sprawdzania linków: większy projekt, do którego \"\n\"użyjesz Cargo pobierz zależności, a następnie sprawdź linki równolegle.\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"Problem filozofów jadalni jest klasycznym problemem współbieżności:\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Pięciu filozofów je razem przy jednym stole. Każdy filozof ma swoje własne \"\n\"miejsce przy stole. Pomiędzy każdym talerzem znajduje się widelec. Serwowane \"\n\"danie to rodzaj spaghetti, które trzeba jeść dwoma widelcami. Każdy filozof \"\n\"może tylko na przemian myśleć i jeść. Co więcej, filozof może jeść tylko ich \"\n\"spaghetti, gdy mają lewy i prawy widelec. Tak więc tylko dwa widelce być \"\n\"dostępnym, gdy dwaj najbliżsi sąsiedzi myślą, a nie jedzą. Po pojedynczy \"\n\"filozof skończy jeść, odłoży oba widelce.\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Będziesz potrzebować lokalnej [instalacji Cargo](../../cargo/running-locally.\"\n\"md) dla to ćwiczenie. Skopiuj poniższy kod do pliku `src/main.rs`, wypełnij \"\n\"puste pola, i sprawdź, czy `cargo run` nie powoduje impasu:\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"struktura Filozof { imię: Ciąg, // lewy_fork: ... // widelec_w prawo: ... // \"\n\"myśli: ... }\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Create forks\\n\"\nmsgstr \"fn main() { // Utwórz rozwidlenia\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\"```\\n\"\n\"// Twórz filozofów\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\"```\\n\"\n\"// Niech myślą i jedzą\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Wykorzystajmy naszą nową wiedzę do stworzenia wielowątkowego narzędzia do \"\n\"sprawdzania linków. Powinno zacznij od strony internetowej i sprawdź, czy \"\n\"linki na stronie są prawidłowe. Powinno rekurencyjnie sprawdzaj inne strony \"\n\"w tej samej domenie i rób to, aż wszystkie strony zostały zweryfikowane.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Do tego potrzebny będzie klient HTTP, taki jak [`reqwest`](https://docs.rs/\"\n\"reqwest/). Stwórz nowy Projekt Cargo i `reqwest` jako zależność z:\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Jeśli polecenie `cargo add` nie powiedzie się z komunikatem `error: no such \"\n\"subcommand`, edytuj Plik `Cargo.toml` ręcznie. Dodaj zależności wymienione \"\n\"poniżej.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\"Będziesz także potrzebował sposobu na znalezienie linków. Możemy do tego \"\n\"użyć [`scraper`](https://docs.rs/scraper/):\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\"Na koniec będziemy potrzebować jakiegoś sposobu obsługi błędów. Używamy \"\n\"[`thiserror`](https://docs.rs/thiserror/) dla To:\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Wywołania `cargo add` zaktualizują plik `Cargo.toml` tak, aby wyglądał \"\n\"następująco:\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Możesz teraz pobrać stronę startową. Spróbuj z małą witryną, taką jak \"\n\"`https://www.google.org/`.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Twój plik `src/main.rs` powinien wyglądać mniej więcej tak:\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Uruchom kod w `src/main.rs` za pomocą\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Używaj wątków do równoległego sprawdzania linków: wyślij adresy URL do \"\n\"sprawdzenia do a channel i pozwól kilku wątkom równolegle sprawdzać adresy \"\n\"URL.\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Rozszerz to, aby rekurencyjnie wyodrębnić linki ze wszystkich stron w \"\n\"witrynie domena `www.google.org`. Ustaw górny limit 100 stron lub tak, abyś \"\n\"mógł nie zostań zablokowany przez witrynę.\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"Dzień 3 Poranna gimnastyka\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([powrót do ćwiczenia](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Wielowątkowe narzędzie do sprawdzania linków\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([powrót do ćwiczenia](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/async.md\n#, fuzzy\nmsgid \"Async Rust\"\nmsgstr \"Dlaczego Rust?\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"What is the return type of an async call?\"\nmsgstr \"Jaki jest typ słowa w każdej pętli?\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\n#, fuzzy\nmsgid \"Futures Control Flow\"\nmsgstr \"Kontrola przepływu\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are not yet supported in the stable channel ([An \"\n\"experimental feature exists in nightly and should be stabilized in the mid \"\n\"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-\"\n\"nightly.html))\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) \"\n\"provides a workaround through a macro:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Ucztujący filozofowie\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Będziesz potrzebować lokalnej [instalacji Cargo](../../cargo/running-locally.\"\n\"md) dla to ćwiczenie. Skopiuj poniższy kod do pliku `src/main.rs`, wypełnij \"\n\"puste pola, i sprawdź, czy `cargo run` nie powoduje impasu:\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\"```\\n\"\n\"// Niech myślą i jedzą\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.5.1\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Two binaries\"\nmsgstr \"Binaria Rusta\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Running the binaries\"\nmsgstr \"Prowadzenie kursu\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"Dzień 1 Ćwiczenia popołudniowe\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([powrót do ćwiczenia](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// Add a delay before picking the second fork to allow the execution\\n\"\n\"        // to transfer to another task\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"            // somewhere. This will swap the forks without deinitializing\\n\"\n\"            // either of them.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([powrót do ćwiczenia](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Dziękujemy za skorzystanie z Comprehensive Rust 🦀!_ Mamy nadzieję, że Ci \"\n\"się podobało i że tak było przydatne.\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Świetnie się bawiliśmy przygotowując kurs. Kurs nie jest doskonały, więc \"\n\"jeśli zauważyłeś jakieś błędy lub masz pomysły na ulepszenia, wejdź [kontakt \"\n\"z nami na GitHub](https://github.com/google/comprehensive-rust/discussions). \"\n\"Kochalibyśmy się usłyszeć od ciebie.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 3 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Inne źródła o Ruście\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Społeczność Rust stworzyła bogactwo wysokiej jakości i bezpłatnych zasobów \"\n\"online.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Official Documentation\"\nmsgstr \"Oficjalna dokumentacja\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Projekt Rust zawiera wiele zasobów. Obejmują one ogólnie Rusta:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[Język programowania Rust](https://doc.rust-lang.org/book/): the kanoniczna \"\n\"darmowa książka o Rust. Szczegółowo omawia język i zawiera m.in kilka \"\n\"projektów dla ludzi do zbudowania.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): obejmuje Rust \"\n\"składni za pomocą serii przykładów prezentujących różne konstrukcje. Czasami \"\n\"zawiera małe ćwiczenia, w których jesteś proszony o rozwinięcie kodu w \"\n\"przykłady.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Biblioteka standardowa Rust](https://doc.rust-lang.org/std/): pełna \"\n\"dokumentacja standardowa biblioteka dla Rusta.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): niekompletna \"\n\"książka który opisuje gramatykę i model pamięci Rusta.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\"Bardziej wyspecjalizowane przewodniki dostępne na oficjalnej stronie Rusta:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): obejmuje \"\n\"niebezpieczną Rust, w tym praca z surowymi wskaźnikami i łączenie z innymi \"\n\"językami (FFI).\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Programowanie asynchroniczne w Rust](https://rust-lang.github.io/async-\"\n\"book/): obejmuje nowy model programowania asynchronicznego, który został \"\n\"wprowadzony po Księga rdzy została napisana.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"wprowadzenie do używania Rusta na urządzeniach wbudowanych bez systemu \"\n\"operacyjnego.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Nieoficjalny materiał do nauki\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Niewielki wybór innych przewodników i samouczków dotyczących Rusta:\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): obejmuje \"\n\"Rust z perspektywy niskopoziomowych programistów C.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rdza dla wbudowanego C Programiści](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): obejmuje Rusta z perspektywa programistów, którzy piszą \"\n\"firmware w C.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rdza dla profesjonalistów](https://overexact.com/rust-for-professionals/): \"\n\"obejmuje składnię języka Rust przy użyciu porównań side-by-side z innymi \"\n\"językami takich jak C, C++, Java, JavaScript i Python.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): ponad 100 ćwiczeń, \"\n\"które pomogą uczysz się Rusta.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Żelazne nauczanie Materiał](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a seria małych prezentacji obejmujących zarówno \"\n\"podstawową, jak i zaawansowaną część Język rdzy. Inne tematy, takie jak \"\n\"WebAssembly i asynchronizacja/oczekiwanie, również są pokryty.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Seria dla początkujących do Rust](https://docs.microsoft.com/en-us/shows/\"\n\"beginners-series-to-rust/) i [Zrób swoje pierwsze kroki z Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): dwa Przewodniki Rust \"\n\"skierowane do nowych programistów. Pierwszy to zestaw 35 filmów i drugi to \"\n\"zestaw 11 modułów, który obejmuje składnię i podstawowe konstrukcje Rusta.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Naucz się Rust z całkowicie zbyt wieloma linkami Listy](https://rust-\"\n\"unofficial.github.io/too-many-lists/): szczegółowe eksploracja reguł \"\n\"zarządzania pamięcią Rust, poprzez implementację kilku różne rodzaje \"\n\"struktur list.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Proszę zapoznać się z [Little Book of Rust Books](https://lborb.github.io/\"\n\"book/) jeszcze więcej książek Rust.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Materiał tutaj opiera się na wielu wspaniałych źródłach dokumentacji Rusta. \"\n\"Zobacz stronę [inne zasoby](other-resources.md), aby uzyskać pełną listę \"\n\"przydatnych zasoby.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Materiał Comprehensive Rust jest objęty licencją na warunkach Apache 2.0 \"\n\"licencji, zobacz [`LICENCJA`](../LICENCJA), aby uzyskać szczegółowe \"\n\"informacje.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Niektóre przykłady i ćwiczenia zostały skopiowane i zaadaptowane z [Rust by \"\n\"Przykład](https://doc.rust-lang.org/rust-by-example/). Proszę zobaczyć \"\n\"Katalog `third_party/rust-by-example/` zawiera szczegółowe informacje, w tym \"\n\"licencję warunki.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Niektóre ćwiczenia zostały skopiowane i zaadaptowane z [Rust on ćwiczenia]\"\n\"(https://exercism.org/tracks/rust). Proszę zobaczyć `third_party/rust-on-\"\n\"exercism/`, aby uzyskać szczegółowe informacje, w tym licencję warunki.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Sekcja [Interoperability with C++](android/interoperability/cpp.md) \"\n\"wykorzystuje plik obraz z [CXX](https://cxx.rs/). Zapoznaj się z katalogiem \"\n\"`third_party/cxx/` aby uzyskać szczegółowe informacje, w tym warunki \"\n\"licencji.\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Mały przykład\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Dlaczego Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Gwarancje w czasie kompilacji\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Gwarancje podczas działania\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Nowoczesne funkcjonalności\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Podstawowa składnia\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String a str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Przeciążenie\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Tablice i pętle for\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"Wyrażenia if\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"Wyrażenia for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"Wyrażenia while\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break i continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"Wyrażenia loop\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Dane w wariantach\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Rozmiary wyliczeń\"\n\n#, fuzzy\n#~ msgid \"Novel Control Flow\"\n#~ msgstr \"Kontrola przepływu\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"Wyrażenia if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"Wyrażenia while let\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"Wyrażenia match\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"Destrukturyzacja struktur\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Destrukturyzacja tablic\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Strażnicy w dopasowywaniu wzorców\"\n\n#, fuzzy\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Dopasowywanie wzorców\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stos a sterta\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Pamięć stosu\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Ręczne zarządzanie pamięcią\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Zarządzanie pamięcią w oparciu o zakres\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Odśmiecanie pamięci\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Zarządzanie pamięcią w Ruście\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Porównanie\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Przenoszenie String w Ruście\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Przenoszenie w wywołaniach funkcji\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Kopiowanie i klonowanie\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Wspólne i unikalne pożyczenia\"\n\n#, fuzzy\n#~ msgid \"Storing Books\"\n#~ msgstr \"Łańcuchy znaków\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iteratory a własność\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Skrócona składnia pola\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"Składnia metody\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option i Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Rekurencyjne typy danych\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Łańcuchy i iteratory\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Metody generyczne\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Monomorfizacja\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Metody domyślne\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"Składnia impl Cecha\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Ważne cechy\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From i Into\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#, fuzzy\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Add, Mul, ...\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"Prosta biblioteka GUI\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Punkty i wielokąty\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Łapanie rozwinięcia stosu\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Strukturalna obsługa błędów\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Propagowanie błędów za pomocą ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Konwersja typów błędów\"\n\n#, fuzzy\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Wyprowadzanie wyliczeń błędów\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Dodawanie kontekstu do błędów\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send i Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#, fuzzy\n#~ msgid \"Pin\"\n#~ msgstr \" Punkt\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Dzień 1 Rano\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Dzień 1 Popołudnie\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Dzień 2 Rano\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Dzień 2 Popołudnie\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Dzień 3 Rano\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Dzień 3 Popołudnie\"\n\n#, fuzzy\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Współbieżność\"\n\n#, fuzzy\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Współbieżność\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"Kurs jest prowadzony w szybkim tempie i obejmuje dużo materiału:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"Dzień 2: Typy danych złożonych, dopasowywanie wzorców, biblioteka \"\n#~ \"standardowa.\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Dzień 3: Cechy i uogólnienia, obsługa błędów, testowanie, niebezpieczny \"\n#~ \"Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Umożliwi to narzędziu [rust-analyzer](https://rust-analyzer.github.io/) \"\n#~ \"przechodzenie do definicji. Sugerujemy użycie [VS Code](https://code.\"\n#~ \"visualstudio.com/), aby edytować kod (ale działa każdy edytor \"\n#~ \"kompatybilny z LSP).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Niektórzy ludzie lubią również korzystać z rodziny IDE [JetBrains]\"\n#~ \"(https://www.jetbrains.com/clion/), które wykonują własne analizy, ale \"\n#~ \"mają własne kompromisy. Jeśli wolisz je, możesz zainstalować [wtyczkę \"\n#~ \"Rusta](https://www.jetbrains.com/rust/). Należy pamiętać, że od stycznia \"\n#~ \"2023 r. debugowanie działa tylko w wersji CLion pakietu JetBrains IDEA.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Zmień mnie!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.61.0 (fe5b13d68 2022-05-18)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.61.0 (a028ae4 2022-04-29)\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Zmień mnie!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Zmień mnie!\\n\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Konstrukcje przepływu sterowania: `if`, `if let`, `while`, `while let`, \"\n#~ \"`break` i `kontynuuj`.\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"Ideą pierwszego dnia jest pokazanie _tylko tyle_ Rusta, żeby móc mówić o \"\n#~ \"słynnym nadzorcu pożyczania. Sposób, w jaki Rust obsługuje pamięć, jest \"\n#~ \"jego główną cechą i powinniśmy od razu pokazać to uczniom.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Jeśli uczysz tego w klasie, jest to dobre miejsce do przejrzenia \"\n#~ \"harmonogramu. Proponujemy podzielić dzień na dwie części (według slajdów):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Rano: od 9:00 do 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Po południu: od 13:00 do 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Można to oczywiście dostosować w razie potrzeby. Proszę uwzględnić \"\n#~ \"przerwy, zalecamy przerwę co godzinę!\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Witaj 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Oto mały przykładowy program w Ruście:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Punkt wejścia do programu\\n\"\n#~ \"    let mut x: i32 = 6;  // Zmienna mutowalna\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Makro do wypisywania tekstu, jak printf\\n\"\n#~ \"    while x != 1 {       // Wyrażenie bez nawiasów\\n\"\n#~ \"        if x % 2 == 0 {  // Obliczenia jak w innych językach\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Kod implementuje hipotezę Collatza: uważa się, że pętla zawsze się \"\n#~ \"kończy, ale nie zostało to jeszcze udowodnione. Edytuj kod i baw się \"\n#~ \"różnymi danymi wejściowymi.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Wyjaśnij, że wszystkie zmienne są typowane statycznie. Spróbuj usunąć \"\n#~ \"`i32`, aby uruchomić wnioskowanie typu. Zamiast tego spróbuj z `i8` i \"\n#~ \"wywołaj przepełnienie liczby całkowitej w czasie wykonywania.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Zmień `let mut x` na `let x`, omów błąd kompilatora.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Pokaż, jak `print!` daje błąd kompilacji, jeśli argumenty nie pasują do \"\n#~ \"łańcucha formatującego.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Pokaż, że  musisz użyć `{}` jako symbolu zastępczego, jeśli chcesz \"\n#~ \"wypisać wyrażenie, które jest bardziej złożone niż tylko pojedyncza \"\n#~ \"zmienna.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Pokaż uczniom standardową bibliotekę, pokaż im, jak szukać `std::fmt` \"\n#~ \"który ma zasady mini-języka formatowania. Ważne jest, aby studenci \"\n#~ \"zapoznają się z wyszukiwaniem w bibliotece standardowej.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Bezpieczeństwo pamięci w czasie kompilacji.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Brak niezdefiniowanego zachowania w czasie wykonywania.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Nowoczesne funkcje językowe.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Statyczne zarządzanie pamięcią w czasie kompilacji:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Brak wycieków pamięci (_głównie_, patrz uwagi).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"Możliwe jest generowanie wycieków pamięci w (bezpiecznym) Ruście. Kilka \"\n#~ \"przykładów:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Możesz użyć [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) do wycieku wskaźnika. Można to wykorzystać, aby uzyskać \"\n#~ \"zmienne statyczne inicjowane w czasie wykonywania i o rozmiarze czasu \"\n#~ \"wykonywania\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Możesz użyć [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html), aby kompilator „zapomniał” o wartości (co oznacza, że \"\n#~ \"destruktor nigdy nie jest uruchamiany).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Możesz także przypadkowo utworzyć [cykl referencyjny](http://rust.w8.pl/\"\n#~ \"book/ch15-06-reference-cycles.html) za pomocą `Rc` lub `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"W rzeczywistości niektórzy uznają zapełnianie kolekcji w nieskończoność \"\n#~ \"za wyciek pamięci, a Rust nie chroni przed nimi.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Na potrzeby tego kursu należy rozumieć „Brak wycieków pamięci”. jako \"\n#~ \"„Prawie nie ma _przypadkowych_ wycieków pamięci”.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"Przepełnienie liczb całkowitych jest definiowane za pomocą flagi czasu \"\n#~ \"kompilacji. Opcje to panika (kontrolowana awaria programu) lub zawijanie. \"\n#~ \"Domyślnie to panika w trybie debugowania (`cargo build`) i zawijanie w \"\n#~ \"trybie produkcyjnym (`cargo build --release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"Sprawdzania granic nie można wyłączyć za pomocą flagi kompilatora. Nie \"\n#~ \"może też wyłączyć go bezpośrednio za pomocą słowa kluczowego `unsafe`. \"\n#~ \"Jednakże, `unsafe` pozwala na wywołanie funkcji takich jak `slice::\"\n#~ \"get_unchecked`, które nie sprawdzają granic.\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"Rust jest zbudowany z całym doświadczeniem zdobytym w ciągu ostatnich 40 \"\n#~ \"lat.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Funkcje języka\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Narzędzia\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Abstrakcje o zerowych kosztach, podobne do C++, oznaczają, że nie musisz \"\n#~ \"„płacić” za konstrukcje programistyczne wyższego poziomu pamięcią lub \"\n#~ \"procesorem. Na przykład, pisanie pętli przy użyciu `for` powinno dać w \"\n#~ \"przybliżeniu te same instrukcje niskiego poziomu jak przy użyciu \"\n#~ \"konstrukcji `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Warto wspomnieć, że wyliczenia w Rust również są „algebraicznymi typami \"\n#~ \"danych”, które pozwalają systemowi typów wyrażać takie rzeczy jak \"\n#~ \"`Option<T>` i `Result<T, E>`.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Przypomnij ludziom, aby przeczytali błędy --- wielu programistów \"\n#~ \"przyzwyczaiło się do ignorowanie długich danych wyjściowych kompilatora. \"\n#~ \"Kompilator Rusta jest znacznie bardziej rozmowny niż inne kompilatory. \"\n#~ \"Często da ci _użyteczne_ podpowiedzi, gotowe do skopiowania i wklejenia \"\n#~ \"do kodu.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"Standardowa biblioteka Rusta jest niewielka w porównaniu z językami \"\n#~ \"takimi jak Java, Python, i Go. Rust nie zawiera kilku rzeczy, które można \"\n#~ \"by uznać za standardowe i niezbędne:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"generator liczb losowych, ale patrz [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"wsparcie dla SSL lub TLS, ale zobacz [rusttls](https://docs.rs/rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"wsparcie dla JSON, ale zobacz [serde_json](https://docs.rs/serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Powodem tego jest to, że funkcjonalność w bibliotece standardowej nie \"\n#~ \"może odejść, więc musi być bardzo stabilna. Dla powyższych przykładów \"\n#~ \"społeczność Rusta wciąż pracuje nad znalezieniem najlepszego rozwiązania \"\n#~ \"--- i być może nie ma jednego „najlepszego rozwiązania” dla niektórych z \"\n#~ \"tych rzeczy.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust ma wbudowanego menedżera pakietów w postaci Cargo i to sprawia, że \"\n#~ \"pobieranie i kompilowanie zewnętrznych pakietów jest trywialne. \"\n#~ \"Konsekwencją tego jest to, że standardowa biblioteka może być mniejsza.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Odkrywanie dobrych skrzynek może być problemem. Witryny takie jak \"\n#~ \"<https://lib.rs/> w tym pomagają, umożliwiając porównanie wskaźników \"\n#~ \"kondycji skrzynki, aby znaleźć te dobre i zaufane.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) to dobrze obsługiwana \"\n#~ \"implementacja LSP używana w głównych IDE i edytorach tekstu.\"\n\n#, fuzzy\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`, `r#\\\"\\\\\\\\\\\"#`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 10;\\n\"\n#~ \"    println!(\\\"przedtem: {a}\\\");\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i8; 10] = [42; 10];\\n\"\n#~ \"    a[5] = 0;\\n\"\n#~ \"    println!(\\\"a: {:?}\\\", a);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i8; 10] = [42; 10];\\n\"\n#~ \"    a[5] = 0;\\n\"\n#~ \"    println!(\\\"a: {:?}\\\", a);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let t: (i8, bool) = (7, true);\\n\"\n#~ \"    println!(\\\"1st index: {}\\\", t.0);\\n\"\n#~ \"    println!(\\\"2nd index: {}\\\", t.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let t: (i8, bool) = (7, true);\\n\"\n#~ \"    println!(\\\"Pierwszy element: {}\\\", t.0);\\n\"\n#~ \"    println!(\\\"Drugi element: {}\\\", t.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Podobnie jak C++, Rust ma referencje:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x: i32 = 10;\\n\"\n#~ \"    let ref_x: &mut i32 = &mut x;\\n\"\n#~ \"    *ref_x = 20;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x: i32 = 10;\\n\"\n#~ \"    let ref_x: &mut i32 = &mut x;\\n\"\n#~ \"    *ref_x = 20;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Podczas przypisywania musimy wyłuskać referencję `ref_x`, podobnie jak w \"\n#~ \"przypadku wskaźników C i C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"Referencje zadeklarowane jako `mut` mogą być powiązane z różnymi \"\n#~ \"wartościami w czasie ich istnienia.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let ref_x: &i32;\\n\"\n#~ \"    {\\n\"\n#~ \"        let x: i32 = 10;\\n\"\n#~ \"        ref_x = &x;\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"ref_x: {ref_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let ref_x: &i32;\\n\"\n#~ \"    {\\n\"\n#~ \"        let x: i32 = 10;\\n\"\n#~ \"        ref_x = &x;\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"ref_x: {ref_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"Mówi się, że referencja „pożycza” wartość, do której się odnosi.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust śledzi czas życia wszystkich referencji, aby zapewnić, że mają \"\n#~ \"wystarczająco długi czas życia.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i32; 6] = [10, 20, 30, 40, 50, 60];\\n\"\n#~ \"    println!(\\\"a: {a:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let s: &[i32] = &a[2..4];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"s: {s:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a: [i32; 6] = [10, 20, 30, 40, 50, 60];\\n\"\n#~ \"    println!(\\\"a: {a:?}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` i `str`\"\n\n#~ msgid \"We can now understand the two string types in Rust:\"\n#~ msgstr \"Możemy teraz zrozumieć dwa typy łańcuchów w Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: &str = \\\"World\\\";\\n\"\n#~ \"    println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let mut s2: String = String::from(\\\"Hello \\\");\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    s2.push_str(s1);\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    \\n\"\n#~ \"    let s3: &str = &s2[6..];\\n\"\n#~ \"    println!(\\\"s3: {s3}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let mut s2: String = String::from(\\\"Witaj \\\");\\n\"\n#~ \"println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"s2.push_str(s1);\\n\"\n#~ \"println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"\\n\"\n#~ \"let s3: &str = &s2[6..];\\n\"\n#~ \"println!(\\\"s3: {s3}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Możesz pożyczyć wycinki `&str` ze `String` za pomocą `&` i opcjonalnego \"\n#~ \"wyboru zakresu.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Rustowa wersja słynnego pytania z rozmów o pracę [FizzBuzz](https://en.\"\n#~ \"wikipedia.org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"W `main` odnosimy się do funkcji napisanej poniżej. Nie ma potrzeby na \"\n#~ \"deklaracje z gory lub na nagłówki. \"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"Wyrażenie zakresu w pętli `for` w `fizzbuzz_to()` zawiera `=n`, powoduje \"\n#~ \"to zawarcie górnego zakresu.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"/// Determine whether the first argument is divisible by the second \"\n#~ \"argument.\\n\"\n#~ \"///\\n\"\n#~ \"/// If the second argument is zero, the result is false.\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // Corner case, early return\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // The last expression in a block is the return \"\n#~ \"value\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool { if rhs == 0 { return \"\n#~ \"false;  // Szczególny przypadek, wczesne wyjście } lhs % rhs == 0     // \"\n#~ \"Ostatnie wyrażenie w bloku to zwracana wartość }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Rust ma metody, są to po prostu funkcje powiązane z określonym typem. \"\n#~ \"Pierwszy argument metody jest instancją typu, z którym jest powiązana:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"W dzisiejszym ćwiczeniu i na jutrzejszych zajęciach przyjrzymy się \"\n#~ \"metodom znacznie dokładniej.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn multiply(x: i16, y: i16) -> i16 {\\n\"\n#~ \"    x * y\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Przeciążanie funkcji\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Przeciążanie nie jest obsługiwane:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Zawsze przyjmuje stałą liczbę parametrów.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Wartości domyślne nie są obsługiwane:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Wszystkie wywołania mają taką samą liczbę argumentów.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Makra są czasami używane jako alternatywa.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Jednak parametry funkcji mogą być generyczne:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"coin toss: {}\\\", pick_one(\\\"heads\\\", \\\"tails\\\"));\\n\"\n#~ \"    println!(\\\"cash prize: {}\\\", pick_one(500, 1000));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { println!(\\\"rzut monetą: {}\\\", pick_one(\\\"orzeł\\\", \"\n#~ \"\\\"reszka\\\")); println!(\\\"nagroda: {}\\\", pick_one(500, 1000)); }\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"Podczas korzystania z typów generycznych, `Into<T>` z biblioteki \"\n#~ \"standardowej może zapewnić pewnego rodzaju ograniczony polimorfizm typów \"\n#~ \"argumentów. Więcej szczegółów zobaczymy w dalszej części.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Dzień 1: Ćwiczenia poranne\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"W tych ćwiczeniach przyjrzymy się dwóm częściom Rusta:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Niejawne konwersje między typami.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Tablice i pętle `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"\"\n#~ \"Kilka rzeczy, które należy wziąć pod uwagę podczas rozwiązywania ćwiczeń:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Jeśli to możliwe, użyj lokalnej instalacji Rusta. W ten sposób możesz \"\n#~ \"dostać autouzupełnianie w twoim edytorze. Więcej informacji o \"\n#~ \"instalowaniu Rusta znajdziesz na stronie o [Korzystaniu z Cargo](../../\"\n#~ \"cargo.md).\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"Ewentualnie skorzystaj z Rust Playground.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Fragmentów kodu celowo nie można edytować: wbudowane fragmenty kodu tracą \"\n#~ \"stan, jeśli opuścisz stronę.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust nie zastosuje automatycznie _niejawnych konwersji_ między typami ([w \"\n#~ \"przeciwieństwie do C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Możesz to zobaczyć w takim programie:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn multiply(x: i16, y: i16) -> i16 {\\n\"\n#~ \"    x * y\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x: i8 = 15;\\n\"\n#~ \"    let y: i16 = 1000;\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"{x} * {y} = {}\\\", multiply(x, y));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let ref_x: &i32;\\n\"\n#~ \"    {\\n\"\n#~ \"        let x: i32 = 10;\\n\"\n#~ \"        ref_x = &x;\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"ref_x: {ref_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Wszystkie typy całkowite w Ruście implementują cechy [`From<T>`](https://\"\n#~ \"doc.rust-lang.org/std/convert/trait.From.html) i [`Into<T>`](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.Into.html) aby umożliwić nam konwersję \"\n#~ \"między nimi. Cecha `From<T>` ma jedną metodę `from()` i podobnie cecha \"\n#~ \"`Into<T>` ma jedną metodę `into()`. Implementacja tych cech to wyrażenie, \"\n#~ \"w jaki sposób można przekształcić dany typ w inny typ.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"Standardowa biblioteka ma implementację `From<i8>` dla `i16`, co oznacza \"\n#~ \"że możemy zamienić zmienną `x` typu `i8` na `i16` przez wywołanie `i16::\"\n#~ \"from(x)`. Lub, prościej, za pomocę `x.into()`, ponieważ implementacja \"\n#~ \"`From<i8>` dla `i16` automatycznie tworzy implementację `Into<i16>` dla \"\n#~ \"`i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"To samo dotyczy twoich własnych implementacji `From` dla twoich własnych \"\n#~ \"typów, więc wystarczy zaimplementować tylko `From`, aby automatycznie \"\n#~ \"uzyskać odpowiednią implementację `Into`.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"Uruchom powyższy program i spójrz na błąd kompilatora.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Zaktualizuj powyższy kod, aby użyć funkcji `into()` do przeprowadzenia \"\n#~ \"konwersji.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Zmień typy `x` i `y` na inne (takie jak `f32`, `bool`, `i128`), aby \"\n#~ \"zobaczyć, które typy można przekonwertować na inne typy. Spróbuj \"\n#~ \"konwertować małe typy na duże i na odwrót. Sprawdź [dokumentację \"\n#~ \"biblioteki standardowej](https://doc.rust-lang.org/std/convert/trait.From.\"\n#~ \"html), aby zobaczyć, czy `From<T>` jest zaimplementowane dla pary typów, \"\n#~ \"które sprawdzasz.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Tablice i pętle `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Widzieliśmy, że tablicę można zadeklarować w następujący sposób:\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"let array = [10, 20, 30];\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"let array = [10, 20, 30];\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Możesz wydrukować taką tablicę, prosząc o jej reprezentację debugowania \"\n#~ \"za pomocą `{:?}`:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    println!(\\\"array: {array:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    println!(\\\"array: {array:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust pozwala iterować po takich rzeczach, jak tablice i zakresy, używając \"\n#~ \"słowa kluczowego `for`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterating over array:\\\");\\n\"\n#~ \"    for n in &array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"\\n\"\n#~ \"    print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"    for i in 0..3 {\\n\"\n#~ \"        print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterowanie po tablicy:\\\");\\n\"\n#~ \"    for n in array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \"           ⎛⎡1 2 3⎤⎞      ⎡1 4 7⎤\\n\"\n#~ \"\\\"transpose\\\"⎜⎢4 5 6⎥⎟  \\\"==\\\"⎢2 5 8⎥\\n\"\n#~ \"           ⎝⎣7 8 9⎦⎠      ⎣3 6 9⎦\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \"           ⎛⎡1 2 3⎤⎞      ⎡1 4 7⎤\\n\"\n#~ \"\\\"transpose\\\"⎜⎢4 5 6⎥⎟  \\\"==\\\"⎢2 5 8⎥\\n\"\n#~ \"           ⎝⎣7 8 9⎦⎠      ⎣3 6 9⎦\\n\"\n#~ \"```\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Dodatkowe pytanie\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Czy mógłbyś użyć wycinków `&[i32]` zamiast zakodowanych na stałe macierzy \"\n#~ \"3 × 3 dla typów argumentów i typów zwracanych? Coś w stylu `&[&[i32]]` \"\n#~ \"dla dwuwymiarowych wycinków-wycinków. Dlaczego tak lub dlaczego nie?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Zobacz [skrzynię `ndarray`](https://docs.rs/ndarray/) dla implementacji \"\n#~ \"produkcyjnej jakości.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"Rozwiązanie i odpowiedź do sekcji bonusowej są dostępne w sekcji \"\n#~ \"[Rozwiązanie](solutions-morning.md#arrays-and-for-loops).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Jak widzieliśmy, `if` jest wyrażeniem w Rust. Służy do warunkowego ocenić \"\n#~ \"jeden z dwóch bloków, ale bloki mogą mieć wartość, która następnie staje \"\n#~ \"się wartość wyrażenia `if`. Inne wyrażenia przepływu sterowania działają \"\n#~ \"podobnie w Ruście.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"Ta sama reguła jest używana dla funkcji: wartością ciała funkcji jest \"\n#~ \"zwracana wartość:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn double(x: i32) -> i32 {\\n\"\n#~ \"    x + x\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"doubled: {}\\\", double(7));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn takes_u32(x: u32) {\\n\"\n#~ \"    println!(\\\"u32: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"Celem tego slajdu jest pokazanie, że bloki mają typ i wartość w Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"Wyrażenie `for` jest blisko spokrewnione z wyrażeniem `while let`. To \"\n#~ \"będzie automatycznie wywołaj `into_iter()` na wyrażeniu, a następnie \"\n#~ \"wykonaj iterację:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"\\n\"\n#~ \"    for x in v {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    \\n\"\n#~ \"    for i in (0..10).step_by(2) {\\n\"\n#~ \"        println!(\\\"i: {i}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut vec = vec![10, 20];\\n\"\n#~ \"    vec.push(30);\\n\"\n#~ \"    println!(\\\"middle value: {}\\\", vec[vec.len() / 2]);\\n\"\n#~ \"    for item in vec.iter() {\\n\"\n#~ \"        println!(\\\"item: {item}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Możesz użyć `break` i `continue` tutaj jak zwykle.\"\n\n#, fuzzy\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"Iteracja indeksu nie jest specjalną składnią w Rust tylko w tym przypadku.\"\n\n#, fuzzy\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` to zakres implementujący cechę `Iterator`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` to metoda, która zwraca kolejny `Iterator`, który pomija każdy \"\n#~ \"inny element.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Zmodyfikuj elementy wektora i wyjaśnij błędy kompilatora. Zmień wektor \"\n#~ \"`v` na zmienny, a pętlę for na `for x w v.iter_mut()`.\"\n\n#, fuzzy\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"wyrażenia `pętli`\"\n\n#, fuzzy\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"\"\n#~ \"Wreszcie istnieje słowo kluczowe `loop`, które tworzy nieskończoną pętlę. \"\n#~ \"Tutaj musisz albo `break` albo `return`, aby zatrzymać pętlę:\"\n\n#, fuzzy\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"Przerwij `pętlę` wartością (np. `break 8`) i wypisz ją.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x: i32 = 10;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    // x = 20;\\n\"\n#~ \"    // println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x: i32 = 10;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    // x = 20;\\n\"\n#~ \"    // println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Ze względu na wnioskowanie o typie `i32` jest opcjonalne. Stopniowo \"\n#~ \"będziemy pokazywać mniej typów w miarę postępów w kursie.\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"Poniższy kod mówi kompilatorowi, aby skopiował do pewnego ogólnego \"\n#~ \"kontenera bez jawnego określania typu zawartego w kodzie, używając `_` \"\n#~ \"jako symbolu zastępczego:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut v = Vec::new();\\n\"\n#~ \"    v.push((10, false));\\n\"\n#~ \"    v.push((20, true));\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let vv = v.iter().collect::<std::collections::HashSet<_>>();\\n\"\n#~ \"    println!(\\\"vv: {vv:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut v = Vec::new();\\n\"\n#~ \"    v.push((10, false));\\n\"\n#~ \"    v.push((20, true));\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) polega na `FromIterator`, który \\\\[`HashSet`\\\\]\"\n#~ \"(https:/ /doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n#~ \"implementuje.\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Zmienne statyczne i stałe\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"const DIGEST_SIZE: usize = 3;\\n\"\n#~ \"const ZERO: Option<u8> = Some(42);\\n\"\n#~ \"\\n\"\n#~ \"fn compute_digest(text: &str) -> [u8; DIGEST_SIZE] {\\n\"\n#~ \"    let mut digest = [ZERO.unwrap_or(0); DIGEST_SIZE];\\n\"\n#~ \"    for (idx, &b) in text.as_bytes().iter().enumerate() {\\n\"\n#~ \"        digest[idx % DIGEST_SIZE] = digest[idx % DIGEST_SIZE].\"\n#~ \"wrapping_add(b);\\n\"\n#~ \"    }\\n\"\n#~ \"    digest\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let digest = compute_digest(\\\"Hello\\\");\\n\"\n#~ \"    println!(\\\"Digest: {digest:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn compute_digest(text: &str) -> \\\\[u8; DIGEST_SIZE\\\\] { let mut digest = \"\n#~ \"\\\\[ZERO.unwrap_or(0); DIGEST_SIZE\\\\]; for (idx, &b) in text.as_bytes().\"\n#~ \"iter().enumerate() { digest\\\\[idx % DIGEST_SIZE\\\\] = digest\\\\[idx % \"\n#~ \"DIGEST_SIZE\\\\].wrapping_add(b); } digest }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"Welcome to RustOS 3.14\\\";\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{BANNER}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"Witamy w RustOS 3.14\\\";\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 10;\\n\"\n#~ \"    println!(\\\"before: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let a = \\\"hello\\\";\\n\"\n#~ \"        println!(\\\"inner scope: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"        let a = true;\\n\"\n#~ \"        println!(\\\"shadowed in inner scope: {a}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"after: {a}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterowanie po tablicy:\\\");\\n\"\n#~ \"    for n in array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"Poniższy kod ilustruje, dlaczego kompilator nie może po prostu ponownie \"\n#~ \"użyć lokalizacji pamięci podczas przesłaniania niemutowalnej zmiennej w \"\n#~ \"zakresie, nawet jeśli typ się nie zmienia.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 1;\\n\"\n#~ \"    let b = &a;\\n\"\n#~ \"    let a = a + 1;\\n\"\n#~ \"    println!(\\\"{a} {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 1;\\n\"\n#~ \"    let b = &a;\\n\"\n#~ \"    let a = a + 1;\\n\"\n#~ \"    println!(\\\"{a} {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Ta strona oferuje typ wyliczeniowy `CoinFlip` z dwoma wariantami `Heads` \"\n#~ \"i `Tail`. Podczas używania wariantów możesz zwrócić uwagę na przestrzeń \"\n#~ \"nazw.\"\n\n#, fuzzy\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"W obu przypadkach powiązane funkcje są zdefiniowane w bloku `impl`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Możesz zdefiniować bogatsze wyliczenia, w których warianty zawierają \"\n#~ \"dane. Możesz wtedy użyć tzw Instrukcja `match` w celu wyodrębnienia \"\n#~ \"danych z każdego wariantu:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"Wyrażenia są dopasowywane do wzorców od góry do dołu. Nie ma spadku, jak \"\n#~ \"w C lub C++.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"Wyrażenie dopasowania ma wartość. Wartość to ostatnie wyrażenie w \"\n#~ \"ramieniu dopasowania, które zostało wykonane.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"Zaczynając od góry, szukamy wzoru pasującego do wartości, a następnie \"\n#~ \"uruchamiamy kod podążający za strzałką. Gdy znajdziemy dopasowanie, \"\n#~ \"zatrzymujemy się.\"\n\n#, fuzzy\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` sprawdza ukryte pole dyskryminujące w `enum`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"\"\n#~ \"Możliwe jest odzyskanie wyróżnika przez wywołanie `std::mem::\"\n#~ \"discriminant()`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"Jest to przydatne na przykład przy implementacji `PartialEq` dla \"\n#~ \"struktur, w których porównywanie wartości pól nie wpływa na równość.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` nie jest dokładnie tym samym co `WebEvent::\"\n#~ \"Click(Click)` z najwyższym poziomem `struct Click { ... }`. Wbudowana \"\n#~ \"wersja nie może na przykład implementować cech.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Wyliczenia Rust są ciasno upakowane, biorąc pod uwagę ograniczenia \"\n#~ \"wynikające z wyrównania:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"\"\n#~ \"Wewnętrznie Rust używa pola (dyskryminacyjnego) do śledzenia wariantu \"\n#~ \"enum.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"Bardziej złożony przykład, jeśli chcesz omówić, co się stanie, gdy \"\n#~ \"połączymy razem więcej niż 256 opcji.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut vec = vec![10, 20];\\n\"\n#~ \"    vec.push(30);\\n\"\n#~ \"    println!(\\\"middle value: {}\\\", vec[vec.len() / 2]);\\n\"\n#~ \"    for item in vec.iter() {\\n\"\n#~ \"        println!(\\\"item: {item}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"Słowo kluczowe `match` służy do dopasowania wartości do jednego lub \"\n#~ \"więcej wzorców. W w tym sensie działa jak seria wyrażeń „if let”:\"\n\n#, fuzzy\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"Zapisz wyrażenie dopasowania do zmiennej i wydrukuj je.\"\n\n#, fuzzy\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"Usuń `.as_deref()` i wyjaśnij błąd.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` zwraca `Option<String>`, ale nie możemy \"\n#~ \"dopasować do `String`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` przekształca `Option<T>` w `Option<&T::Target>`. W naszym \"\n#~ \"przypadku zmienia to `Option<String>` w `Option<&str>`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"Możemy teraz użyć dopasowywania wzorców, aby dopasować się do `&str` \"\n#~ \"wewnątrz `Option`.\"\n\n#, fuzzy\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"\"\n#~ \"Wzorzec `_` jest wzorcem wieloznacznym, który pasuje do dowolnej wartości.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Przydatne może być pokazanie, jak działa wiązanie, na przykład zastępując \"\n#~ \"symbol wieloznaczny zmienną lub usuwając cudzysłowy wokół `q`.\"\n\n#, fuzzy\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Możesz zademonstrować dopasowanie na podstawie referencji.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"To może być dobry moment, aby przywołać koncepcję niepodważalnych \"\n#~ \"wzorców, ponieważ termin ten może pojawiać się w komunikatach o błędach.\"\n\n#, fuzzy\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Możesz także zniszczyć `struktury`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"\"\n#~ \"Destrukturyzacja plasterków o nieznanej długości działa również z wzorami \"\n#~ \"o stałej długości.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Podczas dopasowywania możesz dodać _guard_ do wzoru. To jest dowolna \"\n#~ \"wartość logiczna wyrażenie, które zostanie wykonane, jeśli wzorzec pasuje:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Możesz użyć zmiennych zdefiniowanych we wzorcu w swoim wyrażeniu if.\"\n\n#, fuzzy\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Dzień 1: Ćwiczenia popołudniowe\"\n\n#, fuzzy\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Przyjrzymy się dwóm rzeczom:\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Algorytm Luhna\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Wyliczenia i dopasowywanie wzorców.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"function.\"\n#~ msgstr \"\"\n#~ \"Skopiuj poniższy kod do <https://play.rust-lang.org/> i zaimplementuj \"\n#~ \"funkcje:\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Zarządzanie pamięcią: stos a sterta, ręczne zarządzanie pamięcią, \"\n#~ \"zarządzanie pamięcią oparte na zakresie i odśmiecanie pamięci.\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Własność: semantyka przenoszenia, kopiowanie i klonowanie, pożyczanie i \"\n#~ \"czasy życia.\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Struktury, wyliczenia, metody.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"Biblioteka standardowa: `String`, `Option` i `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` i `Łuk`.\"\n\n#, fuzzy\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"Moduły: widoczność, ścieżki i hierarchia systemów plików.\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"Najpierw odświeżmy, jak działa zarządzanie pamięcią.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"Stos a sterta\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Stos a sterta\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n#~ \"    // String provides no guarantees about its layout, so this could lead \"\n#~ \"to\\n\"\n#~ \"    // undefined behavior.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (ptr, capacity, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // NIE PRÓBUJCIE TEGO W DOMU! Tylko dla celów edukacyjnych.\\n\"\n#~ \"    // String nie gwarantuje rozłożenia pamięci więc to może prowadzić \"\n#~ \"do\\n\"\n#~ \"    // niezdefiniowanego zachowania.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (capacity, ptr, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Możesz własnoręcznie alokować i zwalniać pamięć sterty.\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Jeżeli nie jest to zrobione z uwagą to może prowadzić do załamania \"\n#~ \"(\\\"crash\\\"), błędów, problemów bezpieczeństwa i wycieków pamięci.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"Przykład C\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"\"\n#~ \"Musisz wywołać `free` na każdym wskaźniku, który alokujesz za pomocą \"\n#~ \"`malloc`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = (int*)malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... dużo kodu\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"Pamięć wycieka jeżeli funkcja zwróci pomiędzy `malloc` i `free`: wskaźnik \"\n#~ \"jest stracony i nie możemy zwolnić pamięci.\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Konstruktory i destruktory pozwalają wpiąć się do czasu życia obiektu.\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Przez opakowania wskaźnika w obiekt, możesz zwolnić pamięć jeżeli obiekt \"\n#~ \"jest zniszczony. Kompilator to gwarantuje, nawet jeżeli rzucony jest \"\n#~ \"wyjątek.\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Często jest to nazywane inicjowaniem przy pozyskaniu zasobu (ang. \"\n#~ \"_resource acquisition is initialization_ (RAII)) i pozwala nam na \"\n#~ \"inteligentne wskaźniki.\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"Obiekt `std::unique_ptr` jest alokowany na stosie i wskazuje na pamięć \"\n#~ \"zaalokowaną na stercie.\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"Na końcu `say_hello` jest wywoływany destruktor `std::unique_ptr`.\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"Destruktor zwalnia pamięć obiektu `Person` na który wskazuje.\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Specjalne konstruktory przenoszenia są używane kiedy własność jest \"\n#~ \"przekazywana do funkcji:\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::unique_ptr<Person> person = find_person(\\\"Carla\\\");\\n\"\n#~ \"say_hello(std::move(person));\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::unique_ptr<Person> person = find_person(\\\"Carla\\\");\\n\"\n#~ \"say_hello(std::move(person));\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Alternatywą do ręcznego zarządzania pamięcią i zarządzania opartego o \"\n#~ \"zasięg jest automatyczne zarządzanie pamięcią:\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"Programista nigdy wyraźnie nie alokuje i nie zwalnia pamięci.\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Odśmiecacz pamięci znajduje nieużywaną pamięć i zwalnia ją dla \"\n#~ \"programisty.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Przykład Javy\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"Obiekt `person` nie jest zwalniany po zwróceniu z `sayHello`:\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Zarządzanie pamięcią w Ruście\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Zarządzanie pamięcią w Ruście to mieszanka:\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Bezpieczne i prawidłowe jak w Javie, ale bez odśmiecania pamięci.\"\n\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"W zależności którą abstrakcję (lub kombinację abstrakcji) wybierzesz to \"\n#~ \"może być pojedynczy unikalny wskażnik, zliczanie referencji lub atomiczne \"\n#~ \"zliczanie referencji.\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"Oparte o zakres jak w C++, ale kompilator egzekwuje pełne przestrzeganie.\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Użytkownika Rusta wybiera właściwą abstrakcję w zależności od sytuacji, \"\n#~ \"niektóre nie mają nawet kosztu w czasie uruchomienia jak w C.\"\n\n#, fuzzy\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Osiąga to przez wyraźne modelowanie _własności_.\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Jeżeli uczniowie zapytają w tym momencie jak, to wspomnij, że w Ruście to \"\n#~ \"przeważnie jest zrobione za pomocą opakowań takich jak [Box](https://doc.\"\n#~ \"rust-lang.org/std/boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/\"\n#~ \"std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.\"\n#~ \"html), czy [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). \"\n#~ \"Typy te zapewniają własność i alokację pamięci różnymi metodami i \"\n#~ \"zapobiegają potencjalnym problemom w C.\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"Możesz dostać pytanie o destruktory, cecha [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) to Rustowy odpowiednik.\"\n\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"Tutaj z grubsza porównujemy techniki zarządzania pamięcią.\"\n\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Zalety różnych technik zarządzania pamięcią\"\n\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Ręczne jak w C:\"\n\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Brak kosztu w czasie działania.\"\n\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Automatyczne jak w Javie:\"\n\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"W pełnie automatyczne.\"\n\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Bezpieczne i prawidłowe.\"\n\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Oparte o zakres jak w C++:\"\n\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Częściowo automatyczne.\"\n\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Egzekwowane przez kompilator oparte o zakres jak w Ruście:\"\n\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Egzekwowane przez kompilator.\"\n\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Wady różnych technik zarządzania pamięcią\"\n\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Użycie po zwolnieniu.\"\n\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Podwójne zwolnienie.\"\n\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"Wycieki pamięci.\"\n\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"Pauzy na odśmiecanie pamięci.\"\n\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Opóźnienie destruktorów.\"\n\n#, fuzzy\n#~ msgid \"Complex, opt-in by programmer (on C++).\"\n#~ msgstr \"Skomplikowane, dobrowolnie używane przez programistę.\"\n\n#, fuzzy\n#~ msgid \"Potential runtime overhead\"\n#~ msgstr \"Brak kosztu w czasie działania.\"\n\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Egzekwowane przez kompilator oparte o zakres jak w Ruście:\"\n\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Pewna złożoność z góry.\"\n\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Może odrzucić prawidłowe programy.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    {\\n\"\n#~ \"        let p = Point(3, 4);\\n\"\n#~ \"        println!(\\\"x: {}\\\", p.0);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"y: {}\\\", p.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Destruktor może być uruchomiony żeby zwolnić zasoby.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Cześć!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"\"\n#~ \"Zawsze jest _dokładnie_ jedno przypisanie do zmiennej, które ma dane na \"\n#~ \"własność.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Rust\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Rust\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Dane sterty z `s1` są użyte ponownie dla `s2`.\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"\"\n#~ \"Kiedy `s1` wychodzi poza zakres, nic się nie dzieje (dane zostały z niej \"\n#~ \"przeniesione).\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                           :\\n\"\n#~ \":    s1                     :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| R  | u  | s  | t  |   :\\n\"\n#~ \":   | len       |     4 |   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | capacity  |     4 |   :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :                           :\\n\"\n#~ \":                           :     `- - - - - - - - - - - - - -'\\n\"\n#~ \":                           :\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stos                              Sterta\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                           :\\n\"\n#~ \":    s1                     :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| R  | u  | s  | t  |   :\\n\"\n#~ \":   | len       |     4 |   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | capacity  |     4 |   :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :                           :\\n\"\n#~ \":                           :     `- - - - - - - - - - - - - -'\\n\"\n#~ \":                           :\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"Podwójne zwalnianie pamięci w nowoczesnym C++\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplicate the data in s1.\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplikowanie danych z s1.\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stos                              Sterta\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Stos                              Sterta\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = String::from(\\\"Alice\\\");\\n\"\n#~ \"    say_hello(name);\\n\"\n#~ \"    // say_hello(name);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { let name = String::from(\\\"Alice\\\"); say_hello(name); // \"\n#~ \"say_hello(name); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Copy, Clone, Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = p1;\\n\"\n#~ \"    println!(\\\"p1: {p1:?}\\\");\\n\"\n#~ \"    println!(\\\"p2: {p2:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Jeżeli studenci zapytają o `derive`, to wystarczy powiedzieć, że to \"\n#~ \"sposób na generowanie kodu Rusta w czasie kompilacji. W tym przypadku \"\n#~ \"będą wygenerowane domyślne implementacje cech `Copy` i `Clone`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: i32 = 10;\\n\"\n#~ \"    let b: &i32 = &a;\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let c: &mut i32 = &mut a;\\n\"\n#~ \"        *c = 20;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"a: {a}\\\");\\n\"\n#~ \"    println!(\\\"b: {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let ref_x: &i32;\\n\"\n#~ \"    {\\n\"\n#~ \"        let x: i32 = 10;\\n\"\n#~ \"        ref_x = &x;\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"ref_x: {ref_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Pożyczona wartość ma _czas życia_:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"\"\n#~ \"Czas życia może być pominięty: `add(p1: &Point, p2: &Point) -> Point`.\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"Czasy życia mogą też być jawne: `&'a Point`, `&'document str`.\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Czytaj `&'a Point` jako \\\"pożyczony `Point` który jest ważny co najmniej \"\n#~ \"w czasie życia `a`\\\".\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"\"\n#~ \"Czasy życia zawsze są wyliczane przez kompilator: nie można samemu \"\n#~ \"przypisać czasu życia.\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"W dodatku do pożyczania swoich argumentów, funkcja może zwrócić pożyczoną \"\n#~ \"wartość:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p2: Point = Point(20, 20);\\n\"\n#~ \"    let p3: &Point = left_most(&p1, &p2);\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1: Point = Point(10, 10); let p2: Point = Point(20, 20); \"\n#~ \"let p3: &Point = left_most(&p1, &p2); println!(\\\"left-most point: {:?}\\\", \"\n#~ \"p3); }\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` to parameter generyczny, jest wyliczany przez kompilator.\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"Czas życia zaczyna się `'` i `'a` to typowa domyślna nazwa.\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"To _co najmniej_ jest ważne jeżeli parametry są w różnych zakresach.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Przenieś deklarację `p2` i `p3` do nowego zakresu (`{ ... }`), powinieneś \"\n#~ \"otrzymać poniższy kod:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p3: &Point;\\n\"\n#~ \"    {\\n\"\n#~ \"        let p2: Point = Point(20, 20);\\n\"\n#~ \"        p3 = left_most(&p1, &p2);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1: Point = Point(10, 10); let p3: &Point; { let p2: \"\n#~ \"Point = Point(20, 20); p3 = left_most(&p1, &p2); } println!(\\\"left-most \"\n#~ \"point: {:?}\\\", p3); }\"\n\n#, fuzzy\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"Zauważ, że teraz kod się nie kompiluje bo `p3` przeżywa `p2`.\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"Zresetuj edytor i zmień sygnaturę funkcji na `fn left_most<'a, 'b>(p1: \"\n#~ \"&'a Point, p2: &'a Point) -> &'b Point`. To się nie skompiluje bo \"\n#~ \"zależność pomiędzy czasami życia `'a` i `'b` jest niejasna.\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"Inny sposób żeby to wytłumaczyć:\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"\"\n#~ \"Dwie referencje do dwóch wartości są pożyczone przez funkcję i funkcja \"\n#~ \"musi zwrócić inną referencję.\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"\"\n#~ \"Ta referencja musi pochodzić z jednego z dwóch wejść(lub ze zmiennej \"\n#~ \"globalnej).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"Która to? Kompilator musi wiedzieć, żeby w czasie wywołania zwracana \"\n#~ \"referencja nie jest używana dłużej niż zmienna z której pochodzi ta \"\n#~ \"referencja.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { let text = String::from(\\\"The quick brown fox jumps over the \"\n#~ \"lazy dog.\\\"); let fox = Highlight(&text\\\\[4..19\\\\]); let dog = \"\n#~ \"Highlight(&text\\\\[35..43\\\\]); // erase(text); println!(\\\"{fox:?}\\\"); \"\n#~ \"println!(\\\"{dog:?}\\\"); }\"\n\n#, fuzzy\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Dzień 2: Ćwiczenia poranne\"\n\n#, fuzzy\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Przyjrzymy się metodom implementacji w dwóch kontekstach:\"\n\n#, fuzzy\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"Prosta struktura, która śledzi statystyki zdrowotne.\"\n\n#, fuzzy\n#~ msgid \"Multiple structs and enums for a drawing library.\"\n#~ msgstr \"Wiele struktur i wyliczeń dla biblioteki rysunków.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Jutro dowiemy się znacznie więcej o strukturach i typie `Vec<T>`. Na \"\n#~ \"razie, wystarczy znać część jego API:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut vec = vec![10, 20];\\n\"\n#~ \"    vec.push(30);\\n\"\n#~ \"    let midpoint = vec.len() / 2;\\n\"\n#~ \"    println!(\\\"middle value: {}\\\", vec[midpoint]);\\n\"\n#~ \"    for item in &vec {\\n\"\n#~ \"        println!(\\\"item: {item}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut vec = vec![10, 20];\\n\"\n#~ \"    vec.push(30);\\n\"\n#~ \"    println!(\\\"middle value: {}\\\", vec[vec.len() / 2]);\\n\"\n#~ \"    for item in vec.iter() {\\n\"\n#~ \"        println!(\\\"item: {item}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Użyj tego, aby utworzyć aplikację biblioteczną. Skopiuj poniższy kod do \"\n#~ \"<https://play.rust-lang.org/> i zaktualizuj typy, aby skompilować:\"\n\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Rozwiązanie](solutions-afternoon.md#designing-a-library)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Model własności Rust wpływa na wiele interfejsów API. Przykładem tego \"\n#~ \"jest tzw [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n#~ \"html) i [`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.\"\n#~ \"IntoIterator.html) cechy.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"Cechy są jak interfejsy: opisują zachowanie (metody) dla typu. The Cecha \"\n#~ \"`Iterator` mówi po prostu, że możesz wywoływać `next`, dopóki nie \"\n#~ \"otrzymasz z powrotem `None`:\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"pub trait Iterator {\\n\"\n#~ \"    type Item;\\n\"\n#~ \"    fn next(&mut self) -> Option<Self::Item>;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"pub trait Iterator {\\n\"\n#~ \"    type Item;\\n\"\n#~ \"    fn next(&mut self) -> Option<Self::Item>;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Używasz tej cechy w ten sposób:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<i8> = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.iter();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v[0]: {:?}\\\", iter.next());\\n\"\n#~ \"    println!(\\\"v[1]: {:?}\\\", iter.next());\\n\"\n#~ \"    println!(\\\"v[2]: {:?}\\\", iter.next());\\n\"\n#~ \"    println!(\\\"No more items: {:?}\\\", iter.next());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"v[0]: {:?}\\\", iter.next());\\n\"\n#~ \"println!(\\\"v[1]: {:?}\\\", iter.next());\\n\"\n#~ \"println!(\\\"v[2]: {:?}\\\", iter.next());\\n\"\n#~ \"println!(\\\"Nie ma więcej elementów: {:?}\\\", iter.next());\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"Jaki typ zwraca iterator? Sprawdź swoją odpowiedź tutaj:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<i8> = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.iter();\\n\"\n#~ \"\\n\"\n#~ \"    let v0: Option<..> = iter.next();\\n\"\n#~ \"    println!(\\\"v0: {v0:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<i8> = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.iter();\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Dlaczego ten typ jest używany?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"pub trait IntoIterator {\\n\"\n#~ \"    type Item;\\n\"\n#~ \"    type IntoIter: Iterator<Item = Self::Item>;\\n\"\n#~ \"\\n\"\n#~ \"    fn into_iter(self) -> Self::IntoIter;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"pub trait IntoIterator {\\n\"\n#~ \"    type Item;\\n\"\n#~ \"    type IntoIter: Iterator<Item = Self::Item>;\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Tak jak poprzednio, jaki typ jest zwracany przez iterator?\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<String> = vec![String::from(\\\"foo\\\"), String::\"\n#~ \"from(\\\"bar\\\")];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    let v0: Option<..> = iter.next();\\n\"\n#~ \"    println!(\\\"v0: {v0:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<String> = vec![String::from(\\\"foo\\\"), String::\"\n#~ \"from(\\\"bar\\\")];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Teraz, gdy znamy zarówno `Iterator`, jak i `IntoIterator`, możemy budować \"\n#~ \"pętle `for`. Wywołują `into_iter()` na wyrażeniu i iterują wynik iterator:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<String> = vec![String::from(\\\"foo\\\"), String::\"\n#~ \"from(\\\"bar\\\")];\\n\"\n#~ \"\\n\"\n#~ \"    for word in &v {\\n\"\n#~ \"        println!(\\\"word: {word}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    for word in v {\\n\"\n#~ \"        println!(\\\"word: {word}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Cześć!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Eksperymentuj z powyższym kodem, a następnie zapoznaj się z dokumentacją \"\n#~ \"dla [`impl IntoIterator dla &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26%27a%20Vec%3CT%2C%20A%3E) i \"\n#~ \"[`impl IntoIterator dla Vec<T>`](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html#impl-IntoIterator-for-Vec%3CT%2C%20A%3E) aby sprawdzić swoje \"\n#~ \"odpowiedzi.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut peter = Person {\\n\"\n#~ \"        name: String::from(\\\"Peter\\\"),\\n\"\n#~ \"        age: 27,\\n\"\n#~ \"    };\\n\"\n#~ \"    println!(\\\"{} is {} years old\\\", peter.name, peter.age);\\n\"\n#~ \"    \\n\"\n#~ \"    peter.age = 28;\\n\"\n#~ \"    println!(\\\"{} is {} years old\\\", peter.name, peter.age);\\n\"\n#~ \"    \\n\"\n#~ \"    let jackie = Person {\\n\"\n#~ \"        name: String::from(\\\"Jackie\\\"),\\n\"\n#~ \"        ..peter\\n\"\n#~ \"    };\\n\"\n#~ \"    println!(\\\"{} is {} years old\\\", jackie.name, jackie.age);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"peter.age = 28;\\n\"\n#~ \"println!(\\\"{} ma {} lat\\\", peter.name, peter.age);\\n\"\n#~ \"\\n\"\n#~ \"let jackie = Person {\\n\"\n#~ \"    name: String::from(\\\"Jackie\\\"),\\n\"\n#~ \"    ..peter\\n\"\n#~ \"};\\n\"\n#~ \"println!(\\\"{} ma {} lat\\\", jackie.name, jackie.age);\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p = Point(17, 23);\\n\"\n#~ \"    println!(\\\"({}, {})\\\", p.0, p.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"fn main() { let p = Point(17, 23); println!(\\\"({}, {})\\\", p.0, p.1); }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"Funkcja `new` może być napisana przy użyciu `Self` jako typu, ponieważ \"\n#~ \"jest wymienna z nazwą typu struct\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"impl Person {\\n\"\n#~ \"    fn new(name: String, age: u8) -> Self {\\n\"\n#~ \"        Self { name, age }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"impl Person {\\n\"\n#~ \"    fn new(name: String, age: u8) -> Self {\\n\"\n#~ \"        Self { name, age }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"Metody są zdefiniowane w bloku `impl`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"Użyj składni aktualizacji struktury, aby zdefiniować nową strukturę za \"\n#~ \"pomocą `peter`. Zauważ, że później zmienna `peter` nie będzie już \"\n#~ \"dostępna.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"\"\n#~ \"Użyj `{:#?}` podczas drukowania struktur, aby zażądać reprezentacji \"\n#~ \"`Debug`.\"\n\n#, fuzzy\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"Następnie opiszemy rozróżnienie między odbiornikami metod.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"Rozważ podkreślenie słów „wspólny i niezmienny” oraz „unikatowy i \"\n#~ \"zmienny”. Te ograniczenia pojawiają się zawsze razem w Rust ze względu na \"\n#~ \"zasady pożyczania sprawdzania, a `self` nie jest wyjątkiem. Nie można \"\n#~ \"odwołać się do struktury z wielu lokalizacji i wywołać na niej metodę \"\n#~ \"mutacji (`&mut self`).\"\n\n#, fuzzy\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"Wszystkie cztery metody tutaj wykorzystują inny odbiornik metody.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Możesz wskazać, jak to zmienia to, co funkcja może zrobić z wartościami \"\n#~ \"zmiennych i czy/jak można jej ponownie użyć w `main`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Możesz pokazać błąd, który pojawia się podczas próby dwukrotnego \"\n#~ \"wywołania `finish`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Należy zauważyć, że chociaż odbiorniki metod są różne, funkcje \"\n#~ \"niestatyczne są wywoływane w ten sam sposób w głównej części. Rust \"\n#~ \"umożliwia automatyczne odwoływanie się i usuwanie odwołań podczas \"\n#~ \"wywoływania metod. Rust automatycznie dodaje `&`, `*`, `muts`, aby ten \"\n#~ \"obiekt pasował do sygnatury metody.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Możesz zauważyć, że `print_laps` używa wektora, który jest iterowany. \"\n#~ \"Wektory opiszemy bardziej szczegółowo po południu.\"\n\n#, fuzzy\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Dzień 2: Ćwiczenia popołudniowe\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Ćwiczenia na to popołudnie skupią się na ciągach znaków i iteratorach.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"pub struct User {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u32,\\n\"\n#~ \"    height: f32,\\n\"\n#~ \"    visit_count: usize,\\n\"\n#~ \"    last_blood_pressure: Option<(u32, u32)>,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"pub struct Measurements {\\n\"\n#~ \"    height: f32,\\n\"\n#~ \"    blood_pressure: (u32, u32),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"pub struct HealthReport<'a> {\\n\"\n#~ \"    patient_name: &'a str,\\n\"\n#~ \"    visit_count: u32,\\n\"\n#~ \"    height_change: f32,\\n\"\n#~ \"    blood_pressure_change: Option<(i32, i32)>,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl User {\\n\"\n#~ \"    pub fn new(name: String, age: u32, height: f32) -> Self {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn name(&self) -> &str {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn age(&self) -> u32 {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn height(&self) -> f32 {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn doctor_visits(&self) -> u32 {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn set_age(&mut self, new_age: u32) {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn set_height(&mut self, new_height: f32) {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn visit_doctor(&mut self, measurements: Measurements) -> \"\n#~ \"HealthReport {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    println!(\\\"I'm {} and my age is {}\\\", bob.name(), bob.age());\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_height() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.height(), 155.2);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_set_age() {\\n\"\n#~ \"    let mut bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.age(), 32);\\n\"\n#~ \"    bob.set_age(33);\\n\"\n#~ \"    assert_eq!(bob.age(), 33);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_visit() {\\n\"\n#~ \"    let mut bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.doctor_visits(), 0);\\n\"\n#~ \"    let report = bob.visit_doctor(Measurements {\\n\"\n#~ \"        height: 156.1,\\n\"\n#~ \"        blood_pressure: (120, 80),\\n\"\n#~ \"    });\\n\"\n#~ \"    assert_eq!(report.patient_name, \\\"Bob\\\");\\n\"\n#~ \"    assert_eq!(report.visit_count, 1);\\n\"\n#~ \"    assert_eq!(report.blood_pressure_change, None);\\n\"\n#~ \"\\n\"\n#~ \"    let report = bob.visit_doctor(Measurements {\\n\"\n#~ \"        height: 156.1,\\n\"\n#~ \"        blood_pressure: (115, 76),\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    assert_eq!(report.visit_count, 2);\\n\"\n#~ \"    assert_eq!(report.blood_pressure_change, Some((-5, -4)));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"\\n\"\n#~ \"# Statystyki zdrowia\\n\"\n#~ \"\\n\"\n#~ \"Pracujesz nad wdrożeniem systemu monitorowania stanu. W ramach tego ty\\n\"\n#~ \"muszą śledzić statystyki dotyczące zdrowia użytkowników.\\n\"\n#~ \"\\n\"\n#~ \"Zaczniesz od niektórych funkcji skrótowych w bloku `impl`, jak również \"\n#~ \"`Użytkownika`\\n\"\n#~ \"definicja struktury. Twoim celem jest zaimplementowanie wygaszonych metod \"\n#~ \"na\\n\"\n#~ \"`User` `struct` zdefiniowana w bloku `impl`.\\n\"\n#~ \"\\n\"\n#~ \"Skopiuj poniższy kod na <https://play.rust-lang.org/> i uzupełnij \"\n#~ \"brakujące\\n\"\n#~ \"metody:\\n\"\n#~ \"\\n\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: usuń to jak skończysz implementację.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"struct User {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u32,\\n\"\n#~ \"    weight: f32,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl User {\\n\"\n#~ \"    pub fn new(name: String, age: u32, weight: f32) -> Self {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn name(&self) -> &str {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn age(&self) -> u32 {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn weight(&self) -> f32 {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn set_age(&mut self, new_age: u32) {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    pub fn set_weight(&mut self, new_weight: f32) {\\n\"\n#~ \"        unimplemented!()\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    println!(\\\"Jestem {} i mam {} lat\\\", bob.name(), bob.age());\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_weight() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.weight(), 155.2);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"# Health Statistics\\n\"\n#~ \"\\n\"\n#~ \"{{#include ../../../third_party/rust-on-exercism/health-statistics.md}}\\n\"\n#~ \"\\n\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and fill in the \"\n#~ \"missing\\n\"\n#~ \"methods:\\n\"\n#~ \"\\n\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"{{#include ../../../third_party/rust-on-exercism/health-statistics.rs}}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    println!(\\\"I'm {} and my age is {}\\\", bob.name(), bob.age());\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_height() {\\n\"\n#~ \"    let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.height(), 155.2);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_set_age() {\\n\"\n#~ \"    let mut bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.age(), 32);\\n\"\n#~ \"    bob.set_age(33);\\n\"\n#~ \"    assert_eq!(bob.age(), 33);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_visit() {\\n\"\n#~ \"    let mut bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2);\\n\"\n#~ \"    assert_eq!(bob.doctor_visits(), 0);\\n\"\n#~ \"    let report = bob.visit_doctor(Measurements {\\n\"\n#~ \"        height: 156.1,\\n\"\n#~ \"        blood_pressure: (120, 80),\\n\"\n#~ \"    });\\n\"\n#~ \"    assert_eq!(report.patient_name, \\\"Bob\\\");\\n\"\n#~ \"    assert_eq!(report.visit_count, 1);\\n\"\n#~ \"    assert_eq!(report.blood_pressure_change, None);\\n\"\n#~ \"\\n\"\n#~ \"    let report = bob.visit_doctor(Measurements {\\n\"\n#~ \"        height: 156.1,\\n\"\n#~ \"        blood_pressure: (115, 76),\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    assert_eq!(report.visit_count, 2);\\n\"\n#~ \"    assert_eq!(report.blood_pressure_change, Some((-5, -4)));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"Typowe typy słownictwa obejmują:\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"Typy [`Option` i `Result`](std/option-result.md): używane dla wartości \"\n#~ \"opcjonalnych i [obsługi błędów](error-handling.md).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"\"\n#~ \"[`String`](std/string.md): domyślny typ ciągu używany dla posiadanych \"\n#~ \"danych.\"\n\n#, fuzzy\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md): standardowy rozszerzalny wektor.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"\"\n#~ \"[`HashMap`](std/hashmap.md): typ mapy mieszającej z konfigurowalnym \"\n#~ \"haszowaniem algorytm.\"\n\n#, fuzzy\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"\"\n#~ \"[`Box`](std/box.md): własny wskaźnik dla danych przydzielonych na stercie.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"\"\n#~ \"[`Rc`](std/rc.md): współdzielony wskaźnik zliczania odwołań dla danych \"\n#~ \"alokowanych na stercie.\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` i `Result`\"\n\n#, fuzzy\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Typy reprezentują dane opcjonalne:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let numbers = vec![10, 20, 30];\\n\"\n#~ \"    let first: Option<&i8> = numbers.first();\\n\"\n#~ \"    println!(\\\"first: {first:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let idx: Result<usize, usize> = numbers.binary_search(&10);\\n\"\n#~ \"    println!(\\\"idx: {idx:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut vec = vec![10, 20];\\n\"\n#~ \"    vec.push(30);\\n\"\n#~ \"    println!(\\\"middle value: {}\\\", vec[vec.len() / 2]);\\n\"\n#~ \"    for item in vec.iter() {\\n\"\n#~ \"        println!(\\\"item: {item}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"`Option<&T>` ma zerowy narzut przestrzeni w porównaniu z `&T`.\"\n\n#, fuzzy\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` zwraca `Result<usize, use>`.\"\n\n#, fuzzy\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Jeśli zostanie znaleziony, `Result::Ok` zawiera indeks, w którym element \"\n#~ \"został znaleziony.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"W przeciwnym razie `Result::Err` zawiera indeks, w którym taki element \"\n#~ \"powinien zostać wstawiony.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"W powyższym przykładzie możesz nawet pominąć `*` w instrukcji `println!` \"\n#~ \"dzięki `Deref`.\"\n\n#, fuzzy\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Pudełko z rekurencyjnymi strukturami danych\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::rc::Rc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a = Rc::new(10);\\n\"\n#~ \"    let mut b = Rc::clone(&a);\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"a: {a}\\\");\\n\"\n#~ \"    println!(\\\"b: {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"Używając [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i \"\n#~ \"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), możesz \"\n#~ \"wyodrębnić źródła `u8`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::collections::HashSet;\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"W tym ćwiczeniu implementujesz komponent routingu serwera WWW. The serwer \"\n#~ \"jest skonfigurowany z liczbą _prefiksów ścieżki_, z którymi są \"\n#~ \"dopasowywane _zażądaj ścieżek_. Prefiksy ścieżki mogą zawierać symbol \"\n#~ \"wieloznaczny, który pasuje do pełnego segmentu. Zobacz testy jednostkowe \"\n#~ \"poniżej.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"\"\n#~ \"Cechy: wyprowadzanie cech, metody domyślne i ważna biblioteka standardowa \"\n#~ \"cechy.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"\"\n#~ \"Rodzaje: ogólne typy danych, metody ogólne, monomorfizacja i cecha \"\n#~ \"obiekty.\"\n\n#, fuzzy\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"\"\n#~ \"Testowanie: testy jednostkowe, testy dokumentacji i testy integracyjne.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"\"\n#~ \"Niebezpieczny Rust: surowe wskaźniki, zmienne statyczne, niebezpieczne \"\n#~ \"funkcje i extern Funkcje.\"\n\n#, fuzzy\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Możesz zadeklarować typ ogólny w swoim bloku `impl`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Kod ogólny jest przekształcany w kod nierodzajowy na podstawie witryn \"\n#~ \"wywołujących:\"\n\n#, fuzzy\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"zachowuje się tak, jakbyś napisał\"\n\n#, fuzzy\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"Możesz pozwolić kompilatorowi uzyskać szereg cech:\"\n\n#, fuzzy\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"Cechy mogą implementować zachowanie w kategoriach innych metod cech:\"\n\n#, fuzzy\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"`impl Trait` umożliwia pracę z typami, których nie można nazwać.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Ten przykład jest świetny, ponieważ dwukrotnie używa `impl Display`. \"\n#~ \"Pomaga to wyjaśnić nic tutaj nie wymusza, że jest to _ten sam_ typ `impl \"\n#~ \"Display`. Gdybyśmy użyli jednego `T: Display`, wymuszałoby ograniczenie, \"\n#~ \"że wejście `T` i zwracany typ `T` są tego samego typu. Nie zadziałałoby \"\n#~ \"to dla tej konkretnej funkcji, ponieważ typ, którego oczekujemy jako dane \"\n#~ \"wejściowe, prawdopodobnie nie co zwraca `format!`. Gdybyśmy chcieli \"\n#~ \"zrobić to samo za pomocą składni `: Display`, potrzebowalibyśmy dwóch \"\n#~ \"niezależne parametry ogólne.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"Przyjrzymy się teraz niektórym z najczęstszych cech standardowej \"\n#~ \"biblioteki Rust:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) i \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) używane w pętlach `for`,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) i [`Into`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) używane do \"\n#~ \"konwersji wartości,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) i [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) używane do IO,\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... używane do \"\n#~ \"przeciążania operatora i\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n#~ \"used to construct a default instance of a type.\"\n#~ msgstr \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n#~ \"używane do konstruowania domyślnej instancji typu.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"Implementy `Iteratora` `fn zbieraj<B>(ja) -> B Gdzie B: \"\n#~ \"FromIterator<Self::Item>, Własny: Wielkości`\"\n\n#, fuzzy\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Dodaj`, `Mul`, ...\"\n\n#, fuzzy\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Dzień 3: Ćwiczenia poranne\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"Zaprojektujemy klasyczną bibliotekę GUI cech i obiektów cech.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects.\"\n#~ msgstr \"\"\n#~ \"Zaprojektujmy klasyczną bibliotekę GUI, korzystając z naszej nowej wiedzy \"\n#~ \"na temat cech i obiekty cech.\"\n\n#, fuzzy\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"W naszej bibliotece będziemy mieć kilka widżetów:\"\n\n#, fuzzy\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Okno`: ma `tytuł` i zawiera inne widżety.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Button`: ma `etykietę` i funkcję wywołania zwrotnego, która jest \"\n#~ \"wywoływana, gdy przycisk jest wciśnięty.\"\n\n#, fuzzy\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Etykieta`: ma `etykietę`.\"\n\n#, fuzzy\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"Widżety zaimplementują cechę `Widget`, patrz poniżej.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Skopiuj poniższy kod na <https://play.rust-lang.org/>, uzupełnij \"\n#~ \"brakujące metody `draw_into`, aby zaimplementować cechę `Widget`:\"\n\n#, fuzzy\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"Wyjście powyższego programu może być czymś prostym, takim jak to:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Jeśli chcesz narysować wyrównany tekst, możesz użyć [wypełnienie/\"\n#~ \"wyrównanie](https://doc.rust-lang.org/std/fmt/index.html#wyrównanie) \"\n#~ \"operatory formatowania. W szczególności zwróć uwagę, jak możesz wypełnić \"\n#~ \"różne znaki (tutaj `'/'`) i jak możesz kontrolować wyrównanie:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Korzystając z takich sztuczek związanych z wyrównaniem, możesz na \"\n#~ \"przykład uzyskać takie dane wyjściowe:\"\n\n#, fuzzy\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Struktura wielokąta\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Stworzymy strukturę `Polygon` zawierającą kilka punktów. Skopiuj poniższy \"\n#~ \"kod na <https://play.rust-lang.org/> i uzupełnij brakujące metody, aby \"\n#~ \"utworzyć plik testy przechodzą:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Ponieważ w opisach problemów brakuje sygnatur metod, kluczowa część \"\n#~ \"ćwiczenia polega na ich prawidłowym określeniu. Nie musisz modyfikować \"\n#~ \"testów.\"\n\n#, fuzzy\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Inne ciekawe części ćwiczenia:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Wyprowadź cechę `Kopiuj` dla niektórych struktur, ponieważ w testach \"\n#~ \"metody czasami nie pożyczają swoich argumentów.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Odkryj, że cecha `Dodaj` musi zostać zaimplementowana, aby dwa obiekty \"\n#~ \"można było dodawać za pomocą „+”. Pamiętaj, że nie omawiamy leków \"\n#~ \"generycznych aż do dnia 3.\"\n\n#, fuzzy\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"Obsługa błędów w Rust odbywa się za pomocą jawnego przepływu sterowania:\"\n\n#, fuzzy\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"Funkcje, które mogą mieć błędy, wymieniają to w zwracanym typie,\"\n\n#, fuzzy\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Nie ma wyjątków.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Łapanie rozwijającego się stosu\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Widzieliśmy już enum `Result`. Jest to powszechnie stosowane, gdy \"\n#~ \"występują błędy spodziewane w ramach normalnej eksploatacji:\"\n\n#, fuzzy\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Propagowanie błędów za pomocą `?`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"Operator try `?` służy do zwracania błędów do obiektu wywołującego. \"\n#~ \"Pozwala się obrócić wspólne\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match some_expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err) => return Err(err),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match some_expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err) => return Err(err),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"some_expression?\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"jakieś_wyrażenie?\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"expression?\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"wyrażenie?\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err)  => return Err(From::from(err)),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match wyrażenie {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err)  => return Err(From::from(err)),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"Dobrą praktyką dla wszystkich typów błędów jest implementacja `std::\"\n#~ \"error::Error`, która wymaga `Debugowania` i `Wyświetlanie`. Generalnie \"\n#~ \"pomocne jest dla nich zaimplementowanie `Clone` i `Eq` tam, gdzie to \"\n#~ \"możliwe ułatwi życie testerom i konsumentom Twojej biblioteki. W tym \"\n#~ \"przypadku nie możemy tego łatwo zrobić, ponieważ `io::Error` nie \"\n#~ \"implementuje ich.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"Makro pochodne `thiserror` automatycznie implementuje `std::error::Error` \"\n#~ \"i opcjonalnie `Display` (jeśli podano atrybuty `#[error(...)]`) i `From` \"\n#~ \"(jeśli dodano atrybut `#[from]`). Działa również dla struktur.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"Nie wpływa na twój publiczny interfejs API, co czyni go dobrym dla \"\n#~ \"bibliotek.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"Powszechnie używana [mimo wszystko](https://docs.rs/anyhow/) skrzynka \"\n#~ \"może pomóc w dodaniu informacje kontekstowe do twoich błędów i pozwala \"\n#~ \"mieć ich mniej niestandardowe typy błędów:\"\n\n#, fuzzy\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Oznacz testy jednostkowe za pomocą `#[test]`:\"\n\n#, fuzzy\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"Użyj testu ładunku, aby znaleźć i uruchomić testy jednostkowe.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Testy jednostkowe są często umieszczane w zagnieżdżonym module \"\n#~ \"(uruchamiaj testy na [Plac zabaw](https://play.rust-lang.org/)):\"\n\n#, fuzzy\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Próbki kodu\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Funkcje z innych języków mogą naruszać gwarancje Rusta. Powołanie są więc \"\n#~ \"niebezpieczne:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::size_of_val;\\n\"\n#~ \"use std::slice;\\n\"\n#~ \"\\n\"\n#~ \"/// ...\\n\"\n#~ \"/// # Safety\\n\"\n#~ \"/// The type must have a defined representation and no padding.\\n\"\n#~ \"pub unsafe trait AsBytes {\\n\"\n#~ \"    fn as_bytes(&self) -> &[u8] {\\n\"\n#~ \"        unsafe {\\n\"\n#~ \"            slice::from_raw_parts(self as *const Self as *const u8, \"\n#~ \"size_of_val(self))\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// Safe because u32 has a defined representation and no padding.\\n\"\n#~ \"unsafe impl AsBytes for u32 {}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"/// ... /// # Bezpieczeństwo /// Typ musi mieć zdefiniowaną reprezentację \"\n#~ \"i brak dopełnienia. niebezpieczna cecha publikacji AsBytes { fn \"\n#~ \"as_bytes(&self) -> &\\\\[u8\\\\] { niebezpieczny { slice::from_raw_parts(self \"\n#~ \"jako \\\\*const Self as \\\\*const u8, size_of_val(self)) } } }\"\n\n#, fuzzy\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Dzień 3: Ćwiczenia popołudniowe\"\n\n#, fuzzy\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"Zbudujmy bezpieczne opakowanie do odczytu zawartości katalogu!\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Po obejrzeniu ćwiczenia możesz spojrzeć na podane [rozwiązanie](solutions-\"\n#~ \"afternoon.md).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"adb logcat -s rust\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"extern \\\"C\\\" {\\n\"\n#~ \"    fn abs(x: i32) -> i32;\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = -42;\\n\"\n#~ \"    let abs_x = unsafe { abs(x) };\\n\"\n#~ \"    println!(\\\"{x}, {abs_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 1;\\n\"\n#~ \"    let b = &a;\\n\"\n#~ \"    let a = a + 1;\\n\"\n#~ \"    println!(\\\"{a} {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```sh\\n\"\n#~ \"cargo embed --bin mmio\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```sh\\n\"\n#~ \"cargo embed --bin pac\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```sh\\n\"\n#~ \"cargo embed --bin hal\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \" server\"\n#~ msgstr \"serwery.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn foo() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    foo();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Cześć!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::scope(|scope| {\\n\"\n#~ \"        scope.spawn(|| {\\n\"\n#~ \"            println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"        });\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Cześć!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo add scraper\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo add thiserror\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo run --bin server\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo run --bin client\\n\"\n#~ \"```\"\n#~ msgstr \"Korzystanie z Cargo\"\n\n#, fuzzy\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Na kolejnych stronach znajdziesz rozwiązania ćwiczeń.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Zachęcamy do zadawania pytań dotyczących rozwiązań [on GitHub](https://\"\n#~ \"github.com/google/comprehensive-rust/discussions). Daj nam znać jeśli \"\n#~ \"masz inne lub lepsze rozwiązanie niż przedstawione tutaj.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Uwaga:** proszę zignorować `// ANCHOR: etykieta` i `// ANCHOR_END: \"\n#~ \"etykieta` komentarze, które widzisz w rozwiązaniach. Są po to, aby to \"\n#~ \"umożliwić ponownie wykorzystaj części rozwiązań jako ćwiczenia.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Dzień 1 Ćwiczenia poranne\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([powrót do ćwiczenia](for-loops.md))\"\n\n#, fuzzy\n#~ msgid \"Bonus question\"\n#~ msgstr \"Dodatkowe pytanie\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Wymaga bardziej zaawansowanych koncepcji. Mogłoby się wydawać, że \"\n#~ \"moglibyśmy użyć wycinka plasterków (`&[&[i32]]`) jako typu wejściowego do \"\n#~ \"transpozycji, a tym samym sprawić, by nasza funkcja obsługiwała dowolny \"\n#~ \"rozmiar macierzy. Jednak to szybko się psuje: zwracany typ nie może być \"\n#~ \"`&[&[i32]]`, ponieważ musi być właścicielem zwracanych danych.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Możesz spróbować użyć czegoś takiego jak `Vec<Vec<i32>>`, ale to też nie \"\n#~ \"działa od razu po wyjęciu z pudełka: trudno jest przekonwertować z \"\n#~ \"`Vec<Vec<i32>>` na `&[ &[i32]]`, więc teraz nie możesz też łatwo używać \"\n#~ \"`pretty_print`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"Gdy przejdziemy do cech i typów ogólnych, będziemy mogli użyć cechy \"\n#~ \"[`std::convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.\"\n#~ \"html) do abstrakcji na wszystkim, co można nazwać plasterkiem.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Ponadto sam typ nie wymuszałby, aby wycinki potomne były tej samej \"\n#~ \"długości, więc taka zmienna mogłaby zawierać nieprawidłową macierz.\"\n\n#, fuzzy\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"Dzień 1 Ćwiczenia popołudniowe\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([powrót do ćwiczenia](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"// Copyright 2022 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: luhn\\n\"\n#~ \"pub fn luhn(cc_number: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: luhn\\n\"\n#~ \"    let mut digits_seen = 0;\\n\"\n#~ \"    let mut sum = 0;\\n\"\n#~ \"    for (i, ch) in cc_number.chars().rev().filter(|&ch| ch != ' ').\"\n#~ \"enumerate() {\\n\"\n#~ \"        match ch.to_digit(10) {\\n\"\n#~ \"            Some(d) => {\\n\"\n#~ \"                sum += if i % 2 == 1 {\\n\"\n#~ \"                    let dd = d * 2;\\n\"\n#~ \"                    dd / 10 + dd % 10\\n\"\n#~ \"                } else {\\n\"\n#~ \"                    d\\n\"\n#~ \"                };\\n\"\n#~ \"                digits_seen += 1;\\n\"\n#~ \"            }\\n\"\n#~ \"            None => return false,\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    if digits_seen < 2 {\\n\"\n#~ \"        return false;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    sum % 10 == 0\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let cc_number = \\\"1234 5678 1234 5670\\\";\\n\"\n#~ \"    println!(\\n\"\n#~ \"        \\\"Is {cc_number} a valid credit card number? {}\\\",\\n\"\n#~ \"        if luhn(cc_number) { \\\"yes\\\" } else { \\\"no\\\" }\\n\"\n#~ \"    );\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_non_digit_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"foo\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_empty_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"\\\"));\\n\"\n#~ \"    assert!(!luhn(\\\" \\\"));\\n\"\n#~ \"    assert!(!luhn(\\\"  \\\"));\\n\"\n#~ \"    assert!(!luhn(\\\"    \\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_single_digit_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"0\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_two_digit_cc_number() {\\n\"\n#~ \"    assert!(luhn(\\\" 0 0 \\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_valid_cc_number() {\\n\"\n#~ \"    assert!(luhn(\\\"4263 9826 4026 9299\\\"));\\n\"\n#~ \"    assert!(luhn(\\\"4539 3195 0343 6467\\\"));\\n\"\n#~ \"    assert!(luhn(\\\"7992 7398 713\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_invalid_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"4223 9826 4026 9299\\\"));\\n\"\n#~ \"    assert!(!luhn(\\\"4539 3195 0343 6476\\\"));\\n\"\n#~ \"    assert!(!luhn(\\\"8273 1232 7352 0569\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"// ANCHOR_END: unit-tests\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"\\n\"\n#~ \"# Dzień 2 Ćwiczenia popołudniowe\\n\"\n#~ \"\\n\"\n#~ \"## Algorytm Luhna\\n\"\n#~ \"\\n\"\n#~ \"([powrót do ćwiczenia](luhn.md))\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: luhn\\n\"\n#~ \"pub fn luhn(cc_number: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: luhn\\n\"\n#~ \"    let mut digits_seen = 0;\\n\"\n#~ \"    let mut sum = 0;\\n\"\n#~ \"    for (i, ch) in cc_number.chars().rev().filter(|&ch| ch != ' ').\"\n#~ \"enumerate() {\\n\"\n#~ \"        match ch.to_digit(10) {\\n\"\n#~ \"            Some(d) => {\\n\"\n#~ \"                sum += if i % 2 == 1 {\\n\"\n#~ \"                    let dd = d * 2;\\n\"\n#~ \"                    dd / 10 + dd % 10\\n\"\n#~ \"                } else {\\n\"\n#~ \"                    d\\n\"\n#~ \"                };\\n\"\n#~ \"                digits_seen += 1;\\n\"\n#~ \"            }\\n\"\n#~ \"            None => return false,\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    if digits_seen < 2 {\\n\"\n#~ \"        return false;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    sum % 10 == 0\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let cc_number = \\\"1234 5678 1234 5670\\\";\\n\"\n#~ \"    println!(\\n\"\n#~ \"        \\\"Czy {} to prawidłowy numer karty kredytowej? {}\\\",\\n\"\n#~ \"        cc_number,\\n\"\n#~ \"        if luhn(cc_number) { \\\"tak\\\" } else { \\\"nie\\\" }\\n\"\n#~ \"    );\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_non_digit_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"foo\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"## Łańcuchy i iteratory\\n\"\n#~ \"\\n\"\n#~ \"([powrót do ćwiczenia](strings-iterators.md))\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: prefix_matches\\n\"\n#~ \"pub fn prefix_matches(prefix: &str, request_path: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: prefix_matches\\n\"\n#~ \"    let prefixes = prefix.split('/');\\n\"\n#~ \"    let request_paths = request_path\\n\"\n#~ \"        .split('/')\\n\"\n#~ \"        .map(|p| Some(p))\\n\"\n#~ \"        .chain(std::iter::once(None));\\n\"\n#~ \"\\n\"\n#~ \"    for (prefix, request_path) in prefixes.zip(request_paths) {\\n\"\n#~ \"        match request_path {\\n\"\n#~ \"            Some(request_path) => {\\n\"\n#~ \"                if (prefix != \\\"*\\\") && (prefix != request_path) {\\n\"\n#~ \"                    return false;\\n\"\n#~ \"                }\\n\"\n#~ \"            }\\n\"\n#~ \"            None => return false,\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    true\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_without_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/\"\n#~ \"abc-123\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/\"\n#~ \"books\\\"));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/\"\n#~ \"publishersBooks\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/parent/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_with_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/bar/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books/book1\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers/*/books\\\", \\\"/v1/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/booksByAuthor\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"}\\n\"\n#~ \"// ANCHOR_END: unit-tests\\n\"\n#~ \"\\n\"\n#~ \"fn main() {}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Dopasowywanie wzorców\"\n\n#, fuzzy\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"Dzień 2 Ćwiczenia poranne\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Projektowanie biblioteki\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([powrót do ćwiczenia](book-library.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([powrót do ćwiczenia](strings-iterators.md))\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"// Copyright 2022 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: prefix_matches\\n\"\n#~ \"pub fn prefix_matches(prefix: &str, request_path: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: prefix_matches\\n\"\n#~ \"\\n\"\n#~ \"    let mut request_segments = request_path.split('/');\\n\"\n#~ \"\\n\"\n#~ \"    for prefix_segment in prefix.split('/') {\\n\"\n#~ \"        let Some(request_segment) = request_segments.next() else {\\n\"\n#~ \"            return false;\\n\"\n#~ \"        };\\n\"\n#~ \"        if request_segment != prefix_segment && prefix_segment != \"\n#~ \"\\\"*\\\" {\\n\"\n#~ \"            return false;\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    true\\n\"\n#~ \"\\n\"\n#~ \"    // Alternatively, Iterator::zip() lets us iterate simultaneously over \"\n#~ \"prefix\\n\"\n#~ \"    // and request segments. The zip() iterator is finished as soon as \"\n#~ \"one of\\n\"\n#~ \"    // the source iterators is finished, but we need to iterate over all \"\n#~ \"request\\n\"\n#~ \"    // segments. A neat trick that makes zip() work is to use map() and \"\n#~ \"chain()\\n\"\n#~ \"    // to produce an iterator that returns Some(str) for each pattern \"\n#~ \"segments,\\n\"\n#~ \"    // and then returns None indefinitely.\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_without_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/\"\n#~ \"abc-123\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/\"\n#~ \"books\\\"));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/\"\n#~ \"publishersBooks\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/parent/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_with_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/bar/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books/book1\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers/*/books\\\", \\\"/v1/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/booksByAuthor\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"}\\n\"\n#~ \"// ANCHOR_END: unit-tests\\n\"\n#~ \"\\n\"\n#~ \"fn main() {}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"\\n\"\n#~ \"# Dzień 2 Ćwiczenia popołudniowe\\n\"\n#~ \"\\n\"\n#~ \"## Algorytm Luhna\\n\"\n#~ \"\\n\"\n#~ \"([powrót do ćwiczenia](luhn.md))\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: luhn\\n\"\n#~ \"pub fn luhn(cc_number: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: luhn\\n\"\n#~ \"    let mut digits_seen = 0;\\n\"\n#~ \"    let mut sum = 0;\\n\"\n#~ \"    for (i, ch) in cc_number.chars().rev().filter(|&ch| ch != ' ').\"\n#~ \"enumerate() {\\n\"\n#~ \"        match ch.to_digit(10) {\\n\"\n#~ \"            Some(d) => {\\n\"\n#~ \"                sum += if i % 2 == 1 {\\n\"\n#~ \"                    let dd = d * 2;\\n\"\n#~ \"                    dd / 10 + dd % 10\\n\"\n#~ \"                } else {\\n\"\n#~ \"                    d\\n\"\n#~ \"                };\\n\"\n#~ \"                digits_seen += 1;\\n\"\n#~ \"            }\\n\"\n#~ \"            None => return false,\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    if digits_seen < 2 {\\n\"\n#~ \"        return false;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    sum % 10 == 0\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let cc_number = \\\"1234 5678 1234 5670\\\";\\n\"\n#~ \"    println!(\\n\"\n#~ \"        \\\"Czy {} to prawidłowy numer karty kredytowej? {}\\\",\\n\"\n#~ \"        cc_number,\\n\"\n#~ \"        if luhn(cc_number) { \\\"tak\\\" } else { \\\"nie\\\" }\\n\"\n#~ \"    );\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_non_digit_cc_number() {\\n\"\n#~ \"    assert!(!luhn(\\\"foo\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"## Łańcuchy i iteratory\\n\"\n#~ \"\\n\"\n#~ \"([powrót do ćwiczenia](strings-iterators.md))\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: prefix_matches\\n\"\n#~ \"pub fn prefix_matches(prefix: &str, request_path: &str) -> bool {\\n\"\n#~ \"    // ANCHOR_END: prefix_matches\\n\"\n#~ \"    let prefixes = prefix.split('/');\\n\"\n#~ \"    let request_paths = request_path\\n\"\n#~ \"        .split('/')\\n\"\n#~ \"        .map(|p| Some(p))\\n\"\n#~ \"        .chain(std::iter::once(None));\\n\"\n#~ \"\\n\"\n#~ \"    for (prefix, request_path) in prefixes.zip(request_paths) {\\n\"\n#~ \"        match request_path {\\n\"\n#~ \"            Some(request_path) => {\\n\"\n#~ \"                if (prefix != \\\"*\\\") && (prefix != request_path) {\\n\"\n#~ \"                    return false;\\n\"\n#~ \"                }\\n\"\n#~ \"            }\\n\"\n#~ \"            None => return false,\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    true\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// ANCHOR: unit-tests\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_without_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/\"\n#~ \"abc-123\\\"));\\n\"\n#~ \"    assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/\"\n#~ \"books\\\"));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/\"\n#~ \"publishersBooks\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/parent/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_matches_with_wildcard() {\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/bar/books\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"    assert!(prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/books/book1\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"\\n\"\n#~ \"    assert!(!prefix_matches(\\\"/v1/publishers/*/books\\\", \\\"/v1/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"    assert!(!prefix_matches(\\n\"\n#~ \"        \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"        \\\"/v1/publishers/foo/booksByAuthor\\\"\\n\"\n#~ \"    ));\\n\"\n#~ \"}\\n\"\n#~ \"// ANCHOR_END: unit-tests\\n\"\n#~ \"\\n\"\n#~ \"fn main() {}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"Dzień 3 Poranna gimnastyka\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([powrót do ćwiczenia](simple-gui.md))\"\n\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([powrót do ćwiczenia](points-polygons.md))\"\n\n#, fuzzy\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"Dzień 3 Ćwiczenia popołudniowe\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([powrót do ćwiczenia](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Day 4 Morning\"\n#~ msgstr \"Dzień 4 Rano\"\n\n#~ msgid \"On Day 4, we will cover Android-specific things such as:\"\n#~ msgstr \"W dniu 4 omówimy kwestie specyficzne dla Androida, takie jak:\"\n\n#~ msgid \"AIDL servers and clients.\"\n#~ msgstr \"Serwery i klienty AIDL.\"\n\n#~ msgid \"Interoperability with C, C++, and Java.\"\n#~ msgstr \"Interoperacyjność z C, C++ i Javą.\"\n\n#~ msgid \"\"\n#~ \"It is important to note that this course does not cover Android \"\n#~ \"**application**  development in Rust, and that the Android-specific parts \"\n#~ \"are specifically about writing code for Android itself, the operating \"\n#~ \"system. \"\n#~ msgstr \"\"\n#~ \"Należy zauważyć, że ten kurs nie obejmuje rozwoju **aplikacji** na \"\n#~ \"Androida w Ruście i że części specyficzne dla Androida są o pisaniu kodu \"\n#~ \"dla samego Androida, systemu operacyjnego. \"\n\n#~ msgid \"\"\n#~ \"Learn how to use async Rust --- we'll only mention async Rust when \"\n#~ \"covering traditional concurrency primitives. Please see [Asynchronous \"\n#~ \"Programming in Rust](https://rust-lang.github.io/async-book/) instead for \"\n#~ \"details on this topic.\"\n#~ msgstr \"\"\n#~ \"Używanie asynchronicznego Rusta --- wspomnimy o asynchronicznym Ruście \"\n#~ \"tylko wtedy, gdy obejmujące tradycyjne prymitywy współbieżności. Po \"\n#~ \"więcej szczegółów w tym temacie zobacz [Asynchronous Programming in Rust]\"\n#~ \"(https://rust-lang.github.io/async-book/).\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"Dzień 1: Podstawowy Rust, własność i nadzorca pożyczania.\"\n\n#~ msgid \"Day 4: Concurrency in Rust and interoperability with other languages\"\n#~ msgstr \"\"\n#~ \"Dzień 4: Współbieżność w Ruście i interoperacyjność z innymi językami\"\n\n#~ msgid \"\"\n#~ \"**Exercise for Day 4:** Do you interface with some C/C++ code in your \"\n#~ \"project which we could attempt to move to Rust? The fewer dependencies \"\n#~ \"the better. Parsing code would be ideal.\"\n#~ msgstr \"\"\n#~ \"**Ćwiczenie na dzień 4:** Czy korzystasz z kodu C/C++ w swoim projekcie, \"\n#~ \"który moglibyśmy spróbować przenieść do Rusta? Im mniej zależności, tym \"\n#~ \"lepiej. Kod parsujący byłby idealny.\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (zalecane)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rustup.rs/) \"\n#~ \"tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Możesz postępować zgodnie z instrukcjami narzędzia [rustup](https://\"\n#~ \"rustup.rs/), aby zainstalować Cargo, kompilator Rusta oraz inne \"\n#~ \"standardowe narzędzia ekosystemu Rusta. Narzędzie [rustup](https://rustup.\"\n#~ \"rs/) jest utrzymywane przez Fundację Rust.\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"Menedżerowie pakietów\"\n\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n\n#~ msgid \"`&[u8]`\"\n#~ msgstr \"`&[u8]`\"\n\n#~ msgid \"`b\\\"abc\\\"`, `br#\\\" \\\" \\\"#`\"\n#~ msgstr \"`b\\\"abc\\\"`, `br#\\\" \\\"\\\"#`\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let s: &[i32] = &a[2..4];\\n\"\n#~ \"println!(\\\"s: {s:?}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let s: &[i32] = &a[2..4];\\n\"\n#~ \"println!(\\\"s: {s:?}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"}\"\n#~ msgstr \"}\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: &str = \\\"World\\\";\\n\"\n#~ \"    println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: &str = \\\"Świecie\\\";\\n\"\n#~ \"    println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    fizzbuzz_to(20);   // Defined below, no forward declaration needed\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    fizzbuzz_to(20);   // Zdefiniowany poniżej, nie ma potrzeby na \"\n#~ \"deklarowanie z góry\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn fizzbuzz(n: u32) -> () {  // No return value means returning the unit \"\n#~ \"type `()` match (is_divisible_by(n, 3), is_divisible_by(n, 5)) { (true,  \"\n#~ \"true)  => println!(\\\"fizzbuzz\\\"), (true,  false) => println!(\\\"fizz\\\"), \"\n#~ \"(false, true)  => println!(\\\"buzz\\\"), (false, false) => println!\"\n#~ \"(\\\"{n}\\\"), } }\"\n#~ msgstr \"\"\n#~ \"fn fizzbuzz(n: u32) -> () { // Brak wartości zwracanej oznacza zwrócenie \"\n#~ \"typu jednostkowego `()` match (is_divisible_by(n, 3), is_divisible_by(n, \"\n#~ \"5)) { (true, true) => println!(\\\"fizzbuzz\\\"), (true, false) => println!\"\n#~ \"(\\\"fizz\\\"), (false, true) => println!(\\\"buzz\\\"), (false, false) => \"\n#~ \"println!(\\\"{n}\\\"), } }\"\n\n#~ msgid \"\"\n#~ \"fn fizzbuzz_to(n: u32) {  // `-> ()` is normally omitted for i in 1..=n \"\n#~ \"{ fizzbuzz(i); } }\"\n#~ msgstr \"\"\n#~ \"fn fizzbuzz_to(n: u32) {  // `-> ()` jest zwykle pomijany for i in 1..=n \"\n#~ \"{ fizzbuzz(i); } }\"\n\n#~ msgid \"\"\n#~ \"The `match` expression in `fizzbuzz()` is doing a lot of work. It is \"\n#~ \"expanded below to show what is happening.\"\n#~ msgstr \"\"\n#~ \"Wyrażenie `match` w `fizzbuzz()` wykonuje wiele pracy. Jest rozwinięte \"\n#~ \"poniżej żeby pokazać co się dzieje.\"\n\n#~ msgid \"(Type annotations added for clarity, but they can be elided.)\"\n#~ msgstr \"(Adnotacje typów dodane dla przejrzystości, ale można je pominąć.)\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"let by_3: bool = is_divisible_by(n, 3);\\n\"\n#~ \"let by_5: bool = is_divisible_by(n, 5);\\n\"\n#~ \"let by_35: (bool, bool) = (by_3, by_5);\\n\"\n#~ \"match by_35 {\\n\"\n#~ \"  // ...\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"let by_3: bool = is_divisible_by(n, 3);\\n\"\n#~ \"let by_5: bool = is_divisible_by(n, 5);\\n\"\n#~ \"let by_35: (bool, bool) = (by_3, by_5);\\n\"\n#~ \"match by_35 {\\n\"\n#~ \"  // ...\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Rectangle {\\n\"\n#~ \"    width: u32,\\n\"\n#~ \"    height: u32,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Rectangle {\\n\"\n#~ \"    width: u32,\\n\"\n#~ \"    height: u32,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"impl Rectangle { fn area(&self) -> u32 { self.width * self.height }\"\n#~ msgstr \"impl Rectangle { fn area(&self) -> u32 { self.width * self.height }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn inc_width(&mut self, delta: u32) {\\n\"\n#~ \"    self.width += delta;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn inc_width(&mut self, delta: u32) {\\n\"\n#~ \"    self.width += delta;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let mut rect = Rectangle { width: 10, height: 5 }; println!\"\n#~ \"(\\\"old area: {}\\\", rect.area()); rect.inc_width(5); println!(\\\"new area: \"\n#~ \"{}\\\", rect.area()); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let mut rect = Rectangle { width: 10, height: 5 }; println!\"\n#~ \"(\\\"stare pole: {}\\\", rect.area()); rect.inc_width(5); println!(\\\"nowe \"\n#~ \"pole: {}\\\", rect.area()); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercises, you can look at the \\\\[solutions\\\\] \"\n#~ \"provided.\"\n#~ msgstr \"\"\n#~ \"Po obejrzeniu ćwiczeń możesz spojrzeć na dostarczone \\\\[rozwiązania\\\\].\"\n\n#~ msgid \"fn main() { let x: i8 = 15; let y: i16 = 1000;\"\n#~ msgstr \"fn main() { let x: i8 = 15; let y: i16 = 1000;\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"{x} * {y} = {}\\\", multiply(x, y));\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"{x} * {y} = {}\\\", multiply(x, y));\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"for i in 0..3 {\\n\"\n#~ \"    print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"}\\n\"\n#~ \"println!();\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"print!(\\\"Iterowanie po zakresie:\\\");\\n\"\n#~ \"for i in 0..3 {\\n\"\n#~ \"    print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"}\\n\"\n#~ \"println!();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: usuń to jak skończysz implementację.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn transpose(matrix: \\\\[\\\\[i32; 3\\\\]; 3\\\\]) -> \\\\[\\\\[i32; 3\\\\]; 3\\\\] \"\n#~ \"{ unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"fn transpose(matrix: \\\\[\\\\[i32; 3\\\\]; 3\\\\]) -> \\\\[\\\\[i32; 3\\\\]; 3\\\\] \"\n#~ \"{ unimplemented!() }\"\n\n#~ msgid \"fn pretty_print(matrix: &\\\\[\\\\[i32; 3\\\\]; 3\\\\]) { unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"fn pretty_print(matrix: &\\\\[\\\\[i32; 3\\\\]; 3\\\\]) { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let matrix = \\\\[ \\\\[101, 102, 103\\\\], // \\\\<\\\\-- the comment \"\n#~ \"makes rustfmt add a newline \\\\[201, 202, 203\\\\], \\\\[301, 302, 303\\\\], \\\\];\"\n#~ msgstr \"\"\n#~ \"fn main() { let matrix = \\\\[ \\\\[101, 102, 103\\\\], // \\\\<\\\\-- ten \"\n#~ \"komentarz powoduje, że rustfmt dodaje nową linię \\\\[201, 202, 203\\\\], \"\n#~ \"\\\\[301, 302, 303\\\\], \\\\];\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"matrix:\\\");\\n\"\n#~ \"pretty_print(&matrix);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"matrix:\\\");\\n\"\n#~ \"pretty_print(&matrix);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let transposed = transpose(matrix);\\n\"\n#~ \"println!(\\\"transposed:\\\");\\n\"\n#~ \"pretty_print(&transposed);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let transposed = transpose(matrix);\\n\"\n#~ \"println!(\\\"transposed:\\\");\\n\"\n#~ \"pretty_print(&transposed);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Note that since `println!` is a macro, `x` is not moved, even using the \"\n#~ \"function like syntax of `println!(\\\"x: {}\\\", x)`\"\n#~ msgstr \"\"\n#~ \"Zauważ, że ponieważ `println!` jest makrem, `x` nie jest przenoszone, \"\n#~ \"nawet przy użyciu składni podobnej do funkcji `println!(\\\"x: {}\\\", x)`\"\n\n#~ msgid \"fn takes_i8(y: i8) { println!(\\\"i8: {y}\\\"); }\"\n#~ msgstr \"fn takes_i8(y: i8) { println!(\\\"i8: {y}\\\"); }\"\n\n#~ msgid \"fn main() { let x = 10; let y = 20;\"\n#~ msgstr \"fn main() { let x = 10; let y = 20;\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"takes_u32(x);\\n\"\n#~ \"takes_i8(y);\\n\"\n#~ \"// takes_u32(y);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"takes_u32(x);\\n\"\n#~ \"takes_i8(y);\\n\"\n#~ \"// takes_u32(y);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let vv = v.iter().collect::<std::collections::HashSet<_>>();\\n\"\n#~ \"println!(\\\"vv: {vv:?}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let vv = v.iter().collect::<std::collections::HashSet<_>>();\\n\"\n#~ \"println!(\\\"vv: {vv:?}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"Global state is managed with static and constant variables.\"\n#~ msgstr \"\"\n#~ \"Stan globalny jest zarządzany za pomocą zmiennych statycznych i stałych.\"\n\n#~ msgid \"You can declare compile-time constants:\"\n#~ msgstr \"Możesz zadeklarować stałe czasu kompilacji:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"const DIGEST_SIZE: usize = 3;\\n\"\n#~ \"const ZERO: Option<u8> = Some(42);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"const DIGEST_SIZE: usize = 3;\\n\"\n#~ \"const ZERO: Option<u8> = Some(42);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let digest = compute_digest(\\\"Hello\\\"); println!(\\\"Digest: \"\n#~ \"{digest:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let digest = compute_digest(\\\"Hello\\\"); println!(\\\"Digest: \"\n#~ \"{digest:?}\\\"); }\"\n\n#~ msgid \"You can also declare static variables:\"\n#~ msgstr \"Możesz także zadeklarować zmienne statyczne:\"\n\n#~ msgid \"fn main() { println!(\\\"{BANNER}\\\"); }\"\n#~ msgstr \"fn main() { println!(\\\"{BANNER}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"We will look at mutating static data in the [chapter on Unsafe Rust](../\"\n#~ \"unsafe.md).\"\n#~ msgstr \"\"\n#~ \"Przyjrzymy się zmienianiu danych statycznych w [rozdziale dotyczącym \"\n#~ \"niebezpiecznego Rusta](../unsafe.md).\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"{\\n\"\n#~ \"    let a = \\\"hello\\\";\\n\"\n#~ \"    println!(\\\"inner scope: {a}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"{\\n\"\n#~ \"    let a = \\\"cześć\\\";\\n\"\n#~ \"    println!(\\\"wewnętrzny zakres: {a}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let a = true;\\n\"\n#~ \"    println!(\\\"shadowed in inner scope: {a}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let a = true;\\n\"\n#~ \"    println!(\\\"przesłonięta w wewnętrznym zakresie: {a}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"Potencjalne użycie po zwolnieniu.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { { let p = Point(3, 4); println!(\\\"x: {}\\\", p.0); } println!\"\n#~ \"(\\\"y: {}\\\", p.1); }\"\n#~ msgstr \"\"\n#~ \"fn main() { { let p = Point(3, 4); println!(\\\"x: {}\\\", p.0); } println!\"\n#~ \"(\\\"y: {}\\\", p.1); }\"\n\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"Dane są _przeniesione_ z `s1` i zmienna `s1` nie jest już dostępna.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Cześć {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Copy, Clone, Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Copy, Clone, Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = p1; println!(\\\"p1: {p1:?}\\\"); \"\n#~ \"println!(\\\"p2: {p2:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = p1; println!(\\\"p1: {p1:?}\\\"); \"\n#~ \"println!(\\\"p2: {p2:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point { Point(p1.0 + p2.0, p1.1 + \"\n#~ \"p2.1) }\"\n#~ msgstr \"\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point { Point(p1.0 + p2.0, p1.1 + \"\n#~ \"p2.1) }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point { let p = Point(p1.0 + p2.0, p1.1 \"\n#~ \"+ p2.1); println!(\\\"&p.0: {:p}\\\", &p.0); p }\"\n#~ msgstr \"\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point { let p = Point(p1.0 + p2.0, p1.1 \"\n#~ \"+ p2.1); println!(\\\"&p.0: {:p}\\\", &p.0); p }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"&p3.0: {:p}\\\", &p3.0); println!(\\\"{p1:?} + \"\n#~ \"{p2:?} = {p3:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let p1 = Point(3, 4); let p2 = Point(10, 20); let p3 = \"\n#~ \"add(&p1, &p2); println!(\\\"&p3.0: {:p}\\\", &p3.0); println!(\\\"{p1:?} + \"\n#~ \"{p2:?} = {p3:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: i32 = 10;\\n\"\n#~ \"    let b: &i32 = &a;\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: i32 = 10;\\n\"\n#~ \"    let b: &i32 = &a;\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"{\\n\"\n#~ \"    let c: &mut i32 = &mut a;\\n\"\n#~ \"    *c = 20;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"{\\n\"\n#~ \"    let c: &mut i32 = &mut a;\\n\"\n#~ \"    *c = 20;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"a: {a}\\\");\\n\"\n#~ \"println!(\\\"b: {b}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"println!(\\\"a: {a}\\\");\\n\"\n#~ \"println!(\\\"b: {b}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn left_most\\\\<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point { if p1.0 \"\n#~ \"\\\\< p2.0 { p1 } else { p2 } }\"\n#~ msgstr \"\"\n#~ \"fn left_most\\\\<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point { if p1.0 \"\n#~ \"\\\\< p2.0 { p1 } else { p2 } }\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"```\"\n\n#~ msgid \"fn erase(text: String) { println!(\\\"Bye {text}!\\\"); }\"\n#~ msgstr \"fn erase(text: String) { println!(\\\"Bye {text}!\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"\\n\"\n#~ \"# Lifetimes in Data Structures\\n\"\n#~ \"\\n\"\n#~ \"If a data type stores borrowed data, it must be annotated with a \"\n#~ \"lifetime:\\n\"\n#~ \"\\n\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"<details>\\n\"\n#~ \"\\n\"\n#~ \"* In the above example, the annotation on `Highlight` enforces that the \"\n#~ \"data underlying the contained `&str` lives at least as long as any \"\n#~ \"instance of `Highlight` that uses that data.\\n\"\n#~ \"* If `text` is consumed before the end of the lifetime of `fox` (or \"\n#~ \"`dog`), the borrow checker throws an error.\\n\"\n#~ \"* Types with borrowed data force users to hold on to the original data. \"\n#~ \"This can be useful for creating lightweight views, but it generally makes \"\n#~ \"them somewhat harder to use.\\n\"\n#~ \"* When possible, make data structures own their data directly.\\n\"\n#~ \"* Some structs with multiple references inside can have more than one \"\n#~ \"lifetime annotation. This can be necessary if there is a need to describe \"\n#~ \"lifetime relationships between the references themselves, in addition to \"\n#~ \"the lifetime of the struct itself. Those are very advanced use cases.\\n\"\n#~ \"</details>\\n\"\n#~ \"\\n\"\n#~ \"# Lifetimes in Data Structures\\n\"\n#~ \"\\n\"\n#~ \"If a data type stores borrowed data, it must be annotated with a \"\n#~ \"lifetime:\\n\"\n#~ \"\\n\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"\\n\"\n#~ \"# Czasy życia w strukturach danych\\n\"\n#~ \"\\n\"\n#~ \"Jeżeli typ danych przechowuje pożyczone dane, to muszą one mieć adnotcję \"\n#~ \"czasu życia:\\n\"\n#~ \"\\n\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"<details>\\n\"\n#~ \"\\n\"\n#~ \"* W powyższym przykładzie, adnotacja na `Highlight` wymaga żeby dane w \"\n#~ \"zawartym `&str` żyły co najmniej tak długo jak instancja `Highlight`, \"\n#~ \"która używa tych danych.\\n\"\n#~ \"* Jeżeli `text` jest skonsumowany przed końcem życia `fox` (lub `dog`), \"\n#~ \"to nadzorca pożyczania pokaże błąd.\\n\"\n#~ \"* Typy z pożyczonymi danymi wymagają od użytkowników utrzymywania \"\n#~ \"oryginalnych danych. Jest to przydatne przy tworzeniu lekkich widoków, \"\n#~ \"ale generalnie powoduje, że są trudniejsze w użyciu.\\n\"\n#~ \"* Jeżeli możliwe twórz struktury danych, które bezpośrednio są \"\n#~ \"właścicielami swoich danych.\\n\"\n#~ \"* Niektóre struktury z wieloma referencjami mogą mieć więcej niż jedną \"\n#~ \"adnotację cyklu życia. To może być potrzebne jeżeli potrzebujesz opisać \"\n#~ \"relację cyklu życia pomiędzy referencjami w dodatku do cyklu życia samej \"\n#~ \"struktury. Są to bardzo zaawansowane przypadki użycia.\\n\"\n#~ \"</details>\\n\"\n#~ \"\\n\"\n#~ \"# Lifetimes in Data Structures\\n\"\n#~ \"\\n\"\n#~ \"If a data type stores borrowed data, it must be annotated with a \"\n#~ \"lifetime:\\n\"\n#~ \"\\n\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"A small book library,\"\n#~ msgstr \"Mała biblioteczka,\"\n\n#, fuzzy\n#~ msgid \"Iterators and ownership (hard).\"\n#~ msgstr \"Iteratory i własność (trudne).\"\n\n#~ msgid \"struct Library { books: Vec\"\n#~ msgstr \"struct Library { books: Vec\"\n\n#~ msgid \", }\"\n#~ msgstr \", }\"\n\n#~ msgid \"struct Book { title: String, year: u16, }\"\n#~ msgstr \"struct Book { title: String, year: u16, }\"\n\n#~ msgid \"\"\n#~ \"impl Book { // This is a constructor, used below. fn new(title: &str, \"\n#~ \"year: u16) -> Book { Book { title: String::from(title), year, } } }\"\n#~ msgstr \"\"\n#~ \"impl Book { // To jest konstruktor używany poniżej. fn new(title: &str, \"\n#~ \"year: u16) -> Book { Book { title: String::from(title), year, } } }\"\n\n#~ msgid \"\"\n#~ \"// This makes it possible to print Book values with {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } }\"\n#~ msgstr \"\"\n#~ \"// Umożliwia to drukowanie wartości Book za pomocą {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } }\"\n\n#~ msgid \"impl Library { fn new() -> Library { unimplemented!() }\"\n#~ msgstr \"impl Library { fn new() -> Library { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"//fn len(self) -> usize {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"//fn len(self) -> usize {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"//fn is_empty(self) -> bool {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"//fn is_empty(self) -> bool {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"//fn add_book(self, book: Book) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"//fn add_book(self, book: Book) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"//fn print_books(self) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"//fn print_books(self) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"//fn oldest_book(self) -> Option<&Book> {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"//fn oldest_book(self) -> Option<&Book> {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<i8> = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.iter();\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<i8> = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.iter();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let v0: Option<..> = iter.next();\\n\"\n#~ \"println!(\\\"v0: {v0:?}\\\");\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let v0: Option<..> = iter.next();\\n\"\n#~ \"println!(\\\"v0: {v0:?}\\\");\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn into_iter(self) -> Self::IntoIter;\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn into_iter(self) -> Self::IntoIter;\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<String> = vec![String::from(\\\"foo\\\"), String::\"\n#~ \"from(\\\"bar\\\")];\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v: Vec<String> = vec![String::from(\\\"foo\\\"), String::\"\n#~ \"from(\\\"bar\\\")];\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"for word in &v {\\n\"\n#~ \"    println!(\\\"word: {word}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"for word in &v {\\n\"\n#~ \"    println!(\\\"word: {word}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"for word in v {\\n\"\n#~ \"    println!(\\\"word: {word}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"for word in v {\\n\"\n#~ \"    println!(\\\"word: {word}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let mut peter = Person { name: String::from(\\\"Peter\\\"), age: \"\n#~ \"27, }; println!(\\\"{} is {} years old\\\", peter.name, peter.age);\"\n#~ msgstr \"\"\n#~ \"fn main() { let mut peter = Person { name: String::from(\\\"Peter\\\"), age: \"\n#~ \"27, }; println!(\\\"{} ma {} lat\\\", peter.name, peter.age);\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct PoundOfForce(f64);\\n\"\n#~ \"struct Newtons(f64);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct PoundOfForce(f64);\\n\"\n#~ \"struct Newtons(f64);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn compute_thruster_force() -> PoundOfForce { todo!(\\\"Ask a rocket \"\n#~ \"scientist at NASA\\\") }\"\n#~ msgstr \"\"\n#~ \"fn compute_thruster_force() -> PoundOfForce { todo!(\\\"Zapytaj naukowca \"\n#~ \"rakietowego z NASA\\\") }\"\n\n#~ msgid \"fn set_thruster_force(force: Newtons) { // ... }\"\n#~ msgstr \"fn set_thruster_force(force: Newtons) { // ... }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let force = compute_thruster_force(); \"\n#~ \"set_thruster_force(force); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let force = compute_thruster_force(); \"\n#~ \"set_thruster_force(force); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Person {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    age: u8,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"impl Person { fn new(name: String, age: u8) -> Person { Person { name, \"\n#~ \"age } } }\"\n#~ msgstr \"\"\n#~ \"impl Person { fn new(name: String, age: u8) -> Person { Person { name, \"\n#~ \"age } } }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let peter = Person::new(String::from(\\\"Peter\\\"), 27); println!\"\n#~ \"(\\\"{peter:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let peter = Person::new(String::from(\\\"Peter\\\"), 27); println!\"\n#~ \"(\\\"{peter:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    4  // Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    4  // Wyznaczone rzutem kości. Gwarantowana losowość.\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\\\\#\\\\[derive(Debug)\\\\] enum CoinFlip { Heads, Tails, }\"\n#~ msgstr \"\\\\#\\\\[derive(Debug)\\\\] enum CoinFlip { Heads, Tails, }\"\n\n#~ msgid \"\"\n#~ \"fn flip_coin() -> CoinFlip { let random_number = \"\n#~ \"generate_random_number(); if random_number % 2 == 0 { return CoinFlip::\"\n#~ \"Heads; } else { return CoinFlip::Tails; } }\"\n#~ msgstr \"\"\n#~ \"fn flip_coin() -> CoinFlip { let random_number = \"\n#~ \"generate_random_number(); if random_number % 2 == 0 { return CoinFlip::\"\n#~ \"Heads; } else { return CoinFlip::Tails; } }\"\n\n#~ msgid \"fn main() { println!(\\\"You got: {:?}\\\", flip_coin()); }\"\n#~ msgstr \"fn main() { println!(\\\"Wynik: {:?}\\\", flip_coin()); }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[rustfmt::skip\\\\] fn inspect(event: WebEvent) { match event \"\n#~ \"{ WebEvent::PageLoad       => println!(\\\"page loaded\\\"), WebEvent::\"\n#~ \"KeyPress(c)    => println!(\\\"pressed '{c}'\\\"), WebEvent::Click { x, y } \"\n#~ \"=> println!(\\\"clicked at x={x}, y={y}\\\"), } }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[rustfmt::skip\\\\] fn inspect(event: WebEvent) { match event \"\n#~ \"{ WebEvent::PageLoad       => println!(\\\"strona załadowana\\\"), WebEvent::\"\n#~ \"KeyPress(c)    => println!(\\\"przyciśnięto '{c}'\\\"), WebEvent::Click { x, \"\n#~ \"y } => println!(\\\"kliknięto w x={x}, y={y}\\\"), } }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let load = WebEvent::PageLoad; let press = WebEvent::\"\n#~ \"KeyPress('x'); let click = WebEvent::Click { x: 20, y: 80 };\"\n#~ msgstr \"\"\n#~ \"fn main() { let load = WebEvent::PageLoad; let press = WebEvent::\"\n#~ \"KeyPress('x'); let click = WebEvent::Click { x: 20, y: 80 };\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"inspect(load);\\n\"\n#~ \"inspect(press);\\n\"\n#~ \"inspect(click);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"inspect(load);\\n\"\n#~ \"inspect(press);\\n\"\n#~ \"inspect(click);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"macro_rules! dbg_size { ($t:ty) => { println!(\\\"{}: size {} bytes, align: \"\n#~ \"{} bytes\\\", stringify!($t), size_of::\\\\<$t>(), align_of::\\\\<$t>()); }; }\"\n#~ msgstr \"\"\n#~ \"macro_rules! dbg_size { ($t:ty) => { println!(\\\"{}: rozmiar {} bajtów, \"\n#~ \"wyrównanie: {} bytes\\\", stringify!($t), size_of::\\\\<$t>(), align_of::\"\n#~ \"\\\\<$t>()); }; }\"\n\n#~ msgid \"enum Foo { A, B, }\"\n#~ msgstr \"enum Foo { A, B, }\"\n\n#~ msgid \"\\\\#\\\\[repr(u32)\\\\] enum Bar { A,  // 0 B = 10000, C,  // 10001 }\"\n#~ msgstr \"\\\\#\\\\[repr(u32)\\\\] enum Bar { A,  // 0 B = 10000, C,  // 10001 }\"\n\n#~ msgid \"\"\n#~ \"fn main() { dbg_size!(Foo); dbg_size!(Bar); dbg_size!(bool); dbg_size!\"\n#~ \"(Option\"\n#~ msgstr \"\"\n#~ \"fn main() { dbg_size!(Foo); dbg_size!(Bar); dbg_size!(bool); dbg_size!\"\n#~ \"(Option\"\n\n#~ msgid \"); dbg_size!(&i32); dbg_size!(Option\\\\<&i32>); }\"\n#~ msgstr \"); dbg_size!(&i32); dbg_size!(Option\\\\<&i32>); }\"\n\n#, fuzzy\n#~ msgid \"Key Points: \"\n#~ msgstr \"Kluczowe punkty:\"\n\n#, fuzzy\n#~ msgid \"`Option<bool>` is another example of tight packing.\"\n#~ msgstr \"`Option<bool>` to kolejny przykład ciasnego upakowania.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Zero-sized types allow for efficient implementation of `HashSet` using \"\n#~ \"`HashMap` with `()` as the value.\"\n#~ msgstr \"\"\n#~ \"Typy o zerowym rozmiarze pozwalają na wydajną implementację `HashSet` \"\n#~ \"przy użyciu `HashMap` z `()` jako wartością.\"\n\n#~ msgid \"\"\n#~ \"macro_rules! dbg_bits { ($e:expr, $bit_type:ty) => { println!(\\\"- {}: {:\"\n#~ \"#x}\\\", stringify!($e), transmute::\\\\<\\\\_, $bit_type>($e)); }; }\"\n#~ msgstr \"\"\n#~ \"macro_rules! dbg_bits { ($e:expr, $bit_type:ty) => { println!(\\\"- {}: {:\"\n#~ \"#x}\\\", stringify!($e), transmute::\\\\<\\\\_, $bit_type>($e)); }; }\"\n\n#~ msgid \"\"\n#~ \"fn main() { // TOTALLY UNSAFE. Rust provides no guarantees about the \"\n#~ \"bitwise // representation of types. unsafe { println!(\\\"Bitwise \"\n#~ \"representation of bool\\\"); dbg_bits!(false, u8); dbg_bits!(true, u8);\"\n#~ msgstr \"\"\n#~ \"fn main() { // NIEBEZPIECZNE. Rust nie daje gwarancji jak dany typ jest \"\n#~ \"przedstawiony w pamięci. unsafe { println!(\\\"Bitowa reprezentacja typu \"\n#~ \"bool\\\"); dbg_bits!(false, u8); dbg_bits!(true, u8);\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of Option<bool>\\\");\\n\"\n#~ \"    dbg_bits!(None::<bool>, u8);\\n\"\n#~ \"    dbg_bits!(Some(false), u8);\\n\"\n#~ \"    dbg_bits!(Some(true), u8);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja Option<bool>\\\");\\n\"\n#~ \"    dbg_bits!(None::<bool>, u8);\\n\"\n#~ \"    dbg_bits!(Some(false), u8);\\n\"\n#~ \"    dbg_bits!(Some(true), u8);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of Option<Option<bool>>\\\");\\n\"\n#~ \"    dbg_bits!(Some(Some(false)), u8);\\n\"\n#~ \"    dbg_bits!(Some(Some(true)), u8);\\n\"\n#~ \"    dbg_bits!(Some(None::<bool>), u8);\\n\"\n#~ \"    dbg_bits!(None::<Option<bool>>, u8);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja Option<Option<bool>>\\\");\\n\"\n#~ \"    dbg_bits!(Some(Some(false)), u8);\\n\"\n#~ \"    dbg_bits!(Some(Some(true)), u8);\\n\"\n#~ \"    dbg_bits!(Some(None::<bool>), u8);\\n\"\n#~ \"    dbg_bits!(None::<Option<bool>>, u8);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of Option<&i32>\\\");\\n\"\n#~ \"    dbg_bits!(None::<&i32>, usize);\\n\"\n#~ \"    dbg_bits!(Some(&0i32), usize);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja Option<&i32>\\\");\\n\"\n#~ \"    dbg_bits!(None::<&i32>, usize);\\n\"\n#~ \"    dbg_bits!(Some(&0i32), usize);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#![recursion_limit = \\\"1000\\\"]\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#![recursion_limit = \\\"1000\\\"]\\n\"\n#~ \"```\"\n\n#~ msgid \"use std::mem::transmute;\"\n#~ msgstr \"use std::mem::transmute;\"\n\n#~ msgid \"\"\n#~ \"// Macro to wrap a value in 2^n Some() where n is the number of \\\"@\\\" \"\n#~ \"signs. // Increasing the recursion limit is required to evaluate this \"\n#~ \"macro. macro_rules! many_options { ($value:expr) => { Some($value) }; \"\n#~ \"($value:expr, @) => { Some(Some($value)) }; ($value:expr, @ $($more:tt)+) \"\n#~ \"=> { many_options!(many_options!($value, $($more)+), $($more)+) }; }\"\n#~ msgstr \"\"\n#~ \"// Makro pakujące wartość w 2^n Some() gdzie n to liczba znaków \\\"@\\\". // \"\n#~ \"Zwiększnie limitu rekurencji jest wymagane żeby wywołać to makro. \"\n#~ \"macro_rules! many_options { ($value:expr) => { Some($value) }; ($value:\"\n#~ \"expr, @) => { Some(Some($value)) }; ($value:expr, @ $($more:tt)+) => \"\n#~ \"{ many_options!(many_options!($value, $($more)+), $($more)+) }; }\"\n\n#~ msgid \"\"\n#~ \"fn main() { // TOTALLY UNSAFE. Rust provides no guarantees about the \"\n#~ \"bitwise // representation of types. unsafe { assert_eq!(many_options!\"\n#~ \"(false), Some(false)); assert_eq!(many_options!(false, @), \"\n#~ \"Some(Some(false))); assert_eq!(many_options!(false, @@), \"\n#~ \"Some(Some(Some(Some(false)))));\"\n#~ msgstr \"\"\n#~ \"fn main() { // NIEBEZPIECZNE. Rust nie daje gwarancji jak dany typ jest \"\n#~ \"przedstawiony w pamięci. unsafe { assert_eq!(many_options!(false), \"\n#~ \"Some(false)); assert_eq!(many_options!(false, @), Some(Some(false))); \"\n#~ \"assert_eq!(many_options!(false, @@), Some(Some(Some(Some(false)))));\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of a chain of 128 Option's.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(false, @@@@@@@), u8);\\n\"\n#~ \"    dbg_bits!(many_options!(true, @@@@@@@), u8);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja łańcucha 128 Option.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(false, @@@@@@@), u8);\\n\"\n#~ \"    dbg_bits!(many_options!(true, @@@@@@@), u8);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of a chain of 256 Option's.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(false, @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(true, @@@@@@@@), u16);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja łańcucha 256 Option.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(false, @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(true, @@@@@@@@), u16);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitwise representation of a chain of 257 Option's.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(Some(false), @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(Some(true), @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(None::<bool>, @@@@@@@@), u16);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    println!(\\\"Bitowa reprezentacja łańcucha 257 Option.\\\");\\n\"\n#~ \"    dbg_bits!(many_options!(Some(false), @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(Some(true), @@@@@@@@), u16);\\n\"\n#~ \"    dbg_bits!(many_options!(None::<bool>, @@@@@@@@), u16);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"impl Person { fn say_hello(&self) { println!(\\\"Hello, my name is {}\\\", \"\n#~ \"self.name); } }\"\n#~ msgstr \"\"\n#~ \"impl Person { fn say_hello(&self) { println!(\\\"Cześć, mam na imię {}\\\", \"\n#~ \"self.name); } }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let peter = Person { name: String::from(\\\"Peter\\\"), age: \"\n#~ \"27, }; peter.say_hello(); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let peter = Person { name: String::from(\\\"Peter\\\"), age: \"\n#~ \"27, }; peter.say_hello(); }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`mut self`: same as above, but while the method owns the object, it can \"\n#~ \"mutate it too. Complete ownership does not automatically mean mutability.\"\n#~ msgstr \"\"\n#~ \"`mut self`: to samo co powyżej, ale gdy metoda jest właścicielem obiektu, \"\n#~ \"może też mutuj. Pełna własność nie oznacza automatycznie zmienności.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Race {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    laps: Vec<i32>,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Race {\\n\"\n#~ \"    name: String,\\n\"\n#~ \"    laps: Vec<i32>,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"impl Race { fn new(name: &str) -> Race {  // No receiver, a static method \"\n#~ \"Race { name: String::from(name), laps: Vec::new() } }\"\n#~ msgstr \"\"\n#~ \"impl Wyścig { fn new(name: &str) -> Race { // Brak odbiornika, metoda \"\n#~ \"statyczna Wyścig { nazwa: String::from(name), okrążenia: Vec::new() } }\"\n\n#~ msgid \"\"\n#~ \"fn main() { let mut race = Race::new(\\\"Monaco Grand Prix\\\"); race.\"\n#~ \"add_lap(70); race.add_lap(68); race.print_laps(); race.add_lap(71); race.\"\n#~ \"print_laps(); race.finish(); // race.add_lap(42); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let mut race = Race::new(\\\"Monaco Grand Prix\\\"); race.\"\n#~ \"add_lap(70); race.add_lap(68); race.print_laps(); race.add_lap(71); race.\"\n#~ \"print_laps(); race.finish(); // race.add_lap(42); }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"fn divide_in_two(n: i32) -> Result { if n % 2 == 0 { Result::Ok(n / 2) } \"\n#~ \"else { Result::Err(format!(\\\"cannot divide {n} into two equal \"\n#~ \"parts\\\")) } }\"\n#~ msgstr \"\"\n#~ \"fn dzielenie_na_dwa(n: i32) -> Wynik { jeśli n % 2 == 0 { Wynik::OK(n / \"\n#~ \"2) } w przeciwnym razie { Result::Err(format!(\\\"nie można podzielić {n} \"\n#~ \"na dwie równe części\\\")) } }\"\n\n#~ msgid \"struct User { name: String, age: u32, weight: f32, }\"\n#~ msgstr \"struct User { name: String, age: u32, weight: f32, }\"\n\n#~ msgid \"\"\n#~ \"impl User { pub fn new(name: String, age: u32, weight: f32) -> Self \"\n#~ \"{ unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"impl User { pub fn new(name: String, age: u32, weight: f32) -> Self \"\n#~ \"{ unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn name(&self) -> &str {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn name(&self) -> &str {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn age(&self) -> u32 {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn age(&self) -> u32 {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn weight(&self) -> f32 {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn weight(&self) -> f32 {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn set_age(&mut self, new_age: u32) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn set_age(&mut self, new_age: u32) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn set_weight(&mut self, new_weight: f32) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn set_weight(&mut self, new_weight: f32) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2); \"\n#~ \"println!(\\\"I'm {} and my age is {}\\\", bob.name(), bob.age()); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let bob = User::new(String::from(\\\"Bob\\\"), 32, 155.2); \"\n#~ \"println!(\\\"Jestem {} i mam {} lat\\\", bob.name(), bob.age()); }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_weight() { let bob = User::new(String::\"\n#~ \"from(\\\"Bob\\\"), 32, 155.2); assert_eq!(bob.weight(), 155.2); }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_weight() { let bob = User::new(String::\"\n#~ \"from(\\\"Bob\\\"), 32, 155.2); assert_eq!(bob.weight(), 155.2); }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_set_age() { let mut bob = User::new(String::\"\n#~ \"from(\\\"Bob\\\"), 32, 155.2); assert_eq!(bob.age(), 32); bob.set_age(33); \"\n#~ \"assert_eq!(bob.age(), 33); }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_set_age() { let mut bob = User::new(String::\"\n#~ \"from(\\\"Bob\\\"), 32, 155.2); assert_eq!(bob.age(), 32); bob.set_age(33); \"\n#~ \"assert_eq!(bob.age(), 33); }\"\n\n#~ msgid \"pub struct Point { // add fields }\"\n#~ msgstr \"pub struct Point { // dodaj pola }\"\n\n#~ msgid \"impl Point { // add methods }\"\n#~ msgstr \"impl Point { // dodaj metody }\"\n\n#~ msgid \"pub struct Polygon { // add fields }\"\n#~ msgstr \"pub struct Polygon { // dodaj pola }\"\n\n#~ msgid \"impl Polygon { // add methods }\"\n#~ msgstr \"impl Polygon { // dodaj metody }\"\n\n#~ msgid \"pub struct Circle { // add fields }\"\n#~ msgstr \"pub struct Circle { // dodaj pola }\"\n\n#~ msgid \"impl Circle { // add methods }\"\n#~ msgstr \"impl Circle { // dodaj metody }\"\n\n#~ msgid \"pub enum Shape { Polygon(Polygon), Circle(Circle), }\"\n#~ msgstr \"pub enum Shape { Polygon(Polygon), Circle(Circle), }\"\n\n#~ msgid \"\\\\#\\\\[cfg(test)\\\\] mod tests { use super::\\\\*;\"\n#~ msgstr \"\\\\#\\\\[cfg(test)\\\\] mod tests { use super::\\\\*;\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn round_two_digits(x: f64) -> f64 {\\n\"\n#~ \"    (x * 100.0).round() / 100.0\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn round_two_digits(x: f64) -> f64 {\\n\"\n#~ \"    (x * 100.0).round() / 100.0\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_magnitude() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    assert_eq!(round_two_digits(p1.magnitude()), 17.69);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_magnitude() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    assert_eq!(round_two_digits(p1.magnitude()), 17.69);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_dist() {\\n\"\n#~ \"    let p1 = Point::new(10, 10);\\n\"\n#~ \"    let p2 = Point::new(14, 13);\\n\"\n#~ \"    assert_eq!(round_two_digits(p1.dist(p2)), 5.00);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_dist() {\\n\"\n#~ \"    let p1 = Point::new(10, 10);\\n\"\n#~ \"    let p2 = Point::new(14, 13);\\n\"\n#~ \"    assert_eq!(round_two_digits(p1.dist(p2)), 5.00);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_add() {\\n\"\n#~ \"    let p1 = Point::new(16, 16);\\n\"\n#~ \"    let p2 = p1 + Point::new(-4, 3);\\n\"\n#~ \"    assert_eq!(p2, Point::new(12, 19));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_point_add() {\\n\"\n#~ \"    let p1 = Point::new(16, 16);\\n\"\n#~ \"    let p2 = p1 + Point::new(-4, 3);\\n\"\n#~ \"    assert_eq!(p2, Point::new(12, 19));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_polygon_left_most_point() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    let p2 = Point::new(16, 16);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_polygon_left_most_point() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    let p2 = Point::new(16, 16);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(p1);\\n\"\n#~ \"    poly.add_point(p2);\\n\"\n#~ \"    assert_eq!(poly.left_most_point(), Some(p1));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(p1);\\n\"\n#~ \"    poly.add_point(p2);\\n\"\n#~ \"    assert_eq!(poly.left_most_point(), Some(p1));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_polygon_iter() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    let p2 = Point::new(16, 16);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_polygon_iter() {\\n\"\n#~ \"    let p1 = Point::new(12, 13);\\n\"\n#~ \"    let p2 = Point::new(16, 16);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(p1);\\n\"\n#~ \"    poly.add_point(p2);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(p1);\\n\"\n#~ \"    poly.add_point(p2);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let points = poly.iter().cloned().collect::<Vec<_>>();\\n\"\n#~ \"    assert_eq!(points, vec![Point::new(12, 13), Point::new(16, 16)]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let points = poly.iter().cloned().collect::<Vec<_>>();\\n\"\n#~ \"    assert_eq!(points, vec![Point::new(12, 13), Point::new(16, 16)]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_shape_perimeters() {\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(Point::new(12, 13));\\n\"\n#~ \"    poly.add_point(Point::new(17, 11));\\n\"\n#~ \"    poly.add_point(Point::new(16, 16));\\n\"\n#~ \"    let shapes = vec![\\n\"\n#~ \"        Shape::from(poly),\\n\"\n#~ \"        Shape::from(Circle::new(Point::new(10, 20), 5)),\\n\"\n#~ \"    ];\\n\"\n#~ \"    let perimeters = shapes\\n\"\n#~ \"        .iter()\\n\"\n#~ \"        .map(Shape::perimeter)\\n\"\n#~ \"        .map(round_two_digits)\\n\"\n#~ \"        .collect::<Vec<_>>();\\n\"\n#~ \"    assert_eq!(perimeters, vec![15.48, 31.42]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"#[test]\\n\"\n#~ \"fn test_shape_perimeters() {\\n\"\n#~ \"    let mut poly = Polygon::new();\\n\"\n#~ \"    poly.add_point(Point::new(12, 13));\\n\"\n#~ \"    poly.add_point(Point::new(17, 11));\\n\"\n#~ \"    poly.add_point(Point::new(16, 16));\\n\"\n#~ \"    let shapes = vec![\\n\"\n#~ \"        Shape::from(poly),\\n\"\n#~ \"        Shape::from(Circle::new(Point::new(10, 20), 5)),\\n\"\n#~ \"    ];\\n\"\n#~ \"    let perimeters = shapes\\n\"\n#~ \"        .iter()\\n\"\n#~ \"        .map(Shape::perimeter)\\n\"\n#~ \"        .map(round_two_digits)\\n\"\n#~ \"        .collect::<Vec<_>>();\\n\"\n#~ \"    assert_eq!(perimeters, vec![15.48, 31.42]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\\\\#\\\\[allow(dead_code)\\\\] fn main() {}\"\n#~ msgstr \"\\\\#\\\\[allow(dead_code)\\\\] fn main() {}\"\n\n#, fuzzy\n#~ msgid \"You use `if` very similarly to how you would in other languages:\"\n#~ msgstr \"Używasz `if` bardzo podobnie jak w innych językach:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you want to match a value against a pattern, you can use `if let`:\"\n#~ msgstr \"Jeśli chcesz dopasować wartość do wzorca, możesz użyć `if let`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`if let` can be more concise than `match`, e.g., when only one case is \"\n#~ \"interesting. In contrast, `match` requires all branches to be covered.\"\n#~ msgstr \"\"\n#~ \"`if let` może być bardziej zwięzłe niż `dopasuj`, np. gdy interesujący \"\n#~ \"jest tylko jeden przypadek. Natomiast „dopasowanie” wymaga pokrycia \"\n#~ \"wszystkich gałęzi.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"For the similar use case consider demonstrating a newly stabilized [`let \"\n#~ \"else`](https://github.com/rust-lang/rust/pull/93628) feature.\"\n#~ msgstr \"\"\n#~ \"W przypadku podobnego przypadku rozważ zademonstrowanie nowo \"\n#~ \"ustabilizowanej funkcji [`let else`](https://github.com/rust-lang/rust/\"\n#~ \"pull/93628).\"\n\n#, fuzzy\n#~ msgid \"The `while` keyword works very similar to other languages:\"\n#~ msgstr \"Słowo kluczowe `while` działa bardzo podobnie do innych języków:\"\n\n#, fuzzy\n#~ msgid \"`for` expressions\"\n#~ msgstr \"wyrażenia `for`\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"for book in [\\\"Pride and Prejudice\\\", \\\"Alice's Adventure in \"\n#~ \"Wonderland\\\"] {\\n\"\n#~ \"    match page_counts.get(book) {\\n\"\n#~ \"        Some(count) => println!(\\\"{book}: {count} pages\\\"),\\n\"\n#~ \"        None => println!(\\\"{book} is unknown.\\\")\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"za książkę w [\\\"Duma i uprzedzenie\\\", \\\"Alicja w Krainie Czarów\\\"] {\\n\"\n#~ \"    dopasuj page_counts.get(book) {\\n\"\n#~ \"        Some(count) => println!(\\\"{książka}: {count} stron\\\"),\\n\"\n#~ \"        Brak => println!(\\\"{książka} jest nieznana.\\\")\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you need to mutate the data inside an `Rc`, you will need to wrap the \"\n#~ \"data in a type such as [`Cell` or `RefCell`](https://doc.rust-lang.org/\"\n#~ \"std/cell/index.html).\"\n#~ msgstr \"\"\n#~ \"Jeśli musisz zmutować dane wewnątrz `Rc`, będziesz musiał zawinąć dane \"\n#~ \"typu takiego jak [`Cell` lub `RefCell`](../concurrency/shared_state/arc.\"\n#~ \"md).\"\n\n#, fuzzy\n#~ msgid \"Like C++'s `std::shared_ptr`.\"\n#~ msgstr \"Podobnie jak `std::shared_ptr` C++.\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct Node { value: i64, parent: \"\n#~ \"Option\\\\<Weak\\\\<RefCell\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct Node { value: i64, parent: \"\n#~ \"Option\\\\<Weak\\\\<RefCell\"\n\n#~ msgid \"\\\\>>, children: Vec\\\\<Rc\\\\<RefCell\"\n#~ msgstr \"\\\\>>, children: Vec\\\\<Rc\\\\<RefCell\"\n\n#~ msgid \"\\\\>>, }\"\n#~ msgstr \"\\\\>>, }\"\n\n#, fuzzy\n#~ msgid \"The module content can be omitted:\"\n#~ msgstr \"Treść modułu można pominąć:\"\n\n#, fuzzy\n#~ msgid \"The `garden` module content is found at:\"\n#~ msgstr \"Zawartość modułu `garden` znajduje się pod adresem:\"\n\n#, fuzzy\n#~ msgid \"`src/garden.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden.rs` (nowoczesny styl Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/mod.rs` (starszy styl Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"Similarly, a `garden::vegetables` module can be found at:\"\n#~ msgstr \"Podobnie moduł `garden::vegetables` można znaleźć pod adresem:\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables.rs` (modern Rust 2018 style)\"\n#~ msgstr \"`src/garden/vegetables.rs` (nowoczesny styl Rust 2018)\"\n\n#, fuzzy\n#~ msgid \"`src/garden/vegetables/mod.rs` (older Rust 2015 style)\"\n#~ msgstr \"`src/garden/vegetables/mod.rs` (starszy styl Rust 2015)\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The change from `module/mod.rs` to `module.rs` doesn't preclude the use \"\n#~ \"of submodules in Rust 2018. (It was mandatory in Rust 2015.)\"\n#~ msgstr \"\"\n#~ \"Zmiana z `module/mod.rs` na `module.rs` nie wyklucza użycia submodułów w \"\n#~ \"Rust 2018. (Było to obowiązkowe w Rust 2015.)\"\n\n#, fuzzy\n#~ msgid \"The following is valid:\"\n#~ msgstr \"Poniższe jest ważne:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the following code to <https://play.rust-lang.org/> and implement \"\n#~ \"the function:\"\n#~ msgstr \"\"\n#~ \"Skopiuj poniższy kod do <https://play.rust-lang.org/> i zaimplementuj \"\n#~ \"funkcjonować:\"\n\n#~ msgid \"pub fn luhn(cc_number: &str) -> bool { unimplemented!() }\"\n#~ msgstr \"pub fn luhn(cc_number: &str) -> bool { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"pub fn prefix_matches(prefix: &str, request_path: &str) -> bool \"\n#~ \"{ unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"pub fn prefix_matches(prefix: &str, request_path: &str) -> bool \"\n#~ \"{ unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_matches_without_wildcard() { assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc-123\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/books\\\"));\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_matches_without_wildcard() { assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc-123\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/books\\\"));\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishersBooks\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/parent/publishers\\\"));\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishersBooks\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/parent/publishers\\\"));\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_matches_with_wildcard() { assert!\"\n#~ \"(prefix_matches( \\\"/v1/publishers/_/books\\\", \\\"/v1/publishers/foo/\"\n#~ \"books\\\" )); assert!(prefix_matches( \\\"/v1/publishers/_/books\\\", \\\"/v1/\"\n#~ \"publishers/bar/books\\\" )); assert!(prefix_matches( \\\"/v1/publishers/\\\\*/\"\n#~ \"books\\\", \\\"/v1/publishers/foo/books/book1\\\" ));\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_matches_with_wildcard() { assert!\"\n#~ \"(prefix_matches( \\\"/v1/publishers/_/books\\\", \\\"/v1/publishers/foo/\"\n#~ \"books\\\" )); assert!(prefix_matches( \\\"/v1/publishers/_/books\\\", \\\"/v1/\"\n#~ \"publishers/bar/books\\\" )); assert!(prefix_matches( \\\"/v1/publishers/\\\\*/\"\n#~ \"books\\\", \\\"/v1/publishers/foo/books/book1\\\" ));\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers/*/books\\\", \\\"/v1/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\n\"\n#~ \"    \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"    \\\"/v1/publishers/foo/booksByAuthor\\\"\\n\"\n#~ \"));\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"assert!(!prefix_matches(\\\"/v1/publishers/*/books\\\", \\\"/v1/\"\n#~ \"publishers\\\"));\\n\"\n#~ \"assert!(!prefix_matches(\\n\"\n#~ \"    \\\"/v1/publishers/*/books\\\",\\n\"\n#~ \"    \\\"/v1/publishers/foo/booksByAuthor\\\"\\n\"\n#~ \"));\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"struct Dog { name: String, }\"\n#~ msgstr \"pies konstrukcyjny { imię: Ciąg, }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"impl Equals for Centimeter { fn equal(&self, other: &Centimeter) -> bool \"\n#~ \"{ self.0 == other.0 } }\"\n#~ msgstr \"\"\n#~ \"impl Równa się dla centymetra { fn równy(&ja; inny: &Centymetr) -> bool \"\n#~ \"{ sam.0 == inny.0 } }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn add(self, other: Self) -> Self {\\n\"\n#~ \"    Self {x: self.x + other.x, y: self.y + other.y}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn add(sam, inny: Własny) -> Własny {\\n\"\n#~ \"    Ja {x: ja.x + inny.x, y: ja.y + inny.y}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"impl Default for Implemented { fn default() -> Self { Self(\\\"John Smith\\\".\"\n#~ \"into()) } }\"\n#~ msgstr \"\"\n#~ \"impl Domyślnie dla zaimplementowanych { fn default() -> Własny \"\n#~ \"{ Self(\\\"Jan Kowalski\\\".do()) } }\"\n\n#, fuzzy\n#~ msgid \"impl\"\n#~ msgstr \"impl\"\n\n#, fuzzy\n#~ msgid \" { fn x(&self) -> &T { &self.0  // + 10 }\"\n#~ msgstr \" { fn x(&ja) -> &T { &sobie.0 // + 10 }\"\n\n#, fuzzy\n#~ msgid \"\\\\>(x: T) -> i32 { fn add_42_millions(x: impl Into\"\n#~ msgstr \"\\\\>(x: T) -> i32 { fn add_42_milions(x: impl Into\"\n\n#, fuzzy\n#~ msgid \") -> i32 { x.into() + 42_000_000 }\"\n#~ msgstr \") -> i32 { x.do() + 42_000_000 }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"fn get_x(name: impl Display) -> impl Display { format!(\\\"Hello {name}\\\") }\"\n#~ msgstr \"\"\n#~ \"fn get_x(nazwa: impl Wyświetl) -> impl Wyświetl { format!(\\\"Witaj \"\n#~ \"{imię}\\\") }\"\n\n#, fuzzy\n#~ msgid \"`impl Trait` cannot be used with the `::<>` turbo fish syntax.\"\n#~ msgstr \"`impl Trait` nie może być używany ze składnią `::<>` turbofish.\"\n\n#, fuzzy\n#~ msgid \"`move` closures only implement `FnOnce`.\"\n#~ msgstr \"Zamknięcia `move` implementują tylko `FnOnce`.\"\n\n#, fuzzy\n#~ msgid \"enum Option_f64 { Some(f64), None, }\"\n#~ msgstr \"wyliczenie Option_f64 { Niektóre (f64), Nic, }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We've seen how a function can take arguments which implement a trait:\"\n#~ msgstr \"\"\n#~ \"Widzieliśmy, jak funkcja może przyjmować argumenty, które implementują \"\n#~ \"cechę:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"However, how can we store a collection of mixed types which implement \"\n#~ \"`Display`?\"\n#~ msgstr \"\"\n#~ \"Jak jednak możemy przechowywać kolekcję typów mieszanych, które \"\n#~ \"implementują `Display`?\"\n\n#, fuzzy\n#~ msgid \"For this, we need _trait objects_:\"\n#~ msgstr \"W tym celu potrzebujemy _obiektów cech_:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Similarly, you need a trait object if you want to return different types \"\n#~ \"implementing a trait:\"\n#~ msgstr \"\"\n#~ \"Podobnie potrzebujesz obiektu cechy, jeśli chcesz zwrócić różne typy \"\n#~ \"wdrożenie cechy:\"\n\n#~ msgid \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_imports, unused_variables, dead_code)]\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: usuń to jak skończysz implementację.\\n\"\n#~ \"#![allow(unused_imports, unused_variables, dead_code)]\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"pub trait Widget { /// Natural width of `self`. fn width(&self) -> usize;\"\n#~ msgstr \"\"\n#~ \"pub trait Widget { /// Naturalna szerokość `self`. fn width(&self) -> \"\n#~ \"usize;\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"/// Draw the widget into a buffer.\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"/// Narysuj widget w buforze.\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"/// Draw the widget on standard output.\\n\"\n#~ \"fn draw(&self) {\\n\"\n#~ \"    let mut buffer = String::new();\\n\"\n#~ \"    self.draw_into(&mut buffer);\\n\"\n#~ \"    println!(\\\"{buffer}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"/// Narysuj widget na standardowym wyjściu.\\n\"\n#~ \"fn draw(&self) {\\n\"\n#~ \"    let mut buffer = String::new();\\n\"\n#~ \"    self.draw_into(&mut buffer);\\n\"\n#~ \"    println!(\\\"{buffer}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"pub struct Label { label: String, }\"\n#~ msgstr \"pub struct Label { label: String, }\"\n\n#~ msgid \"\"\n#~ \"impl Label { fn new(label: &str) -> Label { Label { label: label.\"\n#~ \"to_owned(), } } }\"\n#~ msgstr \"\"\n#~ \"impl Label { fn new(label: &str) -> Label { Label { label: label.\"\n#~ \"to_owned(), } } }\"\n\n#~ msgid \"pub struct Button { label: Label, callback: Box\\\\<dyn FnMut()>, }\"\n#~ msgstr \"pub struct Button { label: Label, callback: Box\\\\<dyn FnMut()>, }\"\n\n#~ msgid \"\"\n#~ \"impl Button { fn new(label: &str, callback: Box\\\\<dyn FnMut()>) -> Button \"\n#~ \"{ Button { label: Label::new(label), callback, } } }\"\n#~ msgstr \"\"\n#~ \"impl Button { fn new(label: &str, callback: Box\\\\<dyn FnMut()>) -> Button \"\n#~ \"{ Button { label: Label::new(label), callback, } } }\"\n\n#~ msgid \"pub struct Window { title: String, widgets: Vec\\\\<Box\"\n#~ msgstr \"pub struct Window { title: String, widgets: Vec\\\\<Box\"\n\n#~ msgid \"\\\\>, }\"\n#~ msgstr \"\\\\>, }\"\n\n#~ msgid \"\"\n#~ \"impl Window { fn new(title: &str) -> Window { Window { title: title.\"\n#~ \"to_owned(), widgets: Vec::new(), } }\"\n#~ msgstr \"\"\n#~ \"impl Window { fn new(title: &str) -> Window { Window { title: title.\"\n#~ \"to_owned(), widgets: Vec::new(), } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn add_widget(&mut self, widget: Box<dyn Widget>) {\\n\"\n#~ \"    self.widgets.push(widget);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn add_widget(&mut self, widget: Box<dyn Widget>) {\\n\"\n#~ \"    self.widgets.push(widget);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"impl Widget for Label { fn width(&self) -> usize { unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"impl Widget for Label { fn width(&self) -> usize { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"impl Widget for Button { fn width(&self) -> usize { unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"impl Widget for Button { fn width(&self) -> usize { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"impl Widget for Window { fn width(&self) -> usize { unimplemented!() }\"\n#~ msgstr \"\"\n#~ \"impl Widget for Window { fn width(&self) -> usize { unimplemented!() }\"\n\n#~ msgid \"\"\n#~ \"let result = panic::catch_unwind(|| { println!(\\\"hello!\\\"); }); assert!\"\n#~ \"(result.is_ok());\"\n#~ msgstr \"\"\n#~ \"let result = panic::catch_unwind(|| { println!(\\\"cześć!\\\"); }); assert!\"\n#~ \"(result.is_ok());\"\n\n#~ msgid \"\"\n#~ \"let result = panic::catch_unwind(|| { panic!(\\\"oh no!\\\"); }); assert!\"\n#~ \"(result.is_err());\"\n#~ msgstr \"\"\n#~ \"let result = panic::catch_unwind(|| { panic!(\\\"o nie!\\\"); }); assert!\"\n#~ \"(result.is_err());\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"use std::fs::File;\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"use std::fs::File;\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs;\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs;\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn read_username(path: &str) -> Result\\\\<String, io::Error> { let \"\n#~ \"username_file_result = fs::File::open(path);\"\n#~ msgstr \"\"\n#~ \"fn read_username(path: &str) -> Result\\\\<String, io::Error> { let \"\n#~ \"username_file_result = fs::File::open(path);\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let mut username_file = match username_file_result {\\n\"\n#~ \"    Ok(file) => file,\\n\"\n#~ \"    Err(e) => return Err(e),\\n\"\n#~ \"};\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let mut username_file = match username_file_result {\\n\"\n#~ \"    Ok(file) => file,\\n\"\n#~ \"    Err(e) => return Err(e),\\n\"\n#~ \"};\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"let mut username = String::new();\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"let mut username = String::new();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"match username_file.read_to_string(&mut username) {\\n\"\n#~ \"    Ok(_) => Ok(username),\\n\"\n#~ \"    Err(e) => Err(e),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"match username_file.read_to_string(&mut username) {\\n\"\n#~ \"    Ok(_) => Ok(username),\\n\"\n#~ \"    Err(e) => Err(e),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { //fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap(); let username \"\n#~ \"= read_username(\\\"config.dat\\\"); println!(\\\"username or error: \"\n#~ \"{username:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { //fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap(); let username \"\n#~ \"= read_username(\\\"config.dat\\\"); println!(\\\"nazwa użytkownika lub błąd: \"\n#~ \"{username:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"use std::fmt::{self, Display, Formatter};\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"use std::fmt::{self, Display, Formatter};\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] enum ReadUsernameError { IoError(io::Error), \"\n#~ \"EmptyUsername(String), }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] enum ReadUsernameError { IoError(io::Error), \"\n#~ \"EmptyUsername(String), }\"\n\n#~ msgid \"impl Error for ReadUsernameError {}\"\n#~ msgstr \"impl Error for ReadUsernameError {}\"\n\n#~ msgid \"\"\n#~ \"impl Display for ReadUsernameError { fn fmt(&self, f: &mut Formatter) -> \"\n#~ \"fmt::Result { match self { Self::IoError(e) => write!(f, \\\"IO error: \"\n#~ \"{}\\\", e), Self::EmptyUsername(filename) => write!(f, \\\"Found no username \"\n#~ \"in {}\\\", filename), } } }\"\n#~ msgstr \"\"\n#~ \"impl Display for ReadUsernameError { fn fmt(&self, f: &mut Formatter) -> \"\n#~ \"fmt::Result { match self { Self::IoError(e) => write!(f, \\\"Błąd wejścia/\"\n#~ \"wyjścia: {}\\\", e), Self::EmptyUsername(filename) => write!(f, \\\"Nie \"\n#~ \"znaleziono nazwy użytkownika w {}\\\", filename), } } }\"\n\n#~ msgid \"\"\n#~ \"impl From<io::Error> for ReadUsernameError { fn from(err: io::Error) -> \"\n#~ \"ReadUsernameError { ReadUsernameError::IoError(err) } }\"\n#~ msgstr \"\"\n#~ \"impl From<io::Error> for ReadUsernameError { fn from(err: io::Error) -> \"\n#~ \"ReadUsernameError { ReadUsernameError::IoError(err) } }\"\n\n#~ msgid \"\"\n#~ \"fn read_username(path: &str) -> Result\\\\<String, ReadUsernameError> { let \"\n#~ \"mut username = String::with_capacity(100); File::open(path)?.\"\n#~ \"read_to_string(&mut username)?; if username.is_empty() { return \"\n#~ \"Err(ReadUsernameError::EmptyUsername(String::from(path))); } \"\n#~ \"Ok(username) }\"\n#~ msgstr \"\"\n#~ \"fn read_username(path: &str) -> Result\\\\<String, ReadUsernameError> { let \"\n#~ \"mut username = String::with_capacity(100); File::open(path)?.\"\n#~ \"read_to_string(&mut username)?; if username.is_empty() { return \"\n#~ \"Err(ReadUsernameError::EmptyUsername(String::from(path))); } \"\n#~ \"Ok(username) }\"\n\n#~ msgid \"\"\n#~ \"fn main() { //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap(); let username = \"\n#~ \"read_username(\\\"config.dat\\\"); println!(\\\"username or error: \"\n#~ \"{username:?}\\\"); }\"\n#~ msgstr \"\"\n#~ \"fn main() { //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap(); let username = \"\n#~ \"read_username(\\\"config.dat\\\"); println!(\\\"nazwa użytkownika lub błąd: \"\n#~ \"{username:?}\\\"); }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug, Error)\\\\] enum ReadUsernameError \"\n#~ \"{ \\\\#\\\\[error(\\\"Could not read: {0}\\\")\\\\] IoError(#\\\\[from\\\\] io::Error), \"\n#~ \"\\\\#\\\\[error(\\\"Found no username in {0}\\\")\\\\] EmptyUsername(String), }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug, Error)\\\\] enum ReadUsernameError { \\\\#\\\\[error(\\\"Nie \"\n#~ \"można odczytać: {0}\\\")\\\\] IoError(#\\\\[from\\\\] io::Error), \"\n#~ \"\\\\#\\\\[error(\\\"Nie znaleziono nazwy użytkownika w {0}\\\")\\\\] \"\n#~ \"EmptyUsername(String), }\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use anyhow::{Context, Result, bail};\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use anyhow::{Context, Result, bail};\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/\"\n#~ \"std/ffi/) module, particular for [`CStr`](https://doc.rust-lang.org/std/\"\n#~ \"ffi/struct.CStr.html) and [`CString`](https://doc.rust-lang.org/std/ffi/\"\n#~ \"struct.CString.html) types which are used to hold NUL-terminated strings \"\n#~ \"coming from C. The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) \"\n#~ \"also has a very useful chapter about FFI.\"\n#~ msgstr \"\"\n#~ \"Będziesz także chciał przejrzeć moduł [`std::ffi`](https://doc.rust-lang.\"\n#~ \"org/std/ffi/), w szczególności dla [`CStr`](https://doc.rust-lang.org/std/\"\n#~ \"ffi/struct.CStr.html) i [`CString`](https://doc.rust-lang.org/std/ffi/\"\n#~ \"struct.CString.html), które są używane do przechowywania ciągów znaków \"\n#~ \"zakończonych znakiem NUL pochodzących z C. [Nomicon](https://doc.rust-\"\n#~ \"lang.org/nomicon/ffi.html) zawiera również bardzo przydatny rozdział o \"\n#~ \"FFI.\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct DirectoryIterator { path: CString, dir: \"\n#~ \"\\\\*mut ffi::DIR, }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct DirectoryIterator { path: CString, dir: \"\n#~ \"\\\\*mut ffi::DIR, }\"\n\n#~ msgid \"\"\n#~ \"impl Iterator for DirectoryIterator { type Item = OsString; fn next(&mut \"\n#~ \"self) -> Option\"\n#~ msgstr \"\"\n#~ \"impl Iterator for DirectoryIterator { type Item = OsString; fn next(&mut \"\n#~ \"self) -> Option\"\n\n#~ msgid \"\"\n#~ \"impl Drop for DirectoryIterator { fn drop(&mut self) { // Call closedir \"\n#~ \"as needed. unimplemented!() } }\"\n#~ msgstr \"\"\n#~ \"impl Drop for DirectoryIterator { fn drop(&mut self) { // Wywołaj \"\n#~ \"closedir. unimplemented!() } }\"\n\n#~ msgid \"\"\n#~ \"fn main() -> Result\\\\<(), String> { let iter = DirectoryIterator::new(\\\".\"\n#~ \"\\\")?; println!(\\\"files: {:#?}\\\", iter.collect::\\\\<Vec\\\\<\\\\_\\\\>>()); \"\n#~ \"Ok(()) }\"\n#~ msgstr \"\"\n#~ \"fn main() -> Result\\\\<(), String> { let iter = DirectoryIterator::new(\\\".\"\n#~ \"\\\")?; println!(\\\"pliki: {:#?}\\\", iter.collect::\\\\<Vec\\\\<\\\\_\\\\>>()); \"\n#~ \"Ok(()) }\"\n\n#, fuzzy\n#~ msgid \"Today we will look at two main topics:\"\n#~ msgstr \"Dzisiaj przyjrzymy się dwóm głównym tematom:\"\n\n#, fuzzy\n#~ msgid \"Concurrency: threads, channels, shared state, `Send` and `Sync`.\"\n#~ msgstr \"\"\n#~ \"Współbieżność: wątki, kanały, współdzielony stan, `Wyślij` i \"\n#~ \"`Synchronizacja`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Android: building binaries and libraries, using AIDL, logging, and \"\n#~ \"interoperability with C, C++, and Java.\"\n#~ msgstr \"\"\n#~ \"Android: tworzenie plików binarnych i bibliotek przy użyciu AIDL, \"\n#~ \"logowanie i współdziałanie z C, C++ i Javą.\"\n\n#, fuzzy\n#~ msgid \"Fearless Concurrency\"\n#~ msgstr \"Nieustraszona współbieżność\"\n\n#, fuzzy\n#~ msgid \"We still need to acquire the `Mutex` to print our `Vec`.\"\n#~ msgstr \"Nadal musimy zdobyć `Mutex`, aby wydrukować nasz `Vec`.\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Error, Debug)\\\\] enum Error { \\\\#\\\\[error(\\\"request error: \"\n#~ \"{0}\\\")\\\\] ReqwestError(#\\\\[from\\\\] reqwest::Error), }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Error, Debug)\\\\] enum Error { \\\\#\\\\[error(\\\"błąd zapytania: \"\n#~ \"{0}\\\")\\\\] ReqwestError(#\\\\[from\\\\] reqwest::Error), }\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"Ok(valid_urls)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"OK (prawidłowe_adresy URL)\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \", binder::StatusCode> { binder::get_interface(SERVICE_IDENTIFIER) }\"\n#~ msgstr \", binder::StatusCode> { binder::get_interface(SERVICE_IDENTIFIER) }\"\n\n#~ msgid \"// ANCHOR: setup struct Library { books: Vec\"\n#~ msgstr \"// ANCHOR: setup struct Library { books: Vec\"\n\n#~ msgid \"\"\n#~ \"// This makes it possible to print Book values with {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } } // \"\n#~ \"ANCHOR_END: setup\"\n#~ msgstr \"\"\n#~ \"// Umożliwia to drukowanie wartości Book za pomocą {}. impl std::fmt::\"\n#~ \"Display for Book { fn fmt(&self, f: &mut std::fmt::Formatter\\\\<'\\\\_\\\\>) -\"\n#~ \"> std::fmt::Result { write!(f, \\\"{} ({})\\\", self.title, self.year) } } // \"\n#~ \"ANCHOR_END: setup\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Library_new impl Library { fn new() -> Library { // \"\n#~ \"ANCHOR_END: Library_new Library { books: Vec::new() } }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Library_new impl Library { fn new() -> Library { // \"\n#~ \"ANCHOR_END: Library_new Library { books: Vec::new() } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_len\\n\"\n#~ \"//fn len(self) -> usize {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_len\\n\"\n#~ \"fn len(&self) -> usize {\\n\"\n#~ \"    self.books.len()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_len\\n\"\n#~ \"//fn len(self) -> usize {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_len\\n\"\n#~ \"fn len(&self) -> usize {\\n\"\n#~ \"    self.books.len()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_is_empty\\n\"\n#~ \"//fn is_empty(self) -> bool {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_is_empty\\n\"\n#~ \"fn is_empty(&self) -> bool {\\n\"\n#~ \"    self.books.is_empty()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_is_empty\\n\"\n#~ \"//fn is_empty(self) -> bool {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_is_empty\\n\"\n#~ \"fn is_empty(&self) -> bool {\\n\"\n#~ \"    self.books.is_empty()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_add_book\\n\"\n#~ \"//fn add_book(self, book: Book) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_add_book\\n\"\n#~ \"fn add_book(&mut self, book: Book) {\\n\"\n#~ \"    self.books.push(book)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_add_book\\n\"\n#~ \"//fn add_book(self, book: Book) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_add_book\\n\"\n#~ \"fn add_book(&mut self, book: Book) {\\n\"\n#~ \"    self.books.push(book)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_print_books\\n\"\n#~ \"//fn print_books(self) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_print_books\\n\"\n#~ \"fn print_books(&self) {\\n\"\n#~ \"    for book in &self.books {\\n\"\n#~ \"        println!(\\\"{}\\\", book);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_print_books\\n\"\n#~ \"//fn print_books(self) {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_print_books\\n\"\n#~ \"fn print_books(&self) {\\n\"\n#~ \"    for book in &self.books {\\n\"\n#~ \"        println!(\\\"{}\\\", book);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_oldest_book\\n\"\n#~ \"//fn oldest_book(self) -> Option<&Book> {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_oldest_book\\n\"\n#~ \"fn oldest_book(&self) -> Option<&Book> {\\n\"\n#~ \"    self.books.iter().min_by_key(|book| book.year)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Library_oldest_book\\n\"\n#~ \"//fn oldest_book(self) -> Option<&Book> {\\n\"\n#~ \"//    unimplemented!()\\n\"\n#~ \"//}\\n\"\n#~ \"// ANCHOR_END: Library_oldest_book\\n\"\n#~ \"fn oldest_book(&self) -> Option<&Book> {\\n\"\n#~ \"    self.books.iter().min_by_key(|book| book.year)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug, Copy, Clone, PartialEq, Eq)\\\\] // ANCHOR: Point pub \"\n#~ \"struct Point { // ANCHOR_END: Point x: i32, y: i32, }\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug, Copy, Clone, PartialEq, Eq)\\\\] // ANCHOR: Point pub \"\n#~ \"struct Point { // ANCHOR_END: Point x: i32, y: i32, }\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Point-impl impl Point { // ANCHOR_END: Point-impl pub fn \"\n#~ \"new(x: i32, y: i32) -> Point { Point { x, y } }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Point-impl impl Point { // ANCHOR_END: Point-impl pub fn \"\n#~ \"new(x: i32, y: i32) -> Point { Point { x, y } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn magnitude(self) -> f64 {\\n\"\n#~ \"    f64::from(self.x.pow(2) + self.y.pow(2)).sqrt()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn magnitude(self) -> f64 {\\n\"\n#~ \"    f64::from(self.x.pow(2) + self.y.pow(2)).sqrt()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn dist(self, other: Point) -> f64 {\\n\"\n#~ \"    (self - other).magnitude()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn dist(self, other: Point) -> f64 {\\n\"\n#~ \"    (self - other).magnitude()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn add(self, other: Self) -> Self::Output {\\n\"\n#~ \"    Self {\\n\"\n#~ \"        x: self.x + other.x,\\n\"\n#~ \"        y: self.y + other.y,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn add(self, other: Self) -> Self::Output {\\n\"\n#~ \"    Self {\\n\"\n#~ \"        x: self.x + other.x,\\n\"\n#~ \"        y: self.y + other.y,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"impl std::ops::Sub for Point { type Output = Self;\"\n#~ msgstr \"impl std::ops::Sub for Point { type Output = Self;\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"fn sub(self, other: Self) -> Self::Output {\\n\"\n#~ \"    Self {\\n\"\n#~ \"        x: self.x - other.x,\\n\"\n#~ \"        y: self.y - other.y,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"fn sub(self, other: Self) -> Self::Output {\\n\"\n#~ \"    Self {\\n\"\n#~ \"        x: self.x - other.x,\\n\"\n#~ \"        y: self.y - other.y,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Polygon pub struct Polygon { // ANCHOR_END: Polygon points: Vec\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Polygon pub struct Polygon { // ANCHOR_END: Polygon points: Vec\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Polygon-impl impl Polygon { // ANCHOR_END: Polygon-impl pub fn \"\n#~ \"new() -> Polygon { Polygon { points: Vec::new() } }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Polygon-impl impl Polygon { // ANCHOR_END: Polygon-impl pub fn \"\n#~ \"new() -> Polygon { Polygon { points: Vec::new() } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn add_point(&mut self, point: Point) {\\n\"\n#~ \"    self.points.push(point);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn add_point(&mut self, point: Point) {\\n\"\n#~ \"    self.points.push(point);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn left_most_point(&self) -> Option<Point> {\\n\"\n#~ \"    self.points.iter().min_by_key(|p| p.x).copied()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn left_most_point(&self) -> Option<Point> {\\n\"\n#~ \"    self.points.iter().min_by_key(|p| p.x).copied()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn iter(&self) -> impl Iterator<Item = &Point> {\\n\"\n#~ \"    self.points.iter()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn iter(&self) -> impl Iterator<Item = &Point> {\\n\"\n#~ \"    self.points.iter()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn length(&self) -> f64 {\\n\"\n#~ \"    if self.points.is_empty() {\\n\"\n#~ \"        return 0.0;\\n\"\n#~ \"    }\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn length(&self) -> f64 {\\n\"\n#~ \"    if self.points.is_empty() {\\n\"\n#~ \"        return 0.0;\\n\"\n#~ \"    }\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let mut result = 0.0;\\n\"\n#~ \"    let mut last_point = self.points[0];\\n\"\n#~ \"    for point in &self.points[1..] {\\n\"\n#~ \"        result += last_point.dist(*point);\\n\"\n#~ \"        last_point = *point;\\n\"\n#~ \"    }\\n\"\n#~ \"    result += last_point.dist(self.points[0]);\\n\"\n#~ \"    result\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let mut result = 0.0;\\n\"\n#~ \"    let mut last_point = self.points[0];\\n\"\n#~ \"    for point in &self.points[1..] {\\n\"\n#~ \"        result += last_point.dist(*point);\\n\"\n#~ \"        last_point = *point;\\n\"\n#~ \"    }\\n\"\n#~ \"    result += last_point.dist(self.points[0]);\\n\"\n#~ \"    result\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Circle pub struct Circle { // ANCHOR_END: Circle center: \"\n#~ \"Point, radius: i32, }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Circle pub struct Circle { // ANCHOR_END: Circle center: \"\n#~ \"Point, radius: i32, }\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Circle-impl impl Circle { // ANCHOR_END: Circle-impl pub fn \"\n#~ \"new(center: Point, radius: i32) -> Circle { Circle { center, radius } }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Circle-impl impl Circle { // ANCHOR_END: Circle-impl pub fn \"\n#~ \"new(center: Point, radius: i32) -> Circle { Circle { center, radius } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn circumference(&self) -> f64 {\\n\"\n#~ \"    2.0 * std::f64::consts::PI * f64::from(self.radius)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn circumference(&self) -> f64 {\\n\"\n#~ \"    2.0 * std::f64::consts::PI * f64::from(self.radius)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"pub fn dist(&self, other: &Self) -> f64 {\\n\"\n#~ \"    self.center.dist(other.center)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"pub fn dist(&self, other: &Self) -> f64 {\\n\"\n#~ \"    self.center.dist(other.center)\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Shape pub enum Shape { Polygon(Polygon), Circle(Circle), } // \"\n#~ \"ANCHOR_END: Shape\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Shape pub enum Shape { Polygon(Polygon), Circle(Circle), } // \"\n#~ \"ANCHOR_END: Shape\"\n\n#~ msgid \"impl From\"\n#~ msgstr \"impl From\"\n\n#~ msgid \"\"\n#~ \" for Shape { fn from(poly: Polygon) -> Self { Shape::Polygon(poly) } }\"\n#~ msgstr \"\"\n#~ \" for Shape { fn from(poly: Polygon) -> Self { Shape::Polygon(poly) } }\"\n\n#~ msgid \"\"\n#~ \" for Shape { fn from(circle: Circle) -> Self { Shape::Circle(circle) } }\"\n#~ msgstr \"\"\n#~ \" for Shape { fn from(circle: Circle) -> Self { Shape::Circle(circle) } }\"\n\n#~ msgid \"\"\n#~ \"impl Shape { pub fn perimeter(&self) -> f64 { match self { Shape::\"\n#~ \"Polygon(poly) => poly.length(), Shape::Circle(circle) => circle.\"\n#~ \"circumference(), } } }\"\n#~ msgstr \"\"\n#~ \"impl Shape { pub fn perimeter(&self) -> f64 { match self { Shape::\"\n#~ \"Polygon(poly) => poly.length(), Shape::Circle(circle) => circle.\"\n#~ \"circumference(), } } }\"\n\n#~ msgid \"// ANCHOR: unit-tests \\\\#\\\\[cfg(test)\\\\] mod tests { use super::\\\\*;\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: unit-tests \\\\#\\\\[cfg(test)\\\\] mod tests { use super::\\\\*;\"\n\n#~ msgid \"fn main() {}\"\n#~ msgstr \"fn main() {}\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: luhn pub fn luhn(cc_number: &str) -> bool { // ANCHOR_END: \"\n#~ \"luhn let mut digits_seen = 0; let mut sum = 0; for (i, ch) in cc_number.\"\n#~ \"chars().rev().filter(|&ch| ch != ' ').enumerate() { match ch.to_digit(10) \"\n#~ \"{ Some(d) => { sum += if i % 2 == 1 { let dd = d * 2; dd / 10 + dd % 10 } \"\n#~ \"else { d }; digits_seen += 1; } None => return false, } }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: luhn pub fn luhn(cc_number: &str) -> bool { // ANCHOR_END: \"\n#~ \"luhn let mut digits_seen = 0; let mut sum = 0; for (i, ch) in cc_number.\"\n#~ \"chars().rev().filter(|&ch| ch != ' ').enumerate() { match ch.to_digit(10) \"\n#~ \"{ Some(d) => { sum += if i % 2 == 1 { let dd = d * 2; dd / 10 + dd % 10 } \"\n#~ \"else { d }; digits_seen += 1; } None => return false, } }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"if digits_seen < 2 {\\n\"\n#~ \"    return false;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"if digits_seen < 2 {\\n\"\n#~ \"    return false;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"sum % 10 == 0\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"sum % 10 == 0\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"fn main() { let cc_number = \\\"1234 5678 1234 5670\\\"; println!( \\\"Is {} a \"\n#~ \"valid credit card number? {}\\\", cc_number, if luhn(cc_number) { \\\"yes\\\" } \"\n#~ \"else { \\\"no\\\" } ); }\"\n#~ msgstr \"\"\n#~ \"fn main() { let cc_number = \\\"1234 5678 1234 5670\\\"; println!( \\\"Czy {} \"\n#~ \"to prawidłowy numer karty kredytowej? {}\\\", cc_number, if luhn(cc_number) \"\n#~ \"{ \\\"tak\\\" } else { \\\"nie\\\" } ); }\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: unit-tests \\\\#\\\\[test\\\\] fn test_non_digit_cc_number() \"\n#~ \"{ assert!(!luhn(\\\"foo\\\")); }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: unit-tests \\\\#\\\\[test\\\\] fn test_non_digit_cc_number() \"\n#~ \"{ assert!(!luhn(\\\"foo\\\")); }\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_invalid_cc_number() { assert!(!luhn(\\\"4223 9826 \"\n#~ \"4026 9299\\\")); assert!(!luhn(\\\"4539 3195 0343 6476\\\")); assert!(!\"\n#~ \"luhn(\\\"8273 1232 7352 0569\\\")); } // ANCHOR_END: unit-tests\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[test\\\\] fn test_invalid_cc_number() { assert!(!luhn(\\\"4223 9826 \"\n#~ \"4026 9299\\\")); assert!(!luhn(\\\"4539 3195 0343 6476\\\")); assert!(!\"\n#~ \"luhn(\\\"8273 1232 7352 0569\\\")); } // ANCHOR_END: unit-tests\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: prefix_matches pub fn prefix_matches(prefix: &str, \"\n#~ \"request_path: &str) -> bool { // ANCHOR_END: prefix_matches let prefixes \"\n#~ \"= prefix.split('/'); let request_paths = request_path .split('/') .map(|\"\n#~ \"p| Some(p)) .chain(std::iter::once(None));\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: prefix_matches pub fn prefix_matches(prefix: &str, \"\n#~ \"request_path: &str) -> bool { // ANCHOR_END: prefix_matches let prefixes \"\n#~ \"= prefix.split('/'); let request_paths = request_path .split('/') .map(|\"\n#~ \"p| Some(p)) .chain(std::iter::once(None));\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"for (prefix, request_path) in prefixes.zip(request_paths) {\\n\"\n#~ \"    match request_path {\\n\"\n#~ \"        Some(request_path) => {\\n\"\n#~ \"            if (prefix != \\\"*\\\") && (prefix != request_path) {\\n\"\n#~ \"                return false;\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"        None => return false,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"true\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"for (prefix, request_path) in prefixes.zip(request_paths) {\\n\"\n#~ \"    match request_path {\\n\"\n#~ \"        Some(request_path) => {\\n\"\n#~ \"            if (prefix != \\\"*\\\") && (prefix != request_path) {\\n\"\n#~ \"                return false;\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"        None => return false,\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"true\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: unit-tests \\\\#\\\\[test\\\\] fn test_matches_without_wildcard() \"\n#~ \"{ assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc-123\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/books\\\"));\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: unit-tests \\\\#\\\\[test\\\\] fn test_matches_without_wildcard() \"\n#~ \"{ assert!(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc-123\\\")); assert!\"\n#~ \"(prefix_matches(\\\"/v1/publishers\\\", \\\"/v1/publishers/abc/books\\\"));\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: setup pub trait Widget { /// Natural width of `self`. fn \"\n#~ \"width(&self) -> usize;\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: setup pub trait Widget { /// Naturalna szerokość `self`. fn \"\n#~ \"width(&self) -> usize;\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Window-width impl Widget for Window { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Window-width std::cmp::max( self.title.chars().count(), \"\n#~ \"self.widgets.iter().map(|w| w.width()).max().unwrap_or(0), ) }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Window-width impl Widget for Window { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Window-width std::cmp::max( self.title.chars().count(), \"\n#~ \"self.widgets.iter().map(|w| w.width()).max().unwrap_or(0), ) }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Window-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Window-draw_into\\n\"\n#~ \"    let mut inner = String::new();\\n\"\n#~ \"    for widget in &self.widgets {\\n\"\n#~ \"        widget.draw_into(&mut inner);\\n\"\n#~ \"    }\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Window-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Window-draw_into\\n\"\n#~ \"    let mut inner = String::new();\\n\"\n#~ \"    for widget in &self.widgets {\\n\"\n#~ \"        widget.draw_into(&mut inner);\\n\"\n#~ \"    }\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    let window_width = self.width();\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    let window_width = self.width();\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Button-width impl Widget for Button { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Button-width self.label.width() + 8 // add a bit of \"\n#~ \"padding }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Button-width impl Widget for Button { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Button-width self.label.width() + 8 // dodaj trochę \"\n#~ \"wypełnienia }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Button-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Button-draw_into\\n\"\n#~ \"    let width = self.width();\\n\"\n#~ \"    let mut label = String::new();\\n\"\n#~ \"    self.label.draw_into(&mut label);\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Button-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Button-draw_into\\n\"\n#~ \"    let width = self.width();\\n\"\n#~ \"    let mut label = String::new();\\n\"\n#~ \"    self.label.draw_into(&mut label);\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"    writeln!(buffer, \\\"+{:-<width$}+\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    for line in label.lines() {\\n\"\n#~ \"        writeln!(buffer, \\\"|{:^width$}|\\\", &line).unwrap();\\n\"\n#~ \"    }\\n\"\n#~ \"    writeln!(buffer, \\\"+{:-<width$}+\\\", \\\"\\\").unwrap();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"    writeln!(buffer, \\\"+{:-<width$}+\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    for line in label.lines() {\\n\"\n#~ \"        writeln!(buffer, \\\"|{:^width$}|\\\", &line).unwrap();\\n\"\n#~ \"    }\\n\"\n#~ \"    writeln!(buffer, \\\"+{:-<width$}+\\\", \\\"\\\").unwrap();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Label-width impl Widget for Label { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Label-width self.label .lines() .map(|line| line.chars().\"\n#~ \"count()) .max() .unwrap_or(0) }\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Label-width impl Widget for Label { fn width(&self) -> usize \"\n#~ \"{ // ANCHOR_END: Label-width self.label .lines() .map(|line| line.chars().\"\n#~ \"count()) .max() .unwrap_or(0) }\"\n\n#~ msgid \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Label-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Label-draw_into\\n\"\n#~ \"    writeln!(buffer, \\\"{}\\\", &self.label).unwrap();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```\\n\"\n#~ \"// ANCHOR: Label-draw_into\\n\"\n#~ \"fn draw_into(&self, buffer: &mut dyn std::fmt::Write) {\\n\"\n#~ \"    // ANCHOR_END: Label-draw_into\\n\"\n#~ \"    writeln!(buffer, \\\"{}\\\", &self.label).unwrap();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: ffi mod ffi { use std::os::raw::{c_char, c_int, c_long, \"\n#~ \"c_ulong, c_ushort};\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: ffi mod ffi { use std::os::raw::{c_char, c_int, c_long, \"\n#~ \"c_ulong, c_ushort};\"\n\n#~ msgid \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct DirectoryIterator { path: CString, dir: \"\n#~ \"\\\\*mut ffi::DIR, } // ANCHOR_END: ffi\"\n#~ msgstr \"\"\n#~ \"\\\\#\\\\[derive(Debug)\\\\] struct DirectoryIterator { path: CString, dir: \"\n#~ \"\\\\*mut ffi::DIR, } // ANCHOR_END: ffi\"\n\n#, fuzzy\n#~ msgid \"Day 4 Morning Exercise\"\n#~ msgstr \"Dzień 4 Poranna gimnastyka\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"struct Philosopher { name: String, // ANCHOR_END: Philosopher left_fork: \"\n#~ \"Arc\\\\<Mutex\"\n#~ msgstr \"\"\n#~ \"struktura Filozof { imię: Ciąg, // ANCHOR_END: Filozof left_fork: \"\n#~ \"Arc\\\\<Mutex\"\n\n#, fuzzy\n#~ msgid \"\\\\>, right_fork: Arc\\\\<Mutex\"\n#~ msgstr \"\\\\>, right_fork: Arc\\\\<Mutex\"\n\n#, fuzzy\n#~ msgid \"\\\\>, thoughts: mpsc::SyncSender\"\n#~ msgstr \"\\\\>, myśli: mpsc::SyncSender\"\n"
  },
  {
    "path": "po/pt-BR.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-07-09T12:20:23-07:00\\n\"\n\"PO-Revision-Date: 2023-08-25 09:32-0700\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\n\"\n\"Language: pt_BR\\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 src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Bem-vindos ao Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Conduzindo o Curso\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Estrutura do Curso\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Atalhos de Teclado\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Traduções\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Usando o Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"O Ecossistema do Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Exemplos de Código\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Executando o Cargo Localmente\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Dia 1: Manhã\"\n\n#: src/SUMMARY.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Bem-vindos\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Olá, Mundo\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"O que é Rust?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Benefícios do Rust\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Tipos e Valores\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variáveis\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Valores\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Aritimética\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Inferência de Tipo\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Exercício: Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Solução\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Fundamentos de Controle de Fluxo\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Expressões `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"_Loops_\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` e `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Rótulos (_Labels_)\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Blocos e Escopos\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Escopos e _Shadowing_ (Sobreposição)\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funções\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Macros\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Exercício: Sequência de Collatz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Dia 1: Tarde\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Tuplas e Matrizes\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Matrizes\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Tuplas\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Iterator de Matrizes\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Padrões e Desestruturação\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Exercício: Matrizes Aninhadas\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Referências\"\n\n#: src/SUMMARY.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Referências Compartilhadas\"\n\n#: src/SUMMARY.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Referências Exclusivas\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Slices: `&[T]`\"\n\n#: src/SUMMARY.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Strings\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Exercício: Geometria\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Tipos Definidos pelo Usuário\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"_Structs_ (Estruturas) Nomeadas\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"_Structs_ de Tuplas\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"_Enums_ (Enumerações)\"\n\n#: src/SUMMARY.md\nmsgid \"Static\"\nmsgstr \"Static\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"_Aliases_ (Apelidos) de Tipo\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Exercício: Eventos de Elevador\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Dia 2: Manhã\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Correspondência de Padrões\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Correspondendo Valores\"\n\n#: src/SUMMARY.md\nmsgid \"Destructuring Structs\"\nmsgstr \"Desestruturando Structs\"\n\n#: src/SUMMARY.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Desestruturando Enums\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Controle de Fluxo _Let_\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Exercício: Avaliação de Expressões\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Métodos e _Traits_\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Métodos\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"_Traits_\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Implementando _Traits_\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"_Supertraits_\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Tipos Associados\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Derivando\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Exercício: _Logger_ Genérico\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Dia 2: Tarde\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Genéricos (_Generics_)\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Funções Genéricas\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Tipos de Dados Genéricos\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"_Traits_ Genéricos\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"_Trait Bounds_ (Limites de Trait)\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Exercício: `min` Genérico\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Tipos da Biblioteca Padrão\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Biblioteca Padrão\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Documentação\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Exercício: Contador\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"_Traits_ da Biblioteca Padrão\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Comparações\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Operadores\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` e `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Conversões\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` e `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, sintaxe de atualização de _struct_\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Closures\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Exercício: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Dia 3: Manhã\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Gerenciamento de Memória\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Revisão da Memória de Programa\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Abordagens para Gerenciamento de Memória\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Ownership\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Semântica de Movimento\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Tipos Copiáveis\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Exercício: Tipo Builder\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Ponteiros Inteligentes (_Smart Pointers_)\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Objetos de Trait Proprietários\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Exercício: Árvore Binária\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Dia 3: Tarde\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Empréstimo (_Borrowing_)\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Emprestando um Valor\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Verificação de Empréstimo\"\n\n#: src/SUMMARY.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Erros de Empréstimo\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Mutabilidade Interior\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Exercício: Estatísticas de Saúde\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Tempos de Vida (_Lifetimes_)\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Anotações de Tempo de Vida\"\n\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Elisão de Tempo de Vida\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Tempos de Vida de _Structs_\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Exercício: Análise de Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Dia 4: Manhã\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Iteradores\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Exercício: Encadeamento de Métodos de Iterador\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Módulos\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Hierarquia do Sistema de Arquivos\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Visibilidade\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Exercício: Módulos para uma Biblioteca GUI\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Testes\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Módulos de Teste\"\n\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Outros Tipos de Testes\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"_Lints_ do Compilador e Clippy\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Exercício: Algoritmo de Luhn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Dia 4: Tarde\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Tratamento de Erros\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Pânicos (_Panics_)\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Operador _Try_\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Conversões _Try_\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Trait `Error`\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` e `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Exercício: Reescrevendo com `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust Inseguro (_Unsafe_)\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"Inseguro (_Unsafe_)\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Desreferenciando Ponteiros Brutos\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Variáveis Estáticas Mutáveis\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Uniões\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Funções Inseguras\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Traits Inseguros\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Exercício: _Wrapper_ FFI\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Configuração\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Regras de Compilação (_Build Rules_)\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Binários\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Bibliotecas\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Tutorial do Serviço de Aniversário\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Interface\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"API de Serviço\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Serviço\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Servidor\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Implantar\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Cliente\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Alterando API\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Atualizando Implementações\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"Tipos AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Tipos Primitivos\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Tipos de Matriz\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Enviando Objetos\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"_Parcelables_\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Enviando Arquivos\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"_Mocking_\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Gerando Registros (Log)\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interoperabilidade\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Com C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Chamando C com Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Chamando Rust do C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Com C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"O Módulo _Bridge_\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"_Bridge_ Rust \"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"C++ Gerado\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"Bridge C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Tipos Compartilhados\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"_Enums_ Compartilhados\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Tratamento de Erros do Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Tratamento de Erros do C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Tipos Adicionais\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Compilando para Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Compilando para Android: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Compilando para Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Com Java\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Exercícios\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Comparando os Ecossistemas do Chromium e do Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Política\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Código Inseguro (_Unsafe_)\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Dependendo de Código Rust do C++ do Chromium\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Exercício\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Biblioteca `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Regras GN para Testes em Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"Macro `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperabilidade com C++\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Exemplo de _Bindings_\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Limitações do CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Tratamento de Erros do CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Tratamento de Erros: Exemplo de QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Tratamento de Erros: Exemplo de PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Usando CXX no Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Adicionando _Crates_ de Terceiros\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Configurando Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Configurando `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Baixando _Crates_\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Gerando Regras de Compilação `gn`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Resolvendo Problemas\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Scripts de Compilação que Geram Código\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"Scripts de Compilação que Compilam C++ ou Tomam Ações Arbitrárias\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Dependendo de um _Crate_\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Revisões e Auditorias\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Submetendo ao Código Fonte do Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Mantendo _Crates_ Atualizados\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Juntando Tudo - Exercício\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Soluções dos Exercícios\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal: Manhã\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Um Pequeno Exemplo\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Microcontroladores\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO Bruto\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PACs\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"_Crates_ HAL\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"_Crates_ de Suporte à Placa\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"O Padrão de Estado de Tipo\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` e `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Depuração\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Outros Projetos\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Bússola\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Soluções\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: Tarde\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Processadores de Aplicação\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Preparando-se para o Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Assembly In-line\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Vamos Escrever um Driver UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Mais _Traits_\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Um Driver UART Melhor\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"_Bitflags_\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Registradores Múltiplos\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"_Driver_\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Usando-o\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Exceções\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"_Crates_ Úteis\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Driver RTC\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concorrência: Manhã\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Threads\"\n\n#: src/SUMMARY.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Threads Simples\"\n\n#: src/SUMMARY.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Threads com Escopo\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Canais (_Channels_)\"\n\n#: src/SUMMARY.md src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Transmissores e Receptores\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Canais Ilimitados\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Canais Delimitados\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` e `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"_Traits_ Marker\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Exemplos\"\n\n#: src/SUMMARY.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Estado Compartilhado\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Exemplo\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Jantar dos Filósofos\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Verificador de Links Multi-Threads\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concorrência: Tarde\"\n\n#: src/SUMMARY.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Fundamentos de _Async_ (Assincronicidade)\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"_Futures_\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Tempos de Execução\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async/tasks.md src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Tarefas\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Canais e Controle de Fluxo\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Canais Assíncronos\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Armadilhas\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Bloqueando o Executor\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Traits Assíncronos\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Cancelamento\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Apliação de Chat de Transmissão\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Palavras Finais\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Obrigado!\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Glossário\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Outros recursos\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Créditos\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Workflow do GitHub](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[Contribuições no GitHub](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![Estrelas no GitHub](https://img.\"\n\"shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n\"(https://github.com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Este é um curso gratuito de Rust desenvolvido pela equipe do Android no \"\n\"Google. O curso abrange o espectro completo da linguagem, desde sintaxe \"\n\"básica até tópicos avançados como 'generics' e tratamento de erros.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"A versão mais recente do curso pode ser encontrada em <https://google.github.\"\n\"io/comprehensive-rust/>. Se você estiver lendo em outro lugar, por favor \"\n\"verifique lá por atualizações.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"O curso está disponível em outros idiomas. Selecione seu idioma preferido no \"\n\"canto superior direito da página ou verifique a página de [Traduções]\"\n\"(running-the-course/translations.md) para uma lista de todas as traduções \"\n\"disponíveis.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"O curso também está disponível [como PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"O objetivo do curso é ensinar Rust a você. Nós assumimos que você não saiba \"\n\"nada sobre Rust e esperamos:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\"Dar a você uma compreensão abrangente da linguagem e da sintaxe de Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Permitir que você modifique programas existentes e escreva novos programas \"\n\"em Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Demonstrar expressões idiomáticas comuns de Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"Nós chamamos os quatro primeiros dias do curso de Fundamentos do Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Em seguida, você está convidado(a) a mergulhar a fundo em um ou mais tópicos \"\n\"especializados:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): um curso de meio dia sobre a utilização de Rust no \"\n\"desenvolvimento para a plataforma Android (AOSP). Isto inclui \"\n\"interoperabilidade com C, C++ e Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): um curso de meio dia sobre a utilização de Rust em \"\n\"navegadores baseados em Chromium. Isto inclui interoperabilidade com C++ e \"\n\"como incluir _crates_ de terceiros no Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): uma aula de um dia sobre a utilização de Rust \"\n\"para o desenvolvimento \\\"bare metal\\\" (sistema embarcado). Tanto micro-\"\n\"controladores quanto processadores de aplicação são cobertos.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concorrência](concurrency.md): uma aula de um dia inteiro sobre \"\n\"concorrência em Rust. Nós cobrimos tanto concorrência clássica \"\n\"(escalonamento preemptivo utilizando threads e mutexes) quanto concorrência \"\n\"async/await (multitarefa cooperativa utilizando _futures_).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Fora do escopo\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust é uma linguagem extensa e não conseguiremos cobrir tudo em poucos dias. \"\n\"Alguns assuntos que não são objetivos deste curso são:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Aprender a criar macros: por favor confira [Capítulo 19.5 em Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) e [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) para esse fim.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Premissas\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"O curso pressupõe que você já saiba programar. Rust é uma linguagem de \"\n\"tipagem estática e ocasionalmente faremos comparações com C e C++ para \"\n\"melhor explicar ou contrastar a abordagem do Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Se você sabe programar em uma linguagem de tipagem dinâmica, como Python ou \"\n\"JavaScript, então você também será capaz de acompanhar.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Este é um exemplo de uma _nota do instrutor_. Nós as usaremos para adicionar \"\n\"informações complementares aos slides. Elas podem ser tanto pontos-chave que \"\n\"o instrutor deve cobrir quanto respostas a perguntas típicas que surgem em \"\n\"sala de aula.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Esta página é para o instrutor do curso.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Aqui estão algumas informações básicas sobre como estamos conduzindo o curso \"\n\"internamente no Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"Normalmente realizamos as aulas das 9h às 16h, com uma pausa de 1 hora para \"\n\"o almoço no meio. Isso deixa 3 horas para a aula da manhã e 3 horas para a \"\n\"aula da tarde. Ambas as sessões contêm várias pausas e tempo para os alunos \"\n\"trabalharem nos exercícios.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Antes de oferecer o curso, você precisa:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Familiarize-se com o material do curso. Incluímos notas do instrutor para \"\n\"ajudar a destacar os pontos principais (ajude-nos contribuindo com mais \"\n\"notas!). Ao apresentar, certifique-se de abrir as notas do instrutor em um \"\n\"pop-up (clique no link com uma pequena seta ao lado de \\\"Speaker Notes\\\" ou \"\n\"\\\"Notas do Instrutor\\\"). Desta forma você tem uma tela limpa para apresentar \"\n\"à turma.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Decida as datas. Como o curso leva pelo menos quatro dias completos, \"\n\"recomendamos que você agende os dias ao longo de duas semanas. Os \"\n\"participantes do curso disseram que eles acham útil ter um espaço no curso, \"\n\"pois os ajuda a processar todas as informações que lhes damos.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Encontre uma sala grande o suficiente para seus participantes presenciais. \"\n\"Recomendamos turmas de 15 a 25 pessoas. Isso é pequeno o suficiente para que \"\n\"as pessoas se sintam confortáveis fazendo perguntas --- também é pequeno o \"\n\"suficiente para que um instrutor tenha tempo para responder às perguntas. \"\n\"Certifique-se de que a sala tenha _mesas_ para você e para os alunos: todos \"\n\"vocês precisam ser capazes de sentar e trabalhar com seus laptops. Em \"\n\"particular, você fará muita codificação ao vivo como instrutor, portanto, um \"\n\"pódio não será muito útil para você.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"No dia do seu curso, chegue um pouco mais cedo na sala para acertar as \"\n\"coisas. Recomendamos apresentar diretamente usando `mdbook serve` rodando em \"\n\"seu laptop (consulte as [instruções de instalação](https://github.com/google/\"\n\"comprehensive-rust#building)). Isso garante um desempenho ideal sem atrasos \"\n\"conforme você muda de página. Usar seu laptop também permitirá que você \"\n\"corrija erros de digitação enquanto você ou os participantes do curso os \"\n\"identificam.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Deixe as pessoas resolverem os exercícios sozinhas ou em pequenos grupos. \"\n\"Normalmente gastamos de 30 a 45 minutos em exercícios pela manhã e à tarde \"\n\"(incluindo o tempo para revisar as soluções). Tenha certeza de perguntar às \"\n\"pessoas se elas estão em dificuldades ou se há algo em que você possa \"\n\"ajudar. Quando você vir que várias pessoas têm o mesmo problema, chame a \"\n\"turma e ofereça uma solução, por exemplo, mostrando às pessoas onde \"\n\"encontrar as informações relevantes na biblioteca padrão (\\\"standard \"\n\"library\\\").\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Isso é tudo, boa sorte no curso! Esperamos que seja tão divertido para você \"\n\"como tem sido para nós!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Por favor, [dê seu feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) depois para que possamos continuar melhorando o curso. \"\n\"Adoraríamos saber o que funcionou bem para você e o que pode ser melhorado. \"\n\"Seus alunos também são muito bem-vindos para [nos enviar feedback](https://\"\n\"github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Fundamentos do Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Os primeiros quatro dias compõem os [Fundamentos do Rust](../welcome-day-1.\"\n\"md). Os dias são rápidos e cobrimos bastante counteúdo!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Agenda do curso:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"Dia 1 Manhã (2 horas e 5 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Bem-vindos](../welcome-day-1.md) (5 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[Olá, Mundo](../hello-world.md) (15 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\nmsgstr \"[Tipos e Valores](../types-and-values.md) (40 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"\"\n\"[Fundamentos de Controle de Fluxo](../control-flow-basics.md) (40 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"Dia 1 Tarde (2 horas e 35 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tuplas e Matrizes](../tuples-and-arrays.md) (35 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (55 minutes)\"\nmsgstr \"[Referências](../references.md) (55 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\"[Tipos Definidos pelo(a) Usuário(a)](../user-defined-types.md) (50 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Dia 2 Manhã (2 horas and 10 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](../welcome-day-2.md) (3 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[Correspondência de Padrões](../pattern-matching.md) (1 hora)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Métodos e Traits](../methods-and-traits.md) (50 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"Dia 2 Tarde (3 horas e 15 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (45 minutes)\"\nmsgstr \"[Genéricos](../generics.md) (45 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour)\"\nmsgstr \"[Tipos da Biblioteca Padrão](../std-types.md) (1 hora)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 10 minutes)\"\nmsgstr \"[Traits da Biblioteca Padrão](../std-traits.md) (1 hora e 10 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"Dia 3 Manhã (2 horas and 20 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](../welcome-day-3.md) (3 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[Gerenciamento de Memória](../memory-management.md) (1 hora)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[Smart Pointers](../smart-pointers.md) (55 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"Dia 3 Tarde (1 hora and 55 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (55 minutes)\"\nmsgstr \"[Empréstimo](../borrowing.md) (55 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\nmsgstr \"[Tempos de Vida](../lifetimes.md) (50 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"Dia 4 Manhã (2 horas and 40 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](../welcome-day-4.md) (3 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[Iteradores](../iterators.md) (45 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[Módulos](../modules.md) (40 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[Testes](../testing.md) (45 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"Dia 4 Tarde (2 horas and 15 minutos, incluindo intervalos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (1 hour)\"\nmsgstr \"[Tratamento de Erros](../error-handling.md) (1 hora)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[Rust Inseguro](../unsafe-rust.md) (1 hora e 5 minutos)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Análises Detalhadas\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Além do curso de 4 dias sobre Fundamentos de Rust, nós abordamos alguns \"\n\"tópicos mais especializados:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust para Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"O [Rust para Android](../android.md) é um curso de meio dia sobre o uso de \"\n\"Rust para o desenvolvimento na plataforma Android. Isso inclui \"\n\"interoperabilidade com C, C++ e Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Você precisará de um [_checkout_ do AOSP](https://source.android.com/docs/\"\n\"setup/download/downloading). Faça um checkout do [repositório do curso]\"\n\"(https://github.com/google/comprehensive-rust) no mesmo computador e mova o \"\n\"diretório `src/android/` para a raiz do seu checkout do AOSP. Isso garantirá \"\n\"que o sistema de compilação do Android veja os arquivos `Android.bp` em `src/\"\n\"android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Certifique-se de que `adb sync` funcione com seu emulador ou dispositivo \"\n\"físico e pré-compile todos os exemplos do Android usando `src/android/\"\n\"build_all.sh`. Leia o roteiro para ver os comandos executados e verifique se \"\n\"eles funcionam quando você os executa manualmente.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust para Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"O [Rust para Chromium](../chromium.md) é um curso de meio dia sobre o uso de \"\n\"Rust como parte do navegador Chromium. Ele inclui o uso de Rust no sistema \"\n\"de compilação `gn` do Chromium, a inclusão de bibliotecas de terceiros \"\n\"(\\\"_crates_\\\") e interoperabilidade com C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Você precisará ser capaz de compilar o Chromium --- uma compilação de \"\n\"componentes de depuração é [recomendada](../chromium/setup.md) para \"\n\"velocidade, mas qualquer compilação funcionará. Certifique-se de que você \"\n\"possa executar o navegador Chromium que você compilou.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust _Bare-Metal_\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"O [Rust _Bare-Metal_](../bare-metal.md) é uma aula de um dia inteiro sobre o \"\n\"uso de Rust para o desenvolvimento _bare-metal_ (sistema embarcado). Tanto \"\n\"micro-controladores quanto processadores de aplicação são cobertos.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Para a parte do micro-controlador, você precisará comprar a placa de \"\n\"desenvolvimento [BBC micro:bit](https://microbit.org/) v2 com antecedência. \"\n\"Todos precisarão instalar vários pacotes, conforme descrito na [página \"\n\"inicial](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Concorrência em Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Concorrência em Rust](../concurrency.md) é uma aula de um dia sobre \"\n\"concorrência clássica e concorrência `async`/`await`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Você precisará de um novo _crate_ configurado e as dependências baixadas e \"\n\"prontas para uso. Você pode então copiar/colar os exemplos para `src/main.\"\n\"rs` para experimentá-los:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"{{%course outline Concurrency}}\"\nmsgstr \"{{%course outline Concurrency}}\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Formato\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"O curso foi projetado para ser bastante interativo e recomendamos deixar as \"\n\"perguntas conduzirem a exploração do Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Existem vários atalhos de teclado úteis no _mdBook_:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Seta para a esquerda\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Vai para a página anterior.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Seta para a direita\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Vai para a próxima página.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Executa o exemplo de código que tem o foco.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Ativa a barra de pesquisa.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"O curso foi traduzido para outros idiomas por um grupo de voluntários \"\n\"maravilhosos:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Português do Brasil](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"por [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) e \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Chinês (Simplificado)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"por [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK) e [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Chinês (Tradicional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"por [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen) e [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[Japonês](https://google.github.io/comprehensive-rust/ja/) por [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) e \"\n\"[@kantasv](https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Coreano](https://google.github.io/comprehensive-rust/ko/) por [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), e [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Espanhol](https://google.github.io/comprehensive-rust/es/) por [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[Ucraniano](https://google.github.io/comprehensive-rust/uk/) por [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) e [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Use o seletor de idioma no canto superior direito para alternar entre os \"\n\"idiomas.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Traduções Incompletas\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Há um grande número de traduções em andamento. Nós referenciamos as \"\n\"traduções mais recentemente atualizadas:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[Árabe](https://google.github.io/comprehensive-rust/ar/) por [@younies]\"\n\"(https://github.com/younies)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) por [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Francês](https://google.github.io/comprehensive-rust/fr/) por [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) e \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Alemão](https://google.github.io/comprehensive-rust/de/) por [@Throvn]\"\n\"(https://github.com/Throvn) e [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Italiano](https://google.github.io/comprehensive-rust/it/) por \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) e [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Se você quiser ajudar com essa iniciativa, consulte [nossas instruções]\"\n\"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) \"\n\"sobre como proceder. As traduções são coordenadas no _[issue tracker]\"\n\"(https://github.com/google/comprehensive-rust/issues/282)_.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Quando você começar a ler sobre Rust, logo conhecerá o [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), a ferramenta padrão usada no ecossistema Rust para \"\n\"criar e executar aplicativos Rust. Aqui nós queremos dar uma breve visão \"\n\"geral do que é o Cargo e como ele se encaixa no ecossistema mais amplo e \"\n\"como ele se encaixa neste treinamento.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Instalação\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Por favor, siga as instruções em <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Isso fornecerá a ferramenta de compilação Cargo (`cargo`) e o compilador \"\n\"Rust (`rustc`). Você também obterá o `rustup`, um utilitário de linha de \"\n\"comando que você pode usar para instalar diferentes versões do compilador.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Depois de instalar o Rust, você deve configurar seu editor ou IDE para \"\n\"trabalhar com o Rust. A maioria dos editores faz isso conversando com o \"\n\"[rust-analyzer](https://rust-analyzer.github.io/), que fornece auto-\"\n\"completar e funcionalidade de salto para definição para [VS Code](https://\"\n\"code.visualstudio.com/), [Emacs](https://rust-analyzer.github.io/manual.\"\n\"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) e muitos outros. Também há um IDE diferente disponível \"\n\"chamado [RustRover](https://www.jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"No Debian/Ubuntu, você também pode instalar o Cargo, o código-fonte do Rust \"\n\"e o [formatador Rust](https://github.com/rust-lang/rustfmt) com `apt`. \"\n\"Entretanto, isto lhe fornece uma versão desatualizada do Rust e pode levar a \"\n\"comportamentos inesperados. O comando seria:\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"No macOS, você pode usar o [Homebrew](https://brew.sh/) para instalar o \"\n\"Rust, mas isso pode fornecer uma versão desatualizada. Portanto, é \"\n\"recomendado instalar o Rust a partir do site oficial.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"O Ecossistema Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"O ecossistema Rust consiste em várias ferramentas, das quais as principais \"\n\"são:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: o compilador Rust que converte arquivos `.rs` em binários e outros \"\n\"formatos intermediários.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: o gerenciador de dependências e ferramenta de compilação do Rust. O \"\n\"Cargo sabe como baixar dependências, normalmente hospedadas em <https://\"\n\"crates.io>, e as passará para o `rustc` quando compilar o seu projeto. O \"\n\"Cargo também vem com um gerenciador de testes embutido que é utilizado para \"\n\"a execução de testes unitários.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: o instalador e atualizador do conjunto de ferramentas do Rust. \"\n\"Esta ferramenta é utilizada para instalar e atualizar o `rustc` e o `cargo` \"\n\"quando novas versões do Rust forem lançadas. Além disso, `rustup` também \"\n\"pode baixar a documentação da biblioteca padrão. Você pode ter múltiplas \"\n\"versões do Rust instaladas ao mesmo tempo e `rustup` permitirá que você \"\n\"alterne entre elas conforme necessário.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Pontos chave:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"O Rust tem um cronograma de lançamento rápido com um novo lançamento saindo \"\n\"a cada seis semanas. Novos lançamentos mantêm compatibilidade com versões \"\n\"anteriores — além disso, eles habilitam novas funcionalidades.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"Existem três canais de lançamento: _\\\"stable\\\"_, _\\\"beta\\\"_ e _\\\"nightly\\\"_.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Novos recursos estão sendo testados em \\\"nightly\\\", \\\"beta\\\" é o que se \"\n\"torna \\\"stable\\\" a cada seis semanas.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Dependências também podem ser resolvidas a partir de [registros](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html) alternativos, git, pastas, e \"\n\"outros mais.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"O Rust também tem [edições](https://doc.rust-lang.org/edition-guide/): a \"\n\"edição atual é o Rust 2021. As edições anteriores foram o Rust 2015 e o Rust \"\n\"2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"As edições podem fazer alterações incompatíveis com versões anteriores da \"\n\"linguagem.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Para evitar quebra de código, as edições são opcionais: você seleciona a \"\n\"edição para o seu _crate_ através do arquivo `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Para evitar a divisão do ecossistema, os compiladores Rust podem misturar \"\n\"código escrito para diferentes edições.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Mencione que é muito raro usar o compilador diretamente, não através do \"\n\"`cargo` (a maioria dos usuários nunca o faz).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Pode valer a pena mencionar que o próprio Cargo é uma ferramenta \"\n\"extremamente poderosa e abrangente. Ele é capaz de muitos recursos \"\n\"avançados, incluindo, entre outros:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Estrutura do projeto/pacote\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[Espaços de trabalho](https://doc.rust-lang.org/cargo/reference/workspaces.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Dependências de desenvolvimento e gerenciamento/cache de dependência de \"\n\"tempo de execução\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[Criar scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[Instalação global](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Também é extensível com plugins de sub-comando (tais como [cargo clippy]\"\n\"(https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Leia mais no [Livro Oficial do Cargo](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Exemplos de Código neste Treinamento\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Para este treinamento, exploraremos principalmente a linguagem Rust por meio \"\n\"de exemplos que podem ser executados através do seu navegador. Isso torna a \"\n\"instalação muito mais fácil e garante uma experiência consistente para todos.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"A instalação do Cargo ainda assim é incentivada: será mais fácil para você \"\n\"fazer os exercícios. No último dia, faremos um exercício maior que mostra \"\n\"como trabalhar com dependências e para isso você precisará do Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Os blocos de código neste curso são totalmente interativos:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Edite-me!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Você pode usar \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \"para executar o código quando o foco estiver na caixa de texto.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"A maioria dos exemplos de código são editáveis, como mostrado acima. Alguns \"\n\"exemplos de código não são editáveis por vários motivos:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Os _playgrounds_ embutidos não conseguem executar testes unitários. Copie o \"\n\"código e cole no _Playground_ real para demonstrar os testes unitários.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Os _playgrounds_ embutidos perdem seu estado no momento em que você navega \"\n\"para outra página! Esta é a razão pela qual os alunos devem resolver os \"\n\"exercícios usando uma instalação do Rust local ou via Playground real.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Executando Código Localmente com o Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Se você quiser experimentar o código em seu próprio sistema, precisará \"\n\"primeiro instalar o Rust. Faça isso seguindo as [instruções no Livro do Rust]\"\n\"(https://doc.rust-lang.org/book/ch01-01-installation.html). Isso deve \"\n\"fornecer o `rustc` e o `cargo` funcionando. Quando este curso foi escrito, \"\n\"as últimas versões estáveis do Rust são:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Você também pode usar qualquer versão posterior, pois o Rust mantém \"\n\"compatibilidade com versões anteriores.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Com isso finalizado, siga estas etapas para criar um binário Rust a partir \"\n\"de um dos exemplos deste treinamento:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Clique no botão _\\\"Copy to clipboard\\\"_ (\\\"Copiar para a área de \"\n\"transferência\\\") no exemplo que deseja copiar.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Use `cargo new exercise` para criar um novo diretório `exercise/` para o seu \"\n\"código:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Navegue até `exercise/` e use `cargo run` para compilar e executar seu \"\n\"binário:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Substitua o código gerado em `src/main.rs` pelo seu próprio código. Por \"\n\"exemplo, usando o exemplo da página anterior, faça `src/main.rs` parecer como\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"Use `cargo run` para compilar e executar seu binário atualizado:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Use `cargo check` para verificar rapidamente se há erros em seu projeto, use \"\n\"`cargo build` para compilá-lo sem executá-lo. Você encontrará a saída em \"\n\"`target/debug/` para uma compilação de depuração normal. Use `cargo build --\"\n\"release` para produzir um binário otimizado em `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Você pode adicionar dependências para seu projeto editando `Cargo.toml`. \"\n\"Quando você execute os comandos `cargo`, ele irá baixar e compilar \"\n\"automaticamente dependências para você.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Tente encorajar os participantes do curso a instalar o Cargo e usar um \"\n\"editor local. Isso facilitará a vida deles, pois eles terão um ambiente \"\n\"normal de desenvolvimento.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Bem-vindos ao Dia 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Este é o primeiro dia de Fundamentos do Rust. Nós iremos cobrir muitos \"\n\"pontos hoje:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Sintaxe Rust básica: variáveis, tipos escalares e compostos, enums, structs, \"\n\"referências, funções e métodos.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Tipos e Inferência de Tipo\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\"Construções de fluxo de controle: loops, condicionais, e assim por diante.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"Tipos definidos pelo usuário: structs e enums.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\"Correspondência de padrões: desestruturando enums, structs, e matrizes.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Agenda\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"In this session:\"\nmsgstr \"Nesta sessão:\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Bem-vindos](./welcome-day-1.md) (5 minutos)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[Olá, Mundo](./hello-world.md) (15 minutos)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\nmsgstr \"[Tipos e Valores](./types-and-values.md) (40 minutos)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"\"\n\"[Fundamentos de Fluxo de Controle](./control-flow-basics.md) (40 minutos)\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve durar cerca de 2 horas e 5 \"\n\"minutos\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Lembre aos alunos que:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"Eles devem fazer perguntas na hora, não as guarde para o fim.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"A aula é para ser interativa e as discussões são muito encorajadas!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Como instrutor, você deve tentar manter as discussões relevantes, ou seja, \"\n\"mantenha as discussões relacionadas a como o Rust faz as coisas versus \"\n\"alguma outra linguagem. Pode ser difícil encontrar o equilíbrio certo, mas \"\n\"procure permitir mais discussões, uma vez que elas engajam as pessoas muito \"\n\"mais do que uma comunicação unidirecional.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"As perguntas provavelmente farão com que falemos sobre coisas antes dos \"\n\"slides.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Isso está perfeitamente OK! A repetição é uma parte importante do \"\n\"aprendizado. Lembre-se que os slides são apenas um suporte e você está livre \"\n\"para ignorá-los quando quiser.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"A ideia para o primeiro dia é mostrar as coisas \\\"básicas\\\" em Rust que \"\n\"devem ter paralelos imediatos em outras linguagens. As partes mais avançadas \"\n\"do Rust vêm nos dias subsequentes.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Se você estiver ensinando isso em uma sala de aula, este é um bom lugar para \"\n\"revisar a agenda. Observe que há um exercício no final de cada segmento, \"\n\"seguido por uma pausa. Planeje cobrir a solução do exercício após a pausa. \"\n\"Os horários listados aqui são uma sugestão para manter o curso no horário. \"\n\"Sinta-se à vontade para ser flexível e ajustar conforme necessário!\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"In this segment:\"\nmsgstr \"Neste segmento:\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"[O que é Rust?](./hello-world/what-is-rust.md) (10 minutos)\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"[Benefícios do Rust](./hello-world/benefits.md) (3 minutos)\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"[Playground](./hello-world/playground.md) (2 minutos)\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"Este segmento deve durar cerca de 15 minutos\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust é uma nova linguagem de programação que teve sua [versão 1.0 lançada em \"\n\"2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Rust é uma linguagem compilada estaticamente e tem um papel semelhante ao C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` usa o LLVM como seu backend.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust suporta muitas [plataformas e arquiteturas](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust é usado em uma ampla gama de dispositivos:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware e carregadores de boot,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"smart displays,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"celulares,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"desktops,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"servidores.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust se encaixa na mesma área que C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Alta flexibilidade.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Alto nível de controle.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Pode ser reduzido para dispositivos com menor poder computacional, tais como \"\n\"microcontroladores.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Não possui _runtime_ ou coletor de lixo (_garbage collection_).\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Concentra-se em confiabilidade e segurança sem sacrificar o desempenho.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Alguns pontos exclusivos do Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_Segurança de memória em tempo de compilação_ - classes inteiras de bugs de \"\n\"memória são prevenidas em tempo de compilação\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Sem variáveis não inicializadas.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Sem _double-frees_.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Sem _use-after-free_.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Sem ponteiros `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Sem _mutexes_ bloqueados esquecidos.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Sem concorrência de dados entre _threads_.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Sem invalidação de iteradores.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_Sem comportamento indefinido em tempo de execução_ - o que uma instrução \"\n\"Rust executa nunca é deixado indefinido\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"O acesso a matrizes tem limites verificados.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Estouro de números inteiros é definido (\\\"pânico\\\" ou _wrap-around_).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_Recursos de linguagem modernos_ - tão expressivos e ergonômicos quanto \"\n\"linguagens de alto nível\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enums e correspondência de padrões.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Genéricos (_Generics_).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"FFI sem _overhead_.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Abstrações de custo zero.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Excelentes mensagens de erro do compilador.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Gerenciador de dependências integrado.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Suporte integrado para testes.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Excelente suporte ao protocolo de servidor de linguagem (LSP).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"Não gaste muito tempo aqui. Todos esses pontos serão abordados em maior \"\n\"profundidade mais tarde.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Certifique-se de perguntar à classe com quais linguagens de programação eles \"\n\"têm experiência. Dependendo da resposta você pode destacar diferentes \"\n\"características do Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Experiência com C ou C++: Rust elimina toda uma classe de _erros em tempo de \"\n\"execução_ através do verificador de empréstimos (_borrow checker_). Você \"\n\"obtém desempenho como em C e C++, mas sem os problemas de insegurança de \"\n\"memória. Além disso, você tem uma linguagem com funcionalidades modernas \"\n\"como correspondência de padrões e gerenciamento de dependência integrado.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Experiência com Java, Go, Python, JavaScript...: Você tem a mesma segurança \"\n\"de memória como nessas linguagens, além de uma semelhança com linguagens de \"\n\"alto nível. Além disso você obtém desempenho rápido e previsível como C e C+\"\n\"+ (sem coletor de lixo ou \\\"_garbage collector_\\\") bem como acesso a \"\n\"hardware de baixo nível (caso você precise)\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"O [Rust Playground](https://play.rust-lang.org/) fornece uma maneira fácil \"\n\"de executar pequenos programas em Rust, e é a base para os exemplos e \"\n\"exercícios neste curso. Tente executar o programa \\\"hello-world\\\" com o qual \"\n\"ele começa. Ele vem com algumas funcionalidades úteis:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"Em \\\"Tools\\\", use a opção `rustfmt` para formatar seu código da maneira \"\n\"\\\"padrão\\\".\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust tem dois principais \\\"perfis\\\" (_profiles_) para gerar código: _Debug_ \"\n\"(verificações de tempo de execução extras, menos otimização) e _Release_ \"\n\"(menos verificações de tempo de execução, muita otimização). Estes são \"\n\"acessíveis em \\\"Debug\\\" no topo.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Se você estiver interessado, use \\\"ASM\\\" em \\\"...\\\" para ver o código \"\n\"assembly gerado.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Conforme os alunos se dirigem para o intervalo, incentive-os a abrir o \"\n\"playground e experimentar um pouco. Incentive-os a manter a guia aberta e \"\n\"experimentar durante o resto do curso. Isso é particularmente útil para \"\n\"alunos avançados que desejam saber mais sobre as otimizações do Rust ou \"\n\"assembly gerado.\"\n\n#: src/types-and-values.md\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Olá, Mundo](./types-and-values/hello-world.md) (5 minutos)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[Variáveis](./types-and-values/variables.md) (5 minutos)\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[Valores](./types-and-values/values.md) (5 minutos)\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[Aritmética](./types-and-values/arithmetic.md) (3 minutos)\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[Inferência de Tipo](./types-and-values/inference.md) (3 minutos)\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"[Exercício: Fibonacci](./types-and-values/exercise.md) (15 minutos)\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"Este segmento deve levar cerca de 40 minutos\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Vamos pular para o programa em Rust mais simples possível, o clássico \\\"Olá \"\n\"Mundo\\\":\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"O que você vê:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Funções são introduzidas com `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Os blocos são delimitados por chaves como em C e C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"A função `main` é o ponto de entrada do programa.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust tem macros \\\"higiênicas\\\", `println!` é um exemplo disso.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"As strings Rust são codificadas em UTF-8 e podem conter qualquer caractere \"\n\"Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Este slide tenta deixar os alunos familiarizados com o código em Rust. Eles \"\n\"irão ver bastante conteúdo nos próximos quatro dias, então começamos devagar \"\n\"com algo familiar.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust é muito parecido com outras linguagens na tradição C/C++/Java. É \"\n\"imperativo (não funcional) e não tenta reinventar as coisas, a menos que \"\n\"seja absolutamente necessário.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust é moderno com suporte total para coisas como Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust usa macros para situações em que você deseja ter um número variável de \"\n\"argumentos (sem [sobrecarga de função](../control-flow-basics/functions.md)).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Macros \\\"higiênicas\\\" significam que elas não capturam acidentalmente \"\n\"identificadores do escopo em que são usadas. As macros em Rust são, na \"\n\"verdade, apenas [parcialmente \\\"higiênicas\\\"](https://veykril.github.io/\"\n\"tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust é multi-paradigma. Por exemplo, ele possui [funcionalidades de \"\n\"programação orientada à objetos](https://doc.rust-lang.org/book/ch17-00-oop.\"\n\"html) poderosas, e, embora não seja uma linguagem _funcional_, inclui uma \"\n\"série de [conceitos _funcionais_](https://doc.rust-lang.org/book/ch13-00-\"\n\"functional-features.html).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust fornece segurança de tipo por meio de tipagem estática. Variáveis são \"\n\"vinculadas com `let` (_let bindings_):\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Remova o comentário em `x = 20` para demonstrar que as variáveis são \"\n\"imutáveis por padrão. Adicione a palavra-chave `mut` para permitir \"\n\"alterações.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"O `i32` aqui é o tipo da variável. Isso deve ser conhecido em tempo de \"\n\"compilação, mas a inferência de tipo (abordada posteriormente) permite que o \"\n\"programador o omita em muitos casos.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"Aqui estão alguns tipos básicos integrados, e a sintaxe para valores \"\n\"literais de cada tipo.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Tipos\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Literais\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Inteiros com sinal\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Inteiros sem sinal\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Números de ponto flutuante\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Valores escalares Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Booleanos\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Os tipos têm os seguintes tamanhos:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` e `fN` têm _N_ bits,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` e `usize` são do tamanho de um ponteiro,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` tem 32 bits,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` tem 8 bits.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Há algumas sintaxes que não são mostradas acima:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Todos os sublinhados em números podem ser omitidos, eles são apenas para \"\n\"legibilidade. Por exemplo, `1_000` pode ser escrito como `1000` (ou \"\n\"`10_00`), e `123_i64` pode ser escrito como `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"Esta é a primeira vez que vemos uma função diferente de `main`, mas o \"\n\"significado deve ser claro: ela recebe três inteiros e retorna um inteiro. \"\n\"Funções serão abordadas com mais detalhes posteriormente.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\"Aritmética é muito semelhante a outras linguagens, com precedência \"\n\"semelhante.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"E quanto ao estouro de inteiros? Em C e C++, o estouro de inteiros _com \"\n\"sinal_ é realmente indefinido, e pode executar coisas desconhecidas em tempo \"\n\"de execução. Em Rust, isto é definido.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Altere os `i32` para `i16` para ver um estouro de inteiro, que causa um \"\n\"pânico (verificado) em uma compilação de debug e um _wrap-around_ em uma \"\n\"compilação de release. Existem outras opções, como _overflowing_, saturação \"\n\"e _carrying_. Estes são acessados com sintaxe de método, por exemplo, `(a * \"\n\"b).saturating_add(b * c).saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"Na verdade, o compilador detectará o estouro de expressões constantes, é por \"\n\"isso que o exemplo requer uma função separada.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust verá como a variável é _usada_ para determinar o tipo:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Este slide demonstra como o compilador Rust infere tipos com base em \"\n\"restrições dadas por declarações e usos de variáveis.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"É muito importante enfatizar que variáveis declaradas assim não são de um \"\n\"tipo dinâmico \\\"qualquer tipo\\\" que possa armazenar quaisquer dados. O \"\n\"código de máquina gerado por tal declaração é idêntico à declaração \"\n\"explícita de um tipo. O compilador faz o trabalho para nós e nos ajuda a \"\n\"escrever um código mais conciso.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Quando nada restringe o tipo de um literal inteiro, Rust assume `i32`. Isso \"\n\"às vezes aparece como `{integer}` nas mensagens de erro. Da mesma forma, os \"\n\"literais de ponto flutuante assumem `f64`.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ERRO: nenhuma implementação para `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"A sequência de Fibonacci começa com `[0,1]`. Para n>1, o n-ésimo número de \"\n\"Fibonacci é calculado recursivamente como a soma dos n-1-ésimos e n-2-ésimos \"\n\"números de Fibonacci.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"Escreva uma função `fib(n)` que calcula o n-ésimo número de Fibonacci. \"\n\"Quando esta função causará um pânico?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// O caso base.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Implemente isso\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// O caso recursivo.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[Expressões `if`](./control-flow-basics/if.md) (4 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[Loops](./control-flow-basics/loops.md) (5 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"\"\n\"[`break` e `continue`](./control-flow-basics/break-continue.md) (4 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\"[Blocos e Escopos](./control-flow-basics/blocks-and-scopes.md) (5 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[Funções](./control-flow-basics/functions.md) (3 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[Macros](./control-flow-basics/macros.md) (2 minutos)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercício: Sequência de Collatz](./control-flow-basics/exercise.md) (15 \"\n\"minutos)\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Expressões `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Você usa [expressões `if` ](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exatamente como declarações `if` em outras \"\n\"linguagens:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"zero!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"grande\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"enorme\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Além disso, você pode usá-lo como uma expressão. A última expressão de cada \"\n\"bloco se torna o valor da expressão `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"pequeno\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"grande\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"tamanho do número: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Como `if` é uma expressão e deve ter um tipo específico, ambos os blocos de \"\n\"ramificação devem ter o mesmo tipo. Considere mostrar o que acontece se você \"\n\"adicionar um `;` depois de `\\\"pequeno\\\"` no segundo exemplo.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"Quando `if` é usado em uma expressão, a expressão deve ter um `;` para \"\n\"separá-la da próxima instrução. Remova o `;` antes de `println!` para ver o \"\n\"erro do compilador.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"Há três palavras-chave de loop em Rust: `while`, `loop` e `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"A [palavra-chave `while`](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops) funciona de maneira muito similar a outras \"\n\"linguagens, executando o corpo do loop enquanto a condição for verdadeira.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"X final: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"O [loop `for`](https://doc.rust-lang.org/std/keyword.for.html) itera sobre \"\n\"intervalos de valores ou os itens em uma coleção:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"item: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"Por baixo dos panos, os loops `for` usam um conceito chamado \\\"iteradores\\\" \"\n\"para lidar com a iteração sobre diferentes tipos de intervalos/coleções. \"\n\"Iteradores serão discutidos com mais detalhes posteriormente.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"Observe que o loop `for` itera apenas até `4`. Mostre a sintaxe `1..=5` para \"\n\"um intervalo inclusivo.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"O [loop `loop`](https://doc.rust-lang.org/std/keyword.loop.html) apenas \"\n\"executa um loop para sempre, até um `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Se você quiser iniciar imediatamente a próxima iteração use [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Se você quiser sair de qualquer loop cedo, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). Para \"\n\"`loop`, isso pode receber uma expressão opcional que se torna o valor da \"\n\"expressão `loop`.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Ambos `continue` e `break` podem opcionalmente receber um _label_ (rótulo) \"\n\"como argumento que é usado para sair de loops aninhados:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elementos pesquisados: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"Observe que `loop` é a única construção de loop que retorna um valor não \"\n\"trivial . Isso ocorre porque é garantido que ele será executado pelo menos \"\n\"uma vez (diferente de loops `while` e `for`).\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blocos\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Um bloco em Rust contêm uma sequência de expressões, delimitadas por chaves \"\n\"`{}`. Cada bloco tem um valor e um tipo, que são os da última expressão do \"\n\"bloco:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Se a última expressão terminar com `;`, o valor resultante e o tipo será \"\n\"`()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Você pode mostrar como o valor do bloco muda alterando a última linha do \"\n\"bloco. Por exemplo, adicionar/remover um ponto e vírgula (`;`) ou usar um \"\n\"`return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"O escopo de uma variável é limitado ao bloco que a contém.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Você pode sobrepor (_shadow_) variáveis, tanto aquelas de escopos externos \"\n\"quanto variáveis do mesmo escopo:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"antes: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"olá\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"escopo interno: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"sobreposto no escopo interno: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"depois: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"Mostre que o escopo de uma variável é limitado adicionando um `b` no bloco \"\n\"interno no último exemplo e, em seguida, tentando acessá-lo fora desse bloco.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"_Shadowing_ é diferente da mutação, porque após a sobreposição \"\n\"(_shadowing_), os locais de memória de ambas as variáveis existem ao mesmo \"\n\"tempo. Ambas estão disponíveis com o mesmo nome, dependendo de onde você as \"\n\"usa no código. \"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Uma variável sobreposta pode ter um tipo diferente. \"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Shadowing (sobreposição) parece obscura a princípio, mas é conveniente para \"\n\"manter os valores após `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Os parâmetros de declaração são seguidos por um tipo (o inverso de algumas \"\n\"linguagens de programação) e, em seguida, um tipo de retorno.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"A última expressão em um corpo de uma função (ou qualquer bloco) torna-se o \"\n\"valor de retorno. Simplesmente omita o `;` no final da expressão. A palavra-\"\n\"chave `return` pode ser usada para retorno antecipado, mas a forma \\\"valor \"\n\"nu\\\" é idiomática no final de uma função (refatore `gcd` para usar um \"\n\"`return`).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Algumas funções não têm valor de retorno e retornam o 'tipo unitário', `()`. \"\n\"O compilador irá inferir isso se o tipo de retorno `-> ()` for omitido.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Sobrecarga não é suportada - cada função tem uma única implementação.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Sempre usa um número fixo de parâmetros. Argumentos padrão não são \"\n\"suportados. Macros podem ser usadas para suportar funções variádicas.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Sempre usa um único conjunto de tipos de parâmetros. Estes tipos podem ser \"\n\"genéricos, o que será abordado mais tarde.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Macros são expandidas em código Rust durante a compilação e podem receber um \"\n\"número variável de argumentos. Elas são distinguidas por um `!` no final. A \"\n\"biblioteca padrão do Rust inclui uma variedade de macros úteis.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` imprime uma linha na saída padrão, aplicando a \"\n\"formatação descrita em [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.\"\n\"html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` funciona exatamente como `println!`, mas retorna o \"\n\"resultado como uma string.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"dbg!(expressão) registra o valor da expressão e o retorna.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` marca um trecho de código como não implementado. Se executado, \"\n\"gerará um pânico.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` marca um trecho de código como inalcançável. Se executado, \"\n\"gerará um pânico.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"A lição desta seção é que essas conveniências comuns existem e como usá-las. \"\n\"Por que elas são definidas como macros e no que elas se expandem não é \"\n\"especialmente crítico.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"O curso não cobre a definição de macros, mas uma seção posterior descreverá \"\n\"o uso de macros _derive_ (derivadas).\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"A [Sequência de Collatz](https://en.wikipedia.org/wiki/Collatz_conjecture) é \"\n\"definida da seguinte forma, para um n arbitrário\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \" maior que zero:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"Se _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ é 1, então a sequência termina em _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ é par, então _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"/ 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ é ímpar, então _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"Por exemplo, começando com _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 é ímpar, então _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 é par, então _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 é ímpar, então _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"16 é par, então _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"8 é par, então _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"4 é par, então _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"2 é par, então _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1; e\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"a sequência termina.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Escreva uma função para calcular o comprimento da sequência de Collatz para \"\n\"um dado `n` inicial.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\"/// Determine o comprimento da sequência de Collatz começando em `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Comprimento: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Bem-vindos de volta\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tuplas e Matrizes](./tuples-and-arrays.md) (35 minutos)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (55 minutes)\"\nmsgstr \"[Referências](./references.md) (55 minutos)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\"[Tipos Definidos pelo(a) Usuário(a)](./user-defined-types.md) (50 minutos)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve levar cerca de 2 horas e 35 \"\n\"minutos\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"[Matrizes](./tuples-and-arrays/arrays.md) (5 minutos)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"[Tuplas](./tuples-and-arrays/tuples.md) (5 minutos)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"[Iteração de Matrizes](./tuples-and-arrays/iteration.md) (3 minutos)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Padrões e Destruturação](./tuples-and-arrays/destructuring.md) (5 minutos)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercício: Matrizes Aninhadas](./tuples-and-arrays/exercise.md) (15 minutos)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"Este segmento deve levar cerca de 35 minutos\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"O valor do tipo matriz `[T; N]` comporta `N` elementos (constante em tempo \"\n\"de compilação) do mesmo tipo `N`. Note que o tamanho de uma matriz é _parte \"\n\"do seu tipo_, o que significa que `[u8; 3]` e `[u8; 4]` são considerados \"\n\"dois tipos diferentes. _Slices_ (fatias), que têm um tamanho determinado em \"\n\"tempo de execução, são abordados mais tarde.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"Tente acessar um elemento de matriz fora dos limites. Os acessos a matrizes \"\n\"são verificados em tempo de execução. Rust geralmente pode otimizar essas \"\n\"verificações e elas podem ser evitadas usando Rust inseguro.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Nós podemos usar literais para atribuir valores para matrizes.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"A macro `println!` pede a implementação de depuração com o parâmetro de \"\n\"formato `?`: `{}` dá a saída padrão, `{:?}` dá a saída de depuração. Tipos \"\n\"como inteiros e strings implementam a saída padrão, mas matrizes implementam \"\n\"apenas a saída de depuração. Isso significa que devemos usar a saída de \"\n\"depuração aqui.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Adicionando `#`, p.ex. `{a:#?}`, invoca um formato _\\\"pretty printing\\\"_, \"\n\"que pode ser mais legível.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Assim como matrizes, tuplas têm tamanho fixo.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Tuplas agrupam valores de diferentes tipos em um tipo composto.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Campos de uma tupla podem ser acessados com um ponto e o índice do valor, p.\"\n\"ex. `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"A tupla vazia `()` é referida como o \\\"tipo unitário\\\" e significa a \"\n\"ausência de um valor de retorno, semelhante ao `void` em outras linguagens.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"O comando `for` suporta iteração sobre matrizes (mas não tuplas).\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Esta funcionalidade usa o _trait_ `IntoIterator`, mas ainda não a abordamos.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"A macro `assert_ne!` é nova aqui. Existem também macros `assert_eq!` e \"\n\"`assert!`. Estes são sempre verificados enquanto as variantes apenas para \"\n\"debug como `debug_assert!` não compilam nada em compilações de release.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"Quando se trabalha com tuplas e outros valores estruturados, é comum querer \"\n\"extrair os valores internos em variáveis locais. Isso pode ser feito \"\n\"manualmente acessando diretamente os valores internos:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"esquerda: {left}, direita: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"No entanto, Rust também suporta o uso de correspondência de padrões \"\n\"(_pattern matching_) para desestruturar um valor maior em suas partes \"\n\"constituintes:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Os padrões usados aqui são \\\"irrefutáveis\\\", o que significa que o \"\n\"compilador pode verificar estaticamente que o valor à direita de `=` tem a \"\n\"mesma estrutura que o padrão.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Um nome de variável é um padrão irrefutável que sempre corresponde a \"\n\"qualquer valor, por isso podemos também usar `let` para declarar uma única \"\n\"variável.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust também suporta o uso de padrões em condicionais, permitindo a \"\n\"comparação de igualdade e desestruturação ao mesmo tempo. Esta forma de \"\n\"correspondência de padrões será discutida em mais detalhes posteriormente.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Edite os exemplos acima para mostrar o erro do compilador quando o padrão \"\n\"não corresponde ao valor sendo correspondido.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Matrizes podem conter outras matrizes:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"Qual é o tipo desta variável?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Use uma matriz como a acima para escrever uma função `transpose` que \"\n\"transporá uma matriz (transformar linhas em colunas):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Copie o código abaixo para <https://play.rust-lang.org/> e implemente as \"\n\"funções: Esta função opera apenas em matrizes 3x3.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: remova isto quando você terminar sua implementação.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- o comentário faz com que o rustfmt adicione uma nova linha\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matriz: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transposta: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"[Referências Compartilhadas](./references/shared.md) (10 minutos)\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"[Referências Exclusivas](./references/exclusive.md) (10 minutos)\"\n\n#: src/references.md\nmsgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\nmsgstr \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutos)\"\n\n#: src/references.md\nmsgid \"[Strings](./references/strings.md) (10 minutes)\"\nmsgstr \"[Strings](./references/strings.md) (10 minutos)\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"[Exercício: Geometria](./references/exercise.md) (15 minutos)\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"Este segmento deve levar cerca de 55 minutos\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"Uma referência fornece uma maneira de acessar outro valor sem assumir a \"\n\"responsabilidade pelo valor, e também é chamada de \\\"empréstimo\\\". \"\n\"Referências compartilhadas são somente leitura e os dados referenciados não \"\n\"podem ser alterados.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"Uma referência compartilhada a um tipo `T` tem tipo `&T`. Um valor de \"\n\"referência é feito com o operador `&`. O operador `*` \\\"desreferencia\\\" uma \"\n\"referência, produzindo seu valor.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust estaticamente proibirá referências pendentes:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"Uma referência é dita que _\\\"borrow\\\"_ (empresta) o valor a que se refere, e \"\n\"este é um bom modelo para estudantes não familiarizados com ponteiros: o \"\n\"código pode usar a referência para acessar o valor, mas ainda é _\\\"owned\\\"_ \"\n\"(propriedade) da variável original. O curso entrará em mais detalhes sobre \"\n\"_ownership_ no dia 3.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"Referências são implementadas como ponteiros, e uma vantagem chave é que \"\n\"podem ser muito menores do que a coisa a que apontam. Os alunos \"\n\"familiarizados com C ou C++ reconhecerão referências como ponteiros. Partes \"\n\"posteriores do curso abordarão como o Rust impede os bugs de segurança de \"\n\"memória que vêm do uso de ponteiros brutos.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\"O Rust não cria automaticamente referências para você - o `&` é sempre \"\n\"necessário.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Em alguns casos, o Rust desreferenciará automaticamente, em particular ao \"\n\"invocar métodos (tente `r.is_ascii()`). Não há necessidade de um operador `-\"\n\">` como em C++.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"Neste exemplo, `r` é mutável para que possa ser reatribuído (`r = &b`). \"\n\"Observe que isso re-associa `r`, de modo que se refere a outra coisa. Isso é \"\n\"diferente do C++, onde a atribuição a uma referência altera o valor \"\n\"referenciado.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"Uma referência compartilhada não permite modificar o valor a que se refere, \"\n\"mesmo que esse valor seja mutável. Tente `*r = 'X'`.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"O Rust está rastreando os tempos de vida de todas as referências para \"\n\"garantir que elas vivam tempo suficiente. Referências pendentes não podem \"\n\"ocorrer em Rust seguro. `x_axis` retornaria uma referência a `point`, mas \"\n\"`point` será desalocado quando a função retornar, então isso não será \"\n\"compilado.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"Falaremos mais sobre empréstimos quando chegarmos à _ownership_.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"Referências exclusivas, também conhecidas como referências mutáveis, \"\n\"permitem alterar o valor a que se referem. Eles têm tipo `&mut T`.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"Exclusivo\\\" significa que apenas esta referência pode ser usada para \"\n\"acessar o valor. Nenhuma outra referência (compartilhada ou exclusiva) pode \"\n\"existir ao mesmo tempo, e o valor referenciado não pode ser acessado \"\n\"enquanto a referência exclusiva existir. Tente fazer um `&point.0` ou \"\n\"alterar `point.0` enquanto `x_coord` estiver ativo.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Certifique-se de observar a diferença entre `let mut x_coord: &i32` e `let \"\n\"rx_coord: &mut i32`. O primeiro representa uma referência mutável que pode \"\n\"ser ligada a diferentes valores, enquanto o segundo representa uma \"\n\"referência exclusiva a um valor mutável.\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Slices (Fatias)\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Uma _slice_ (fatia) oferece uma visão de uma coleção maior:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Slices pegam dados emprestados (_borrow) do tipo original.\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\"Pergunta: O que acontece se você modificar `a[3]` imediatamente antes de \"\n\"imprimir `s`?\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Nós criamos uma _slice_ _borrowing_ (emprestando) `a` e especificando os \"\n\"índices de início e fim entre colchetes.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Se a _slice_ começa no índice 0, a sintaxe de _range_ (faixa) nos permite \"\n\"omitir o índice inicial, o que significa que `&a[0..a.len()]` e `&a[..a.\"\n\"len()]` são idênticos.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"O mesmo vale para o último índice, logo `&a[2..a.len()]` e `&a[2..]` são \"\n\"idênticos.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Para criar facilmente uma _slice_ de uma matriz completa, podemos \"\n\"utilizar`&a[..]`.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` é uma referência a uma _slice_ de `i32`. Observe que o tipo de `s` \"\n\"(`&[i32]`) não menciona mais o tamanho da matriz. Isso nos permite realizar \"\n\"cálculos em _slices_ de tamanhos diferentes.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"As _slices_ sempre pegam emprestado (borrow) de outro objeto. Neste exemplo, \"\n\"`a` deve permanecer 'vivo' (em escopo) por pelo menos tanto tempo quanto \"\n\"nossa _slice_.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"A questão sobre a modificação de `a[3]` pode gerar uma discussão \"\n\"interessante, mas a resposta é que por motivos de segurança de memória você \"\n\"não pode fazer isso por meio de `a` neste ponto durante a execução. Porém \"\n\"você pode ler os dados de `a` e `s` com segurança. Isto funciona antes da \"\n\"criação do _slice_, e novamente depois de `println`, quando o _slice_ não é \"\n\"mais necessário.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Agora podemos entender os dois tipos de strings em Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"`&str` é uma _slice_ de bytes codificados em UTF-8, similar a `&[u8]`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\"`String` é um buffer _owned_ de bytes codificados em UTF-8, similar a \"\n\"`Vec<T>`.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"Mundo\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Olá \\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` introduz uma _slice_ de string, a qual é uma referência imutável para \"\n\"os dados da string UTF-8 armazenados em um bloco de memória. Literais de \"\n\"string (`\\\"Olá\\\"`), são armazenadas no código binário do programa.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"O tipo `String` do Rust é um _wrapper_ (invólucro) ao redor de um vetor de \"\n\"bytes. Assim como um `Vec<T>`, ele é _owned_.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Da mesma forma que outros tipos, `String::from()` cria uma string a partir \"\n\"de um literal; `String::new()` cria uma nova string vazia, na qual dados de \"\n\"string podem ser adicionados com os métodos `push()` e `push_str()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"A macro `format!()` é uma maneira conveniente de gerar uma string _owned_ a \"\n\"partir de valores dinâmicos. Ela aceita os mesmos formatadores que `println!\"\n\"()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"Você pode pegar emprestado (borrow) _slices_ `&str` de `String` via `&` e \"\n\"opcionalmente seleção de intervalo. Se você selecionar um intervalo de byte \"\n\"que não está alinhado com os limites dos caracteres, a expressão irá \"\n\"retornar um pânico. O iterador `chars` itera sobre caracteres e é preferível \"\n\"tentar obter os limites dos caracteres corretos.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Para programadores C++: pense em `&str` como `const char*` de C++, mas que \"\n\"sempre aponta para uma string válida na memória. Em Rust, `String` é um \"\n\"equivalente aproximado de `std::string` de C++ (principal diferença: ele só \"\n\"pode conter bytes codificados em UTF-8 e nunca usará uma otimização de \"\n\"string pequena).\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Strings de byte permitem que você crie um valor `&[u8]` diretamente:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Strings brutas permitem que você crie um valor `&str` com caracteres de \"\n\"escape desabilitados: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Você pode embutir aspas \"\n\"duplas utilizando uma quantidade igual de `#` em ambos os lados das aspas:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"Vamos criar algumas funções de utilidade para geometria tridimensional, \"\n\"representando um ponto como `[f64;3]`. Cabe a você determinar as assinaturas \"\n\"das funções.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Calcule a magnitude de um vetor somando os quadrados de suas coordenadas\\n\"\n\"// e tirando a raiz quadrada. Use o método `sqrt()` para calcular a raiz \"\n\"quadrada,\\n\"\n\"// como `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Normalize um vetor calculando sua magnitude e dividindo todas as suas\\n\"\n\"// coordenadas por essa magnitude.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// Use o seguinte `main` para testar seu trabalho.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitude de um vetor unitário: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitude de {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitude de {v:?} após normalização: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Calcule a magnitude do vetor dado.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// Altere a magnitude do vetor para 1.0 sem alterar sua direção.\\n\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"[Structs Nomeadas](./user-defined-types/named-structs.md) (10 minutos)\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\"[Structs de Tuplas](./user-defined-types/tuple-structs.md) (10 minutos)\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"[Enums](./user-defined-types/enums.md) (5 minutos)\"\n\n#: src/user-defined-types.md\nmsgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\nmsgstr \"[Static](./user-defined-types/static.md) (5 minutos)\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"[Type Aliases](./user-defined-types/aliases.md) (2 minutos)\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercício: Eventos de Elevador](./user-defined-types/exercise.md) (15 \"\n\"minutos)\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"Este segmento deve levar cerca de 50 minutos\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Como C e C++, Rust tem suporte para `structs` personalizadas:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} tem {} anos.\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"Pontos Chave:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Structs funcionam como em C ou C++.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"Como em C++, e ao contrário de C, nenhum _`typedef`_ é necessário para \"\n\"definir um tipo.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"Ao contrário do C++, não há herança entre _structs_.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"Este pode ser um bom momento para que as pessoas saibam que existem \"\n\"diferentes tipos de _structs_.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"_Structs_ de tamanho zero (por exemplo, `struct Foo;`) podem ser usadas ao \"\n\"implementar um _trait_ em algum tipo, mas não possuem nenhum dado que você \"\n\"deseja armazenar nelas.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"O próximo slide apresentará as _structs_ de tuplas usadas quando o nome dos \"\n\"campos não são importantes.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Se você já tiver variáveis com os nomes corretos, poderá criar a _struct_ \"\n\"usando uma abreviação.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"A sintaxe `..avery` permite copiar a maioria dos campos de uma _struct_ sem \"\n\"precisar explicitar seus tipos. Ela deve ser sempre o último elemento.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Se os nomes dos campos não forem importantes, você pode usar uma _struct_ de \"\n\"tupla:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Isso é comumente utilizado para _wrappers_ (invólucros) com campo único \"\n\"(chamados _newtypes_):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Pergunte para um cientista de foguetes da NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"_Newtypes_ são uma ótima maneira de codificar informações adicionais sobre o \"\n\"valor em um tipo primitivo, por exemplo:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"O número é medido em algumas unidades: `Newtons` no exemplo acima.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"O valor passou por alguma validação quando foi criado, então não é preciso \"\n\"validá-lo novamente a cada uso: `PhoneNumber(String)` ou `OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Demonstre como somar um valor `f64` em um valor do tipo `Newtons` acessando \"\n\"o campo único no _newtype_.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Geralmente, Rust não gosta de coisas implícitas, como _unwrapping_ \"\n\"automático ou, por exemplo, usar booleanos como inteiros.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"Sobrecarga de operadores é discutido no Dia 3 (genéricos).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"O examplo é uma referência sutil a falha do [Orbitador Climático de Marte]\"\n\"(https://pt.wikipedia.org/wiki/Mars_Climate_Orbiter).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"A palavra-chave `enum` permite a criação de um tipo que possui algumas \"\n\"variantes diferentes:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Variante simples\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Variante tupla\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Variante struct\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"Nesta rodada: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Enumerações permitem coletar um conjunto de valores em um tipo.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` é um tipo com variantes. Existem dois valores de `Direction`: \"\n\"`Direction::Left` e `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` é um tipo com três variantes. Além dos _payloads_, o Rust \"\n\"armazenará um discriminante para que ele saiba em tempo de execução qual \"\n\"variante está em um valor `PlayerMove`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"Este pode ser um bom momento para comparar structs e enums:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"Em ambos, você pode ter uma versão simples sem campos (_unit struct_, ou \"\n\"estrutura unitária) ou uma com diferentes tipos de campo (_variant payloads_ \"\n\"ou _cargas de variante_).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Você pode até mesmo implementar as diferentes variantes de uma _enum_ com \"\n\"_structs_ separadas, mas elas não seriam do mesmo tipo, como seriam se todas \"\n\"fossem definidas em uma _enum_. \"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"O Rust usa espaço mínimo para armazenar o discriminante.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"Se necessário, armazena um inteiro do menor tamanho necessário\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"Se os valores de variante permitidos não cobrirem todos os padrões de bits, \"\n\"ele usará padrões de bits inválidos para codificar o discriminante (a \"\n\"\\\"otimização de nicho\\\"). Por exemplo, `Option<&u8>` armazena um ponteiro \"\n\"para um inteiro ou `NULL` para a variante `None`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"É possível controlar o discriminante se necessário (p.ex., para \"\n\"compatibilidade com C):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"Sem `repr`, o tipo do discriminante usa 2 bytes, porque 10001 cabe em 2 \"\n\"bytes.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/smart-pointers/box.md\n#: src/borrowing/shared.md src/error-handling/result.md\nmsgid \"More to Explore\"\nmsgstr \"Mais para Explorar\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"O Rust tem várias otimizações que pode empregar para fazer com que as enums \"\n\"ocupem menos espaço.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Otimização de ponteiro nulo: para [alguns tipos](https://doc.rust-lang.org/\"\n\"std/option/#representation), o Rust garante que `size_of::<T>()` é igual a  \"\n\"`size_of::<Option<T>>()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Código de exemplo caso queira mostrar como a representação em bits _pode_ \"\n\"ser na prática. É importante apontar que o compilador não oferece nenhuma \"\n\"garantia a respeito dessa representação, portanto isso é completamente \"\n\"inseguro.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"Variáveis estáticas permanecerão válidas durante toda a execução do programa \"\n\"e, portanto, não serão movidas:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Bem-vindos ao RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Conforme observado no [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-\"\n\"const-vs-static.html), eles não são expandidos no local (_inlined_) quando \"\n\"utilizados e possuem um local de memória real associado. Isso é útil para \"\n\"código inseguro (_unsafe_) e embarcado, e a variável é válida durante toda a \"\n\"execução do programa. Quando um valor de escopo global não tem uma razão \"\n\"para precisar de identidade de objeto, geralmente `const` é preferido.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"`static` é similar a variáveis globais mutáveis em C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` fornece identidade de objeto: um endereço na memória e estado \"\n\"conforme exigido por tipos com mutabilidade interior tais como `Mutex<T>`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"Como variáveis estáticas (`static`) são acessíveis de qualquer _thread_, \"\n\"elas precisam ser `Sync`. A mutabilidade interior é possível através de um \"\n\"[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html), atômico ou \"\n\"similar.\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"Dados locais da thread podem ser criados com a macro `std::thread_local`.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"Constantes são avaliadas em tempo de compilação e seus valores são \"\n\"expandidos no próprio local (_inlined_) onde quer que sejam usados:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"De acordo com o [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), eles são expandidos no próprio local (_inline_) quando \"\n\"utilizados.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"Somente funções marcadas como `const` podem ser chamadas em tempo de \"\n\"compilação para gerar valores `const`. As funções `const` podem, entretanto, \"\n\"ser chamadas em tempo de execução.\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"Mencione que `const` se comporta semanticamente de maneira similar ao \"\n\"`constexpr` de C++.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Não é muito comum que alguém precise de uma constante avaliada em tempo de \"\n\"execução, mas é útil e mais seguro do que usar uma variável estática.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"Um _alias_ de tipo cria um nome para outro tipo. Os dois tipos podem ser \"\n\"usados ​​de forma intercambiável.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// _Aliases_ são mais úteis com tipos longos e complexos:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"Programadores C reconhecerão isso como semelhante a um `typedef`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"Vamos criar uma estrutura de dados para representar um evento em um sistema \"\n\"de controle de elevador. Cabe a você definir os tipos e funções para \"\n\"construir vários eventos. Use `#[derive(Debug)]` para permitir que os tipos \"\n\"sejam formatados com `{:?}`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"Este exercício requer apenas a criação e o preenchimento de estruturas de \"\n\"dados para que o `main` seja executado sem erros. A próxima parte do curso \"\n\"abordará a obtenção de dados dessas estruturas.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// Um evento no sistema de elevador ao qual o controlador deve reagir.\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: adicionar variantes necessárias\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// Uma direção da viagem.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// O elevador chegou no andar dado.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// As portas do elevador se abriram.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// As portas do elevador se fecharam.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// Um botão direcional foi pressionado em um saguão de elevador no andar \"\n\"dado.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// Um botão de andar foi pressionado no elevador.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"Um passageiro do térreo pressionou o botão para subir: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"O elevador chegou no térreo: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"A porta do elevador se abriu: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"Um passageiro pressionou o botão do 3º andar: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"A porta do elevador se fechou: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"O elevador chegou no 3º andar: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// Um botão foi pressionado.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// O elevador chegou no andar dado.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// As portas do elevador se abriram.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// As portas do elevador se fecharam.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// Um andar é representado como um inteiro.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// Um botão acessível ao usuário.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// Um botão no saguão do elevador no andar dado.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// Um botão de andar dentro do elevador.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Bem-vindos ao Dia 2\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Agora que vimos uma boa quantidade de Rust, hoje focaremos no sistema de \"\n\"tipos do Rust:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"Correspondência de padrões: extraindo de dados de estruturas.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Métodos: associando funções com tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Traits: comportamentos compartilhados por múltiplos tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Genéricos: parametrizando tipos em outros tipos.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Tipos e traits da biblioteca padrão: um passeio pela rica biblioteca padrão \"\n\"do Rust.\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](./welcome-day-2.md) (3 minutos)\"\n\n#: src/welcome-day-2.md\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"[Correspondência de Padrões](./pattern-matching.md) (1 hora)\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Métodos e Traits](./methods-and-traits.md) (50 minutos)\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve levar cerca de 2 horas e 10 \"\n\"minutos\"\n\n#: src/pattern-matching.md\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"[Correspondência de Valores](./pattern-matching/match.md) (10 minutos)\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Destructuring Structs](./pattern-matching/destructuring-structs.md) (4 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Desestruturação de Structs](./pattern-matching/destructuring-structs.md) (4 \"\n\"minutos)\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Destructuring Enums](./pattern-matching/destructuring-enums.md) (4 minutes)\"\nmsgstr \"\"\n\"[Desestruturação de Enums](./pattern-matching/destructuring-enums.md) (4 \"\n\"minutos)\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\"[Fluxo de Controle com `let`](./pattern-matching/let-control-flow.md) (10 \"\n\"minutos)\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Exercício: Avaliação de Expressão](./pattern-matching/exercise.md) (30 \"\n\"minutos)\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\n#: src/error-handling.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"Este segmento deve levar cerca de 1 hora\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"A palavra-chave `match` permite que você corresponda um valor a um ou mais \"\n\"_padrões_ (_patterns_). As comparações são feitas de cima para baixo e a \"\n\"primeira correspondência encontrada é selecionada.\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"Os padrões podem ser valores simples, similarmente a `switch` em C e C++:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Encerrando\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Movendo por aí\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Entrada de número\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Minúsculas: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Alguma outra coisa\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"O padrão `_` é um padrão curinga que corresponde a qualquer valor. As \"\n\"expressões _devem_ ser irrefutáveis, o que significa que cobre todas as \"\n\"possibilidades, então `_` é frequentemente usado como o último caso de \"\n\"captura.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Correspondência pode ser usada como uma expressão. Assim como `if`, cada \"\n\"braço de correspondência deve ter o mesmo tipo. O tipo é a última expressão \"\n\"do bloco, se houver. No exemplo acima, o tipo é `()`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"Uma variável no padrão (`key` neste exemplo) criará uma ligação que pode ser \"\n\"usada dentro do braço de correspondência.\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\"Uma guarda de correspondência faz com que o braço corresponda somente se a \"\n\"condição for verdadeira.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Você pode apontar como alguns caracteres específicos podem ser usados em um \"\n\"padrão\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` como um `or`\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` pode expandir o quanto for necessário\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` representa um intervalo inclusivo\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` é um curinga\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Guardas de correspondência, como um recurso de sintaxe separado, são \"\n\"importantes e necessárias quando se quer expressar ideias mais complexas do \"\n\"que somente o padrão permitiria.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Eles não são iguais à expressão `if` separada dentro do bloco de \"\n\"correspondência. Uma expressão `if` dentro do bloco de ramificação (depois \"\n\"de `=>`) acontece depois que a correspondência é selecionada. A falha na \"\n\"condição `if` dentro desse bloco não resultará em outras verificações de \"\n\"correspondência da expressão `match` original serem consideradas.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"A condição definida na guarda se aplica a todas as expressões em um padrão \"\n\"com um `|`.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Structs\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\"Como tuplas, _structs_ também podem ser desestruturados por meio de \"\n\"correspondência:\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, outros campos foram ignorados\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"Modifique os valores em `foo` para corresponder com os outros padrões.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"Adicione um novo campo a `Foo` e faça mudanças nos padrões conforme \"\n\"necessário.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"A diferença entre uma captura (_capture_) e uma expressão constante pode ser \"\n\"difícil de perceber. Tente modificar o `2` no segundo braço para uma \"\n\"variável, e veja que, de forma sútil, não funciona. Mude para `const` e veja \"\n\"funcionando novamente.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"Como tuplas, _enums_ também podem ser desestruturados por meio de \"\n\"correspondência:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Os padrões também podem ser usados para vincular variáveis a partes de seus \"\n\"valores. É assim que você inspeciona a estrutura de seus tipos. Vamos \"\n\"começar com um tipo `enum` simples:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"não é possível dividir {n} em duas partes iguais\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} divido em dois é {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"desculpe, aconteceu um erro: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Aqui usamos a verificação de correspondência para _desestruturar_ o valor \"\n\"contido em `Result`. Na primeira verificação de correspondência, `half` está \"\n\"vinculado ao valor dentro da variante `Ok`. Na segunda, `msg` está vinculado \"\n\"à mensagem de erro.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"A expressão `if`/`else` está retornando um `enum` que é posteriormente \"\n\"descompactado com um `match`.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Você pode tentar adicionar uma terceira variante à definição de Enum e \"\n\"exibir os erros ao executar o código. Aponte os lugares onde seu código \"\n\"agora é \\\"não exaustivo\\\" e como o compilador tenta lhe dar dicas.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Os valores nas variantes de uma _enum_ só podem ser acessados após uma \"\n\"correspondência de padrão.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Demonstre o que acontece quando a busca não abrange todas as possibilidades. \"\n\"Observe a vantagem que o compilador Rust fornece ao confirmar quando todos \"\n\"os casos são tratados.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\"Salve o resultado de `divide_in_two` na variável `result` e faça uma \"\n\"correspondência de padrão (`match`) em um loop. Isso não irá compilar porque \"\n\"`msg` é consumido quando correspondido. Para corrigir, faça uma \"\n\"correspondência de padrão em `&result` ao invés de `result`. Isso fará com \"\n\"que `msg` seja uma referência, de forma que não será consumido. Essa \"\n\"[\\\"ergonomia de correspondência\\\"](https://rust-lang.github.io/rfcs/2005-\"\n\"match-ergonomics.html) apareceu no Rust 2018. Se você quiser suportar \"\n\"versões mais antigas do Rust, substitua `msg` por `ref msg` no padrão.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust possui algumas construções de fluxo de controle que diferem de outras \"\n\"linguagens. Elas são usadas para correspondência de padrões:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"Expressões `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"Expressões `let else`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"Expressões `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"A [expressão `if let` ](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lhe permite executar um código diferente caso \"\n\"um valor corresponde a um padrão:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"dormiu por {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"Para o caso comum de corresponder a um padrão e retornar da função, use \"\n\"[`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.\"\n\"html). O caso \\\"else\\\" deve divergir (`return`, `break` ou pânico - qualquer \"\n\"coisa, exceto cair no final do bloco).\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"obteve None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"obteve uma string vazia\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"não é um dígito hexadecimal\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Similar a `if let`, há uma variante [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) que testa \"\n\"repetidamente se um valor corresponde a um padrão:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Aqui [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) retorna `Some(c)` até que a string esteja vazia e \"\n\"depois ela retornará `None`. O `while let` nos permite iterar por todos os \"\n\"itens.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"Ao contrário de `match`, `if let` não precisa cobrir todas as ramificações. \"\n\"Isso pode torná-lo mais conciso do que `match`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"Um uso comum é lidar com valores `Some` ao trabalhar-se com `Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"Ao contrário de `match`, `if let` não suporta cláusulas de guarda para \"\n\"correspondência de padrões.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"`if-let`s podem se acumular, como mostrado. A construção `let-else` permite \"\n\"o \\\"achatamento\\\" desse código aninhado. Reescreva a versão \\\"estranha\\\" \"\n\"para os alunos, para que eles possam ver a transformação.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"A versão reescrita é:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Ressalte que o loop `while let` continuará executando enquanto o valor \"\n\"corresponder ao padrão.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Você pode reescrever o loop `while let` como um loop infinito com uma \"\n\"instrução `if` que é interrompido quando não houver mais nenhum valor para \"\n\"_unwrap_ (desempacotar) para `name.pop()`. O `while let` fornece um atalho \"\n\"para o cenário acima.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\"Vamos escrever um interpretador recursivo simples para expressões \"\n\"aritméticas.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"O tipo `Box` aqui é um ponteiro inteligente (_smart pointer_) e será \"\n\"abordado em detalhes mais adiante no curso. Uma expressão pode ser \"\n\"\\\"encaixotada\\\" com `Box::new` como visto nos testes. Para avaliar uma \"\n\"expressão encaixotada, use o operador de desreferência (`*`) para o \"\n\"\\\"desencaixotar\\\": `eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"Algumas expressões não podem ser avaliadas e retornarão um erro. O tipo \"\n\"padrão [`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.\"\n\"Result.html) é um enum que representa um valor de sucesso (`Ok(Value)`) ou \"\n\"um erro (`Err(String)`). Abordaremos esse tipo em detalhes mais adiante.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"Copie e cole o código no playground do Rust e comece a implementar `eval`. O \"\n\"produto final deve passar nos testes. Pode ser útil usar `todo!()` e fazer \"\n\"os testes passarem um por um. Você também pode ignorar um teste \"\n\"temporariamente com `#[ignore]`:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"Se você terminar cedo, tente escrever um teste que resulte em divisão por \"\n\"zero ou _integer overflow_. Como você poderia lidar com isso com `Result` em \"\n\"vez de um pânico?\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// Uma operação a ser realizada em duas subexpressões.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// Uma expressão, em forma de árvore.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// Uma operação em duas subexpressões.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// Um valor literal\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"divisão por zero\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"[Métodos](./methods-and-traits/methods.md) (10 minutos)\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\nmsgstr \"[Traits](./methods-and-traits/traits.md) (15 minutos)\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"[Derivação](./methods-and-traits/deriving.md) (3 minutos)\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercício: Logger Genérico](./methods-and-traits/exercise.md) (20 minutos)\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust permite que você associe funções aos seus novos tipos. Você faz isso \"\n\"com um bloco `impl`:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// Sem receptor, um método estático\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Empréstimo único com acesso de leitura e escrita em self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Empréstimo compartilhado com acesso apenas de leitura em self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Registrou {} voltas para {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Volta {idx}: {lap} seg\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"// Propriedade exclusiva de self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Corrida {} foi encerrada, tempo total de voltas: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Monaco Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Os argumentos `self` especificam o \\\"receptor\\\" - o objeto em que o método \"\n\"age. Existem vários receptores comuns para um método:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: pega emprestado o objeto do chamador como uma referência \"\n\"compartilhada e imutável. O objeto pode ser usado novamente depois.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: pega emprestado o objeto do chamador como uma referência única \"\n\"e mutável. O objeto pode ser usado novamente depois.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: toma posse do objeto e o move do chamador. O método se torna o \"\n\"proprietário do objeto. O objeto será descartado (desalocado) quando o \"\n\"método retorna, a menos que sua _ownership_ (posse) seja explicitamente \"\n\"transmitida. Posse completa não significa automaticamente mutabilidade.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: o mesmo que acima, mas o método pode modificar o objeto.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Sem receptor: isso se torna um método estático (_static_) no struct. \"\n\"Normalmente usado para criar construtores que, por convenção, são chamados \"\n\"`new`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Pode ser útil introduzir métodos comparando-os com funções.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Métodos são chamados em uma instância de um tipo (como _struct_ ou _enum_), \"\n\"o primeiro parâmetro representa a instância como `self`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Desenvolvedores podem optar por usar métodos para aproveitar a sintaxe do \"\n\"receptor do método e ajudar a mantê-los mais organizados. Usando métodos, \"\n\"podemos manter todo o código de implementação em um local previsível.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Destaque o uso da palavra-chave `self`, um receptor de método.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Mostre que é um termo abreviado para `self: Self` e talvez mostre como o \"\n\"nome da _struct_ também poderia ser usado.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Explique que `Self` é um alias de tipo para o tipo em que o bloco `impl` \"\n\"está e pode ser usado em qualquer outro lugar no bloco.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Observe como `self` é usado como outras _structs_ e a notação de ponto pode \"\n\"ser usada para se referir a campos individuais.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Este pode ser um bom momento para demonstrar como `&self` difere de `self` \"\n\"modificando o código e tentando executar `finish` duas vezes.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Além das variantes de `self`, também existem [tipos especiais de _wrapper_]\"\n\"(https://doc.rust-lang.org/reference/special-types-and-traits.html) que \"\n\"podem ser tipos de receptores, como `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust permite abstrair características dos tipos usando `trait`. Eles são \"\n\"semelhantes a interfaces:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"/// Retorna uma frase deste animal de estimação.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\"/// Imprime uma string no terminal saudando este animal de estimação.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"Um _trait_ define um número de métodos que os tipos devem ter para \"\n\"implementar o _trait_.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"No segmento \\\"Genéricos\\\", a seguir, veremos como construir funcionalidades \"\n\"que são genéricas para todos os tipos que implementam um _trait_.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Oh, você é adorável! Qual é o seu nome? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Auau, meu nome é {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Bidu\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"Para implementar `Trait` para `Type`, você usa um bloco `impl Trait for Type \"\n\"{ .. }`.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"Ao contrário das interfaces Go, apenas ter métodos correspondentes não é \"\n\"suficiente: um tipo `Cat` com um método `talk()` não satisfaria \"\n\"automaticamente `Pet` a menos que esteja em um bloco `impl Pet`.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Os _traits_ podem fornecer implementações padrão de alguns métodos. As \"\n\"implementações padrão podem depender de todos os métodos do _trait_. Neste \"\n\"caso, `greet` é fornecido e depende de `talk`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"Um _trait_ pode exigir que os tipos que o implementam também implementem \"\n\"outros _traits_, chamados _supertraits_. Aqui, qualquer tipo que implemente \"\n\"`Pet` deve implementar `Animal`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} tem {} pernas\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"Isso é às vezes chamado de \\\"herança de _trait_\\\", mas os alunos não devem \"\n\"esperar que isso se comporte como herança de Orientação a Objetos. Ele \"\n\"apenas especifica um requisito adicional nas implementações de um _trait_.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"Tipos associados são tipos de espaço reservado que são fornecidos pela \"\n\"implementação do _trait_.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"Os tipos associados são às vezes também chamados de \\\"tipos de saída\\\". A \"\n\"observação chave é que o implementador, e não o chamador, escolhe esse tipo.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"Muitos _traits_ da biblioteca padrão têm tipos associados, incluindo \"\n\"operadores aritméticos e `Iterator`.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Os _traits_ suportados podem ser implementados automaticamente para seus \"\n\"tipos personalizados, como segue:\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// O _trait_ `Default` adiciona um construtor `default`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// O _trait_ `Clone` adiciona um método `clone`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// O _trait_ `Debug` adiciona suporte para impressão com `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} vs. {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"A derivação é implementada com macros e muitas _crates_ fornecem macros de \"\n\"derivação úteis para adicionar funcionalidades úteis. Por exemplo, `serde` \"\n\"pode derivar suporte de serialização para uma _struct_ usando \"\n\"`#[derive(Serialize)]`.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Exercício: _Trait_ de Logger\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"Vamos projetar um utilitário de registro (_log_) simples, usando um _trait_ \"\n\"`Logger` com um método `log`. O código que pode registrar seu progresso pode \"\n\"então receber um `&impl Logger`. Nos testes, isso pode colocar mensagens no \"\n\"arquivo de log de teste, enquanto em uma compilação de produção, ele \"\n\"enviaria mensagens para um servidor de log.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"No entanto, o `StderrLogger` fornecido abaixo registra todas as mensagens, \"\n\"independentemente da verbosidade. Sua tarefa é escrever um tipo \"\n\"`VerbosityFilter` que ignorará mensagens acima de uma verbosidade máxima.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"Este é um padrão comum: uma _struct_ que envolve uma implementação de \"\n\"_trait_ e implementa esse mesmo _trait_, adicionando comportamento no \"\n\"processo. Que outros tipos de _wrappers_ podem ser úteis em um utilitário de \"\n\"registro?\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Registra uma mensagem no nível de verbosidade fornecido.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosidade={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"PSC (_FYI_)\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"oh-oh\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: Definir e implementar `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"/// Registra apenas mensagens até o nível de verbosidade fornecido.\\n\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Generics](./generics.md) (45 minutes)\"\nmsgstr \"[Genéricos](./generics.md) (45 minutos)\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour)\"\nmsgstr \"[Tipos da Biblioteca Padrão](./std-types.md) (1 hora)\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 10 minutes)\"\nmsgstr \"[_Traits_ da Biblioteca Padrão](./std-traits.md) (1 hora e 10 minutos)\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve durar cerca de 3 horas e 15 \"\n\"minutos\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"[Funções Genéricas](./generics/generic-functions.md) (5 minutos)\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"[Tipos de Dados Genéricos](./generics/generic-data.md) (10 minutos)\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"[Limites de _Trait_](./generics/trait-bounds.md) (10 minutos)\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"[impl Trait](./generics/impl-trait.md) (5 minutos)\"\n\n#: src/generics.md\nmsgid \"[dyn Trait](./generics/dyn-trait.md) (5 minutes)\"\nmsgstr \"[_Trait_ dyn](./generics/dyn-trait.md) (5 minutos)\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"[Exercício: Mínimo Genérico](./generics/exercise.md) (10 minutos)\"\n\n#: src/generics.md src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"Este segmento deve durar cerca de 45 minutos\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust suporta genéricos, o que permite abstrair algoritmos ou estruturas de \"\n\"dados (como ordenação ou uma árvore binária) sobre os tipos usados ou \"\n\"armazenados.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\"/// Escolhe `even` (par) ou `odd` (ímpar) dependendo do valor de `n`.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"escolheu um número: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"escolheu uma tupla: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"cachorro\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"gato\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\"Rust infere um tipo para T com base nos tipos dos argumentos e valor de \"\n\"retorno.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"Isto é semelhante aos _templates_ C++, mas Rust compila parcialmente a \"\n\"função genérica imediatamente, de modo que a função deve ser válida para \"\n\"todos os tipos que correspondem às restrições. Por exemplo, tente modificar \"\n\"`pick` para retornar `even + odd` se `n == 0`. Mesmo que apenas a instância \"\n\"`pick` com inteiros seja usada, Rust ainda a considera inválida. C++ \"\n\"permitiria que você fizesse isso.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"O código genérico é transformado em código não genérico com base nos locais \"\n\"de chamada. Esta é uma abstração sem custo: você obtém exatamente o mesmo \"\n\"resultado como se tivesse codificado as estruturas de dados sem a abstração.\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"Você pode usar genéricos para abstrair o tipo concreto do campo:\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} e {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_Pergunta:_ Por que `T` é especificado duas vezes em `impl<T> Point<T> {}`? \"\n\"Isso não é redundante?\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Isso ocorre porque é uma seção de implementação genérica para tipo genérico. \"\n\"Eles são genéricos de forma independente.\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Significa que esses métodos são definidos para qualquer `T`.\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"É possível escrever `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` ainda é genérico e você pode usar `Point<f64>`, mas os métodos neste \"\n\"bloco só estarão disponíveis para `Point<u32>`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"Tente declarar uma nova variável `let p = Point { x: 5, y: 10.0 };`. \"\n\"Atualize o código para permitir pontos que tenham elementos de tipos \"\n\"diferentes, usando duas variáveis de tipo, por exemplo, `T` e `U`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\"_Traits_ também podem ser genéricos, assim como tipos e funções. Os \"\n\"parâmetros de um _trait_ recebem tipos concretos quando ele é usado.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"Convertido de inteiro: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"Convertido de booleano: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\\\"{from_int:?}, {from_bool:?}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\"O _trait_ `From` será abordado mais tarde no curso, mas sua [definição na \"\n\"documentação `std`](https://doc.rust-lang.org/std/convert/trait.From.html) é \"\n\"simples.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"As implementações do _trait_ não precisam cobrir todos os possíveis \"\n\"parâmetros de tipo. Aqui, `Foo::from(\\\"hello\\\")` não seria compilado porque \"\n\"não há implementação `From<&str>` para `Foo`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"Os _traits_ genéricos recebem tipos como \\\"entrada\\\", enquanto os tipos \"\n\"associados são uma espécie de tipo de \\\"saída\\\". Um _trait_ pode ter várias \"\n\"implementações para diferentes tipos de entrada.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"Na verdade, o Rust exige que no máximo uma implementação de um _trait_ \"\n\"corresponda a qualquer tipo T. Ao contrário de algumas outras linguagens, o \"\n\"Rust não tem uma heurística para escolher a correspondência \\\"mais \"\n\"específica\\\". Há trabalho em adicionar esse suporte, chamado [especialização]\"\n\"(https://rust-lang.github.io/rfcs/1210-impl-specialization.html).\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Ao trabalhar com genéricos, muitas vezes você exigir que os tipos \"\n\"implementem algum `trait` para poder utilizar os métodos do `trait`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Você consegue fazer isso com `T:Trait` ou `impl Trait`:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"Tente criar um `NonClonable` e passá-lo para `duplicate`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"Quando vários _traits_ são necessários, use `+` para uni-los.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Mostre uma cláusula `where`, estudantes irão encontrá-la quando lerem código.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Organiza a assinatura da função se você tiver muitos parâmetros.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Possui recursos adicionais tornando-o mais poderoso.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Se alguém perguntar, o recurso extra é que o tipo à esquerda de \\\":\\\" pode \"\n\"ser arbitrário, como `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"Observe que o Rust ainda não suporta especialização. Por exemplo, dada a \"\n\"função `duplicate` original, é inválido adicionar uma especialização \"\n\"`duplicate(a: u32)`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Semelhante aos limites de _trait_, a sintaxe do _trait_ `impl` pode ser \"\n\"usada em argumentos de funções e em valores de retorno:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Código simplificado para:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"O `impl Trait` permite que você trabalhe com tipos que você não pode nomear. \"\n\"O significado de `impl Trait` é um pouco diferente nas diferentes posições.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Como parâmetro, o _trait_ `impl` é como um parâmetro genérico anônimo com um \"\n\"limitador de características (trait).\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Como tipo de retorno, significa que o tipo de retorno é algum tipo concreto \"\n\"que implementa o _trait_, sem nomear o tipo. Isso pode ser útil quando você \"\n\"não deseja expor o tipo concreto em uma API pública.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"A inferência é difícil na posição de retorno. Uma função que retorna `impl \"\n\"Foo` escolhe o tipo concreto que retorna, sem escrevê-lo na fonte. Uma \"\n\"função que retorna um tipo genérico como `collect<B>() -> B` pode retornar \"\n\"qualquer tipo que satisfaça `B`, e o chamador pode precisar escolher um, \"\n\"como com `let x: Vec<_> = foo.collect()` ou com o _turbofish_, `foo.collect::\"\n\"<Vec<_>>()`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"Qual é o tipo de `debuggable`? Tente `let debuggable: () = ..` para ver o \"\n\"que a mensagem de erro mostra.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\"Além de usar _traits_ para despacho estático via genéricos, o Rust também \"\n\"suporta usá-los para despacho dinâmico, apagamento de tipo, via objetos de \"\n\"_trait_:\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miau!\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"// Usa genéricos e despacho estático.\\n\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Olá, quem é você? {}\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"// Usa apagamento de tipo e despacho dinâmico.\\n\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\"Os genéricos, incluindo `impl Trait`, usam a monomorfização para criar uma \"\n\"instância especializada da função para cada tipo diferente com o qual o \"\n\"genérico é instanciado. Isso significa que chamar um método de _trait_ de \"\n\"dentro de uma função genérica ainda usa despacho estático, pois o compilador \"\n\"tem todas as informações de tipo e pode resolver qual tipo de implementação \"\n\"do _trait_ ele deverá utilizar.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\"Quando se usa `dyn Trait`, ele usa despacho dinâmico através de uma [tabela \"\n\"de métodos virtuais](https://en.wikipedia.org/wiki/Virtual_method_table) \"\n\"(vtable). Isso significa que há uma única versão de `fn dynamic` que é usada \"\n\"independentemente do tipo de `Pet` que é passado.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\"Quando se usa `dyn Trait`, o objeto de _trait_ precisa estar atrás de algum \"\n\"tipo de indireção. Neste caso, é uma referência, embora tipos de ponteiro \"\n\"inteligente (smart como `Box` também possam ser usados (isso será \"\n\"demonstrado no dia 3).\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\"Em tempo de execução, um `&dyn Pet` é representado como um \\\"ponteiro \"\n\"gordo\\\", ou seja, um par de dois ponteiros: Um ponteiro aponta para o objeto \"\n\"concreto que implementa `Pet`, e o outro aponta para a tabela de métodos \"\n\"virtuais para a implementação do _trait_ para esse tipo. Ao chamar o método \"\n\"`talk` em `&dyn Pet`, o compilador procura o ponteiro de função para `talk` \"\n\"na tabela de métodos virtuais e então invoca a função, passando o ponteiro \"\n\"para o `Dog` ou `Cat` para essa função. O compilador não precisa saber o \"\n\"tipo concreto do `Pet` para fazer isso.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\"Um `dyn Trait` é considerado \\\"apagado de tipo\\\", porque não temos mais \"\n\"conhecimento em tempo de compilação sobre qual é o tipo concreto.\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"Neste exercício curto, você implementará uma função genérica `min` que \"\n\"determina o mínimo de dois valores, usando um _trait_ `LessThan`.\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: implemente a função `min` usada em `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"'7'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"até logo\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"boi\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"arara\\\"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"Mostre aos estudantes o _trait_ [`Ord`](https://doc.rust-lang.org/stable/std/\"\n\"cmp/trait.Ord.html) e o enum [`Ordering`](https://doc.rust-lang.org/stable/\"\n\"std/cmp/enum.Ordering.html).\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"[Biblioteca Padrão](./std-types/std.md) (3 minutos)\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"[Documentação](./std-types/docs.md) (5 minutos)\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"[Option](./std-types/option.md) (10 minutos)\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (5 minutes)\"\nmsgstr \"[Result](./std-types/result.md) (5 minutos)\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (5 minutes)\"\nmsgstr \"[String](./std-types/string.md) (5 minutos)\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (5 minutes)\"\nmsgstr \"[Vec](./std-types/vec.md) (5 minutos)\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (5 minutes)\"\nmsgstr \"[HashMap](./std-types/hashmap.md) (5 minutos)\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"[Exercício: Contador](./std-types/exercise.md) (20 minutos)\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Para cada um dos slides desta seção, reserve um tempo para revisar as \"\n\"páginas de documentação, destacando alguns dos métodos mais comuns.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust vem com uma biblioteca padrão (_standard library_) que ajuda a \"\n\"estabelecer um conjunto de tipos comuns usados por bibliotecas e programas \"\n\"Rust. Dessa forma, duas bibliotecas podem trabalhar juntas sem problemas \"\n\"porque ambas usam o mesmo tipo `String`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"Na verdade, o Rust contém várias camadas de Biblioteca Padrão: `core`, \"\n\"`alloc` e `std`. \"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` inclui os tipos e funções mais básicos que não dependem de `libc`, \"\n\"alocador ou até mesmo a presença de um sistema operacional. \"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` inclui tipos que requerem um alocador de heap global, tais como \"\n\"`Vec`, `Box` e `Arc`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Os aplicativos Rust embarcados geralmente usam apenas `core` e, às vezes, \"\n\"`alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"O Rust vem com uma extensa documentação. Por exemplo:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Todos os detalhes sobre [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"Tipos primitivos como [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"Tipos da biblioteca padrão como [`Option`](https://doc.rust-lang.org/stable/\"\n\"std/option/enum.Option.html) ou [`BinaryHeap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.BinaryHeap.html).\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"Na verdade, você pode documentar seu próprio código:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Determine se o primeiro argumento é divisível pelo segundo argumento.\\n\"\n\"///\\n\"\n\"/// Se o segundo argumento for zero, o resultado é falso.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"O conteúdo é tratado como _Markdown_. Todos os _crates_ publicados na \"\n\"biblioteca Rust são documentados automaticamente em [`docs.rs`](https://docs.\"\n\"rs) utilizando a ferramenta [rustdoc](https://doc.rust-lang.org/rustdoc/what-\"\n\"is-rustdoc.html). É idiomático documentar todos os itens públicos em uma API \"\n\"usando este padrão.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Para documentar um item de dentro do item (como dentro de um módulo), use \"\n\"`//!` ou `/*! .. */`, chamado de \\\"comentários de documentação interna\\\":\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Este módulo contém funcionalidades relacionadas à divisibilidade de \"\n\"inteiros.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Mostre aos alunos os documentos gerados para o crate `rand` em [<https://\"\n\"docs.rs/rand>.\"\n\n#: src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Já vimos algum uso de `Option<T>`. Ele armazena um valor do tipo `T` ou \"\n\"nada. Por exemplo, [`String::find`](https://doc.rust-lang.org/stable/std/\"\n\"string/struct.String.html#method.find) retorna um `Option<usize>`.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find retornou {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Caractere não encontrado\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"`Option` é amplamente utilizado, não apenas na biblioteca padrão.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` retornará o valor em um `Option`, ou entrará em pânico. `expect` é \"\n\"semelhante, mas recebe uma mensagem de erro.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"Você pode entrar em pânico em `None`, mas não pode \\\"acidentalmente\\\" \"\n\"esquecer de verificar `None`.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"É comum `unwrap`/`expect` em todos os lugares ao hackear algo, mas o código \"\n\"de produção normalmente lida com `None` de uma maneira mais elegante.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"A otimização de nicho significa que `Option<T>` muitas vezes tem o mesmo \"\n\"tamanho na memória que `T`.\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` é semelhante a `Option`, mas indica o sucesso ou falha de uma \"\n\"operação, cada um com um tipo diferente. Isso é genérico: `Result<T, E>` \"\n\"onde `T` é usado na variante `Ok` e `E` aparece na variante `Err`.\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Querido diário: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Não foi possível ler o conteúdo do arquivo\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"Não foi possível abrir o diário: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Como em `Option`, o valor bem-sucedido fica dentro de `Result`, forçando o \"\n\"desenvolvedor a extraí-lo explicitamente. Isso encoraja a verificação de \"\n\"erros. No caso em que um erro nunca deve acontecer, `unwrap()` ou `expect()` \"\n\"podem ser chamados, e isso também sinaliza a intenção do desenvolvedor.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"A documentação de `Result` é uma leitura recomendada. Não durante o curso, \"\n\"mas vale a pena mencioná-la. Ele contém muitos métodos e funções de \"\n\"conveniência que ajudam na programação ao estilo funcional.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` é o tipo padrão para implementar tratamento de erros, como veremos \"\n\"no Dia 4.\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) é uma \"\n\"string UTF-8 expansível:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Olá\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: tam = {}, capacidade = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: tam = {}, capacidade = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇧🇷\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: tam = {}, número de caracteres = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementa [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), o que significa que você pode \"\n\"chamar todos os métodos de `str` em uma `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` retorna uma nova string vazia, use `String::with_capacity` \"\n\"quando você sabe a quantidade de dados que você deseja colocar na string.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` retorna o tamanho da `String` em bytes (que pode ser diferente \"\n\"de seu comprimento em caracteres).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` retorna um iterador com os caracteres de fato. Observe que \"\n\"um `char` pode ser diferente do que um humano considerará um \\\"caracter\\\" \"\n\"devido a [agrupamentos de grafemas (_grapheme clusters_)](https://docs.rs/\"\n\"unicode-segmentation/latest/unicode_segmentation/struct.Graphemes.html).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"Quando as pessoas se referem a strings, elas podem estar falando sobre \"\n\"`&str` ou `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Quando um tipo implementa `Deref<Target = T>`, o compilador permitirá que \"\n\"você transparentemente chame métodos de `T`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"Ainda não discutimos o _trait_ `Deref`, então, neste ponto, isso explica \"\n\"principalmente a estrutura da barra lateral na documentação.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` implementa `Deref<Target = str>` que, de forma transparente, dá \"\n\"acesso aos métodos de `str`.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"Escreva e compare `let s3 = s1.deref();` e `let s3 = &*s1;`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` é implementado como um wrapper em torno de um vetor de bytes, \"\n\"muitas das operações que você vê suportadas em vetores também são suportadas \"\n\"em `String`, mas com algumas garantias extras.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"Compare as diferentes formas de indexar uma `String`:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"Para um caracter usando `s3.chars().nth(i).unwrap()` onde `i` está dentro \"\n\"dos limites, fora dos limites.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"Para uma substring usando `s3[0..4]`, onde essa _slice_ está nos limites dos \"\n\"caracteres ou não.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Muitos tipos podem ser convertidos para uma string com o método [`to_string`]\"\n\"(https://doc.rust-lang.org/std/string/trait.ToString.html#tymethod.\"\n\"to_string). Este _trait_ é implementado automaticamente para todos os tipos \"\n\"que implementam `Display`, então qualquer coisa que possa ser formatada \"\n\"também pode ser convertida para uma string.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) é o buffer padrão \"\n\"redimensionável alocado no heap:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: tamanho = {}, capacidade = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: tamanho = {}, capacidade = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Macro canônica para inicializar um vetor com elementos.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Mantém apenas os elementos pares.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Remove duplicatas consecutivas.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementa [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), o que significa que você pode chamar \"\n\"métodos de _slice_ em um `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` é um tipo de coleção, como `String` e `HashMap`. Os dados que ele \"\n\"contém são armazenados no heap. Isso significa que a quantidade de dados não \"\n\"precisa ser conhecida em tempo de compilação. Ela pode crescer ou encolher \"\n\"em tempo de execução.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"Observe como `Vec<T>` também é um tipo genérico, mas você não precisa \"\n\"especificar `T` explicitamente. Como sempre, com a inferência de tipos do \"\n\"Rust, `T` foi estabelecido durante a primeira chamada de `push`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` é uma macro canônica para usar em vez de `Vec::new()` e suporta \"\n\"a adição de elementos iniciais ao vetor.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Para indexar o vetor, você usa `[` `]`, mas uma exceção do tipo _pânico_ \"\n\"(`panic`) será gerada se o índice estiver fora dos limites. \"\n\"Alternativamente, usando `get` você obterá um `Option`. A função `pop` \"\n\"removerá o último elemento.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"Os _slices_ são abordados no dia 3. Por enquanto, os alunos só precisam \"\n\"saber que um valor do tipo `Vec` dá acesso a todos os métodos de _slice_ \"\n\"documentados, também.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\"_Hash map_ (Mapa de _hash_) padrão com proteção contra ataques _HashDoS_:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Adventures of Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms' Fairy Tales\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Pride and Prejudice\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"Nós sabemos sobre livros {}, mas não Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice's Adventure in Wonderland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} páginas\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} é desconhecido.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Use o método .entry() para inserir um valor caso nada seja encontrado.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap` não está definido no prelúdio e precisa ser incluído no escopo.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Tente as seguintes linhas de código. A primeira linha verá se um livro está \"\n\"no hash map e, caso não esteja, retorna um valor alternativo. A segunda \"\n\"linha irá inserir o valor alternativo no hash map se o livro não for \"\n\"encontrado.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\"Ao contrário de `vec!`, infelizmente não existe uma macro `hashmap!` padrão.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Entretanto, desde o Rust 1.56, o HashMap implementa [`From<[(K, V); N]>`]\"\n\"(https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), o que nos \"\n\"permite inicializar facilmente um hash map a partir de uma matriz literal:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"Alternativamente, o HashMap pode ser construído a partir de qualquer \"\n\"`Iterator` que produz tuplas de chave-valor.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"Estamos mostrando `HashMap<String, i32>`, e evite usar `&str` como chave \"\n\"para facilitar os exemplos. É claro que o uso de referências em coleções \"\n\"pode ser feito, mas isto pode levar a complicações com o verificador de \"\n\"empréstimos.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"Tente remover `to_string()` do exemplo acima e veja se ele ainda compila. \"\n\"Onde você acha que podemos ter problemas?\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"Este tipo tem vários tipos de retorno \\\"específicos do método\\\", como `std::\"\n\"collections::hash_map::Keys`. Esses tipos geralmente aparecem em pesquisas \"\n\"nos documentos do Rust. Mostre aos alunos os documentos para este tipo e o \"\n\"link útil de volta ao método `keys`.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"Neste exercício, você usará uma estrutura de dados muito simples e a tornará \"\n\"genérica. Ela usa um [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) para acompanhar quais valores \"\n\"foram vistos e quantas vezes cada um apareceu.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"A versão inicial de `Counter` é codificada para funcionar apenas para \"\n\"valores `u32`. Faça a estrutura e seus métodos genéricos sobre o tipo de \"\n\"valor sendo rastreado, dessa forma `Counter` pode rastrear qualquer tipo de \"\n\"valor.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Se você terminar cedo, tente usar o método [`entry`](https://doc.rust-lang.\"\n\"org/stable/std/collections/struct.HashMap.html#method.entry) para reduzir \"\n\"pela metade o número de pesquisas de hash necessárias para implementar o \"\n\"método `count`.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter conta o número de vezes que cada valor do tipo T foi visto.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Cria um novo Counter.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Conta uma ocorrência do valor fornecido.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Retorna o número de vezes que o valor fornecido foi visto.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"viu {} valores iguais a {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"apple\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"orange\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"obteve {} maçãs\\\"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (5 minutes)\"\nmsgstr \"[Comparações](./std-traits/comparisons.md) (5 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (5 minutes)\"\nmsgstr \"[Operadores](./std-traits/operators.md) (5 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (5 minutes)\"\nmsgstr \"[From e Into](./std-traits/from-and-into.md) (5 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"[Conversões](./std-traits/casting.md) (5 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (5 minutes)\"\nmsgstr \"[Read e Write](./std-traits/read-and-write.md) (5 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\"[Default, sintaxe de atualização de struct](./std-traits/default.md) (5 \"\n\"minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (10 minutes)\"\nmsgstr \"[Closures](./std-traits/closures.md) (10 minutos)\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"[Exercício: ROT13](./std-traits/exercise.md) (30 minutos)\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"Este segmento deve levar cerca de 1 hora e 10 minutos\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Como nos tipos da biblioteca padrão, reserve um tempo para revisar a \"\n\"documentação de cada `trait`.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"Esta seção é longa. Faça uma pausa no meio.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Esses `traits` suportam comparações entre valores. Todos os `traits` podem \"\n\"ser derivados para tipos que contêm campos que implementam esses `traits`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` e `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` é uma relação de equivalência parcial, com o método `eq` \"\n\"obrigatório e o método `ne` fornecido. Os operadores `==` e `!=` chamarão \"\n\"esses métodos.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` é uma relação de equivalência completa (reflexiva, simétrica e \"\n\"transitiva) e implica `PartialEq`. Funções que exigem equivalência completa \"\n\"usarão `Eq` como um limite de `trait`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` e `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` define uma ordenação parcial, com um método `partial_cmp`. Ele \"\n\"é usado para implementar os operadores `<`, `<=`, `>=` e `>`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` é uma ordenação total, com `cmp` retornando `Ordering`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` pode ser implementado entre diferentes tipos, mas `Eq` não pode, \"\n\"porque é reflexivo:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"Na prática, é comum derivar esses `traits`, mas incomum implementá-los.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"A sobrecarga de operadores é implementada por meio do `trait` contido em \"\n\"[`std::ops`](https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"Pontos de discussão:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Você pode implementar `Add` para `&Point`. Em quais situações isso é útil?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Resposta: `Add:add` consome `self`. Se o tipo `T` para o qual você está \"\n\"sobrecarregando o operador não implementa `Copy`, você deve considerar \"\n\"sobrecarregar o operador para `&T` também. Isso evita a clonagem \"\n\"desnecessária no local da chamada.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Por que `Output` é um tipo associado? Poderia ser feito um parâmetro de tipo \"\n\"do método?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Resposta curta: os parâmetros de tipo de função são controlados pelo \"\n\"chamador, mas os tipos associados (como `Output`) são controlados pelo \"\n\"implementador de um `trait`.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"Você pode implementar `Add` para dois tipos diferentes, por exemplo, `impl \"\n\"Add<(i32, i32)> for Point` adicionaria uma tupla a um `Point`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Os tipos implementam [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) e [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) \"\n\"para facilitar as conversões de tipo:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) é \"\n\"implementado automaticamente quando [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) é implementado:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"É por isso que é comum implementar apenas `From`, já que seu tipo também \"\n\"receberá a implementação de `Into`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Ao declarar um tipo de entrada de argumento de função como \\\"qualquer coisa \"\n\"que possa ser convertida em `String`\\\", a regra é oposta, você deve usar \"\n\"`Into`. Sua função aceitará tipos que implementam `From` e aqueles que \"\n\"_apenas_ implementam `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"O Rust não tem conversões de tipo _implícitas_, mas suporta conversões \"\n\"explícitas com `as`. Essas geralmente seguem a semântica de C onde elas são \"\n\"definidas.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"como u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"como i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"como u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"Os resultados de `as` são _sempre_ definidos no Rust e consistentes em todas \"\n\"as plataformas. Isso pode não corresponder à sua intuição para alterar o \"\n\"sinal ou converter para um tipo menor - verifique a documentação e comente \"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"Converter com `as` é uma ferramenta relativamente afiada que é fácil de usar \"\n\"incorretamente e pode ser uma fonte de bugs sutis à medida que o trabalho de \"\n\"manutenção futuro altera os tipos que são usados ou os intervalos de valores \"\n\"nos tipos. As conversões são melhores usadas apenas quando a intenção é \"\n\"indicar truncamento incondicional (por exemplo, selecionar os 32 bits \"\n\"inferiores de um `u64` com `as u32`, independentemente do que estava nos \"\n\"bits altos).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"Para conversões infalíveis (por exemplo, `u32` para `u64`), prefira usar \"\n\"`From` ou `Into` em vez de `as` para confirmar que a conversão é de fato \"\n\"infalível. Para conversões falíveis, `TryFrom` e `TryInto` estão disponíveis \"\n\"quando você deseja lidar com conversões que se encaixam de maneira diferente \"\n\"daquelas que não se encaixam.\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"Considere fazer uma pausa após este slide.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` é semelhante a um _cast_ estático do C++. O uso de `as` em casos em que \"\n\"os dados podem ser perdidos geralmente é desencorajado, ou pelo menos merece \"\n\"um comentário explicativo.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Isso é comum na conversão de inteiros para `usize` para uso como índice.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Usando [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) e \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), você pode \"\n\"abstrair as fontes de dados do tipo `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"linhas na _slice_: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"linhas no arquivo: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Da mesma forma, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"permite abstrair a escrita de dados do tipo `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Registrado: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"O Trait `Default`\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"O _trait_ [`Default`](https://doc.rust-lang.org/std/default/trait.Default.\"\n\"html) fornece uma implementação padrão para um tipo.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y está definido!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Ele pode ser implementado diretamente ou derivado usando \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"A implementação usando `derive` produz um valor onde todos os campos são \"\n\"preenchidos com seus valores padrão.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Consequentemente, todos os tipos usados no struct devem implementar \"\n\"`Default` também.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Frequentemente, os tipos padrão do Rust implementam `Default` com valores \"\n\"razoáveis (p.ex.: `0`, `\\\"\\\"`, etc).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"A inicialização parcial do struct funciona bem com o default.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"A bilioteca padrão do Rust sabe que tipos podem implementar o `trait` \"\n\"`Default` e, convenientemente, provê métodos para isso.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"A sintaxe `..` é chamada de [sintaxe de atualização de struct](https://doc.\"\n\"rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-\"\n\"other-instances-with-struct-update-syntax).\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Closures ou expressões _lambda_ têm tipos que não podem ser nomeados. No \"\n\"entanto, eles implementam os _traits_ especiais [`Fn`](https://doc.rust-lang.\"\n\"org/std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/\"\n\"trait.FnMut.html) e [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnOnce.html):\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\\\"Chamando a função com {input}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Um `Fn` (p.ex. `add_3`) não consome nem muda os valores capturados ou talvez \"\n\"não capture nada, podendo então ser chamado várias vezes simultaneamente.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Um `FnMut` (p.ex. `accumulate`) pode alterar os valores capturados, logo \"\n\"você pode chamá-lo várias vezes, mas não simultaneamente.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Se você tiver um `FnOnce` (p.ex. `multiply_sum`), poderá chamá-lo apenas uma \"\n\"vez. Ele pode consumir os valores capturados.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` é um subtipo de `FnOnce`. `Fn` é um subtipo de `FnMut` e `FnOnce`. \"\n\"Ou seja, você pode usar um `FnMut` sempre que um `FnOnce` é chamado e você \"\n\"pode usar um `Fn` sempre que um `FnMut` ou um `FnOnce` é chamado.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"Quando você define uma função que recebe um _closure_, você deve usar \"\n\"`FnOnce` se puder (ou seja, você o chama uma vez) ou `FnMut` caso contrário, \"\n\"e por último `Fn`. Isso permite a maior flexibilidade para o chamador.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"Em contraste, quando você tem um _closure_, o mais flexível que você pode \"\n\"ter é `Fn` (ele pode ser passado para qualquer lugar), então `FnMut` e, por \"\n\"último, `FnOnce`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\"O compilador também infere `Copy` (p.ex. para `add_3`) e `Clone` (p.ex. \"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\"Por padrão, os _closures_ capturam por referência se puderem. A palavra-\"\n\"chave `move` faz com que eles capturem por valor.\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Olá\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Greg\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"Neste exemplo, você implementará o clássico [cifra \\\"ROT13\\\"](https://pt.\"\n\"wikipedia.org/wiki/ROT13). Copie este código para o playground e implemente \"\n\"as partes que faltam. Apenas rotacione caracteres alfabéticos ASCII para \"\n\"garantir que o resultado ainda seja UTF-8 válido.\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Implemente o trait `Read` para `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"O que acontece se você encadear duas instâncias de `RotDecoder`, cada uma \"\n\"rotacionando 13 caracteres?\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Bem-vindos ao Dia 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"Hoje, vamos cobrir:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Gerenciamento de memória, tempos de vida (_lifetimes_) e o verificador de \"\n\"empréstimo (_borrow checker_): como o Rust garante a segurança da memória.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\"Ponteiros inteligentes (_smart pointers_): tipos de ponteiros da biblioteca \"\n\"padrão.\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](./welcome-day-3.md) (3 minutos)\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"[Gerenciamento de Memória](./memory-management.md) (1 hora)\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"\"\n\"[Ponteiros Inteligentes (_Smart Pointers_)](./smart-pointers.md) (55 minutos)\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve levar cerca de 2 horas e 20 \"\n\"minutos\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\"[Revisão da Memória do Programa](./memory-management/review.md) (5 minutos)\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Abordagens para o Gerenciamento de Memória](./memory-management/approaches.\"\n\"md) (10 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"[Propriedade](./memory-management/ownership.md) (5 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"[Semântica de _Move_](./memory-management/move.md) (5 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"[Clone](./memory-management/clone.md) (2 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"[Tipos de Cópia](./memory-management/copy-types.md) (5 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"[Drop](./memory-management/drop.md) (10 minutos)\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercício: Tipo _Builder_](./memory-management/exercise.md) (20 minutos)\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"Os programas alocam memória de duas maneiras:\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Pilha: Área contínua de memória para variáveis locais.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Os valores têm tamanhos fixos conhecidos em tempo de compilação.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Extremamente rápida: basta mover um ponteiro de pilha.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Fácil de gerenciar: segue chamadas de função.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Ótima localidade de memória.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap: Armazenamento de valores fora das chamadas de função.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Valores possuem tamanhos dinâmicos determinados em tempo de execução.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\"Ligeiramente mais devagar que a pilha: é necessário um pouco de \"\n\"gerenciamento.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Sem garantias de localidade de memória.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"A criação de uma `String` coloca metadados de tamanho fixo na pilha e dados \"\n\"dinamicamente dimensionados - a string propriamente dita - no _heap_:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Mencione que uma `String` é suportada por um `Vec`, portanto ela tem um \"\n\"tamanho e capacidade e pode crescer se for mutável por meio de realocação no \"\n\"heap.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Se os alunos perguntarem sobre isso, você pode mencionar que a memória \"\n\"subjacente é alocada no heap usando o _[System Allocator](https://doc.rust-\"\n\"lang.org/std/alloc/struct.System.html)_ e os alocadores personalizados podem \"\n\"ser implementados usando a _[API Allocator](https://doc.rust-lang.org/std/\"\n\"alloc/index.html)_.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Podemos inspecionar o layout da memória com Rust inseguro (`unsafe`). No \"\n\"entanto, você deve apontar que isso é legitimamente inseguro!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"mundo\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// NÃO FAÇA ISSO EM CASA! Somente com propósito educacional.\\n\"\n\"    // String não fornece nenhuma garantia sobre o seu layout, então isso \"\n\"pode causar\\n\"\n\"    // um comportamento indefinido.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacidade = {capacity}, ptr = {ptr:#x}, compr = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Tradicionalmente, as linguagens se dividem em duas grandes categorias:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\"Controle total através do gerenciamento manual de memória: C, C++, \"\n\"Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"Programador decide quando alocar ou liberar memória do heap.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"Programador deve determinar se um ponteiro ainda aponta para uma memória \"\n\"válida.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"Estudos mostram que os programadores cometem erros.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Segurança total através do gerenciamento automático de memória em tempo de \"\n\"execução: Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"Um sistema em tempo de execução garante que a memória não seja liberada até \"\n\"que não possa mais ser referenciada.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\"Normalmente implementado com contagem de referência, coleta de lixo ou RAII.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust oferece uma nova combinação:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Controle total _e_ segurança por imposição do correto gerenciamento de \"\n\"memória em tempo de compilação.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Ele faz isso com um conceito de _ownership_ (posse) explícito.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"Este slide tem a intenção de ajudar os alunos que vêm de outras linguagens a \"\n\"colocar o Rust em contexto.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"Em C, o gerenciamento do heap é feito manualmente com `malloc` e `free`. Os \"\n\"erros comuns incluem esquecer de chamar `free`, chamá-lo várias vezes para o \"\n\"mesmo ponteiro ou desreferenciar um ponteiro depois que a memória para a \"\n\"qual ele aponta foi liberada.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"O C++ possui ferramentas como ponteiros inteligentes (`unique_ptr`, \"\n\"`shared_ptr`) que aproveitam as garantias da linguagem sobre a chamada de \"\n\"destrutores para garantir que a memória seja liberada quando uma função \"\n\"retorna. Ainda é muito fácil usar essas ferramentas de maneira incorreta e \"\n\"criar bugs semelhantes aos do C.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java, Go e Python dependem do coletor de lixo para identificar a memória que \"\n\"não é mais acessível e descartá-la. Isso garante que qualquer ponteiro possa \"\n\"ser desreferenciado, eliminando o uso após a liberação e outras classes de \"\n\"bugs. Mas, o coletor de lixo tem um custo de tempo de execução e é difícil \"\n\"de ajustar corretamente.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"O modelo de _ownership_ e _borrowing_ do Rust pode, em muitos casos, obter o \"\n\"desempenho do C, com operações de alocação e liberação precisamente onde \"\n\"elas são necessárias - custo zero. Ele também fornece ferramentas \"\n\"semelhantes aos ponteiros inteligentes do C++. Quando necessário, outras \"\n\"opções, como contagem de referência, estão disponíveis, e até mesmo crates \"\n\"de terceiros estão disponíveis para suportar a coleta de lixo em tempo de \"\n\"execução (não abordada nesta aula).\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Todas as associações de variáveis têm um _escopo_ onde são válidas e é um \"\n\"erro usar uma variável fora de seu escopo:\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"Dizemos que a variável _owns_ (_possui_) o valor. Todo valor em Rust tem \"\n\"precisamente um _owner_ (dono) em todos os momentos.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"No final do escopo, a variável é descartada e os dados são liberados. Um \"\n\"destrutor pode ser executado aqui para liberar recursos.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"Os alunos familiarizados com implementações de coleta de lixo saberão que um \"\n\"coletor de lixo começa com um conjunto de \\\"raízes\\\" para encontrar toda a \"\n\"memória acessível. O princípio do _\\\"single owner\\\"_ (\\\"único dono\\\") do \"\n\"Rust é uma ideia semelhante.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Uma atribuição transferirá o _ownership_ entre variáveis:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Olá!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"A atribuição de `s1` a `s2` transfere o _ownership_.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"Quando `s1` sai do escopo, nada acontece: ele não tem _ownership_.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"Quando `s2` sai do escopo, os dados da string são liberados.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"Antes de mover para `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"Depois de mover para `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inacessível)\\\"     :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | tam       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacid   |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | tam       |     6 |   :\\n\"\n\":   | capacid   |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Quando você passa um valor para uma função, o valor é atribuído ao parâmetro \"\n\"da função. Isso transfere a _ownership_:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Olá {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Mencione que isso é o oposto dos _defaults_ (padrões) em C++, que copia por \"\n\"valor, a menos que você use `std::move` (e seu construtor esteja definido!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"Apenas o _ownership_ é movido. A geração de código de máquina para manipular \"\n\"os dados é uma questão de otimização, e essas cópias são agressivamente \"\n\"otimizadas.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"Valores simples (tais como inteiros) podem ser marcados como `Copy` (cópia) \"\n\"(veja slides mais adiante).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"No Rust, clones são explícitos (utilizando-se `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"No exemplo `say_hello`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Com a primeira chamada para `diga_ola`, `main` desiste da ownership de \"\n\"`nome`. Depois disso, `nome` não pode mais ser usado dentro de `main`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"A memória do heap alocada para `name` será liberada no final da função \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` pode manter a ownership se passar `nome` como uma referência \"\n\"(`&name`) e se `say_hello` aceitar uma referência como um parâmetro.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternativamente, `main` pode passar um clone de `nome` na primeira chamada \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust torna mais difícil a criação de cópias inadvertidamente do que o C++, \"\n\"tornando padrão a semântica de movimento e forçando os programadores a \"\n\"tornar os clones explícitos.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Cópias Defensivas em C++ Moderno\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"O C++ moderno resolve isso de maneira diferente:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Duplica os dados em s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Os dados de `s1` no heap são duplicados e `s2` obtém sua própria cópia \"\n\"independente.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"Quando `s1` e `s2` saem de escopo, cada um libera sua própria memória.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"Antes da atribuição por cópia:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"Após atribuição por cópia:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"O C++ fez uma escolha ligeiramente diferente do Rust. Como `=` copia dados, \"\n\"os dados da string devem ser clonados. Caso contrário, obteríamos uma dupla \"\n\"liberação quando qualquer string saísse de escopo.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"O C++ também possui [`std::move`](https://en.cppreference.com/w/cpp/utility/\"\n\"move), que é usado para indicar quando um valor pode ser movido. Se o \"\n\"exemplo fosse `s2 = std::move(s1)`, nenhuma alocação de heap seria feita. \"\n\"Após a movimentação, `s1` estaria em um estado válido, mas não especificado. \"\n\"Diferentemente do Rust, o programador pode continuar usando `s1`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"Diferentemente do Rust, `=` em C++ pode executar código arbitrário conforme \"\n\"determinado pelo tipo que está sendo copiado ou movido.\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"Às vezes você _quer_ fazer uma cópia de um valor. O _trait_ `Clone` consegue \"\n\"isso.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"A ideia de `Clone` é tornar fácil identificar onde as alocações de heap \"\n\"estão ocorrendo. Procure por `.clone()` e alguns outros como `vec!` ou `Box::\"\n\"new`.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"É comum \\\"clonar sua saída\\\" de problemas com o verificador de empréstimo e \"\n\"retornar mais tarde para tentar otimizar esses clones.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` geralmente realiza uma cópia profunda do valor, o que significa que \"\n\"se você, por exemplo, clonar um array, todos os elementos do array também \"\n\"são clonados.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"O comportamento para `clone` é definido pelo(a) usuário(a), então ele(a) \"\n\"pode executar lógica de clonagem personalizada, se necessário.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Embora a semântica de movimento seja o padrão, certos tipos são copiados por \"\n\"padrão:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Esses tipos implementam o _trait_ `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Você pode habilitar seus próprios tipos para usar a semântica de cópia:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Após a atribuição, tanto `p1` quanto `p2` possuem seus próprios dados.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"Também podemos usar `p1.clone()` para copiar os dados explicitamente.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Copia e clonagem não são a mesma coisa:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Cópia refere-se a cópias bit a bit de regiões de memória e não funciona em \"\n\"objetos arbitrários.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Cópia não permite lógica personalizada (ao contrário dos construtores de \"\n\"cópia em C++).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Clonagem é uma operação mais geral e também permite um comportamento \"\n\"personalizado através da implementação do trait `Clone`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"Cópia não funciona em tipos que implementam o trait `Drop`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"No exemplo acima, tente o seguinte:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Adicione um campo `String` ao `struct Point`. Ele não irá compilar porque \"\n\"`String` não é um tipo `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Remova `Copy` do atributo `derive`. O erro do compilador agora está no \"\n\"`println!` para `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Mostre que ele funciona se ao invés disso você clonar `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\"Referências compartilhadas são `Copy`/`Clone`, referências mutáveis não. \"\n\"Isso porque Rust requer que referências mutáveis sejam exclusivas, então, \"\n\"embora seja válido fazer uma cópia de uma referência compartilhada, criar \"\n\"uma cópia de uma referência mutável violaria as regras de empréstimo do Rust.\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"O Trait `Drop`\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Valores que implementam [`Drop`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Drop.html) podem especificar o código a ser executado quando saem do escopo:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Descartando {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Saindo do bloco B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Saindo do bloco A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Saindo do main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"Observe que `std::mem::drop` não é o mesmo que `std::ops::Drop::drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"Os valores são descartados automaticamente quando saem do escopo.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"Quando um valor é descartado, se ele implementa `std::ops::Drop` então sua \"\n\"implementação `Drop::drop` será chamada.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"Todas as seus campos serão descartadas também, independentemente de \"\n\"implementar `Drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` é apenas uma função vazia que recebe qualquer valor. A \"\n\"importância é que ela assume a _ownership_ do valor, então no final de seu \"\n\"escopo ele é descartado. Isso torna uma maneira conveniente de descartar \"\n\"explicitamente valores mais cedo do que eles sairiam do escopo.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"Isso pode ser útil para objetos que fazem algum trabalho em `drop`: \"\n\"liberando travas, fechando arquivos, etc.\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Por que `Drop::drop` não recebe `self`?\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Resposta curta: Se recebesse, `std::mem::drop` seria chamado no final do \"\n\"bloco, resultando em outra chamada para `Drop::drop` ocasionando um estouro \"\n\"de pilha.\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Tente substituir `drop(a)` por `a.drop()`.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"Neste exemplo, implementaremos um tipo de dados complexo que possui todos os \"\n\"seus dados. Usaremos o _\\\"builder pattern\\\"_ para suportar a construção de \"\n\"um novo valor peça por peça, usando funções de conveniência.\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"Preencha as peças que faltam.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// Uma representação de um pacote de software.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Retorna uma representação deste pacote como uma dependência, para uso \"\n\"na\\n\"\n\"    /// construção de outros pacotes.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// Um construtor para um Pacote. Use `build()` para criar o próprio \"\n\"`Package`.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Define a versão do pacote.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Define os autores do pacote.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Adiciona uma dependência adicional.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Define a linguagem. Se não definida, a linguagem é None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"[Box\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"](./smart-pointers/box.md) (10 minutos)\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"[Rc](./smart-pointers/rc.md) (5 minutos)\"\n\n#: src/smart-pointers.md\nmsgid \"[Owned Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\"[Objetos de Trait _Owned_](./smart-pointers/trait-objects.md) (10 minutos)\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"[Exercício: Árvore Binária](./smart-pointers/exercise.md) (30 minutos)\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) é um ponteiro \"\n\"_owned_ para dados no heap:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"cinco: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementa `Deref<Target = T>`, o que significa que você pode \"\n\"[chamar métodos de `T` diretamente em um `Box<T>`](https://doc.rust-lang.org/\"\n\"std/ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Tipos de dados recursivos ou tipos de dados com tamanhos dinâmicos precisam \"\n\"usar uma `Box`:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// Uma lista não vazia: primeiro elemento e o resto da lista.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// Uma lista vazia.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Pilha                           Heap\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                         :     :                                               :\\n\"\n\":    \"\n\"lista                :     :                                               :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":   | Elem | 1  | o--+----+-----+--->| Elem | 2  | o--+--->| Nil  | // | // \"\n\"|   :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":                         :     :                                               :\\n\"\n\":                         :     :                                               :\\n\"\n\"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` é parecido com `std::unique_ptr` em C++, exceto que ele é \"\n\"garantidamente não nulo.\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Uma `Box` é útil quando você:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"há um tipo cujo tamanho não está disponível em tempo de compilação, mas o \"\n\"compilador Rust precisa saber o tamanho exato.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"quer transferir o _ownership_ de um grande volume de dados. Ao invés de \"\n\"copiar grandes volumes de dados na pilha, eles são armazenados usando uma \"\n\"`Box` no _heap_ e apenas o ponteiro é movido.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"Se `Box` não for usado e tentarmos incorporar um `List` diretamente no \"\n\"`List`, o compilador não conseguiria calcular um tamanho fixo da _struct_ na \"\n\"memória (`List` teria tamanho infinito).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` resolve esse problema, pois tem o mesmo tamanho de um ponteiro normal \"\n\"e apenas aponta para o próximo elemento da `List` no _heap_.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Remova o `Box` na definição de `List` e mostre o erro de compilação. Nós \"\n\"obtemos a mensagem \\\"recursive without indirection\\\" (recursivo sem \"\n\"indireção), porque para recursão de dados, temos que usar indireção, um \"\n\"`Box` ou referência de algum tipo, ao invés de armazenar o valor diretamente.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Otimização de Nicho\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\"Embora `Box` pareça com `std::unique_ptr` em C++, ele não pode ser vazio/\"\n\"nulo. Isso faz com que `Box` seja um dos tipos que permitem ao compilador \"\n\"otimizar o armazenamento de alguns _enums_.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\"Por exemplo, `Option<Box<T>>` tem o mesmo tamanho que apenas `Box<T>`, \"\n\"porque o compilador usa o valor NULL para discriminar as variantes em vez de \"\n\"usar uma tag explícita ([\\\"Null Pointer Optimization\\\"](https://doc.rust-\"\n\"lang.org/std/option/#representation)):\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\\\"Apenas box\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\\\"Box opcional\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\\\"Tamanho de just_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\\\"Tamanho de optional_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\\\"Tamanho de none: {}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) é um ponteiro \"\n\"compartilhado com contagem de referência. Use-o quando precisar consultar os \"\n\"mesmos dados a partir de vários locais:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Veja [`Arc`](../concurrency/shared_state/arc.md) e [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) se você estiver em um contexto \"\n\"multi-thread.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Você pode demover (_downgrade_) um ponteiro compartilhado para um ponteiro \"\n\"[`Weak`](https://doc.rust-lang.org/std/rc/struct.Weak.html) (fraco) para \"\n\"criar ciclos que serão descartados.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"O contador do `Rc` garante que os seus valores contidos sejam válidos \"\n\"enquanto houver referências.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"`Rc` em Rust é como `std::shared_ptr` em C++.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` é barato: ele cria um ponteiro para a mesma alocação e aumenta a \"\n\"contagem de referência. Ele não faz um \\\"clone profundo\\\" (_deep clone_) e \"\n\"geralmente pode ser ignorado ao procurar problemas de desempenho no código.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` realmente clona o valor interno se necessário (\\\"_clone-on-\"\n\"write_\\\") e retorna uma referência mutável.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Use `Rc::strong_count` para verificar a contagem de referência.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` fornece um objeto com _contagem de referência fraca_ \"\n\"(_weakly reference-counted_) para criar ciclos que serão descartados \"\n\"corretamente (provavelmente em combinação com `RefCell`).\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\"Anteriormente vimos como objetos de trait podem ser usados com referências, \"\n\"por exemplo, `&dyn Pet`. No entanto, também podemos usar objetos de trait \"\n\"com ponteiros inteligentes como `Box` para criar um objeto de trait _owned_: \"\n\"`Box<dyn Pet>`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Layout da memória após alocar `pets`:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Pilha                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | tam       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacid.  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Tipos que implementam um dado `trait` podem ter tamanhos diferentes. Isto \"\n\"torna impossível haver coisas como `Vec<dyn Pet>` no exemplo anterior.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` é uma maneira de dizer ao compilador sobre um tipo de tamanho \"\n\"dinâmico que implementa `Pet`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"No exemplo, `pets` é alocado na pilha e os dados do vetor estão no heap. Os \"\n\"dois elementos do vetor são _fat pointers_ (ponteiros \\\"gordos\\\"):\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"Um _fat pointer_ é um ponteiro de dupla largura. Ele tem dois componentes: \"\n\"um ponteiro para o objeto real e um ponteiro para a [tabela de métodos \"\n\"virtuais](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable) para \"\n\"a implementação `Pet` desse objeto em particular.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"Os dados para o `Dog` chamado Fido são os campos `name` e `age`. O `Cat` tem \"\n\"um campo `lives`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"Compare estas saídas no exemplo anterior::\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"Uma árvore binária é uma estrutura de dados do tipo árvore onde cada nó tem \"\n\"dois filhos (esquerdo e direito). Criaremos uma árvore onde cada nó armazena \"\n\"um valor. Para um determinado nó N, todos os nós na subárvore esquerda de N \"\n\"contêm valores menores, e todos os nós na subárvore direita de N conterão \"\n\"valores maiores.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"Implemente os seguintes tipos, para que os testes fornecidos passem.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\"Extra: implemente um iterador sobre uma árvore binária que retorna os \"\n\"valores em ordem.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// Um nó na árvore binária.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// Uma subárvore possivelmente vazia.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// Um contêiner que armazena um conjunto de valores, usando uma árvore \"\n\"binária.\\n\"\n\"///\\n\"\n\"/// Se o mesmo valor for adicionado várias vezes, ele é armazenado apenas \"\n\"uma vez.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// Implemente `new`, `insert`, `len` e `has` para `Subtree`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// não é um item único\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (55 minutes)\"\nmsgstr \"[Empréstimo](./borrowing.md) (55 minutos)\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\nmsgstr \"[Tempos de Vida](./lifetimes.md) (50 minutos)\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve durar cerca de 1 hora e 55 \"\n\"minutos\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"[Emprestar um Valor](./borrowing/shared.md) (10 minutos)\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"[Verificação de Empréstimo](./borrowing/borrowck.md) (10 minutos)\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Errors](./borrowing/examples.md) (3 minutes)\"\nmsgstr \"[Erros de Empréstimo](./borrowing/examples.md) (3 minutos)\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\"[Mutabilidade Interna](./borrowing/interior-mutability.md) (10 minutos)\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercício: Estatísticas de Saúde](./borrowing/exercise.md) (20 minutos)\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Como vimos antes, ao invés de transferir a _ownership_ ao chamar uma função, \"\n\"você pode deixar uma função _emprestar_ (_borrow_) o valor:\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\"A função `add` _pega emprestado_ (_borrows_) dois pontos e retorna um novo \"\n\"ponto.\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"O chamador mantém a _ownership_ das entradas.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"Este slide é uma revisão do material sobre referências do dia 1, expandindo \"\n\"um pouco para incluir argumentos e valores de retorno de funções.\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"Notas sobre os retornos da pilha e inlining:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"Demonstre que o retorno de `somar` é barato porque o compilador pode \"\n\"eliminar a operação de cópia. Modifique o código acima para imprimir \"\n\"endereços da pilha e execute-o no [Playground](https://play.rust-lang.org/) \"\n\"ou veja o código _assembly_ em [Godbolt](https://rust.godbolt.org/). No \"\n\"nível de otimização \\\"DEBUG\\\", os endereços devem mudar, enquanto eles \"\n\"permanecem os mesmos quando a configuração é alterada para \\\"RELEASE\\\":\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\"O compilador Rust pode fazer inlining automático, que pode ser desativado em \"\n\"um nível de função com `#[inline(never)]`.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\"Uma vez desativado, o endereço impresso mudará em todos os níveis de \"\n\"otimização. Olhando para Godbolt ou Playground, pode-se ver que, neste caso, \"\n\"o retorno do valor depende do ABI, por exemplo, no amd64 os dois i32 que \"\n\"compõem o ponto serão retornados em 2 registradores (eax e edx).\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"O _verificador de empréstimo_ (_borrow checker_) do Rust impõe restrições \"\n\"sobre as maneiras como você pode emprestar valores. Para um determinado \"\n\"valor, a qualquer momento:\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\"Você pode ter uma ou mais referências compartilhadas para o valor, _ou_\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Você pode ter exatamente uma referência exclusiva para o valor.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"Observe que o requisito é que as referências conflitantes não _existam_ no \"\n\"mesmo ponto. Não importa onde a referência é desreferenciada.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"O código acima não compila porque `a` é emprestado como mutável (através de \"\n\"`c`) e como imutável (através de `b`) ao mesmo tempo.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Mova a instrução `println!` para `b` antes do escopo que introduz `c` para \"\n\"fazer o código compilar.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Após essa alteração, o compilador percebe que `b` só é usado antes do novo \"\n\"empréstimo mutável de `a` através de `c`. Este é um recurso do verificador \"\n\"de empréstimo (_borrow checker_) chamado \\\"tempos de vida não lexicais\\\".\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"A restrição de referência exclusiva é bastante forte. O Rust a usa para que \"\n\"_data races_ (_corridas de dados_) não ocorram. O Rust também _depende_ \"\n\"dessa restrição para otimizar o código. Por exemplo, um valor atrás de uma \"\n\"referência compartilhada pode ser armazenado com segurança em um registrador \"\n\"pelo tempo de vida dessa referência.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"O verificador de empréstimo (_borrow checker_) é projetado para acomodar \"\n\"muitos padrões comuns, como obter referências exclusivas para campos \"\n\"diferentes em uma _struct_ ao mesmo tempo. Mas, há algumas situações em que \"\n\"ele não entende muito bem e isso geralmente resulta em \\\"lutar com o \"\n\"verificador de empréstimo\\\".\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\"Como um exemplo concreto de como essas regras de empréstimo evitam erros de \"\n\"memória, considere o caso de modificar uma coleção enquanto há referências \"\n\"para os seus elementos:\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"{elem}\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"Da mesma forma, considere o caso de invalidação do iterador:\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\"Em ambos os casos, modificar a coleção ao adicionar novos elementos a ela \"\n\"pode potencialmente invalidar referências existentes para os elementos da \"\n\"coleção se a coleção tiver que realocar.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"Em algumas situações, é necessário modificar dados atrás de uma referência \"\n\"compartilhada (somente leitura). Por exemplo, uma estrutura de dados \"\n\"compartilhada pode ter um cache interno e desejar atualizar esse cache a \"\n\"partir de métodos somente leitura.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"O padrão de \\\"mutabilidade interna\\\" permite acesso exclusivo (mutável) por \"\n\"trás de uma referência compartilhada. A biblioteca padrão fornece várias \"\n\"maneiras de fazer isso, garantindo segurança, geralmente realizando uma \"\n\"verificação em tempo de execução.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"// Observe que `cell` NÃO é declarado como mutável.\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\"// Isso gera um erro em tempo de execução.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{cell:?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\"`Cell` envolve um valor e permite obter ou definir o valor, mesmo com uma \"\n\"referência compartilhada para o `Cell`. No entanto, não permite nenhuma \"\n\"referência ao valor. Como não há referências, as regras de empréstimo não \"\n\"podem ser quebradas.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"O principal a ser observado neste slide é que o Rust fornece maneiras \"\n\"_seguras_ de modificar dados por trás de uma referência compartilhada. Há \"\n\"uma variedade de maneiras de garantir essa segurança, e `RefCell` e `Cell` \"\n\"são duas delas.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` faz cumprir as regras de empréstimo usuais do Rust (ou várias \"\n\"referências compartilhadas ou uma única referência exclusiva) com uma \"\n\"verificação em tempo de execução. Neste caso, todos os empréstimos são muito \"\n\"curtos e nunca se sobrepõem, então as verificações sempre têm sucesso.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\"O bloco extra no exemplo de `RefCell` é para encerrar o empréstimo criado \"\n\"pela chamada a `borrow_mut` antes de imprimir o `cell`. Tentar imprimir um \"\n\"`RefCell` emprestado mostra apenas a mensagem `\\\"{borrowed}\\\"`.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` é um meio mais simples de garantir a segurança: ele tem um método \"\n\"`set` que recebe `&self`. Isso não precisa de uma verificação em tempo de \"\n\"execução, mas requer mover valores, o que pode ter seu próprio custo.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\"Tanto `RefCell` quanto `Cell` são `!Sync`, o que significa que `&RefCell` e \"\n\"`&Cell` não podem ser passados entre threads. Isso impede que duas threads \"\n\"tentem acessar o `cell` ao mesmo tempo.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Você está trabalhando na implementação de um sistema de monitoramento de \"\n\"saúde. Como parte disso, você precisa acompanhar as estatísticas de saúde \"\n\"dos usuários.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Você começará com um esboço de função em um bloco `impl` e também uma \"\n\"definição de `struct` `User`. Seu objetivo é implementar o método esboçado \"\n\"na `struct` `User` definida no bloco `impl`.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Copie o código abaixo em <https://play.rust-lang.org/> e implemente os \"\n\"métodos que estão faltando:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Atualiza as estatísticas de um usuário com base nas medições de uma visita \"\n\"ao médico\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"Eu sou {} e minha idade é {}\\\"\"\n\n#: src/lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\nmsgstr \"\"\n\"[Anotações de Tempo de Vida](./lifetimes/lifetime-annotations.md) (10 \"\n\"minutos)\"\n\n#: src/lifetimes.md\nmsgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"[Elisão de Tempo de Vida](./lifetimes/lifetime-elision.md) (5 minutos)\"\n\n#: src/lifetimes.md\nmsgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\"[Tempos de Vida de Struct](./lifetimes/struct-lifetimes.md) (5 minutos)\"\n\n#: src/lifetimes.md\nmsgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"[Exercício: Análise de Protobuf](./lifetimes/exercise.md) (30 minutos)\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"Uma referência tem um _tempo de vida_ (lifetime), que não deve \"\n\"\\\"sobreviver\\\" ao valor ao qual se refere. Isso é verificado pelo _borrow \"\n\"checker_ (verificador de empréstimo).\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"O tempo de vida pode ser implícito - isso é o que vimos até agora. Os tempos \"\n\"de vida também podem ser explícitos: `&'a Point`, `&'document str`. Os \"\n\"tempos de vida começam com `'` e `'a` é um nome padrão típico. Leia `&'a \"\n\"Point` como \\\"um `Point` emprestado que é válido por pelo menos o tempo de \"\n\"vida `a`\\\".\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"Os tempos de vida são sempre inferidos pelo compilador: você não pode \"\n\"atribuir um tempo de vida por conta própria. Anotações explícitas de tempo \"\n\"de vida criam restrições onde há ambiguidade; o compilador verifica se há \"\n\"uma solução válida.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"Os tempos de vida se tornam mais complicados ao considerar a passagem de \"\n\"valores para e a devolução de valores de funções.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// Qual é o tempo de vida de p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"Neste exemplo, o compilador não sabe qual tempo de vida inferir para `p3`. \"\n\"Olhando dentro do corpo da função nos mostra que ele só pode assumir com \"\n\"segurança que o tempo de vida de `p3` é o mais curto de `p1` e `p2`. Mas \"\n\"assim como os tipos, o Rust requer anotações explícitas de tempos de vida \"\n\"nos argumentos e valores de retorno da função.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"Adicione `'a` apropriadamente a `left_most` (mais à esquerda):\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"Isto diz, \\\"dado p1 e p2 que sobrevivem a `'a`, o valor de retorno vive por \"\n\"pelo menos `'a`.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"Em casos comuns, os tempos de vida podem ser omitidos, como descrito no \"\n\"próximo slide.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Tempos de vida (Lifetimes) em Chamadas de Função\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"Tempos de vida para argumentos de função e valores de retorno precisam ser \"\n\"completamente especificados, mas o Rust permite que eles sejam omitidos na \"\n\"maioria das vezes com [algumas regras simples](https://doc.rust-lang.org/\"\n\"nomicon/lifetime-elision.html). Isso não é inferência - é apenas uma \"\n\"abreviação sintática.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"Cada argumento que não tem uma anotação de tempo de vida é dado um.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"Se houver apenas um tempo de vida de argumento, ele é dado a todos os \"\n\"valores de retorno não anotados.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"Se houver vários tempos de vida de argumento, mas o primeiro for para `self` \"\n\"(_self_), esse tempo de vida é dado a todos os valores de retorno não \"\n\"anotados.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"Neste exemplo, `cab_distance` é trivialmente omitido.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"A função `nearest` fornece outro exemplo de uma função com várias \"\n\"referências em seus argumentos que requer anotação explícita.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"Tente ajustar a assinatura para \\\"mentir\\\" sobre os tempos de vida \"\n\"retornados:\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"Isso não irá compilar, demonstrando que as anotações são verificadas quanto \"\n\"à validade pelo compilador. Observe que esse não é o caso dos ponteiros \"\n\"brutos (_raw pointers_) (inseguros), e essa é uma fonte comum de erros com \"\n\"Rust inseguro.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"Os alunos podem perguntar quando usar tempos de vida. Os empréstimos do Rust \"\n\"sempre têm tempos de vida. Na maioria das vezes, a omissão e a inferência de \"\n\"tipo significam que eles não precisam ser escritos. Em casos mais \"\n\"complicados, as anotações de tempo de vida podem ajudar a resolver a \"\n\"ambiguidade. Muitas vezes, especialmente ao prototipar, é mais fácil \"\n\"trabalhar com dados _owned_ (_owned data_) clonando valores quando \"\n\"necessário.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Tempos de Vida em Estruturas de Dados\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Se um tipo de dados armazena dados emprestados, ele deve ser anotado com um \"\n\"tempo de vida:\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Até logo {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"No exemplo acima, a anotação em `Highlight` impõe que os dados subjacentes \"\n\"ao `&str` contido vivam pelo menos tanto quanto qualquer instância de \"\n\"`Highlight` que use esses dados.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Se `text` for consumido antes do final do tempo de vida de `fox` (ou `dog`), \"\n\"o _borrow checker_ (verificador de empréstimo) lançará um erro.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Tipos com _borrowed data_ (dados emprestados) forçam os usuários a manter os \"\n\"dados originais. Isso pode ser útil para criar exibições leves, mas \"\n\"geralmente as tornam um pouco mais difíceis de usar.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Quando possível, faça com que as estruturas de dados possuam (_own_) seus \"\n\"dados diretamente.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Algumas _structs_ com múltiplas referências internas podem ter mais de uma \"\n\"anotação de tempo de vida. Isso pode ser necessário se houver a necessidade \"\n\"de descrever-se relacionamentos de tempo de vida entre as próprias \"\n\"referências, além do tempo de vida da própria _struct_. Esses são casos de \"\n\"uso bastante avançados.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"Neste exercício, você construirá um analisador (_parser_) para a \"\n\"[codificação binária de protobuf](https://protobuf.dev/programming-guides/\"\n\"encoding/). Não se preocupe, é mais simples do que parece! Isso ilustra um \"\n\"padrão de análise comum, passando _slices_ de dados. Os próprios dados \"\n\"subjacentes nunca são copiados.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"Analisar (_parse_) completamente uma mensagem protobuf requer conhecer os \"\n\"tipos dos campos, indexados por seus números de campo. Isso é normalmente \"\n\"fornecido em um arquivo `proto`. Neste exercício, codificaremos essas \"\n\"informações em declarações `match` em funções que são chamadas para cada \"\n\"campo.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"Usaremos o seguinte proto:\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"Uma mensagem proto é codificada como uma série de campos, um após o outro. \"\n\"Cada um é implementado como uma \\\"tag\\\" seguida pelo valor. A tag contém um \"\n\"número de campo (por exemplo, `2` para o campo `id` de uma mensagem \"\n\"`Person`) e um tipo de fio (_wire type_) definindo como a carga útil deve \"\n\"ser determinada a partir do fluxo (_stream_) de bytes.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"Números inteiros, incluindo a tag, são representados com uma codificação de \"\n\"comprimento variável chamada VARINT. Felizmente, `parse_varint` é definido \"\n\"para você abaixo. O código fornecido também define _callbacks_ para lidar \"\n\"com campos `Person` e `PhoneNumber`, e para analisar uma mensagem em uma \"\n\"série de chamadas para esses _callbacks_.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"O que resta para você é implementar a função `parse_field` e o _trait_ \"\n\"`ProtoMessage` para `Person` e `PhoneNumber`.\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// Um wire type como visto no wire.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// O Varint WireType indica que o valor é um único VARINT.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64,  -- não é necessário para este exercício\\n\"\n\"    /// O Len WireType indica que o valor é um comprimento representado como \"\n\"um\\n\"\n\"    /// VARINT seguido exatamente por esse número de bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\"/// O I32 WireType indica que o valor é precisamente 4 bytes em\\n\"\n\"    /// ordem little-endian contendo um inteiro de 32 bits com sinal.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// O valor de um campo, digitado com base no wire type.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- não é necessário para este exercício\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// Um campo, contendo o número do campo e seu valor.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64,  -- não é necessário para este exercício\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\\\"Wire-type inválido: {value}\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\\\"Esperava-se que a string fosse um campo `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\\\"String inválida\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\\\"Esperava-se que os bytes fossem um campo `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\\\"Esperava-se que `u64` fosse um campo `Varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `i32` to be an `I32` field\\\"\"\nmsgstr \"\\\"Esperava-se que `i32` fosse um campo `I32\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Analise (_parse_) um VARINT, retornando o valor analisado e os bytes \"\n\"restantes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\\\"Não há bytes suficientes para o varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// Este é o último byte do VARINT, então converta-o para\\n\"\n\"            // um u64 e retorne-o.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// Mais de 7 bytes é inválido.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\\\"Bytes demais para varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Converta uma tag em um número de campo e um WireType.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Analise (_parse_) um campo, retornando os bytes restantes\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"Com base no wire type, construa um Field, consumindo quantos bytes forem \"\n\"necessários.\\\"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"Retorne o campo e quaisquer bytes não consumidos.\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Analise (_parse_) uma mensagem nos dados fornecidos, chamando `T::\"\n\"add_field` para cada campo na\\n\"\n\"/// mensagem.\\n\"\n\"///\\n\"\n\"/// Todo o input é consumido.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Implemente ProtoMessage para Person e PhoneNumber.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\"Neste exercício, há vários casos em que a análise de protobuf pode falhar, \"\n\"por exemplo, se você tentar analisar um `i32` quando houver menos de 4 bytes \"\n\"restantes no buffer de dados. Em código Rust normal, lidaríamos com isso com \"\n\"o enum `Result`, mas para simplicidade neste exercício, lançamos um pânico \"\n\"se ocorrerem erros. No dia 4, abordaremos o tratamento de erros em Rust com \"\n\"mais detalhes.\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\\\"len não é um `usize` válido\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"EOF inesperado\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"// Unwrap o erro porque `value` definitivamente tem 4 bytes.\\n\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// pule todo o resto\\n\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"Bem-vindos ao Dia 4\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"Hoje abordaremos tópicos relacionados à construção de software em larga \"\n\"escala em Rust:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"Iteradores: uma análise profunda do _trait_ `Iterator`.\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"Módulos e visibilidade.\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"Testes.\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"Tratamento de erros: pânicos, `Result` e o operador `?`.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\"Rust inseguro: a saída de emergência quando você não consegue se expressar \"\n\"em Rust seguro.\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Bem-vindos](./welcome-day-4.md) (3 minutos)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"[Iteradores](./iterators.md) (45 minutos)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"[Módulos](./modules.md) (40 minutos)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"[Testes](./testing.md) (45 minutos)\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve durar cerca de 2 horas e 40 \"\n\"minutos\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"[Iterator](./iterators/iterator.md) (5 minutos)\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"[IntoIterator](./iterators/intoiterator.md) (5 minutos)\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"[FromIterator](./iterators/fromiterator.md) (5 minutos)\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercício: Encadeamento de Métodos de Iterador](./iterators/exercise.md) \"\n\"(30 minutos)\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"O _trait_ [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html) suporta a iteração sobre valores em uma coleção. Ele requer um método \"\n\"`next` e fornece muitos métodos. Muitos tipos da biblioteca padrão \"\n\"implementam `Iterator`, e você também pode implementá-lo:\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"O _trait_ `Iterator` implementa muitas operações comuns de programação \"\n\"funcional sobre coleções (por exemplo, `map`, `filter`, `reduce`, etc). Este \"\n\"é o _trait_ onde você pode encontrar toda a documentação sobre eles. Em \"\n\"Rust, essas funções devem produzir o código tão eficiente quanto as \"\n\"implementações imperativas equivalentes.\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` é o _trait_ que faz os laços `for` funcionarem. Ele é \"\n\"implementado por tipos de coleção como `Vec<T>` e referências a eles como \"\n\"`&Vec<T>` e `&[T]`. Intervalos (_ranges_) também o implementam. É por isso \"\n\"que você pode iterar sobre um vetor com `for i in some_vec { .. }`, mas \"\n\"`some_vec.next()` não existe.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"O _trait_ `Iterator` informa como _iterar_ depois de criar um iterador. O \"\n\"_trait_ relacionado [`IntoIterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.IntoIterator.html) define como criar um iterador para um tipo. Ele é \"\n\"usado automaticamente pelo laço `for`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Clique na documentação para `IntoIterator`. Toda implementação de \"\n\"`IntoIterator` deve declarar dois tipos:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: o tipo sobre o qual iteramos, como `i8`,\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: o tipo `Iterator` retornado pelo método `into_iter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Observe que `IntoIter` e `Item` estão vinculados: o iterador deve ter o \"\n\"mesmo tipo `Item`, o que significa que ele retorna `Option<Item>`\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"O exemplo itera sobre todas as combinações de coordenadas x e y.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"Tente iterar sobre o _grid_ duas vezes em `main`. Por que isso falha? \"\n\"Observe que `IntoIterator::into_iter` assume a propriedade de `self`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"Corrija este problema implementando `IntoIterator` para `&Grid` e \"\n\"armazenando uma referência ao `Grid` em `GridIter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"O mesmo problema pode ocorrer para tipos da biblioteca padrão: `for e in \"\n\"some_vector` assumirá a propriedade de `some_vector` e iterará sobre \"\n\"elementos _owned_ desse vetor. Use `for e in &some_vector` em vez disso, \"\n\"para iterar sobre referências aos elementos de `some_vector`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"permite que você construa uma coleção a partir de um [`Iterator`](https://\"\n\"doc.rust-lang.org/std/iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator` implementa\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"Existem duas maneiras de especificar `B` para este método:\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"Com o \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, como \"\n\"mostrado. O _shorthand_ `_` usado aqui permite que o Rust infira o tipo dos \"\n\"elementos do `Vec`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"Com inferência de tipo: `let prime_squares: Vec<_> = some_iterator.\"\n\"collect()`. Reescreva o exemplo para usar esta forma.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Há implementações básicas de `FromIterator` para `Vec`, `HashMap`, etc. \"\n\"Também existem implementações mais especializadas que permitem fazer coisas \"\n\"legais, como converter um `Iterator<Item = Result<V, E>>` em um \"\n\"`Result<Vec<V>, E>`.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Neste exercício, você precisará encontrar e usar alguns dos métodos \"\n\"fornecidos no _trait_ [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html) para implementar um cálculo complexo.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Copie o seguinte código para <https://play.rust-lang.org/> e faça os testes \"\n\"passarem. Use uma expressão de iterador e `collect` o resultado para \"\n\"construir o valor de retorno.\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calcule as diferenças entre os elementos de `values` deslocados por \"\n\"`offset`,\\n\"\n\"/// voltando ao início de `values` no final.\\n\"\n\"///\\n\"\n\"/// O elemento `n` do resultado é `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"[Módulos](./modules/modules.md) (3 minutos)\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\"[Hierarquia de Sistema de Arquivos](./modules/filesystem.md) (5 minutos)\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"[Visibilidade](./modules/visibility.md) (5 minutos)\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"[use, super, self](./modules/paths.md) (10 minutos)\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercício: Módulos para uma Biblioteca GUI](./modules/exercise.md) (15 \"\n\"minutos)\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Vimos como os blocos `impl` nos permitem usar _namespaces_ (espaços de \"\n\"nomes) de funções para um tipo.\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"Da mesma forma, `mod` nos permite usar _namespaces_ de tipos e funções:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"No módulo foo\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"No módulo bar\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Pacotes (_packages_) fornecem funcionalidades e incluem um arquivo `Cargo.\"\n\"toml` que descreve como gerar um pacote com um ou mais _crates_.\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"_Crates_ são arvores de módulos, onde um _crate_ binário cria um executável \"\n\"e um _crate_ de biblioteca é compilado em uma biblioteca.\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"Módulos definem organização, escopo e são o foco desta seção.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\"Omitir o conteúdo do módulo dirá ao Rust para procurá-lo em outro arquivo:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"Isto diz ao Rust que o conteúdo do módulo `garden` é encontrado em `src/\"\n\"garden.rs`. Da mesma forma, um módulo `garden::vegetables` pode ser \"\n\"encontrado em `src/garden/vegetables.rs`.\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"A raiz do `crate` está em:\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (para um _crate_ de biblioteca)\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (para um _crate_ binário)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"Módulos definidos em arquivos também podem ser documentados usando \"\n\"\\\"comentários internos de documento\\\" (_inner doc comments_). Estes \"\n\"documentam o item que os contém - neste caso, um módulo.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! Este módulo implementa o jardim (_garden_), incluindo uma implementação \"\n\"de germinação\\n\"\n\"//!  de alto desempenho.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Re-exporta tipos deste módulo.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Semeia os pacotes de semente fornecidos.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Colhe os vegetais no jardim que está pronto.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"Antes do Rust 2018, os módulos precisavam estar localizados em `module/mod.\"\n\"rs` ao invés de `module.rs`, e esta ainda é uma alternativa funcional para \"\n\"edições posteriores a 2018.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"A principal razão para introduzir `nome_de_arquivo.rs` como alternativa a \"\n\"`nome_de_arquivo/mod.rs` foi porque muitos arquivos denominados `mod.rs` \"\n\"podem ser difíceis de distinguir em IDEs.\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"O aninhamento mais profundo pode usar pastas, mesmo que o módulo principal \"\n\"seja um arquivo:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"O local no qual o Rust irá procurar por módulos pode ser alterado por meio \"\n\"de uma diretiva de compilador:\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"algum/caminho.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"Isto é útil, por exemplo, se você quiser colocar testes para um módulo em um \"\n\"arquivo chamado `algum_modulo_teste.rs`, semelhante à convenção em Go.\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Módulos são limitadores de privacidade:\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Itens do módulo são privados por padrão (ocultam detalhes de implementação).\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Itens paternos e fraternos são sempre visíveis.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"Em outras palavras, se um item é visível no módulo `foo`, ele é visível em \"\n\"todos os descendentes de `foo`.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Use a palavra reservada `pub` para tornar módulos públicos.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"Adicionamente, existem especificadores `pub(...)` avançados para restringir \"\n\"o escopo de visibilidade pública.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Veja a [Referência Rust](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"A configuração de visibilidade `pub(crate)` é um padrão comum.\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"Menos comum, você pode dar visibilidade para um caminho específico.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"Em todo caso, a visibilidade deve ser concedida a um módulo ancestral (e a \"\n\"todos os seus descendentes).\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use, super, self\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"Um módulo pode trazer símbolos de outro módulo para o escopo com `use`. \"\n\"Normalmente, você verá algo assim na parte superior de cada módulo:\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Caminhos (_Paths_)\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Caminhos são resolvidos da seguinte forma:\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"Como um caminho relativo:\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` ou `self::foo` referem-se à `foo` no módulo atual,\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` refere-se à `foo` no módulo pai.\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"Como um caminho absoluto:\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` refere-se à `foo` na raiz do _crate_ atual,\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` refere-se a `foo` no _crate_ `bar`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"É comum \\\"re-exportar\\\" símbolos em um caminho mais curto. Por exemplo, o \"\n\"nível superior `lib.rs` em um _crate_ pode ter\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"tornando `DiskStorage` e `NetworkStorage` disponíveis para outros _crates_ \"\n\"com um caminho conveniente e curto.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"Na maior parte, apenas itens que aparecem em um módulo precisam ser `use`. \"\n\"No entanto, um _trait_ deve estar no escopo para chamar quaisquer métodos \"\n\"nesse _trait_, mesmo que um tipo que implemente esse _trait_ já esteja no \"\n\"escopo. Por exemplo, para usar o método `read_to_string` em um tipo que \"\n\"implementa o _trait_ `Read`, você precisa `use std::io::Read`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"A instrução `use` pode ter um curinga: `use std::io::*`. Isso é \"\n\"desencorajado porque não está claro quais itens são importados, e eles podem \"\n\"mudar ao longo do tempo.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"Neste exercício, você reorganizará uma pequena implementação de uma \"\n\"biblioteca GUI. Esta biblioteca define um _trait_ `Widget` e algumas \"\n\"implementações desse _trait_, bem como uma função `main`.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"É típico colocar cada tipo ou conjunto de tipos intimamente relacionados em \"\n\"seu próprio módulo, então cada tipo de _widget_ deve ter seu próprio módulo.\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"Configuração do Cargo\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"O _playground_ do Rust suporta apenas um arquivo, então você precisará criar \"\n\"um projeto Cargo em seu sistema de arquivos local:\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"Edite o `src/main.rs` resultante para adicionar declarações `mod`, e \"\n\"adicione arquivos adicionais no diretório `src`.\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"Código-fonte\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"Aqui está a implementação de um único módulo da biblioteca GUI:\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Largura natural de `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Desenha o _widget_ em um buffer.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Desenha o _widget_ na saída padrão.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Adiciona 4 preenchimentos para as bordas\\n\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Altere draw_into para retornar Result<(), std::fmt::Error>. Então \"\n\"use\\n\"\n\"        // o operador ? aqui em vez de .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// adicione um pouco de preenchimento\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"Este é um pequeno demo de GUI em texto.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Clique em mim!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"Incentive os alunos a dividir o código de uma maneira que pareça natural \"\n\"para eles, e se acostumem com as declarações `mod`, `use` e `pub` \"\n\"necessárias. Depois, discuta quais organizações são mais idiomáticas.\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Adiciona 4 preenchimentos para as bordas\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: depois de aprender sobre tratamento de erros, você pode alterar\\n\"\n\"        // draw_into para retornar Result<(), std::fmt::Error>. Então use\\n\"\n\"        // o operador ? aqui em vez de .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"[Módulos de Teste](./testing/unit-tests.md) (5 minutos)\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"[Outros Tipos de Testes](./testing/other.md) (5 minutos)\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"[Lints do Compilador e Clippy](./testing/lints.md) (3 minutos)\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"[Exercício: Algoritmo de Luhn](./testing/exercise.md) (30 minutos)\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Testes Unitários\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust e Cargo vêm com uma estrutura de testes unitários simples:\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Testes unitários são suportados em todo o seu código.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"Testes de integração são suportados através do diretório `tests/`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"Testes são marcados com `#[test]`. Testes unitários são frequentemente \"\n\"colocados em um módulo aninhado `tests`, usando `#[cfg(test)]` para compilá-\"\n\"los condicionalmente apenas ao construir testes.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Hello World\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Isso permite que você tenha testes unitários auxiliares privados.\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"O atributo `#[cfg(test)]` somente fica ativo quando você executa `cargo \"\n\"test`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"Execute os testes no _playground_ para mostrar seus resultados.\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Testes de Integração\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Se quiser testar sua biblioteca como um cliente, use um teste de integração.\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Crie um arquivo `.rs` em `tests/`:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Esses testes têm acesso somente à API pública do seu crate.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Testes de Documentação\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust tem suporte embutido para testes de documentação:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// Reduz uma string para o comprimento fornecido.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Blocos de código em comentários `///` são vistos automaticamente como código \"\n\"Rust.\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"O código será compilado e executado como parte do `cargo test`.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"Adicionar `#` no código o ocultará da documentação, mas ainda o compilará/\"\n\"executará.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Teste o código acima no [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"O compilador Rust produz mensagens de erro fantásticas, bem como alertas/\"\n\"lints úteis embutidos. [Clippy](https://doc.rust-lang.org/clippy/) fornece \"\n\"ainda mais lints, organizados em grupos que podem ser habilitados por \"\n\"projeto.\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X provavelmente cabe em um u16, certo? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"Execute o exemplo de código e examine a mensagem de erro. Existem também \"\n\"alertas/lints visíveis aqui, mas esses não serão mostrados uma vez que o \"\n\"código seja compilado. Mude para o site do _Playground_ para mostrar esses \"\n\"lints.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"Depois de resolver os lints, execute `clippy` no site do _playground_ para \"\n\"mostrar alertas/lints do clippy. Clippy tem uma extensa documentação de seus \"\n\"lints, e adiciona novos lints (incluindo lints de negação padrão) o tempo \"\n\"todo.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"Observe que erros ou alertas/lints com `help: ...` podem ser corrigidos com \"\n\"`cargo fix` ou via seu editor.\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algoritmo de Luhn\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"O [algoritmo de Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) é usado \"\n\"para validar números de cartão de crédito. O algoritmo recebe uma string \"\n\"como entrada e faz o seguinte para validar o número do cartão de crédito:\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"Ignore todos os espaços. Rejeite números com menos de dois dígitos.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"Movendo-se da **direita para a esquerda**, dobre cada segundo dígito: para o \"\n\"número `1234`, dobramos `3` e `1`. Para o número `98765`, dobramos `6` e `8`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Depois de dobrar um dígito, some os dígitos se o resultado for maior que 9. \"\n\"Então, dobrar `7` se torna `14` que se torna `1 + 4 = 5`.\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Some todos os dígitos, dobrados ou não.\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"O número do cartão de crédito é válido se a soma terminar em `0`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"O código fornecido provê uma implementação com bugs do algoritmo de Luhn, \"\n\"junto com dois testes unitários básicos que confirmam que a maior parte do \"\n\"algoritmo é implementada corretamente.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Copie o código abaixo para <https://play.rust-lang.org/> e escreva testes \"\n\"adicionais para descobrir bugs na implementação fornecida, corrigindo \"\n\"quaisquer bugs que você encontrar.\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// Esta é a versão com bugs que aparece no problema.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// Esta é a solução e passa em todos os testes abaixo.\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"O número do cartão de crédito {cc_number} é válido? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"sim\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"não\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0 \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (1 hour)\"\nmsgstr \"[Tratamento de Erros](./error-handling.md) (1 hora)\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[Rust Inseguro](./unsafe-rust.md) (1 hora e 5 minutos)\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve levar cerca de 2 horas e 15 \"\n\"minutos\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"[Pânicos](./error-handling/panics.md) (3 minutos)\"\n\n#: src/error-handling.md\nmsgid \"[Result](./error-handling/result.md) (5 minutes)\"\nmsgstr \"[Result](./error-handling/result.md) (5 minutos)\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"[Operador Try](./error-handling/try.md) (5 minutos)\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"[Conversões Try](./error-handling/try-conversions.md) (5 minutos)\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"[Trait Error](./error-handling/error.md) (5 minutos)\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\"[thiserror e anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutos)\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercício: Reescrevendo com Result](./error-handling/exercise.md) (30 \"\n\"minutos)\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust lida com erros fatais com um \\\"pânico\\\".\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"O Rust irá disparar um _panic_ (pânico) se um erro fatal ocorrer em tempo de \"\n\"execução:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"_Pânicos_ são para erros irrecuperáveis e inesperados.\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Pânicos são sintomas de bugs no programa.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\"Falhas em tempo de execução como verificações de limites falhadas podem \"\n\"disparar um pânico\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"Asserções (como `assert!`) disparam um pânico em caso de falha\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"Pânicos com moticos específicos podem usar a macro `panic!`.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"Um pânico irá \\\"desenrolar\\\" a pilha, descartando valores como se as funções \"\n\"tivessem retornado.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Use APIs que não disparam erros do tipo _pânico_ (como `Vec::get`) se não \"\n\"for aceitável o travamento do programa.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"Por padrão, um pânico causará a _resolução_ da pilha. A resolução pode ser \"\n\"capturada:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"Nenhum problema aqui!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"ah não!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"Capturar é incomum; não tente implementar exceções com `catch_unwind`!\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Isso pode ser útil em servidores que devem continuar rodando mesmo se uma \"\n\"requisição tenha falhado.\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Isso não funciona se `panic = 'abort'` estiver definido em seu `Cargo.toml`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\"Nosso mecanismo primário para tratamento de erros em Rust é o enum [`Result`]\"\n\"(https://doc.rust-lang.org/stable/std/result/enum.Result.html), que vimos \"\n\"brevemente ao discutir tipos da biblioteca padrão.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\"`Result` tem duas variantes: `Ok` que contém o valor de sucesso, e `Err` que \"\n\"contém um valor de erro de algum tipo.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\"Se uma função pode ou não produzir um erro é codificado na assinatura de \"\n\"tipo da função, fazendo-a retornar um valor `Result`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\"Assim como com `Option`, não há como esquecer de lidar com um erro: você não \"\n\"pode acessar nem o valor de sucesso nem o valor de erro sem primeiro \"\n\"corresponder a um padrão no `Result` para verificar qual variante você tem. \"\n\"Métodos como `unwrap` facilitam a escrita de código rápido e sujo que não \"\n\"faz um tratamento de erros robusto, mas significa que você sempre pode ver \"\n\"em seu código-fonte onde o tratamento de erros adequado está sendo ignorado.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\"Pode ser útil comparar o tratamento de erros em Rust com convenções de \"\n\"tratamento de erros com as quais os alunos podem estar familiarizados de \"\n\"outras linguagens de programação.\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"Muitas linguagens usam exceções, por exemplo, C++, Java, Python.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\"Na maioria das linguagens com exceções, se uma função pode ou não lançar uma \"\n\"exceção não é visível como parte de sua assinatura de tipo. Isso geralmente \"\n\"significa que você não pode dizer ao chamar uma função se ela pode lançar \"\n\"uma exceção ou não.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\"Exceções geralmente desmontam a pilha de chamadas, propagando-se para cima \"\n\"até que um bloco `try` seja alcançado. Um erro originado profundamente na \"\n\"pilha de chamadas pode impactar uma função não relacionada mais acima.\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"Números de Erro\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\"Algumas linguagens têm funções que retornam um número de erro (ou algum \"\n\"outro valor de erro) separadamente do valor de retorno bem-sucedido da \"\n\"função. Exemplos incluem C e Go.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\"Dependendo da linguagem, pode ser possível esquecer de verificar o valor de \"\n\"erro, caso em que você pode estar acessando um valor de sucesso não \"\n\"inicializado ou de outra forma inválido.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"Erros em tempo de execução como conexão recusada ou arquivo não encontrado \"\n\"são tratados com o tipo `Result`, mas combinar esse tipo em cada chamada \"\n\"pode ser complicado. O operador `?` é usado para retornar erros ao chamador. \"\n\"Ele permite que você transforme o comum\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"no muito mais simples\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Podemos usar isso para simplificar nosso código de tratamento de erros:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"username ou erro: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"Simplifique a função `read_username` para usar `?`.\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"A variável `username` pode ser `Ok(string)` ou `Err(error)`.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Use a chamada `fs::write` para testar os diferentes cenários: nenhum \"\n\"arquivo, arquivo vazio e arquivo com nome de usuário.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"Observe que `main` pode retornar um `Result<(), E>` desde que implemente \"\n\"`std::process:Termination`. Na prática, isso significa que `E` implementa \"\n\"`Debug`. O executável irá imprimir a variante `Err` e retornar um status de \"\n\"saída diferente de zero em caso de erro.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"A expansão efetiva do operador `?` é um pouco mais complicada do que \"\n\"indicado anteriormente:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"funciona da mesma forma que\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"A chamada `From::from` aqui significa que tentamos converter o tipo de erro \"\n\"para o tipo retornado pela função. Isso torna fácil encapsular erros em \"\n\"erros de nível superior.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"Erro E/S: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Nome de usuário não encontrado em {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"O operador `?` deve retornar um valor compatível com o tipo de retorno da \"\n\"função. Para `Result`, isso significa que os tipos de erro devem ser \"\n\"compatíveis. Uma função que retorna `Result<T, ErrorOuter>` só pode usar `?` \"\n\"em um valor do tipo `Result<U, ErrorInner>` se `ErrorOuter` e `ErrorInner` \"\n\"forem do mesmo tipo ou se `ErrorOuter` implementar `From<ErrorInner>`.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"Uma alternativa comum a uma implementação `From` é `Result::map_err`, \"\n\"especialmente quando a conversão ocorre apenas em um local.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"Não há requisito de compatibilidade para `Option`. Uma função que retorna \"\n\"`Option<T>` pode usar o operador `?` em `Option<U>` para tipos `T` e `U` \"\n\"arbitrários.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"Uma função que retorna `Result` não pode usar `?` em `Option` e vice-versa. \"\n\"No entanto, `Option::ok_or` converte `Option` em `Result`, enquanto `Result::\"\n\"ok` transforma `Result` em `Option`.\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Tipos de Erros Dinâmicos\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Às vezes, queremos permitir que qualquer tipo de erro seja retornado sem \"\n\"escrever nosso próprio enum cobrindo todas as possibilidades diferentes. O \"\n\"_trait_ `std::error::Error` torna fácil criar um objeto _trait_ que pode \"\n\"conter qualquer erro.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Contagem: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Erro: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"A função `read_count` pode retornar `std::io::Error` (de operações de \"\n\"arquivo) ou `std::num::ParseIntError` (de `String::parse`).\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Encaixotar (_boxing_) erros economiza código, mas sacrifica a capacidade de \"\n\"lidar elegantemente com diferentes casos de erro de forma individualizada no \"\n\"programa. Como tal, geralmente não é uma boa ideia usar `Box<dyn Error>` na \"\n\"API pública de uma biblioteca, mas pode ser uma boa opção em um programa \"\n\"onde você só quer exibir a mensagem de erro em algum lugar.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\"Certifique-se de implementar o _trait_ `std::error::Error` ao definir um \"\n\"tipo de erro personalizado para que ele possa ser encaixotado. Mas se você \"\n\"precisa suportar o atributo `no_std`, tenha em mente que o _trait_ `std.\"\n\"error::Error` é atualmente compatível com `no_std` apenas em [nightly]\"\n\"(https://github.com/rust-lang/rust/issues/103765).\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Os _crates_ [`thiserror`](https://docs.rs/thiserror/) e [`anyhow`](https://\"\n\"docs.rs/anyhow/) são amplamente utilizados para simplificar o tratamento de \"\n\"erros.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\"`thiserror` é frequentemente usado em bibliotecas para criar tipos de erro \"\n\"personalizados que implementam `From<T>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\"`anyhow` é frequentemente usado por aplicações para ajudar no tratamento de \"\n\"erros em funções, incluindo adicionar informações contextuais aos seus erros.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Nome de usuário não encontrado em {0}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Falha ao abrir {path}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Falha ao ler\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Nome do usuário: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Erro: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"A macro `Error` é fornecida por `thiserror` e possui vários atributos úteis \"\n\"para ajudar a definir tipos de erro de forma compacta.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"O _trait_ `std::error::Error` é derivado automaticamente.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"A mensagem de `#[error]` é usada para derivar o _trait_ `Display`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` é essencialmente um wrapper em torno de `Box<dyn Error>`. \"\n\"Como tal, geralmente não é uma boa escolha para a API pública de uma \"\n\"biblioteca, mas é amplamente utilizado em aplicações.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`anyhow::Result<V>` é um _alias_ de tipo para `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"O tipo de erro real dentro dele pode ser extraído para exame, se necessário.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"A funcionalidade fornecida por `anyhow::Result<T>` pode ser familiar para \"\n\"desenvolvedores Go, pois fornece padrões de uso e ergonomia semelhantes a \"\n\"`(T, error)` de Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` é um _trait_ implementado para os tipos padrão `Result` e \"\n\"`Option`. `use anyhow::Context` é necessário para habilitar `.context()` e `.\"\n\"with_context()` nesses tipos.\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"Exercício: Reescrevendo com Result\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"O seguinte implementa um analisador muito simples para uma linguagem de \"\n\"expressão. No entanto, ele lida com erros disparando um pânico. Reescreva-o \"\n\"para usar o tratamento de erros idiomático e propagar erros para um retorno \"\n\"de `main`. Sinta-se à vontade para usar `thiserror` e `anyhow`.\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"DICA: comece corrigindo o tratamento de erros na função `parse`. Depois que \"\n\"isso estiver funcionando corretamente, atualize `Tokenizer` para implementar \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` e trate isso no analisador \"\n\"(_parser_).\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// Um operador aritmético.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// Um token na linguagem de expressão.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// Uma expressão na linguagem de expressão.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// Uma referência a uma variável.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// Um número literal.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// Uma operação binária.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Caractere inesperado {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Fim de entrada inesperado\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"Inteiro de 32 bits inválido'\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Token inesperado {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// Olhe adiante para analisar uma operação binária, se presente.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Caractere '{0}' inesperado na entrada\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Erro de tokenizador: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Token inesperado {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Número inválido\\\"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"[Inseguro](./unsafe-rust/unsafe.md) (5 minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\"[Desreferenciando Ponteiros Brutos](./unsafe-rust/dereferencing.md) (10 \"\n\"minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\"[Variáveis Estáticas Mutáveis](./unsafe-rust/mutable-static.md) (5 minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"[Unions](./unsafe-rust/unions.md) (5 minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"[Funções Inseguras](./unsafe-rust/unsafe-functions.md) (5 minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"[Traits Inseguros](./unsafe-rust/unsafe-traits.md) (5 minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercício: Invólucro (_Wrapper_) FFI](./unsafe-rust/exercise.md) (30 \"\n\"minutos)\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"Este segmento deve levar cerca de 1 hora e 5 minutos\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"A linguagem Rust tem duas partes:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\"**Rust Seguro (_Safe_):** memória segura, nenhum comportamento indefinido é \"\n\"possível.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Rust Inseguro (_Unsafe_):** pode desencadear comportamento indefinido se \"\n\"pré-condições forem violadas.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"Veremos principalmente Rust seguro neste curso, mas é importante saber o que \"\n\"é Rust inseguro.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Código inseguro é geralmente pequeno e isolado, e seu funcionamento correto \"\n\"deve ser cuidadosamente documentado. Geralmente é envolto em uma camada de \"\n\"abstração segura.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"O código inseguro do Rust oferece acesso a cinco novos recursos:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Desreferenciar ponteiros brutos (_raw pointers_).\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Acessar ou modificar variáveis estáticas mutáveis.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"Acessar os campos de uma `union`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\"Chamar funções `unsafe` (inseguras), incluindo funções `extern` (externas).\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementar _traits_ `unsafe`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"A seguir, abordaremos brevemente os recursos inseguros. Para detalhes \"\n\"completos, consulte o [Capítulo 19.1 no Rust Book](https://doc.rust-lang.org/\"\n\"book/ch19-01-unsafe-rust.html) e o [Rustonomicon](https://doc.rust-lang.org/\"\n\"nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Rust inseguro não significa que o código esteja incorreto. Significa que os \"\n\"desenvolvedores desligaram os recursos de segurança do compilador e precisam \"\n\"escrever o código corretamente por eles mesmos. Significa também que o \"\n\"compilador não impõe mais as regras de segurança de memória do Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"Criar ponteiros é seguro, mas desreferenciá-los requer `unsafe`:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"cuidado!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: r1 e r2 foram obtidos através de referências e logo é\\n\"\n\"    // garantido que eles não sejam nulos e sejam propriamente alinhados, os \"\n\"objetos\\n\"\n\"    // cujas referências foram obtidas são válidos por\\n\"\n\"    // todo o bloco inseguro, e eles não sejam acessados tanto através das\\n\"\n\"    // referências ou concorrentemente através de outros ponteiros.\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 é: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"oh-oh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 é: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// INSEGURO. NÃO FAÇA ISSO.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 é: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"É uma boa prática (e exigida pelo guia de estilo do Android Rust) escrever \"\n\"um comentário para cada bloco `unsafe` explicando como o código dentro dele \"\n\"satisfaz os requisitos de segurança para a operação insegura que está \"\n\"fazendo.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"No caso de desreferência de ponteiros, isso significa que os ponteiros devem \"\n\"ser [_válidos_](https://doc.rust-lang.org/std/ptr/index.html#safety), ou \"\n\"seja:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"O ponteiro deve ser não nulo.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"O ponteiro deve ser _desreferenciável_ (dentro dos limites de um único \"\n\"objeto alocado).\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"O objeto não deve ter sido desalocado.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Não deve haver acessos simultâneos à mesma localização.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Se o ponteiro foi obtido lançando uma referência, o objeto subjacente deve \"\n\"estar válido e nenhuma referência pode ser usada para acessar a memória.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"Na maioria dos casos, o ponteiro também deve estar alinhado corretamente.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"A seção \\\"NÃO É SEGURO\\\" dá um exemplo de um tipo comum de bug UB: `*r1` tem \"\n\"o tempo de vida `'static`, então `r3` tem o tipo `&'static String`, e \"\n\"portanto sobrevive a `s`. Criar uma referência a partir de um ponteiro \"\n\"requer _muito cuidado_.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"É seguro ler uma variável estática imutável:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"Olá, mundo!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"No entanto, como podem ocorrer corridas de dados (_data races_), não é \"\n\"seguro ler e gravar dados em variáveis estáticas mutáveis:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Não há outras _threads_ que poderiam estar acessando \"\n\"`COUNTER`.\\n\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"O programa aqui é seguro porque é _single-threaded_. No entanto, o \"\n\"compilador Rust é conservador e assumirá o pior. Tente remover o `unsafe` e \"\n\"veja como o compilador explica que é um comportamento indefinido alterar uma \"\n\"variável estática de várias _threads_.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Usar uma variável estática mutável geralmente é uma má ideia, mas há alguns \"\n\"casos em que isso pode fazer sentido, tais como em código `no_std` de baixo \"\n\"nível, como implementar um alocador de heap ou trabalhar com algumas APIs C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"_Unions_ são como _enums_, mas você mesmo precisa rastrear o campo ativo:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// Comportamento indefinido!\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"_Unions_ raramente são necessárias no Rust, pois geralmente você pode usar \"\n\"um _enum_. Elas são ocasionalmente necessárias para interagir com as APIs da \"\n\"biblioteca C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Se você deseja apenas reinterpretar os bytes como um tipo diferente, você \"\n\"provavelmente deveria usar [`std::mem::transmute`](https://doc.rust-lang.org/\"\n\"stable/std/mem/fn.transmute.html) ou um wrapper seguro como o _crate_ \"\n\"[`zerocopy`](https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Chamando Funções Inseguras\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Uma função ou método pode ser marcado como `unsafe` se houver pré-condições \"\n\"extras que você deve respeitar para evitar comportamento indefinido:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Os índices estão na ordem correta, dentro dos limites da\\n\"\n\"    // slice da string, e contido dentro da sequência UTF-8.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"contador de caracteres: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `abs` não lida com ponteiros e não tem nenhum requisito de\\n\"\n\"    // segurança.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Valor absoluto de -3 de acordo com C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Não manter o requerimento de codificação UTF-8 viola segurança de \"\n\"memória!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"contador caracter: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Escrevendo Funções Inseguras\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Você pode marcar suas próprias funções como _inseguras_ (`unsafe`) se elas \"\n\"exigirem condições específicas para evitar comportamentos indefinidos.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Troca os valores apontadoes pelos ponteiros fornecidos.\\n\"\n\"///\\n\"\n\"/// # Segurança\\n\"\n\"///\\n\"\n\"/// Os ponteiros precisam ser válidos e corretamente alinhados.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// SEGURANÇA: ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"`get_unchecked`, como a maioria das funções `_unchecked`, é insegura, porque \"\n\"pode criar UB se o intervalo estiver incorreto. `abs` está incorreto por um \"\n\"motivo diferente: é uma função externa (FFI). Chamar funções externas é \"\n\"geralmente um problema apenas quando essas funções fazem coisas com \"\n\"ponteiros que podem violar o modelo de memória do Rust, mas, em geral, \"\n\"qualquer função C pode ter comportamento indefinido sob quaisquer \"\n\"circunstâncias arbitrárias.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"O `\\\"C\\\"` neste exemplo é o ABI; [outros ABIs também estão disponíveis]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"Na verdade, não usaríamos ponteiros para uma função `swap` - isto pode ser \"\n\"feito com referências com segurança.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Observe que o código inseguro é permitido dentro de uma função insegura sem \"\n\"um bloco `unsafe`. Podemos proibir isso com \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Tente adicioná-lo e veja o que acontece. \"\n\"Isso provavelmente mudará em uma edição futura do Rust.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Implementando Traits Inseguros\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Assim como nas funções, você pode marcar um `trait` como `unsafe` se a \"\n\"implementação precisa garantir condições particulares para evitar \"\n\"comportamento indefinido.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"Por exemplo, o _crate_ `zerocopy` tem um _trait_ inseguro que parece [algo \"\n\"assim](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Segurança\\n\"\n\"/// O tipo precisa ter uma representação definida e nenhum preenchimento.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `u32` possui uma representação definida e sem preenchimento.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Deve haver uma seção `# Safety` no Rustdoc para o `trait` explicando os \"\n\"requisitos para ser implementado com segurança.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"Na verdade, a seção de segurança para `AsBytes` é bem mais longa e \"\n\"complicada.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Os _traits_ integrados `Send` e `Sync` são inseguros.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Wrapper FFI seguro\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust tem ótimo suporte para chamar funções por meio de uma interface para \"\n\"funções externas (_Function Foreign Interface_ - FFI). Usaremos isso para \"\n\"construir um _wrapper_ (invólucro) seguro para as funções da `libc` de C que \"\n\"você usaria para ler os nomes dos arquivos de um diretório.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Você vai querer consultar as páginas do manual:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"Você também vai querer navegar pelo módulo [`std::ffi`](https://doc.rust-\"\n\"lang.org/std/ffi/). Lá você encontrará um número de tipos de string que você \"\n\"precisará para o exercício:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"Codificação\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"Uso\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) e [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"Processamento de texto em Rust\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) e [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"terminado em NUL\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"Comunicação com funções em C\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) e [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"específico ao SO\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"Comunicação com o SO\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"Você irá converter entre todos estes tipos:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`&str` para `CString`: você precisa alocar espaço para o caracter terminador \"\n\"`\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\"`CString` para `*const i8`: você precisa de um ponteiro para chamar funções \"\n\"em C,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`*const i8` para `&CStr`: você você precisa de algo que pode encontrar o \"\n\"caracter terminador `\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"`&CStr` para `&[u8]`: um _slice_ de bytes é a interface universal para \"\n\"\\\"algum dado desconhecido\\\",\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"`&[u8]` para `&OsStr`: `&OsStr` é um passo em direção a `OsString`, use \"\n\"[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) \"\n\"para criá-lo,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr` para `OsString`: você precisa clonar os dados em `&OsStr` para \"\n\"poder retorná-lo e chamar `readdir` novamente.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"O [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) também tem um \"\n\"capítulo bastante útil sobre FFI.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Copie o código abaixo para <https://play.rust-lang.org/> e implemente as \"\n\"funções e métodos que faltam:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Tipo opaco. Veja https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Layout de acordo com a página man do Linux para readdir(3), onde ino_t e\\n\"\n\"    // off_t são resolvidos de acordo com as definições em\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Layout de acordo com a página man do macOS man page para dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// Veja https://github.com/rust-lang/libc/issues/414 e a seção sobre\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE na página man do macOS para \"\n\"stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Plataformas que existiram antes destas atualizações estarem \"\n\"disponíveis\\\" refere-se\\n\"\n\"        // ao macOS (ao contrário do iOS / wearOS / etc.) em Intel e \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Chama opendir e retorna um valor Ok se funcionar,\\n\"\n\"        // ou retorna Err com uma mensagem.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\"// Continua chamando readdir até nós obtermos um ponteiro NULL de volta.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Chama closedir se necessário.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"files: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Caminho inválido: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SEGURANÇA: path.as_ptr() não pode ser NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"Não foi possível abrir {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Continua chamando readdir até nós obtermos um ponteiro NULL de volta.\\n\"\n\"        // SEGURANÇA: self.dir nunca é NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// Chegamos ao final do diretório.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"// SEGURANÇA: dirent não é NULL e dirent.d_name é terminado em NUL\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SEGURANÇA: self.dir não é NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Não foi possível fechar {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Caracter não UTF-8 no caminho\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Caranguejo (Crab)\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Bem-vindos ao Rust para Android\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"O Rust é suportado para software de sistema no Android. Isso significa que \"\n\"você pode escrever novos serviços, bibliotecas, drivers ou até mesmo \"\n\"firmware em Rust (ou melhorar o código existente conforme necessário).\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Hoje tentaremos chamar Rust a partir de um de seus próprios projetos. Então \"\n\"tente encontrar um cantinho da sua base de código onde podemos mover algumas \"\n\"linhas de código para o Rust. Quanto menos dependências e tipos \"\n\"\\\"exóticos\\\", melhor. Algo que analise alguns bytes brutos seria o ideal.\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"O instrutor pode mencionar qualquer um dos seguintes, dada a crescente \"\n\"utilização do Rust no Android:\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"Exemplo de serviço: [DNS sobre HTTP](https://security.googleblog.com/2022/07/\"\n\"dns-over-http3-in-android.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"Bibliotecas: [Interface Gráfica Virtual Rutabaga](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"Drivers de kernel: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"Firmware: [firmware pKVM](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Usaremos um Dispositivo Virtual Android Cuttlefish para testar nosso código. \"\n\"Certifique-se de ter acesso a um ou crie um novo com:\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Consulte o [Codelab para Desenvolvedor Android](https://source.android.com/\"\n\"docs/setup/start) para maiores detalhes.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish é um dispositivo Android de referência projetado para funcionar \"\n\"em desktops Linux genéricos. O suporte ao MacOS também está planejado.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"A imagem do sistema Cuttlefish mantém alta fidelidade aos dispositivos \"\n\"reais, e é o emulador ideal para executar muitos casos de uso do Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"O sistema de compilação do Android (Soong) oferece suporte ao Rust por meio \"\n\"de vários módulos:\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"Tipo de Módulo\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"Descrição\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Produz um binário Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"Produz uma biblioteca Rust e fornece as variantes `rlib` e `dylib`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Produz uma biblioteca Rust C utilizável por módulos `cc` e fornece variantes \"\n\"estáticas e compartilhadas.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Produz uma biblioteca Rust `proc-macro`. Estes são análogos aos plugins do \"\n\"compilador.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Produz um binário de teste Rust que usa a funcionalidade padrão de teste do \"\n\"Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Produz um binário Rust fuzz aproveitando `libfuzzer`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Gera o código-fonte e produz uma biblioteca Rust que fornece uma interface \"\n\"para um _protobuf_ específico.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Gera fonte e produz uma biblioteca Rust contendo vínculos em Rust para \"\n\"bibliotecas C.\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Veremos `rust_binary` e `rust_library` a seguir.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"Itens adicionais que o instrutor pode mencionar:\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo não é otimizado para repositórios multi-idiomas e também baixa pacotes \"\n\"da internet.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"Para conformidade e desempenho, o Android deve ter _crates_ no repositório. \"\n\"Também deve interoperar com código C/C++/Java. Soong preenche essa lacuna.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong tem muitas semelhanças com o Bazel, que é a variante de código aberto \"\n\"do Blaze (usado no google3).\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\"Há um plano para transicionar o [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/) e [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) para o Bazel.\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\"Aprender regras de compilação semelhantes ao Bazel é útil para todos os \"\n\"desenvolvedores Rust de SO.\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"Curiosidade: Data de Star Trek é um Android do tipo Soong.\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Binários do Rust\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Vamos começar com um aplicativo simples. Na raiz de um checkout AOSP, crie \"\n\"os seguintes arquivos:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Rust demo.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Imprime uma saudação na saída padrão.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Olá do Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Agora você pode compilar, enviar e executar o binário:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Bibliotecas de Rust\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Você usa `rust_library` para criar uma nova biblioteca Rust para Android.\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Aqui declaramos uma dependência em duas bibliotecas:\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, que definimos abaixo,\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, que é um `crate` já oferecido em [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Precisamos disso para evitar erro de ligação dinâmica.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Greeting library.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Saudação `nome`.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Olá {nome}, prazer em conhecê-lo!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Você constrói, envia e executa o binário como antes:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"A [Linguagem de Definição de Interface Android (AIDL)](https://developer.\"\n\"android.com/guide/components/aidl) é compatível com Rust:\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"O código Rust pode chamar servidores AIDL existentes,\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Você pode criar novos servidores AIDL em Rust.\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\"Para ilustrar como usar Rust com Binder, vamos passar pelo processo de \"\n\"criação de uma interface Binder. Em seguida, vamos implementar o serviço \"\n\"descrito e escrever código do cliente que fala com esse serviço.\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfaces AIDL\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Você declara a API do seu serviço usando uma interface AIDL:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Interface de serviço de aniversário. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Gera uma mensagem de feliz aniversário. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust não está ativado por padrão\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\"Observe que a estrutura de diretórios sob o diretório `aidl/` precisa \"\n\"corresponder ao nome do pacote usado no arquivo AIDL, ou seja, o pacote é \"\n\"`com.example.birthdayservice` e o arquivo está em `aidl/com/example/\"\n\"IBirthdayService.aidl`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"API de Serviço Gerada\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\"Binder gera um _trait_ correspondente à definição da interface. _trait_ para \"\n\"falar com o serviço.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"_Trait gerado_:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\"Seu serviço precisará implementar este _trait_, e seu cliente usará este \"\n\"_trait_ para falar com o serviço.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\"Os vínculos gerados podem ser encontrados em `out/soong/.intermediates/\"\n\"<caminho para o módulo>/`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\"Aponte como a assinatura da função gerada, especificamente os tipos de \"\n\"argumento e retorno, correspondem à definição da interface.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\"`String` para um argumento resulta em um tipo Rust diferente de `String` \"\n\"como um tipo de retorno.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"Implementação do Serviço\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Agora podemos implementar o serviço AIDL:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// A implementação de `IBirthdayService`.\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Feliz aniversário {name}, parabéns pelos seus {years} anos!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\"Aponte o caminho para o _trait_ `IBirthdayService` gerado e explique por que \"\n\"cada um dos segmentos é necessário.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\"TODO: O que o _trait_ `binder::Interface` faz? Existem métodos para \"\n\"substituir? Onde está o código-fonte?\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"Servidor AIDL\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Finalmente, podemos criar um servidor que expõe o serviço:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Ponto de entrada para serviço de aniversário.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Falha ao registrar o serviço\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// Para evitar erro de ligação dinâmica.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\"O processo de pegar uma implementação de serviço definida pelo(a) usuário(a) \"\n\"(neste caso o tipo `BirthdayService`, que implementa o `IBirthdayService`) e \"\n\"iniciá-la como um serviço Binder tem várias etapas, e pode parecer mais \"\n\"complicado do que os estudantes estão acostumados se eles usaram Binder a \"\n\"partir de C++ ou de outra linguagem. Explique aos estudantes por que cada \"\n\"etapa é necessária.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"Crie uma instância do seu tipo de serviço (`BirthdayService`).\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\"Envolva o objeto de serviço no tipo `Bn*` correspondente \"\n\"(`BnBirthdayService` neste caso). Este tipo é gerado pelo Binder e fornece a \"\n\"funcionalidade comum do Binder que seria fornecida pela classe base \"\n\"`BnBinder` em C++. Não temos herança em Rust, então em vez disso usamos \"\n\"composição, colocando nosso `BirthdayService` dentro do `BnBinderService` \"\n\"gerado.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\"Chame `add_service`, passando a ele um identificador de serviço e seu objeto \"\n\"de serviço (o objeto `BnBirthdayService` no exemplo).\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\"Chame `join_thread_pool` para adicionar a thread atual ao pool de threads do \"\n\"Binder e começar a ouvir conexões.\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Agora podemos compilar, enviar e iniciar o serviço:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/\"\n\"tmp\\\"\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Em outro terminal, verifique se o serviço está sendo executado:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Você também pode chamar o serviço com `service call`:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"Cliente AIDL\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"Por fim, podemos criar um cliente Rust para nosso novo serviço.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_server/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Chama o serviço de aniversário.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Falha ao conectar-se a BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"// Chama o serviço.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Observe que o cliente não depende de `libbirthdayservice`.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Compile, envie e execute o cliente em seu dispositivo:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/birthday_client Carlos 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\"`Strong<dyn IBirthdayService>` é o objeto de _trait_ que representa o \"\n\"serviço ao qual o cliente se conectou.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\"`Strong` é um tipo de ponteiro inteligente personalizado para Binder. Ele \"\n\"manipula tanto uma contagem de referência no processo para o objeto de \"\n\"_trait_ do serviço, quanto a contagem de referência global do Binder que \"\n\"rastreia quantos processos têm uma referência ao objeto.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\"Observe que o objeto de _trait_ que o cliente usa para falar com o serviço \"\n\"usa exatamente o mesmo _trait_ que o servidor implementa. Para uma interface \"\n\"Binder dada, há um único _trait_ Rust gerado que tanto o cliente quanto o \"\n\"servidor usam.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\"Use o mesmo identificador de serviço usado ao registrar o serviço. Isso deve \"\n\"ser idealmente definido em uma _crate_ comum na qual tanto o cliente quanto \"\n\"o servidor possam depender.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Vamos estender a API com mais funcionalidades: queremos permitir que os \"\n\"clientes especifiquem uma lista de frases para o cartão de aniversário:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\"Isso resulta em uma definição de _trait_ atualizada para `IBirthdayService`.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\"Observe como o `String[]` na definição AIDL é traduzido como um `&[String]` \"\n\"em Rust, ou seja, que tipos de Rust idiomáticos são usados nos vínculos \"\n\"gerados sempre que possível:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"`in` argumentos de array são traduzidos para _slices_.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"`out` e `inout` args são traduzidos para `&mut Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"Valores de retorno são traduzidos para retornar um `Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"Atualizando Cliente e Serviço\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"Atualize o código do cliente e do servidor para considerar a nova API.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\\\"Felis aniversárrio para vocêêêêêê\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\\\"E também: muito mais\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\"TODO: Mover trechos de código para arquivos de projeto onde eles realmente \"\n\"serão construídos?\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"Trabalhando com Tipos AIDL\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"Os tipos AIDL são traduzidos para o tipo Rust idiomático apropriado:\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\"Os tipos primitivos mapeiam (em sua maioria) para tipos Rust idiomáticos.\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\"Tipos de coleção como _slices_, `Vec`s e tipos de string são suportados.\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\"Referências a objetos AIDL e identificadores de arquivo podem ser enviados \"\n\"entre clientes e serviços.\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"Identificadores de arquivo e _parcelables_ são totalmente suportados.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"Os tipos primitivos mapeiam (em sua maioria) de forma idiomática:\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"Tipo em AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Tipo em Rust\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"Observe que\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"`boolean`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"`i8`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"Observe que bytes são assinados.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"Observe o uso de `u16`, NÃO `u32`.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"`i32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"`long`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"`i64`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"`double`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\"Os tipos de array (`T[]`, `byte[]` e `List<T>`) são traduzidos para o tipo \"\n\"de array Rust apropriado, dependendo de como são usados na assinatura da \"\n\"função:\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"Posição\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"Argumento `in`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"Argumento `out`/`inout`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"Retorno\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\"No Android 13 ou superior, arrays de tamanho fixo são suportados, ou seja, \"\n\"`T[N]` se torna `[T; N]`. Arrays de tamanho fixo podem ter várias dimensões \"\n\"(por exemplo, int\\\\[3\\\\]\\\\[4\\\\]). No backend Java, arrays de tamanho fixo \"\n\"são representados como tipos de array.\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"Arrays em campos _parcelable_ sempre são traduzidos para `Vec<T>`.\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\"Objetos AIDL podem ser enviados como um tipo AIDL concreto ou como a \"\n\"interface `IBinder` com tipo apagado:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"/** A mesma coisa, mas usando um objeto de ligação. */\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"/** A mesma coisa, mas usando `IBinder`. */\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"**birthday_service/src/client.rs**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"/// _Struct_ Rust implementando a interface `IBirthdayInfoProvider`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\"// Cria um objeto de ligação para a interface `IBirthdayInfoProvider`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"// Envia o objeto de ligação para o serviço.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\"// Realiza a mesma operação, mas passando o provedor como um `SpIBinder`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\"Observe o uso de `BnBirthdayInfoProvider`. Isso serve para o mesmo propósito \"\n\"que `BnBirthdayService` que vimos anteriormente.\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"Binder para Rust suporta o envio de _parcelables_ diretamente:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"/** A mesma coisa, mas com um _parcelable_. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\"Arquivos podem ser enviados entre clientes/servidores Binder usando o tipo \"\n\"`ParcelFileDescriptor`:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"/** A mesma coisa, mas carrega informações de um arquivo. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"// Abre um arquivo e coloca as informações de aniversário nele.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\\\"/data/local/tmp/birthday.info\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"{name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\\\"{years}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"// Cria um `ParcelFileDescriptor` a partir do arquivo e o envia.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"**birthday_service/src/lib.rs**:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\"// Converte o descritor de arquivo para um `File`. `ParcelFileDescriptor` \"\n\"envolve\\n\"\n\"        // um `OwnedFd`, que pode ser clonado e então usado para criar um \"\n\"objeto `File`.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Identificador de arquivo inválido\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\"`ParcelFileDescriptor` envolve um `OwnedFd`, e assim pode ser criado a \"\n\"partir de um `File` (ou qualquer outro tipo que envolva um `OwnedFd`), e \"\n\"pode ser usado para criar um novo identificador de `File` no outro lado.\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\"Outros tipos de descritores de arquivo podem ser envolvidos e enviados, por \"\n\"exemplo, soquetes TCP, UDP e UNIX.\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"Testes no Android\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\"Continuando em [Testes](../testing.md), agora veremos como os testes \"\n\"unitários funcionam no AOSP. Use o módulo `rust_test` para seus testes \"\n\"unitários:\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libleftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\\\"leftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libleftpad_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\\\"leftpad_test\\\"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_testing/src/lib.rs_:\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Biblioteca de preenchimento à esquerda.\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Preenche à esquerda `s` até `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"  foo\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foobar\\\"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"Agora você pode executar o teste com\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"A saída se parece com isso:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\"Observe como você menciona apenas a raiz da _crate_ da biblioteca. Os testes \"\n\"são encontrados recursivamente em módulos aninhados.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"O _crate_ [GoogleTest](https://docs.rs/googletest/) permite assertividade de \"\n\"testes flexível usando _matchers_ (correspondentes):\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"Se mudarmos o último elemento para `\\\"!\\\"`, o teste falha com uma mensagem \"\n\"de erro estruturada apontando o erro:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest não faz parte do _playground_ do Rust, então você precisa \"\n\"executar este exemplo em um ambiente local. Use `cargo add googletest` para \"\n\"adicioná-lo rapidamente a um projeto Cargo existente.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"A linha `use googletest::prelude::*;` importa uma série de [macros e tipos \"\n\"comumente usados](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), a self-guided Rust course: it provides a guided introduction to \"\n\"the library, with exercises to help you get comfortable with `googletest` \"\n\"macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\"Isso é apenas a ponta do iceberg, existem muitos _matchers_ embutidos. \"\n\"Considere passar pelo primeiro capítulo de [\\\"Testes avançados para \"\n\"aplicações Rust\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), um curso de Rust autoguiado: ele fornece uma introdução guiada à \"\n\"biblioteca, com exercícios para ajudá-lo a se sentir confortável com os \"\n\"macros do `googletest`, seus _matchers_ e sua filosofia geral.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"Uma característica particularmente interessante é que as diferenças em \"\n\"strings de várias linhas são mostradas como uma diferença:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"mostra uma diferença usando cores (não mostradas aqui):\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"O _crate_ é uma tradução para Rust do [GoogleTest para C++](https://google.\"\n\"github.io/googletest/).\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"Para _mocking_, [Mockall](https://docs.rs/mockall/) é uma biblioteca muito \"\n\"usada. Você precisa refatorar seu código para usar _traits_, que você pode \"\n\"então rapidamente _\\\"mockar\\\"_:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"Mockall é a biblioteca de _mocking_ recomendada para Android (AOSP). Existem \"\n\"outras [bibliotecas de _mocking_ disponíveis em crates.io](https://crates.io/\"\n\"keywords/mock), em particular na área de _mocking_ de serviços HTTP. As \"\n\"outras bibliotecas de _mocking_ funcionam de maneira semelhante ao Mockall, \"\n\"o que significa que elas facilitam a obtenção de uma implementação de _mock_ \"\n\"de um determinado _trait_.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"Observe que o _mocking_ é um tanto _controverso_: _mocks_ permitem que você \"\n\"isole completamente um teste de suas dependências. O resultado imediato é \"\n\"uma execução de teste mais rápida e estável. Por outro lado, os _mocks_ \"\n\"podem ser configurados incorretamente e retornar uma saída diferente daquela \"\n\"que as dependências reais fariam.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"Se possível, é recomendável que você use as dependências reais. Como \"\n\"exemplo, muitos bancos de dados permitem que você configure um _backend_ em \"\n\"memória. Isso significa que você obtém o comportamento correto em seus \"\n\"testes, além de serem rápidos e limparem automaticamente após si mesmos.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"Da mesma forma, muitos _frameworks_ da web permitem que você inicie um \"\n\"servidor em processo que se vincula a uma porta aleatória em `localhost`. \"\n\"Sempre prefira isso a _mockar_ o _framework_ pois isso ajuda você a testar \"\n\"seu código no ambiente real.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall não faz parte do _playground_ do Rust, então você precisa executar \"\n\"este exemplo em um ambiente local. Use `cargo add mockall` para adicionar \"\n\"rapidamente o Mockall a um projeto Cargo existente.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall tem muito mais funcionalidades. Em particular, você pode configurar \"\n\"expectativas que dependem dos argumentos passados. Aqui usamos isso para \"\n\"\\\"_mockar_\\\" um gato que fica com fome 3 horas após a última vez que foi \"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"Você pode usar `.times(n)` para limitar o número de vezes que um método \"\n\"_mock_ pode ser chamado para `n` --- o _mock_ automaticamente irá gerar um \"\n\"pânico quando descartado se isso não for satisfeito.\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Você deve usar o `crate` `log` para logar automaticamente no `logcat` (no \"\n\"dispositivo) ou `stdout` (no _host_):\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Rust logging demo.\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Registra uma saudação.\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Iniciando programa.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"As coisas estão indo bem.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Algo deu errado!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Compile, envie e execute o binário em seu dispositivo:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Os logs aparecem em `adb logcat`:\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"O Rust tem excelente suporte para interoperabilidade com outras linguagens. \"\n\"Isso significa que você pode:\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Chamar funções Rust em outras linguagens.\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Chamar funções escritas em outras linguagens no Rust.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Quando você chama funções em outra linguagem, dizemos que você está usando \"\n\"uma _interface de função externa_, também conhecida como FFI.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperabilidade com C\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"_Rust_ tem suporte completo para vincular arquivos de objeto com uma \"\n\"convenção de chamada C. Da mesma forma, você pode exportar funções Rust e \"\n\"chamá-las em C.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Você pode fazer isso manualmente se quiser:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"// SEGURANÇA: `abs` não tem nenhum requisito de segurança.\\n\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Já vimos isso no exercício [Safe FFI Wrapper ](../../exercises/day-3/safe-\"\n\"ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Isso pressupõe conhecimento total da plataforma de destino. Não recomendado \"\n\"para produção.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"Veremos opções melhores a seguir.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"Usando Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"A ferramenta [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) pode gerar vínculos (_bindings_) automaticamente a partir de um \"\n\"arquivo de cabeçalho C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"Primeiro crie uma pequena biblioteca C:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"|Feliz Aniversário %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"|Parabéns pelos %i anos!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Adicione isto ao seu arquivo `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Crie um arquivo de cabeçalho _wrapper_ para a biblioteca (não estritamente \"\n\"necessário neste exemplo):\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Agora você pode gerar automaticamente as vinculações (_bindings_):\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\"Finalmente, podemos usar as vinculações (_bindings_) em nosso programa Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: O ponteiro que passamos é válido porque veio de uma referência \"\n\"Rust,\\n\"\n\"    // e o `name` que ele contém se refere a `name` acima, que também \"\n\"permanece\\n\"\n\"    // válido. `print_card` não armazena nenhum dos ponteiros para usar \"\n\"depois\\n\"\n\"    // que ele retorna.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Por fim, podemos executar testes gerados automaticamente para garantir que \"\n\"as vinculações funcionem:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Arquivo gerado, pule o linting\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"Chamando Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Exportar funções e tipos do Rust para C é fácil:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI demo.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analisar os números.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) é o menor!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) é provavelmente maior que x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Agora podemos chamá-lo a partir de um binário C:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analisar/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` desativa a alteração de name usual do Rust, então o símbolo \"\n\"exportado será apenas o nome da função. Você também pode usar `#[export_name \"\n\"= \\\"algum_nome\\\"]` para especificar qualquer nome que desejar.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"O [crate CXX](https://cxx.rs/) possibilita a interoperabilidade segura entre \"\n\"Rust e C++.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"A abordagem geral é assim:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"O CXX depende de uma descrição das assinaturas de função que serão expostas \"\n\"de cada linguagem para a outra. Você fornece essa descrição usando blocos \"\n\"externos em um módulo Rust anotado com a macro de atributo `#[cxx::bridge]`.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\"// Estruturas compartilhadas com campos visíveis para ambas as linguagens.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Tipos e assinaturas Rust expostos ao C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// Tipos e assinaturas C++ expostos ao Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\"O _bridge_ geralmente é declarado em um módulo `ffi` dentro do seu _crate_.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"A partir das declarações feitas no módulo _bridge_, o CXX gerará definições \"\n\"de tipo/função correspondentes em Rust e C++ para expor esses itens para \"\n\"ambas as linguagens.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"Para visualizar o código Rust gerado, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) para visualizar a macro de procedimento expandida. \"\n\"Para a maioria dos exemplos, você usaria `cargo expand ::ffi` para expandir \"\n\"apenas o módulo `ffi` (embora isso não se aplique a projetos Android).\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"Para visualizar o código C++ gerado, procure em `target/cxxbridge`.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Declarações de _Bridge_ Rust\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Tipo opaco\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Método em `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"// Função livre\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"Os itens declarados em `extern \\\"Rust\\\"` referenciam itens que estão no \"\n\"escopo no módulo pai.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"O gerador de código CXX usa sua(s) seção(ões) `extern \\\"Rust\\\"` para \"\n\"produzir um arquivo de cabeçalho C++ contendo as declarações C++ \"\n\"correspondentes. O cabeçalho gerado tem o mesmo caminho do arquivo de origem \"\n\"Rust contendo a ponte, exceto com uma extensão de arquivo .rs.h.\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"Resulta (aproximadamente) no seguinte C++:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"Declarações de _Bridge_ C++\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"Resulta (aproximadamente) no seguinte Rust:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"O programador não precisa prometer que as assinaturas que ele digitou estão \"\n\"corretas. O CXX realiza verificações estáticas de que as assinaturas \"\n\"correspondem exatamente ao que é declarado em C++.\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"Os blocos `unsafe extern` permitem que você declare funções C++ que podem \"\n\"ser chamadas com segurança do Rust.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"Apenas enums C-like (unit) são suportados.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"Um número limitado de _traits_ são suportados para `#[derive()]` em tipos \"\n\"compartilhados. A funcionalidade correspondente também é gerada para o \"\n\"código C++, por exemplo, se você derivar `Hash` também gera uma \"\n\"implementação de `std::hash` para o tipo C++ correspondente.\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Rust gerado:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"C++ gerado:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"No lado Rust, o código gerado para enums compartilhados é realmente uma \"\n\"estrutura que envolve um valor numérico. Isso ocorre porque não é UB em C++ \"\n\"para uma classe enum ter um valor diferente de todas as variantes listadas, \"\n\"e nossa representação Rust precisa ter o mesmo comportamento.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 requer profundidade > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Sucesso!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\"As funções Rust que retornam `Result` são traduzidas para exceções no lado C+\"\n\"+.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"A exceção lançada sempre será do tipo `rust::Error`, que expõe \"\n\"principalmente uma maneira de obter a string da mensagem de erro. A mensagem \"\n\"de erro virá da implementação `Display` do tipo de erro.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"Um pânico propagando do Rust para o C++ sempre fará com que o processo \"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Erro: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"As funções C++ declaradas para retornar um `Result` capturarão qualquer \"\n\"exceção lançada no lado C++ e a retornarão como um valor `Err` para a função \"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"Se uma exceção for lançada de uma função externa \\\"C++\\\" que não é declarada \"\n\"pela _bridge_ CXX para retornar `Result`, o programa chama `std::terminate` \"\n\"do C++. O comportamento é equivalente à mesma exceção sendo lançada por meio \"\n\"de uma função `noexcept` C++.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"Tipo em C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"Esses tipos podem ser usados nos campos de _structs_ compartilhadas e nos \"\n\"argumentos e retornos de funções externas.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"Observe que a `String` do Rust não é mapeada diretamente para `std::string`. \"\n\"Há algumas razões para isso:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` não mantém a invariante UTF-8 que `String` requer.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"Os dois tipos têm layouts diferentes na memória e, portanto, não podem ser \"\n\"passados diretamente entre as linguagens.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` requer construtores de movimento que não correspondem à \"\n\"semântica de movimento do Rust, portanto, uma `std::string` não pode ser \"\n\"passada por valor para o Rust.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"Compilando no Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"Crie uma `cc_library_static` para compilar a biblioteca C++, incluindo o \"\n\"cabeçalho e o arquivo de origem gerados pelo CXX.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"Observe que `libcxx_test_bridge_header` e `libcxx_test_bridge_code` são as \"\n\"dependências para as vinculações C++ geradas pelo CXX. Mostraremos como \"\n\"essas são configuradas no próximo slide.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"Observe que você também precisa depender da biblioteca `cxx-bridge-header` \"\n\"para puxar as definições CXX comuns.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"Documentação completa para usar CXX no Android pode ser encontrada na \"\n\"[documentação do Android](https://source.android.com/docs/setup/build/rust/\"\n\"building-rust-modules/android-rust-patterns#rust-cpp-interop-using-cxx). \"\n\"Você pode querer compartilhar esse link com a classe para que os alunos \"\n\"saibam onde podem encontrar essas instruções novamente no futuro.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"Crie duas regras de geração: uma para gerar o cabeçalho CXX e outra para \"\n\"gerar o arquivo de origem CXX. Estes são então usados como entradas para a \"\n\"`cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Gera um cabeçalho C++ contendo as vinculações C++\\n\"\n\"// para as funções exportadas do Rust em lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Gera o código C++ que o Rust chama.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"A ferramenta `cxxbridge` é uma ferramenta independente que gera o lado C++ \"\n\"do módulo _bridge_. Ele está incluído no Android e está disponível como uma \"\n\"ferramenta Soong.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"Por convenção, se o seu arquivo de origem Rust for `lib.rs`, seu arquivo de \"\n\"cabeçalho será chamado `lib.rs.h` e seu arquivo de origem será chamado `lib.\"\n\"rs.cc`. Essa convenção de nomenclatura não é aplicada, no entanto.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\"Crie um `rust_binary` que depende de `libcxx` e sua `cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"Interoperabilidade com Java\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java pode carregar objetos compartilhados via [Java Native Interface (JNI)]\"\n\"(https://en.wikipedia.org/wiki/Java_Native_Interface). O [crate `jni`]\"\n\"(https://docs.rs/jni/) permite que você crie uma biblioteca compatível.\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Primeiro, criamos uma função Rust para exportar para Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI demo.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// Implementação do método HelloWorld::hello.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Olá, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"Podemos então chamar esta função do Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"Por fim, você pode criar, sincronizar e executar o binário:\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Este é um exercício em grupo: Nós iremos ver um dos projetos com os quais \"\n\"você trabalha e tentar integrar um pouco de Rust nele. Algumas sugestões:\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Chame seu serviço AIDL com um cliente escrito em Rust.\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Mova uma função do seu projeto para o Rust e a chame.\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Nenhuma solução é fornecida aqui, pois isso é aberto: depende de você ter \"\n\"uma classe tendo um pedaço de código que você pode transformar em Rust em \"\n\"tempo real.\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Bem-vindos ao Rust para Chromium\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"O Rust é suportado para bibliotecas de terceiros no Chromium, com código \"\n\"original para conectar com o código C++ existente do Chromium.\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"Hoje, chamaremos o Rust para fazer algo simples com strings. Se você tem um \"\n\"pedacinho do código onde é exibida uma string UTF8 para o usuário, sinta-se \"\n\"à vontade para seguir esta receita em sua parte do código-fonte em vez da \"\n\"parte exata sobre a qual falamos.\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"Certifique-se de que você pode compilar e executar o Chromium. Qualquer \"\n\"plataforma e conjunto de _flags_ de compilação está OK, desde que seu código \"\n\"seja relativamente recente (posição de _commit_ 1223636 em diante, \"\n\"correspondendo a novembro de 2023):\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"(Um componente, compilação de _debug_ é recomendado para o tempo de iteração \"\n\"mais rápido. Este é o padrão!)\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"Veja [Como compilar o Chromium](https://www.chromium.org/developers/how-tos/\"\n\"get-the-code/) se você ainda não estiver nesse ponto. Atenção: configurar a \"\n\"compilação do Chromium leva tempo.\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"Também é recomendável que você tenha o Visual Studio Code instalado.\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"Sobre os exercícios\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"Esta parte do curso tem uma série de exercícios que se complementam. Faremo-\"\n\"os ao longo do curso em vez de apenas no final. Se você não tiver tempo para \"\n\"concluir uma determinada parte, não se preocupe: você pode alcançar no \"\n\"próximo slot.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"A comunidade Rust normalmente usa `cargo` e bibliotecas de [crates.io]\"\n\"(https://crates.io/). O Chromium é compilado usando `gn` e `ninja` e um \"\n\"conjunto de dependências selecionadas.\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"Ao escrever código em Rust, suas escolhas são:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"Use `gn` e `ninja` com a ajuda dos _templates_ de `//build/rust/*.gni` (por \"\n\"exemplo, `rust_static_library` que veremos mais adiante). Isso usa o \"\n\"conjunto de ferramentas e _crates_ auditados do Chromium.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"Use `cargo`, mas [restrinja-se ao conjunto de ferramentas e _crates_ \"\n\"auditados do Chromium](https://chromium.googlesource.com/chromium/src/+/refs/\"\n\"heads/main/docs/rust.md#Using-cargo)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"Use `cargo`, confiando em um [conjunto de ferramentas](https://rustup.rs/) e/\"\n\"ou [crates baixados da internet](https://crates.io/)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"Daqui em diante, estaremos focando em `gn` e `ninja`, porque é assim que o \"\n\"código Rust pode ser compilado no navegador Chromium. Ao mesmo tempo, o \"\n\"Cargo é uma parte importante do ecossistema Rust e você deve mantê-lo em sua \"\n\"caixa de ferramentas.\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"Mini exercício\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"Dividam-se em pequenos grupos e:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"Faça um brainstorm de cenários em que o `cargo` pode oferecer uma vantagem e \"\n\"avalie o perfil de risco desses cenários.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"Discuta quais ferramentas, bibliotecas e grupos de pessoas precisam ser \"\n\"confiáveis ao usar `gn` e `ninja`, `cargo` offline, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"Peça aos alunos que evitem olhar as notas do apresentador antes de completar \"\n\"o exercício. Supondo que as pessoas que fazem o curso estejam fisicamente \"\n\"juntas, peça-lhes que discutam em pequenos grupos de 3-4 pessoas.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"Notas/dicas relacionadas à primeira parte do exercício (\\\"cenários em que o \"\n\"Cargo pode oferecer uma vantagem\\\"):\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"É fantástico que, ao escrever uma ferramenta ou prototipar uma parte do \"\n\"Chromium, tenha-se acesso ao rico ecossistema de bibliotecas do crates.io. \"\n\"Há um _crate_ para quase tudo e eles geralmente são bastante agradáveis de \"\n\"usar. (`clap` para análise de linha de comando, `serde` para serialização/\"\n\"desserialização para/de vários formatos, `itertools` para trabalhar com \"\n\"iteradores, etc.).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"O `cargo` torna fácil experimentar uma biblioteca (basta adicionar uma única \"\n\"linha ao `Cargo.toml` e começar a escrever o código)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"Pode valer a pena comparar como o CPAN ajudou a tornar o `perl` uma escolha \"\n\"popular. Ou comparar com `python` + `pip`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"A experiência de desenvolvimento é tornada realmente agradável não apenas \"\n\"pelas ferramentas principais do Rust (por exemplo, usando `rustup` para \"\n\"alternar para uma versão diferente do `rustc` ao testar um _crate_ que \"\n\"precisa funcionar no nightly, estável atual e estável antigo), mas também \"\n\"por um ecossistema de ferramentas de terceiros (por exemplo, a Mozilla \"\n\"fornece `cargo vet` para agilizar e compartilhar auditorias de segurança; o \"\n\"_crate_ `criterion` fornece uma maneira simplificada de executar \"\n\"_benchmarks_).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"O `cargo` torna fácil adicionar uma ferramenta via `cargo install --locked \"\n\"cargo-vet`.\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\"Pode valer a pena comparar com as extensões do Chrome ou as extensões do \"\n\"VScode.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"Exemplos amplos e genéricos de projetos em que o `cargo` pode ser a escolha \"\n\"certa:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"Talvez surpreendentemente, o Rust está se tornando cada vez mais popular na \"\n\"indústria para escrever ferramentas de linha de comando. A amplitude e a \"\n\"ergonomia das bibliotecas são comparáveis ao Python, enquanto são mais \"\n\"robustas (graças ao rico sistema de tipos) e executam mais rápido (como uma \"\n\"linguagem compilada, em vez de interpretada).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"Participar do ecossistema Rust requer o uso de ferramentas padrão do Rust, \"\n\"como o Cargo. Bibliotecas que desejam obter contribuições externas e desejam \"\n\"ser usadas fora do Chromium (por exemplo, em ambientes de compilação Bazel \"\n\"ou Android/Soong) devem usar o Cargo.\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\"Exemplos de projetos relacionados ao Chromium que são baseados no `cargo`:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient` (experimentado em outras partes do Google, o que \"\n\"resultou em PRs com melhorias de desempenho)\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"Bibliotecas Fontations como `font-types`\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"Ferramenta `gnrt` (vamos conhecê-la mais adiante no curso) que depende do \"\n\"`clap` para análise de linha de comando e do `toml` para arquivos de \"\n\"configuração.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"Aviso: um motivo único para usar o `cargo` foi a indisponibilidade do `gn` \"\n\"ao compilar e inicializar a biblioteca padrão do Rust ao compilar o conjunto \"\n\"de ferramentas Rust.)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` usa a cópia do `cargo` e do `rustc` do Chromium. `gnrt` \"\n\"depende de bibliotecas de terceiros baixadas da internet, mas `run_gnrt.py` \"\n\"pede ao `cargo` que apenas o conteúdo `--locked` seja permitido via `Cargo.\"\n\"lock`.)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"Os alunos podem identificar os seguintes itens como sendo implicitamente ou \"\n\"explicitamente confiáveis:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (o compilador Rust), que por sua vez depende das bibliotecas LLVM, \"\n\"do compilador Clang, das fontes `rustc` (buscadas no GitHub, revisadas pela \"\n\"equipe do compilador Rust), compilador Rust binário baixado para \"\n\"inicialização\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup` (pode valer a pena observar que o `rustup` é desenvolvido sob a \"\n\"supervisão da organização https://github.com/rust-lang/ - o mesmo que o \"\n\"`rustc`)\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`, `rustfmt`, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"Diversas infraestruturas internas (robôs que compilam `rustc`, sistema para \"\n\"distribuir o conjunto de ferramentas pré-compilado para engenheiros do \"\n\"Chromium, etc.)\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"Ferramentas do Cargo como `cargo audit`, `cargo vet`, etc.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"Bibliotecas Rust hospedadas em `//third_party/rust` (auditadas por \"\n\"security@chromium.org)\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\"Outras bibliotecas Rust (algumas de nicho, algumas bastante populares e \"\n\"comumente usadas)\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Política do Rust para Chromium\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"O Chromium ainda não permite que Rust seja utlizado diretamente, exceto em \"\n\"casos raros, conforme aprovado pelos [Area Tech Leads](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:ATL_OWNERS) do Chromium.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"A política do Chromium sobre bibliotecas de terceiros é descrita [aqui]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#rust) - o Rust é permitido para bibliotecas de \"\n\"terceiros em várias circunstâncias, incluindo se forem a melhor opção para \"\n\"desempenho ou para segurança.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"Muito poucas bibliotecas Rust expõem diretamente uma API C/C++, o que \"\n\"significa que quase todas essas bibliotecas exigirão diretamente um pouco de \"\n\"código de integração.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                              :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"O código próprio de integração Rust para um determinado _crate_ de terceiros \"\n\"deve ser mantido normalmente em `third_party/rust/<crate>/<version>/wrapper`.\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"Por causa disso, o curso de hoje será fortemente focado em:\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"Trabalhando com bibliotecas Rust de terceiros (\\\"crates\\\")\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\"Escrevendo código de integração para poder usar esses _crates_ a partir do C+\"\n\"+ do Chromium.\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"Se essa política mudar com o tempo, o curso evoluirá para acompanhar.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"Regras de Compilação\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"O código Rust geralmente é compilado usando `cargo`. O Chromium é compilado \"\n\"com `gn` e `ninja` para eficiência --- suas regras estáticas permitem a \"\n\"máxima paralelização. O Rust não é exceção.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"Adicionando código Rust ao Chromium\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"Em algum arquivo `BUILD.gn` existente do Chromium, declare um \"\n\"`rust_static_library`:\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"Você também pode adicionar `deps` em outros módulos Rust. Mais tarde, \"\n\"usaremos isso para depender de código de terceiros.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"Você deve especificar _ambos_ o _crate root_ e uma lista completa de fontes. \"\n\"O `crate_root` é o arquivo fornecido ao compilador Rust que representa o \"\n\"arquivo raiz da unidade de compilação --- normalmente `lib.rs`. `sources` é \"\n\"uma lista completa de todos os arquivos de código que o `ninja` precisa para \"\n\"determinar quando as recompilações são necessárias.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(Não existe um `source_set` Rust, porque em Rust, um _crate_ inteiro é uma \"\n\"unidade de compilação. Uma `static_library` é a menor unidade.)\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"Os alunos podem estar se perguntando por que precisamos de um template gn, \"\n\"em vez de usar [o suporte integrado do gn para bibliotecas estáticas Rust]\"\n\"(https://gn.googlesource.com/gn/+/main/docs/reference.\"\n\"md#func_static_library). A resposta é que este template fornece suporte para \"\n\"interoperabilidade CXX, recursos Rust e testes unitários, alguns dos quais \"\n\"usaremos mais tarde.\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"Incluindo código Rust `unsafe` (inseguro)\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"O código Rust inseguro é proibido em `rust_static_library` por padrão --- \"\n\"não será compilado. Se você precisar de código Rust inseguro, adicione \"\n\"`allow_unsafe = true` ao alvo gn. (Mais tarde no curso, veremos \"\n\"circunstâncias em que isso é necessário).\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"Basta adicionar o alvo acima às `deps` de algum alvo C++ do Chromium.\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Os tipos são omitidos no código Rust, o que torna um bom IDE ainda mais útil \"\n\"do que para C++. O Visual Studio Code funciona bem para Rust no Chromium. \"\n\"Para usá-lo,\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"Verifique se o seu VSCode tem a extensão `rust-analyzer`, não as formas \"\n\"anteriores de suporte ao Rust\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"`gn gen out/Debug --export-rust-project` (ou equivalente para seu diretório \"\n\"de saída)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"Uma demonstração de alguns dos recursos de anotação e exploração de código \"\n\"do rust-analyzer pode ser benéfica se o público for naturalmente cético em \"\n\"relação aos IDEs.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"Os seguintes passos podem ajudar na demonstração (mas sinta-se à vontade \"\n\"para usar um pedaço de Rust relacionado ao Chromium com o qual você esteja \"\n\"mais familiarizado):\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"Abra `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"Coloque o cursor sobre a chamada `QrCode::new` (por volta da linha 26) em \"\n\"`qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"Demonstre **mostrar documentação** (teclas de atalho típicas: vscode = ctrl \"\n\"k i; vim/CoC = K).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"Demonstre **ir para a definição** (teclas de atalho típicas: vscode = F12; \"\n\"vim/CoC = g d). (Isso o levará a `//third_party/rust/.../qr_code-.../src/lib.\"\n\"rs`).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"Demonstre **esboço** e navegue até o método `QrCode::with_bits` (por volta \"\n\"da linha 164; o esboço está no painel do explorador de arquivos no vscode; \"\n\"teclas de atalho típicas do vim/CoC = space o)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"Demonstre **anotações de tipo** (há muitos exemplos interessantes no método \"\n\"`QrCode::with_bits`)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"Pode valer a pena observar que `gn gen ... --export-rust-project` precisará \"\n\"ser executado novamente após a edição dos arquivos `BUILD.gn` (o que faremos \"\n\"algumas vezes ao longo dos exercícios desta sessão).\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"Exercício de regras de compilação\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"Em sua compilação do Chromium, adicione um novo módulo Rust a `//ui/base/\"\n\"BUILD.gn` contendo:\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**Importante**: observe que `no_mangle` aqui é considerado um tipo de \"\n\"insegurança pelo compilador Rust, portanto, você precisará permitir código \"\n\"inseguro em seu alvo `gn`.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"Adicione este novo módulo Rust como uma dependência de `//ui/base:base`. \"\n\"Declare esta função no topo de `ui/base/resource/resource_bundle.cc` (mais \"\n\"tarde, veremos como isso pode ser automatizado por ferramentas de geração de \"\n\"_bindings_):\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"Chame esta função de algum lugar em `ui/base/resource/resource_bundle.cc` - \"\n\"sugerimos o topo de `ResourceBundle::MaybeMangleLocalizedString`. Compile e \"\n\"execute o Chromium e verifique se \\\"Hello from Rust!\\\" é impresso muitas \"\n\"vezes.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"Se você usar o VSCode, agora configure o Rust para funcionar bem no VSCode. \"\n\"Isto será útil nos exercícios subsequentes. Se você tiver sucesso, poderá \"\n\"usar o botão direito do mouse em \\\"Ir para definição\\\" em `println!`.\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"Onde encontrar ajuda\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"As opções disponíveis para o [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"Informações sobre [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"Informações sobre [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"Informações sobre o [`--export-rust-project`](https://gn.googlesource.com/gn/\"\n\"+/main/docs/reference.md#compilation-database) do gn\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[Como instalar o rust-analyzer no VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"Este exemplo é incomum porque se resume à linguagem de interoperabilidade de \"\n\"menor denominador comum, C. Tanto C++ quanto Rust podem declarar e chamar \"\n\"nativamente funções C ABI. Mais tarde no curso, conectaremos C++ diretamente \"\n\"ao Rust.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"`allow_unsafe = true` é necessário aqui porque `#[no_mangle]` pode permitir \"\n\"que o Rust gere duas funções com o mesmo nome, e o Rust não pode mais \"\n\"garantir que a correta seja chamada.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"Se você precisar de um executável Rust puro, também poderá fazer isso usando \"\n\"o template gn `rust_executable`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"A comunidade Rust normalmente escreve testes unitários em um módulo colocado \"\n\"no mesmo arquivo de código sendo testado. Isso foi abordado [anteriormente]\"\n\"(../testing.md) no curso e se parece com isso:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"No Chromium, colocamos os testes unitários em um arquivo de código separado \"\n\"e continuamos a seguir essa prática para o Rust --- isso torna os testes \"\n\"consistentemente descobríveis e ajuda a evitar a reconstrução de arquivos `.\"\n\"rs` uma segunda vez (na configuração `test`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"Isto resulta nas seguintes opções para testar código Rust no Chromium:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"Testes nativos Rust (ou seja, `#[test]`). Desencorajado fora de `//\"\n\"third_party/rust`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"Testes `gtest` escritos em C++ e exercitando Rust via chamadas FFI. \"\n\"Suficiente quando o código Rust é apenas uma camada FFI fina e os testes \"\n\"unitários existentes fornecem cobertura suficiente para o recurso.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"Testes `gtest` escritos em Rust e usando o _crate_ sob teste por meio de sua \"\n\"API pública (usando `pub mod for_testing { ... }` se necessário). Este é o \"\n\"assunto dos próximos slides.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"Mencione que os testes nativos Rust de _crates_ de terceiros devem \"\n\"eventualmente ser exercitados pelos robôs do Chromium. (Esses testes são \"\n\"raramente necessários --- apenas após adicionar ou atualizar _crates_ de \"\n\"terceiros.)\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"Alguns exemplos podem ajudar a ilustrar quando o `gtest` C++ vs Rust `gtest` \"\n\"deve ser usado:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR tem muito pouca funcionalidade na camada Rust original (é apenas uma cola \"\n\"FFI fina) e, portanto, usa os testes unitários C++ existentes para testar \"\n\"tanto a implementação C++ quanto a Rust (parametrizando os testes para que \"\n\"eles ativem ou desativem o Rust usando um `ScopedFeatureList`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"A integração hipotética/em andamento do PNG pode precisar de uma \"\n\"implementação segura de memória das transformações de pixels fornecidas pelo \"\n\"`libpng`, mas ausentes no _crate_ `png` - por exemplo, RGBA => BGRA ou \"\n\"correção gama. Tal funcionalidade pode se beneficiar de testes separados \"\n\"escritos em Rust.\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"A biblioteca [`rust_gtest_interop`](https://chromium.googlesource.com/\"\n\"chromium/src/+ /main/testing/rust_gtest_interop/README.md) fornece uma \"\n\"maneira de:\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"Use uma função Rust como um caso de teste `gtest` (usando o atributo \"\n\"`#[gtest(...)]`)\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"Use `expect_eq!` e macros semelhantes (semelhantes a `assert_eq!` mas não \"\n\"falhando e não terminando o teste quando a asserção falha).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Exemplo:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"A maneira mais simples de compilar testes `gtest` Rust é adicioná-los a um \"\n\"binário de teste existente que já contém testes escritos em C++. Por exemplo:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"Escrever testes Rust em uma `static_library` separada também funciona, mas \"\n\"exige a declaração manual da dependência das bibliotecas de suporte:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"Depois de adicionar `:my_rust_lib` às `deps` do GN, ainda precisamos \"\n\"aprender como importar e usar `my_rust_lib` de `my_rust_lib_unittest.rs`. \"\n\"Não fornecemos um `crate_name` explícito para `my_rust_lib`, portanto, seu \"\n\"nome de _crate_ é calculado com base no caminho e nome do alvo completo. \"\n\"Felizmente, podemos evitar trabalhar com um nome tão difícil de usar usando \"\n\"o macro `chromium::import!` do _crate_ `chromium` automaticamente importado:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"Por baixo dos panos, a macro se expande para algo semelhante a:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"Mais informações podem ser encontradas no [comentário de documentação]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"chromium_prelude/chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.\"\n\"*%5Cbimport%5Cb;%20-f:third_party&ss=chromium%2Fchromium%2Fsrc) da macro \"\n\"`chromium::import`.\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"`rust_static_library` suporta a especificação de um nome explícito via \"\n\"propriedade `crate_name`, mas isso é desencorajado. E é desencorajado porque \"\n\"o nome do _crate_ tem que ser globalmente único. crates.io garante a \"\n\"unicidade de seus nomes de _crate_, portanto, os alvos `cargo_crate` GN \"\n\"(gerados pela ferramenta `gnrt` abordada em uma seção posterior) usam nomes \"\n\"curtos de _crate_.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"Exercício sobre testes\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"Hora de mais um exercício!\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"Em sua compilação do Chromium:\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"Adicione uma função testável ao lado de `hello_from_rust`. Algumas \"\n\"sugestões: adicionar dois inteiros recebidos como argumentos, calcular o n-\"\n\"ésimo número de Fibonacci, somar inteiros em uma _slice_, etc.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\"Adicione um arquivo `..._unittest.rs` separado com um teste para a nova \"\n\"função.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"Adicione os novos testes a `BUILD.gn`.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"Compile os testes, execute-os e verifique se o novo teste funciona.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"A comunidade Rust oferece várias opções para interoperabilidade C++/Rust, \"\n\"com novas ferramentas sendo desenvolvidas o tempo todo. No momento, o \"\n\"Chromium usa uma ferramenta chamada CXX.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"Você descreve toda a fronteira da linguagem em uma linguagem de definição de \"\n\"interface (que se parece muito com Rust) e, em seguida, as ferramentas CXX \"\n\"geram declarações para funções e tipos em Rust e C++.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Veja o [tutorial CXX](https://cxx.rs/tutorial.html) para um exemplo completo \"\n\"de como usá-lo.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"Fale com o auxílio do diagrama. Explique que, nos bastidores, isso está \"\n\"fazendo exatamente o mesmo que você fez anteriormente. Aponte que \"\n\"automatizar o processo tem os seguintes benefícios:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"A ferramenta garante que os lados C++ e Rust correspondam (por exemplo, você \"\n\"obterá erros de compilação se o `#[cxx::bridge]` não corresponder às \"\n\"definições C++ ou Rust reais, mas com _bindings_ manuais fora de sincronia, \"\n\"você obteria Comportamento Indefinido)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"A ferramenta automatiza a geração de _thunks_ FFI (pequenas funções livres \"\n\"compatíveis com C-ABI) para recursos não-C (por exemplo, permitindo chamadas \"\n\"FFI para métodos Rust ou C++; _bindings_ manuais exigiriam a autoria de tais \"\n\"funções livres de alto nível manualmente)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\"A ferramenta e a biblioteca podem lidar com um conjunto de tipos principais \"\n\"- por exemplo:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` pode ser passado pela fronteira FFI, embora não garanta nenhum layout \"\n\"de memória ou ABI específico. Com _bindings_ manuais, `std::span<T>` / \"\n\"`&[T]` devem ser manualmente destruturados e reconstruídos a partir de um \"\n\"ponteiro e comprimento - isso é propenso a erros, dado que cada linguagem \"\n\"representa fatias vazias de maneira ligeiramente diferente)\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"Ponteiros inteligentes como `std::unique_ptr<T>`, `std::shared_ptr<T>` e/ou \"\n\"`Box` são suportados nativamente. Com _bindings_ manuais, seria necessário \"\n\"passar ponteiros brutos (_raw pointers_) compatíveis com C-ABI, o que \"\n\"aumentaria os riscos de tempo de vida e segurança de memória.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"Os tipos `rust::String` e `CxxString` entendem e mantêm as diferenças na \"\n\"representação de strings entre as linguagens (por exemplo, `rust::String::\"\n\"lossy` pode construir uma string Rust a partir de uma entrada não UTF8 e \"\n\"`rust::String::c_str` pode terminar uma string com NUL).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"O CXX requer que toda a fronteira C++/Rust seja declarada em módulos `cxx::\"\n\"bridge` dentro do código-fonte `.rs`.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// Definições de tipos e funções Rust vão aqui\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"Aponte:\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"Embora isso pareça um `mod` Rust regular, a macro procedural `#[cxx::\"\n\"bridge]` faz coisas complexas com ele. O código gerado é bastante \"\n\"sofisticado - embora isso ainda resulte em um `mod` chamado `ffi` em seu \"\n\"código.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Suporte nativo para `std::unique_ptr` do C++ no Rust\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Suporte nativo para _slices_ Rust no C++\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"Chamadas do C++ para o Rust e tipos Rust (na parte superior)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"Chamadas do Rust para o C++ e tipos C++ (na parte inferior)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**Equívocos comuns**: Parece que um cabeçalho C++ está sendo analisado pelo \"\n\"Rust, mas isso é enganoso. Este cabeçalho nunca é interpretado pelo Rust, \"\n\"mas simplesmente `#include`d no código C++ gerado para o benefício dos \"\n\"compiladores C++.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"De longe, a página mais útil ao usar o CXX é a [referência de tipo](https://\"\n\"cxx.rs/bindings.html).\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX fundamentalmente é adequado para casos em que:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\"Sua interface Rust-C++ é suficientemente simples para que você possa \"\n\"declarar tudo.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"Você está usando apenas os tipos já suportados nativamente pelo CXX, por \"\n\"exemplo, `std::unique_ptr`, `std::string`, `&[u8]` etc.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"Ele tem muitas limitações --- por exemplo, falta de suporte para o tipo \"\n\"`Option` do Rust.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"Essas limitações nos restringem a usar o Rust no Chromium apenas para \\\"leaf \"\n\"nodes\\\" (\\\"nós folha\\\") bem isolados, em vez de para interoperabilidade Rust-\"\n\"C++ arbitrária. Ao considerar um caso de uso para o Rust no Chromium, um bom \"\n\"ponto de partida é elaborar os _bindings_ CXX para a fronteira entre as \"\n\"linguagens para ver se ela parece simples o suficiente.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\"Você também deve discutir alguns dos outros pontos problemáticos com o CXX, \"\n\"por exemplo:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\"Seu tratamento de erros é baseado em exceções C++ (dado no próximo slide)\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"Ponteiros de função são difíceis de usar.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"O [suporte do CXX para `Result<T,E>`](https://cxx.rs/binding/result.html) \"\n\"depende de exceções C++, portanto, não podemos usá-lo no Chromium. \"\n\"Alternativas:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"A parte `T` de `Result<T, E>` pode ser:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"Retornado via parâmetros de saída (por exemplo, via `&mut T`). Isso requer \"\n\"que `T` possa ser passado pela fronteira FFI - por exemplo, `T` tem que ser:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"Um tipo primitivo (como `u32` ou `usize`)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"Um tipo suportado nativamente por `cxx` (como `UniquePtr<T>`) que tem um \"\n\"valor padrão adequado para usar em um caso de falha (_ao contrário_ de \"\n\"`Box<T>`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"Mantido no lado Rust e exposto por referência. Isso pode ser necessário \"\n\"quando `T` é um tipo Rust, que não pode ser passado pela fronteira FFI e não \"\n\"pode ser armazenado em `UniquePtr<T>`.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"A parte `E` de `Result<T, E>` pode ser:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"Retornado como um booleano (por exemplo, `true` representando sucesso e \"\n\"`false` representando falha)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"A preservação dos detalhes do erro é teoricamente possível, mas até agora \"\n\"não foi necessária na prática.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Tratamento de Erros no CXX: Exemplo QR\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"O gerador de código QR é [um exemplo](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) onde um booleano é \"\n\"usado para comunicar sucesso vs falha e onde o resultado bem-sucedido pode \"\n\"ser passado pela fronteira FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"Os alunos podem estar curiosos sobre a semântica da saída `out_qr_size`. \"\n\"Este não é o tamanho do vetor, mas o tamanho do código QR (e, \"\n\"reconhecidamente, é um pouco redundante - esta é a raiz quadrada do tamanho \"\n\"do vetor).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"Pode valer a pena destacar a importância de inicializar `out_qr_size` antes \"\n\"de chamar a função Rust. A criação de uma referência Rust que aponta para a \"\n\"memória não inicializada resulta em Comportamento Indefinido (ao contrário \"\n\"do C++, quando apenas o ato de desreferenciar tal memória resulta em UB).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Se os alunos perguntarem sobre `Pin`, explique por que o CXX precisa dele \"\n\"para referências mutáveis a dados C++: a resposta é que os dados C++ não \"\n\"podem ser movidos como os dados Rust, porque podem conter ponteiros auto-\"\n\"referenciais.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Tratamento de Erros no CXX: Exemplo PNG\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Um protótipo de um decodificador PNG ilustra o que pode ser feito quando o \"\n\"resultado bem-sucedido não pode ser passado pela fronteira FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// Isso retorna um equivalente amigável ao FFI de `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// _Bindings_ C++ para o tipo `crate::png::ResultOfPngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// _Bindings_ C++ para o tipo `crate::png::PngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` e `ResultOfPngReader` são tipos Rust --- objetos desses tipos \"\n\"não podem cruzar a fronteira FFI sem a indireção de um `Box<T>`. Não podemos \"\n\"ter um `out_parameter: &mut PngReader`, porque o CXX não permite que o C++ \"\n\"armazene objetos Rust por valor.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"Este exemplo ilustra que, embora o CXX não suporte genéricos nem modelos \"\n\"arbitrários, ainda podemos passá-los pela fronteira FFI especializando / \"\n\"monomorfizando-os manualmente em um tipo não genérico. No exemplo, \"\n\"`ResultOfPngReader` é um tipo não genérico que encaminha para métodos \"\n\"apropriados de `Result<T, E>` (por exemplo, para `is_err`, `unwrap` e/ou \"\n\"`as_mut`).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"Usando CXX no Chromium\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"No Chromium, definimos um `#[cxx::bridge] mod` independente para cada nó \"\n\"folha onde queremos usar o Rust. Normalmente, você teria um para cada \"\n\"`rust_static_library`. Basta adicionar\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"para o seu alvo `rust_static_library` existente ao lado de `crate_root` e \"\n\"`sources`.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\"Cabeçalhos C++ serão gerados em um local sensato, então você pode apenas\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"Você encontrará algumas funções utilitárias em `//base` para converter de/ \"\n\"para tipos C++ do Chromium para tipos Rust CXX --- por exemplo \"\n\"[`SpanToRustSlice`](https://source.chromium.org/chromium/chromium/src/+/main:\"\n\"base/containers/span_rust.h;l=21).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"Os alunos podem perguntar --- por que ainda precisamos de `allow_unsafe = \"\n\"true`?\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"A resposta mais geral é que nenhum código C/C++ é \\\"seguro\\\" pelos padrões \"\n\"normais do Rust. Chamar C/C++ a partir do Rust pode fazer coisas arbitrárias \"\n\"na memória e comprometer a segurança dos próprios layouts de dados do Rust. \"\n\"A presença de _muitas_ palavras-chave `unsafe` na interoperabilidade C/C++ \"\n\"pode prejudicar a relação sinal-ruído de tal palavra-chave e é [controversa]\"\n\"(https://steveklabnik.com/writing/the-cxx-debate), mas estritamente, trazer \"\n\"qualquer código externo para um binário Rust pode causar um comportamento \"\n\"inesperado do ponto de vista do Rust.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"A resposta mais específica está no diagrama no topo [desta página](../\"\n\"interoperability-with-cpp.md) --- nos bastidores, o CXX gera funções Rust \"\n\"`unsafe` e `extern \\\"C\\\"` exatamente como fizemos manualmente na seção \"\n\"anterior.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Exercício: Interoperabilidade com C++\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"Parte um\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"No arquivo Rust que você criou anteriormente, adicione um `#[cxx::bridge]` \"\n\"que especifica uma única função, a ser chamada do C++, chamada \"\n\"`hello_from_rust`, sem parâmetros e sem valor de retorno.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"Modifique sua função `hello_from_rust` anterior para remover `extern \\\"C\\\"` \"\n\"e `#[no_mangle]`. Esta é agora apenas uma função Rust padrão.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"Modifique seu alvo `gn` para compilar esses _bindings_.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"No seu código C++, remova a declaração antecipada de `hello_from_rust`. Em \"\n\"vez disso, inclua o arquivo de cabeçalho gerado.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"Compile e execute!\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"Parte dois\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"É uma boa ideia brincar um pouco com o CXX. Isso ajuda você a pensar sobre \"\n\"quão flexível o Rust no Chromium realmente é.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"Algumas coisas para tentar:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"Chame de volta para o C++ a partir do Rust. Você vai precisar de:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"Um arquivo de cabeçalho adicional que você pode `include!` do seu `cxx::\"\n\"bridge`. Você precisará declarar sua função C++ nesse novo arquivo de \"\n\"cabeçalho.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"Um bloco `unsafe` para chamar tal função, ou alternativamente especifique a \"\n\"palavra-chave `unsafe` no seu `#[cxx::bridge]` [conforme descrito aqui]\"\n\"(https://cxx.rs/extern-c++.html#functions-and-member-functions).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"Você também pode precisar `#include \\\"third_party/rust/cxx/v1/crate/include/\"\n\"cxx.h\\\"`\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"Passe uma string C++ para o Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"Passe uma referência a um objeto C++ para o Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Intencionalmente, obtenha as assinaturas de função Rust incompatíveis com o \"\n\"`#[cxx::bridge]` e familiarize-se com os erros que você vê.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Intencionalmente, obtenha as assinaturas de função C++ incompatíveis com o \"\n\"`#[cxx::bridge]` e familiarize-se com os erros que você vê.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"Passe um `std::unique_ptr` de algum tipo do C++ para o Rust, para que o Rust \"\n\"possa _own_ (possuir) algum objeto C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"Crie um objeto Rust e passe-o para o C++, para que o C++ o possua. (Dica: \"\n\"você precisa de uma `Box`).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"Declare alguns métodos em um tipo C++. Chame-os do Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"Declare alguns métodos em um tipo Rust. Chame-os do C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"Parte três\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"Agora que você entende os pontos fortes e as limitações da \"\n\"interoperabilidade do CXX, pense em alguns casos de uso para o Rust no \"\n\"Chromium, onde a interface seria suficientemente simples. Esboce como você \"\n\"pode definir essa interface.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"A [referência de _bindings_ `cxx`](https://cxx.rs/bindings.html)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"O [_template_ gn `rust_static_library`](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"Algumas das perguntas que você pode encontrar:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"Estou vendo um problema ao inicializar uma variável do tipo X com o tipo Y, \"\n\"onde X e Y são ambos tipos de função. Isso ocorre porque sua função C++ não \"\n\"corresponde exatamente à declaração em sua `cxx::bridge`.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"Parece que posso converter livremente referências C++ em referências Rust. \"\n\"Isso não arrisca UB? Para os tipos _opaque_ do CXX, não, porque eles têm \"\n\"tamanho zero. Para os tipos triviais do CXX, sim, é _possível_ causar UB, \"\n\"embora o design do CXX torne bastante difícil criar um exemplo assim.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"As bibliotecas Rust são chamadas de \\\"_crates_\\\" e são encontradas em \"\n\"[crates.io](https://crates.io). É _muito fácil_ para as _crates_ Rust \"\n\"dependerem umas das outras. Então eles fazem!\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Propriedade\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"Bibliotecas do C++\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"_Crates_ de Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"Sistema de compilação\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"Muitos\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Consistente: `Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"Tamanho típico da biblioteca\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"Meio grande\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"Pequeno\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"Dependências transitivas\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"Poucos(as)\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"Para um engenheiro do Chromium, isso tem prós e contras:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"Todas as _crates_ usam um sistema de compilação comum, para que possamos \"\n\"automatizar sua inclusão no Chromium...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"... mas, os _crates_ normalmente têm dependências transitivas, então você \"\n\"provavelmente terá que importar várias bibliotecas.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"Vamos discutir:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"Como colocar um _crate_ na árvore do código-fonte do Chromium\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"Como criar regras de compilação `gn` para ele\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"Como auditar seu código-fonte para que ele seja seguro o suficiente.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"Configurando o arquivo `Cargo.toml` para adicionar _crates_\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"O Chromium tem um único conjunto de dependências de _crates_ diretos \"\n\"gerenciados centralmente. Eles são gerenciados por meio de um único [`Cargo.\"\n\"toml`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/\"\n\"rust/chromium_crates_io/Cargo.toml):\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"Como em qualquer outro `Cargo.toml`, você pode especificar [maiores detalhes \"\n\"sobre as dependências](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- mais comumente, você desejará especificar os \"\n\"`features` que deseja ativar no _crate_.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"Ao adicionar um _crate_ ao Chromium, você frequentemente precisará fornecer \"\n\"algumas informações extras em um arquivo adicional, `gnrt_config.toml`, que \"\n\"conheceremos a seguir.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"Junto com `Cargo.toml` está [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). Isso contém extensões específicas do Chromium para o gerenciamento de \"\n\"_crates_.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"Se você adicionar um novo _crate_, deverá especificar pelo menos o `group`. \"\n\"Este é um de:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"Por exemplo,\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"Dependendo do layout do código-fonte do _crate_, você também pode precisar \"\n\"usar este arquivo para especificar onde seu(s) arquivo(s) `LICENSE` pode(m) \"\n\"ser encontrado(s).\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"Mais tarde, veremos algumas outras coisas que você precisará configurar \"\n\"neste arquivo para resolver problemas.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"Uma ferramenta chamada `gnrt` sabe como baixar _crates_ e como criar regras \"\n\"`BUILD.gn`.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"Para começar, baixe o _crate_ que você deseja assim:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"Embora a ferramenta `gnrt` faça parte do código-fonte do Chromium, ao \"\n\"executar este comando, você estará baixando e executando suas dependências \"\n\"de `crates.io`. Veja [a seção anterior](../cargo.md) que discute essa \"\n\"decisão de segurança.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"Este comando `vendor` pode baixar:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"Seu _crate_\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"Dependências diretas e transitivas\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"Novas versões de outros _crates_, conforme exigido pelo `cargo` para \"\n\"resolver o conjunto completo de _crates_ requeridos pelo Chromium.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"O Chromium mantém _patches_ para alguns _crates_ em `//third_party/rust/\"\n\"chromium_crates_io/patches`. Eles serão reaplicados automaticamente, mas se \"\n\"a aplicação do _patch_ falhar, você poderá precisar realizar manualmente.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"Depois de baixar o _crate_, gere os arquivos `BUILD.gn` assim:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"Agora execute `git status`. Você deve encontrar:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"Pelo menos um novo código-fonte de _crate_ em `third_party/rust/\"\n\"chromium_crates_io/vendor`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"Pelo menos um novo `BUILD.gn` em `third_party/rust/<nome do _crate_>/\"\n\"v<versão semver principal>`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"Um `README.chromium` apropriado\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"A \\\"versão semver principal\\\" é um [número de versão \\\"semver\\\" Rust]\"\n\"(https://doc.rust-lang.org/cargo/reference/semver.html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\"Dê uma olhada de perto, especialmente nas coisas geradas em `third_party/\"\n\"rust`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"Fale um pouco sobre semver --- e especificamente a maneira como no Chromium \"\n\"é permitir várias versões incompatíveis de um _crate_, o que é \"\n\"desencorajado, mas às vezes necessário no ecossistema Cargo.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"Se a sua compilação falhar, pode ser por causa de um `build.rs`: programas \"\n\"que fazem coisas arbitrárias no momento da compilação. Isso é \"\n\"fundamentalmente incompatível com o design do `gn` e do `ninja`, que visam \"\n\"regras de compilação estáticas e determinísticas para maximizar o \"\n\"paralelismo e a repetibilidade das compilações.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"Algumas ações `build.rs` são suportadas automaticamente; outras exigem ação:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"build script effect\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"Suportado por nossos _templates_ gn\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"Trabalho exigido por você\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\"Verificando a versão do rustc para configurar recursos ativados e desativados\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"Sim\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"Nenhum\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\"Verificando a plataforma ou CPU para configurar recursos ativados e \"\n\"desativados\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"Gerando código\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"Sim - especifique em `gnrt_config.toml`\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"Compilando C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"Não\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"Corrigir\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"Outras ações arbitrárias\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"Felizmente, a maioria dos _crates_ não contém um script de compilação e, \"\n\"felizmente, a maioria dos scripts de compilação faz apenas as duas ações \"\n\"principais.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"Se o `ninja` reclamar sobre arquivos ausentes, verifique o `build.rs` para \"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"Se for esse o caso, modifique [`gnrt_config.toml`](../configuring-gnrt-\"\n\"config-toml.md) para adicionar `build-script-outputs` ao _crate_. Se esta \"\n\"for uma dependência transitiva, ou seja, uma na qual o código do Chromium \"\n\"não deve depender diretamente, adicione também `allow-first-party-\"\n\"usage=false`. Já existem vários exemplos neste arquivo:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"Agora, execute novamente [`gnrt.py -- gen`](../generating-gn-build-rules.md) \"\n\"para re-gerar os arquivos `BUILD.gn` para informar ao ninja que este arquivo \"\n\"de saída específico é a entrada para etapas de compilação subsequentes.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"Alguns _crates_ usam o _crate_ [`cc`](https://crates.io/crates/cc) para \"\n\"compilar e vincular bibliotecas C/C++. Outros _crates_ analisam C/C++ usando \"\n\"o [`bindgen`](https://crates.io/crates/bindgen) em seus scripts de \"\n\"compilação. Essas ações não podem ser suportadas em um contexto do Chromium \"\n\"--- nosso sistema de compilação gn, ninja e LLVM é muito específico na \"\n\"expressão de relacionamentos entre ações de compilação.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"Então, suas opções são:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"Evite esses _crates_\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"Aplique um _patch_ ao _crate_.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"Os _patches_ devem ser mantidos em `third_party/rust/chromium_crates_io/\"\n\"patches/<crate>` - veja, por exemplo, os [patches para o _crate_ `cxx`]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - e serão aplicados automaticamente pelo \"\n\"`gnrt` sempre que ele atualizar o _crate_.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"Depois de adicionar um _crate_ de terceiros e gerar regras de compilação, \"\n\"depender de um _crate_ é simples. Encontre seu alvo `rust_static_library` e \"\n\"adicione um `dep` no alvo `:lib` dentro do seu _crate_.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"Especificamente,\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"Auditoria de _Crates_ de Terceiros\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"A adição de novas bibliotecas está sujeita às políticas padrão do Chromium \"\n\"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), mas, é claro, também está sujeita à verificação de \"\n\"segurança. Como você pode estar trazendo não apenas um único _crate_, mas \"\n\"também dependências transitivas, pode haver muito código para revisar. Por \"\n\"outro lado, o código Rust seguro pode ter efeitos colaterais negativos \"\n\"limitados. Como você deve revisá-lo?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"Ao longo do tempo, o Chromium visa a migrar para um processo baseado em \"\n\"[cargo vet](https://mozilla.github.io/cargo-vet/).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\"Enquanto isso, para cada nova adição de _crate_, estamos verificando o \"\n\"seguinte:\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"Entenda por que cada _crate_ é usado. Qual é a relação entre os _crates_? Se \"\n\"o sistema de compilação de cada _crate_ contiver um `build.rs` ou macros \"\n\"procedurais, descubra para que servem. Eles são compatíveis com a maneira \"\n\"como o Chromium é normalmente construído?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"Verifique se cada _crate_ parece estar razoavelmente bem mantido\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` para verificar se \"\n\"há vulnerabilidades conhecidas (primeiro você precisará `cargo install cargo-\"\n\"audit`, o que ironicamente envolve baixar muitas dependências da internet[2]\"\n\"(../cargo.md))\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"Certifique-se de que qualquer código `unsafe` seja bom o suficiente para a \"\n\"[Regra de Dois](https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"security/rule-of-2.md#unsafe-code-in-safe-languages)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"Verifique se há uso de APIs `fs` ou `net`\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"Leia todo o código em um nível suficiente para procurar qualquer coisa fora \"\n\"do lugar que possa ter sido inserida maliciosamente. (Você não pode \"\n\"realisticamente visar 100% de perfeição aqui: muitas vezes há simplesmente \"\n\"muito código).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"Estas são apenas diretrizes --- trabalhe com revisores do `security@chromium.\"\n\"org` para descobrir a maneira certa de se tornar confiante no _crate_.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"Verificando _Crates_ no Código-Fonte do Chromium\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` deve revelar:\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"Código do _crate_ em `//third_party/rust/chromium_crates_io`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"Metadata (`BUILD.gn` e `README.chromium`) em `//third_party/rust/<crate>/\"\n\"<versão>`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"Por favor, adicione também um arquivo `OWNERS` no último local.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"Você deve depositar tudo isso, junto com suas alterações `Cargo.toml` e \"\n\"`gnrt_config.toml`, no repositório do Chromium.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**Importante**: você precisa usar `git add -f` porque, caso contrário, os \"\n\"arquivos `.gitignore` podem resultar na exclusão de alguns arquivos.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"Ao fazer isso, você pode descobrir que as verificações de pré-envio \"\n\"(_presubmit_) falham por causa de linguagem não inclusiva. Isso ocorre \"\n\"porque os dados do _crate_ Rust tendem a incluir nomes de _branches_ do git, \"\n\"e muitos projetos ainda usam terminologia não inclusiva lá. Então você pode \"\n\"precisar executar:\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"Como o OWNER de qualquer dependência de terceiros do Chromium, você é \"\n\"[responsável para mantê-lo atualizado com quaisquer correções de segurança]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#add-owners). Espera-se que em breve automatizaremos \"\n\"isso para _crates_ Rust, mas, por enquanto, ainda é sua responsabilidade, \"\n\"assim como para qualquer outra dependência de terceiros.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"Adicione [uwuify](https://crates.io/crates/uwuify) ao Chromium, desativando \"\n\"os [recursos padrão](https://doc.rust-lang.org/cargo/reference/features.\"\n\"html#the-default-feature) do _crate_. Suponha que o _crate_ será usado no \"\n\"release do Chromium, mas não será usado para lidar com entrada não confiável.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(No próximo exercício, usaremos uwuify do Chromium, mas sinta-se à vontade \"\n\"para pular e fazer isso agora, se desejar. Ou você pode criar um novo alvo \"\n\"[`rust_executable`](https://source.chromium.org/chromium/chromium/src/+/main:\"\n\"build/rust/rust_executable.gni) que usa `uwuify`).\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"Os alunos precisarão baixar várias dependências transitivas.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"Os _crates_ totais necessários são:\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"`instant`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec` e\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"Se os alunos estiverem baixando ainda mais do que isso, eles provavelmente \"\n\"esqueceram de desativar os recursos padrão.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"Obrigado a [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) por este \"\n\"_crate_!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"Juntando Tudo --- Exercício\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"Neste exercício, você vai adicionar um novo recurso completo do Chromium, \"\n\"juntando tudo o que você já aprendeu.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"O Resumo da Gerência de Produto\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"Uma comunidade de duendes foi descoberta vivendo em uma floresta tropical \"\n\"remota. É importante que entreguemos o Chromium para Duendes a eles o mais \"\n\"rápido possível.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"O requisito é traduzir todas as strings de IU do Chromium para o idioma dos \"\n\"Duendes.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"Não há tempo para esperar por traduções adequadas, mas, felizmente, o idioma \"\n\"dos duendes é muito próximo do inglês, e descobriu-se que há um _crate_ Rust \"\n\"que faz a tradução.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"Na verdade, você já [importou esse _crate_ no exercício anterior](https://\"\n\"crates.io/crates/uwuify).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"(Obviamente, as traduções reais do Chrome exigem cuidado e diligência \"\n\"incríveis. Não lance isso!)\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"Passos\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"Modifique `ResourceBundle::MaybeMangleLocalizedString` para que ele \"\n\"uwuifique todas as strings antes da exibição. Nesta compilação especial do \"\n\"Chromium, ele deve sempre fazer isso, independentemente da configuração de \"\n\"`mangle_localized_strings_`.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"Se você fez tudo certo em todos esses exercícios, parabéns, você deve ter \"\n\"criado o Chrome para duendes!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 vs UTF8. Os alunos devem estar cientes de que as strings Rust são \"\n\"sempre UTF8 e provavelmente decidirão que é melhor fazer a conversão no lado \"\n\"C++ usando `base::UTF16ToUTF8` e vice-versa.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"Se os alunos decidirem fazer a conversão no lado Rust, eles precisarão \"\n\"considerar [`String::from_utf16`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#method.from_utf16), considerar o tratamento de erros e \"\n\"considerar quais [tipos suportados pelo CXX podem transferir muitos u16s]\"\n\"(https://cxx.rs/binding/slice.html).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Os alunos podem projetar o limite C++/Rust de várias maneiras diferentes, \"\n\"por exemplo, pegando e retornando strings por valor ou pegando uma \"\n\"referência mutável a uma string. Se uma referência mutável for usada, o CXX \"\n\"provavelmente dirá ao aluno que ele precisa usar [`Pin`](https://doc.rust-\"\n\"lang.org/std/pin/). Você pode precisar explicar o que `Pin` faz e, em \"\n\"seguida, explicar por que o CXX precisa dele para referências mutáveis a \"\n\"dados C++: a resposta é que os dados C++ não podem ser movidos como dados \"\n\"Rust, porque eles podem conter ponteiros auto-referenciais.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"O alvo C++ contendo `ResourceBundle::MaybeMangleLocalizedString` precisará \"\n\"depender de um alvo `rust_static_library`. O aluno provavelmente já fez isso.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"O alvo `rust_static_library` precisará depender de `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"As soluções para os exercícios do Chromium podem ser encontradas nesta \"\n\"[série de CLs](https://chromium-review.googlesource.com/c/chromium/src/\"\n\"+/5096560).\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Bem-vindos ao Rust _Bare Metal_ 🦀\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Este é um curso independente de um dia sobre Rust _bare-metal_, destinado a \"\n\"pessoas que estão familiarizadas com o básico do Rust (talvez por completar \"\n\"o curso Comprehensive Rust), e idealmente também têm alguma experiência com \"\n\"programação _bare-metal_ em alguma outra linguagem como C.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Hoje falaremos sobre Rust _bare-metal_: executando código Rust sem um SO \"\n\"abaixo de nós. Isso será dividido em várias partes:\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"O que é Rust `no_std`?\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Escrevendo firmware para microcontroladores.\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\"Escrevendo código de bootloader / kernel para processadores de aplicativos.\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Alguns _crates_ úteis para o desenvolvimento de Rust _bare-metal_.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"Para a parte do microcontrolador do curso, usaremos o [BBC micro:bit]\"\n\"(https://microbit.org/) v2 como exemplo. É uma [placa de desenvolvimento]\"\n\"(https://tech.microbit.org/hardware/) baseada no microcontrolador Nordic \"\n\"nRF51822 com alguns LEDs e botões, um acelerômetro e uma bússola conectados \"\n\"por I2C e um depurador SWD embarcado.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Para começar, instale algumas ferramentas que precisaremos mais tarde. No \"\n\"gLinux ou Debian:\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"E dê aos usuários do grupo `plugdev` acesso ao programador micro:bit:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"No MacOS:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slices, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` e todas as funções relacionadas a ponteiros usuais\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` e `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` e o resto de `fs`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` e o resto de `io`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` e o resto de `thread`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` depende de RNG.\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` reexporta o conteúdo de `core` e `alloc`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Um programa `no_std` mínimo\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"Isso irá compilar em um binário vazio.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\"`std` fornece um manipulador de pânico; sem ele, devemos fornecer o nosso.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"Também pode ser fornecido por outro _crate_, como `panic-halt`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"Dependendo do destino, você pode precisar compilar com `panic = \\\"abort\\\"` \"\n\"para evitar um erro sobre `eh_personality`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"Observe que não há `main` ou qualquer outro ponto de entrada; cabe a você \"\n\"definir seu próprio ponto de entrada. Isso normalmente envolverá um script \"\n\"de _linker_ (ligação) e algum código assembly para deixar as coisas prontas \"\n\"para que o código Rust seja executado.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Para usar `alloc`, você deve implementar um [alocador global (heap)](https://\"\n\"doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `HEAP` é usado apenas aqui e `entry` é chamado apenas uma \"\n\"vez.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Dê ao alocador alguma memória para alocar.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Agora podemos fazer coisas que exigem alocação de heap.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\\\"Uma string\\\"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` é um _crate_ de terceiros que implementa um \"\n\"alocador básico de sistema de _buddy_. Outros _crates_ estão disponíveis, ou \"\n\"você pode escrever o seu próprio ou conectar-se ao seu alocador existente.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"O parâmetro const de `LockedHeap` é a ordem máxima do alocador; ou seja, \"\n\"neste caso, ele pode alocar regiões de até 2\\\\*\\\\*32 bytes.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"Se algum _crate_ na sua árvore de dependências depender de `alloc`, você \"\n\"deve ter exatamente um alocador global definido no seu binário. Normalmente, \"\n\"isso é feito no _crate_ binário de mais alto nível.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"`extern crate panic_halt as _` é necessário para garantir que o _crate_ \"\n\"`panic_halt` seja vinculado para que obtenhamos seu _panic handler_.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\"Este exemplo irá compilar, mas não executará, pois não possui um ponto de \"\n\"entrada.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"O _crate_ `cortex_m_rt` fornece (entre outras coisas) um _reset handler_ \"\n\"para microcontroladores Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"Em seguida, veremos como acessar periféricos, com níveis crescentes de \"\n\"abstração.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"A macro `cortex_m_rt::entry` requer que a função tenha o tipo `fn() -> !`, \"\n\"porque retornar para o _reset handler_ não faz sentido.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Execute o exemplo com `cargo embed --bin minimal`\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"A maioria dos microcontroladores acessa periféricos via E/S mapeado em \"\n\"memória. Vamos tentar ligar um LED no nosso micro:bit:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// Endereço do periférico da porta 0 GPIO\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// _Offsets_ do periférico GPIO\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// Campos PIN_CNF\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configure os pinos 21 e 28 do GPIO 0 como saídas _push-pull_.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Os ponteiros são para registradores de controle de periféricos \"\n\"válidos e\\n\"\n\"    // nenhum alias existe.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Configure o pino 28 baixo e o pino 21 alto para ligar o LED.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"O pino 21 do GPIO 0 está conectado à primeira coluna da matriz de LED e o \"\n\"pino 28 à primeira linha.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"Execute o exemplo com:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"_Crates_ de Acesso a Periféricos\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) gera _wrappers_ Rust \"\n\"normalmente seguros para periféricos mapeados em memória de [arquivos CMSIS-\"\n\"SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html).\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"Os arquivos SVD (System View Description) são arquivos XML normalmente \"\n\"providos por fornecedores de silício que descrevem o mapa de memória do \"\n\"dispositivo.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Eles são organizados por periférico, registrador, campo e valor, com nomes, \"\n\"descrições, endereços e assim por diante.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"Os arquivos SVD geralmente tem erros e são incompletos, portanto, existem \"\n\"vários projetos que corrigem os erros, adicionam detalhes ausentes e \"\n\"publicam os _crates_ gerados.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` fornece a tabela de vetores, entre outras coisas.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Se você `cargo install cargo-binutils`, poderá executar `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` para ver o binário resultante.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"_Crates_ HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"Os [_crates_ HAL (Hardware Abstraction Layer)](https://github.com/rust-\"\n\"embedded/awesome-embedded-rust#hal-implementation-crates) para muitos \"\n\"microcontroladores fornecem _wrappers_ para vários periféricos. Esses \"\n\"geralmente implementam _traits_ de [`embedded-hal`](https://crates.io/crates/\"\n\"embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Crie um _wrapper_ HAL para a porta 0 do GPIO.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low` e `set_high` são métodos do _trait_ `OutputPin` do `embedded_hal`.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Existem _crates_ HAL para vários dispositivos Cortex-M e RISC-V, incluindo \"\n\"vários microcontroladores STM32, GD32, nRF, NXP, MSP430, AVR e PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"_Crates_ de suporte a placas\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Os _crates_ de suporte a placas convenientemente fornecem um nível adicional \"\n\"de _wrapping_ para uma placa específica.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"Neste caso, o _crate_ de suporte à placa está apenas fornecendo nomes mais \"\n\"úteis e um pouco de inicialização.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"O _crate_ também pode incluir drivers para alguns dispositivos embarcados \"\n\"fora do próprio microcontrolador.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` inclui um driver simples para a matriz de LED.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"O padrão de estado de tipo\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Erro, movido.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Erro, movido.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"_Pins_ não implementam `Copy` ou `Clone`, portanto, apenas uma instância de \"\n\"cada um pode existir. Uma vez que um _pin_ é movido para fora da estrutura \"\n\"da porta, ninguém mais pode pegá-lo.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"Alterar a configuração de um _pin_ consome a instância antiga do _pin_, \"\n\"portanto, você não pode continuar usando a instância antiga depois.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"O tipo de um valor indica o estado em que ele está: por exemplo, neste caso, \"\n\"o estado de configuração de um _pin_ GPIO. Isso codifica a máquina de \"\n\"estados no sistema de tipos e garante que você não tente usar um _pin_ de \"\n\"uma certa maneira sem configurá-lo corretamente primeiro. Transições de \"\n\"estado ilegais são capturadas em tempo de compilação.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Você pode chamar `is_high` em um _pin_ de entrada e `set_high` em um _pin_ \"\n\"de saída, mas não o contrário.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"Muitos _crates_ HAL seguem esse padrão.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"O _crate_ [`embedded-hal`](https://crates.io/crates/embedded-hal) fornece \"\n\"vários _traits_ que cobrem periféricos comuns de microcontroladores.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"PWM\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"Temporizadores de atraso\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"Barramentos e dispositivos I2C e SPI\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\"Os _traits_ semelhantes para _streams_ de bytes (por exemplo, UARTs), barras \"\n\"CAN e RNGs e quebrados em [`embedded-io`](https://crates.io/crates/embedded-\"\n\"io), [`embedded-can`](https://crates.io/crates/embedded-can) e [`rand_core`]\"\n\"(https://crates.io/crates/rand_core), respectivamente.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"Outros _crates_ então implementam [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) em termos desses _traits_, por exemplo, \"\n\"um driver de acelerômetro pode precisar de uma implementação de barramento \"\n\"I2C ou SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\"Os _traits_ cobrem o uso dos periféricos, mas não a inicialização ou \"\n\"configuração deles, pois a inicialização e a configuração geralmente são \"\n\"altamente específicas para a plataforma.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Há implementações para vários microcontroladores, bem como outras \"\n\"plataformas como o Linux no Raspberry Pi.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"O _crate_ [`embedded-hal`](https://crates.io/crates/embedded-hal) fornece \"\n\"vários _traits_ que cobrem periféricos comuns de microcontroladores.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) fornece outra \"\n\"abordagem para E/S não bloqueante, baseada no _crate_ [`nb`](https://crates.\"\n\"io/crates/nb).\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) é um conjunto de ferramentas útil para \"\n\"depuração embarcada, como o OpenOCD, mas melhor integrado.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"SWD (Serial Wire Debug) e JTAG via CMSIS-DAP, sondas ST-Link e J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB _stub_ e servidor Microsoft DAP (Debug Adapter Protocol)\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Integração com o Cargo\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed` é um subcomando do cargo para compilar e gravar binários, \"\n\"registrar a saída do RTT (Real Time Transfers) e conectar o GDB. Ele é \"\n\"configurado por um arquivo `Embed.toml` no diretório do seu projeto.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) é um \"\n\"protocolo padrão da Arm sobre USB para um depurador em circuito acessar a \"\n\"porta de acesso de depuração CoreSight de vários processadores Arm Cortex. É \"\n\"o que o depurador embarcado no BBC micro:bit usa.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link é uma gama de depuradores em circuito da ST Microelectronics, J-Link \"\n\"é uma gama da SEGGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"A porta de acesso de depuração geralmente é uma interface JTAG de 5 pinos ou \"\n\"depuração Serial Wire de 2 pinos.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs é uma biblioteca que você pode integrar em suas próprias \"\n\"ferramentas se quiser.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"O [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) permite que o VSCode e outras IDEs depurem o código \"\n\"executado em qualquer microcontrolador suportado.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed é um binário construído usando a biblioteca probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) é um mecanismo para transferir dados entre o host \"\n\"de depuração e o destino através de um número de _ringbuffers_.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\"Em um terminal em `src/bare-metal/microcontrollers/examples/` (exemplos):\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"Em outro terminal no mesmo diretório:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"No gLinux ou Debian:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"No GDB, tente executar:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"Outros projetos\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Concorrência controlada por interrupção em tempo real\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"Gerenciamento de recursos compartilhados, passagem de mensagens, agendamento \"\n\"de tarefas, fila de temporizadores\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"Executores `async` com prioridades, temporizadores, rede, USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS focado em segurança com agendamento preemptivo e suporte a Unidade de \"\n\"Proteção de Memória\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"RTOS de microkernel da Oxide Computer Company com proteção de memória, \"\n\"drivers não privilegiados, IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Bindings para FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Algumas plataformas têm implementações `std`, por exemplo, [esp-idf](https://\"\n\"esp-rs.github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"O RTIC pode ser considerado um RTOS ou um framework de concorrência.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"Não inclui nenhum HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Ele usa o NVIC (Nested Virtual Interrupt Controller) Cortex-M para \"\n\"agendamento em vez de um kernel adequado.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"Apenas Cortex-M.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"O Google usa o TockOS no microcontrolador Haven para chaves de segurança \"\n\"Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"O FreeRTOS é escrito principalmente em C, mas existem _bindings_ Rust para \"\n\"escrever aplicativos.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Leremos a direção de uma bússola I2C e registraremos as leituras em uma \"\n\"porta serial.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Depois de ver os exercícios, você pode ver as [soluções](solutions-morning.\"\n\"md) fornecidas.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Leremos a direção de uma bússola I2C e registraremos as leituras em uma \"\n\"porta serial. Se você tiver tempo, tente exibi-lo nos LEDs de alguma forma \"\n\"também, ou use os botões de alguma forma.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"Dicas:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Verifique a documentação dos _crates_ [`lsm303agr`](https://docs.rs/\"\n\"lsm303agr/latest/lsm303agr/) e [`microbit-v2`](https://docs.rs/microbit-v2/\"\n\"latest/microbit/), bem como o [hardware micro:bit](https://tech.microbit.org/\"\n\"hardware/).\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\"A Unidade de Medição Inercial LSM303AGR está conectada ao barramento I2C \"\n\"interno.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI é outro nome para I2C, portanto, o periférico mestre I2C é chamado de \"\n\"TWIM.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"O driver LSM303AGR precisa de algo que implemente o _trait_ `embedded_hal::\"\n\"i2c::I2c`. O _struct_ [`microbit::hal::Twim`](https://docs.rs/microbit-v2/\"\n\"latest/microbit/hal/struct.Twim.html) implementa isso.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"Você tem um _struct_ [`microbit::Board`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/struct.Board.html) com campos para os vários pinos e periféricos.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"Você também pode olhar a [datasheet nRF52833](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) se quiser, mas não deve ser necessário para \"\n\"este exercício.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Baixe o [modelo de exercício](../../comprehensive-rust-exercises.zip) e \"\n\"procure os seguintes arquivos no diretório `compass`.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_ (você não deve precisar alterar isso):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_ (você não deve precisar alterar isso):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"_.cargo/config.toml_ (você não deve precisar alterar isso):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Veja a saída serial no Linux com:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"Ou no Mac OS algo como (o nome do dispositivo pode ser um pouco diferente):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Use `Ctrl+A Ctrl+Q` para sair do picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Exercício da manhã de Rust Bare Metal\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([voltar ao exercício](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configure a porta serial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Use o timer do sistema como provedor de atraso.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Configure o controlador I2C e a Unidade de Medição Inercial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Configurando IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Configure o display e o timer.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Pronto.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Leia os dados da bússola e registre-os na porta serial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// Se o botão A for pressionado, alterne para o próximo modo e pisque \"\n\"rapidamente todos os LEDs\\n\"\n\"        // ligado.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"Processadores de aplicações\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Até agora, falamos sobre microcontroladores, como a série Arm Cortex-M. \"\n\"Agora vamos tentar escrever algo para Cortex-A. Para simplificar, vamos \"\n\"trabalhar apenas com a placa ['virt'](https://qemu-project.gitlab.io/qemu/\"\n\"system/arm/virt.html) aarch64 do QEMU.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"Em termos gerais, os microcontroladores não possuem MMU ou vários níveis de \"\n\"privilégio (níveis de exceção em CPUs Arm, anéis em x86), enquanto os \"\n\"processadores de aplicações possuem.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"O QEMU suporta a emulação de vários modelos de máquinas ou placas diferentes \"\n\"para cada arquitetura. A placa 'virt' não corresponde a nenhum hardware real \"\n\"específico, mas é projetada exclusivamente para máquinas virtuais.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\"Antes de podermos começar a executar o código Rust, precisamos fazer alguma \"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Carregue e aplique a configuração de gerenciamento de memória, pronto \"\n\"para\\n\"\n\"     * habilitar MMU e caches.\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copie o intervalo de PA suportado para TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Garanta que tudo antes deste ponto tenha sido concluído, então \"\n\"invalida\\n\"\n\"     * quaisquer entradas locais de TLB potencialmente obsoletas antes que \"\n\"elas\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 para habilitar MMU e cache e não prossiga até \"\n\"isto\\n\"\n\"     * tenha sido concluído.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Desative a captura de acesso de ponto flutuante em EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zere a seção bss. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare a pilha. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Configure o vetor de exceção. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Chame o código Rust. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop infinito esperando por interrupções. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"Isso é o mesmo que seria para C: inicializando o estado do processador, \"\n\"zerando o BSS e configurando o ponteiro da pilha.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"O BSS (bloco de símbolo inicial, por razões históricas) é a parte do arquivo \"\n\"objeto que contém variáveis alocadas estaticamente que são inicializadas \"\n\"como zero. Eles são omitidos da imagem, para evitar desperdício de espaço em \"\n\"zeros. O compilador assume que o carregador cuidará de zerá-los.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"O BSS pode já estar zerado, dependendo de como a memória é inicializada e a \"\n\"imagem é carregada, mas o zeramos para ter certeza.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"É necessário habilitar a MMU e o cache antes de ler ou gravar qualquer \"\n\"memória. Se não fizermos isso:\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"Os acessos não alinhados falharão. Construímos o código Rust para o alvo \"\n\"`aarch64-unknown-none` que define `+strict-align` para evitar que o \"\n\"compilador gere acessos não alinhados, portanto, deve estar tudo bem neste \"\n\"caso, mas este não é necessariamente o caso em geral.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"Se estivesse sendo executado em uma VM, isso pode levar a problemas de \"\n\"coerência de cache. O problema é que a VM está acessando a memória \"\n\"diretamente com o cache desabilitado, enquanto o host tem aliases cacheáveis ​​\"\n\"para a mesma memória. Mesmo que o host não acesse explicitamente a memória, \"\n\"acessos especulativos podem levar a preenchimentos de cache e, em seguida, \"\n\"alterações de um ou de outro serão perdidas quando o cache for limpo ou a VM \"\n\"habilitar o cache. (O cache é indexado pelo endereço físico, não VA ou IPA.)\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"Para simplificar, usamos apenas uma tabela de páginas codificada (consulte \"\n\"`idmap.S`) que mapeia a identidade dos primeiros 1 GiB do espaço de \"\n\"endereços para dispositivos, os próximos 1 GiB para DRAM e mais 1 GiB mais \"\n\"acima para mais dispositivos. Isso corresponde ao layout de memória que o \"\n\"QEMU usa.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"Também configuramos o vetor de exceção (`vbar_el1`), que veremos mais tarde.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"Todos os exemplos desta tarde assumem que estaremos executando no nível de \"\n\"exceção 1 (EL1). Se você precisar executar em um nível de exceção diferente, \"\n\"você precisará modificar `entry.S` de acordo.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"Assembly inline\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"Às vezes, precisamos usar assembly para fazer coisas que não são possíveis \"\n\"com o código Rust. Por exemplo, para fazer uma chamada HVC (hypervisor call) \"\n\"para informar ao firmware para desligar o sistema:\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: isso só usa os registradores declarados e não faz\\n\"\n\"    // nada com a memória.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Se você realmente quiser fazer isso, use o _crate_ [`smccc`](https://crates.\"\n\"io/crates/smccc) que possui wrappers para todas essas funções.)\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI é a Interface de Coordenação de Estado de Energia Arm, um conjunto \"\n\"padrão de funções para gerenciar estados de energia do sistema e da CPU, \"\n\"entre outras coisas. É implementado pelo firmware EL3 e hipervisores em \"\n\"muitos sistemas.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"A sintaxe `0 => _` significa inicializar o registrador com 0 antes de \"\n\"executar o código de assembly inline e ignorar seu conteúdo posteriormente. \"\n\"É necessário usar `inout` em vez de `in` porque a chamada pode \"\n\"potencialmente destruir o conteúdo dos registradores.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Esta função `main` precisa ser `#[no_mangle]` e `extern \\\"C\\\"` porque é \"\n\"chamada de nosso ponto de entrada em `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` são os valores dos registradores `x0`–`x3`, que são \"\n\"convencionalmente usados ​​pelo carregador de inicialização para passar coisas \"\n\"como um ponteiro para a árvore de dispositivos. De acordo com a convenção de \"\n\"chamada aarch64 padrão (que é o que `extern \\\"C\\\"` especifica para usar), os \"\n\"registradores `x0`–`x7` são usados ​​para os primeiros 8 argumentos passados ​​\"\n\"para uma função, portanto, `entry.S` não precisa fazer nada especial, exceto \"\n\"garantir que não altere esses registradores.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Execute o exemplo no QEMU com `make qemu_psci` em `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Acesso volátil à memória para MMIO\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"Use `pointer::read_volatile` e `pointer::write_volatile`.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"Nunca segure uma referência.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!` permite obter campos de estruturas sem criar uma referência \"\n\"intermediária.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Acesso volátil: operações de leitura ou gravação podem ter efeitos \"\n\"colaterais, portanto, impedem que o compilador ou o hardware os reordenem, \"\n\"duplicem ou omitam.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"Normalmente, se você gravar e depois ler, por exemplo, por meio de uma \"\n\"referência mutável, o compilador pode assumir que o valor lido é o mesmo que \"\n\"o valor acabou de ser gravado e não se preocupar em ler a memória.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Algumas _crates_ existentes para acesso volátil ao hardware mantêm \"\n\"referências, mas isso é incorreto. Sempre que uma referência existir, o \"\n\"compilador poderá optar por desreferenciá-la.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"Use a macro `addr_of!` para obter ponteiros de campo de um struct de um \"\n\"ponteiro para o struct.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"Vamos escrever um driver UART\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"A máquina 'virt' do QEMU possui um UART [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g), então vamos escrever um driver para isso.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver mínimo para um UART PL011.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constrói uma nova instância do driver UART para um dispositivo PL011 no \"\n\"endereço\\n\"\n\"    /// base fornecido.\\n\"\n\"    ///\\n\"\n\"    /// # Segurança\\n\"\n\"    ///\\n\"\n\"    /// O endereço base fornecido deve apontar para os 8 registradores de \"\n\"controle MMIO de um\\n\"\n\"    /// dispositivo PL011, que deve ser mapeado no espaço de endereços do \"\n\"processo\\n\"\n\"    /// como memória de dispositivo e não ter nenhum outro alias.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Grava um único byte no UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Aguarde até que haja espaço no buffer TX.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: porque sabemos que o endereço base aponta para o controle\\n\"\n\"        // registradores de um dispositivo PL011 que está mapeado \"\n\"adequadamente.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Escreva no buffer TX.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Aguarde até que o UART não esteja mais ocupado.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Observe que `Uart::new` não é seguro, enquanto os outros métodos são \"\n\"seguros. Isso ocorre porque, desde que o chamador de `Uart::new` garanta que \"\n\"seus requisitos de segurança sejam atendidos (ou seja, que haja apenas uma \"\n\"instância do driver para um determinado UART e nada mais que faça alias do \"\n\"seu espaço de endereço), então é sempre seguro chamar `write_byte` mais \"\n\"tarde porque podemos assumir as precondições necessárias.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Poderíamos ter feito o contrário (tornando `new` seguro, mas `write_byte` \"\n\"inseguro), mas isso seria muito menos conveniente de usar, pois todos os \"\n\"lugares que chamam `write_byte` precisariam raciocinar sobre a segurança\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Este é um padrão comum para escrever invólucros seguros de código inseguro: \"\n\"transferir o ônus da prova de correção de um grande número de lugares para \"\n\"um número menor de lugares.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"Mais _traits_\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Derivamos o _trait_ `Debug`. Seria útil implementar alguns _traits_ a mais \"\n\"também.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `Uart` contém apenas um ponteiro para memória de dispositivo, \"\n\"que pode ser\\n\"\n\"// acessado de qualquer contexto.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"A implementação de `Write` nos permite usar os macros `write!` e `writeln!` \"\n\"com nosso tipo `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Execute o exemplo no QEMU com `make qemu_minimal` em `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"Um driver UART melhor\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"O PL011 na verdade tem [um monte de outros registradores](https://developer.\"\n\"arm.com/documentation/ddi0183/g/programmers-model/summary-of-registers), e \"\n\"adicionar deslocamentos para construir ponteiros para acessá-los é propenso \"\n\"a erros e difícil de ler. Além disso, alguns deles são campos de bits que \"\n\"seria bom acessar de forma estruturada.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"Deslocamento (_offset_)\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"Nome do registrador\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"Largura\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\"Também existem alguns registradores de ID que foram omitidos por brevidade.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"O _crate_ [`bitflags`](https://crates.io/crates/bitflags) é útil para \"\n\"trabalhar com _bitflags_.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// _Flags_ do registrador de _flags_ do UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Limpar para enviar.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Dados prontos para envio.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Dados detectados pelo receptor.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART ocupado transmitindo dados.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// O FIFO de recebimento está vazio.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// O FIFO de transmissão está cheio.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// O FIFO de recebimento está cheio.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// O FIFO de transmissão está vazio.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Indicador de anel.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"A macro `bitflags!` cria um _newtype_ algo como `Flags(u16)`, junto com um \"\n\"monte de implementações de método para obter e setar _flags_.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"Registradores múltiplos\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Podemos usar um struct para representar o layout de memória dos \"\n\"registradores do UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) diz ao compilador para dispor os campos do struct em ordem, \"\n\"seguindo as mesmas regras do C. Isso é necessário para que nosso struct \"\n\"tenha um layout previsível, pois a representação padrão do Rust permite que \"\n\"o compilador (entre outras coisas) reordene os campos como quiser.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"Agora vamos usar o novo struct `Registers` em nosso driver.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver para um UART PL011.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Sabemos que self.registers aponta para os registradores\\n\"\n\"        // de controle de um dispositivo PL011 que está mapeado \"\n\"adequadamente.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Lê e retorna um byte pendente ou `None` se nada foi\\n\"\n\"    /// recebido.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Sabemos que self.registers aponta para os registradores\\n\"\n\"        // de controle de um dispositivo PL011 que está mapeado \"\n\"adequadamente.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Verifique as condições de erro nos bits 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Observe o uso de `addr_of!` / `addr_of_mut!` para obter ponteiros para \"\n\"campos individuais sem criar uma referência intermediária, o que seria \"\n\"incorreto.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"Usando\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Vamos escrever um pequeno programa usando nosso driver para escrever no \"\n\"console serial e ecoar os bytes recebidos.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Endereço base do UART PL011 primário.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `PL011_BASE_ADDRESS` é o endereço base de um dispositivo \"\n\"PL011,\\n\"\n\"    // e mais nada acessa esse intervalo de endereços.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"Tchau!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Como no exemplo de [assembly inline](../inline-assembly.md), esta função \"\n\"`main` é chamada a partir do nosso código de ponto de entrada em `entry.S`. \"\n\"Veja os _speaker notes_ lá para mais detalhes.\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Execute o exemplo no QEMU com `make qemu` em `src/bare-metal/aps/examples`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Seria bom poder usar os macros de _logging_ do _crate_ [`log`](https://\"\n\"crates.io/crates/log). Podemos fazer isso implementando o _trait_ `Log`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Inicializa o _logger_ UART.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"O _unwrap_ em `log` é seguro porque inicializamos `LOGGER` antes de chamar \"\n\"`set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Precisamos inicializar o _logger_ antes de usá-lo.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Observe que nosso manipulador de pânico agora pode registrar detalhes de \"\n\"panes.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Execute o exemplo no QEMU com `make qemu_logger` em `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 define uma tabela de vetor de exceção com 16 entradas, para 4 tipos \"\n\"de exceções (síncronas, IRQ, FIQ, SError) de 4 estados (EL atual com SP0, EL \"\n\"atual com SPx, EL inferior usando AArch64, EL inferior usando AArch32). \"\n\"Implementamos isso em assembly para salvar os registradores voláteis na \"\n\"pilha antes de chamar o código Rust:\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\"EL é nível de exceção; todos os nossos exemplos esta tarde são executados em \"\n\"EL1.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"Para simplificar, não estamos distinguindo entre SP0 e SPx para as exceções \"\n\"do EL atual, ou entre AArch32 e AArch64 para as exceções do EL inferior.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"Neste exemplo, apenas registramos a exceção e desligamos, pois não esperamos \"\n\"que nenhuma delas realmente aconteça.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"Podemos pensar nos manipuladores de exceção e no nosso contexto de execução \"\n\"principal mais ou menos como em _threads_ diferentes. [`Send` e `Sync`]\"\n\"(../../concurrency/send-sync.md) controlarão o que podemos compartilhar \"\n\"entre eles, assim como com _threads_. Por exemplo, se quisermos compartilhar \"\n\"algum valor entre os manipuladores de exceção e o restante do programa, e \"\n\"ele for `Send` mas não `Sync`, então precisaremos envolvê-lo em algo como um \"\n\"`Mutex` e colocá-lo em um estático.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot sem o C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Suporta x86, aarch64 e RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"Depende do LinuxBoot em vez de ter muitos drivers próprios.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Tutorial do Rust RaspberryPi OS](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"Inicialização, driver UART, _bootloader_ simples, JTAG, níveis de exceção, \"\n\"tratamento de exceção, tabelas de páginas\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"Algumas coisas estranhas em torno da manutenção e inicialização de cache em \"\n\"Rust, não necessariamente um bom exemplo para copiar para código de produção.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Análise estática para determinar o uso máximo de pilha.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"O tutorial do RaspberryPi OS executa código Rust antes que a MMU e os caches \"\n\"sejam habilitados. Isso lerá e gravará memória (por exemplo, a pilha). No \"\n\"entanto:\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"Sem a MMU e o cache, acessos não alinhados falharão. Ele é construído com \"\n\"`aarch64-unknown-none` que define `+strict-align` para evitar que o \"\n\"compilador gere acessos não alinhados, portanto, deve estar tudo bem, mas \"\n\"isso não é necessariamente o caso em geral.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"Se estivesse sendo executado em uma VM, isso pode levar a problemas de \"\n\"coerência de cache. O problema é que a VM está acessando a memória \"\n\"diretamente com o cache desabilitado, enquanto o host tem _aliases_ \"\n\"cacheáveis para a mesma memória. Mesmo que o host não acesse explicitamente \"\n\"a memória, acessos especulativos podem levar a preenchimentos de cache e, em \"\n\"seguida, alterações de um ou de outro serão perdidas. Novamente, está tudo \"\n\"bem neste caso particular (executando diretamente no hardware sem \"\n\"hipervisor), mas não é um bom padrão em geral.\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Crates Úteis\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"Vamos ver algumas _crates_ que resolvem alguns problemas comuns na \"\n\"programação _bare-metal_.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"O _crate_ [`zerocopy`](https://docs.rs/zerocopy/) (do Fuchsia) fornece \"\n\"_traits_ e macros para converter com segurança entre sequências de bytes e \"\n\"outros tipos.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"Isso não é adequado para MMIO (pois não usa leituras e gravações voláteis), \"\n\"mas pode ser útil para trabalhar com estruturas compartilhadas com hardware, \"\n\"por exemplo, por DMA, ou enviadas por alguma interface externa.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` pode ser implementado para tipos para os quais qualquer padrão \"\n\"de byte é válido e, portanto, pode ser convertido com segurança de uma \"\n\"sequência de bytes não confiável.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Tentar derivar `FromBytes` para esses tipos falharia, porque `RequestType` \"\n\"não usa todos os valores u32 possíveis como discriminantes, portanto, nem \"\n\"todos os padrões de bytes são válidos.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` tem tipos para primitivas numéricas que levam em \"\n\"consideração a ordem dos bytes.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Execute o exemplo com `cargo run` em `src/bare-metal/useful-crates/zerocopy-\"\n\"example/`. (Não executará no Playground por causa da dependência do _crate_).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"O _crate_ [`aarch64-paging`](https://crates.io/crates/aarch64-paging) \"\n\"permite criar tabelas de páginas de acordo com a Arquitetura do Sistema de \"\n\"Memória Virtual AArch64.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Cria uma nova tabela de páginas com mapeamento de identidade.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"// Mapeia uma região de memória de 2 MiB como somente leitura.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Seta `TTBR0_EL1` para ativar a tabela de páginas.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Por enquanto, ele suporta apenas EL1, mas o suporte para outros níveis de \"\n\"exceção deve ser fácil de adicionar.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Isso é usado no Android para o [Firmware VM Protegido](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"Não há uma maneira fácil de executar este exemplo, pois ele precisa ser \"\n\"executado em hardware real ou no QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"é um _crate_ de terceiros que implementa um alocador básico de sistema \"\n\"buddy. Ele pode ser usado tanto para [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html) \"\n\"implementando [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) para que você possa usar o _crate_ padrão `alloc` (como \"\n\"vimos [antes](../alloc.md)), ou para alocar outro espaço de endereço. Por \"\n\"exemplo, podemos querer alocar espaço MMIO para os BARs PCI:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"Os BARs PCI sempre têm alinhamento igual ao seu tamanho.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Execute o exemplo com `cargo run` em `src/bare-metal/useful-crates/allocator-\"\n\"example/`. (Não executará no Playground por causa da dependência do _crate_).\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"Às vezes, você deseja algo que possa ser redimensionado como um `Vec`, mas \"\n\"sem alocação de heap. [`tinyvec`](https://crates.io/crates/tinyvec) fornecer \"\n\"isso: um vetor com suporte a um array ou _slice_, que pode ser alocado \"\n\"estaticamente ou na pilha, que mantém o controle de quantos elementos são \"\n\"usados e gera um _panic_ se você tentar usar mais do que está alocado.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` requer que o tipo de elemento implemente `Default` para \"\n\"inicialização.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"O Rust Playground inclui `tinyvec`, portanto, este exemplo será executado \"\n\"corretamente inline.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` e os outros primitivos de sincronização de `std::sync` \"\n\"não estão disponíveis em `core` ou `alloc`. Como podemos gerenciar a \"\n\"sincronização ou mutabilidade interna, como para compartilhar estado entre \"\n\"diferentes CPUs?\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"O _crate_ [`spin`](https://crates.io/crates/spin) fornece equivalentes \"\n\"baseados em _spinlock_ para muitos dessas primitivas.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"Tome cuidado para evitar _deadlock_ se você tomar _locks_ em manipuladores \"\n\"de interrupção.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` também possui uma implementação de _mutex_ de _ticket lock_; \"\n\"equivalentes de `RwLock`, `Barrier` e `Once` de `std::sync`; e `Lazy` para \"\n\"inicialização _lazy_ (\\\"preguiçosa\\\").\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"O _crate_ [`once_cell`](https://crates.io/crates/once_cell) também possui \"\n\"alguns tipos úteis para inicialização tardia com uma abordagem um pouco \"\n\"diferente de `spin::once::Once`.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"O Rust Playground inclui `spin`, portanto, este exemplo será executado \"\n\"corretamente inline.\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Para compilar um binário Rust _bare-metal_ no AOSP, você precisa usar uma \"\n\"regra Soong `rust_ffi_static` para compilar seu código Rust, depois um \"\n\"`cc_binary` com um _linker script_ para produzir o próprio binário e, \"\n\"finalmente, um `raw_binary` para converter o ELF em um binário bruto pronto \"\n\"para ser executado.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"Para VMs em execução sob crosvm em aarch64, a biblioteca [vmbase](https://\"\n\"android.googlesource.com/platform/packages/modules/Virtualization/+/refs/\"\n\"heads/master/vmbase/) fornece um _linker script_ e padrões úteis para as \"\n\"regras de compilação, juntamente com um ponto de entrada, _logging_ de \"\n\"console UART e muito mais.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"A macro `main!` marca sua função principal, para ser chamada a partir do \"\n\"ponto de entrada `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"O ponto de entrada `vmbase` lida com a inicialização do console e emite um \"\n\"PSCI_SYSTEM_OFF para desligar a VM se sua função principal retornar.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\"Vamos escrever um driver para o dispositivo de relógio em tempo real PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Depois de ver os exercícios, você pode ver as [soluções](solutions-afternoon.\"\n\"md) fornecidas.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"Driver RTC\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"A máquina QEMU aarch64 virt tem um relógio em tempo real [PL031](https://\"\n\"developer.arm.com/documentation/ddi0224/c) em 0x9010000. Para este \"\n\"exercício, você deve escrever um driver para ele.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"Use-o para imprimir a hora atual no console serial. Você pode usar o _crate_ \"\n\"[`chrono`](https://crates.io/crates/chrono) para formatação de data/hora.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"Use o registrador de comparação e o status de interrupção bruto para \"\n\"aguardar ocupado até um determinado horário, por exemplo, 3 segundos no \"\n\"futuro. (Chame [`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/\"\n\"fn.spin_loop.html) dentro do _loop_).\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"_Extensão se você tiver tempo:_ Ative e manipule a interrupção gerada pela \"\n\"correspondência RTC. Você pode usar o driver fornecido no _crate_ [`arm-gic`]\"\n\"(https://docs.rs/arm-gic/) para configurar o Controlador de Interrupção \"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"Use a interrupção RTC, que está conectada ao GIC como `IntId::spi(2)`.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"Depois que a interrupção for ativada, você poderá colocar o core para dormir \"\n\"via `arm_gic::wfi()`, o que fará com que o core durma até receber uma \"\n\"interrupção.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Baixe o [modelo de exercício](../../comprehensive-rust-exercises.zip) e \"\n\"procure os seguintes arquivos no diretório `rtc`.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"_src/exceptions.rs_ (você só precisará alterar isso para a 3ª parte do \"\n\"exercício):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/logger.rs_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_ (você não deverá precisar alterar isso):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Execute o código no QEMU com `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Bare Metal Rust Tarde\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([voltar ao exercício](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Endereços base do GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Endereço base do RTC PL031.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// O IRQ usado pelo RTC PL031.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `GICD_BASE_ADDRESS` e `GICR_BASE_ADDRESS` são os endereços\\n\"\n\"    // base de um distribuidor e redistribuidor GICv3, respectivamente, e \"\n\"mais\\n\"\n\"    // nada acessa esses intervalos de endereços.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `PL031_BASE_ADDRESS` é o endereço base de um dispositivo \"\n\"PL031,\\n\"\n\"    // e nada mais acessa esse intervalo de endereços.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Espere por 3 segundos, sem interrupções.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Esperando por {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Espera finalizada\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Espere mais 3 segundos por uma interrupção.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Registrador de dados\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Registrador de comparação\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Registrador de carga\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Registrador de controle\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Registrador de máscara de interrupção ou registrador de limpeza\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Status de interrupção bruto\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Status de interrupção mascarado\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Registrador de limpeza de interrupção\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Driver para um relógio de tempo real PL031.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constrói uma nova instância do driver RTC para um dispositivo PL031 no \"\n\"endereço\\n\"\n\"    /// base fornecido.\\n\"\n\"    ///\\n\"\n\"    /// # Segurança\\n\"\n\"    ///\\n\"\n\"    /// O endereço base fornecido deve apontar para os registradores de \"\n\"controle MMIO de um\\n\"\n\"    /// dispositivo PL031, que deve ser mapeado no espaço de endereços do \"\n\"processo\\n\"\n\"    /// como memória de dispositivo e não ter nenhum outro alias.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Lê o valor atual do RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: Sabemos que self.registers aponta para os registradores de \"\n\"controle\\n\"\n\"        // de um dispositivo PL031 que está mapeado adequadamente.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Escreve um valor de comparação. Quando o valor do RTC corresponde a \"\n\"este, então uma interrupção\\n\"\n\"    /// será gerada (se estiver habilitada).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Retorna se o registrador de comparação corresponde ao valor do RTC, \"\n\"habilitada ou não\\n\"\n\"    /// a interrupção.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Retorna se há uma interrupção pendente no momento.\\n\"\n\"    ///\\n\"\n\"    /// Isso deve ser verdadeiro se e somente se `matched` retornar \"\n\"verdadeiro e a\\n\"\n\"    /// interrupção está mascarada.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Define ou limpa a máscara de interrupção.\\n\"\n\"    ///\\n\"\n\"    /// Quando a máscara é verdadeira, a interrupção é habilitada; quando é \"\n\"falsa\\n\"\n\"    /// a interrupção é desabilitada.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Limpa uma interrupção pendente, se houver.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// SEGURANÇA: `Rtc` contém apenas um ponteiro para memória de dispositivo, \"\n\"que pode ser\\n\"\n\"// acessado de qualquer contexto.\\n\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Bem-vindos à Concorrência em Rust\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust tem suporte completo para concorrência usando _threads_ do SO com \"\n\"_mutexes_ e _channels_ (canais).\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"O sistema de tipos do Rust desempenha um papel importante, convertendo \"\n\"muitos erros de concorrência em erros em tempo de compilação. Isso \"\n\"geralmente é chamado de _concorrência sem medo_, pois você pode confiar no \"\n\"compilador para garantir a exatidão em tempo de execução.\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Threads](./concurrency/threads.md) (30 minutes)\"\nmsgstr \"[_Threads_](./concurrency/threads.md) (30 minutos)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Channels](./concurrency/channels.md) (20 minutes)\"\nmsgstr \"[Canais](./concurrency/channels.md) (20 minutos)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Send and Sync](./concurrency/send-sync.md) (15 minutes)\"\nmsgstr \"[Send e Sync](./concurrency/send-sync.md) (15 minutos)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Shared State](./concurrency/shared-state.md) (30 minutes)\"\nmsgstr \"[Estado Compartilhado](./concurrency/shared-state.md) (30 minutos)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Exercises](./concurrency/sync-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Exercícios](./concurrency/sync-exercises.md) (1 hora e 10 minutos)\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluindo pausas de 10 minutos, esta sessão deve levar cerca de 3 horas e 20 \"\n\"minutos\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\"Rust nos permite acessar o conjunto de ferramentas de concorrência do SO: \"\n\"_threads_, primitivas de sincronização, etc.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\"O sistema de tipos nos dá segurança para concorrência sem nenhum recurso \"\n\"especial.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\"As mesmas ferramentas que ajudam com acesso \\\"concorrente\\\" em uma única \"\n\"_thread_ (por exemplo, uma função chamada que pode mutar um argumento ou \"\n\"salvar referências a ele para ler mais tarde) nos poupam de problemas de \"\n\"multi-threading.\"\n\n#: src/concurrency/threads.md\nmsgid \"[Plain Threads](./concurrency/threads/plain.md) (15 minutes)\"\nmsgstr \"[_Threads_ Simples](./concurrency/threads/plain.md) (15 minutos)\"\n\n#: src/concurrency/threads.md\nmsgid \"[Scoped Threads](./concurrency/threads/scoped.md) (15 minutes)\"\nmsgstr \"[_Threads_ Escopadas](./concurrency/threads/scoped.md) (15 minutos)\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes\"\nmsgstr \"Este segmento deve levar cerca de 30 minutos\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\"_Threads_ em Rust funcionam de maneira semelhante às _threads_ em outras \"\n\"linguagens:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Contagem na _thread_: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"_Thread_ principal: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\"_Threads_ são todas \\\"_daemon threads_\\\", a _thread_ principal não espera \"\n\"por elas.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\\\"_Panics_\\\" em _threads_ são independentes uns dos outros.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"\\\"_Panics_\\\" podem carregar um _payload_ (carga útil), que pode ser \"\n\"descompactado com `downcast_ref`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"As APIs de _threads_ do Rust não parecem muito diferentes das de C++.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"Execute o exemplo.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\"O tempo de 5ms é suficientemente folgado para que a _thread_ principal e as \"\n\"_threads_ filhas permaneçam principalmente em sincronia.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"Observe que o programa termina antes que a _thread_ filha alcance 10!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\"Isso ocorre porque o _main_ termina o programa e as _threads_ filhas não o \"\n\"mantêm.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"Compare com pthreads/C++ std::thread/boost::thread se desejar.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"Como esperamos a _thread_ filha terminar?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"retorna um `JoinHandle`. Veja a documentação.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\"`JoinHandle` tem um método [`.join()`](https://doc.rust-lang.org/std/thread/\"\n\"struct.JoinHandle.html#method.join) bloqueante.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"Use `let handle = thread::spawn(...)` e depois `handle.join()` para esperar \"\n\"que a _thread_ termine e fazer o programa contar até 10.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"Agora, e se quisermos retornar um valor?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"Olhe a documentação novamente:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"O encerramento de [`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.\"\n\"spawn.html) retorna `T`\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) retorna `thread::Result<T>`\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"Use o valor de retorno `Result` de `handle.join()` para obter acesso ao \"\n\"valor retornado.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"Ok, e quanto ao outro caso?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"Dispare um _panic_ na _thread_. Observe como isso não afeta `main`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Acessa o _payload_ do _panic_. Este é um bom momento para falar sobre [`Any`]\"\n\"(https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\"Agora podemos retornar valores de _threads_! E quanto a receber entradas?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"Capture algo por referência no encerramento da _thread_.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"Uma mensagem de erro indica que devemos movê-lo.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"Mova-o, veja que podemos calcular e depois retornar um valor derivado.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"E se quisermos emprestar?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\"O _main_ mata as _threads_ filhas quando retorna, mas outra função apenas \"\n\"retornaria e as deixaria em execução.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\"Isso seria acesso após retorno da pilha, o que viola a segurança de memória!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"Como evitamos isso? Veja o próximo slide.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"_Threads_ normais não podem emprestar de seu ambiente:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"No entanto, você pode usar uma [_thread_ com escopo](https://doc.rust-lang.\"\n\"org/std/thread/fn.scope.html) para isso:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"A razão para isso é que, quando a função `thread::scope` for concluída, \"\n\"todas as _threads_ serão unidas, para que possam retornar dados emprestados.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"As regras normais de empréstimo do Rust se aplicam: você pode emprestar \"\n\"mutavelmente por uma _thread_, ou imutavelmente por qualquer número de \"\n\"_threads_.\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"[Senders and Receivers](./concurrency/channels/senders-receivers.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Transmissores e Receptores](./concurrency/channels/senders-receivers.md) \"\n\"(10 minutos)\"\n\n#: src/concurrency/channels.md\nmsgid \"[Unbounded Channels](./concurrency/channels/unbounded.md) (2 minutes)\"\nmsgstr \"[Canais Ilimitados](./concurrency/channels/unbounded.md) (2 minutos)\"\n\n#: src/concurrency/channels.md\nmsgid \"[Bounded Channels](./concurrency/channels/bounded.md) (10 minutes)\"\nmsgstr \"[Canais Limitados](./concurrency/channels/bounded.md) (10 minutos)\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"Este segmento deve levar cerca de 20 minutos\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Os _channels_ (canais) em Rust têm duas partes: um `Sender<T>` e um \"\n\"`Receiver<T>`. As duas partes estão conectadas através do _channel_, mas \"\n\"você só vê os _end-points_.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Recebido: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` significa Multi-Produtor, Único-Consumidor. `Sender` e `SyncSender` \"\n\"implementam `Clone` (então você pode criar vários produtores), mas \"\n\"`Receiver` (consumidores) não.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` e `recv()` retornam `Result`. Se retornarem `Err`, significa que a \"\n\"contraparte `Sender` ou `Receiver` é descartada e o canal é fechado.\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Você obtém um canal ilimitado e assíncrono com `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Mensagem {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: Mensagem {i} enviada\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: terminado\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: obteve {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\"Com canais limitados e síncronos, `send` pode bloquear a _thread_ atual:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"Chamar `send` bloqueará a _thread_ atual até que haja espaço no canal para a \"\n\"nova mensagem. A _thread_ pode ser bloqueada indefinidamente se não houver \"\n\"ninguém que leia do canal.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"Uma chamada para `send` será abortada com um erro (é por isso que retorna \"\n\"`Result`) se o canal estiver fechado. Um canal é fechado quando o receptor é \"\n\"descartado.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\"Um canal limitado com um tamanho de zero é chamado de \\\"canal de encontro\\\". \"\n\"Cada envio bloqueará a _thread_ atual até que outra _thread_ chame `recv`.\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Marker Traits](./concurrency/send-sync/marker-traits.md) (2 minutes)\"\nmsgstr \"\"\n\"[_Traits_ Marcadores](./concurrency/send-sync/marker-traits.md) (2 minutos)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Send](./concurrency/send-sync/send.md) (2 minutes)\"\nmsgstr \"[Send](./concurrency/send-sync/send.md) (2 minutos)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Sync](./concurrency/send-sync/sync.md) (2 minutes)\"\nmsgstr \"[Sync](./concurrency/send-sync/sync.md) (2 minutos)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Examples](./concurrency/send-sync/examples.md) (10 minutes)\"\nmsgstr \"[Exemplos](./concurrency/send-sync/examples.md) (10 minutos)\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Como o Rust sabe proibir o acesso compartilhado entre threads? A resposta \"\n\"está em dois _traits_:\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): um tipo `T` \"\n\"é `Send` se for seguro mover um `T` entre _threads_\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): um tipo `T` \"\n\"é `Sync` se for seguro mover um `&T` entre _threads_\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"`Send` e `Sync` são [_unsafe traits_](../unsafe/unsafe-traits.md). O \"\n\"compilador os derivará automaticamente para seus tipos desde que contenham \"\n\"apenas os tipos `Send` e `Sync`. Você também pode implementá-los manualmente \"\n\"quando souber que são válidos.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Pode-se pensar nesses _traits_ como marcadores de que o tipo possui certas \"\n\"propriedades de segurança de _threads_.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"Eles podem ser usados nas restrições genéricas como _traits_ normais.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Um tipo `T` é [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"se for seguro mover um valor `T` para outro _thread_.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"O efeito de mover a propriedade (ownership) para outro _thread_ é que os \"\n\"_destructors_ serão executados nessa _thread_. Então a questão é: quando \"\n\"você pode alocar um valor em um _thread_ e desalocá-lo em outro?\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"Como exemplo, uma conexão com a biblioteca SQLite só pode ser acessada de um \"\n\"único _thread_.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Um tipo `T` é [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"se for seguro acessar um valor `T` de várias threads ao mesmo tempo.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Mais precisamente, a definição é:\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` é `Sync` se e somente se `&T` é `Send`\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Essa instrução é essencialmente uma maneira abreviada de dizer que, se um \"\n\"tipo é _thread-safe_ para uso compartilhado, também é _thread-safe_ passar \"\n\"referências a ele entre _threads_.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Isso ocorre porque, se um tipo for `Sync`, significa que ele pode ser \"\n\"compartilhado entre vários _threads_ sem o risco de corridas de dados ou \"\n\"outros problemas de sincronização, portanto, é seguro movê-lo para outro \"\n\"_thread_. Uma referência ao tipo também é segura para mover para outro \"\n\"_thread_, porque os dados a que ela faz referência podem ser acessados de \"\n\"qualquer _thread_ com segurança.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"A maioria dos tipos que você encontra são `Send + Sync`:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\"`Arc<T>`: Explicitamente _thread-safe_ via contagem de referência atômica.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`: Explicitamente _thread-safe_ via bloqueio interno.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`: As of 1.72.0.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"`AtomicBool`, `AtomicU8`, ...: Usa instruções atômicas especiais.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Os tipos genéricos são tipicamente `Send + Sync` quando os parâmetros de \"\n\"tipo são `Send + Sync`.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Esses tipos podem ser movidos para outras _threads_, mas não são seguros \"\n\"para _threads_. Normalmente por causa da mutabilidade interior:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Esses tipos são _thread-safe_, mas não podem ser movidos para outro _thread_:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`: Usa primitivas a nível de sistema operacional que devem ser \"\n\"desalocadas no _thread_ que as criou.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Esses tipos não são _thread-safe_ e não podem ser movidos para outros \"\n\"_threads_:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: cada `Rc<T>` tem uma referência a um `RcBox<T>`, que contém uma \"\n\"contagem de referência não atômica.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust assume que ponteiros brutos podem ter \"\n\"considerações de especiais de concorrência.\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Arc](./concurrency/shared-state/arc.md) (5 minutes)\"\nmsgstr \"[Arc](./concurrency/shared-state/arc.md) (5 minutos)\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Mutex](./concurrency/shared-state/mutex.md) (15 minutes)\"\nmsgstr \"[Mutex](./concurrency/shared-state/mutex.md) (15 minutos)\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Example](./concurrency/shared-state/example.md) (10 minutes)\"\nmsgstr \"[Exemplo](./concurrency/shared-state/example.md) (10 minutos)\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) permite \"\n\"acesso somente-leitura compartilhado por meio de `Arc::clone`:\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` significa \\\"Atomic Reference Counted\\\", uma versão _thread-safe_ de \"\n\"`Rc` que usa operações atômicas.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementa `Clone` quer `T` o faça ou não. Ele implementa `Send` e \"\n\"`Sync` se e somente se `T` implementa os dois.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` tem o custo das operações atômicas que são executadas, mas \"\n\"depois disso o uso do `T` é gratuito.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Cuidado com os ciclos de referência, `Arc` não usa um coletor de lixo para \"\n\"detectá-los.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` pode ajudar.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) garante \"\n\"exclusão mútua _e_ permite acesso mutável a `T` por trás de uma interface \"\n\"somente de leitura (outra forma de [mutabilidade interna](../../borrowing/\"\n\"interior-mutability)):\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Observe como temos uma implementação [`impl<T: Send> Sync for Mutex<T>`]\"\n\"(https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-for-\"\n\"Mutex%3CT%3E) encoberta.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` em Rust é semelhante a uma coleção com apenas um elemento --- os \"\n\"dados protegidos.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Não é possível esquecer de adquirir o mutex antes de acessar os dados \"\n\"protegidos.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Você pode obter um `&mut T` de um `&Mutex<T>` obtendo um  _lock_. O \"\n\"`MutexGuard` garante que o `&mut T` não sobrevive além do _lock_ obtido.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implementa ambos `Send` e `Sync` sse (se e somente se) `T` \"\n\"implementa `Send`.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Um _lock_ para leitura e gravação: `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Por que `lock()` retorna um `Result`?\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Se o thread que manteve o `Mutex` entrou em pânico, o `Mutex` torna-se \"\n\"\\\"envenenado\\\" para sinalizar que os dados protegidos podem estar em um \"\n\"estado inconsistente. Chamar `lock()` em um mutex envenenado falha com um \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"Você pode chamar `into_inner()` no erro para recuperar os dados de qualquer \"\n\"maneira.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Vamos ver `Arc` e `Mutex` em ação:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"Solução possível:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"Partes notáveis:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` é agrupado em ambos `Arc` e `Mutex`, porque seus interesses são \"\n\"ortogonais.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Envolver um `Mutex` em um `Arc` é um padrão comum para compartilhar estado \"\n\"mutável entre threads.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` precisa ser clonado como `v2` antes que possa ser movido para \"\n\"outra _thread_. Note que `move` foi adicionado à assinatura lambda.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Os blocos são introduzidos para restringir o escopo do `LockGuard` tanto \"\n\"quanto possível.\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Jantar dos Filósofos](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minutos)\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Multi-threaded Link Checker](./concurrency/sync-exercises/link-checker.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Verificador de Links Multi-Threaded](./concurrency/sync-exercises/link-\"\n\"checker.md) (20 minutos)\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"[Solutions](./concurrency/sync-exercises/solutions.md) (30 minutes)\"\nmsgstr \"[Soluções](./concurrency/sync-exercises/solutions.md) (30 minutos)\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"O problema do jantar dos filósofos é um problema clássico em concorrência:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Cinco filósofos jantam juntos na mesma mesa. Cada folósofo tem seu próprio \"\n\"lugar à mesa. Há um garfo entre cada prato. O prato servido é uma espécie de \"\n\"espaguete que se come com dois garfos. Cada filósofo pode somente pensar ou \"\n\"comer, alternadamente. Além disso, um filósofo só pode comer seu espaguete \"\n\"quando ele têm garfo esquerdo e direito. Assim, dois garfos só estarão \"\n\"disponíveis quando seus dois vizinhos mais próximos estiverem pensando, não \"\n\"comendo. Depois de um filósofo individual termina de comer, ele abaixa os \"\n\"dois garfos.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Você precisará de uma [instalação local do Cargo](../../cargo/running-\"\n\"locally.md) para esse exercício. Copie o código abaixo para um arquivo \"\n\"chamado `src/main.rs`, preencha os espaços em branco e teste se `cargo run` \"\n\"não entra em _deadlock_:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Eureka! {} tem uma nova ideia!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Peguem os garfos...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} está comendo...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Sócrates\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hipátia\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Platão\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristóteles\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pitágoras\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Criem os garfos\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Criem os filósofos\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// Façam cada um deles pensar e comer 100 vezes\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Imprimam seus pensamentos\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Você pode usar o seguinte `Cargo.toml`\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Vamos usar nosso novo conhecimento para criar um verificador de links _multi-\"\n\"threads_.  Comece em uma página da web e verifique se os links na página são \"\n\"válidos.  Verifique recursivamente outras páginas no mesmo domínio e \"\n\"continue fazendo isso até que todas as páginas tenham sido validadas.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\"Para isso, você precisará de um cliente HTTP como [`reqwest`](https://docs.\"\n\"rs/reqwest/). Você também precisará de uma maneira de encontrar links, \"\n\"podemos usar [`scraper`](https://docs.rs/scraper/). Por fim, precisaremos de \"\n\"alguma maneira de lidar com erros, usaremos [`thiserror`](https://docs.rs/\"\n\"thiserror/).\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"Crie um novo projeto Cargo e adicione `reqwest` como uma dependência com:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Se `cargo add` falhar com `error: no such subcommand`, edite o arquivo \"\n\"`Cargo.toml` à mão. Adicione as dependências listadas abaixo.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"As chamadas `cargo add` irão atualizar o arquivo `Cargo.toml` para ficar \"\n\"assim:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Agora você pode baixar a página inicial. Tente com um pequeno site como \"\n\"`https://www.google.org/`.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Seu arquivo `src/main.rs` deve se parecer com isto:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"request error: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Verificando {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"Em {base_url:#}: ignorado não analisável {href:?}: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Links: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Não foi possível extrair links: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Execute o código em `src/main.rs` com\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Use _threads_ para verificar os links em paralelo: envie as URLs a serem \"\n\"verificadas para um _channel_ e deixe alguns _threads_ verificarem as URLs \"\n\"em paralelo.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Estenda isso para extrair recursivamente links de todas as páginas no \"\n\"domínio `www.google.org`. Coloque um limite máximo de 100 páginas ou menos \"\n\"para que você não acabe sendo bloqueado pelo site.\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} está tentando comer\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// Para evitar um _deadlock_, temos que quebrar a simetria\\n\"\n\"        // em algum lugar. Isso trocará os garfos sem desinicializar\\n\"\n\"        // nenhum deles.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"Verificador de Links\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\"/// Determine se os links dentro da página fornecida devem ser extraídos.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Marque a página fornecida como visitada, retornando falso se ela já\\n\"\n\"    /// tiver sido visitada.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// O remetente foi descartado. Não há mais comandos chegando.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Erro de crawling: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"URLs ruins: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"\\\"_Async_\\\" é um modelo de concorrência onde várias tarefas são executadas \"\n\"concorrentemente, executando cada tarefa até que ela bloqueie, e então \"\n\"mudando para outra tarefa que está pronta para fazer progresso. O modelo \"\n\"permite executar um número maior de tarefas em um número limitado de \"\n\"threads. Isso ocorre porque o custo por tarefa é tipicamente muito baixo e \"\n\"os sistemas operacionais fornecem primitivas para identificar eficientemente \"\n\"I/O que é capaz de prosseguir.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"A operação assíncrona do Rust é baseada em \\\"futures\\\", que representam \"\n\"trabalho que pode ser concluído no futuro. As _futures_ são \\\"polled\\\" até \"\n\"que elas sinalizem que estão completas.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"As _futures_ são _polled_ por um _runtime_ assíncrono, e vários _runtimes_ \"\n\"diferentes estão disponíveis.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"O Python tem um modelo semelhante em seu `asyncio`. No entanto, seu tipo \"\n\"`Future` é baseado em _callback_, e não _polled_. Programas _async_ em \"\n\"Python requerem um \\\"loop\\\", semelhante a um _runtime_ em Rust.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"O `Promise` do JavaScript é semelhante, mas novamente baseado em _callback_. \"\n\"O _runtime_ da linguagem implementa o _event loop_, então muitos dos \"\n\"detalhes da resolução de _Promise_ são ocultos.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Async Basics](./concurrency/async.md) (30 minutes)\"\nmsgstr \"[Fundamentos de _Async_](./concurrency/async.md) (30 minutos)\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"[Channels and Control Flow](./concurrency/async-control-flow.md) (20 minutes)\"\nmsgstr \"\"\n\"[Canais e Fluxo de Controle](./concurrency/async-control-flow.md) (20 \"\n\"minutos)\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Pitfalls](./concurrency/async-pitfalls.md) (55 minutes)\"\nmsgstr \"[Armadilhas](./concurrency/async-pitfalls.md) (55 minutos)\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Exercises](./concurrency/async-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Exercícios](./concurrency/async-exercises.md) (1 hora e 10 minutos)\"\n\n#: src/concurrency/async.md\nmsgid \"[async/await](./concurrency/async/async-await.md) (10 minutes)\"\nmsgstr \"[async/await](./concurrency/async/async-await.md) (10 minutos)\"\n\n#: src/concurrency/async.md\nmsgid \"[Futures](./concurrency/async/futures.md) (4 minutes)\"\nmsgstr \"[Futures](./concurrency/async/futures.md) (4 minutos)\"\n\n#: src/concurrency/async.md\nmsgid \"[Runtimes](./concurrency/async/runtimes.md) (10 minutes)\"\nmsgstr \"[Runtimes](./concurrency/async/runtimes.md) (10 minutos)\"\n\n#: src/concurrency/async.md\nmsgid \"[Tasks](./concurrency/async/tasks.md) (10 minutes)\"\nmsgstr \"[Tarefas](./concurrency/async/tasks.md) (10 minutos)\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"De maneira geral, o código _async_ do Rust se parece muito com o código \"\n\"sequencial \\\"normal\\\":\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Contador é: {i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"Observe que este é um exemplo simplificado para mostrar a sintaxe. Não há \"\n\"operação de longa duração ou qualquer concorrência real nele!\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"Qual é o tipo de retorno de uma chamada _async_?\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"Use `let future: () = async_main(10);` em `main` para ver o tipo.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"A palavra-chave \\\"async\\\" é açúcar sintático. O compilador substitui o tipo \"\n\"de retorno por uma _future_.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"Você não pode tornar `main` _async_, sem instruções adicionais para o \"\n\"compilador sobre como usar a _future_ retornada.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"Você precisa de um executor para executar código _async_. `block_on` \"\n\"bloqueia o thread atual até que a _future_ fornecida tenha sido executada \"\n\"até a conclusão.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` espera assincronamente pela conclusão de outra operação. Ao \"\n\"contrário de `block_on`, `.await` não bloqueia o thread atual.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"`.await` só pode ser usado dentro de uma função `async` (ou bloco; estes são \"\n\"introduzidos mais tarde).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) é um \"\n\"traço, implementado por objetos que representam uma operação que pode ainda \"\n\"não estar completa. Uma _future_ pode ser _polled_, e `poll` retorna um \"\n\"[`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"Uma função _async_ retorna um `impl Future`. Também é possível (mas pouco \"\n\"comum) implementar `Future` para seus próprios tipos. Por exemplo, o \"\n\"`JoinHandle` retornado de `tokio::spawn` implementa `Future` para permitir \"\n\"juntar-se a ele.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"A palavra-chave `.await`, aplicada a uma _Future_, faz com que a função \"\n\"assíncrona atual pause até que essa _Future_ esteja pronta, e então avalia \"\n\"para sua saída.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"Os tipos `Future` e `Poll` são implementados exatamente como mostrado; \"\n\"clique nos links para mostrar as implementações na documentação.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"Não chegaremos a `Pin` e `Context`, pois nos concentraremos em escrever \"\n\"código _async_, em vez de construir novas primitivas _async_. Brevemente:\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"`Context` permite que uma _Future_ agende-se para ser _polled_ novamente \"\n\"quando um evento ocorre.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` garante que a _Future_ não seja movida na memória, para que os \"\n\"ponteiros para essa _future_ permaneçam válidos. Isso é necessário para \"\n\"permitir que as referências permaneçam válidas após um `.await`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"Um _runtime_ fornece suporte para realizar operações de forma assíncrona (um \"\n\"_reator_) e é responsável por executar _futures_ (um _executor_). Rust não \"\n\"tem um _runtime_ \\\"integrado\\\", mas várias opções estão disponíveis:\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/): performante, com um ecossistema bem desenvolvido \"\n\"de funcionalidades como [Hyper](https://hyper.rs/) para HTTP ou [Tonic]\"\n\"(https://github.com/hyperium/tonic) para gRPC.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/): tem como objetivo ser um \\\"std para \"\n\"_async_\\\", e inclui um _runtime_ básico em `async::task`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/): simples e leve\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"Várias aplicações maiores têm seus próprios _runtimes_. Por exemplo, \"\n\"[Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/\"\n\"fuchsia-async/src/lib.rs) já tem um.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"Observe que, dos _runtimes_ listados, apenas Tokio é suportado no _Rust \"\n\"playground_. O _playground_ também não permite nenhum I/O, então a maioria \"\n\"das coisas _async_ interessantes não pode ser executada no _playground_.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"As _futures_ são \\\"inertes\\\" no sentido de que elas não fazem nada (nem \"\n\"mesmo iniciam uma operação de I/O) a menos que haja um _executor_ _polling_. \"\n\"Isso difere das _Promises_ do JS, por exemplo, que serão executadas até o \"\n\"final mesmo que nunca sejam usadas.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio fornece:\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"Um _runtime multi-threaded_ para executar código assíncrono.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"Uma versão assíncrona da biblioteca padrão.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"Um grande ecossistema de bibliotecas.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Contador na tarefa: {i}!\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Tarefa principal: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"Com a macro `tokio::main` agora podemos tornar `main` _async_.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"A função `spawn` cria uma nova \\\"tarefa\\\" concorrente.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"Nota: `spawn` recebe uma `Future`, você não chama `.await` em `count_to`.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**Exploração adicional:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"Por que `count_to` (geralmente) não chega a 10? Este é um exemplo de \"\n\"cancelamento _async_. `tokio::spawn` retorna um _handle_ que pode ser \"\n\"aguardado para esperar que ele termine.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"Tente `count_to(10).await` em vez de _spawn_.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"Tente aguardar a tarefa retornada de `tokio::spawn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust tem um sistema de tarefas, que é uma forma de _threading_ leve.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"Uma tarefa tem uma única _future_ de nível superior que o _executor_ _polls_ \"\n\"para fazer progresso. Essa _future_ pode ter uma ou mais _futures_ aninhadas \"\n\"que seu método `poll` _polls_, correspondendo vagamente a uma pilha de \"\n\"chamadas. A concorrência dentro de uma tarefa é possível _polling_ várias \"\n\"_futures_ filhas, como correr um temporizador e uma operação de I/O.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"escutando na porta {}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"conexão de {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Quem é você?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"erro de _socket_\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Obrigado por ligar, {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"Copie este exemplo para o seu `src/main.rs` preparado e execute-o a partir \"\n\"daí.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"Tente se conectar a ele com uma ferramenta de conexão TCP como [nc](https://\"\n\"www.unix.com/man-page/linux/1/nc/) ou [telnet](https://www.unix.com/man-page/\"\n\"linux/1/telnet/).\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"Pergunte aos alunos para visualizar qual seria o estado do servidor de \"\n\"exemplo com alguns clientes conectados. Quais tarefas existem? Quais são \"\n\"suas _futures_?\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"Esta é a primeira vez que vemos um bloco `async`. Isso é semelhante a um \"\n\"_closure_, mas não aceita argumentos. Seu valor de retorno é uma _future_, \"\n\"semelhante a um `async fn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"Refatore o bloco _async_ em uma função e melhore o tratamento de erros \"\n\"usando `?`.\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"\"\n\"[Async Channels](./concurrency/async-control-flow/channels.md) (10 minutes)\"\nmsgstr \"\"\n\"[Canais Async](./concurrency/async-control-flow/channels.md) (10 minutos)\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Join](./concurrency/async-control-flow/join.md) (4 minutes)\"\nmsgstr \"[Join](./concurrency/async-control-flow/join.md) (4 minutos)\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Select](./concurrency/async-control-flow/select.md) (5 minutes)\"\nmsgstr \"[Select](./concurrency/async-control-flow/select.md) (5 minutos)\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\"Vários _crates_ têm suporte para canais assíncronos. Por exemplo, `tokio`:\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Recebido {count} pings até agora.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"_ping_handler_ completo\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Falha ao enviar _ping_\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Enviado {} pings até agora.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Algo deu errado na tarefa do gerenciador de _ping_\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"Altere o tamanho do canal para `3` e veja como isso afeta a execução.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\"No geral, a interface é semelhante aos canais `sync` vistos na [aula da \"\n\"manhã](../channels.md).\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"Tente remover a chamada `std::mem::drop`. O que acontece? Por quê?\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"O _crate_ [Flume](https://docs.rs/flume/latest/flume/) tem canais que \"\n\"implementam tanto `sync` quanto `async` `send` e `recv`. Isso pode ser \"\n\"conveniente para aplicações complexas com tarefas de processamento de I/O e \"\n\"CPU pesadas.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"O que torna o trabalho com canais `async` preferível é a capacidade de \"\n\"combiná-los com outras _futures_ para combiná-los e criar um fluxo de \"\n\"controle complexo.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"Uma operação de _join_ espera até que todas as _futures_ de um conjunto \"\n\"estejam prontas e retorna uma coleção de seus resultados. Isso é semelhante \"\n\"a `Promise.all` em JavaScript ou `asyncio.gather` em Python.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"Para várias _futures_ de tipos disjuntos, você pode usar `std::future::join!\"\n\"` mas deve saber quantas _futures_ você terá em tempo de compilação. Isso \"\n\"atualmente está no _crate_ `futures`, em breve será estabilizado em `std::\"\n\"future`.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"O risco do `join` é que uma das _futures_ pode nunca ser resolvida, o que \"\n\"faria seu programa travar.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"Você também pode combinar `join_all` com `join!`, por exemplo, para unir \"\n\"todas as solicitações a um serviço http, bem como uma consulta ao banco de \"\n\"dados. Tente adicionar um `tokio::time::sleep` para o futuro, usando \"\n\"`futures::join!`. Isso não é um _timeout_ (isso requer `select!`, explicado \"\n\"no próximo capítulo), mas demonstra `join!`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"Uma operação de _select_ espera até que qualquer uma das _futures_ de um \"\n\"conjunto esteja pronta e responde ao resultado dessa _future_. Em \"\n\"JavaScript, isso é semelhante a `Promise.race`. Em Python, compara-se a \"\n\"`asyncio.wait(task_set, return_when=asyncio.FIRST_COMPLETED)`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"Semelhante a uma instrução _match_, o corpo de `select!` tem um número de \"\n\"ramos, cada um da forma `pattern = future => statement`. Quando um `future` \"\n\"está pronto, seu valor de retorno é desestruturado pelo `pattern`. O \"\n\"`statement` é então executado com as variáveis resultantes. O resultado do \"\n\"`statement` se torna o resultado da macro `select!`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"Falha ao enviar gato.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"Falha ao enviar cachorro.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"Falha ao receber vencedor\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"O vencedor é {winner:?}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"Neste exemplo, temos uma corrida entre um gato e um cachorro. \"\n\"`first_animal_to_finish_race` escuta ambos os canais e escolherá o que \"\n\"chegar primeiro. Como o cachorro leva 50ms, ele vence contra o gato que leva \"\n\"500ms.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\"Você pode usar canais `oneshot` neste exemplo, já que os canais devem \"\n\"receber apenas um `send`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\"Tente adicionar um prazo para a corrida, demonstrando a seleção de \"\n\"diferentes tipos de _futures_.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"Observe que `select!` descarta ramos não correspondidos, o que cancela suas \"\n\"_futures_. É mais fácil de usar quando cada execução de `select!` cria novas \"\n\"_futures_.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\"Uma alternativa é passar `&mut future` em vez da própria _future_, mas isso \"\n\"pode levar a problemas, discutidos mais adiante no slide de _pinning_.\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"_Async/await_ fornece uma abstração conveniente e eficiente para programação \"\n\"assíncrona concorrente. No entanto, o modelo _async/await_ em Rust também \"\n\"vem com sua parcela de armadilhas e \\\"tiros no pé\\\". Ilustramos alguns deles \"\n\"neste capítulo.\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Blocking the Executor](./concurrency/async-pitfalls/blocking-executor.md) \"\n\"(10 minutes)\"\nmsgstr \"\"\n\"[Bloqueando o _Executor_](./concurrency/async-pitfalls/blocking-executor.md) \"\n\"(10 minutos)\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"[Pin](./concurrency/async-pitfalls/pin.md) (20 minutes)\"\nmsgstr \"[_Pin_](./concurrency/async-pitfalls/pin.md) (20 minutos)\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Async Traits](./concurrency/async-pitfalls/async-traits.md) (5 minutes)\"\nmsgstr \"\"\n\"[_Async Traits_](./concurrency/async-pitfalls/async-traits.md) (5 minutos)\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Cancellation](./concurrency/async-pitfalls/cancellation.md) (20 minutes)\"\nmsgstr \"\"\n\"[Cancelamento](./concurrency/async-pitfalls/cancellation.md) (20 minutos)\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"Bloqueando o _executor_\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"A maioria dos _runtimes_ _async_ só permite que tarefas de I/O sejam \"\n\"executadas concorrentemente. Isso significa que tarefas que bloqueiam a CPU \"\n\"bloquearão o _executor_ e impedirão que outras tarefas sejam executadas. Uma \"\n\"solução fácil é usar métodos equivalentes _async_ sempre que possível.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"_future_ {id} dormiu por {duration_ms}ms, terminou após {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"Execute o código e veja que os _sleeps_ acontecem consecutivamente em vez de \"\n\"concorrentemente.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"A variante `\\\"current_thread\\\"` coloca todas as tarefas em um único \"\n\"_thread_. Isso torna o efeito mais óbvio, mas o bug ainda está presente na \"\n\"variante multi-threaded.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"Troque o `std::thread::sleep` por `tokio::time::sleep` e aguarde seu \"\n\"resultado.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"Outra correção seria `tokio::task::spawn_blocking` que inicia um _thread_ \"\n\"real e transforma seu _handle_ em uma _future_ sem bloquear o _executor_.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"Você não deve pensar em tarefas como _threads_ do SO. Elas não mapeiam 1 \"\n\"para 1 e a maioria dos _executors_ permitirá que muitas tarefas sejam \"\n\"executadas em um único _thread_ do SO. Isso é particularmente problemático \"\n\"ao interagir com outras bibliotecas via FFI, onde essa biblioteca pode \"\n\"depender de armazenamento local de _thread_ ou mapear para _threads_ \"\n\"específicos do SO (por exemplo, CUDA). Prefira `tokio::task::spawn_blocking` \"\n\"em tais situações.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"Use _mutexes sync_ com cuidado. Manter um _mutex_ sobre um `.await` pode \"\n\"fazer com que outra tarefa bloqueie, e essa tarefa pode estar sendo \"\n\"executada no mesmo _thread_.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"Os blocos e funções _async_ retornam tipos que implementam o _trait_ \"\n\"`Future`. O tipo retornado é o resultado de uma transformação do compilador \"\n\"que transforma variáveis locais em dados armazenados dentro da _future_.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"Algumas dessas variáveis podem conter ponteiros para outras variáveis \"\n\"locais. Por causa disso, a _future_ nunca deve ser movida para uma \"\n\"localização de memória diferente, pois isso invalidaria esses ponteiros.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"Para evitar mover o tipo de _future_ na memória, ele só pode ser _poll_ por \"\n\"meio de um ponteiro _pinned_. `Pin` é um invólucro em torno de uma \"\n\"referência que proíbe todas as operações que moveriam a instância para a \"\n\"qual aponta para uma localização de memória diferente.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// Um item de trabalho. Neste caso, apenas dormir pelo tempo dado e \"\n\"responder com uma mensagem no canal `respond_on`.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// Um trabalhador que escuta o trabalho em uma fila e o executa.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Fingir trabalhar.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"falha ao enviar resposta\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: relatar o número de iterações a cada 100ms\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"// Um solicitante que solicita trabalho e aguarda sua conclusão.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"falha ao enviar na fila de trabalho\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"falha ao esperar pela resposta\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"resultado do trabalho para a iteração {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"Você pode reconhecer isso como um exemplo do padrão _actor_. Os _actors_ \"\n\"tipicamente chamam `select!` em um loop.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\"Isso serve como uma síntese de algumas das lições anteriores, então leve seu \"\n\"tempo com isso.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"Adicione ingenuamente um `_ = sleep(Duration::from_millis(100)) => { println!\"\n\"(..) }` ao `select!`. Isso nunca será executado. Por quê?\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\"Em vez disso, adicione um `timeout_fut` contendo essa _future_ fora do \"\n\"`loop`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"Isso ainda não funciona. Siga os erros do compilador, adicionando `&mut` ao \"\n\"`timeout_fut` no `select!` para contornar a movimentação, e então usando \"\n\"`Box::pin`.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\"Isso compila, mas uma vez que o _timeout_ expira, ele é `Poll::Ready` em \"\n\"cada iteração (um _fused future_ ajudaria com isso). Atualize para redefinir \"\n\"`timeout_fut` toda vez que expirar:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"O _Box_ aloca na pilha. Em alguns casos, `std::pin::pin!` (apenas \"\n\"recentemente estabilizado, com código mais antigo frequentemente usando \"\n\"`tokio::pin!`) também é uma opção, mas é difícil de usar para uma _future_ \"\n\"que é reatribuída.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"Outra alternativa é não usar `pin` de forma alguma, mas iniciar outra tarefa \"\n\"que enviará para um canal `oneshot` a cada 100ms.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"Dados que contêm ponteiros para si mesmos são chamados auto-referenciais. \"\n\"Normalmente, o verificador de empréstimos do Rust impediria que dados auto-\"\n\"referenciais fossem movidos, pois as referências não podem sobreviver aos \"\n\"dados aos quais apontam. No entanto, a transformação de código para blocos e \"\n\"funções _async_ não é verificada pelo verificador de empréstimos.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` é um invólucro em torno de uma referência. Um objeto não pode ser \"\n\"movido de seu local usando um ponteiro _pinned_. No entanto, ele ainda pode \"\n\"ser movido por meio de um ponteiro não _pinned_.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"O método `poll` do _trait_ `Future` usa `Pin<&mut Self>` em vez de `&mut \"\n\"Self` para se referir à instância. É por isso que ele só pode ser chamado em \"\n\"um ponteiro _pinned_.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\"Métodos _async_ em _traits_ foram estabilizados apenas recentemente, no \"\n\"lançamento 1.75. Isso exigiu suporte para o uso de `impl Trait` em posição \"\n\"de retorno em _traits_, pois a \\\"desaçucarização\\\" para `async fn` inclui `-\"\n\"> impl Future<Output = ...>`.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\"No entanto, mesmo com o suporte nativo hoje, existem algumas armadilhas em \"\n\"torno de `async fn` e RPIT em _traits:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\"O `impl Trait` em posição de retorno captura todos os tempos de vida em \"\n\"escopo (portanto, alguns padrões de empréstimo não podem ser expressos)\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\"Os métodos de _traits_ que usam `impl trait` em posição de retorno ou \"\n\"`async` não são compatíveis com `dyn`.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"Se precisarmos de suporte `dyn`, o _crate_ [async_trait](https://docs.rs/\"\n\"async-trait/latest/async_trait/) fornece uma solução alternativa por meio de \"\n\"um macro, com algumas ressalvas:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"executando todos os dormentes..\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"dormiu por {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` é fácil de usar, mas observe que ele está usando alocações de \"\n\"pilha para alcançar isso. Essa alocação de pilha impacta o desempenho.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"Os desafios no suporte da linguagem para `async trait` são profundos em Rust \"\n\"e provavelmente não valem a pena descrever em detalhes. Niko Matsakis fez um \"\n\"bom trabalho ao explicá-los [neste post](https://smallcultfollowing.com/\"\n\"babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/) se você estiver \"\n\"interessado em aprofundar.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"Tente criar uma nova estrutura _sleeper_ que dormirá por uma quantidade \"\n\"aleatória de tempo e adicioná-la ao _Vec_.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"Descartar uma _future_ implica que ela nunca pode ser consultada novamente. \"\n\"Isso é chamado de _cancelamento_ e pode ocorrer em qualquer ponto de \"\n\"`await`. Cuidado é necessário para garantir que o sistema funcione \"\n\"corretamente mesmo quando as _futures_ são canceladas. Por exemplo, não deve \"\n\"travar ou perder dados.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\\\"não UTF-8\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"O compilador não ajuda com a segurança do cancelamento. Você precisa ler a \"\n\"documentação da API e considerar qual estado sua `async fn` mantém.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"Diferentemente de `panic` e `?`, o cancelamento faz parte do fluxo de \"\n\"controle normal (vs tratamento de erros).\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"O exemplo perde partes da _string_.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"Sempre que o ramo `tick()` termina primeiro, `next()` e seu `buf` são \"\n\"descartados.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\"`LinesReader` pode ser tornado seguro para cancelamento tornando `buf` parte \"\n\"da estrutura:\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// prefixe buf e bytes com self.\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) é seguro para cancelamento porque mantém o controle de se \"\n\"um _tick_ foi 'entregue'.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) é seguro para cancelamento porque ou retorna \"\n\"ou não lê dados.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) é semelhante ao exemplo e _não_ é \"\n\"seguro para cancelamento. Consulte sua documentação para detalhes e \"\n\"alternativas.\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Jantar dos Filósofos](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutos)\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Broadcast Chat Application](./concurrency/async-exercises/chat-app.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Aplicativo de Bate-papo por _Broadcast_](./concurrency/async-exercises/chat-\"\n\"app.md) (30 minutos)\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"[Solutions](./concurrency/async-exercises/solutions.md) (20 minutes)\"\nmsgstr \"[Soluções](./concurrency/async-exercises/solutions.md) (20 minutos)\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Jantar dos Filósofos --- Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](concurrency/sync-exercises/dining-philosophers.md) \"\n\"for a description of the problem.\"\nmsgstr \"\"\n\"Veja [Jantar dos Filósofos](concurrency/sync-exercises/dining-philosophers.\"\n\"md) para uma descrição do problema.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Como antes, você precisará de uma [instalação local do Cargo](../../cargo/\"\n\"running-locally.md) para este exercício. Copie o código abaixo para um \"\n\"arquivo chamado `src/main.rs`, preencha os espaços em branco e teste se \"\n\"`cargo run` não trava:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"// Continue tentando até termos ambos os garfos\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Faça-os pensar e comer\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"Como desta vez você está usando Rust Async, você precisará de uma \"\n\"dependência `tokio`. Você pode usar o seguinte `Cargo.toml`:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"Também observe que desta vez você tem que usar o módulo `Mutex` e o módulo \"\n\"`mpsc` do _crate_ `tokio`.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"Você pode fazer sua implementação single-threaded?\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"Neste exercício, queremos usar nosso novo conhecimento para implementar um \"\n\"aplicativo de bate-papo por _broadcast_. Temos um servidor de bate-papo ao \"\n\"qual os clientes se conectam e publicam suas mensagens. O cliente lê as \"\n\"mensagens do usuário da entrada padrão e as envia para o servidor. O \"\n\"servidor de bate-papo transmite cada mensagem que recebe para todos os \"\n\"clientes.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"Para isso, usamos [um canal de _broadcast_](https://docs.rs/tokio/latest/\"\n\"tokio/sync/broadcast/fn.channel.html) no servidor e [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) para a comunicação entre o cliente e o \"\n\"servidor.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"Crie um novo projeto Cargo e adicione as seguintes dependências:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.38.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.3\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.38.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.3\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"As APIs necessárias\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"Você vai precisar das seguintes funções de `tokio` e [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/). Dedique alguns minutos para se \"\n\"familiarizar com a API.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implementado por `WebSocketStream`: para \"\n\"ler mensagens de forma assíncrona de um _stream_ de _Websocket_.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implementado por `WebSocketStream`: para \"\n\"enviar mensagens de forma assíncrona em um _stream_ de _Websocket_.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): para ler mensagens de forma assíncrona do usuário da \"\n\"entrada padrão.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): para se inscrever em um canal de \"\n\"transmissão.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"Dois binários\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"Normalmente em um projeto Cargo, você pode ter apenas um binário e um \"\n\"arquivo `src/main.rs`. Neste projeto, precisamos de dois binários. Um para o \"\n\"cliente e outro para o servidor. Você poderia potencialmente torná-los dois \"\n\"projetos Cargo separados, mas vamos colocá-los em um único projeto Cargo com \"\n\"dois binários. Para que isso funcione, o código do cliente e do servidor \"\n\"deve ir em `src/bin` (consulte a [documentação](https://doc.rust-lang.org/\"\n\"cargo/reference/cargo-targets.html#binaries)).\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"Copie o seguinte código do servidor e do cliente para `src/bin/server.rs` e \"\n\"`src/bin/client.rs`, respectivamente. Sua tarefa é completar esses arquivos \"\n\"conforme descrito abaixo.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"// TODO: Para uma dica, veja a descrição da tarefa abaixo.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"ouvindo na porta 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"Nova conexão de {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Envolver o _stream_ TCP bruto em um _websocket_.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"Executando os binários\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"Execute o servidor com:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"e o cliente com:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"Implemente a função `handle_connection` em `src/bin/server.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"Dica: Use `tokio::select!` para realizar concorrentemente duas tarefas em um \"\n\"loop contínuo. Uma tarefa recebe mensagens do cliente e as transmite. A \"\n\"outra envia mensagens recebidas pelo servidor para o cliente.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"Complete a função principal em `src/bin/client.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"Dica: Como antes, use `tokio::select!` em um loop contínuo para realizar \"\n\"concorrentemente duas tarefas: (1) ler mensagens do usuário da entrada \"\n\"padrão e enviá-las para o servidor, e (2) receber mensagens do servidor e \"\n\"exibi-las para o usuário.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"Opcional: Depois de terminar, altere o código para transmitir mensagens para \"\n\"todos os clientes, exceto o remetente da mensagem.\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\"// Se não pegamos o garfo esquerdo, solte o garfo direito se o\\n\"\n\"                // tivermos e deixe outras tarefas progredirem.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\"// Se não pegamos o garfo direito, solte o garfo esquerdo e deixe\\n\"\n\"                // outras tarefas progredirem.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// Os _locks_ são descartados aqui\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\"// tx é descartado aqui, então não precisamos descartá-lo explicitamente \"\n\"mais tarde\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Aqui está um pensamento: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Bem-vindos ao bate-papo! Digite uma mensagem\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// Um loop contínuo para realizar concorrentemente duas tarefas: (1) \"\n\"recebendo\\n\"\n\"    // mensagens de `ws_stream` e transmitindo-as, e (2) recebendo\\n\"\n\"    // mensagens em `bcast_rx` e enviando-as para o cliente.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"Do cliente {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Loop contínuo para enviar e receber mensagens concorrentemente.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"Do servidor: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"_Obrigado por fazer o Comprehensive Rust 🦀!_ Esperamos que tenha gostado e \"\n\"que tenha sido útil.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Nós nos divertimos muito montando o curso. O curso não é perfeito, portanto, \"\n\"se você identificou algum erro ou tem ideias para melhorias, entre em [entre \"\n\"em contato conosco no GitHub](https://github.com/google/comprehensive-rust/\"\n\"discussions). Nós adoraríamos ouvir você.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"A seguir, há um glossário que tem como objetivo fornecer uma definição breve \"\n\"de muitos termos de Rust. Para traduções, isso também serve para conectar o \"\n\"termo de volta ao original em inglês.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"alocar:  \\n\"\n\"Alocação dinâmica de memória no [_heap_](memory-management/stack-vs-heap.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"argumento:  \\n\"\n\"Informação que é passada para uma função ou método.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Rust _bare-metal_:  \\n\"\n\"Desenvolvimento de baixo nível em Rust, frequentemente implantado em um \"\n\"sistema sem um sistema operacional. Veja [Rust _bare-metal_](bare-metal.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"bloco:  \\n\"\n\"Veja [Blocos](control-flow/blocks.md) e _escopo_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"empréstimo:  \\n\"\n\"Veja [Empréstimo](ownership/borrowing.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"verificador de empréstimo:  \\n\"\n\"A parte do compilador Rust que verifica se todos os empréstimos são válidos.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"chaves:  \\n\"\n\"`{` e `}`. Elas delimitam _blocos_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"compilar:  \\n\"\n\"O processo de converter o código-fonte em código executável ou um programa \"\n\"usável.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"chamada:  \\n\"\n\"Para invocar ou executar uma função ou método.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"canal:  \\n\"\n\"Usado para passar mensagens com segurança [entre _threads_](concurrency/\"\n\"channels.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"Os cursos aqui são chamados conjuntamente de Comprehensive Rust 🦀.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"concorrência:  \\n\"\n\"A execução de várias tarefas ou processos ao mesmo tempo.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Concorrência em Rust:  \\n\"\n\"Veja [Concorrência em Rust](concurrency.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"constante:  \\n\"\n\"Um valor que não muda durante a execução de um programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"fluxo de controle:  \\n\"\n\"A ordem na qual as instruções individuais são executadas em um programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"falha (_crash_):  \\n\"\n\"Uma falha ou término inesperado e não tratado de um programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"enumeração:  \\n\"\n\"Um tipo de dado que contém uma das várias constantes nomeadas, possivelmente \"\n\"com uma tupla ou _struct_ associada.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"erro:  \\n\"\n\"Uma condição ou resultado inesperado que desvia do comportamento esperado.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"tratamento de erro:  \\n\"\n\"O processo de gerenciar e responder a erros que ocorrem durante a execução \"\n\"do programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"exercício:  \\n\"\n\"Uma tarefa ou problema projetado para praticar e testar habilidades de \"\n\"programação.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"função:  \\n\"\n\"Um bloco de código reutilizável que executa uma tarefa específica.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"coletor de lixo:  \\n\"\n\"Um mecanismo que libera automaticamente a memória ocupada por objetos que \"\n\"não estão mais em uso.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"genéricos:  \\n\"\n\"Um recurso que permite escrever código com espaços reservados para tipos, \"\n\"possibilitando a reutilização de código com diferentes tipos de dados.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"imutável:  \\n\"\n\"Incapaz de ser alterado após a criação.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"teste de integração:  \\n\"\n\"Um tipo de teste que verifica as interações entre diferentes partes ou \"\n\"componentes de um sistema.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"palavra-chave:  \\n\"\n\"Uma palavra reservada em uma linguagem de programação que tem um significado \"\n\"específico e não pode ser usada como um identificador.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"biblioteca:  \\n\"\n\"Uma coleção de rotinas ou código pré-compilado que pode ser usado por \"\n\"programas.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"macro:  \\n\"\n\"Macros Rust podem ser reconhecidas por um `!` no nome. Macros são usadas \"\n\"quando funções normais não são suficientes. Um exemplo típico é `format!`, \"\n\"que aceita um número variável de argumentos, o que não é suportado por \"\n\"funções Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"função `main`:  \\n\"\n\"Programas Rust começam a executar a partir da função `main`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"correspondência:  \\n\"\n\"Uma construção de fluxo de controle em Rust que permite a correspondência de \"\n\"padrões no valor de uma expressão.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"vazamento de memória:  \\n\"\n\"Uma situação em que um programa falha em liberar memória que não é mais \"\n\"necessária, levando a um aumento gradual no uso de memória.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"método:  \\n\"\n\"Uma função associada a um objeto ou a um tipo em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"módulo:  \\n\"\n\"Um espaço de nomes que contém definições, como funções, tipos ou _traits_, \"\n\"para organizar o código em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"mover:  \\n\"\n\"A transferência de propriedade de um valor de uma variável para outra em \"\n\"Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"mutável:  \\n\"\n\"Uma propriedade em Rust que permite que variáveis sejam modificadas depois \"\n\"de terem sido declaradas.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"propriedade (_ownership_):  \\n\"\n\"O conceito em Rust que define qual parte do código é responsável por \"\n\"gerenciar a memória associada a um valor.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"pânico:  \\n\"\n\"Uma condição de erro irreversível em Rust que resulta no término do programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"parâmetro:  \\n\"\n\"Um valor que é passado para uma função ou método quando é chamado.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"padrão:  \\n\"\n\"Uma combinação de valores, literais ou estruturas que podem ser \"\n\"correspondidos a uma expressão em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"carga (_payload_):  \\n\"\n\"Os dados ou informações transportados por uma mensagem, evento ou estrutura \"\n\"de dados.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"programa:  \\n\"\n\"Um conjunto de instruções que um computador pode executar para realizar uma \"\n\"tarefa específica ou resolver um problema particular.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"linguagem de programação:  \\n\"\n\"Um sistema formal usado para comunicar instruções a um computador, como Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"receptor:  \\n\"\n\"O primeiro parâmetro em um método Rust que representa a instância na qual o \"\n\"método é chamado.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"contagem de referências:  \\n\"\n\"Uma técnica de gerenciamento de memória na qual o número de referências a um \"\n\"objeto é rastreado, e o objeto é desalocado quando a contagem atinge zero.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"_return_:  \\n\"\n\"Uma palavra-chave em Rust usada para indicar o valor a ser retornado de uma \"\n\"função.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"Uma linguagem de programação de sistemas que se concentra em segurança, \"\n\"desempenho e concorrência.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Fundamentos de Rust:  \\n\"\n\"Dias 1 a 4 deste curso.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust no Android:  \\n\"\n\"Veja [Rust no Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Rust no Chromium:  \\n\"\n\"Veja [Rust no Chromium](chromium.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"seguro (_safe_):  \\n\"\n\"Refere-se a código que adere às regras de propriedade e empréstimo de Rust, \"\n\"prevenindo erros relacionados à memória.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"escopo:  \\n\"\n\"A região de um programa onde uma variável é válida e pode ser usada.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"biblioteca padrão:  \\n\"\n\"Uma coleção de módulos que fornecem funcionalidades essenciais em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static:  \\n\"\n\"Uma palavra-chave em Rust usada para definir variáveis estáticas ou itens \"\n\"com um tempo de vida `'static`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\"string:  \\n\"\n\"Um tipo de dado que armazena dados textuais. Veja [Strings](references/\"\n\"strings.html) para mais informações.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"estrutura (_struct_):  \\n\"\n\"Um tipo de dado composto em Rust que agrupa variáveis de diferentes tipos \"\n\"sob um único nome.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"_test_:  \\n\"\n\"Um módulo Rust contendo funções que testam a correção de outras funções.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"_thread_:  \\n\"\n\"Uma sequência de execução separada em um programa, permitindo execução \"\n\"concorrente.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"segurança de _thread_:  \\n\"\n\"A propriedade de um programa que garante comportamento correto em um \"\n\"ambiente multithread.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"trait:  \\n\"\n\"Uma coleção de métodos definidos para um tipo desconhecido, fornecendo uma \"\n\"maneira de alcançar polimorfismo em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"restrição de _trait_:  \\n\"\n\"Uma abstração onde você pode exigir que os tipos implementem alguns _traits_ \"\n\"de seu interesse.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"tupla:  \\n\"\n\"Um tipo de dado composto em Rust que agrupa variáveis de diferentes tipos. \"\n\"Os campos da tupla não têm nomes e são acessados por seus números ordinais.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"tipo:  \\n\"\n\"Uma classificação que especifica quais operações podem ser realizadas em \"\n\"valores de um tipo particular em Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"inferência de tipo:  \\n\"\n\"A capacidade do compilador Rust de deduzir o tipo de uma variável ou \"\n\"expressão.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"comportamento indefinido:  \\n\"\n\"Ações ou condições em Rust que não têm um resultado especificado, \"\n\"frequentemente levando a comportamento imprevisível do programa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"união (_union_):  \\n\"\n\"Um tipo de dado que pode conter valores de diferentes tipos, mas apenas um \"\n\"de cada vez.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"teste unitário:  \\n\"\n\"Rust vem com suporte embutido para executar pequenos testes unitários e \"\n\"testes de integração maiores. Veja [Testes Unitários](testing/unit-tests.\"\n\"html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"tipo unitário:  \\n\"\n\"Tipo que não contém dados, escrito como uma tupla sem membros.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"não seguro (_unsafe_):  \\n\"\n\"O subconjunto de Rust que permite que você acione _comportamentos \"\n\"indefinidos_. Veja [Rust não seguro](unsafe.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"variável:  \\n\"\n\"Uma localização de memória que armazena dados. Variáveis são válidas em um \"\n\"_escopo_.\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Outros recursos de Rust\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"A comunidade Rust tem abundância de recursos gratuitos e de alta qualidade \"\n\"on-line.\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"Documentação Oficial\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"O projeto Rust hospeda muitos recursos. Estes cobrem Rust em geral:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[A Linguagem de Programação Rust](https://doc.rust-lang.org/book/): o livro \"\n\"gratuito canônico sobre Rust. Abrange o idioma em detalhes e inclui alguns \"\n\"projetos para as pessoas construírem.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): abrange a \"\n\"sintaxe de Rust por meio de uma série de exemplos que mostram diferentes \"\n\"construções. As vezes inclui pequenos exercícios onde você é solicitado a \"\n\"expandir o código dos exemplos.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): documentação \"\n\"completa da biblioteca padrão para Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): um livro \"\n\"incompleto que descreve a gramática Rust e o modelo de memória.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Mais guias especializados hospedados no site oficial do Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[O Rustonomicon](https://doc.rust-lang.org/nomicon/): cobre Rust inseguro, \"\n\"incluindo trabalhar com ponteiros brutos e fazer interface com outras \"\n\"linguagens (FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Programação assíncrona em Rust](https://rust-lang.github.io/async-book/): \"\n\"abrange o novo modelo de programação assíncrona que foi introduzido após o \"\n\"Rust Book ser escrito.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"uma introdução ao uso do Rust em dispositivos embarcados sem um sistema \"\n\"operacional.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Material de aprendizagem não oficial\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Uma pequena seleção de outros guias e tutoriais para Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[ALearn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): cobre Rust \"\n\"da perspectiva de programadores C de baixo nível.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): cobre Rust da perspectiva dos desenvolvedores que escrevem \"\n\"firmware em C.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"cobre a sintaxe do Rust usando comparações lado a lado com outras linguagens \"\n\"como C, C++, Java, JavaScript e Python.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): mais de 100 exercícios \"\n\"para lhe ajudar a aprender Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): uma série de pequenas apresentações abrangendo tanto a \"\n\"parte básica quanto a avançada da Linguagem Rust. Outros tópicos como \"\n\"WebAssembly e async/await também são abordados.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): a self-paced workshop that goes beyond Rust's \"\n\"built-in testing framework. It covers `googletest`, snapshot testing, \"\n\"mocking as well as how to write your own custom test harness.\"\nmsgstr \"\"\n\"[Testes avançados para aplicações Rust](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): um workshop autoguiado que vai além do framework \"\n\"de testes integrado do Rust. Ele cobre `googletest`, testes de snapshot, \"\n\"mocking, bem como como escrever seu próprio conjunto de testes personalizado.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) e [Take your first steps with Rust](https://docs.microsoft.\"\n\"com/en-us/learn/paths/rust-first-steps/): dois guias Rust voltados para \"\n\"novos desenvolvedores. O primeiro é um conjunto de 35 vídeos e o o segundo é \"\n\"um conjunto de 11 módulos que cobrem a sintaxe Rust e as construções básicas.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): exploração aprofundada das regras de \"\n\"gerenciamento de memória do Rust, através da implementação de alguns tipos \"\n\"diferentes de estruturas de lista.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Consulte o [Little Book of Rust Books](https://lborb.github.io/book/) para \"\n\"ainda mais livros sobre Rust.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"O material aqui se baseia em muitas fontes excelentes de documentação do \"\n\"Rust. Consulte a página em [outros recursos](other-resources.md) para obter \"\n\"uma lista completa de recursos úteis .\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"O material do Comprehensive Rust é licenciado sob os termos da licença \"\n\"Apache 2.0 , consulte [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) para obter detalhes.\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Alguns exemplos e exercícios foram copiados e adaptados de [Rust by Exemplo]\"\n\"(https://doc.rust-lang.org/rust-by-example/). por favor veja o diretório \"\n\"`third_party/rust-by-example/` para detalhes, incluindo os termos de licença.\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Alguns exercícios foram copiados e adaptados de [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). por favor veja o diretório `third_party/rust-on-\"\n\"exercism/` para obter detalhes, incluindo os termos licença.\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"A seção [Interoperabilidade com C++](android/interoperability/cpp.md) usa \"\n\"uma imagem de [CXX](https://cxx.rs/). Consulte o diretório `third_party/cxx/\"\n\"` para obter detalhes, incluindo os termos da licença.\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"Condicionais\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"Variáveis Estáticas e Constantes\"\n\n#~ msgid \"Exercise: GUI Library\"\n#~ msgstr \"Exercício: Biblioteca GUI\"\n\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"_Slices_ (Fatias) e Tempos de Vida (_Lifetimes_)\"\n\n#~ msgid \"String References\"\n#~ msgstr \"Referências de String\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Fluxo de Controle\"\n\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"Rust tem dois tipos para representar strings, ambos serão abordados com \"\n#~ \"mais detalhes posteriormente. Ambos armazenam _sempre_ strings \"\n#~ \"codificadas em UTF-8.\"\n\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` - uma string modificável e _owned_ (de propriedade).\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"\"\n#~ \"`&str` - uma string somente leitura. Literais de string têm este tipo.\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"sentença final: {}\\\"\"\n\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"Este slide introduz strings. Tudo aqui será abordado com mais \"\n#~ \"profundidade mais tarde, mas isso é o suficiente para que slides e \"\n#~ \"exercícios subsequentes usem strings.\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"\"\n#~ \"UTF-8 inválido em uma string é UB, e isso não é permitido em Rust seguro.\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String` é um tipo definido pelo usuário com um construtor (`::new()`) e \"\n#~ \"métodos como `s.push_str(..)`.\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"O `&` em `&str` indica que esta é uma referência. Abordaremos referências \"\n#~ \"mais tarde, então, por enquanto, pense em `&str` como uma unidade que \"\n#~ \"significa \\\"uma string somente leitura\\\".\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"A linha comentada está indexando a string pela posição do byte. `12..13` \"\n#~ \"não termina em um limite de caractere, então o programa entra em pânico. \"\n#~ \"Ajuste para um intervalo que o faça, com base na mensagem de erro.\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"\"\n#~ \"Grande parte da sintaxe do Rust será familiar para você que vem de C, C++ \"\n#~ \"ou Java:\"\n\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"Blocos são delimitados por chaves.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"Comentários de linha são iniciados com `//`, comentários de bloco são \"\n#~ \"delimitados por `/* ... */`.\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"Palavras-chave como `if` e `while` funcionam da mesma forma.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"\"\n#~ \"A atribuição de variáveis é feita com `=`, a comparação é feita com `==`.\"\n\n#~ msgid \"\"\n#~ \"We will discuss iteration later; for now, just stick to range expressions.\"\n#~ msgstr \"\"\n#~ \"Discutiremos iteração mais tarde; por enquanto, fique com expressões de \"\n#~ \"intervalo.\"\n\n#~ msgid \"\\\"{result}\\\"\"\n#~ msgstr \"\\\"{result}\\\"\"\n\n#~ msgid \"\\\"x: {x}, i: {i}\\\"\"\n#~ msgstr \"\\\"x: {x}, i: {i}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"Neste caso, paramos o loop externo após 3 iterações do loop interno.\"\n\n#~ msgid \"\"\n#~ \"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n#~ \"elements of an array have the same type, while tuples can accommodate \"\n#~ \"different types. Both types have a size fixed at compile time.\"\n#~ msgstr \"\"\n#~ \"Tuplas e matrizes são os primeiros tipos \\\"compostos\\\" que vimos. Todos \"\n#~ \"os elementos de uma matriz têm o mesmo tipo, enquanto as tuplas podem \"\n#~ \"acomodar diferentes tipos. Ambos os tipos têm um tamanho fixo em tempo de \"\n#~ \"compilação.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"Atribuição e acesso a matrizes:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"Atribuição e acesso a tuplas:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"Matrizes:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"Tuplas:\"\n\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"A tupla vazia `()` também é conhecida como     \\\"tipo unidade\\\" (_unit \"\n#~ \"type_). É tanto um tipo quanto o único valor válido desse tipo - ou seja, \"\n#~ \"o tipo e seu valor são expressos como `()`. É usado para indicar, por \"\n#~ \"exemplo, que uma função ou expressão não tem valor de retorno, como \"\n#~ \"veremos em um slide futuro.\"\n\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"Você pode pensar nisso como um `void`, que talvez lhe seja familiar de \"\n#~ \"outras linguagens de programação.\"\n\n#~ msgid \"\"\n#~ \"Destructuring is a way of extracting data from a data structure by \"\n#~ \"writing a pattern that is matched up to the data structure, binding \"\n#~ \"variables to subcomponents of the data structure.\"\n#~ msgstr \"\"\n#~ \"Desestruturação é uma maneira de extrair dados de uma estrutura de dados \"\n#~ \"escrevendo um padrão que é correspondido à estrutura de dados, vinculando \"\n#~ \"variáveis aos subcomponentes da estrutura de dados.\"\n\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"\"\n#~ \"Você pode desestruturar matrizes, tuplas e _slices_ combinando seus \"\n#~ \"elementos:\"\n\n#~ msgid \"\\\"on Y axis\\\"\"\n#~ msgstr \"\\\"no eixo Y\\\"\"\n\n#~ msgid \"\\\"on X axis\\\"\"\n#~ msgstr \"\\\"no eixo X\\\"\"\n\n#~ msgid \"\\\"left of Y axis\\\"\"\n#~ msgstr \"\\\"à esquerda do eixo Y\\\"\"\n\n#~ msgid \"\\\"below X axis\\\"\"\n#~ msgstr \"\\\"abaixo do eixo X\\\"\"\n\n#~ msgid \"\\\"first quadrant\\\"\"\n#~ msgstr \"\\\"primeiro quadrante\\\"\"\n\n#~ msgid \"\\\"Tell me about {triple:?}\\\"\"\n#~ msgstr \"\\\"Fale-me sobre {triple:?}\\\"\"\n\n#~ msgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n#~ msgstr \"\\\"Primeiro é 0, y = {y} e z = {z}\\\"\"\n\n#~ msgid \"\\\"First is 1 and the rest were ignored\\\"\"\n#~ msgstr \"\\\"Primeiro é 1 e o resto foi ignorado\\\"\"\n\n#~ msgid \"\\\"All elements were ignored\\\"\"\n#~ msgstr \"\\\"Todos os elementos foram ignorados\\\"\"\n\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"Crie um novo padrão usando `_` para representar um elemento. \"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"Adicione mais valores à matriz.\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"\"\n#~ \"Aponte que `..` vai expandir para levar em conta um número diferente de \"\n#~ \"elementos.\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"\"\n#~ \"Mostre correspondência com a cauda usando os padrões `[.., b]` and `[a@..,\"\n#~ \"b]`\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"Codifique ambas as funções a operar em matrizes 3 × 3.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"functions:\"\n#~ msgstr \"\"\n#~ \"Copie o código abaixo para <https://play.rust-lang.org/> e implemente as \"\n#~ \"funções:\"\n\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"Variáveis estáticas e constantes são duas maneiras diferentes de criar \"\n#~ \"valores com escopo global que não podem ser movidos ou realocados durante \"\n#~ \"a execução do programa. \"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"Tabela de propriedades:\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"Possui um endereço na memória\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"Não (_inlined_, i.e., expandida no local)\"\n\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"É válida durante toda a execução do programa\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"Pode ser mutável\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"Sim (inseguro)\"\n\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"Avaliada em tempo de compilação\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"Sim (inicializada em tempo de compilação)\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"_Inlined_ (expandida no local) onde quer que seja utilizada\"\n\n#~ msgid \"`match` expressions\"\n#~ msgstr \"Expressões `match` (correspondência)\"\n\n#~ msgid \"\"\n#~ \"Trait objects allow for values of different types, for instance in a \"\n#~ \"collection:\"\n#~ msgstr \"\"\n#~ \"Objetos `trait` permitem valores de diferentes tipos, por exemplo, em uma \"\n#~ \"coleção:\"\n\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects. We'll only implement the drawing of it (as text) for \"\n#~ \"simplicity.\"\n#~ msgstr \"\"\n#~ \"Vamos projetar uma biblioteca GUI clássica usando nosso novo conhecimento \"\n#~ \"de _traits_ e objetos de `trait`. Implementaremos apenas o desenho (como \"\n#~ \"texto) para simplificar.\"\n\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"Teremos vários _widgets_ em nossa biblioteca:\"\n\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Window`: tem um `título` e contém outros _widgets_.\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label`. In reality, it would also take a callback \"\n#~ \"function to allow the program to do something when the button is clicked \"\n#~ \"but we won't include that since we're only drawing the GUI.\"\n#~ msgstr \"\"\n#~ \"`Button`: tem um `label` (rótulo). Na realidade, ele também receberia uma \"\n#~ \"função de retorno de chamada para permitir que o programa faça algo \"\n#~ \"quando o botão é clicado, mas não incluiremos isso, pois estamos apenas \"\n#~ \"desenhando a GUI.\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`: tem um `label`.\"\n\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"Os _widgets_ irão implementar o `trait` `Widget`, veja abaixo.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Copie o código abaixo para <https://play.rust-lang.org/>, codifique os \"\n#~ \"métodos `draw_into` para que você implemente o `trait` `Widget`:\"\n\n#~ msgid \"// TODO: Implement `Widget` for `Label`.\\n\"\n#~ msgstr \"// TODO: Implemente `Widget` para `Label`.\\n\"\n\n#~ msgid \"// TODO: Implement `Widget` for `Button`.\\n\"\n#~ msgstr \"// TODO: Implemente `Widget` para `Button`.\\n\"\n\n#~ msgid \"// TODO: Implement `Widget` for `Window`.\\n\"\n#~ msgstr \"// TODO: Implemente `Widget` para `Window`.\\n\"\n\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"A saída do programa acima pode ser algo simples como:\"\n\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Se você quiser desenhar texto alinhado, você pode usar os operadores de \"\n#~ \"formatação [fill/alignment](https://doc.rust-lang.org/std/fmt/index.\"\n#~ \"html#fillalignment). Em particular, observe como você pode preencher com \"\n#~ \"diferentes caracteres (aqui um `'/'`) e como você pode controlar o \"\n#~ \"alinhamento:\"\n\n#~ msgid \"\\\"left aligned:  |{:/<width$}|\\\"\"\n#~ msgstr \"\\\"alinhado à esquerda: |{:/<width$}|\\\"\"\n\n#~ msgid \"\\\"centered:      |{:/^width$}|\\\"\"\n#~ msgstr \"\\\"centralizado: |{:/^width$}|\\\"\"\n\n#~ msgid \"\\\"right aligned: |{:/>width$}|\\\"\"\n#~ msgstr \"\\\"alinhado à direita: |{:/>width$}|\\\"\"\n\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Usando esses truques de alinhamento, você pode, por exemplo, produzir uma \"\n#~ \"saída como esta:\"\n\n#~ msgid \"// fn set_x(&mut self, x: T)\\n\"\n#~ msgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#~ msgid \"/// Return true if self is less than other.\\n\"\n#~ msgstr \"/// Retorna verdadeiro se self for menor que other.\\n\"\n\n#~ msgid \"\\\"Shapiro\\\"\"\n#~ msgstr \"\\\"Shapiro\\\"\"\n\n#~ msgid \"\\\"Baumann\\\"\"\n#~ msgstr \"\\\"Baumann\\\"\"\n\n#~ msgid \"\\\"there\\\"\"\n#~ msgstr \"\\\"tudo bem\\\"\"\n\n#~ msgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n#~ msgstr \"\\\"Ponteiro = {ptr:#x}, tamanho = {len}, capacidade = {capacity}\\\"\"\n\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. \"\n#~ \"This allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"Uma `Box` não pode estar vazia, portanto o ponteiro é sempre válido e não \"\n#~ \"nulo (`null`). Isto permite que o compilador otimize o layout da memória:\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    list                    :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" Pilha                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    lista                   :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Elem.   | 1  | o--+----+-----+--->| Elem.   | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"The Rust compiler can do return value optimization (RVO).\"\n#~ msgstr \"\"\n#~ \"O compilador Rust pode fazer otimização de valor de retorno (_Return \"\n#~ \"Value Operation_ - RVO).\"\n\n#~ msgid \"\"\n#~ \"In C++, copy elision has to be defined in the language specification \"\n#~ \"because constructors can have side effects. In Rust, this is not an issue \"\n#~ \"at all. If RVO did not happen, Rust will always perform a simple and \"\n#~ \"efficient `memcpy` copy.\"\n#~ msgstr \"\"\n#~ \"Em C++, a elisão (omissão) de cópia deve ser definida na especificação da \"\n#~ \"linguagem porque os construtores podem ter efeitos colaterais. Em Rust, \"\n#~ \"isso não é um problema. Se o RVO não aconteceu, o Rust sempre executará \"\n#~ \"uma cópia `memcpy` simples e eficiente.\"\n\n#~ msgid \"\"\n#~ \"Rust provides a few safe means of modifying a value given only a shared \"\n#~ \"reference to that value. All of these replace compile-time checks with \"\n#~ \"runtime checks.\"\n#~ msgstr \"\"\n#~ \"O Rust fornece alguns meios seguros de modificar um valor dado apenas uma \"\n#~ \"referência compartilhada para esse valor. Todos eles substituem \"\n#~ \"verificações em tempo de compilação por verificações em tempo de execução.\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` e `RefCell`\"\n\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) e \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implementam o que Rust chama de _mutabilidade interior:_ mutação de \"\n#~ \"valores em um contexto imutável.\"\n\n#~ msgid \"\"\n#~ \"`Cell` is typically used for simple types, as it requires copying or \"\n#~ \"moving values. More complex interior types typically use `RefCell`, which \"\n#~ \"tracks shared and exclusive references at runtime and panics if they are \"\n#~ \"misused.\"\n#~ msgstr \"\"\n#~ \"`Cell` é normalmente usado para tipos simples, pois requer copiar ou \"\n#~ \"mover valores. Tipos interiores mais complexos normalmente usam \"\n#~ \"`RefCell`, que rastreia referências compartilhadas e exclusivas em tempo \"\n#~ \"de execução e retorna um pânico (_panic_) se forem mal utilizadas.\"\n\n#~ msgid \"\\\"graph: {root:#?}\\\"\"\n#~ msgstr \"\\\"grafo: {root:#?}\\\"\"\n\n#~ msgid \"\\\"graph sum: {}\\\"\"\n#~ msgstr \"\\\"soma do grafo: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"If we were using `Cell` instead of `RefCell` in this example, we would \"\n#~ \"have to move the `Node` out of the `Rc` to push children, then move it \"\n#~ \"back in. This is safe because there's always one, un-referenced value in \"\n#~ \"the cell, but it's not ergonomic.\"\n#~ msgstr \"\"\n#~ \"Se estivéssemos usando `Cell` em vez de `RefCell` neste exemplo, teríamos \"\n#~ \"que mover o `Node` para fora do `Rc` para enviar os filhos e, em seguida, \"\n#~ \"movê-lo de volta. Isso é seguro porque sempre há um, valor não \"\n#~ \"referenciado em `cell`, mas não é ergonômico.\"\n\n#~ msgid \"\"\n#~ \"To do anything with a Node, you must call a `RefCell` method, usually \"\n#~ \"`borrow` or `borrow_mut`.\"\n#~ msgstr \"\"\n#~ \"Para fazer qualquer coisa com um Node, você deve chamar um método \"\n#~ \"`RefCell`, geralmente `borrow` ou `borrow_mut`.\"\n\n#~ msgid \"\"\n#~ \"Demonstrate that reference loops can be created by adding `root` to \"\n#~ \"`subtree.children` (don't try to print it!).\"\n#~ msgstr \"\"\n#~ \"Demonstre que loops de referência podem ser criados adicionando `root` a \"\n#~ \"`subtree.children` (não tente imprimi-lo!).\"\n\n#~ msgid \"\"\n#~ \"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n#~ \"`self.value` and calls the same method on its children. This will panic \"\n#~ \"in the presence of the reference loop, with `thread 'main' panicked at \"\n#~ \"'already borrowed: BorrowMutError'`.\"\n#~ msgstr \"\"\n#~ \"Para demonstrar um pânico em tempo de execução, adicione um `fn inc(&mut \"\n#~ \"self)` que incrementa `self.value` e chama o mesmo método em seus filhos. \"\n#~ \"Isso criará um pânico na presença do loop de referência, com `thread \"\n#~ \"'main' em pânico no 'já emprestado: BorrowMutError'`.\"\n\n#~ msgid \"\"\n#~ \"We can now understand the two string types in Rust: `&str` is almost like \"\n#~ \"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\n#~ msgstr \"\"\n#~ \"Agora podemos entender os dois tipos de string em Rust: `&str` é quase \"\n#~ \"como `&[char]`, mas com seus dados armazenados em uma codificação de \"\n#~ \"comprimento variável (UTF-8).\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Terminologia do Rust:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str` é uma referência imutável para uma _slice_ de string.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` é um _buffer_ de string mutável.\"\n\n#~ msgid \"\\\"Unexpected wire-type)\\\"\"\n#~ msgstr \"\\\"Wire-type inesperado\\\"\"\n\n#~ msgid \"\\\"Invalid string (not UTF-8)\\\"\"\n#~ msgstr \"\\\"String inválida (não UTF-8)\\\"\"\n\n#~ msgid \"b\\\"hello\\\"\"\n#~ msgstr \"b\\\"olá\\\"\"\n\n#~ msgid \"\"\n#~ \"If you no longer have your version, that's fine - refer back to the \"\n#~ \"[provided solution](../methods-and-traits/solution.html).\"\n#~ msgstr \"\"\n#~ \"Se você não tiver mais sua versão, tudo bem - consulte a [solução \"\n#~ \"fornecida](../methods-and-traits/solution.html).\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust possui apenas suporte básico para escrever testes.\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"\"\n#~ \"Estes são alguns _crates_ adicionais que recomendamos para a escrita de \"\n#~ \"testes:\"\n\n#~ msgid \"\"\n#~ \"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n#~ \"library in the tradition of GoogleTest for C++.\"\n#~ msgstr \"\"\n#~ \"[googletest](https://docs.rs/googletest): Biblioteca abrangente para \"\n#~ \"testes de assertividade na tradição de GoogleTest para C++.\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"\"\n#~ \"[proptest](https://docs.rs/proptest): Testes baseados em propriedades \"\n#~ \"para Rust.\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"\"\n#~ \"[rstest](https://docs.rs/rstest): Suporte para testes parametrizados e \"\n#~ \"acessórios.\"\n\n#~ msgid \"This just scratches the surface, there are many builtin matchers.\"\n#~ msgstr \"Isso apenas arranha a superfície, há muitos _matchers_ embutidos.\"\n\n#~ msgid \"GoogleTest is available for use in AOSP.\"\n#~ msgstr \"GoogleTest está disponível para uso no AOSP.\"\n\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"// Comportamento indefinido se abs se comportar mal.\\n\"\n\n#~ msgid \"// Safe because ...\\n\"\n#~ msgstr \"// Seguro porque ...\\n\"\n\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"Adicione `vendor_available: true` caso seu arquivo AIDL seja usado por um \"\n#~ \"binário na partição _vendor_.\"\n\n#~ msgid \"/// Connect to the BirthdayService.\\n\"\n#~ msgstr \"/// Connecta-se ao serviço de aniversário BirthdayService.\\n\"\n\n#~ msgid \"\"\n#~ \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\n#~ msgstr \"\"\n#~ \"// SEGURANÇA: `print_card` é seguro para chamar com um ponteiro `card` \"\n#~ \"válido.\\n\"\n\n#~ msgid \"ADC\"\n#~ msgstr \"ADC\"\n\n#~ msgid \"I2C, SPI, UART, CAN\"\n#~ msgstr \"I2C, SPI, UART, CAN\"\n\n#~ msgid \"RNG\"\n#~ msgstr \"RNG\"\n\n#~ msgid \"Timers\"\n#~ msgstr \"Timers\"\n\n#~ msgid \"Watchdogs\"\n#~ msgstr \"Watchdogs\"\n\n#~ msgid \"\"\n#~ \"There is work in progress on an `async` version of `embedded-hal`, but it \"\n#~ \"isn't stable yet.\"\n#~ msgstr \"\"\n#~ \"Há um trabalho em andamento em uma versão `async` do `embedded-hal`, mas \"\n#~ \"ela ainda não está estável.\"\n\n#~ msgid \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Configure o controlador I2C e a Unidade de Medição Inercial.\\n\"\n#~ \"    // TODO\\n\"\n\n#~ msgid \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Leia os dados da bússola e registre-os na porta serial.\\n\"\n#~ \"        // TODO\\n\"\n\n#~ msgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\n#~ msgstr \"// TODO: Crie uma instância do driver RTC e imprima a hora atual.\\n\"\n\n#~ msgid \"// TODO: Wait for 3 seconds.\\n\"\n#~ msgstr \"// TODO: Aguarde 3 segundos.\\n\"\n\n#~ msgid \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ msgstr \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n\n#~ msgid \"\\\"sync_exception_current\\\"\"\n#~ msgstr \"\\\"sync_exception_current\\\"\"\n\n#~ msgid \"\\\"irq_current\\\"\"\n#~ msgstr \"\\\"irq_current\\\"\"\n\n#~ msgid \"\\\"No pending interrupt\\\"\"\n#~ msgstr \"\\\"Nenhuma interrupção pendente\\\"\"\n\n#~ msgid \"\\\"IRQ {intid:?}\\\"\"\n#~ msgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#~ msgid \"\\\"fiq_current\\\"\"\n#~ msgstr \"\\\"fiq_current\\\"\"\n\n#~ msgid \"\\\"serr_current\\\"\"\n#~ msgstr \"\\\"serr_current\\\"\"\n\n#~ msgid \"\\\"sync_lower\\\"\"\n#~ msgstr \"\\\"sync_lower\\\"\"\n\n#~ msgid \"\\\"irq_lower\\\"\"\n#~ msgstr \"\\\"irq_lower\\\"\"\n\n#~ msgid \"\\\"fiq_lower\\\"\"\n#~ msgstr \"\\\"fiq_lower\\\"\"\n\n#~ msgid \"\\\"serr_lower\\\"\"\n#~ msgstr \"\\\"serr_lower\\\"\"\n\n#~ msgid \"// ANCHOR: main\\n\"\n#~ msgstr \"// ANCHOR: main\\n\"\n\n#~ msgid \"// ANCHOR: Flags\\n\"\n#~ msgstr \"// ANCHOR: Flags\\n\"\n\n#~ msgid \"// ANCHOR_END: Flags\\n\"\n#~ msgstr \"// ANCHOR_END: Flags\\n\"\n\n#~ msgid \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n#~ msgstr \"\"\n#~ \"/// Flags do Registrador de Status de Recebimento / Registrador de \"\n#~ \"Limpeza de Erro UART.\\n\"\n\n#~ msgid \"/// Framing error.\\n\"\n#~ msgstr \"/// Erro de enquadramento.\\n\"\n\n#~ msgid \"/// Parity error.\\n\"\n#~ msgstr \"/// Erro de paridade.\\n\"\n\n#~ msgid \"/// Break error.\\n\"\n#~ msgstr \"/// Erro de interrupção.\\n\"\n\n#~ msgid \"/// Overrun error.\\n\"\n#~ msgstr \"/// Erro de estouro.\\n\"\n\n#~ msgid \"// ANCHOR: Registers\\n\"\n#~ msgstr \"// ANCHOR: Registers\\n\"\n\n#~ msgid \"// ANCHOR_END: Registers\\n\"\n#~ msgstr \"// ANCHOR_END: Registers\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver para um UART PL011.\\n\"\n\n#~ msgid \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n#~ msgstr \"\"\n#~ \"/// Constrói uma nova instância do driver UART para um dispositivo PL011 \"\n#~ \"no endereço\\n\"\n#~ \"    /// base fornecido.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Segurança\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// O endereço base fornecido deve apontar para os registradores de \"\n#~ \"controle MMIO de um\\n\"\n#~ \"    /// dispositivo PL011, que deve ser mapeado no espaço de endereço do \"\n#~ \"processo\\n\"\n#~ \"    /// como memória de dispositivo e não ter nenhum outro _alias_.\\n\"\n\n#~ msgid \"// ANCHOR_END: Uart\\n\"\n#~ msgstr \"// ANCHOR_END: Uart\\n\"\n\n#~ msgid \"\\\"linux\\\"\"\n#~ msgstr \"\\\"linux\\\"\"\n\n#~ msgid \"\\\"CROSS_COMPILE\\\"\"\n#~ msgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"\\\"aarch64-linux-gnu\\\"\"\n\n#~ msgid \"\\\"aarch64-none-elf\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#~ msgid \"\\\"entry.S\\\"\"\n#~ msgstr \"\\\"entry.S\\\"\"\n\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"\\\"exceptions.S\\\"\"\n\n#~ msgid \"\\\"idmap.S\\\"\"\n#~ msgstr \"\\\"idmap.S\\\"\"\n\n#~ msgid \"\\\"empty\\\"\"\n#~ msgstr \"\\\"empty\\\"\"\n\n#~ msgid \"# Copyright 2023 Google LLC\"\n#~ msgstr \"# Copyright 2023 Google LLC\"\n\n#~ msgid \"$(shell uname -s)\"\n#~ msgstr \"$(shell uname -s)\"\n\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-linux-gnu\"\n\n#~ msgid \"stdio -display none -kernel $< -s\"\n#~ msgstr \"stdio -display none -kernel $< -s\"\n\n#~ msgid \"cargo clean\"\n#~ msgstr \"cargo clean\"\n\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 --- the main \"\n#~ \"thread is not waiting.\"\n#~ msgstr \"\"\n#~ \"Observe que a _thread_ é interrompida antes de atingir 10 --- a _thread_ \"\n#~ \"principal não está esperando.\"\n\n#~ msgid \"\"\n#~ \"Rust uses the type system to enforce synchronization of shared data. This \"\n#~ \"is primarily done via two types:\"\n#~ msgstr \"\"\n#~ \"Rust usa o sistema de tipos para impor a sincronização de dados \"\n#~ \"compartilhados. Isso é feito principalmente através de dois tipos:\"\n\n#~ msgid \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T`: handles sharing between threads and takes care to \"\n#~ \"deallocate `T` when the last reference is dropped,\"\n#~ msgstr \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), \"\n#~ \"referência atômica contada `T`: manipula o compartilhamento entre \"\n#~ \"_threads_ e toma o cuidado de desalocar `T` quando a última referência é \"\n#~ \"descartada,\"\n\n#~ msgid \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"ensures mutually exclusive access to the `T` value.\"\n#~ msgstr \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"garante acesso mutuamente exclusivo ao valor `T`.\"\n\n#~ msgid \"Let us practice our new concurrency skills with\"\n#~ msgstr \"Vamos praticar nossas novas habilidades em concorrência com\"\n\n#~ msgid \"Dining philosophers: a classic problem in concurrency.\"\n#~ msgstr \"Jantar dos Filósofos: um problema clássico em concorrência.\"\n\n#~ msgid \"\"\n#~ \"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n#~ \"download dependencies and then check links in parallel.\"\n#~ msgstr \"\"\n#~ \"Verificador de links multithread: um projeto maior onde você usará o \"\n#~ \"Cargo para baixar dependências e, em seguida, verificar links em paralelo.\"\n\n#~ msgid \"\"\n#~ \"For this, you will need an HTTP client such as [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency \"\n#~ \"with:\"\n#~ msgstr \"\"\n#~ \"Para isso, você precisará de um cliente HTTP como [`reqwest`](https://\"\n#~ \"docs.rs/reqwest/). Crie um novo Project com o Cargo e adicione `reqwest` \"\n#~ \"como uma dependência:\"\n\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://\"\n#~ \"docs.rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"Você também precisará de uma maneira de encontrar links. Podemos usar \"\n#~ \"[`scraper`](https://docs.rs/scraper/) para isso:\"\n\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"Por fim, precisaremos de alguma forma de lidar com os erros. Usamos \"\n#~ \"[`thiserror`](https://docs.rs/thiserror/) para isso:\"\n\n#~ msgid \"Concurrency Morning Exercise\"\n#~ msgstr \"Exercício Matinal sobre Concorrência\"\n\n#~ msgid \"([back to exercise](dining-philosophers.md))\"\n#~ msgstr \"([voltar ao exercício](dining-philosophers.md))\"\n\n#~ msgid \"([back to exercise](link-checker.md))\"\n#~ msgstr \"([voltar ao exercício](link-checker.md))\"\n\n#~ msgid \"Async Rust\"\n#~ msgstr \"Rust _Async_\"\n\n#~ msgid \"Futures Control Flow\"\n#~ msgstr \"Fluxo de Controle de _Futures_\"\n\n#~ msgid \"\"\n#~ \"Futures can be combined together to produce concurrent compute flow \"\n#~ \"graphs. We have already seen tasks, that function as independent threads \"\n#~ \"of execution.\"\n#~ msgstr \"\"\n#~ \"As _futures_ podem ser combinadas para produzir gráficos de fluxo de \"\n#~ \"computação concorrente. Já vimos tarefas, que funcionam como _threads_ de \"\n#~ \"execução independentes.\"\n\n#~ msgid \"Pitfalls of async/await\"\n#~ msgstr \"Armadilhas do _async/await_\"\n\n#~ msgid \"[Pin](pitfalls/pin.md)\"\n#~ msgstr \"[Pin](pitfalls/pin.md)\"\n\n#~ msgid \"\"\n#~ \"When you await a future, all local variables (that would ordinarily be \"\n#~ \"stored on a stack frame) are instead stored in the Future for the current \"\n#~ \"async block. If your future has pointers to data on the stack, those \"\n#~ \"pointers might get invalidated. This is unsafe.\"\n#~ msgstr \"\"\n#~ \"Quando você aguarda uma _future_, todas as variáveis locais (que \"\n#~ \"normalmente seriam armazenadas em um quadro de pilha) são armazenadas na \"\n#~ \"_Future_ para o bloco _async_ atual. Se sua _future_ tiver ponteiros para \"\n#~ \"dados na pilha, esses ponteiros podem ser invalidados. Isso é inseguro.\"\n\n#~ msgid \"\"\n#~ \"Therefore, you must guarantee that the addresses your future points to \"\n#~ \"don't change. That is why we need to \\\"pin\\\" futures. Using the same \"\n#~ \"future repeatedly in a `select!` often leads to issues with pinned values.\"\n#~ msgstr \"\"\n#~ \"Portanto, você deve garantir que os endereços para os quais sua _future_ \"\n#~ \"aponta não mudem. É por isso que precisamos \\\"fixar\\\" _futures_. Usar a \"\n#~ \"mesma _future_ repetidamente em um `select!` frequentemente leva a \"\n#~ \"problemas com valores fixados.\"\n\n#~ msgid \"\"\n#~ \"Async methods in traits are not yet supported in the stable channel ([An \"\n#~ \"experimental feature exists in nightly and should be stabilized in the \"\n#~ \"mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-\"\n#~ \"trait-nightly.html))\"\n#~ msgstr \"\"\n#~ \"Métodos _async_ em _traits_ ainda não são suportados no canal estável \"\n#~ \"([Um recurso experimental existe no _nightly_ e deve ser estabilizado a \"\n#~ \"médio prazo.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-\"\n#~ \"in-trait-nightly.html))\"\n\n#~ msgid \"\"\n#~ \"To practice your Async Rust skills, we have again two exercises for you:\"\n#~ msgstr \"\"\n#~ \"Para praticar suas habilidades em Rust Async, temos novamente dois \"\n#~ \"exercícios para você:\"\n\n#~ msgid \"\"\n#~ \"Dining philosophers: we already saw this problem in the morning. This \"\n#~ \"time you are going to implement it with Async Rust.\"\n#~ msgstr \"\"\n#~ \"Jantar dos Filósofos: já vimos esse problema de manhã. Desta vez, você \"\n#~ \"vai implementá-lo com Rust Async.\"\n\n#~ msgid \"\"\n#~ \"A Broadcast Chat Application: this is a larger project that allows you \"\n#~ \"experiment with more advanced Async Rust features.\"\n#~ msgstr \"\"\n#~ \"Um aplicativo de bate-papo por _broadcast_: este é um projeto maior que \"\n#~ \"permite experimentar com recursos mais avançados de Rust Async.\"\n\n#~ msgid \"Concurrency Afternoon Exercise\"\n#~ msgstr \"Exercício de Concorrência da Tarde\"\n\n#~ msgid \"([back to exercise](dining-philosophers-async.md))\"\n#~ msgstr \"([voltar ao exercício](dining-philosophers-async.md))\"\n\n#~ msgid \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n#~ msgstr \"\"\n#~ \"// Adicione um atraso antes de pegar o segundo garfo para permitir a \"\n#~ \"execução\\n\"\n#~ \"        // transferir para outra tarefa\\n\"\n\n#~ msgid \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n#~ msgstr \"\"\n#~ \"// Para evitar um travamento, temos que quebrar a simetria\\n\"\n#~ \"            // em algum lugar. Isso trocará os garfos sem desinicializar\\n\"\n#~ \"            // nenhum deles.\\n\"\n\n#~ msgid \"([back to exercise](chat-app.md))\"\n#~ msgstr \"([voltar ao exercício](chat-app.md))\"\n\n#~ msgid \"{{%session outline}}\"\n#~ msgstr \"{{%session outline}}\"\n\n#~ msgid \"{{%segment outline}}\"\n#~ msgstr \"{{%segment outline}}\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Um Pequeno Exemplo\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Por que Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Garantias em Tempo de Compilação\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Garantias em Tempo de Execução\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Recursos Modernos\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Sintaxe Básica\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String vs str\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"Rustdoc\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Sobrecarga\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Matrizes e Loops for\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stack vs Heap\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Memória de Pilha\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Gerenciamento Manual de Memória\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Gerenciamento de Memória Baseado em Escopo\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Gerenciamento Automático de Memória\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Gerenciamento de Memória no Rust\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Comparação\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Strings Movidas em Rust\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Move em Chamadas de Função\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Copia e Clonagem\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Empréstimos Compartilhados e Únicos\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"Armazenando Livros\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Iteradores e Ownership (Posse)\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Sintaxe Abreviada de Campos\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Conteúdos Variantes\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Tamanhos de Enum\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Desestruturando Matrizes\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Guardas de Correspondência (Match Guards)\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Pontos e Polígonos\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"Expressões if\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"Expressões if let\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"Loops while\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"Loops for\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"Expressões loop\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"Expressões match (Correspondência)\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break e continue\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option e Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Box com Estruturas de Dados Recursivas\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Cell/RefCell\"\n#~ msgstr \"Cell/RefCell\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Strings e Iteradores\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Métodos Genéricos\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Monomorfização\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Métodos Padrão\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"Trait impl\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Traits Importantes\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From e Into\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Operadores: Add, Mul, ...\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Capturando o Desenrolar da Pilha\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Tratamento Estruturado de Erros\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Propagando Erros com ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Convertendo Tipos de Erro\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Derivando Enums de Erro\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Adicionando Contexto aos Erros\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send e Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"Dia 1 Manhã\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"Dia 1 Tarde\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"Dia 2 Manhã\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"Dia 2 Tarde\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"Dia 3 Manhã\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"Dia 3 Tarde\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Concorrência Manhã\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Concorrência Tarde\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"O curso é rápido e muito abrangente:\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"\"\n#~ \"Dia 1: Rust básico, _ownership_ (\\\"posse\\\") e o _borrow checker_ \"\n#~ \"(\\\"verificador de empréstimo\\\").\"\n\n#~ msgid \"Day 2: Compound data types,  pattern matching, the standard library.\"\n#~ msgstr \"\"\n#~ \"Dia 2: Tipos de dados compostos, correspondência de padrões e a \"\n#~ \"biblioteca padrão.\"\n\n#~ msgid \"Day 3: Traits and generics, error handling, testing, unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Dia 3: _Traits_ (\\\"características\\\") e genéricos, tratamento de erros, \"\n#~ \"testes e _unsafe_ (\\\"inseguro\\\") Rust.\"\n\n#~ msgid \"Concurrency\"\n#~ msgstr \"Concorrência\"\n\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Nós sugerimos a utilização do [VS Code](https://code.visualstudio.com/) \"\n#~ \"para editar o código (mas qualquer editor LSP - _Language Server \"\n#~ \"Protocol_ - funciona com o rust-analyzer[3](https://rust-analyzer.github.\"\n#~ \"io/)).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Algumas pessoas também gostam de usar a família de IDEs [JetBrains]\"\n#~ \"(https://www.jetbrains.com/clion/), que fazem suas próprias análises, mas \"\n#~ \"têm suas próprias vantagens e desvantagens. Se você preferi-las, pode \"\n#~ \"instalar o [Plugin Rust](https://www.jetbrains.com/rust/). Observe que, a \"\n#~ \"partir de Janeiro de 2023, a depuração funciona apenas na versão CLion do \"\n#~ \"pacote JetBrains IDEA.\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Gerenciamento de memória: pilha versus heap, gerenciamento de memória \"\n#~ \"manual, gerenciamento de memória baseado em escopo e _garbage collection_ \"\n#~ \"(coleta de lixo).\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"_Ownership_ (posse): semântica de _move_, cópia e clonagem, _borrow_ \"\n#~ \"(empréstimo) e _lifetime_ (tempo de vida).\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"A ideia para o primeiro dia é mostrar _apenas o suficiente_ de Rust para \"\n#~ \"poder falar sobre o famoso _borrow checker_ (verificador de empréstimos). \"\n#~ \"A maneira como o Rust lida com a memória é uma característica importante \"\n#~ \"e devemos mostrar isso aos alunos imediatamente.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Se você estiver ensinando isso em uma sala de aula, este é um bom lugar \"\n#~ \"para repassar o cronograma. Sugerimos dividir o dia em duas partes \"\n#~ \"(seguindo os slides):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Manhã: 9h às 12h,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Tarde: 13h às 16h.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"É claro que você pode ajustar isso conforme necessário. Certifique-se de \"\n#~ \"incluir pausas, recomendamos uma a cada hora!\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Aqui está um pequeno programa de exemplo em Rust:\"\n\n#~ msgid \"// Program entry point\\n\"\n#~ msgstr \"// Ponto de entrada do programa\\n\"\n\n#~ msgid \"// Mutable variable binding\\n\"\n#~ msgstr \"// Atribuição de uma variável mutável\\n\"\n\n#~ msgid \"\\\"{x}\\\"\"\n#~ msgstr \"\\\"{x}\\\"\"\n\n#~ msgid \"// Macro for printing, like printf\\n\"\n#~ msgstr \"// Macro para escrever na tela, como printf\\n\"\n\n#~ msgid \"\\\" -> {x}\\\"\"\n#~ msgstr \"\\\" -> {x}\\\"\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"O código implementa a conjectura de Collatz: acredita-se que o loop \"\n#~ \"sempre termina, mas isso ainda não está provado. Edite o código e tente \"\n#~ \"diferentes entradas.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Explique que todas as variáveis tipadas estaticamente. Tente remover \"\n#~ \"`i32` para acionar a inferência de tipo. Em vez disso, tente com `i8` e \"\n#~ \"cause um estouro de número inteiro (_integer overflow_) em tempo de \"\n#~ \"execução.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Altere `let mut x` para `let x`, discuta o erro do compilador.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Mostre como `print!` cause um erro de compilação se os argumentos não \"\n#~ \"corresponderem à string de formato.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Mostre como você precisa usar `{}` como um espaço reservado se quiser \"\n#~ \"imprimir uma expressão que seja mais complexa do que apenas uma única \"\n#~ \"variável.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Mostre aos alunos a biblioteca padrão (_standard library_), mostre como \"\n#~ \"pesquisar `std::fmt`, o qual possui as regras da mini-linguagem de \"\n#~ \"formatação. É importante que os alunos se familiarizem com pesquisas na \"\n#~ \"biblioteca padrão.\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"Em um shell `rustup doc std::fmt` abrirá um navegador na documentação \"\n#~ \"std::fmt local.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Segurança de memória em tempo de compilação.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Sem comportamento indefinido em tempo de execução.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Recursos de linguagem de programação modernas.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Gerenciamento de memória estática em tempo de compilação:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Sem vazamentos de memória (_quase_, veja as notas).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"É possível produzir vazamentos de memória no Rust (seguro). Alguns \"\n#~ \"exemplos são:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Você pode usar [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.\"\n#~ \"Box.html#method.leak) para vazar um ponteiro. Um uso para isso poderia \"\n#~ \"ser para obter variáveis estáticas inicializadas e dimensionadas em tempo \"\n#~ \"de execução\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Você pode usar [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) para fazer o compilador \\\"esquecer\\\" sobre um valor (o que \"\n#~ \"significa que o destrutor nunca é executado).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Você também pode criar acidentalmente uma [referência cíclica](https://\"\n#~ \"doc.rust-lang.org/book/ch15-06-reference-cycles.html) com `Rc` ou `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"Na verdade, alguns considerarão que preencher infinitamente uma coleção \"\n#~ \"(estruturas de dados) seja um vazamento de memória e o Rust não protege \"\n#~ \"disso.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Para o propósito deste curso, \\\"Sem vazamentos de memória\\\" deve ser \"\n#~ \"entendido como \\\"Praticamente sem vazamentos de memória _acidentais_\\\".\"\n\n#~ msgid \"No undefined behavior at runtime:\"\n#~ msgstr \"Nenhum comportamento indefinido em tempo de execução:\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"O estouro de números inteiros é definido por meio da _flag_ [`overflow-\"\n#~ \"checks`](https://doc.rust-lang.org/rustc/codegen-options/index.\"\n#~ \"html#overflow-checks) em tempo de compilação. Se habilitada, o programa \"\n#~ \"causará um pânico (uma falha controlada do programa). Caso contrário, \"\n#~ \"será usada a semântica _wrap-around_. Por padrão, você obtém pânicos em \"\n#~ \"modo de depuração (`cargo build`) e _wrap-around_ em modo de produção \"\n#~ \"(`cargo build --release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"A verificação de limites (\\\"_bounds checking_\\\") não pode ser desativada \"\n#~ \"com uma _flag_ do compilador. Ela também não pode ser desativada \"\n#~ \"diretamente com a palavra-chave `unsafe`. No entanto, `unsafe` permite \"\n#~ \"que você chame funções como `slice::get_unchecked` que não faz \"\n#~ \"verificação de limites.\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"\"\n#~ \"O Rust é construído com toda a experiência adquirida nas últimas décadas.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Características da Linguagem\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Ferramentas\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Abstrações de custo zero, semelhantes ao C++, significa que você não \"\n#~ \"precisa 'pagar' por construções de programação de alto nível com memória \"\n#~ \"ou CPU. Por exemplo, escrever um loop usando `for` deve resultar \"\n#~ \"aproximadamente no mesmo nível de instruções de baixo nível quanto usar a \"\n#~ \"construção `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Pode valer a pena mencionar que Rust enums são 'Tipos de Dados \"\n#~ \"Algébricos' ('_Algebraic Data Types_'), também conhecidos como 'tipos de \"\n#~ \"soma', que permitem que o sistema de tipos expresse coisas como \"\n#~ \"`Option<T>` e `Result<T, E>`.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Lembre as pessoas de lerem os erros --- muitos desenvolvedores se \"\n#~ \"acostumaram ignore as longas mensagens do compilador. O compilador Rust é \"\n#~ \"significativamente mais \\\"verbal\\\" do que outros compiladores. Muitas \"\n#~ \"vezes, ele lhe fornecerá sugestões _práticas_, prontas para copiar e \"\n#~ \"colar em seu código.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"A biblioteca padrão do Rust (_Rust standard library_) é pequena comparada \"\n#~ \"a linguagens como Java, Python e Go. Rust não vem com várias coisas que \"\n#~ \"você pode considerar padrão e essencial:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"\"\n#~ \"um gerador de números aleatórios, mas veja [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"suporte para SSL ou TLS, mas consulte [rusttls](https://docs.rs/rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"suporte para JSON, mas consulte [serde_json](https://docs.rs/serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"O raciocínio por trás disso é que funcionalidade na biblioteca padrão não \"\n#~ \"pode ser descartada, portanto ela tem que ser muito estável. Para os \"\n#~ \"exemplos acima, a comunidade do Rust ainda está trabalhando para \"\n#~ \"encontrar a melhor solução --- e talvez não exista uma única \\\"melhor \"\n#~ \"solução\\\" para algumas dessas coisas.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust vem com um gerenciador de pacotes embutido na forma de Cargo e isso \"\n#~ \"torna trivial baixar e compilar _crates_ de terceiros. Uma consequência \"\n#~ \"disso é que a biblioteca padrão pode ser menor.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Descobrir bons _crates_ de terceiros pode ser um problema. Sites como \"\n#~ \"<https://lib.rs/> ajudam com isso, permitindo que você compare métricas \"\n#~ \"de _crates_ para encontrar um bom e confiável.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) é uma implementação LSP \"\n#~ \"bem suportada usada pelas principais IDEs e editores de texto.\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n\n#~ msgid \"r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#\"\n#~ msgstr \"r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#\"\n\n#~ msgid \"\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\"\"\n#~ msgstr \"\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\"\"\n\n#~ msgid \"b\\\"abc\\\"\"\n#~ msgstr \"b\\\"abc\\\"\"\n\n#~ msgid \"\\\"1st index: {}\\\"\"\n#~ msgstr \"\\\"1º índice: {}\\\"\"\n\n#~ msgid \"\\\"2nd index: {}\\\"\"\n#~ msgstr \"\\\"2º índice: {}\\\"\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Como C++, o Rust tem referências:\"\n\n#~ msgid \"Some notes:\"\n#~ msgstr \"Algumas notas:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Devemos desreferenciar `ref_x` ao atribuí-lo um valor, semelhante à \"\n#~ \"ponteiros em C e C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"As referências que são declaradas como `mut` podem ser vinculadas a \"\n#~ \"diferentes valores ao longo de seu tempo de vida.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Diz-se que uma referência \\\"pega emprestado\\\" o valor a que se refere.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust está rastreando os tempos de vida de todas as referências para \"\n#~ \"garantir que elas durem o suficiente.\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` vs `str`\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Você pode emprestar _slices_ `&str` de `String` através do operador `&` \"\n#~ \"e, opcionalmente, selecionar um _range_ (\\\"intervalo\\\").\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Uma versão em Rust da famosa pergunta de entrevistas [FizzBuzz](https://\"\n#~ \"en.wikipedia.org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\\\"fizz\\\"\"\n#~ msgstr \"\\\"fizz\\\"\"\n\n#~ msgid \"\\\"buzz\\\"\"\n#~ msgstr \"\\\"buzz\\\"\"\n\n#~ msgid \"\\\"{n}\\\"\"\n#~ msgstr \"\\\"{n}\\\"\"\n\n#~ msgid \"\\\"{fizz}{buzz}\\\"\"\n#~ msgstr \"\\\"{fizz}{buzz}\\\"\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"Nos referimos em `main` a uma função escrita abaixo. Nem declarações \"\n#~ \"prévias e nem cabeçalhos são necessários.\"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"A expressão de intervalo no loop `for` em `imprimir_fizzbuzz_para()` \"\n#~ \"contém `=n`, o que faz com que inclua o limite superior.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Todos os itens da linguagem podem ser documentados com a sintaxe especial \"\n#~ \"`///`.\"\n\n#~ msgid \"// Corner case, early return\\n\"\n#~ msgstr \"// Caso excepcional, retorne antes\\n\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Este curso não inclui o rustdoc nos slides, apenas para economizar \"\n#~ \"espaço, mas em código real eles devem estar presentes.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"Os comentários internos do documento são discutidos posteriormente (na \"\n#~ \"página sobre módulos) e não precisam ser ser abordados aqui.\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"Os comentários do Rustdoc podem conter trechos de código-fonte, que podem \"\n#~ \"ser executados e testados por meio de `cargo test`. Nós discutiremos \"\n#~ \"estes testes na [seção de Testes](../testing/doc-tests.html).\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Métodos são funções associadas a um tipo específico. O primeiro argumento \"\n#~ \"(`self`) de um método é uma instância do tipo ao qual está associado:\"\n\n#~ msgid \"\\\"old area: {}\\\"\"\n#~ msgstr \"\\\"area antiga: {}\\\"\"\n\n#~ msgid \"\\\"new area: {}\\\"\"\n#~ msgstr \"\\\"nova area: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Veremos muito mais sobre métodos no exercício de hoje e na aula de amanhã.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"\"\n#~ \"Adicione um método estático chamado `Retangulo::new` e o chame a partir \"\n#~ \"de `main`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"Enquanto _tecnicamente_, o Rust não possui construtores customizados, \"\n#~ \"métodos estáticos são normalmente usados para inicializar _structs_ \"\n#~ \"(embora não sejam necessários). The construtor propriamente dito, \"\n#~ \"`Retangulo { largura, altura }`, poderia ser chamado diretamente. Veja o \"\n#~ \"[Rustnomicon](https://doc.rust-lang.org/nomicon/constructors.html).\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Adicione um construtor `Retangulo::novo_quadrado(largura: u32)` para \"\n#~ \"demonstrar que tais métodos estáticos podem ter parâmetros arbitrários.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Sobrecarga de Funções\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Sobrecarga não é suportada:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Sempre tem um número fixo de parâmetros.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Valores padrão não são suportados:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Todos as chamadas têm o mesmo número de argumentos.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Às vezes macros são utilizadas como alternativa.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"No entanto, os parâmetros da função podem ser tipos genéricos:\"\n\n#~ msgid \"\\\"coin toss: {}\\\"\"\n#~ msgstr \"\\\"lance da moeda: {}\\\"\"\n\n#~ msgid \"\\\"heads\\\"\"\n#~ msgstr \"\\\"cara\\\"\"\n\n#~ msgid \"\\\"tails\\\"\"\n#~ msgstr \"\\\"coroa\\\"\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"Ao usar tipos genéricos, o `Into<T>` da biblioteca padrão pode fornecer \"\n#~ \"um tipo de polimorfismo limitado nos tipos de argumento. Veremos mais \"\n#~ \"detalhes em uma seção posterior.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Dia 1: Exercícios Matinais\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"Nestes exercícios, vamos explorar duas partes do Rust:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Conversões implícitas entre tipos.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Matrizes (_Arrays_) e _loops_ (laços) `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"Algumas coisas a considerar ao resolver os exercícios:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Se possível, use uma instalação local do Rust. Desta forma, você pode \"\n#~ \"obter preenchimento automático em seu editor. Veja a página sobre \"\n#~ \"[Utilização do Cargo](../../cargo.md) para detalhes sobre instalação do \"\n#~ \"Rust.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"Alternativamente, utilize o Rust Playground.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Os trechos de código não são editáveis de propósito: os trechos de código \"\n#~ \"embutidos perdem seu estado se você sair da página.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust não aplicará automaticamente _conversões implícitas_ entre os tipos \"\n#~ \"([ao contrário de C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Você pode ver isso em um programa como este:\"\n\n#~ msgid \"\\\"{x} * {y} = {}\\\"\"\n#~ msgstr \"\\\"{x} * {y} = {}\\\"\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Todos os tipos inteiros do Rust implementam os _traits_ [`From<T>`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.From.html) e [`Into<T>`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) para nos deixar \"\n#~ \"converter entre eles. O trait `From<T>` tem um único método `from()` e da \"\n#~ \"mesma forma, o trait `Into<T>` tem um único método `into()`. A \"\n#~ \"implementação desses traits é como um tipo expressa que pode ser \"\n#~ \"convertido em outro tipo.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"A biblioteca padrão tem uma implementação de `From<i8> for i16`, o que \"\n#~ \"significa que podemos converter uma variável `x` do tipo `i8` para um \"\n#~ \"`i16` chamando `i16::from(x)`. Ou, mais simples, com `x.into()`, porque a \"\n#~ \"implementação `From<i8> for i16` cria automaticamente uma implementação \"\n#~ \"de `Into<i16> for i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"O mesmo se aplica às suas próprias implementações de `From` para seus \"\n#~ \"próprios tipos, logo é suficiente implementar apenas `From` para obter \"\n#~ \"uma respectiva implementação `Into` automaticamente.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"Execute o programa acima e observe o erro de compilação.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Atualize o código acima para utilizar `into()` para fazer a conversão.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Mude os tipos de `x` e `y` para outros tipos (como `f32`, `bool`, `i128`) \"\n#~ \"para ver quais tipos você pode converter para quais outros tipos. \"\n#~ \"Experimente converter tipos pequenos em tipos grandes e vice-versa. \"\n#~ \"Verifique a [documentação da biblioteca padrão](https://doc.rust-lang.org/\"\n#~ \"std/convert/trait.From.html) para ver se `From<T>` está implementado para \"\n#~ \"os pares que você verificar.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Matrizes (_Arrays_) e _Loops_ (Laços) `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Vimos que uma matriz pode ser declarada assim:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Você pode imprimir tal matriz solicitando sua representação de depuração \"\n#~ \"com `{:?}`:\"\n\n#~ msgid \"\\\"array: {array:?}\\\"\"\n#~ msgstr \"\\\"matriz: {array:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust permite iterar em coisas como matrizes e _ranges_ (faixas ou \"\n#~ \"intervalos) usando a palavra-chave `for`:\"\n\n#~ msgid \"\\\"Iterating over array:\\\"\"\n#~ msgstr \"\\\"Iterando sobre a matriz:\\\"\"\n\n#~ msgid \"\\\" {n}\\\"\"\n#~ msgstr \"\\\" {n}\\\"\"\n\n#~ msgid \"\\\"Iterating over range:\\\"\"\n#~ msgstr \"\\\"Iterando sobre um range:\\\"\"\n\n#~ msgid \"\\\" {}\\\"\"\n#~ msgstr \"\\\" {}\\\"\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Pergunta Bônus\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Você poderia usar slices `&[i32]` em vez de matrizes 3 × 3 fixas no \"\n#~ \"código para o seu argumento e tipos de retorno? Algo como `&[&[i32]]` \"\n#~ \"para um slice-de-slices bidimensional. Por que sim ou por que não?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Veja o crate [`ndarray`](https://docs.rs/ndarray/) para uma implementação \"\n#~ \"de  produção.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"A solução e a resposta para a seção de bônus estão disponíveis na Seção \"\n#~ \"[Soluções](solutions-morning.md#arrays-and-for-loops).\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"O uso da referência `&matriz` em `for n in &matriz` é uma prévia sutil \"\n#~ \"das questões de propriedade que surgirão à tarde.\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"Sem o `&`...\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"O loop teria sido o que consome a matriz. Esta é uma mudança [introduzida \"\n#~ \"na Edição de 2021](https://doc.rust-lang.org/edition-guide/rust-2021/\"\n#~ \"IntoIterator-for-arrays.html).\"\n\n#~ msgid \"\"\n#~ \"An implicit array copy would have occured.  Since `i32` is a copy type, \"\n#~ \"then `[i32; 3]` is also a copy type.\"\n#~ msgstr \"\"\n#~ \"Uma cópia implícita da matriz teria ocorrido. Como `i32` é um tipo de \"\n#~ \"cópia (_copy type_), então `[i32; 3]` também é um tipo de cópia.\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Devido à inferência de tipos, o `i32` é opcional. Gradualmente \"\n#~ \"mostraremos os tipos cada vez menos à medida que o curso progride.\"\n\n#~ msgid \"\\\"u32: {x}\\\"\"\n#~ msgstr \"\\\"u32: {x}\\\"\"\n\n#~ msgid \"// takes_u32(y);\\n\"\n#~ msgstr \"// recebe_u32(y);\\n\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"O código a seguir informa ao compilador para copiar para um determinado \"\n#~ \"contêiner genérico sem que o código especifique explicitamente o tipo \"\n#~ \"contido, usando `_` como _placeholder_:\"\n\n#~ msgid \"\\\"vv: {vv:?}\\\"\"\n#~ msgstr \"\\\"vv: {vv:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) depende de [`FromIterator`](https://doc.rust-lang.\"\n#~ \"org/std/iter/trait.FromIterator.html), que [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implementa.\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Variáveis Estáticas e Constantes\"\n\n#~ msgid \"\\\"Digest: {digest:?}\\\"\"\n#~ msgstr \"\\\"Resumo: {digest:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"O código a seguir demonstra por que o compilador não pode simplesmente \"\n#~ \"reutilizar locais de memória ao sobrepor uma variável imutável em um \"\n#~ \"escopo, mesmo que o tipo não seja alterado.\"\n\n#~ msgid \"\\\"{a} {b}\\\"\"\n#~ msgstr \"\\\"{a} {b}\\\"\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"Primeiro, vamos rever como funciona o gerenciamento de memória.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"A Pilha (_Stack_) vs O _Heap_\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Exemplo de Pilha e _Heap_\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Você mesmo aloca e desaloca memória no heap.\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Se isto não for feito com cuidado, travamentos, bugs, vulnerabilidades de \"\n#~ \"segurança e vazamentos de memória podem ocorrer.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"Exemplo em C\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"Você deve chamar `free` em cada ponteiro que alocar com `malloc`:\"\n\n#~ msgid \"\"\n#~ \"//\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ msgstr \"\"\n#~ \"//\\n\"\n#~ \"    // ... várias linhas de código\\n\"\n#~ \"    //\\n\"\n\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"Memória é vazada se a função retornar mais cedo entre `malloc` e `free`: \"\n#~ \"o ponteiro é perdido e não podemos liberar a memória. Pior ainda, \"\n#~ \"liberando o ponteiro duas vezes, ou acessando um ponteiro já liberado \"\n#~ \"pode levar a vulnerabilidades de segurança.\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Construtores e destrutores permitem que o tempo de vida de um objeto seja \"\n#~ \"rastreado.\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Ao envolver um ponteiro em um objeto, você pode liberar memória quando o \"\n#~ \"objeto é destruído. O compilador garante que isso aconteça, mesmo que uma \"\n#~ \"exceção seja lançada.\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Isso geralmente é chamado de _aquisição de recursos é inicialização_ \"\n#~ \"(_Resource Acquisition Is Initialization_, RAII) e fornece ponteiros \"\n#~ \"inteligentes (_smart pointers_).\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"O objeto `std::unique_ptr` é alocado na pilha e aponta para memória \"\n#~ \"alocada no heap.\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"\"\n#~ \"No final de `diga_ola`, o destrutor `std::unique_ptr` será executado.\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"O destrutor libera o objeto `Pessoa` para o qual ele aponta.\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Construtores especiais de movimento (_move_) são usados ao passar o \"\n#~ \"_\\\"ownership\\\"_ para uma função:\"\n\n#~ msgid \"\\\"Carla\\\"\"\n#~ msgstr \"\\\"Carla\\\"\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Uma alternativa ao gerenciamento de memória manual e baseado em escopo é \"\n#~ \"o gerenciamento automático de memória:\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"O programador nunca aloca ou desaloca memória explicitamente.\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Um \\\"coletor de lixo\\\" (_garbage collector_) encontra memória não \"\n#~ \"utilizada e a desaloca para o programador.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Exemplo em Java\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"O objeto `pessoa` não é desalocado depois que `digaOla` retorna:\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Gerenciamento de Memória no Rust\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"O gerenciamento de memória no Rust é uma combinação:\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Seguro e correto como Java, mas sem um coletor de lixo.\"\n\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"Dependendo de qual abstração (ou combinação de abstrações) você escolher, \"\n#~ \"pode ser um simples ponteiro único, referência contada ou referência \"\n#~ \"atomicamente contada.\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"Baseado em escopo como C++, mas o compilador impõe adesão total.\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Um usuário do Rust pode escolher a abstração certa para a situação, \"\n#~ \"algumas até sem custo em tempo de execução como C.\"\n\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"\"\n#~ \"O Rust consegue isso modelando o _ownership_ (posse) explicitamente.\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Neste ponto, se perguntado como, você pode mencionar que em Rust isso \"\n#~ \"geralmente é tratado por _wrappers_ (invólucros) RAII tais como [Box]\"\n#~ \"(https://doc.rust-lang.org/std/boxed/struct.Box.html), [Vec](https://doc.\"\n#~ \"rust-lang.org/std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/\"\n#~ \"std/rc/struct.Rc.html) ou [Arc](https://doc.rust-lang.org/std/sync/struct.\"\n#~ \"Arc.html). Eles encapsulam a propriedade (ownership) e a alocação de \"\n#~ \"memória por vários meios e previnem os erros possíveis em C.\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"Aqui você pode ser perguntado sobre destrutores, o _trait_ [Drop](https://\"\n#~ \"doc.rust-lang.org/std/ops/trait.Drop.html) é o equivalente em Rust.\"\n\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"\"\n#~ \"Aqui está uma comparação aproximada das técnicas de gerenciamento de \"\n#~ \"memória.\"\n\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"Vantagens de Diferentes Técnicas de Gerenciamento de Memória\"\n\n#~ msgid \"Manual like C:\"\n#~ msgstr \"Manual como C:\"\n\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"Nenhuma sobrecarga em tempo de execução.\"\n\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"Automático como Java:\"\n\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"Totalmente automatizado.\"\n\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"Seguro e correto.\"\n\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"Baseado em escopo como C++:\"\n\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"Parcialmente automático.\"\n\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"Baseado em escopo imposto pelo compilador como Rust:\"\n\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"Imposto pelo compilador.\"\n\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"Desvantagens de Diferentes Técnicas de Gerenciamento de Memória\"\n\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"Uso após a liberação (_use-after-free_).\"\n\n#~ msgid \"Double-frees.\"\n#~ msgstr \"Liberações duplas (_double-frees_).\"\n\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"Vazamentos de memória.\"\n\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"Pausas para coleta de lixo.\"\n\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"Atrasos na execução de destrutores.\"\n\n#~ msgid \"Complex, opt-in by programmer (on C++).\"\n#~ msgstr \"Complexo, o programador deve optar em utilizá-las.\"\n\n#~ msgid \"Circular references can lead to memory leaks\"\n#~ msgstr \"Referências circulares podem causar vazamentos de memória\"\n\n#~ msgid \"Potential runtime overhead\"\n#~ msgstr \"Potencial impacto negativo em desempenho em tempo de execução\"\n\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"Imposto pelo compilador e baseado em escopo como Rust:\"\n\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"Alguma complexidade inicial.\"\n\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"Pode rejeitar programas válidos.\"\n\n#~ msgid \"\\\"x: {}\\\"\"\n#~ msgstr \"\\\"x: {}\\\"\"\n\n#~ msgid \"\\\"y: {}\\\"\"\n#~ msgstr \"\\\"y: {}\\\"\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Um destrutor pode ser executado aqui para liberar recursos.\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"\"\n#~ \"Há sempre _exatamente_ uma associação de variável que possui (\\\"_owns_\\\") \"\n#~ \"um valor.\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Os dados no heap de `s1` são reutilizados para `s2`.\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"Quando `s1` sai do escopo, nada acontece (foi movido dele).\"\n\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"Trabalho Extra em C++ Moderno\"\n\n#~ msgid \"\\\"p2: {p2:?}\\\"\"\n#~ msgstr \"\\\"p2: {p2:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Se os alunos perguntarem sobre `derive`, basta dizer que isto é uma forma \"\n#~ \"de gerar código em Rust em tempo de compilação. Nesse caso, as \"\n#~ \"implementações padrão dos traits `Copy` e `Clone` são geradas.\"\n\n#~ msgid \"\\\"{p1:?} + {p2:?} = {p3:?}\\\"\"\n#~ msgstr \"\\\"{p1:?} + {p2:?} = {p3:?}\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"&p.0: {:p}\\\"\"\n#~ msgstr \"\\\"&p3.0: {:p}\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"&p3.0: {:p}\\\"\"\n#~ msgstr \"\\\"{p1:?} + {p2:?} = {p3:?}\\\"\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Um valor emprestado tem um _tempo de vida_ (_lifetime_):\"\n\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"\"\n#~ \"O tempo de vida pode ser implícito: `add(p1: &Point, p2: &Point) -> \"\n#~ \"Point`.\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"\"\n#~ \"Tempos de vida também podem ser explícitos: `&'a Point`, `&'documento \"\n#~ \"str`.\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Leia `&'a Point` como \\\"um `Point` emprestado que é válido por pelo menos \"\n#~ \"o tempo de vida `a`\\\".\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"\"\n#~ \"Tempos de vida são sempre inferidos pelo compilador: você não pode \"\n#~ \"atribuir um tempo de vida você mesmo.\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Além de emprestar seus argumentos, uma função pode retornar um valor \"\n#~ \"emprestado:\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` é um parâmetro genérico, ele é inferido pelo compilador.\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"Os tempos de vida começam com `'` e `'a` é um name padrão típico.\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"A parte _pelo menos_ é importante quando os parâmetros estão em escopos \"\n#~ \"diferentes.\"\n\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Mova a declaração de `p2` e `p3` para um novo escopo (`{ ... }`), \"\n#~ \"resultando no seguinte código:\"\n\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"Note como isto não compila uma vez que `p3` vive mais que `p2`.\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"Reinicie o espaço de trabalho e altere a assinatura da função para `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. Isso não \"\n#~ \"será compilado porque a relação entre os tempos de vida `'a` e `'b` não é \"\n#~ \"clara.\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"Outra forma de explicar:\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"\"\n#~ \"Duas referências a dois valores são emprestadas por uma função e a função \"\n#~ \"retorna outra referência.\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"\"\n#~ \"Ela deve ter vindo de uma dessas duas entradas (ou de uma variável \"\n#~ \"global).\"\n\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"De qual? O compilador precisa saber, de forma que no local da chamada a \"\n#~ \"referência retornada não seja usada por mais tempo do que uma variável de \"\n#~ \"onde veio a referência.\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Dia 1: Exercícios da Tarde\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Nós iremos ver duas coisas:\"\n\n#~ msgid \"A small book library,\"\n#~ msgstr \"Uma pequena biblioteca literária,\"\n\n#~ msgid \"Iterators and ownership (hard).\"\n#~ msgstr \"Iteradores e _ownership_ (difícil).\"\n\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Nós iremos aprender muito mais sobre _structs_ e o tipo `Vec<T>` amanhã. \"\n#~ \"Por hora, você só precisa conhecer parte de sua API:\"\n\n#~ msgid \"\\\"middle value: {}\\\"\"\n#~ msgstr \"\\\"valor do meio: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Use isto para modelar uma coleção de livros de uma biblioteca. Copie o \"\n#~ \"código abaixo para <https://play.rust-lang.org/> e atualize os tipos para \"\n#~ \"compilar:\"\n\n#~ msgid \"// This is a constructor, used below.\\n\"\n#~ msgstr \"// Este é um construtor, utilizado abaixo.\\n\"\n\n#~ msgid \"\"\n#~ \"// Implement the methods below. Update the `self` parameter to\\n\"\n#~ \"// indicate the method's required level of ownership over the object:\\n\"\n#~ \"//\\n\"\n#~ \"// - `&self` for shared read-only access,\\n\"\n#~ \"// - `&mut self` for unique and mutable access,\\n\"\n#~ \"// - `self` for unique access by value.\\n\"\n#~ msgstr \"\"\n#~ \"// Implemente os métodos abaixo. Atualize o parâmetro `self` para\\n\"\n#~ \"// indicar o nível requerido de ownership sobre o objeto:\\n\"\n#~ \"//\\n\"\n#~ \"// - `&self` para acesso compartilhado de apenas leitura,\\n\"\n#~ \"// - `&mut self` para acesso mutável exclusivo,\\n\"\n#~ \"// - `self` para acesso exclusivo por valor.\\n\"\n\n#~ msgid \"\\\"Initialize and return a `Library` value\\\"\"\n#~ msgstr \"\\\"Inicialize e retorne um valor `Biblioteca`\\\"\"\n\n#~ msgid \"\"\n#~ \"//fn len(self) -> usize {\\n\"\n#~ \"    //    todo!(\\\"Return the length of `self.books`\\\")\\n\"\n#~ \"    //}\\n\"\n#~ msgstr \"\"\n#~ \"//fn tamanho(self) -> usize {\\n\"\n#~ \"    //    todo!(\\\"Retorne o tamanho de `self.livros`\\\")\\n\"\n#~ \"    //}\\n\"\n\n#~ msgid \"\"\n#~ \"//fn is_empty(self) -> bool {\\n\"\n#~ \"    //    todo!(\\\"Return `true` if `self.books` is empty\\\")\\n\"\n#~ \"    //}\\n\"\n#~ msgstr \"\"\n#~ \"//fn esta_vazia(self) -> bool {\\n\"\n#~ \"    //    todo!(\\\"Retorne `true` se `self.livros` for vazio\\\")\\n\"\n#~ \"    //}\\n\"\n\n#~ msgid \"\"\n#~ \"//fn add_book(self, book: Book) {\\n\"\n#~ \"    //    todo!(\\\"Add a new book to `self.books`\\\")\\n\"\n#~ \"    //}\\n\"\n#~ msgstr \"\"\n#~ \"//fn adicionar_livro(self, book: Livro) {\\n\"\n#~ \"    //    todo!(\\\"Adicione um novo livro em `self.livros`\\\")\\n\"\n#~ \"    //}\\n\"\n\n#~ msgid \"\"\n#~ \"//fn print_books(self) {\\n\"\n#~ \"    //    todo!(\\\"Iterate over `self.books` and each book's title and \"\n#~ \"year\\\")\\n\"\n#~ \"    //}\\n\"\n#~ msgstr \"\"\n#~ \"//fn imprimir_livros(self) {\\n\"\n#~ \"    //    todo!(\\\"Itere sobre `self.livros` e sobre o título e ano de \"\n#~ \"cada livro\\\")\\n\"\n#~ \"    //}\\n\"\n\n#~ msgid \"\"\n#~ \"//fn oldest_book(self) -> Option<&Book> {\\n\"\n#~ \"    //    todo!(\\\"Return a reference to the oldest book (if any)\\\")\\n\"\n#~ \"    //}\\n\"\n#~ msgstr \"\"\n#~ \"//fn livro_mais_antigo(self) -> Option<&Livro> {\\n\"\n#~ \"    //    todo!(\\\"Retorne uma referência para o livro mais antigo (se \"\n#~ \"houver)\\\")\\n\"\n#~ \"    //}\\n\"\n\n#~ msgid \"\"\n#~ \"// This shows the desired behavior. Uncomment the code below and\\n\"\n#~ \"// implement the missing methods. You will need to update the\\n\"\n#~ \"// method signatures, including the \\\"self\\\" parameter! You may\\n\"\n#~ \"// also need to update the variable bindings within main.\\n\"\n#~ msgstr \"\"\n#~ \"// Isto demonstra o comportamento esperado. Descomente o código abaixo e\\n\"\n#~ \"// implemente os métodos que faltam. Você precisará atualizar as\\n\"\n#~ \"// assinaturas dos métodos, incluindo o parâmetro \\\"self\\\"! Você talvez\\n\"\n#~ \"// precise atualizar as atribuições de variável dentro de `main()`.\\n\"\n\n#~ msgid \"\"\n#~ \"//println!(\\\"The library is empty: library.is_empty() -> {}\\\", library.\"\n#~ \"is_empty());\\n\"\n#~ \"    //\\n\"\n#~ \"    //library.add_book(Book::new(\\\"Lord of the Rings\\\", 1954));\\n\"\n#~ \"    //library.add_book(Book::new(\\\"Alice's Adventures in Wonderland\\\", \"\n#~ \"1865));\\n\"\n#~ \"    //\\n\"\n#~ \"    //println!(\\\"The library is no longer empty: library.is_empty() -> \"\n#~ \"{}\\\", library.is_empty());\\n\"\n#~ \"    //\\n\"\n#~ \"    //\\n\"\n#~ \"    //library.print_books();\\n\"\n#~ \"    //\\n\"\n#~ \"    //match library.oldest_book() {\\n\"\n#~ \"    //    Some(book) => println!(\\\"The oldest book is {}\\\", book.title),\\n\"\n#~ \"    //    None => println!(\\\"The library is empty!\\\"),\\n\"\n#~ \"    //}\\n\"\n#~ \"    //\\n\"\n#~ \"    //println!(\\\"The library has {} books\\\", library.len());\\n\"\n#~ \"    //library.print_books();\\n\"\n#~ msgstr \"\"\n#~ \"//println!(\\\"A biblioteca está vazia: biblioteca.esta_vazia() -> {}\\\", \"\n#~ \"biblioteca.esta_vazia());\\n\"\n#~ \"    //\\n\"\n#~ \"    //biblioteca.adicionar_livro(Livro::new(\\\"Lord of the Rings\\\", \"\n#~ \"1954));\\n\"\n#~ \"    //biblioteca.adicionar_livro(Livro::new(\\\"Alice's Adventures in \"\n#~ \"Wonderland\\\", 1865));\\n\"\n#~ \"    //\\n\"\n#~ \"    //println!(\\\"The biblioteca não está mais vazia: biblioteca.\"\n#~ \"esta_vazia() -> {}\\\", biblioteca.esta_vazia());\\n\"\n#~ \"    //\\n\"\n#~ \"    //\\n\"\n#~ \"    //biblioteca.imprimir_livros();\\n\"\n#~ \"    //\\n\"\n#~ \"    //match biblioteca.livro_mais_antigo() {\\n\"\n#~ \"    //    Some(livro) => println!(\\\"O livro mais antigo é {}\\\", livro.\"\n#~ \"titulo),\\n\"\n#~ \"    //    None => println!(\\\"A biblioteca está vazia!\\\"),\\n\"\n#~ \"    //}\\n\"\n#~ \"    //\\n\"\n#~ \"    //println!(\\\"The biblioteca tem {} livros\\\", biblioteca.tamanho());\\n\"\n#~ \"    //biblioteca.imprimir_livros();\\n\"\n\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Soluções](solutions-afternoon.md#designing-a-library)\"\n\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"O modelo de _ownership_ do Rust afeta muitas APIs. Um exemplo disso são \"\n#~ \"os _traits_ [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n#~ \"Iterator.html) e [`IntoIterator`](https://doc.rust-lang.org/std/iter/\"\n#~ \"trait.IntoIterator.html).\"\n\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"Os _traits_ são como interfaces: eles descrevem o comportamento (métodos) \"\n#~ \"para um tipo. O _trait_ `Iterator` simplesmente diz que você pode chamar \"\n#~ \"`next` até obter `None` como retorno:\"\n\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Você usa esse _trait_ da seguinte forma:\"\n\n#~ msgid \"\\\"v[0]: {:?}\\\"\"\n#~ msgstr \"\\\"v[0]: {:?}\\\"\"\n\n#~ msgid \"\\\"v[1]: {:?}\\\"\"\n#~ msgstr \"\\\"v[1]: {:?}\\\"\"\n\n#~ msgid \"\\\"v[2]: {:?}\\\"\"\n#~ msgstr \"\\\"v[2]: {:?}\\\"\"\n\n#~ msgid \"\\\"No more items: {:?}\\\"\"\n#~ msgstr \"\\\"Sem mais itens: {:?}\\\"\"\n\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"Qual é o tipo retornado pelo iterador? Teste sua resposta aqui:\"\n\n#~ msgid \"\\\"v0: {v0:?}\\\"\"\n#~ msgstr \"\\\"v0: {v0:?}\\\"\"\n\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Por que esse tipo?\"\n\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Como antes, qual é o tipo retornado pelo iterador?\"\n\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Agora que conhecemos `Iterator` e `IntoIterator`, podemos construir loops \"\n#~ \"`for`. Eles chamam `into_iter()` em uma expressão e itera sobre o \"\n#~ \"iterador resultante:\"\n\n#~ msgid \"\\\"word: {word}\\\"\"\n#~ msgstr \"\\\"palavra: {word}\\\"\"\n\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Experimente com o código acima e depois consulte a documentação para \"\n#~ \"[`impl IntoIterator para &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26%27a%20Vec%3CT%2C%20A%3E) e \"\n#~ \"[`impl IntoIterator para Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-Vec%3CT%2C%20A%3E) para verificar \"\n#~ \"suas respostas.\"\n\n#~ msgid \"Structs, enums, methods.\"\n#~ msgstr \"Estruturas (structs), enumerações (enums), métodos (methods).\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Construtos de fluxo de controle: `if`, `if let`, `while`, `while let`, \"\n#~ \"`break`, e `continue`.\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"A Biblioteca Padrão: `String`, `Option` e `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` e `Arc`.\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"\"\n#~ \"Módulos: visibilidade, caminhos (paths), e hierarquia do sistema de \"\n#~ \"arquivos.\"\n\n#~ msgid \"\"\n#~ \"Methods are defined in an `impl` block, which we will see in following \"\n#~ \"slides.\"\n#~ msgstr \"\"\n#~ \"Os métodos são definidos em um bloco _`impl`_, que veremos nos próximos \"\n#~ \"slides.\"\n\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"A função `new` poderia ser escrita utilizando `Self` como tipo, já que \"\n#~ \"ele é intercambiável com o nome da _struct_\"\n\n#~ msgid \"\"\n#~ \"Implement the `Default` trait for the struct. Define some fields and use \"\n#~ \"the default values for the other fields.\"\n#~ msgstr \"\"\n#~ \"Implemente a _trait_ `Default` (Padrão) para a _struct_. Defina alguns \"\n#~ \"campos e utilize valores padrão para os demais.\"\n\n#~ msgid \"\\\"Bot\\\"\"\n#~ msgstr \"\\\"Robô\\\"\"\n\n#~ msgid \"\\\"Sam\\\"\"\n#~ msgstr \"\\\"Sam\\\"\"\n\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"Métodos são definidos no bloco `impl`.\"\n\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"Use a sintaxe de atualização de estruturas para definir uma nova `struct` \"\n#~ \"usando `peter`. Note que a variável `peter` não será mais acessível após.\"\n\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"\"\n#~ \"Utilize `{:#?}` para imprimir _structs_ utilizando a representação de \"\n#~ \"depuração (`Debug`).\"\n\n#~ msgid \"// Implementation based on https://xkcd.com/221/\\n\"\n#~ msgstr \"// Implementação baseada em https://xkcd.com/221/\\n\"\n\n#~ msgid \"// Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ msgstr \"\"\n#~ \"// Escolhido por uma rolagem de dados justa. Garantido ser aleatório.\\n\"\n\n#~ msgid \"\\\"You got: {:?}\\\"\"\n#~ msgstr \"\\\"Você tirou: {:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Esta página oferece um tipo de _enum_ `MoedaJogada` com duas variantes \"\n#~ \"`Cara` e `Coroa`. Você pode observar o _namespace_ ao usar variantes.\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"\"\n#~ \"Em ambos, as funções associadas são definidas dentro de um bloco `impl`.\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Você pode definir enums mais ricos onde as variantes carregam dados. Você \"\n#~ \"pode então usar a instrução `match` (corresponder) para extrair os dados \"\n#~ \"de cada variante:\"\n\n#~ msgid \"// Variant without payload\\n\"\n#~ msgstr \"// Variante sem conteúdo\\n\"\n\n#~ msgid \"\\\"page loaded\\\"\"\n#~ msgstr \"\\\"página carregada\\\"\"\n\n#~ msgid \"\\\"pressed '{c}'\\\"\"\n#~ msgstr \"\\\"pressionou '{c}'\\\"\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"A expressão é comparada com os padrões de cima a baixo. Não existe _fall-\"\n#~ \"through_ como em C ou C++.\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"A expressão _match_ possui um valor. O valor é o da última expressão \"\n#~ \"executada em um \\\"braço\\\" do _match_.\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"Começando do topo, nós procuramos qual padrão corresponde ao valor, e \"\n#~ \"então executamos o código após a flecha. Quando uma correspondência é \"\n#~ \"encontrada, nós paramos. \"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` inspeciona um campo discriminant escondido na `enum`.\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"\"\n#~ \"É possível recuperar o discriminante chamando `std::mem::discriminant()`\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"Isso é útil, por exemplo, ao implementar `PartialEq` para _structs_ nas \"\n#~ \"quais comparar valores de campos não afeta a igualdade.\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` não é exatamente o mesmo que `WebEvent::\"\n#~ \"Click(Click)` com uma `struct Click { ... }` _top-level_. A versão no \"\n#~ \"próprio local (_inline_) não permite implementar _traits_, por exemplo.\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Enums, em Rust, são agrupados de maneira compacta, levando em \"\n#~ \"consideração restrições devido ao alinhamento:\"\n\n#~ msgid \"\\\"{}: size {} bytes, align: {} bytes\\\"\"\n#~ msgstr \"\\\"{}: tamanho {} bytes, alinhamento: {} bytes\\\"\"\n\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"\"\n#~ \"Internamente Rust utiliza um campo (discriminante) para saber qual a \"\n#~ \"variante da _enum_.\"\n\n#~ msgid \"// 0\\n\"\n#~ msgstr \"// 0\\n\"\n\n#~ msgid \"// 10001\\n\"\n#~ msgstr \"// 10001\\n\"\n\n#~ msgid \"\\\"A: {}\\\"\"\n#~ msgstr \"\\\"A: {}\\\"\"\n\n#~ msgid \"\\\"B: {}\\\"\"\n#~ msgstr \"\\\"B: {}\\\"\"\n\n#~ msgid \"\\\"C: {}\\\"\"\n#~ msgstr \"\\\"C: {}\\\"\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"Tente outros tipos como\"\n\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"`dbg_size!(bool)`: tamanho 1 bytes, alinhamento: 1 bytes,\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<bool>)`: tamanho 1 bytes, alinhamento: 1 bytes \"\n#~ \"(otimização de nicho, seja abaixo),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(&i32)`: tamanho 8 bytes, alinhamento: 8 bytes (em uma máquina \"\n#~ \"de 64-bits),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<&i32>)`: tamanho 8 bytes, alinhamento: 8 bytes \"\n#~ \"(otimização de ponteiro nulo, veja abaixo).\"\n\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"\"\n#~ \"Otimização de nicho: Rust vai mesclar padrões de bits não utilizados na \"\n#~ \"discriminante da _enum_.\"\n\n#~ msgid \"\\\"- {}: {:#x}\\\"\"\n#~ msgstr \"\\\"- {}: {:#x}\\\"\"\n\n#~ msgid \"\"\n#~ \"// TOTALLY UNSAFE. Rust provides no guarantees about the bitwise\\n\"\n#~ \"    // representation of types.\\n\"\n#~ msgstr \"\"\n#~ \"// TOTALMENTE INSEGURO. Rust não oferece nenhuma garantia sobre a\\n\"\n#~ \"    // representação dos tipos em bits.\\n\"\n\n#~ msgid \"\\\"Bitwise representation of bool\\\"\"\n#~ msgstr \"\\\"Representação em bits de booleano\\\"\"\n\n#~ msgid \"\\\"Bitwise representation of Option<bool>\\\"\"\n#~ msgstr \"\\\"Representação em bits de Option<bool>\\\"\"\n\n#~ msgid \"\\\"Bitwise representation of Option<Option<bool>>\\\"\"\n#~ msgstr \"\\\"Representação em bits de Option<Option<bool>>\\\"\"\n\n#~ msgid \"\\\"Bitwise representation of Option<&i32>\\\"\"\n#~ msgstr \"\\\"Representação em bits de Option<&i32>\\\"\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"Exemplo mais complexo caso queira demonstrar o que acontece ao encadear \"\n#~ \"mais de 256 `Option`s de uma vez.\"\n\n#~ msgid \"\\\"1000\\\"\"\n#~ msgstr \"\\\"1000\\\"\"\n\n#~ msgid \"\"\n#~ \"// Macro to wrap a value in 2^n Some() where n is the number of \\\"@\\\" \"\n#~ \"signs.\\n\"\n#~ \"// Increasing the recursion limit is required to evaluate this macro.\\n\"\n#~ msgstr \"\"\n#~ \"// Macro que envolve um valor em 2^n Some() no qual n é o número de \"\n#~ \"\\\"@\\\".\\n\"\n#~ \"// É preciso aumentar o limite de recursão para aplicar essa macro.\\n\"\n\n#~ msgid \"\\\"Bitwise representation of a chain of 128 Option's.\\\"\"\n#~ msgstr \"\\\"Representação em bits de uma sequência de 128 Option's.\\\"\"\n\n#~ msgid \"\\\"Bitwise representation of a chain of 256 Option's.\\\"\"\n#~ msgstr \"\\\"Representação em bits de uma sequência de 256 Option's.\\\"\"\n\n#~ msgid \"\\\"Bitwise representation of a chain of 257 Option's.\\\"\"\n#~ msgstr \"\\\"Representação em bits de uma sequência de 257 Option's.\\\"\"\n\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"Descreveremos a distinção entre os receptores de método a seguir.\"\n\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"Considere enfatizar \\\"compartilhado e imutável\\\" e \\\"único e mutável\\\". \"\n#~ \"Essas restrições sempre vêm juntos no Rust devido às regras do _Borrow \"\n#~ \"Checker_ (verificador de empréstimo), e `self` não é uma exceção. Não \"\n#~ \"será possível referenciar uma _struct_ de vários locais e chamar um \"\n#~ \"método mutável (`&mut self`) nela.\"\n\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"Todos os quatro métodos aqui usam um receptor de método diferente.\"\n\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Você pode apontar como isso muda o que a função pode fazer com os valores \"\n#~ \"das variáveis e se/como ela pode ser usada novamente na `main`.\"\n\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Você pode mostrar o erro que aparece ao tentar chamar `encerrar` duas \"\n#~ \"vezes.\"\n\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Observe que, embora os receptores do método sejam diferentes, as funções \"\n#~ \"não estáticas são chamadas da mesma maneira no corpo principal. Rust \"\n#~ \"permite referenciar e desreferenciar automaticamente ao chamar métodos. \"\n#~ \"Rust adiciona automaticamente `&`, `*`, `muts` para que esse objeto \"\n#~ \"corresponda à assinatura do método.\"\n\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Você pode apontar que `imprimir_voltas` está usando um vetor e iterando \"\n#~ \"sobre ele. Descreveremos os vetores com mais detalhes à tarde. \"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"O padrão `_` é um padrão curinga que corresponde a qualquer valor.\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Pode ser útil mostrar como funciona a vinculação, por exemplo, \"\n#~ \"substituindo um caractere curinga por uma variável ou removendo as aspas \"\n#~ \"ao redor de `q`.\"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Você pode demonstrar correspondência em uma referência.\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Este pode ser um bom momento para trazer à tona o conceito de padrões \"\n#~ \"irrefutáveis, já que o termo pode aparecer em mensagens de erro.\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Você também pode desestruturar `structs`:\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"\"\n#~ \"Desestruturar _slices_ de tamanho desconhecido é possível utilizando \"\n#~ \"padrões de tamanho fixo.\"\n\n#~ msgid \"\\\"Tell me about {slice:?}\\\"\"\n#~ msgstr \"\\\"Fale-me sobre {slice:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Ao verificar uma correspondência, você pode adicionar uma guarda \"\n#~ \"(_guard_) para um padrão. É uma expressão Booleana arbitrária que será \"\n#~ \"executada se o padrão corresponder:\"\n\n#~ msgid \"\\\"Tell me about {pair:?}\\\"\"\n#~ msgstr \"\\\"Fale-me sobre {pair:?}\\\"\"\n\n#~ msgid \"\\\"These are twins\\\"\"\n#~ msgstr \"\\\"Estes são gêmeos\\\"\"\n\n#~ msgid \"\\\"Antimatter, kaboom!\\\"\"\n#~ msgstr \"\\\"Antimatter, kaboom!\\\"\"\n\n#~ msgid \"\\\"The first one is odd\\\"\"\n#~ msgstr \"\\\"O primeiro é ímpar\\\"\"\n\n#~ msgid \"\\\"No correlation...\\\"\"\n#~ msgstr \"\\\"Sem correlação...\\\"\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Você pode usar as variáveis definidas no padrão em sua expressão `if`.\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Dia 2: Exercícios Matinais\"\n\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Veremos a implementação de métodos em dois contextos:\"\n\n#~ msgid \"Simple struct which tracks health statistics.\"\n#~ msgstr \"Uma _struct_ simples que guarda estatísticas de saúde.\"\n\n#~ msgid \"Multiple structs and enums for a drawing library.\"\n#~ msgstr \"Várias _structs_ e _enums_ para uma biblioteca de desenho.\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"_Struct_ para Polígono\"\n\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Vamos criar um _struct_ `Polygon` que contém alguns `Points`. Copie o \"\n#~ \"código abaixo em <https://play.rust-lang.org/> e preencha os métodos que \"\n#~ \"faltam para fazer os testes passarem:\"\n\n#~ msgid \"// add fields\\n\"\n#~ msgstr \"// adicione atributos\\n\"\n\n#~ msgid \"// add methods\\n\"\n#~ msgstr \"// adicione métodos\\n\"\n\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Como as assinaturas dos métodos estão faltando nas declarações do \"\n#~ \"problema, a parte principal do exercício é especificá-las corretamente. \"\n#~ \"Não é preciso modificar os testes.\"\n\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Outras partes interessante do exercício:\"\n\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Derive um _trait_ `Copy` para algumas _structs_, já que em testes os \"\n#~ \"métodos às vezes não emprestam seus argumentos.\"\n\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Descubra que o trait `Add` deve ser implementado para que dois objetos \"\n#~ \"sejam adicionados via \\\"+\\\". Note que nós não discutimos _generics_ até o \"\n#~ \"Dia 3.\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Como vimos, `if` é uma expressão em Rust. É usado para avaliar \"\n#~ \"condicionalmente um de dois blocos, mas os blocos podem ter um valor que \"\n#~ \"então se torna o valor da expressão `if`. Outras expressões de controle \"\n#~ \"de fluxo funcionam de forma semelhante em Rust.\"\n\n#~ msgid \"\\\"w: {w}\\\"\"\n#~ msgstr \"\\\"w: {w}\\\"\"\n\n#~ msgid \"\\\"z: {z}\\\"\"\n#~ msgstr \"\\\"z: {z}\\\"\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"A mesma regra é usada para funções: o valor do corpo da função é o valor \"\n#~ \"de retorno:\"\n\n#~ msgid \"\\\"doubled: {}\\\"\"\n#~ msgstr \"\\\"dobrado: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"O objetivo deste slide é mostrar que os blocos têm um tipo e um valor em \"\n#~ \"Rust.\"\n\n#~ msgid \"\\\"Program name: {value}\\\"\"\n#~ msgstr \"\\\"Nome do programa: {value}\\\"\"\n\n#~ msgid \"\\\"Missing name?\\\"\"\n#~ msgstr \"\\\"Falta o nome?\\\"\"\n\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"Desde 1.65, uma construção [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else) semelhante permite fazer uma atribuição de \"\n#~ \"desestruturação, ou se falhar, ter um bloco de ramificação sem retorno \"\n#~ \"(`panic`/`return`/`break`/`continue`):\"\n\n#~ msgid \"`for` loops\"\n#~ msgstr \"Loops (Laços) `for`\"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"O loop `for` está intimamente relacionado com o [loop `while let`](while-\"\n#~ \"let-expressions.md). Ele chamará automaticamente `into_iter()` na \"\n#~ \"expressão e, em seguida, iterará sobre ela:\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Aqui você pode usar `break` e `continue` como de costume.\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"A iteração de índice não é uma sintaxe especial no Rust apenas para esse \"\n#~ \"caso.\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"\"\n#~ \"`(0..10)` é um _range_ (intervalo) que implementa um trait `Iterator`.\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` é um método que retorna outro `Iterator` que pula outros \"\n#~ \"elementos alternadamente.\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Modifique os elementos no vetor e explique os erros de compilação. Altere \"\n#~ \"o vetor `v` para ser mutável e o loop `for` para `for x in v.iter_mut()`.\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"Expressões `loop`\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"Finalmente, há uma [palavra-chave `loop`](https://doc.rust-lang.org/\"\n#~ \"reference/expressions/loop-expr.html#infinite-loops) que cria um loop \"\n#~ \"infinito.\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"Aqui você deve usar `break` ou `return` para parar o loop:\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"\"\n#~ \"Interrompa o `loop` com um valor (por exemplo, `break 8`) e imprima-o.\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"A [palavra-chave `match`](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) é usada para corresponder um valor a um ou mais padrões. \"\n#~ \"Nesse sentido, funciona como uma série de expressões `if let`:\"\n\n#~ msgid \"\\\"Will do cat things\\\"\"\n#~ msgstr \"\\\"Vai fazer coisas de gato\\\"\"\n\n#~ msgid \"\\\"ls\\\"\"\n#~ msgstr \"\\\"ls\\\"\"\n\n#~ msgid \"\\\"Will ls some files\\\"\"\n#~ msgstr \"\\\"Vou ls alguns arquivos\\\"\"\n\n#~ msgid \"\\\"mv\\\"\"\n#~ msgstr \"\\\"mv\\\"\"\n\n#~ msgid \"\\\"Let's move some files\\\"\"\n#~ msgstr \"\\\"Vamos mover alguns arquivos\\\"\"\n\n#~ msgid \"\\\"rm\\\"\"\n#~ msgstr \"\\\"rm\\\"\"\n\n#~ msgid \"\\\"Uh, dangerous!\\\"\"\n#~ msgstr \"\\\"Uh, perigoso!\\\"\"\n\n#~ msgid \"\\\"Hmm, no program name?\\\"\"\n#~ msgstr \"\\\"Hmm, nenhum nome de programa?\\\"\"\n\n#~ msgid \"\\\"Unknown program name!\\\"\"\n#~ msgstr \"\\\"Nome de programa desconhecido!\\\"\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"\"\n#~ \"Salve o resultado de uma expressão de correspondência `match` em uma \"\n#~ \"variável e imprima-a.\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"Remova `.as_deref()` e explique o erro gerado.\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::Args().next()` retorna um `Option<&String>`, porém `match` não \"\n#~ \"funciona com o tipo `String`.\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` transforma um `Option<T>` em `Option<&T::Target>`. Em nosso \"\n#~ \"caso, isso transforma um `Option<String>` em `Option<&str>`.\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"Agora podemos usar a correspondência de padrões em um `&str` dentro de \"\n#~ \"`Option`.\"\n\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"Os tipos de vocabulário comuns incluem:\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"[`Option` e `Result`](std/option-result.md): tipos usados para valores \"\n#~ \"opcionais e [tratamento de erro](error-handling.md).\"\n\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"\"\n#~ \"[`String`](std/string.md): o tipo de string padrão usado para dados \"\n#~ \"_owned_.\"\n\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md): um vetor extensível padrão.\"\n\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"\"\n#~ \"[`HashMap`](std/hashmap.md): um tipo de mapa de hash com um algoritmo de \"\n#~ \"hash configurável.\"\n\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"\"\n#~ \"[`Box`](std/box.md): um ponteiro _owned_ para dados alocados em heap.\"\n\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"\"\n#~ \"[`Rc`](std/rc.md): um ponteiro de contagem de referência compartilhado \"\n#~ \"para dados alocados em heap.\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` e `Result`\"\n\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Os tipos representam dados opcionais:\"\n\n#~ msgid \"\\\"first: {first:?}\\\"\"\n#~ msgstr \"\\\"primeiro: {first:?}\\\"\"\n\n#~ msgid \"\\\"idx: {idx:?}\\\"\"\n#~ msgstr \"\\\"ind: {idx:?}\\\"\"\n\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"\"\n#~ \"`Option<&T>` não tem nenhum custo adicional de espaço em comparação com \"\n#~ \"`&T`.\"\n\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` retorna `Result<usize, usize>`.\"\n\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"\"\n#~ \"Se encontrado, `Result::Ok` contém o índice onde o elemento foi \"\n#~ \"encontrado.\"\n\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"Caso contrário, `Result::Err` contém o índice onde tal elemento deve ser \"\n#~ \"inserido.\"\n\n#~ msgid \"\"\n#~ \"Show iterating over a vector and mutating the value: `for e in &mut v \"\n#~ \"{ *e += 50; }`\"\n#~ msgstr \"\"\n#~ \"Mostre uma iteração sobre um vetor e alterando o valor: `for e in &mut v \"\n#~ \"{ *e += 50; }`\"\n\n#~ msgid \"\\\"Harry Potter and the Sorcerer's Stone \\\"\"\n#~ msgstr \"\\\"Harry Potter and the Sorcerer's Stone \\\"\"\n\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"No exemplo acima, você pode até remover o `*` na instrução `println!` \"\n#~ \"graças ao `Deref`. \"\n\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"`Box` com Estruturas de Dados Recursivas\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Dia 2: Exercícios da Tarde\"\n\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"Os exercícios desta tarde se concentrarão em strings e iteradores.\"\n\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"Neste exercício, você irá implementar um componente de roteamento de um \"\n#~ \"servidor web. O servidor está configurado com um número de _prefixos de \"\n#~ \"caminhos_ que são comparados com os _caminhos requisitados_. Os prefixos \"\n#~ \"de caminho podem conter um caractere curinga que corresponde a um \"\n#~ \"segmento completo. Veja os testes unitários abaixo.\"\n\n#~ msgid \"\\\"/v1/publishers\\\"\"\n#~ msgstr \"\\\"/v1/editores\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/abc-123\\\"\"\n#~ msgstr \"\\\"/v1/editores/abc-123\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/abc/books\\\"\"\n#~ msgstr \"\\\"/v1/editores/abc/livros\\\"\"\n\n#~ msgid \"\\\"/v1\\\"\"\n#~ msgstr \"\\\"/v1\\\"\"\n\n#~ msgid \"\\\"/v1/publishersBooks\\\"\"\n#~ msgstr \"\\\"/v1/editoresLivros\\\"\"\n\n#~ msgid \"\\\"/v1/parent/publishers\\\"\"\n#~ msgstr \"\\\"/v1/pai/editores\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/*/books\\\"\"\n#~ msgstr \"\\\"/v1/editores/*/livros\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/foo/books\\\"\"\n#~ msgstr \"\\\"/v1/editores/foo/livros\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/bar/books\\\"\"\n#~ msgstr \"\\\"/v1/editores/bar/livros\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/foo/books/book1\\\"\"\n#~ msgstr \"\\\"/v1/editores/foo/livros/livro1\\\"\"\n\n#~ msgid \"\\\"/v1/publishers/foo/booksByAuthor\\\"\"\n#~ msgstr \"\\\"/v1/editores/foo/livrosPorAutor\\\"\"\n\n#~ msgid \"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\"\n#~ msgstr \"\"\n#~ \"Tente declarar uma nova variável `let p = Point { x: 5, y: 10.0 };`.\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"\"\n#~ \"Arrume o código para permitir pontos que tenham elementos de tipos \"\n#~ \"diferentes.\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Você pode declarar um tipo genérico em seu bloco `impl`:\"\n\n#~ msgid \"// + 10\\n\"\n#~ msgstr \"// + 10\\n\"\n\n#~ msgid \"\\\"p.x = {}\\\"\"\n#~ msgstr \"\\\"p.x = {}\\\"\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"O código _genérico_ é transformado em código _não genérico_ de acordo com \"\n#~ \"os tipos usados:\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"se comporta como se você tivesse escrito\"\n\n#~ msgid \"\\\"The cat\\\"\"\n#~ msgstr \"\\\"Gato\\\"\"\n\n#~ msgid \"// No name, cats won't respond to it anyway.\\n\"\n#~ msgstr \"// Sem nomes, gatos não respondem mesmo.\\n\"\n\n#~ msgid \"\\\"Who's a cutie? {} is!\\\"\"\n#~ msgstr \"\\\"Quem é? É o {}!\\\"\"\n\n#~ msgid \"\\\"Hello {}!\\\"\"\n#~ msgstr \"\\\"Olá {}!\\\"\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"\"\n#~ \"As macros `derive` do Rust funcionam gerando automaticamente o código que \"\n#~ \"implementa os _traits_ especificados para uma estrutura de dados.\"\n\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"\"\n#~ \"Você pode deixar o compilador derivar uma série de _traits_ tais como:\"\n\n#~ msgid \"\\\"Is {:?}\\\\nequal to {:?}?\\\\nThe answer is {}!\\\"\"\n#~ msgstr \"\\\"{:?} é\\\\nigual a {:?}?\\\\nA resposta é {}!\\\"\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"\"\n#~ \"Traits podem implementar o comportamento em termos de outros métodos de \"\n#~ \"`trait`:\"\n\n#~ msgid \"\\\"{a:?} equals {b:?}: {}\\\"\"\n#~ msgstr \"\\\"{a:?} igual a {b:?}: {}\\\"\"\n\n#~ msgid \"\\\"{a:?} not_equals {b:?}: {}\\\"\"\n#~ msgstr \"\\\"{a:?} diferente de {b:?}: {}\\\"\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"Mova o método `not_equals` para um novo _trait_ `NotEquals`.\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"Faça `Equals` um _super trait_ para `NotEquals`.\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"Forneça uma implementação geral de `NotEquals` para `Equals`.\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"\"\n#~ \"Com a implementação geral, você não precisa mais de `Equals` como um \"\n#~ \"_super trait_ para `NotEqual`.\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait` permite que você trabalhe com tipos que você não pode nomear.\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Este exemplo é ótimo, porque usa `impl Display` duas vezes. Isso ajuda a \"\n#~ \"explicar que nada impõe que, nos dois usos, `impl Display` seja _do \"\n#~ \"mesmo_ tipo. Se usássemos um único `T: Display`, imporia a restrição de \"\n#~ \"que o tipo `T` de entrada e o tipo `T` de retorno são do mesmo tipo. Isso \"\n#~ \"não funcionaria para esta função específica, pois o tipo que esperamos \"\n#~ \"como entrada provavelmente não é o que `format!` retorna. Se quiséssemos \"\n#~ \"fazer o mesmo através da sintaxe `: Display`, precisaríamos de dois \"\n#~ \"parâmetros genéricos independentes.\"\n\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"Veremos agora os _Traits_ mais comuns da biblioteca padrão do Rust:\"\n\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) e \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) usados em laços `for`,\"\n\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) e [`Into`]\"\n#~ \"(https://doc.rust-lang.org/std/convert/trait.Into.html) usados na \"\n#~ \"converção de valores,\"\n\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) e [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) usados em operações \"\n#~ \"de IO,\"\n\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... usado na \"\n#~ \"sobrecarga de operadores,\"\n\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Iterator` implementa `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Add`, `Mul`, ...\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Dia 3: Exercícios matinais\"\n\n#~ msgid \"We will design a classical GUI library traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Vamos projetar uma biblioteca clássica de _traits_ de GUI e objetos de \"\n#~ \"`trait`.\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Button`: tem um `rótulo` e uma função de _callback_ que é invocada \"\n#~ \"quando o botão é pressionado.\"\n\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"O tratamento de erros em Rust é feito usando fluxo de controle explícito:\"\n\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"Funções que podem ter erros mostram isso em seu tipo de retorno.\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Não há exceções (_exceptions_).\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Capturando a _Resolução_ da Pilha (_Stack Unwinding_)\"\n\n#~ msgid \"\\\"hello!\\\"\"\n#~ msgstr \"\\\"olá!\\\"\"\n\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Já vimos o _enum_ `Result`. Ele é usado amplamente quando os erros são \"\n#~ \"esperados como parte da operação normal:\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Propagando Erros com `?`\"\n\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"O operador _try_ `?` é usado para retornar erros ao chamador da função. \"\n#~ \"Se ocorrer um erro, este é retornado imediatamente ao chamador como \"\n#~ \"retorno da função.\"\n\n#~ msgid \"\\\"Found no username in {filename}\\\"\"\n#~ msgstr \"\\\"Nome de usuário não encontrado em {filename}\\\"\"\n\n#~ msgid \"\"\n#~ \"It is good practice for all error types that don't need to be `no_std` to \"\n#~ \"implement `std::error::Error`, which requires `Debug` and `Display`. The \"\n#~ \"`Error` crate for `core` is only available in [nightly](https://github.\"\n#~ \"com/rust-lang/rust/issues/103765), so not fully `no_std` compatible yet.\"\n#~ msgstr \"\"\n#~ \"É uma boa prática para todos os tipos de erro que não precisam ser \"\n#~ \"`no_std` implementar `std::error::Error`, que requer `Debug` e `Display`. \"\n#~ \"O _crate_ `Error` para `core` só está disponível em [nightly](https://\"\n#~ \"github.com/rust-lang/rust/issues/103765), então ainda não é totalmente \"\n#~ \"compatível com `no_std`.\"\n\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"Geralmente é útil para eles implementar `Clone` e `Eq` também quando \"\n#~ \"possível, para tornar mais fácil a vida para testes e consumidores da sua \"\n#~ \"biblioteca. Neste caso, não podemos fazê-lo facilmente, porque `io::\"\n#~ \"Error` não os implementa.\"\n\n#~ msgid \"\"\n#~ \"The [thiserror](https://docs.rs/thiserror/) crate is a popular way to \"\n#~ \"create an error enum like we did on the previous page:\"\n#~ msgstr \"\"\n#~ \"O _crate_ [thiserror](https://docs.rs/thiserror/) é uma maneira popular \"\n#~ \"de criar um tipo enumerado (_enum_) de erro, como fizemos na página \"\n#~ \"anterior:\"\n\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"A _derive macro_ `thiserror` implementa automaticamente `std::error::\"\n#~ \"Error`, e opcionalmente, `Display` (se os atributos `#[error(...)]` forem \"\n#~ \"fornecidos) e `From` (se o atributo `#[from]` for adicionado). Também \"\n#~ \"funciona para _structs_.\"\n\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"Não afeta sua API pública, o que a torna boa para bibliotecas.\"\n\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"O `crate` [anyhow](https://docs.rs/anyhow/) é amplamente usado e pode lhe \"\n#~ \"ajudar a adicionar informações contextuais aos seus erros, permitindo que \"\n#~ \"você tenha menos tipos de erros personalizados:\"\n\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Marque os testes unitários com `#[test]`:\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"Use `cargo test` para encontrar e executar os testes unitários.\"\n\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Testes unitários geralmente são colocados em um módulo aninhado (execute \"\n#~ \"testes no [Playground](https://play.rust-lang.org/)):\"\n\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"_Crates_ Úteis para Escrever Testes\"\n\n#~ msgid \"// Potential data race!\\n\"\n#~ msgstr \"// Corrida de dados potencial!\\n\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Chamando Código Externo\"\n\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Funções de outras linguagens podem violar as garantias do Rust. Logo, \"\n#~ \"chamá-las é inseguro:\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Dia 3: Exercícios da Tarde\"\n\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"Vamos construir um wrapper seguro para ler o conteúdo do diretório!\"\n\n#~ msgid \"\"\n#~ \"For this exercise, we suggest using a local dev environment instead of \"\n#~ \"the Playground. This will allow you to run your binary on your own \"\n#~ \"machine.\"\n#~ msgstr \"\"\n#~ \"Para este exercício, nós sugerimos a utilizaçao de um ambiente de \"\n#~ \"desenvolvimento local ao invés do _Playground_. Isto lhe permitirá \"\n#~ \"executar o binário na sua própria máquina.\"\n\n#~ msgid \"\"\n#~ \"To get started, follow the [running locally](../../cargo/running-locally.\"\n#~ \"md) instructions.\"\n#~ msgstr \"\"\n#~ \"Para começar, siga as instruçoes para [rodar localmente](../../cargo/\"\n#~ \"running-locally.md).\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Depois de ver o exercício, você pode ver a [solução](solutions-afternoon.\"\n#~ \"md) fornecida.\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Você encontrará soluções para os exercícios nas páginas seguintes.\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Sinta-se à vontade para fazer perguntas sobre as soluções [no GitHub]\"\n#~ \"(https://github.com/google/comprehensive-rust/discussions). Nos informe \"\n#~ \"se você tiver uma solução diferente ou melhor do que a apresentada aqui.\"\n\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Nota:** Ignore os comentários `// ANCHOR: label` e `// ANCHOR_END: \"\n#~ \"label` que você vê nas soluções. Eles estão lá para tornar possível \"\n#~ \"reutilizar partes das soluções como exercícios.\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"Dia 1 Exercícios matinais\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([voltar ao exercício](for-loops.md))\"\n\n#, fuzzy\n#~ msgid \"Bonus question\"\n#~ msgstr \"Pergunta Bônus\"\n\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Isso necessita a utilização de conceitos mais avançados. Pode parecer que \"\n#~ \"poderíamos usar uma slice de slices (`&[&[i32]]`) como o tipo de entrada \"\n#~ \"para `transposta` e, assim, fazer nossa função lidar com qualquer tamanho \"\n#~ \"de matriz. No entanto, isso falha rapidamente: o tipo de retorno não pode \"\n#~ \"ser `&[&[i32]]`, pois ele precisa possuir os dados que você retorna.\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Você pode tentar usar algo como `Vec<Vec<i32>>`, mas isso também não \"\n#~ \"funciona muito bem: é difícil converter de `Vec<Vec<i32>>` para \"\n#~ \"`&[&[i32]] ` então agora você também não pode usar `impressao_formatada` \"\n#~ \"facilmente.\"\n\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"Assim que chegarmos aos _traits_ and _generics_, podemos usar o _trait_ \"\n#~ \"[`std::convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.\"\n#~ \"html) para abstrair qualquer coisa que pode ser referenciada como um \"\n#~ \"_slice_.\"\n\n#, fuzzy\n#~ msgid \"// A line references a slice of items\\n\"\n#~ msgstr \"\"\n#~ \"fn impressao_formatada\\\\<T, Linha, Matriz>(matriz: Matriz) where T: \"\n#~ \"Debug, // Linha referencia uma slice de itens Linha: \"\n#~ \"AsRef\\\\<\\\\[T\\\\]\\\\>, // Matriz referencia uma slice de linhas Matriz: \"\n#~ \"AsRef\\\\<\\\\[Linha\\\\]\\\\> { for linha in matriz.as_ref() { println!\"\n#~ \"(\\\"{:?}\\\", linha.as_ref()); } }\"\n\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Além disso, o próprio tipo não imporia que as slices filhas tenham o \"\n#~ \"mesmo comprimento, portanto, tal variável poderia conter uma matriz \"\n#~ \"inválida.\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"Dia 1 Exercícios da Tarde\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Projetando uma biblioteca\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([voltar ao exercício](book-library.md))\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"Dia 2 Exercícios matinais\"\n\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([voltar ao exercício](points-polygons.md))\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([voltar ao exercício](luhn.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([voltar ao exercício](strings-iterators.md))\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"Dia 3 Exercício matinal\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([voltar ao exercício](simple-gui.md))\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"Dia 3 Exercícios da Tarde\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([voltar ao exercício](safe-ffi-wrapper.md))\"\n"
  },
  {
    "path": "po/ro.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-05-15T20:58:33+03:00\\n\"\n\"PO-Revision-Date: 2024-05-15 22:17+0300\\n\"\n\"Last-Translator: Razvan Stefanescu <rstefanescu@google.com>\\n\"\n\"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\\n\"\n\"Language: ro\\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=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < \"\n\"20)) ? 1 : 2;\\n\"\n\"X-Generator: Poedit 3.4.4\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Bine ați venit la Comprehensive Rust 🦀 (ghidul complet pentu Rust)\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Rularea cursului\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Structura cursului\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Scurtături de tastatură\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Traduceri\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Folosirea Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Ecosistemul Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Mostre de cod\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Rularea Cargo local\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Ziua 1: Dimineața\"\n\n#: src/SUMMARY.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Bine ați venit\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Bună lume\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Ce este Rust?\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Avantajele Rust\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Ciornă\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Tipuri și valori\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Variabile\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Valori\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Aritmetică\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Inferența de tip\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Exercițiu: Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Soluție\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Bazele fluxului de control\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Expresii 'if'\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Bucle de execuție\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"Bucle `for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"Bucle `loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` și `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Etichete\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Blocuri și scopuri\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Scopuri și mascări\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Funcții\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Macro-uri\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Exercițiu: secvența Collatz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Ziua 1: După-amiaza\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Tupluri și vectori\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Array-uri\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Tupluri\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Iterații pe vectori\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Șabloane și destructurări\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Exercițiu: vectori îmbrăcați\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Referinţe\"\n\n#: src/SUMMARY.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Referinţe partajare\"\n\n#: src/SUMMARY.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Referințe exclusive\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Partiții: `&[T]`\"\n\n#: src/SUMMARY.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Șiruri de caractere\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Exercițiu: Geometrie\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Tipuri definite de utilizator\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"Structuri cu nume\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Structuri Tupluri\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Enumerări (enums)\"\n\n#: src/SUMMARY.md\nmsgid \"Static\"\nmsgstr \"Static\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Const\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Aliasuri de tip\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Exercițiu: Evaluarea expresiilor\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Ziua 2: Dimineața\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Potrivire de șabloane\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Potrivirea valorilor\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Destructuring Structs\"\nmsgstr \"Destructurări\"\n\n#: src/SUMMARY.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Destructurarea enumerărilor\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Fluxul de control\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Exercițiu: Evaluarea expresiilor\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Metode și trăsături\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Metode\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Trăsături\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Implementarea trăsăturilor\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Supertrăsături\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Tipuri asociate\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Derivarea\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Exercițiu: Logger generic\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Ziua 2: După-amiaza\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Produse generice\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Funcții generice\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Tipuri de date generice\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Trăsături generice\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Limite de trăsături\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Exercițiu: 'min' generic\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Biblioteca de tipuri standard\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Biblioteca standard\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Documentație\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"'Option'\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"Șir\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Exercițiu: numărător\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Biblioteca standard de trăsături\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Comparații\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Operatori\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` și `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Transformarea\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"Citire și scriere\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"'Default' (implicit), sintaxa de actualizare a structurilor\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Închideri\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Exercițiu: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Ziua 3: Dimineața\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Gestionarea memoriei\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Utilizarea memoriei de către programe\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Abordări ale administrării memoriei\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Posesia\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Semantica mutărilor\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"'Clone'\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Tipuri copiate\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"'Drop'\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Exercițiu: Tipul constructor\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Pointeri inteligenți\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Obiecte cu trăsături\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Exercițiu: arbore binar\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Ziua 3: După-amiaza\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Împrumut\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Împrumutul unei valori\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Verificarea împrumuturilor\"\n\n#: src/SUMMARY.md src/borrowing/examples.md\n#, fuzzy\nmsgid \"Borrow Errors\"\nmsgstr \"Împrumutați erorile\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Mutabilitate internă\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Exercițiu: statistici de sănătate\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Durata de viață\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Duratele de viață în anotări\"\n\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Extinderea duratei de viață\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Durata de viață a structurilor\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Exercițiu: Parsarea Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Ziua 1: Dimineața\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Iteratori\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Exercițiu: Înlăntuirea metodelor iterator\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Module\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Ierarhia sistemului de fișiere\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Vizibilitate\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Exercițiu: Module pentru o biblioteca pentru interfața grafică\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Testare\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Module de testare\"\n\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Alte tipuri de teste\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Corecții compilator și Clippy\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Exercițiu: Algoritmul Luhn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Ziua 4: După-amiaza\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Gestionarea erorilor\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panică\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Operatorul 'try'\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Conversii 'try'\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Trăsături 'Error'\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` și `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Exercițiu: rescrierea cu `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust nesigur\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"Nesigur\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Dereferențierea pointerilor bruți\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Variabile statice mutabile\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Sindicate (Unions)\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Funcții nesigure\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Trăsături nesigure\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Înpachetare sigură prin FFI\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Setare\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Reguli de construcție\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Programe binare\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Biblioteci\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\n#, fuzzy\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"/** Interfață de serviciu de ziua de naștere. */\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Interfață\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Service API\"\nmsgstr \"Serviciul API\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Serviciu\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Server\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Lanseaza\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Client\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Schimbarea API-ului\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Updating Implementations\"\nmsgstr \"Implementare\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"AIDL Types\"\nmsgstr \"Tipuri\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Primitive Types\"\nmsgstr \"Tipuri primitive\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Array Types\"\nmsgstr \"Array-uri\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"Sending Objects\"\nmsgstr \"Obiecte cu trăsături\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"Variabile\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"Sending Files\"\nmsgstr \"Trimiterea fișierelor\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Imitarea\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Jurnalizare (loguri)\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Interoperabilitate\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Cu C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Apelarea C cu Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Apelarea Rust din C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Cu C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Modulul de interconectare\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Interconectarea cu Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"Cod C++ generat\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"Interconectarea cu C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Tipuri partajate\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Enumerări partajate\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Gestionarea erorilor în Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Gestionarea erorilor în C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Tipuri suplimentare\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Construirea pentru Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Construirea pentru Android: reguli de generare\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Construirea pentru Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Cu Java\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Exerciții\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Compararea ecosistemelor Chromium și Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Politici\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Cod nesigur\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"În funcție de codul Rust din Chromium C++\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Exercițiu\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Biblioteca `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Reguli GN pentru testele Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"Macro-ul `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Interoperabilitatea cu C++\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Exemple de legături\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Limitări ale CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Gestionarea erorilor în CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Gestionarea erorilor: exemplu QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Gestionarea erorilor: exemplu PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Utilizarea CXX în Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Adăugarea de lăzi ale unor terțe părți\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Configurarea Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Configurarea `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Descărcarea de lăzi\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Generarea regulilor de compilare `gn`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Rezolvarea problemelor\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Scripturi de construire care generează cod\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\"Scripturi de construire care construiesc C++ sau efectuează acțiuni arbitrare\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Dependințe de crater\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Revizuiri și audituri\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Modificări în codul sursă Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Actualizarea crate-urilor\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Reunind totul - Exercițiu\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Soluțiile exercițiilor\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Direct pe hardware: Dimineața\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Un exemplu minimalist\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Microcontrolere\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"MMIO brut\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC-uri\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"Lăzi (crates) HAL\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Crates cu suport pentru plăci\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Modelul de stare de tip\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` și `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Depanare\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Alte proiecte\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Compass\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Soluții\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: După-amiază\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Procesatori de aplicații\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Pregătiți pentru Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Ansamblare în linie\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Să scriem un driver UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Mai multe trăsături\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Un driver UART mai bun\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Registre multiple\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Un driver UART mai bun\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Utilizarea acestuia\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Excepții\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Crates (lăzi) utile\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`Spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Conductor RTC\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concurență: Dimineața\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Conversatii\"\n\n#: src/SUMMARY.md src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Plain Threads\"\nmsgstr \"Conversatii\"\n\n#: src/SUMMARY.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Fire de execuție cu scop\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Canale\"\n\n#: src/SUMMARY.md src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"Senders and Receivers\"\nmsgstr \"Expeditori și destinatari\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Canale nerestricționate\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Canale delimitate\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` și `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"Marker Traits\"\nmsgstr \"Mai multe trăsături\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"Trimitere (send)\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"Sincronizare (sync)\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Exemple\"\n\n#: src/SUMMARY.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Statut comun\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Exemplu\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Filozofii la masă\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Verificator de legături cu mai multe fire de execuție\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concurență: După-amiază\"\n\n#: src/SUMMARY.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Bazele Async\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"async/await\"\n\n#: src/SUMMARY.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"Runtimes\"\nmsgstr \"Timpi de execuție\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async/tasks.md src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Task-uri\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"Channels and Control Flow\"\nmsgstr \"Fluxul de control\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Canale asincrone\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Alăturare (join)\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Selecție (select)\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Capcane\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Blocarea executorului\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Trăsături asincrone\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Anulare\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Aplicație de chat cu difuzare\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Ultimele cuvinte\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Va multumim !\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Glosar\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Alte resurse\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Credite\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Fluxul de construcție](https://img.shields.io/github/actions/workflow/\"\n\"status/google/comprehensive-rust/build.yml?style=flat-square)](https://\"\n\"github.com/google/comprehensive-rust/actions/workflows/build.yml?\"\n\"query=branch%3Amain) [![Contribuitori GitHub](https://img.shields.io/github/\"\n\"contributors/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/graphs/contributors) [![Stele GitHub](https://\"\n\"img.shields.io/github/stars/google/comprehensive-rust?style=flat-square)]\"\n\"(https://github.com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Acesta este un curs gratuit de Rust dezvoltat de echipa Android de la \"\n\"Google. Cursul acoperă întregul spectru Rust, de la sintaxa de bază până la \"\n\"subiecte avansate, cum ar fi genericele și gestionarea erorilor.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"Cea mai recentă versiune a cursului poate fi găsită la adresa <https://\"\n\"google.github.io/comprehensive-rust/>. Dacă citiți în altă parte, vă rugăm \"\n\"să verificați acolo pentru actualizări.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\"Cursul este, de asemenea, disponibil [în format PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Scopul cursului este de a vă învăța Rust. Presupunem că nu știți nimic \"\n\"despre Rust și, la sfârșit, sperăm să:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Aveți o înțelegere cuprinzătoare a sintaxei și a limbajului Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Puteți să modificați programele existente și să scrieți programe noi în Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Cunoașteți expresii uzuale din Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"Primele patru zile de curs se numesc Fundamentele Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Pornind de la acestea, sunteți invitați să aprofundați unul sau mai multe \"\n\"subiecte specializate:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): un curs de o jumătate de zi despre utilizarea Rust \"\n\"pentru dezvoltarea platformei Android (AOSP). Acesta include \"\n\"interoperabilitatea cu C, C++ și Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): un curs de o jumătate de zi despre utilizarea Rust \"\n\"pentru navigatoarele bazate pe Chromium. Acesta include interoperabilitatea \"\n\"cu C++ și  utilizarea crate-urilor terțe în Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): un curs de o zi întreagă despre utilizarea Rust \"\n\"pentru dezvoltarea bare-metal (încorporată). Sunt acoperite atât \"\n\"microcontrolerele, cât și procesoarele de aplicații.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency.md): un curs de o zi întreagă despre concurența în \"\n\"Rust. Acoperim atât concurența clasică (programarea preemptivă folosind fire \"\n\"de execuție și mutexuri), cât și concurența async/await (multitasking \"\n\"cooperativ folosind futures).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Alte obiective decât cele de bază\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust este un limbaj mare și nu vom putea acoperi toate aspectele în câteva \"\n\"zile. Câteva dintre non-obiectivele acestui curs sunt:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Învățarea modului de dezvoltare a macrocomenzilor: vă rugăm să consultați în \"\n\"schimb [Capitolul 19.5 din Rust Book](https://doc.rust-lang.org/book/ch19-06-\"\n\"macros.html) și [Rust by Example](https://doc.rust-lang.org/rust-by-example/\"\n\"macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Ipoteze\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Cursul pornește de la premisa că știți deja să programați. Rust este un \"\n\"limbaj cu tipare statică și uneori vom face comparații cu C și C++ pentru a \"\n\"explica mai bine sau a contrasta abordarea Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Dacă știți să programați într-un limbaj cu tipuri dinamice, cum ar fi Python \"\n\"sau JavaScript, atunci veți putea să vă descurcați foarte bine.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Acesta este un exemplu de _notițe pentru prezentator_. Le vom folosi pentru \"\n\"a adăuga informații suplimentare la diapozitive. Acestea pot fi puncte cheie \"\n\"pe care instructorul ar trebui să le abordeze, precum și răspunsuri la \"\n\"întrebări tipice care apar în clasă.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Această pagină este destinată instructorului de curs.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Iată câteva informații de fond despre modul în care am desfășurat cursul în \"\n\"cadrul Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"De obicei, cursurile se desfășoară între orele 9:00 și 16:00, cu o pauză de \"\n\"masă de o oră la mijloc. Astfel, rămân 3 ore pentru cursul de dimineață și 3 \"\n\"ore pentru cursul de după-amiază. Ambele sesiuni includ multiple pauze \"\n\"pentru a le permite cursanților să lucreze la exerciții.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Înainte de a parcurge cursul, veți dori să:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Vă familiarizați cu materialul de curs. Am inclus note ale vorbitorului \"\n\"pentru a evidenția punctele cheie (vă rugăm să ne ajutați contribuind cu mai \"\n\"multe note pentru prezentare!). Atunci când prezentați, asigurați-vă că \"\n\"deschideți notele prezentatorului într-o fereastră pop-up (faceți clic pe \"\n\"link-ul cu o săgeată mică de lângă \\\"Speaker Notes\\\"). În acest fel, veți \"\n\"avea un ecran curat pentru a prezenta în fața clasei.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Decideți datele. Deoarece cursul durează patru zile\\\\i, vă recomandăm să \"\n\"programați zilele pe parcursul a două săptămâni. Participanții la curs au \"\n\"spus că li se pare util să existe un interval în timpul cursului, deoarece \"\n\"îi ajută să proceseze toate informațiile pe care le oferim.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Găsiți o sală suficient de mare pentru participanții prezenți. Vă recomandăm \"\n\"o clasă de 15-25 de persoane. Este suficient de mică pentru ca oamenii să se \"\n\"simtă confortabil să pună întrebări --- este, de asemenea, suficient de mică \"\n\"pentru ca un instructor să aibă timp să răspundă la întrebări. Asigurați-vă \"\n\"că sala are _locuri/birouri pentru dumneavoastră și pentru studenți: cu \"\n\"toții veți avea nevoie să puteți sta jos și să lucrați cu laptopurile. În \"\n\"special, în calitate de instructor, veți face o mulțime de live-coding, așa \"\n\"că un pupitru nu vă va fi de mare ajutor.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Ajungeți în sală cu suficient timp înainte pentru a pregăti totul. Vă \"\n\"recomandăm să prezentați direct folosind `mdbook serve` care rulează pe \"\n\"laptopul dumneavoastră (consultați [instrucțiuni de instalare](https://\"\n\"github.com/google/comprehensive-rust#building)). Acest lucru asigură o \"\n\"performanță optimă, fără întârzieri în timp ce schimbați paginile. Folosirea \"\n\"laptopului vă va permite, de asemenea, să corectați greșelile de tipar pe \"\n\"măsură ce dumneavoastră sau participanții la curs le descoperiți.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Lăsați participanții să rezolve exercițiile singuri sau în grupuri mici. În \"\n\"mod obișnuit, dedicăm 30-45 de minute exercițiilor dimineața și după-amiaza \"\n\"(inclusiv timpul necesar pentru revizuirea soluțiilor). Asigurați-vă că îi \"\n\"întrebați pe cursanți dacă s-au blocat sau dacă există ceva cu care îi \"\n\"puteți ajuta. Când vedeți că mai multe persoane au aceeași problemă, \"\n\"anunțați clasa și oferiți o soluție, de exemplu, arătând unde se pot găsi \"\n\"informațiile relevante în biblioteca standard.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Asta e tot, mult succes în prezentarea cursului! Sperăm că va fi la fel de \"\n\"distractiv pentru voi cum a fost pentru noi!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Vă rugăm să [oferiți sugestii](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) după aceea, astfel încât să putem îmbunătăți cursul. Dorim \"\n\"să aflăm ce a funcționat bine pentru dumneavoastră și ce putem îmbunătăți. \"\n\"Studenții dumneavoastră sunt, de asemenea, foarte bineveniți să [ne trimită \"\n\"feedback](https://github.com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Fundamentele Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Primele patru zile alcătuiesc [Fundamentele Rust](../welcome-day-1.md). \"\n\"Cursul se desfășoară într-un ritm rapid și acoperim o mulțime de subiecte!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Programul cursului:\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"Ziua 3 Dimineața (2 ore și 15 minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Introducere](../welcome-day-1.md) (5 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md) (20 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\nmsgstr \"[Tipuri și valori](../types-and-values.md) (1 oră și 5 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"[Bazele fluxului de control](../control-flow-basics.md) (1 oră)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"Ziua 1 După-amiaza (2 ore și 55 de minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tupluri și array-uri](../tupluri-și-array-uri.md) (1 oră)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[References](../references.md) (55 minutes)\"\nmsgstr \"[Referințe](../references.md) (50 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[Tipuri definite de utilizator](../user-defined-types.md) (50 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Ziua 2 Dimineața (3 ore și 5 minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Introducere](../welcome-day-2.md) (3 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Metode și trăsături](../methods-and-traits.md) (55 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Afternoon (4 hours, including breaks)\"\nmsgstr \"Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Generics](../generics.md) (40 minutes)\"\nmsgstr \"[Generice](../generics.md) (45 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[Tipuri de bibliotecă standard](../std-types.md) (1 oră și 10 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\"[Trăsături ale bibliotecii standard](../std-traits.md) (1 oră și 40 de \"\n\"minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"Ziua 3 Dimineața (2 ore și 15 minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Introducere](../welcome-day-3.md) (3 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[Managementul memoriei](../memory-management.md) (1 oră și 10 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[Pointeri inteligenți](../smart-pointers.md) (45 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Borrowing](../borrowing.md) (55 minutes)\"\nmsgstr \"[Împrumut](../împrumut.md) (1 oră)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\nmsgstr \"[Referințe](../references.md) (50 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"Ziua 4 Dimineața (3 ore și 5 minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Intorducere](../welcome-day-4.md) (3 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[Iteratori](../iteratori.md) (45 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[Module](../modules.md) (40 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[Testare](../testing.md) (1 oră și 5 minute)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Error Handling](../error-handling.md) (55 minutes)\"\nmsgstr \"[Gestionarea erorilor](../error-handling.md) (45 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[Unsafe Rust](../unsafe-rust.md) (1 oră și 5 minute)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Subiecte  aprofundate\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"În plus față de cursul de 4 zile despre fundamentele Rust, abordăm câteva \"\n\"subiecte mai specializate:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust în Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Rust în Android](../android.md) este un curs de o jumătate de zi despre \"\n\"utilizarea Rust pentru dezvoltarea platformei Android. Acesta include \"\n\"interoperabilitatea cu C, C++ și Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Veți avea nevoie de un [sursele AOSP](https://source.android.com/docs/setup/\"\n\"download/downloading). Efectuați o descărcare a [resurselor cursului]\"\n\"(https://github.com/google/comprehensive-rust) pe aceeași mașină și mutați \"\n\"directorul `src/android/` în rădăcina surselor AOSP. Acest lucru va asigura \"\n\"că sistemul de compilare Android vede fișierele `Android.bp` din `src/\"\n\"android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Asigurați-vă că `adb sync` funcționează cu emulatorul sau cu dispozitivul \"\n\"real și precompilați toate exemplele Android folosind `src/android/build_all.\"\n\"sh`. Citiți scriptul pentru a vedea comenzile pe care le execută și \"\n\"asigurați-vă că acestea funcționează atunci când le executați manual.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust în Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"[Rust în Chromium](../chromium.md) este un curs aprofundat de o jumătate de \"\n\"zi despre utilizarea Rust ca parte a browserului Chromium. Acesta include \"\n\"utilizarea Rust în sistemul de compilare `gn` al Chromium, aducerea de \"\n\"biblioteci terțe (\\\"crates\\\") și interoperabilitatea C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Va trebui să puteți construi Chromium --- este [recomandat](../chromium/\"\n\"setup.md) un build de depanare, de componente pentru viteză, dar orice build \"\n\"va funcționa. Asigurați-vă că puteți rula browserul Chromium pe care l-ați \"\n\"construit.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust direct pe placă\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Rust direct pe placă](../bare-metal.md) este un curs de o zi întreagă \"\n\"despre utilizarea Rust pentru dezvoltarea bare-metal (embedded). Sunt \"\n\"acoperite atât microcontrolerele, cât și procesoarele de aplicații.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Pentru partea de microcontroler, va trebui să cumpărați din timp placa de \"\n\"dezvoltare [BBC micro:bit](https://microbit.org/) v2. Toată lumea va trebui \"\n\"să instaleze o serie de pachete, așa cum este descris pe [pagina de bun \"\n\"venit](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Concurență în Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Concurența în Rust] (../concurrency.md) este un curs de o zi întreagă \"\n\"despre concurența clasică, precum și despre concurența `async`/`await`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Veți avea nevoie de un nou crate configurat și de dependențele descărcate și \"\n\"pregătite. Puteți apoi să copiați exemplele în `src/main.rs` pentru a \"\n\"experimenta cu ele:\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"{{%course outline Concurrency}}\"\nmsgstr \"{{%course outline Concurrency}}\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Format\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Cursul se dorește a fi foarte interactiv și vă recomandăm să lăsați \"\n\"întrebările să conducă explorarea Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"În mdBook există mai multe comenzi rapide utile de la tastatură:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Săgeată-stânga\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Navigați la pagina anterioară.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Săgeată-dreapta\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Navigați la pagina următoare.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Executați mostra de cod care are focusul.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"S\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Activați bara de căutare.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Cursul a fost tradus în alte limbi de către o serie de voluntari minunați:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Braziliană portugheză](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"de [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) și \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Chineză (simplificată)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"de [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), și [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Chineză (tradițională)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"de [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), și [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Coreană](https://google.github.io/comprehensive-rust/ko/) de [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) și \"\n\"[@jooyunghan](https://github.com/jooyunghan).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Spaniolă](https://google.github.io/comprehensive-rust/es/) de [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Utilizați selectorul de limbă din colțul din dreapta sus pentru a comuta \"\n\"între limbi.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Traduceri incomplete\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Există un număr mare de traduceri în curs de realizare. Iată cele mai \"\n\"recente traduceri actualizate:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Bengaleză](https://google.github.io/comprehensive-rust/bn/) de \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Franceză](https://google.github.io/comprehensive-rust/fr/) de [@KookaS]\"\n\"(https://github.com/KookaS) și [@vcaen](https://github.com/vcaen).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Germană](https://google.github.io/comprehensive-rust/de/) de [@Throvn]\"\n\"(https://github.com/Throvn) și [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[Japoneză](https://google.github.io/comprehensive-rust/ja/) de [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) și [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Germană](https://google.github.io/comprehensive-rust/de/) de [@Throvn]\"\n\"(https://github.com/Throvn) și [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Dacă doriți să contribuiți la acest efort, vă rugăm să consultați \"\n\"[instrucțiunile noastre](https://github.com/google/comprehensive-rust/blob/\"\n\"main/TRANSLATIONS.md) pentru a afla cum să începeți. Traducerile sunt \"\n\"coordonate pe [issue tracker](https://github.com/google/comprehensive-rust/\"\n\"issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Când începeți să citiți despre Rust, veți face cunoștință cu [Cargo](https://\"\n\"doc.rust-lang.org/cargo/), instrumentul standard utilizat în ecosistemul \"\n\"Rust pentru a construi și rula aplicații Rust. Aici dorim să oferim o scurtă \"\n\"prezentare generală a ceea ce este Cargo și a modului în care se integrează \"\n\"în ecosistemul mai larg și cum se încadrează în acest curs de formare.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Instalare\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Vă rugăm să urmați instrucțiunile de pe <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Astfel veți avea acces la instrumentul de compilare Cargo (`cargo`) și \"\n\"compilatorul Rust (`rustc`). De asemenea, veți obține `rustup`, un utilitar \"\n\"de linie de comandă pe care îl puteți utiliza pentru a instala la diferite \"\n\"versiuni de compilator.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"După instalarea Rust, trebuie să vă configurați editorul sau IDE-ul pentru a \"\n\"lucra cu Rust. Majoritatea editorilor fac acest lucru comunicând cu [rust-\"\n\"analyzer](https://rust-analyzer.github.io/), care oferă funcționalitate de \"\n\"autocompletare și de salt la definiție pentru [VS Code](https://code.\"\n\"visualstudio.com/), [Emacs](https://rust-analyzer.github.io/manual.\"\n\"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) și multe altele. Există, de asemenea, un alt IDE disponibil, \"\n\"numit [RustRover](https://www.jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Pe Debian/Ubuntu, puteți instala, de asemenea, Cargo, sursele Rust și \"\n\"[instrumentul de formatare Rust](https://github.com/rust-lang/rustfmt) prin \"\n\"`apt`. Dar veți avea acces la o versiune Rust învechită care poate duce la \"\n\"un comportament neașteptat. Comanda ar fi:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Ecosistemul Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Ecosistemul Rust este format dintr-un număr de instrumente, dintre care \"\n\"principalele sunt:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: compilatorul Rust care transformă fișierele `.rs` în fișiere binare \"\n\"și alte formate intermediare.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: managerul de dependențe Rust și instrumentul de construcție. Cargo \"\n\"știe cum să descarce dependențele, de obicei găzduite pe <https://crates.\"\n\"io>, și le va transmite la `rustc` atunci când vă construiți proiectul. \"\n\"Cargo vine, de asemenea, cu un instrument de rulat testele încorporat care \"\n\"este folosit pentru a executa testele unitare.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: programul de instalare și actualizare a lanțului de instrumente \"\n\"Rust. Acest instrument este utilizat pentru a instala și actualiza `rustc` \"\n\"și `cargo` atunci când sunt lansate noi versiuni de Rust. În plus, `rustup` \"\n\"poate descărca și documentația pentru biblioteca standard. Puteți avea mai \"\n\"multe versiuni de Rust instalate în același timp, iar `rustup` vă va permite \"\n\"să treceți de la una la alta în funcție de necesități.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Puncte-cheie:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust are un program de actualizare rapidă, cu o nouă versiune la fiecare \"\n\"șase săptămâni. Noile versiuni mențin compatibilitatea cu versiunile vechi \"\n\"și adaugă noi funcționalități.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"Există trei canale de actualizare: \\\"stable\\\", \\\"beta\\\" și \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Noile caracteristici sunt testate pe \\\"nightly\\\", \\\"beta\\\" este ceea ce \"\n\"devine \\\"stabil\\\" la fiecare șase săptămâni.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"De asemenea, dependențele pot fi rezolvate din [registre](https://doc.rust-\"\n\"lang.org/cargo/reference/registries.html) alternative, git, dosare și altele.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust are, de asemenea, [ediții](https://doc.rust-lang.org/edition-guide/): \"\n\"ediția curentă este Rust 2021. Edițiile anterioare au fost Rust 2015 și Rust \"\n\"2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Noile edițiile au dreptul de a face modificări ale limbajului incompatibile \"\n\"cu versiuni mai vechi.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Pentru a preveni stricarea codului, edițiile sunt opționale: selectați \"\n\"ediția pentru crate-ul dumneavoastră prin intermediul fișierului `Cargo.\"\n\"toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Pentru a evita divizarea ecosistemului, compilatoarele Rust pot amesteca \"\n\"coduri scrise pentru ediții diferite.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Menționăm că este destul de rar să folosiți compilatorul direct și nu prin \"\n\"`cargo` (majoritatea utilizatorilor nu o fac niciodată).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Cargo este un instrument extrem de puternic și cuprinzător. Acesta are multe \"\n\"caracteristici avansate, incluzând:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Structura proiectului/pachetului\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[spații de lucru](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Gestionarea/arhivarea dependențelor de dezvoltare și a dependențelor de timp \"\n\"de execuție\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[scripturile de build](https://doc.rust-lang.org/cargo/reference/build-\"\n\"scripts.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[instalarea globală](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Este, de asemenea, extensibil cu pluginuri de subcomandă (cum ar fi [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Citiți mai multe din [cartea oficială Cargo](https://doc.rust-lang.org/\"\n\"cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Exemple de cod în aceast curs\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"În cadrul acestui curs, vom explora limbajul Rust în principal prin exemple \"\n\"care pot fi executate prin intermediul browserului dumneavoastră. Acest \"\n\"lucru face configurarea mult mai ușoară și asigură o experiență coerentă \"\n\"pentru toată lumea.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Instalarea Cargo este în continuare încurajată: vă va fi mai ușor să faceți \"\n\"exercițiile. În ultima zi, vom face un exercițiu mai amplu care vă va arăta \"\n\"cum să lucrați cu dependențele și pentru care aveți nevoie de Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Blocurile de cod din acest curs sunt complet interactive:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Editează-mă!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Puteți utiliza \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" pentru a executa codul atunci când focusul se află în caseta de text.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Majoritatea mostrelor de cod sunt editabile, așa cum se arată mai sus. \"\n\"Câteva mostre de cod nu sunt editabile din diverse motive:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Zonele de încercare încorporate nu pot executa teste unitare. Copiați și \"\n\"lipiți codul și deschideți-l în locul de zona de lucru locală pentru a \"\n\"demonstra testele unitare.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Zonele de încercare încorporate își pierd starea în momentul în care \"\n\"navigați în afara paginii! Acesta este motivul pentru care elevii trebuie să \"\n\"rezolve exercițiile folosind o instalare locală de Rust sau prin intermediul \"\n\"zonei de încercare.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Rularea codului la nivel local cu Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Dacă doriți să experimentați cu codul pe propriul sistem, va trebui să \"\n\"instalați mai întâi Rust. Faceți acest lucru urmând [instrucțiunile din \"\n\"Cartea Rust](https://doc.rust-lang.org/book/ch01-01-installation.html). Veți \"\n\"avea astfel un `rustc` și un `cargo` funcțional. La momentul scrierii \"\n\"acestui articol, cea mai recentă versiune stabilă Rust are versiunea:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Puteți utiliza și orice versiune ulterioară, deoarece Rust păstrează \"\n\"compatibilitatea cu versiunile anterioare.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Ulterior urmați acești pași pentru a construi un binar Rust din unul dintre \"\n\"exemplele din acest curs de instruire:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Apăsați pe butonul \\\"Copy to clipboard\\\" (Copiere în clipboard) al \"\n\"exemplului pe care doriți să îl copiați.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Utilizați `cargo new exercise` pentru a crea un nou director `exercise/` \"\n\"pentru codul dumneavoastră:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Navigați în `exercise/` și folosiți `cargo run` pentru a construi și rula \"\n\"binarul dumneavoastră:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Înlocuiți codul generic din `src/main.rs` cu propriul cod. De exemplu, \"\n\"folosind exemplul de pe pagina anterioară, faceți`src/main.rs` să arate \"\n\"astfel\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"Utilizați `cargo run` pentru a construi și rula binarul actualizat:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Folosiți `cargo check` pentru a verifica rapid dacă proiectul dumneavoastră \"\n\"are erori, folosiți `cargo build` pentru a-l compila fără a-l rula. Veți \"\n\"găsi rezultatul în `target/debug/` pentru o compilare normală de depanare. \"\n\"Folosiți `cargo build --release` pentru a produce o compilare optimizată de \"\n\"lansare în `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Puteți adăuga dependențe pentru proiectul dumneavoastră prin editarea `Cargo.\"\n\"toml`. Când executați comenzile `cargo`, acesta va descărca și compila \"\n\"automat dependențele lipsă pentru dumneavoastră.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Încercați să încurajați participanții la curs să instaleze Cargo și să \"\n\"utilizeze un editor local. Acest lucru le va face viața mai ușoară, deoarece \"\n\"vor avea un mediu de dezvoltare normal.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Bine ați venit la Ziua 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Aceasta este prima zi a cursului Rust Fundamentals. Vom acoperi o mulțime de \"\n\"subiecte astăzi:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Sintaxa de bază Rust: variabile, tipuri scalare și compuse, enumerații, \"\n\"structuri, referințe, funcții și metode.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Tipuri și inferența de tip.\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"Construcții ale fluxului de control: bucle, condiționale și altele.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"Tipuri definite de utilizator: structurile și enumerațiile.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\"Găsirea de tipare: destructurarea enumerațiilor, structurilor și a \"\n\"tablourilor.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Program\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"In this session:\"\nmsgstr \"În această sesiune:\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Introducere](./welcome-day-1.md) (5 minute)\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](./hello-world.md) (20 minute)\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\nmsgstr \"[Tipuri și valori](./types-and-values.md) (1 oră și 5 minute)\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"[Bazele fluxului de control](./control-flow-basics.md) (1 oră)\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 55 de minute\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Vă rugăm să le reamintiți cursanților că:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Ar trebui să pună întrebări atunci când le primesc, nu să le lase pentru \"\n\"final.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"Clasa se dorește a fi interactivă, iar discuțiile sunt foarte încurajate!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"În calitate de instructor, ar trebui să încercați să păstrați discuțiile \"\n\"relevante, adică să păstrați discuțiile legate de modul în care Rust face \"\n\"lucrurile în comparație cu un alt limbaj. Poate fi greu să găsiți echilibrul \"\n\"potrivit, dar e de preferat să permiteți discuțiile, deoarece acestea \"\n\"antrenează oamenii mult mai mult decât comunicarea unidirecțională.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Întrebările vor însemna probabil că vom vorbi despre lucruri înainte de \"\n\"prezentarea slide-urilor.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Acest lucru este perfect în regulă! Repetiția este o parte importantă a \"\n\"învățării. Nu uitați că diapozitivele sunt doar un suport și că sunteți \"\n\"liberi să le săriți după cum doriți.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"Ideea pentru prima zi este de a arăta lucrurile \\\"de bază\\\" din Rust care ar \"\n\"trebui să aibă paralele imediate cu alte limbaje. Părțile mai avansate din \"\n\"Rust vor fi prezentate în zilele următoare.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Dacă predați acest curs în clasă, acesta este un loc bun pentru a trece în \"\n\"revistă programul. Rețineți că există un exercițiu la sfârșitul fiecărui \"\n\"segment, urmat de o pauză. Planificați să acoperiți soluția exercițiului \"\n\"după pauză. Orele listate aici sunt o sugestie pentru a menține cursul în \"\n\"program. Nu ezitați să fiți flexibili și să vă adaptați după cum este \"\n\"necesar!\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"In this segment:\"\nmsgstr \"În acest segment:\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"[Ce este Rust?](./hello-world/what-is-rust.md) (10 minute)\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"[Avantajele Rust](./hello-world/benefits.md) (3 minute)\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"[Terenul de joacă](./hello-world/playground.md) (2 minute)\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 15 minute\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust este un nou limbaj de programare care a avut [versiunea 1.0 în 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust este un limbaj compilat static, cu un rol similar cu C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` folosește LLVM ca backend.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust suportă multe [platforme și arhitecturi](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust este utilizat pentru o gamă largă de dispozitive:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware și boot leaders,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"ecrane inteligente,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"telefoane mobile,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"desktop-uri,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"servere.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust se încadrează în aceeași zonă ca și C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Flexibilitate ridicată.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Nivel ridicat de control.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Poate fi redus pentru a rula pe dispozitive foarte limitate, cum ar fi \"\n\"microcontrolerele.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Nu are nevoie de mediu de execuție și nici de colectare de gunoi.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Se concentrează pe fiabilitate și siguranță fără a sacrifica performanța.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Câteva caracteristici ale Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_Siguranța memoriei la compilare_ - clase întregi de erori de memorie sunt \"\n\"prevenite la compilare\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Nu există variabile neinițializate.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Nu există eliberări duble de memorie.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Nu se utilizează după eliberare.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Nu există pointeri `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Nu s-au uitat mutexuri blocate.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Nu există concurență la date între firele de execuție.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Nu sunt invalidări ale iteratorilor.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_Fără comportament nedefinit în timp de execuție_ - ceea ce face o \"\n\"declarație Rust nu este niciodată nespecificat\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Accesul la matrice este verificat în funcție de limite.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Este definită depășirea numărului întreg (panică sau wrap-around).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_Caracteristicile limbajelor moderne_ - la fel de expresive și ergonomice ca \"\n\"și limbajele de nivel superior\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Enums și găsirea de modele.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Tipuri generice.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"FFI fără costuri suplimentare.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Abstracții fără costuri.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Erorile de compilare importante.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Manager de dependențe încorporat.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Suport pentru testare încorporat.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Suport excelent pentru protocolul serverului de limbă.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"Nu petreceți mult timp aici. Toate aceste puncte vor fi abordate mai în \"\n\"profunzime mai târziu.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Nu uitați să întrebați elevii din clasă cu ce limbaje au experiență. În \"\n\"funcție de răspuns, puteți evidenția diferite caracteristici ale Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Experiență cu C sau C++: Rust elimină o întreagă clasă de erori de execuție \"\n\"prin intermediul verificatorului de împrumuturi. Obțineți performanțe ca în \"\n\"C și C++, dar nu aveți probleme de nesiguranță a memoriei. În plus, obțineți \"\n\"un limbaj modern, cu construcții precum șabloane de potrivire și gestionarea \"\n\"integrată a dependențelor.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"Experiență cu Java, Go, Python, JavaScript...: Obțineți aceeași siguranță a \"\n\"memoriei ca în aceste limbaje, plus o senzație similară de limbaj de nivel \"\n\"înalt. În plus, obțineți performanțe rapide și previzibile ca în C și C++ \"\n\"(fără colector de memorie), precum și acces la hardware de nivel scăzut \"\n\"(dacă aveți nevoie)\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) oferă o modalitate ușoară de \"\n\"a rula programe Rust scurte și reprezintă baza pentru exemplele și \"\n\"exercițiile din acest curs. Încercați să rulați programul \\\"hello-world\\\" cu \"\n\"care începe. Acesta vine cu câteva caracteristici utile:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"În secțiunea \\\"Tools\\\", utilizați opțiunea `rustfmt` pentru a formata codul \"\n\"în mod \\\"standard\\\".\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust are două \\\"profiluri\\\" principale pentru generarea de cod: Debug \"\n\"(verificări suplimentare în timpul execuției, mai puțină optimizare) și \"\n\"Release (mai puține verificări în timpul execuției, multă optimizare). \"\n\"Acestea sunt accesibile sub \\\"Debug\\\" în partea de sus.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Dacă sunteți interesați, utilizați \\\"ASM\\\" sub \\\"...\\\" pentru a vedea codul \"\n\"de asamblare generat.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Încurajați cursanții să experimenteze în mediul de lucru virtual pe \"\n\"parcursul restului cursului. Acest lucru este deosebit de util pentru \"\n\"studenții avansați care doresc să afle mai multe despre optimizările Rust \"\n\"sau despre codul în limbaj de asamblare generat.\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Hello, World](./hello-world/hello-world.md) (5 minute)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[Variabile](./types-and-values/variables.md) (5 minute)\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[Valori](./types-and-values/values.md) (10 minute)\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[Aritmetică](./types-and-values/arithmetic.md) (5 minute)\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[Inferență de tip](./types-and-values/inference.md) (5 minute)\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"[Exercițiu: Fibonacci](./types-and-values/exercise.md) (30 minute)\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/generics.md\n#: src/modules.md\n#, fuzzy\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 40 de minute\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Să trecem la cel mai simplu program Rust posibil, un program clasic Bună \"\n\"Lume:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Bună ziua 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Ce vedeți:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Funcțiile sunt introduse cu `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Blocurile sunt delimitate prin paranteze curbe, ca în C și C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Funcția `main` este punctul de intrare al programului.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust are macro-uri igienice, `println!` este un exemplu în acest sens.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice \"\n\"caracter Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Această pagină încearcă să îi facă pe cursanți să se simtă confortabil cu \"\n\"codul Rust. Ei vor vedea o mulțime de astfel de fișiere în următoarele trei \"\n\"zile, așa că vom începe cu ceva familiar.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust se aseamănă foarte mult cu alte limbaje de genul C/C++/Java. Este \"\n\"imperativ și nu încearcă să reinventeze lucrurile decât dacă este absolut \"\n\"necesar.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust este modern, cu suport complet pentru lucruri precum Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust folosește macrocomenzi pentru situațiile în care doriți să aveți un \"\n\"număr variabil de argumente (fără [supraîncărcare](basic-syntax/functions-\"\n\"interlude.md) de funcții ).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Fiind \\\"igienice\\\", macrourile înseamnă că nu captează accidental \"\n\"identificatori din domeniul de aplicare în care sunt utilizate. Macro-urile \"\n\"Rust sunt de fapt doar [parțial igienice](https://veykril.github.io/tlborm/\"\n\"decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust este multi-paradigmă. De exemplu, are [caracteristici puternice de \"\n\"programare orientată pe obiecte](https://doc.rust-lang.org/book/ch17-00-oop.\"\n\"html) și, deși nu este un limbaj funcțional, include o serie de [concepte \"\n\"funcționale](https://doc.rust-lang.org/book/ch13-00-functional-features.\"\n\"html).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust oferă siguranță de tip prin intermediul tipizării statice. Legăturile \"\n\"variabilelor sunt imuabile în mod implicit:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Scoateți comentariul `x = 20` pentru a demonstra că variabilele sunt \"\n\"imuabile în mod implicit. Adăugați cuvântul cheie `mut` pentru a permite \"\n\"modificări.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"Aici `i32` este tipul variabilei. Acesta trebuie să fie cunoscut la \"\n\"compilare, dar inferența de tip (abordată mai târziu) permite \"\n\"programatorului să o omită în multe cazuri.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"Iată câteva tipuri de bază încorporate și sintaxa pentru valorile literale \"\n\"ale fiecărui tip.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Tipuri\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Literale\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Numere întregi cu semn\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Întregi fără semn\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Numere în virgulă mobilă\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Valori scalare Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Booleeni\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Tipurile au lungimi după cum urmează:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN`, și `fN` au o lungime de _N_ biți,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` și `usize` reprezintă lungimea unui pointer,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` are o lungime de 32 de biți,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` are o lungime de 8 biți.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Există câteva elemente de sintaxă care nu sunt prezentate mai sus:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Toate sublinierile din numere pot fi omise, ele sunt folosite doar pentru \"\n\"lizibilitate. Astfel, `1_000` poate fi scris ca `1000` (sau `10_00`), iar \"\n\"`123_i64` poate fi scris ca `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"Aceasta este prima dată când vedem o altă funcție decât `main`, dar \"\n\"semnificația ar trebui să fie clară: primește trei numere întregi și \"\n\"returnează un număr întreg. Funcțiile vor fi tratate mai în detaliu mai \"\n\"târziu.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\"Aritmetica este foarte asemănătoare cu cea din alte limbaje, cu precedență \"\n\"similară.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\"Cum rămâne cu depășirea de numere întregi? În C și C++, depășirea numărului \"\n\"de numere întregi cu semn este, de fapt, nedefinită și poate avea efecte \"\n\"diferite pe diferite platforme sau compilatoare. În Rust, este definită.\"\n\n#: src/types-and-values/arithmetic.md\n#, fuzzy\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Schimbați `i32` în `i16` pentru a vedea o depășire de număr întreg, care \"\n\"intră în panică (verificată) într-o compilare de depanare și care se \"\n\"înfășoară într-o compilare de release. Există și alte opțiuni, cum ar fi \"\n\"depășirea, saturarea și reținerea depășirii. Acestea sunt accesate cu \"\n\"sintaxa metodei, de exemplu, `(a * b).saturating_add(b * c).saturating_add(c \"\n\"* a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"De fapt, compilatorul va detecta depășirea expresiilor constante, motiv \"\n\"pentru care exemplul necesită o funcție separată.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust se va uita la modul în care variabila este _utilizată_ pentru a \"\n\"determina tipul:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Această pagină demonstrează modul în care compilatorul Rust deduce tipurile \"\n\"pe baza constrângerilor date de declarațiile și utilizările variabilelor.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Este foarte important să subliniem că variabilele declarate astfel nu sunt \"\n\"de un fel de \\\"tip dinamic\\\" care poate conține orice date. Codul mașină \"\n\"generat de o astfel de declarație este identic cu declarația explicită a \"\n\"unui tip. Compilatorul face treaba în locul nostru și ne ajută să scriem un \"\n\"cod mai concis.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Atunci când nu există constrângeri pentru tipul unui literal de număr \"\n\"întreg, Rust folosește în mod implicit `i32`. Acest lucru apare uneori ca \"\n\"`{integer}` în mesajele de eroare. În mod similar, literalii în virgulă \"\n\"mobilă sunt în mod implicit `f64`.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// EROARE: nicio implementare pentru `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"Primul și al doilea număr Fibonacci sunt ambele `1`. Pentru n>2, cel de-al n-\"\n\"lea număr Fibonacci se calculează recursiv ca sumă a celor două numere \"\n\"anterioare.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"Scrieți o funcție `fib(n)` care să calculeze al n-lea număr Fibonacci. Când \"\n\"va intra în panică această funcție?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// Cazul de bază.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\"\n\"Încercați să rezolvați mai întâi problema în mod \\\"simplu\\\", folosind \"\n\"buclele `for` și numere întregi. Apoi, revedeți soluția și încercați să o \"\n\"implementați cu iteratori.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// Cazul recursiv.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\n#, fuzzy\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[Macrouri](./control-flow-basics/macros.md) (2 minute)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[Bucle](./control-flow-basics/loops.md) (5 minute)\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"\"\n\"[`break` și `continue`](./control-flow-basics/break-continue.md) (5 minute)\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\"[Blocuri și domenii de aplicare](./control-flow-basics/blocks-and-scopes.md) \"\n\"(10 minute)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[Funcții](./control-flow-basics/functions.md) (3 minute)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[Macrouri](./control-flow-basics/macros.md) (2 minute)\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Secvența Collatz](./control-flow-basics/exercițiu.md) (30 minute)\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Expresii 'if'\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"[Expresiile `if`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) se utilizează exact ca și instrucțiunile `if` din alte \"\n\"limbaje:\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"zero!\\\"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"măricel\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"imens\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"În plus, puteți utiliza `if` ca expresie. Ultima expresie din fiecare bloc \"\n\"devine valoarea expresiei `if`:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"mic\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"mare\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"dimensiunea numărului: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Deoarece `if` este o expresie și trebuie să aibă un anumit tip, ambele \"\n\"blocuri de ramificare trebuie să aibă același tip. Să vedem ce se întâmplă \"\n\"dacă adăugați `;` după `x / 2` în al doilea exemplu.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"Atunci când `if` este utilizat într-o expresie, expresia trebuie să aibă un \"\n\"`;` pentru a o separa de următoarea declarație. Eliminați `;` înainte de \"\n\"`println!` pentru a vedea eroarea de compilare.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\"În Rust există trei cuvinte cheie pentru bucle: `while`, `loop` și `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"Bucle `while let`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"Cuvântul cheie [`while`](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops) funcționează foarte asemănător cu alte \"\n\"limbaje, executând bucla cât timp condiția este adevărată.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"Buclele [`for`](https://doc.rust-lang.org/std/keyword.for.html) sunt \"\n\"utilizate pentru a itera peste o gamă de valori:\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"În cadrul buclelor `for` se utilizează un concept numit \\\"iteratori\\\" pentru \"\n\"a gestiona iterația peste diferite tipuri de intervale/colecții. Iteratorii \"\n\"vor fi discutați mai în detaliu mai târziu.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\"Rețineți că bucla `for` va itera doar până la `4`. Prezentați sintaxa `1..\"\n\"=5` pentru un interval inclusiv.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"Buclele [`loop`](https://doc.rust-lang.org/std/keyword.loop.html) rulează în \"\n\"continuu până se întâlnește o instrucțiune `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Dacă doriți să începeți imediat următoarea iterație, utilizați [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Dacă doriți să ieșiți mai devreme dintr-o buclă, utilizați [`break`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions). \"\n\"`loop` poate folosi o expresie opțională care devine valoarea buclei.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Atât `continue`, cât și `break` pot primi opțional un argument de tip label, \"\n\"care este utilizat pentru a ieși din buclele imbricate:\"\n\n#: src/control-flow-basics/break-continue/labels.md\n#, fuzzy\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elemente căutate: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"Rețineți că `loop` este singura construcție de buclă care returnează o \"\n\"valoare non-trivială. Garantează că bocla este rulată cel puțin o dată (spre \"\n\"deosebire de buclele `while` și `for`).\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blocuri\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Un bloc în Rust conține o secvență de expresii. Fiecare bloc are o valoare \"\n\"și un tip, care sunt cele ale ultimei expresii din bloc:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Dacă ultima expresie se termină cu `;`, atunci valoarea și tipul rezultat \"\n\"este `()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Puteți arăta cum se modifică valoarea blocului modificând ultima linie din \"\n\"bloc. De exemplu, adăugând/eliminând un punct și virgulă sau folosind un \"\n\"`return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\"Domeniul de aplicare al unei variabile este limitat la blocul care o conține.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Puteți dedubla variabilele, atât cele din domenii de aplicare exterioare, \"\n\"cât și variabilele din același domeniu de aplicare:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"înainte: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"domeniul de aplicare interior: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"dedublată în domeniul interior: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"đupă: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"Arătați că domeniul de aplicare al unei variabile este limitat prin \"\n\"adăugarea unui `b` în blocul interior din ultimul exemplu și apoi prin \"\n\"încercarea de a o accesa în afara blocului.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Definiție: Dedublarea este diferită de mutație, deoarece după dedublare \"\n\"ambele locații de memorie ale variabilei există în același timp. Ambele sunt \"\n\"disponibile sub același nume, în funcție de locul în care se utilizează în \"\n\"cod.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"O variabilă dedublată poate avea un tip diferit.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Dedublarea pare obscură la început, dar este convenabilă pentru a păstra \"\n\"valorile după `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Parametrii de declarație sunt urmați de un tip (invers decât în alte limbaje \"\n\"de programare), apoi de tipul valorii returnate.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Ultima expresie din corpul unei funcții (sau din orice bloc) devine valoarea \"\n\"de returnare. Pur și simplu omiteți `;` de la sfârșitul expresiei. Cuvântul \"\n\"cheie `return` se poate folosi pentru a ieși anticipat din funcție, dar \"\n\"\\\"valoarea brută\\\" este idiomatică la sfârșitul funcției (rescrieți `gcr` \"\n\"pentru a utiliza un `return`).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Unele funcții nu au nicio valoare de retur și returnează \\\"tipul unitate\\\", \"\n\"`()`. Compilatorul va deduce acest lucru în cazul în care tipul de returnare \"\n\"`-> ()` este omis.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\"Supraîncărcarea nu este suportată — fiecare funcție are o singură \"\n\"implementare.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Acceptă întotdeauna un număr fix de parametri. Argumentele implicite nu sunt \"\n\"acceptate. Se pot utiliza macrocomenzi pentru a sprijini funcțiile variadice.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Acceptă întotdeauna un singur set de tipuri de parametri. Acestea pot fi \"\n\"generice, despre care vom discuta mai târziu.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Macrocomenzile sunt expandate în codul Rust în timpul compilării și pot \"\n\"primi un număr variabil de argumente. Ele se disting prin adăugarea unui `!` \"\n\"la sfârșit. Biblioteca standard Rust include o gamă întreagă de macro-uri \"\n\"utile.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` afișează o linie la ieșirea standard, aplicând \"\n\"formatarea specificată în [`std::fmt`](https://doc.rust-lang.org/std/fmt/\"\n\"index.html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` funcționează la fel ca `println!`, dar returnează \"\n\"rezultatul sub forma unui șir de caractere.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expresie)` înregistrează valoarea expresiei și o returnează.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` marchează o bucată de cod ca fiind neimplementată încă. Dacă este \"\n\"executat, va intra în panică.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` marchează un fragment de cod ca fiind inaccesibil. Dacă \"\n\"este executat, programul va intra în panică.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"Trebuie să rețineți cum să folosiți aceste facilități comune. De ce sunt \"\n\"definite ca macro-uri și la ce se extind acestea nu este deosebit de \"\n\"important.\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"Cursul nu acoperă definirea macrocomenzilor, dar o secțiune ulterioară va \"\n\"descrie utilizarea macrocomenzilor `derive`.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"[Secvența Collatz](https://en.wikipedia.org/wiki/Collatz_conjecture) se \"\n\"definește după cum urmează, pentru un număr n arbitrar\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \" mai mare decât zero:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"If _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ este 1, atunci secvența se termină la _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ este par, atunci _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ este impar, atunci _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"De exemplu, începând cu _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 este impar, deci _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 este par, deci _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 este impar, deci _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"16 este par, deci _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"8 este par, deci _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"4 este par, deci _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"2 este par, deci _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1; and\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"secvența se termină.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Scrieți o funcție care să calculeze lungimea secvenței Collatz pentru un \"\n\"anumit `n` inițial.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Determinați lungimea secvenței collatz care începe la `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Bine ați revenit\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Tupluri și vectori](./tuples-and-arrays.md) (1 oră)\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"[References](./references.md) (55 minutes)\"\nmsgstr \"[Referințe](../references.md) (50 minute)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"[Tipuri definite de utilizator](../user-defined-types.md) (50 minute)\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 55 de minute\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"\"\n\"[Tupluri și vectori](./tuples-and-arrays/tuples-and-arrays.md)  (10 minute)\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"\"\n\"[Tupluri și vectori](./tuples-and-arrays/tuples-and-arrays.md)  (10 minute)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"[Iterarea pe vectori](./tuples-and-arrays/iteration.md) (3 minute)\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"[Destructurare](./tuples-and-arrays/destructuring.md) (5 minute)\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: vectori imbricați](./tuples-and-arrays/exercise.mds) (30 minute)\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 55 de minute\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"O valoare de tip tablou `[T; N]` conține `N` (o constantă de timp de \"\n\"compilare) elemente de același tip `T`. Rețineți că lungimea tabloului este \"\n\"_parte a tipului său_, ceea ce înseamnă că `[u8; 3]` și `[u8; 4]` sunt \"\n\"considerate două tipuri diferite.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"Încercați să accesați un element de tablou în afara limitelor. Accesările \"\n\"elementelor din tablou sunt verificate în timpul execuției. De obicei, Rust \"\n\"poate optimiza aceste verificări, iar acestea pot fi evitate folosind unsafe \"\n\"Rust.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Putem utiliza literali pentru a atribui valori la matrice.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"Macroul `println!` solicită implementarea de depanare cu parametrul de \"\n\"format `?`: `{}` oferă ieșirea implicită, `{:?}` oferă ieșirea de depanare. \"\n\"Tipuri precum întregi și șiruri de caractere implementează ieșirea \"\n\"implicită, dar matricile implementează doar ieșirea de depanare. Aceasta \"\n\"înseamnă că trebuie să folosim aici ieșirea de depanare.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Adăugând `#`, de exemplu `{a:#?}`, se invocă un format de tipărire \"\n\"\\\"frumos\\\", care poate fi mai ușor de citit.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Tuplurile au o lungime fixă, întocmai vectorilor.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Tuplurile grupează valori de tipuri diferite într-un tip compus.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Câmpurile unui tuplu pot fi accesate prin punct și indicele valorii, de \"\n\"exemplu `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\n#, fuzzy\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"Tupla goală `()` este denumită \\\"tip unitate\\\" și semnifică absența unei \"\n\"valori de returnare, asemănătoare cu `void` din alte limbaje.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\"Instrucțiunea `for` permite iterația peste tablouri (dar nu și peste \"\n\"tupluri).\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Această funcționalitate utilizează trăsătura `IntoIterator`, dar încă nu am \"\n\"abordată-o în cadrul cursului.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"Macroul `assert_ne!` este nou aici. Există, de asemenea, macrourile \"\n\"`assert_eq!` și `assert!`. Acestea sunt întotdeauna verificate, în timp ce \"\n\"variantele destinate depanării, cum ar fi `debug_assert!`, nu se compilează \"\n\"în versiunile de lansare.\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"Atunci când se lucrează cu tupluri și alte valori structurate, este obișnuit \"\n\"să se dorească extragerea valorilor interioare în variabile locale. Acest \"\n\"lucru se poate face manual prin accesarea directă a valorilor interioare:\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"stânga: {left}, dreapta: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"Cu toate acestea, Rust suportă, de asemenea, utilizarea potrivirii de tipare \"\n\"pentru a destructura o valoare mai mare în părțile sale constitutive:\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Tiparele utilizate aici sunt \\\"irefutabile\\\", ceea ce înseamnă că \"\n\"compilatorul poate verifica static că valoarea din dreapta lui `=` are \"\n\"aceeași structură ca și modelul.\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Un nume de variabilă este un model irefutabil care se potrivește întotdeauna \"\n\"cu orice valoare, de aceea putem folosi și `let` pentru a declara o singură \"\n\"variabilă.\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust acceptă, de asemenea, utilizarea modelelor în condiționale, permițând \"\n\"compararea egalității și destructurarea în același timp. Această formă de \"\n\"potrivire a modelelor va fi discutată mai în detaliu mai târziu.\"\n\n#: src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Modificați exemplele de mai sus pentru a afișa eroarea compilatorului atunci \"\n\"când modelul nu se potrivește cu valoarea pe care se face potrivirea.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Vectorii pot conține alți vectori:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"Care este tipul acestei variabile?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Folosiți cele de mai sus pentru a scrie o funcție `transpose` care va \"\n\"transpune o matrice (transformă rândurile în coloane):\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Copiați codul de mai jos în <https://play.rust-lang.org/> și implementați \"\n\"funcția.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\"// TODO: eliminați acest comentariu atunci când ați terminat cu \"\n\"implementarea.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- comentariul face ca rustfmt să adauge o linie nouă\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"Matricea: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transpus: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"[Referințe exclusive](./references/exclusive.md) (10 minute)\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\nmsgstr \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minute)\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Strings](./references/strings.md) (10 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"[Exercițiu: Geometrie](./references/exercise.md) (30 minute)\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/error-handling.md src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 55 de minute\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"O referință oferă o modalitate de a accesa o altă valoare fără a prelua \"\n\"responsabilitatea pentru valoarea respectivă, fiind denumită și \"\n\"\\\"împrumut\\\". Referințele partajate sunt numai pentru citire, iar datele la \"\n\"care se face referire nu se pot modifica.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"O referință partajată la un tip `T` are tipul `&T`. O valoare de referință \"\n\"se realizează cu ajutorul operatorului `&`. Operatorul `*` \\\"de-\"\n\"referențiază\\\" o referință, obținând valoarea acesteia.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust va interzice în mod static referințele invalide:\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"Se spune că o referință \\\"împrumută\\\" valoarea la care se referă, iar acesta \"\n\"este un model bun pentru elevii care nu sunt familiarizați cu indicatoarele: \"\n\"codul poate folosi referința pentru a accesa valoarea, dar este în \"\n\"continuare \\\"deținută\\\" de variabila originală. Cursul va intra în mai multe \"\n\"detalii despre proprietate în ziua 3.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"Referințele sunt implementate sub formă de pointeri, iar un avantaj cheie \"\n\"este că pot fi mult mai mici decât obiectul spre care indică. Studenții \"\n\"familiarizați cu C sau C++ vor recunoaște referințele ca fiind pointeri. \"\n\"Părțile ulterioare ale cursului vor acoperi modul în care Rust previne \"\n\"erorile de siguranță a memoriei care apar în cazul utilizării de pointeri \"\n\"brute.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\"Rust nu creează automat referințe pentru dumneavoastră - `&` este \"\n\"întotdeauna necesar.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust va face auto-dereferențiere în unele cazuri, în special atunci când \"\n\"invocă metode (încercați `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"În acest exemplu, `r` este mutabil, astfel încât poate fi realocat (`r = \"\n\"&b`). Rețineți că acest lucru reia `r`, astfel încât acesta se referă la \"\n\"altceva. Acest lucru este diferit de C++, unde atribuirea unei referințe \"\n\"modifică valoarea la care se face referire.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"O referință partajată nu permite modificarea valorii la care se referă, \"\n\"chiar dacă valoarea respectivă era mutabilă. Încercați `*r = 'X'`.\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust urmărește durata de viață a tuturor referințelor pentru a se asigura că \"\n\"acestea trăiesc suficient de mult. În Rust sigur nu pot apărea referințe \"\n\"care să stea în suspensie. `x_axis` ar trebui să returneze o referință la \"\n\"`point`, dar `point` va fi dezalocat atunci când funcția se întoarce, deci \"\n\"nu va fi compilat.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\"Vom vorbi mai multe despre împrumuturi atunci când vom ajunge la posesie.\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"Referințele exclusive, cunoscute și sub denumirea de referințe mutabile, \"\n\"permit modificarea valorii la care se referă. Ele au tipul `&mut T`.\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"Exclusiv\\\" înseamnă că numai această referință poate fi utilizată pentru a \"\n\"accesa valoarea. Nici o altă referință (partajată sau exclusivă) nu poate \"\n\"exista în același timp, iar valoarea la care se face referire nu poate fi \"\n\"accesată atât timp cât există o referință exclusivă. Încercați să faceți un \"\n\"`&punct.0` sau să modificați `punct.0` în timp ce `x_coord` este în viață.\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Nu uitați să observați diferența dintre `let mut ref_x: &i32` și `let ref_x: \"\n\"&mut i32`. Primul reprezintă o referință mutabilă care poate fi legată la \"\n\"diferite valori, în timp ce al doilea reprezintă o referință la o valoare \"\n\"mutabilă.\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Felii\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"O felie (elice) vă oferă o imagine a unei colecții mai mari:\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Feliile împrumută date din tipul porționat.\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\"Întrebare: Ce se întâmplă dacă modificați `a[3]` chiar înainte de a afișa \"\n\"`s`?\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Creăm o felie prin împrumutarea lui `a` și specificarea indicilor de început \"\n\"și de sfârșit între paranteze.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust's range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Dacă felia începe la indexul 0, sintaxa intervalului din Rust ne permite să \"\n\"renunțăm la indexul de pornire, ceea ce înseamnă că `&a[0..a.len()]` și \"\n\"`&a[..a.len()]` sunt identice.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Același lucru este valabil și pentru ultimul indice, astfel încât `&a[2..a.\"\n\"len()]` și `&a[2..]` sunt identice.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Pentru a crea cu ușurință o porțiune din întrega matrice, putem folosi \"\n\"`&a[...]`.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` este o referință la o felie de `i32`s. Observați că tipul lui `s` \"\n\"(`&[i32]`) nu mai menționează dimensiunile matricei. Acest lucru ne permite \"\n\"să efectuăm calcule pe felii de dimensiuni diferite.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Feliile împrumută întotdeauna de la un alt obiect. În acest exemplu, `a` \"\n\"trebuie să rămână \\\"în viață\\\" (în domeniul de aplicare) cel puțin cât felia \"\n\"noastră. \"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"Întrebarea despre modificarea lui `a[3]` poate stârni o discuție \"\n\"interesantă, dar răspunsul este că, din motive de siguranță a memoriei, nu \"\n\"se poate face acest lucru prin `a` în acest moment al execuției, dar se pot \"\n\"citi datele atât din `a`, cât și din `s` în siguranță. Funcționează înainte \"\n\"de a crea felia și din nou după `println`, când felia nu mai este utilizată. \"\n\"Mai multe detalii vor fi explicate în secțiunea de verificare a \"\n\"împrumuturilor.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Acum putem înțelege cele două tipuri de șiruri de caractere din Rust:\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"`&str` este o felie de octeți codificați UTF-8, similar cu `&[u8]`.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"`&str` este o felie de octeți codificați UTF-8, similar cu `&[u8]`.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"Lumea\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program's binary.\"\nmsgstr \"\"\n\"`&str` indică o porțiune dintr-un șir de caractere, care este o referință \"\n\"imuabilă la date de șir de caractere codificate UTF-8 stocate într-un bloc \"\n\"de memorie. Șirurile literale (`\\\"Hello\\\"`) sunt stocate în binarul \"\n\"programului.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Tipul `String` (șir de caractere) din Rust este un înveliș în jurul unui \"\n\"vector de octeți. La fel ca și în cazul unui `Vec<T>`, acesta este propriu.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Ca și în cazul multor alte tipuri, `String::from()` creează un șir de \"\n\"caractere dintr-un literal de șir; `String::new()` creează un nou șir de \"\n\"caractere gol, la care se pot adăuga date de șiruri de caractere folosind \"\n\"metodele `push()` și `push_str()`.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"Macroul `format!()` este o modalitate convenabilă de a genera un șir de \"\n\"caractere proprii din valori dinamice. Acceptă aceeași specificație de \"\n\"format ca și `println!()`.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"Puteți împrumuta felii `&str` de la `String` prin `&` și, opțional, prin \"\n\"selectarea intervalului. Dacă selectați un interval de octeți care nu este \"\n\"aliniat la limitele caracterelor, expresia va intra în panică. Iteratorul \"\n\"`chars` iteră peste caractere și este de preferat în locul încercării de a \"\n\"obține limite de caractere corecte.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Pentru programatorii din C++: gândiți-vă la `&str` ca la `const char*` din C+\"\n\"+, dar cel care indică întotdeauna un șir de caractere valid în memorie. \"\n\"Rust `String` este un echivalent aproximativ al lui `std::string` din C++ \"\n\"(principala diferență: poate conține numai octeți codificați UTF-8 și nu va \"\n\"folosi niciodată o optimizare pentru șiruri mici).\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Șirurile de octeți vă permit să creați direct o valoare `&[u8]`:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Șirurile brute de caractere vă permit să creați o valoare `&str` având \"\n\"caracterele speciale dezactivate: `r\\\"\\\\n\\\" == \\\"\\\\n\\\"`. Puteți încorpora \"\n\"ghilimele duble folosind o cantitate egală de `#` de o parte și de alta a \"\n\"lor:\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"Vom crea câteva funcții de utilitate pentru geometria tridimensională, \"\n\"reprezentând un punct ca `[f64;3]`. Depinde de dumneavoastră să determinați \"\n\"semnăturile funcțiilor.\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Calculează mărimea unui vector prin însumarea pătratelor coordonatelor \"\n\"sale\\n\"\n\"// și luând rădăcina pătrată. Utilizați metoda `sqrt()` pentru a calcula \"\n\"pătratul\\n\"\n\"// rădăcina pătrată, cum ar fi `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Normalizați un vector prin calcularea magnitudinii sale și împărțirea \"\n\"tuturor vectorilor săi\\n\"\n\"// coordonate la această mărime.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// Folosiți următoarea funcție `main` pentru a vă testa munca.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitudinea unui vector unitar: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitudine de {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitudinea lui {v:?} după normalizare: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Calculează magnitudinea vectorului dat.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\"/// Modificați magnitudinea vectorului la 1.0 fără a-i schimba direcția.\\n\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"[Structuri cu nume](./user-defined-types/named-structs.md) (10 minute)\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\"[Structuri de tuplu](./user-defined-types/tuple-structs.md) (10 minute)\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"[Enums](./user-defined-types/enums.md) (5 minute)\"\n\n#: src/user-defined-types.md\n#, fuzzy\nmsgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\nmsgstr \"[Static și Const](./user-defined-types/static-and-const.md) (5 minute)\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"[Aliasuri de tip](./user-defined-types/aliases.md) (2 minute)\"\n\n#: src/user-defined-types.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Evenimente de lift](./user-defined-types/exercise.md) (15 minute)\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 50 de minute\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"La fel ca în C și C++, Rust are suport pentru structuri personalizate:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} are {} ani\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"Puncte-cheie:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Structurile funcționează ca în C sau C++.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"La fel ca în C++ și spre deosebire de C, nu este nevoie de un typedef pentru \"\n\"a defini un tip.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"Spre deosebire de C++, nu există moștenire între structuri.\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"Acesta ar putea fi un moment bun pentru a informa oamenii că există diferite \"\n\"tipuri de structuri.\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don't have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"Structurile de dimensiune zero (de exemplu, `struct Foo;`) pot fi utilizate \"\n\"atunci când se implementează o trăsătură pe un anumit tip, dar nu aveți date \"\n\"pe care doriți să le stocați în valoarea în sine.\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"Următorul diapozitiv va prezenta structurile Tuple, utilizate atunci când \"\n\"numele câmpurilor nu sunt importante.\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Dacă aveți deja variabile cu numele corecte, puteți crea structura folosind \"\n\"o prescurtare:\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"Sintaxa `..peter` ne permite să copiem majoritatea câmpurilor din vechea \"\n\"structură fără a fi nevoie să le scriem în mod explicit pe toate. Acesta \"\n\"trebuie să fie întotdeauna ultimul element.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"În cazul în care numele câmpurilor nu sunt importante, puteți utiliza o \"\n\"structură de tip tuple:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Acest lucru este adesea utilizat pentru învelișurile cu un singur câmp \"\n\"(denumite newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Întrebați un specialist în rachete de la NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Newtypes reprezintă o modalitate excelentă de a codifica informații \"\n\"suplimentare despre valoarea unui tip primitiv, de exemplu:\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Numărul este măsurat în anumite unități: `Newtons` în exemplul de mai sus.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Valoarea a trecut printr-o validare atunci când a fost creată, astfel încât \"\n\"nu mai trebuie să o validați din nou la fiecare utilizare: \"\n\"`PhoneNumber(String)` sau `OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Demonstrați cum să adăugați o valoare `f64` la un tip `Newtons` prin \"\n\"accesarea unui singur câmp din noul tip.\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"Rust generally doesn't like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"În general, Rust nu agreează lucrurile inexplicabile, cum ar fi desfacerea \"\n\"automată sau, de exemplu, utilizarea booleenilor ca numere întregi.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"Supraîncărcarea operatorilor este discutată în ziua 3 (generice).\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"Exemplul este o referire subtilă la eșecul [Mars Climate Orbiter] (https://\"\n\"en.wikipedia.org/wiki/Mars_Climate_Orbiter).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Cuvântul cheie `enum` permite crearea unui tip care are câteva variante \"\n\"diferite:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Variantă simplă\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Varianta cu tupluri\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Variantă de structură\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"În acest tur: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Enumerările vă permit să colectați un set de valori sub un singur tip\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` este un tip cu variante. Există două valori pentru `Direction`: \"\n\"`Direction::Left` și `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` este un tip cu trei variante. În plus față de sarcinile utile, \"\n\"Rust va stoca un discriminant, astfel încât să știe la momentul execuției ce \"\n\"variantă se află într-o valoare `PlayerMove`.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\"Acesta ar putea fi un moment bun pentru a compara structurile și \"\n\"enumerațiile:\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"În ambele, puteți avea o versiune simplă fără câmpuri (unit struct) sau una \"\n\"cu diferite tipuri de câmpuri (varianta payloads). \"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn't be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Ați putea chiar să implementați diferitele variante ale unui enum cu \"\n\"structuri separate, dar atunci acestea nu ar fi de același tip ca în cazul \"\n\"în care ar fi definite toate într-un enum.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust utilizează un spațiu minim pentru a stoca discriminantul.\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\"Dacă este necesar, se stochează un număr întreg de cea mai mică dimensiune \"\n\"necesară\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"În cazul în care valorile variantelor permise nu acoperă toate modelele de \"\n\"biți, se vor utiliza modele de biți nevalabile pentru a codifica \"\n\"discriminantul (\\\"optimizarea nișei\\\"). De exemplu, `Option<&u8>` stochează \"\n\"fie un pointer la un întreg, fie `NULL` pentru varianta `None`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"Puteți controla discriminantul dacă este necesar (de exemplu, pentru \"\n\"compatibilitate cu C):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"Fără `repr`, tipul de discriminant are nevoie de 2 octeți, deoarece 10001 se \"\n\"reprezintă cu 2 octeți.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"Mai multe de explorat\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"Rust are mai multe optimizări pe care le poate folosi pentru ca enumerațiile \"\n\"să ocupe mai puțin spațiu.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Optimizarea pointerilor nuli: Pentru [unele tipuri](https://doc.rust-lang.\"\n\"org/std/option/#representation) Rust garantează că `size_of::<T>()` este \"\n\"egal cu `size_of::&lt;Opțiune<T>&gt;()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Exemplu de cod pentru a putea arăta în practică reprezentarea pe biți. \"\n\"Compilatorul nu oferă nicio garanție în ceea ce privește această \"\n\"reprezentare, prin urmare este total nesigură.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"'Static'\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"Variabilele statice vor fi valabile pe toată durata execuției programului \"\n\"și, prin urmare, nu se vor muta:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"RustOS 3.14 vă salută\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"După cum se menționează în [Rust RFC Book](https://rust-lang.github.io/\"\n\"rfcs/0246-const-vs-static.html), acestea nu sunt incluse în cod la utilizare \"\n\"și au o locație de memorie reală asociată. Acest lucru este util pentru \"\n\"codul nesigur și care ruleaza  direct pe device (embedded) , iar variabila \"\n\"există pe toată durata execuției programului. Atunci când o valoare cu \"\n\"acoperire globală nu are nevoie de identitatea obiectului, `const` este în \"\n\"general preferat.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\"`static`, pe de altă parte, este mult mai asemănătoar cu o variabilă globală \"\n\"`const` sau mutabilă în C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` asigură identitatea obiectului: o adresă în memorie și starea \"\n\"necesară pentru tipurile cu mutabilitate interioară, cum ar fi `Mutex<T>`.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"Deoarece variabilele `statice` sunt accesibile din orice fir de execuție, \"\n\"ele trebuie să fie `Sync`. Mutabilitatea interioară este posibilă prin \"\n\"intermediul unui [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.\"\n\"html), atomic sau similar. De asemenea, este posibil să aveți variabile \"\n\"statice mutabile, dar acestea necesită sincronizare manuală, astfel încât \"\n\"orice acces la ele necesită cod `unsafe`. Ne vom uita la [mutable statics]\"\n\"(../unsafe/mutable-static-variables.md) în capitolul despre Unsafe Rust.\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"Datele `thread_local` pot fi create cu ajutorul macroului `std::\"\n\"thread_local`.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"Variabilele constante sunt evaluate la compilare, iar valorile lor sunt \"\n\"înlocuite în cod ori de câte ori sunt utilizate:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"În conformitate cu [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-\"\n\"const-vs-static.html), acestea sunt înlocuite în cod la utilizare.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"Numai funcțiile marcate `const` pot fi apelate la compilare pentru a genera \"\n\"valori `const`. Funcțiile `const` totuși pot fi apelate în timpul execuției.\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"Menționați faptul că în Rust `const` are un comportament semantic similar cu \"\n\"`constexpr` din C++.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Nu este foarte des întâlnit cazul în care cineva ar avea nevoie de o \"\n\"constantă evaluată în timp de execuție, dar este utilă și mai sigură decât \"\n\"utilizarea unei constante statice.\"\n\n#: src/user-defined-types/aliases.md\n#, fuzzy\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"Un alias de tip creează un nume pentru un alt tip. Cele două tipuri pot fi \"\n\"utilizate în mod interschimbabil.\"\n\n#: src/user-defined-types/aliases.md\n#, fuzzy\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// Aliasurile sunt mai utile în cazul tipurilor lungi și complexe:\\n\"\n\n#: src/user-defined-types/aliases.md\n#, fuzzy\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\"Programatorii C vor recunoaște acest lucru ca fiind similar cu un `typedef`.\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"Vom crea o structură de date pentru a reprezenta un eveniment într-un sistem \"\n\"de control al ascensorului. Depinde de dumneavoastră să definiți tipurile și \"\n\"funcțiile pentru a construi diverse evenimente. Utilizați `#[derive(Debug)]` \"\n\"pentru a permite formatarea tipurilor cu `{:?}`.\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"Acest exercițiu necesită doar crearea și popularea structurilor de date \"\n\"astfel încât `main` să ruleze fără erori. Următoarea parte a cursului se va \"\n\"ocupa de extragerea datelor din aceste structuri.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// Un eveniment din sistemul de ascensoare la care trebuie să reacționeze \"\n\"controlerul.\\n\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: adăugați variantele necesare\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// O direcție de deplasare.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// Mașina a ajuns la etajul dat.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// Portierele mașinii s-au deschis.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// Ușile mașinii s-au închis.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// Un buton direcțional a fost apăsat în holul liftului de la etajul dat.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// Un buton de podea a fost apăsat în cabina liftului.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"Un pasager de la parter a apăsat butonul de urcare: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"Mașina a ajuns la parter: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"S-a deschis portiera mașinii: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"Un pasager a apăsat butonul de la etajul 3: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"Ușa mașinii s-a închis: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"Mașina a ajuns la etajul 3: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// A fost apăsat un buton.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// Mașina a ajuns la etajul dat.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// Portierele mașinii s-au deschis.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// Portierele mașinii s-au închis.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// Un etaj este reprezentat ca un număr întreg.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// Un buton accesibil utilizatorului.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// Un buton în holul liftului de la etajul dat.\\n\"\n\n#: src/user-defined-types/solution.md\n#, fuzzy\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// Un buton de podea în interiorul mașinii.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Bine ați venit în ziua a doua\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Acum, că am văzut o cantitate destul de mare de rugină, vom continua cu:\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\"Găsirea de tipare: destructurarea enumerațiilor, structurilor și a \"\n\"tablourilor.\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Metode: asocierea funcțiilor cu tipurile.\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Trăsături: comportamente împărtășite de mai multe tipuri.\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Generice: parametrizarea tipurilor pe alte tipuri.\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Tipuri și trăsături ale bibliotecii standard: un tur al bogatei biblioteci \"\n\"standard Rust.\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Introducere](../welcome-day-2.md) (3 minute)\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Metode și trăsături](./methods-and-traits.md) (55 minute)\"\n\n#: src/welcome-day-2.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 15 minute\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"\"\n\"[Destructuring Structs](./pattern-matching/destructuring-structs.md) (4 \"\n\"minutes)\"\nmsgstr \"[Destructurare](./pattern-matching/destructuring.md) (10 minute)\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"\"\n\"[Destructuring Enums](./pattern-matching/destructuring-enums.md) (4 minutes)\"\nmsgstr \"[Destructurare](./pattern-matching/destructuring.md) (10 minute)\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\"[Lasă controlul să curgă](./pattern-matching/let-control-flow.md) (10 minute)\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Evaluarea expresiilor](./pattern-matching/exercise.md) (30 \"\n\"minute)\"\n\n#: src/pattern-matching.md src/memory-management.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 1 oră\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"Cuvântul cheie `match` vă permite să comparați o valoare cu unul sau mai \"\n\"multe _șabloane_. Comparațiile se fac de sus în jos, iar prima potrivire \"\n\"câștigă.\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"Modelele pot fi valori simple, la fel ca `switch` în C și C++:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Renunțarea\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Permutarea\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Introducere număr\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Litera mică: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Altceva\\\"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"Șablonul `_` este un model jocker care se potrivește cu orice valoare. \"\n\"Expresiile _trebuie_ să fie irefutabile, ceea ce înseamnă că acoperă orice \"\n\"posibilitate, astfel încât `_` este adesea utilizat ca ultim caz universal.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Potrivirea se poate folosi ca o expresie. Similar cu 'if', cele două părți \"\n\"ale expresiei trebuie să aibă același tip. Dacă există, ultima expresie din \"\n\"bloc dă tipul. În exemplul anterior, tipul este '()'.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"O variabilă din model (`key` în acest exemplu) va crea o legătură care poate \"\n\"fi utilizată în cadrul brațului de potrivire.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\"O protecție de potrivire face ca brațul să se potrivească numai dacă \"\n\"condiția este adevărată.\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Ați putea indica modul în care sunt folosite anumite caractere specifice \"\n\"atunci când se află într-un șablon\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` ca un `or` (sau)\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`...` se poate extinde atât cât este nevoie\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` reprezintă un interval inclusiv\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` este un 'joker'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Gărzile de potrivire, ca o caracteristică sintactică separată, sunt \"\n\"importante și necesare atunci când dorim să exprimăm în mod concis idei mai \"\n\"complexe decât ne-ar permite doar șabloanele.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Acestea sunt diferite de expresia `if` din interiorul ramurii de potrivire. \"\n\"O expresie `if` în interiorul blocului de ramificare (după `=>`) apare după \"\n\"ce este selectată ramura de potrivire. În cazul în care nu se îndeplinește \"\n\"condiția `if` din interiorul blocului respectiv, nu vor fi luate în \"\n\"considerare alte ramuri ale expresiei `match` originale.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Condiția definită în gardă se aplică fiecărei expresii dintr-un model cu `|`.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Structuri\"\n\n#: src/pattern-matching/destructuring-structs.md\n#, fuzzy\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\"Ca și tuplurile, structurile și enumerațiile pot fi, de asemenea, \"\n\"destructurate prin potrivire:\"\n\n#: src/pattern-matching/destructuring-structs.md\n#, fuzzy\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\n#, fuzzy\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\n#, fuzzy\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, celelalte câmpuri au fost ignorate\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\"Modificați valorile literale din `foo` pentru a se potrivi cu celelalte \"\n\"modele.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"Adăugați un nou câmp la `Foo` și modificați șablonul după cum este necesar.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"Distincția dintre o captură și o expresie constantă poate fi greu de \"\n\"observat. Încercați să schimbați `2` din a două ramură cu o variabilă și \"\n\"vedeți că, în mod subtil, nu mai funcționează. Schimbați-o într-o `const` și \"\n\"vedeți că funcționează din nou.\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"Ca și tuplurile, structurile și enumerațiile pot fi, de asemenea, \"\n\"destructurate prin potrivire:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Modelele pot fi, de asemenea, utilizate pentru a lega variabilele de părți \"\n\"ale valorilor din variabile. În acest fel puteți inspecta structura \"\n\"tipurilor dumneavoastră. Să începem cu un tip simplu `enum`:\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"nu poate împărți {n} în două părți egale\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} împărțit la doi este {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"Îmi pare rău, s-a produs o eroare: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Aici am folosit ramificațiile pentru a _destructura_ valoarea `Result`. Pe \"\n\"prima ramură `half` este legat de valoarea din interiorul variantei `Ok`. Pe \"\n\"cea de-a doua ramură, `msg` este legat de mesajul de eroare.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"Expresia `if`/`else` returnează o enumerație care este ulterior descompusă \"\n\"cu un `match`.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Puteți încerca să adăugați o a treia variantă la definiția enumerării și să \"\n\"afișați erorile atunci când executați codul. Evidențiați locurile în care \"\n\"codul dvs. este acum neexhaustiv și modul în care compilatorul încearcă să \"\n\"vă ofere indicii.\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Valorile din variantele enum pot fi accesate numai după ce au fost comparate \"\n\"cu un model. Modelul leagă referințele la câmpurile din \\\"brațul de \"\n\"potrivire\\\" după `=>`.\"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Demonstrați ce se întâmplă atunci când căutarea este neexhaustivă. Observați \"\n\"avantajul pe care îl oferă compilatorul Rust prin confirmarea momentului în \"\n\"care sunt tratate toate cazurile. \"\n\n#: src/pattern-matching/destructuring-enums.md\n#, fuzzy\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\"Salvați rezultatul `divide_in_two` în variabila `result` și `match` într-o \"\n\"buclă. Acest lucru nu va fi compilat deoarece `msg` este consumat atunci \"\n\"când se potrivește. Pentru a remedia problema, potriviți `&result` în loc de \"\n\"`result`. Acest lucru va face din `msg` o referință, astfel încât nu va fi \"\n\"consumată. Acest [\\\"match ergonomics\\\"](https://rust-lang.github.io/\"\n\"rfcs/2005-match-ergonomics.html) a apărut în Rust 2018. Dacă doriți să \"\n\"sprijiniți Rust mai vechi, înlocuiți `msg` cu `ref msg` în model.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust are câteva construcții pentru controlul fluxului care diferă de alte \"\n\"limbaje. Acestea sunt utilizate pentru potrivirea șabloanelor:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`if let` expressions\"\nmsgstr \"Expresii 'if let'\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"Expresii 'while let'\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`match` expressions\"\nmsgstr \"Expresii 'match'\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"Expresia [`if let`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions) vă permite să executați un cod diferit în funcție \"\n\"de potrivirea unei valori cu un șablon:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"dormit pentru {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"Expresii while let\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"Pentru cazul obișnuit de potrivire a unui model și de întoarcere din \"\n\"funcție, utilizați [`let else`](https://doc.rust-lang.org/rust-by-example/\"\n\"flow_control/let_else.html). Cazul \\\"else\\\" trebuie să difere (`return`, \"\n\"`break` sau panică - orice altceva în afară de căderea de la sfârșitul \"\n\"blocului).\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"Nu am primit nimic\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"a primit un șir gol\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"nu o cifră hexagonală\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Ca și în cazul lui `if let`, există o variantă [`while let`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#predicate-pattern-loops) \"\n\"care testează în mod repetat o valoare în raport cu un model:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Aici, iteratorul returnat de `v.into_iter()` va returna un `Option<i32>` la \"\n\"fiecare apel la `next()`. Acesta returnează `Some(x)` până când termină, \"\n\"după care va returna `None`. Metoda `while let` ne permite să continuăm \"\n\"iterația prin toate elementele.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"if-let\"\nmsgstr \"Fluxul de control\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"Spre deosebire de `match`, `if let` nu trebuie să acopere toate ramurile. \"\n\"Acest lucru îl poate face mai concis decât `match`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"O utilizare obișnuită este manipularea valorilor `Some` atunci când se \"\n\"lucrează cu `Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"Spre deosebire de `match`, `if let` nu acceptă clauze de protecție pentru \"\n\"potrivirea de tipare.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"`if-let`s se poate acumula, după cum se arată. Construcția `let-else` \"\n\"permite aplatizarea acestui cod imbricate. Rescrieți versiunea ciudată \"\n\"pentru elevi, astfel încât aceștia să poată vedea transformarea.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"The rewritten version is:\"\nmsgstr \"Versiunea rescrisă este:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"bucle `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Precizați că bucla `while let` va continua atâta timp cât valoarea se \"\n\"potrivește cu modelul.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Ați putea rescrie bucla `while let` ca o buclă infinită cu o instrucțiune if \"\n\"care se întrerupe atunci când nu mai există nicio valoare de desfăcut pentru \"\n\"`iter.next()`. `while let` oferă zahăr sintactic pentru scenariul de mai sus.\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"Să scriem un evaluator recursiv pentru expresii aritmetice simplu.\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"Tipul `Box` de aici este un pointer inteligent și va fi tratat în detaliu \"\n\"mai târziu în curs. O expresie poate fi \\\"încadrată\\\" cu `Box::new`, așa cum \"\n\"se vede în teste. Pentru a evalua o expresie încadrată, utilizați operatorul \"\n\"de diferențiere pentru a o \\\"despacheta\\\": `eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"Unele expresii nu pot fi evaluate și vor returna o eroare. Tipul `Res` \"\n\"reprezintă fie o valoare de succes, fie o eroare cu un mesaj. Acest tip este \"\n\"foarte asemănător cu `Result` din biblioteca standard, pe care îl vom vedea \"\n\"mai târziu.\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"Copiați și lipiți codul în locul de joacă Rust și începeți să implementați \"\n\"`eval`. Produsul final ar trebui să treacă testele. Poate fi util să \"\n\"folosiți `todo!()` și să obțineți testele să treacă unul câte unul.\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"Dacă terminați mai devreme, încercați să scrieți un test care are ca \"\n\"rezultat o depășire de număr întreg. Cum ați putea gestiona acest lucru cu \"\n\"`Res::Err` în loc de o panică?\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// O operație care trebuie efectuată asupra a două subexpresii.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// O expresie, în formă de arbore.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// O operație asupra a două subexpresii.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// O valoare literală\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"împărțirea la zero\\\"\"\n\n#: src/pattern-matching/solution.md\n#, fuzzy\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"[Metode](./methods-and-traits/methods.md) (10 minute)\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\nmsgstr \"[Trăsături](./methods-and-traits/traits.md) (10 minute)\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"[Derivare](./methods-and-traits/deriving.md) (5 minute)\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Logger generic](./methods-and-traits/exercise.md) (20 minute)\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust vă permite să asociați funcții cu noile dvs. tipuri. Acest lucru se \"\n\"face cu ajutorul unui bloc `impl`:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// Fără receptor, o metodă statică\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Acces exclusiv împrumutat de citire-scriere pentru sine\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Acces împrumutat partajat și numai pentru citire la sine\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Înregistrat {} ture pentru {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Tur {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"// Proprietatea exclusivă a sinelui\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Cursa {} s-a încheiat, timp total pe tur: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Marele Premiu de la Monaco\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Simbolul `&self` de mai sus indică faptul că metoda împrumută obiectul în \"\n\"mod imuabil. Există și alți receptori posibili pentru o metodă:\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: împrumută obiectul de la apelant folosind o referință partajată și \"\n\"imuabilă. Obiectul poate fi utilizat din nou ulterior.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: împrumută obiectul de la apelant folosind o referință unică și \"\n\"mutabilă. Obiectul poate fi utilizat din nou ulterior.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: preia proprietatea asupra obiectului și îl îndepărtează de la \"\n\"apelant. Metoda devine proprietarul obiectului. Obiectul va fi abandonat \"\n\"(dezalocat) la întoarcerea metodei, cu excepția cazului în care proprietatea \"\n\"sa este transmisă în mod explicit. Proprietatea completă nu înseamnă automat \"\n\"mutabilitate.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: la fel ca mai sus, dar metoda poate muta obiectul.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Fără receptor: aceasta devine o metodă statică pe structura. Se utilizează \"\n\"de obicei pentru a crea constructori care sunt numiți `new` prin convenție.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\"Poate fi utilă introducerea metodelor prin compararea lor cu funcțiile.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Metodele sunt apelate pe o instanță a unui tip (cum ar fi un struct sau \"\n\"enum), primul parametru reprezintă instanța ca `self`.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Dezvoltatorii pot alege să folosească metode pentru a profita de sintaxa \"\n\"receptorului de metode și pentru a le menține mai bine organizate. Prin \"\n\"utilizarea metodelor putem păstra tot codul de implementare într-un singur \"\n\"loc previzibil.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"Indicați utilizarea cuvântului cheie `self`, un receptor de metodă.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Arătați că este un termen prescurtat pentru \\\"sine\\\": Self` și, eventual, \"\n\"arătați cum ar putea fi folosit și numele structurii.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Explicați că `Self` este un alias de tip pentru tipul în care se află blocul \"\n\"`impl` și poate fi utilizat în altă parte a blocului.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Observați cum `self` este utilizat ca și alte structuri și cum notația cu \"\n\"puncte poate fi utilizată pentru a se referi la câmpuri individuale.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Acesta ar putea fi un moment bun pentru a demonstra cum diferă `&self` de \"\n\"`self` prin modificarea codului și încercarea de a rula say_hello de două \"\n\"ori.\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"În afară de variantele lui `self`, există și [tipuri speciale de înveliș]\"\n\"(https://doc.rust-lang.org/reference/special-types-and-traits.html) care pot \"\n\"fi tipuri de receptor, cum ar fi `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust vă permite să abstractizați tipurile cu ajutorul trăsăturilor. Acestea \"\n\"sunt similare cu interfețele:\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"// Reexportați tipurile din acest modul.\\n\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// Tipărește un mesaj de salut pe ieșirea standard.\\n\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"O trăsătură definește un număr de metode pe care tipurile trebuie să le aibă \"\n\"pentru a implementa trăsătura respectivă.\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"În continuare, în segmentul \\\"Generics\\\", vom vedea cum să construim o \"\n\"funcționalitate care este generică pentru toate tipurile care implementează \"\n\"o trăsătură.\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Oh, ești un drăguț! Cum te cheamă? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Woof, numele meu este {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"Trăsăturile sunt implementate într-un `impl <trait> pentru <type> { .. }`.\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"Spre deosebire de interfețele Go, simpla potrivire a metodelor nu este \"\n\"suficientă: un tip `Cat` cu o metodă `talk()` nu ar satisface automat `Pet` \"\n\"decât dacă se află într-un bloc `impl Pet`.\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Trăsăturile pot specifica metode preimplementate (implicite) și metode pe \"\n\"care utilizatorii trebuie să le implementeze ei înșiși. Metodele cu \"\n\"implementări implicite se pot baza pe metodele obligatorii.\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"O trăsătură poate impune ca tipurile care o implementează să implementeze și \"\n\"alte trăsături, numite _supertraits_. Aici, orice tip care implementează \"\n\"`Pet` trebuie să implementeze `Animal`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} are {} ani\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"Acest lucru se numește uneori \\\"moștenire de trăsături\\\", dar studenții nu \"\n\"trebuie să se aștepte ca aceasta să se comporte ca moștenirea OO. Aceasta \"\n\"specifică doar o cerință suplimentară pentru implementările unei trăsături.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"Tipurile asociate sunt tipuri de tip \\\"placeholder\\\" care sunt furnizate de \"\n\"implementarea trăsăturii.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"Tipurile asociate sunt uneori denumite și \\\"tipuri de ieșire\\\". Observația \"\n\"cheie este că acest tip este ales de către implementator, nu de către \"\n\"apelant.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"Multe trăsături de bibliotecă standard au tipuri asociate, inclusiv \"\n\"operatorii aritmetici și `Iterator`.\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Trăsăturile acceptate pot fi implementate automat pentru tipurile dvs. \"\n\"personalizate, după cum urmează:\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// Caracteristica implicită adaugă constructorul `default`.\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// Trăsătura Clone adaugă metoda `clone`.\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// Trăsătura Debug adaugă suport pentru imprimarea cu `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"Șir de caractere (string) versus str\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"Derivarea este implementată cu macro-uri, iar multe crates oferă macro-uri \"\n\"derive utile pentru a adăuga funcționalități utile. De exemplu, `serde` \"\n\"poate deriva suportul de serializare pentru o structură folosind \"\n\"`#[derive(Serialize)]`.\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Exercițiu: Logger generic\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"Să proiectăm un utilitar de logare simplu, folosind o trăsătură `Logger` cu \"\n\"o metodă `log`. Codul care ar putea înregistra progresul său poate lua un \"\n\"`&impl Logger`. În timpul testelor, acesta ar putea plasa mesaje în fișierul \"\n\"de jurnal de test, în timp ce în cazul unei compilări de producție ar \"\n\"trimite mesaje către un server de jurnal.\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"Cu toate acestea, `StderrLogger` dat mai jos înregistrează toate mesajele, \"\n\"indiferent de verbozitate. Sarcina dvs. este de a scrie un tip \"\n\"`VerbosityFilter` care să ignore mesajele care depășesc o verbozitate maximă.\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"Acesta este un model comun: o structură care înfășoară o implementare a unei \"\n\"trăsături și care implementează aceeași trăsătură, adăugând comportament în \"\n\"acest proces. Ce alte tipuri de învelișuri ar putea fi utile într-un \"\n\"utilitar de logare?\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Înregistrați un mesaj la nivelul de verbozitate dat.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosity={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"FYI\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Uhoh\\\"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: Definiți și implementați `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\"/// Înregistrați numai mesajele de jurnal până la nivelul de verbozitate \"\n\"dat.\\n\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"[Generics](./generics.md) (40 minutes)\"\nmsgstr \"[Generice](../generics.md) (45 minute)\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[Tipuri de bibliotecă standard](../std-types.md) (1 oră și 10 minute)\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\"[Trăsături ale bibliotecii standard](../std-traits.md) (1 oră și 40 de \"\n\"minute)\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"Including 10 minute breaks, this session should take about 4 hours\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 55 de minute\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"[Funcții generice](./generics/generic-functions.md) (5 minute)\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"[Tipuri de date generice](./generics/generic-data.md) (15 minute)\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"[Limite ale trăsăturilor](./generics/trait-bounds.md) (10 minute)\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"[impl Trait](./generics/impl-trait.md) (5 minute)\"\n\n#: src/generics.md\n#, fuzzy\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"[Exercițiu: Generic min](./generics/exercise.md) (10 minute)\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust suportă generice, ceea ce vă permite să abstractizați algoritmi sau \"\n\"structuri de date (cum ar fi sortarea sau un arbore binar) peste tipurile \"\n\"utilizate sau stocate.\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// Alege `even` sau `odd` în funcție de valoarea lui `n`.\\n\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"a ales un număr: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"a ales un tuple: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"câine\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\"Rust deduce un tip pentru T pe baza tipurilor argumentelor și a valorii de \"\n\"returnare.\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"Acest lucru este similar cu șabloanele C++, dar Rust compilează parțial \"\n\"funcția generică imediat, astfel încât funcția trebuie să fie valabilă \"\n\"pentru toate tipurile care corespund constrângerilor. De exemplu, încercați \"\n\"să modificați `pick` pentru a returna `even + odd` dacă `n == 0`. Chiar dacă \"\n\"se utilizează doar instanțierea `pick` cu numere întregi, Rust o consideră \"\n\"în continuare invalidă. C++ v-ar permite să faceți acest lucru.\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Aceasta este o abstractizare cu costuri zero: obțineți exact același \"\n\"rezultat ca și cum ați fi codat manual structurile de date fără \"\n\"abstractizare.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\"Puteți utiliza elementele generice pentru a face abstracție de tipul de câmp \"\n\"concret:\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} și {float:?}\\\"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"întrebare: De ce `T` este specificat de două ori în `impl<T> Point<T> {}`? \"\n\"Nu este redundant?\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Acest lucru se datorează faptului că este o secțiune de implementare \"\n\"generică pentru un tip generic. Acestea sunt generice în mod independent.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Aceasta înseamnă că aceste metode sunt definite pentru orice `T`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Este posibil să se scrie `impl Point<u32> { .. }`. \"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` este în continuare generic și puteți utiliza `Point<f64>`, dar \"\n\"metodele din acest bloc vor fi disponibile numai pentru `Point<u32>`.\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"Încercați să declarați o nouă variabilă `let p = Point { x: 5, y: 10.0 };`. \"\n\"Actualizați codul pentru a permite puncte care au elemente de tipuri \"\n\"diferite, utilizând două variabile de tip, de exemplu, `T` și `U`.\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\"Trăsăturile pot fi, de asemenea, generice, la fel ca tipurile și funcțiile. \"\n\"Parametrii unei trăsături primesc tipuri concrete atunci când aceasta este \"\n\"utilizată.\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"Convertit din număr întreg: {from}\\\"\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"Convertit din bool: {from}\\\"\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\\\"{from_int:?}, {from_bool:?}\\\"\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\"Trăsătura `From` va fi abordată mai târziu în curs, dar [definiția sa din \"\n\"documentația `std`](https://doc.rust-lang.org/std/convert/trait.From.html) \"\n\"este simplă.\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::From(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"Nu este necesar ca implementările trăsăturii să acopere toți parametrii de \"\n\"tip posibili. Aici, `Foo::From(\\\"hello\\\")` nu ar fi compilat deoarece nu \"\n\"există o implementare `From<&str>` pentru `Foo`.\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"Trăsăturile generice iau tipuri ca \\\"intrare\\\", în timp ce tipurile asociate \"\n\"sunt un fel de tipuri de \\\"ieșire\\\". O trăsătură poate avea mai multe \"\n\"implementări pentru diferite tipuri de intrare.\"\n\n#: src/generics/generic-traits.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"De fapt, Rust cere ca cel mult o implementare a unei trăsături să se \"\n\"potrivească pentru orice tip T. Spre deosebire de alte limbaje, Rust nu are \"\n\"o euristică pentru alegerea celei mai \\\"specifice\\\" potriviri. Se lucrează \"\n\"la adăugarea acestui suport, numit [specializare](https://rust-lang.github.\"\n\"io/rfcs/1210-impl-specialization.html).\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Atunci când lucrați cu metode generice, deseori doriți să solicitați ca \"\n\"tipurile să implementeze o anumită trăsătură, astfel încât să puteți apela \"\n\"metodele acestei trăsături.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"Puteți face acest lucru cu `T: Trait` sau `impl Trait`:\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\"```rust,editable\\n\"\n\"fn duplicate<T: Clone>(a: T) -> (T, T) {\\n\"\n\"    (a.clone(), a.clone())\\n\"\n\"}\\n\"\n\"\\n\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\"fn add_42_millions(x: impl Into<i32>) -> i32 {\\n\"\n\"    x.into() + 42_000_000\\n\"\n\"}\\n\"\n\"\\n\"\n\"// struct NotClonable;\\n\"\n\"\\n\"\n\"fn main() {\\n\"\n\"    let foo = String::from(\\\"foo\\\");\\n\"\n\"    let pair = duplicate(foo);\\n\"\n\"    println!(\\\"{pair:?}\\\");\\n\"\n\"\\n\"\n\"    let many = add_42_millions(42_i8);\\n\"\n\"    println!(\\\"{many}\\\");\\n\"\n\"    let many_more = add_42_millions(10_000_000);\\n\"\n\"    println!(\\\"{many_more}\\\");\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"Încercați să creați un `NonClonable` și să îl treceți la `duplicate`.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\"Atunci când sunt necesare mai multe trăsături, utilizați `+` pentru a le uni.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Arătați o clauză `where`, elevii o vor întâlni atunci când vor citi codul.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Aranjează semnătura funcției dacă are mulți parametri.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Are caracteristici suplimentare care îl fac mai puternic.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Dacă cineva întreabă, caracteristica suplimentară este că tipul din stânga \"\n\"lui \\\":\\\" poate fi arbitrar, cum ar fi `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"Rețineți că Rust nu suportă (încă) specializarea. De exemplu, având în \"\n\"vedere `duplicate` original, nu este valid să se adauge un `duplicate(a: \"\n\"u32)` specializat.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"La fel ca în cazul limitelor trăsăturilor, o sintaxă `impl Trait` poate fi \"\n\"utilizată în argumentele funcțiilor și în valorile returnate:\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Zahăr sintactic pentru:\\n\"\n\"// fn add_42_millions&lt;T: Into<i32>&gt;(x: T) -&gt; i32 {\\n\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\"Proiectul Rust găzduiește multe resurse. Acestea se referă la Rust în \"\n\"general:\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"Semnificația lui `impl Trait` este puțin diferită în diferitele poziții.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Pentru un parametru, `impl Trait` este ca un parametru generic anonim cu o \"\n\"trăsătură legată.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Pentru un tip de returnare, înseamnă că tipul de returnare este un tip \"\n\"concret care implementează trăsătura, fără a numi tipul. Acest lucru poate \"\n\"fi util atunci când nu doriți să expuneți tipul concret într-o API publică.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"Inferența este dificilă în poziția de retur. O funcție care returnează `impl \"\n\"Foo` alege tipul concret pe care îl returnează, fără a scrie acest lucru în \"\n\"sursă. O funcție care returnează un tip generic, cum ar fi `collect<B>() -\"\n\"&gt; B`, poate returna orice tip care satisface `B`, iar apelantul poate fi \"\n\"nevoit să aleagă unul, ca în cazul lui `let x: Vec<_> = foo.collect()` sau \"\n\"cu turbofishul, `foo.collect::&lt;Vec<_>&gt;()`.\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"Care este tipul de `debuggable`? Încercați `let debuggable: () = ..` pentru \"\n\"a vedea ce afișează mesajul de eroare.\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"În acest scurt exercițiu, veți implementa o funcție generică `min` care \"\n\"determină minimul a două valori, utilizând o trăsătură `LessThan`.\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: implementați funcția `min` folosită în `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'z'\"\nmsgstr \"\"\n\"```rust,editable\\n\"\n\"fn main() {\\n\"\n\"    inspect(&[0, -2, 3]);\\n\"\n\"    inspect(&[0, -2, 3, 4]);\\n\"\n\"}\\n\"\n\"\\n\"\n\"#[rustfmt::skip]\\n\"\n\"fn inspect(slice: &[i32]) {\\n\"\n\"    println!(\\\"Spune-mi despre {slice:?}\\\");\\n\"\n\"    match slice {\\n\"\n\"        &[0, y, z] => println!(\\\"Primul element 0, y = {y}, și z = {z}\\\"),\\n\"\n\"        &[1, ..]   => println!(\\\"Primul element este 1 și restul sunt \"\n\"ignorate\\\"),\\n\"\n\"        _          => println!(\\\"Toate elementele au fost ignorate\\\"),\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"'7'\"\nmsgstr \"'x'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"La revedere\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"bat\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"Armadillo\\\"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) și \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"[Biblioteca standard](./std-types/std.md) (3 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"[Documentație](./std-types/docs.md) (5 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"[Opțiune](./std-types/option.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"[Rezultat](./std-types/result.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"[String](./std-types/string.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"[Vec](./std-types/vec.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"[HashMap](./std-types/hashmap.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"[Exercițiu: Contorizare](./std-types/exercise.md) (10 minute)\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 20 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 1 oră și 10 minute\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Pentru fiecare dintre diapozitivele din această secțiune, petreceți ceva \"\n\"timp examinând paginile de documentație, subliniind unele dintre cele mai \"\n\"comune metode.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust vine cu o bibliotecă standard care ajută la stabilirea unui set de \"\n\"tipuri comune utilizate de bibliotecile și programele Rust. În acest fel, \"\n\"două biblioteci pot lucra împreună fără probleme, deoarece ambele utilizează \"\n\"același tip `String`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"De fapt, Rust conține mai multe straturi ale bibliotecii standard: `core`, \"\n\"`alloc` și `std`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` include cele mai de bază tipuri și funcții care nu depind de `libc`, \"\n\"de alocator sau chiar de prezența unui sistem de operare.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` include tipuri care necesită un alocator global de heap, cum ar fi \"\n\"`Vec`, `Box` și `Arc`.\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Aplicațiile Rust încorporate folosesc adesea doar `core` și uneori `alloc`.\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust este însoțit de o documentație extinsă. De exemplu:\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Dacă doriți să ieșiți mai devreme dintr-o buclă, utilizați [`break`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions),\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"Tipuri primitive precum [`u8`](https://doc.rust-lang.org/stable/std/\"\n\"primitive.u8.html).\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) și [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"De fapt, vă puteți documenta propriul cod:\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Determină dacă primul argument este divizibil cu al doilea argument.\\n\"\n\"///\\n\"\n\"/// Dacă al doilea argument este zero, rezultatul este fals.\\n\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Conținutul este tratat ca Markdown. Toate crates cu bibliotecă Rust \"\n\"publicate sunt documentate automat la [`docs.rs`](https://docs.rs) folosind \"\n\"instrumentul [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.\"\n\"html). Documentarea tuturor elementelelor publice dintr-un API, folosind \"\n\"acest model, este idiomatică. Fragmentele de cod pot documenta utilizarea și \"\n\"vor fi folosite ca teste unitare.\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Pentru a documenta un element din interiorul elementului (cum ar fi în \"\n\"interiorul unui modul), utilizați `//!` sau `/*! ... */`, denumite \"\n\"\\\"comentarii interne ale documentului\\\":\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Acest modul conține funcționalități referitoare la divizibilitatea \"\n\"numerelor întregi.\\n\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Arătați studenților documentația generată pentru crăiasa `rand` la [`docs.rs/\"\n\"rand`](https://docs.rs/rand).\"\n\n#: src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Opțiune\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Am văzut deja cum se utilizează `Opțiunea<T>`. Acesta stochează fie o \"\n\"valoare de tip `T`, fie nimic. De exemplu, [`String::find`](https://doc.rust-\"\n\"lang.org/stable/std/string/struct.String.html#method.find) returnează o \"\n\"`Opțiune<usize>`.\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find returned {position:?}\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"'Z'\"\nmsgstr \"\"\n\"```rust,editable\\n\"\n\"fn main() {\\n\"\n\"    inspect(&[0, -2, 3]);\\n\"\n\"    inspect(&[0, -2, 3, 4]);\\n\"\n\"}\\n\"\n\"\\n\"\n\"#[rustfmt::skip]\\n\"\n\"fn inspect(slice: &[i32]) {\\n\"\n\"    println!(\\\"Spune-mi despre {slice:?}\\\");\\n\"\n\"    match slice {\\n\"\n\"        &[0, y, z] => println!(\\\"Primul element 0, y = {y}, și z = {z}\\\"),\\n\"\n\"        &[1, ..]   => println!(\\\"Primul element este 1 și restul sunt \"\n\"ignorate\\\"),\\n\"\n\"        _          => println!(\\\"Toate elementele au fost ignorate\\\"),\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Caracterul nu a fost găsit\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` și `Result` sunt utilizate pe scară largă, nu doar în biblioteca \"\n\"standard.\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` va returna valoarea într-un `Option` sau va intra în panică. \"\n\"`expect` este similar, dar primește un mesaj de eroare.\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"Puteți intra în panică la None, dar nu puteți uita \\\"din greșeală\\\" să \"\n\"verificați None.\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"Este obișnuit să se folosească `unwrap`/`expect` peste tot atunci când se \"\n\"lucrează împreună, dar codul de producție tratează de obicei `None` într-un \"\n\"mod mai plăcut.\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"Optimizarea nișei înseamnă că `Opțiunea<T>` are adesea aceeași dimensiune în \"\n\"memorie ca `T`.\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"Rezultat\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` este similar cu `Option`, dar indică succesul sau eșecul unei \"\n\"operații, fiecare cu un tip diferit. Acesta este similar cu `Res` definit în \"\n\"exercițiul de exprimare, dar generic: `Result<T, E>` unde `T` este folosit \"\n\"în varianta `Ok` și `E` apare în varianta `Err`.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Dragă jurnalule: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Nu s-a putut citi conținutul fișierului\\\"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"Jurnalul nu a putut fi deschis: {err}\\\"\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Ca și în cazul lui `Option`, valoarea de succes se află în interiorul lui \"\n\"`Result`, obligând dezvoltatorul să o extragă în mod explicit. Acest lucru \"\n\"încurajează verificarea erorilor. În cazul în care o eroare nu ar trebui să \"\n\"apară niciodată, se poate apela la `unwrap()` sau `expect()`, iar acesta \"\n\"este și el un semnal al intenției dezvoltatorului.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"documentația `Result` este o lectură recomandată. Nu în timpul cursului, dar \"\n\"merită să fie menționată.  Conține o mulțime de metode și funcții \"\n\"convenabile care ajută la programarea în stil funcțional.\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` este tipul standard pentru a implementa gestionarea erorilor, după \"\n\"cum vom vedea în ziua 3.\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"Sir\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) este \"\n\"bufferul standard de șiruri UTF-8, cu alocare în heap, care poate crește:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, număr de caractere = {}\\\"\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implementează [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), ceea ce înseamnă că puteți \"\n\"apela toate metodele `str` pe un `String`.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` returnează un nou șir de caractere gol, utilizați `String::\"\n\"with_capacity` atunci când știți câte date doriți să introduceți în șir.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` returnează dimensiunea șirului `String` în octeți (care poate \"\n\"fi diferită de lungimea sa în caractere).\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` returnează un iterator peste caracterele actuale. Rețineți \"\n\"că un `char` poate fi diferit de ceea ce un om va considera un \\\"caracter\\\" \"\n\"din cauza [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"Atunci când oamenii se referă la șiruri de caractere, ei pot vorbi fie \"\n\"despre `&str`, fie despre `String`.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Atunci când un tip implementează `Deref<Target = T>`, compilatorul vă va \"\n\"permite să apelați în mod transparent metodele din `T`.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"Nu am discutat încă despre trăsătura `Deref`, așa că, în acest moment, acest \"\n\"lucru explică în mare parte structura barei laterale din documentație.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` implementează `Deref<Target = str>`, ceea ce îi oferă în mod \"\n\"transparent acces la metodele lui `str`.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"Scrieți și comparați `let s3 = s1.deref();` și `let s3 = &*s1;`.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` este implementat ca un înveliș în jurul unui vector de octeți, \"\n\"multe dintre operațiile pe care le vedeți acceptate pentru vectori sunt \"\n\"acceptate și pentru `String`, dar cu unele garanții suplimentare.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"Comparați diferitele moduri de a indexa un `String`:\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"La un caracter prin utilizarea `s3.chars().nth(i).unwrap()` unde `i` este în \"\n\"interiorul limitelor, în afara limitelor.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"La o subșiră folosind `s3[0..4]`, unde acea felie se află sau nu la limitele \"\n\"caracterelor.\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Multe tipuri pot fi convertite într-un șir de caractere cu ajutorul metodei \"\n\"[`to_string`](https://doc.rust-lang.org/std/string/trait.ToString.\"\n\"html#tymethod.to_string). Această trăsătură este implementată automat pentru \"\n\"toate tipurile care implementează `Display`, astfel încât orice poate fi \"\n\"formatat poate fi, de asemenea, convertit într-un șir de caractere.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) este un buffer \"\n\"standard redimensionabil alocat pe heap:\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Macro canonic pentru a inițializa un vector cu elemente.\\n\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Reține doar elementele pare.\\n\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Eliminați duplicatele consecutive.\\n\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implementează [`Deref<Target = [T]>`]](https://doc.rust-lang.org/std/\"\n\"vec/struct.Vec.html#deref-methods-%5BT%5D), ceea ce înseamnă că puteți apela \"\n\"metode de feliere pe un `Vec`.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` este un tip de colecție, alături de `String` și `HashMap`. Datele pe \"\n\"care le conține sunt stocate în heap. Acest lucru înseamnă că nu este \"\n\"necesar să se cunoască cantitatea de date în momentul compilării. Aceasta \"\n\"poate crește sau se poate micșora în timpul execuției.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"Observați cum `Vec<T>` este și el un tip generic, dar nu trebuie să \"\n\"specificați `T` în mod explicit. Ca întotdeauna în cazul inferenței de tip \"\n\"Rust, `T` a fost stabilit în timpul primului apel `push`.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` este o macro canonică care poate fi utilizată în locul lui `Vec::\"\n\"new()` și permite adăugarea de elemente inițiale în vector.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Pentru a indexa vectorul se folosește `[` ` `]` `, dar se va crea panică \"\n\"dacă este în afara limitelor. Alternativ, folosind `get` se va returna un \"\n\"`Option`. Funcția `pop` va elimina ultimul element.\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"Feliile sunt acoperite în ziua 3. Deocamdată, studenții trebuie doar să știe \"\n\"că o valoare de tip `Vec` oferă acces la toate metodele de feliere \"\n\"documentate.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Hartă hash standard cu protecție împotriva atacurilor HashDoS:\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Aventurile lui Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Basmele lui Grimms\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Mândrie și Prejudecată\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"Știm despre {} cărți, dar nu și despre Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Aventura lui Alice în Țara Minunilor\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} pagini\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} este necunoscut.\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Utilizați metoda .entry() pentru a introduce o valoare dacă nu se găsește \"\n\"nimic.\\n\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap` nu este definit în preludiu și trebuie să fie adus în domeniul de \"\n\"aplicare.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Încercați următoarele linii de cod. Prima linie va verifica dacă o carte se \"\n\"află în hashmap și, în caz contrar, va returna o valoare alternativă. A doua \"\n\"linie va introduce valoarea alternativă în hashmap dacă nu se găsește cartea.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter și Piatra Vrăjitoarelor\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"Jocurile foamei\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\"Spre deosebire de `vec!`, din păcate nu există o macro standard `hashmap!`.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Cu toate că, începând cu Rust 1.56, HashMap implementează [`From<[(K, V); \"\n\"N]>`]](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.\"\n\"html#impl-From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), \"\n\"ceea ce ne permite să inițializăm cu ușurință o hartă hash dintr-o matrice \"\n\"literală:\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"Alternativ, HashMap poate fi construit din orice `Iterator` care produce \"\n\"tupluri cheie-valoare.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"Prezentăm `HashMap<String, i32>` și evităm să folosim `&str` ca cheie pentru \"\n\"a face exemplele mai ușoare. Folosirea referințelor în colecții se poate \"\n\"face, desigur, dar poate duce la complicații cu verificatorul de împrumuturi.\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"Încercați să eliminați `to_string()` din exemplul de mai sus și vedeți dacă \"\n\"se compilează în continuare. Unde credeți că am putea întâmpina probleme?\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"Acest tip are mai multe tipuri de returnare \\\"specifice metodei\\\", cum ar fi \"\n\"`std::collections::hash_map::Keys`. Aceste tipuri apar adesea în căutările \"\n\"din documentele Rust. Arătați studenților documentația pentru acest tip și \"\n\"legătura utilă către metoda `keys`.\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"În acest exercițiu veți lua o structură de date foarte simplă și o veți face \"\n\"generică. Aceasta utilizează un [`std::collections::HashMap`](https://doc.\"\n\"rust-lang.org/stable/std/collections/struct.HashMap.html) pentru a ține \"\n\"evidența valorilor care au fost văzute și de câte ori a apărut fiecare \"\n\"dintre ele.\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"Versiunea inițială a lui `Counter` este codificată în mod greșit pentru a \"\n\"funcționa numai pentru valori `u32`. Faceți ca structura și metodele sale să \"\n\"fie generice pentru tipul de valoare urmărit, astfel încât `Counter` să \"\n\"poată urmări orice tip de valoare.\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Dacă terminați mai devreme, încercați să folosiți metoda [`entry`](https://\"\n\"doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry) \"\n\"pentru a reduce la jumătate numărul de căutări hash necesare pentru a \"\n\"implementa metoda `count`.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Contorul numără numărul de ori de câte ori a fost văzută fiecare valoare \"\n\"de tip T.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Creați un nou contor.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Numără o apariție a valorii date.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Întoarce numărul de ori în care valoarea dată a fost văzută.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"a văzut {} valori egale cu {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"măr\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"portocaliu\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\n#, fuzzy\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"am primit {} mere\\\"\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"[Comparații](./std-traits/comparisons.md) (10 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"[Operatori](./std-traits/operators.md) (10 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"[De la și în](./std-traits/from-and-into.md) (10 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"[Casting](./std-traits/casting.md) (5 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"[Citire și scriere](./std-traits/read-and-write.md) (10 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\"[Default, sintaxa de actualizare a structurii](./std-traits/default.md) (5 \"\n\"minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"[Închideri](./std-traits/closures.md) (20 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"[Exercițiu: ROT13](./std-traits/exercise.md) (30 minute)\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 1 oră și 40 de minute\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Ca și în cazul tipurilor de bibliotecă standard, petreceți timp examinând \"\n\"documentația pentru fiecare trăsătură.\"\n\n#: src/std-traits.md\n#, fuzzy\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"Această secțiune este lungă. Luați o pauză la jumătatea drumului.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Aceste trăsături sprijină comparațiile între valori. Toate trăsăturile pot \"\n\"fi derivate pentru tipurile care conțin câmpuri care implementează aceste \"\n\"trăsături.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`ParțialEq` și `Eq`\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` este o relație de echivalență parțială, cu metoda obligatorie \"\n\"`eq` și metoda furnizată `ne`. Operatorii `==` și `!=` vor apela aceste \"\n\"metode.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` este o relație de echivalență completă (reflexivă, simetrică și \"\n\"tranzitivă) și implică `ParțialEq`. Funcțiile care necesită o echivalență \"\n\"completă vor utiliza `Eq` ca o legătură de trăsătură.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`Read` și `Write`\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` definește o ordine parțială, cu o metodă `partial_cmp`. Este \"\n\"utilizat pentru a implementa operatorii `<`, `<=`, `>=` și `>`.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` este o ordine totală, cu `cmp` returnând `Ordering`.\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` poate fi implementat între tipuri diferite, dar `Eq` nu poate fi \"\n\"implementat, deoarece este reflexiv:\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"În practică, aceste trăsături sunt des întâlnite, dar implementarea lor este \"\n\"mai puțin obișnuită.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Supraîncărcarea operatorilor este implementată prin intermediul trăsăturilor \"\n\"în [`std::ops`](https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\n#, fuzzy\nmsgid \"Discussion points:\"\nmsgstr \"Puncte de discuție:\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"Ați putea implementa `Add` pentru `&Point`. În ce situații este utilă?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Răspuns: `Add:add` consumă `self`. Dacă tipul `T` pentru care supraîncărcați \"\n\"operatorul nu este `Copy`, ar trebui să luați în considerare supraîncărcarea \"\n\"operatorului și pentru `&T`. Astfel se evită clonarea inutilă pe locul de \"\n\"apel.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"De ce este `Output` un tip asociat? Ar putea fi transformat într-un \"\n\"parametru de tip al metodei?\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Răspuns scurt: Parametrii de tip funcție sunt controlați de către apelant, \"\n\"dar tipurile asociate (cum ar fi `Output`) sunt controlate de către \"\n\"implementatorul unei trăsături.\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"Ați putea implementa `Add` pentru două tipuri diferite, de exemplu, `impl \"\n\"Add<(i32, i32)> pentru Point` ar adăuga un tuple la un `Point`.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Tipurile implementează [`From`](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) și [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.\"\n\"html) pentru a facilita conversiile de tip:\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) este \"\n\"implementat automat atunci când este implementat [`From`](https://doc.rust-\"\n\"lang.org/std/convert/trait.From.html):\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"De aceea, este obișnuit să se implementeze doar `From`, deoarece tipul tău \"\n\"va primi și implementarea `Into`.\"\n\n#: src/std-traits/from-and-into.md\n#, fuzzy\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Atunci când declarați un tip de intrare de argument de funcție de tipul \"\n\"\\\"orice poate fi convertit într-un `String`\\\", regula este opusă, trebuie să \"\n\"utilizați `Into`. Funcția dvs. va accepta tipurile care implementează `From` \"\n\"și cele care implementează _doar_ `Into`.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust nu dispune de conversii de tip _implicite_, dar suportă transformări \"\n\"explicite cu `as`. În general, acestea urmează semantica C, acolo unde sunt \"\n\"definite.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"as u16: {}\\\"\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\"Biblioteca standard are o implementare a `From<i8> pentru i16`, ceea ce \"\n\"înseamnă că putem converti o variabilă `x` de tip `i8` în `i16` prin \"\n\"apelarea `i16::from(x)`. Sau, mai simplu, cu `x.into()`, deoarece \"\n\"implementarea `From<i8> for i16` creează automat o implementare a `Into<i16> \"\n\"for i8`.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"Șirurile de octeți vă permit să creați direct o valoare `&[u8]`:\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"Rezultatele lui `as` sunt _întotdeauna_ definite în Rust și sunt consecvente \"\n\"pe toate platformele. Este posibil ca acest lucru să nu se potrivească cu \"\n\"intuiția dvs. de a schimba semnul sau de a face casting la un tip mai mic - \"\n\"verificați documentele și comentați pentru claritate.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"Casting-ul cu `as` este un instrument relativ ascuțit, ușor de utilizat în \"\n\"mod incorect și poate fi o sursă de erori subtile pe măsură ce viitoarele \"\n\"lucrări de întreținere modifică tipurile utilizate sau intervalele de valori \"\n\"din tipuri. Castingurile se utilizează cel mai bine numai atunci când \"\n\"intenția este de a indica o trunchiere necondiționată (de exemplu, \"\n\"selectarea celor 32 de biți inferiori ai unui `u64` cu `as u32`, indiferent \"\n\"de ceea ce se afla în biții superiori).\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"În cazul unor distribuții infailibile (de exemplu, de la `u32` la `u64`), se \"\n\"preferă utilizarea lui `From` sau `Into` în locul lui `as` pentru a confirma \"\n\"că distribuția este de fapt infailibilă. Pentru distribuțiile falibile, \"\n\"`TryFrom` și `TryInto` sunt disponibile atunci când doriți să tratați \"\n\"distribuțiile care se potrivesc diferit de cele care nu se potrivesc.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\"Luați în considerare posibilitatea de a lua o pauză după acest diapozitiv.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` este similar cu un cast static din C++. Utilizarea lui `as` în cazurile \"\n\"în care datele ar putea fi pierdute este, în general, descurajată sau cel \"\n\"puțin merită un comentariu explicativ.\"\n\n#: src/std-traits/casting.md\n#, fuzzy\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Acest lucru este obișnuit în cazul în care se transformă numere întregi în \"\n\"`usize` pentru a fi utilizate ca indici.\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Folosind [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) și \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), puteți \"\n\"face abstracție de sursele `u8`:\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b \\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"linii în slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"linii în fișier: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"În mod similar, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"vă permite să faceți abstracție de `u8` sink-uri:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Înregistrat: {:?}\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The `Default` Trait\"\nmsgstr \"Trăsătura `Default` (implicit)\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"caracteristica produce o valoare implicită pentru un tip.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"'Default' (implicit), sintaxa de actualizare a structurilor\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y este stabilit!\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Poate fi implementat direct sau poate fi derivat prin `#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"O implementare derivată va produce o valoare în care toate câmpurile sunt \"\n\"setate la valorile lor implicite.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Aceasta înseamnă că toate tipurile din structura trebuie să implementeze și \"\n\"`Default`.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Tipurile standard Rust implementează adesea `Default` cu valori rezonabile \"\n\"(de exemplu, `0`, `\\\"\\\"`, etc.).\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"Copierea parțială a structurii funcționează bine în mod implicit.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Biblioteca standard Rust este conștientă de faptul că tipurile pot \"\n\"implementa `Default` și oferă metode de conveniență care îl utilizează.\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"sintaxa `..` se numește [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax)\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Închiderile sau expresiile lambda au tipuri care nu pot fi numite. Cu toate \"\n\"acestea, ele implementează trăsăturile speciale [`Fn`](https://doc.rust-lang.\"\n\"org/std/ops/trait.Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/\"\n\"trait.FnMut.html) și [`FnOnce`](https://doc.rust-lang.org/std/ops/trait.\"\n\"FnOnce.html):\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"Apelarea funcțiilor nesigure\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"acumulează: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"Un `Fn` (de exemplu, `add_3`) nu consumă și nici nu modifică valorile \"\n\"capturate, sau poate nu captează nimic. Acesta poate fi apelat de mai multe \"\n\"ori simultan.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"Un `FnMut` (de exemplu, `accumulate`) poate modifica valorile capturate. Se \"\n\"poate apela de mai multe ori, dar nu concomitent.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"Dacă aveți un `FnOnce` (de exemplu, `multiply_sum`), îl puteți apela doar o \"\n\"singură dată. Acesta ar putea consuma valori capturate.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` este un subtip al `FnOnce`. `Fn` este un subtip al lui `FnMut` și \"\n\"`FnOnce`. Adică, puteți utiliza un `FnMut` oriunde se solicită un `FnOnce` \"\n\"și puteți utiliza un `Fn` oriunde se solicită un `FnMut` sau un `FnOnce`.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"Atunci când definiți o funcție care ia o închidere, ar trebui să luați \"\n\"`FnOnce` dacă puteți (adică să o apelați o singură dată), sau `FnMut` în caz \"\n\"contrar, și în final `Fn`. Acest lucru permite cea mai mare flexibilitate \"\n\"pentru apelant.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"În schimb, atunci când aveți o închidere, cea mai flexibilă este `Fn` (poate \"\n\"fi trecută peste tot), apoi `FnMut` și, în cele din urmă, `FnOnce`.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\"Compilatorul deduce, de asemenea, `Copy` (de exemplu, pentru `add_3`) și \"\n\"`Clone` (de exemplu, `multiply_sum`), în funcție de ceea ce captează \"\n\"închiderea.\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\"În mod implicit, închiderile vor captura prin referință dacă pot. Cuvântul \"\n\"cheie `move` le face să captureze prin valoare.\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Bună\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Salutări\\\"\"\n\n#: src/std-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"În acest exemplu, veți implementa cifra clasică [\\\"ROT13\\\"](https://en.\"\n\"wikipedia.org/wiki/ROT13). Copiați acest cod pe terenul de joacă și \"\n\"implementați biții lipsă. Rotiți numai caracterele alfabetice ASCII, pentru \"\n\"a vă asigura că rezultatul este încă valid UTF-8.\"\n\n#: src/std-traits/exercise.md\n#, fuzzy\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Implementați caracteristica `Read` pentru `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\n#, fuzzy\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\n#, fuzzy\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"Pentru a ajunge pe partea cealaltă!\\\"\"\n\n#: src/std-traits/exercise.md\n#, fuzzy\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"Ce se întâmplă dacă înlănțuiți două instanțe `RotDecoder` împreună, fiecare \"\n\"rotindu-se cu 13 caractere?\"\n\n#: src/std-traits/solution.md\n#, fuzzy\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Welcome to Day 3\"\nmsgstr \"Bine ați venit în ziua 3\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Today, we will cover:\"\nmsgstr \"Astăzi, vom aborda:\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Gestionarea memoriei, durata de viață și verificatorul de împrumuturi: cum \"\n\"asigură Rust siguranța memoriei.\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"Indicatori inteligenți: tipuri de pointeri din biblioteca standard.\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Introducere](../welcome-day-3.md) (3 minute)\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"[Managementul memoriei](../memory-management.md) (1 oră și 10 minute)\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"[Pointeri inteligenți](../smart-pointers.md) (45 minute)\"\n\n#: src/welcome-day-3.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 20 de minute\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\"[Revizuirea memoriei programului](./memory-management/review.md) (5 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Abordări ale managementului memoriei](./memory-management/approaches.md) \"\n\"(10 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"[Proprietate](./memory-management/ownership.md) (5 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"[Semantica mutării](./memory-management/move.md) (10 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"[Clone](./memory-management/clone.md) (2 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"[Tipuri de copiere](./memory-management/copy-types.md) (5 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"[Drop](./memory-management/drop.md) (10 minute)\"\n\n#: src/memory-management.md\n#, fuzzy\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Tipul de constructor](./memory-management/exercise.md) (20 \"\n\"minute)\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"Programele alocă memoria în două moduri:\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Stiva: zona continuă de memorie pentru variabilele locale.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Valorile au dimensiuni fixe cunoscute în momentul compilării.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Extrem de rapid: este suficient să mutați un pointer la stivă.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Ușor de gestionat: urmărește apelurile de funcții.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Poziționate bună a memoriei.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Heap: stocarea valorilor în afara apelurilor de funcții.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Valorile au dimensiuni dinamice determinate la momentul execuției.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Puțin mai lent decât stiva: este nevoie de o anumită contabilitate.\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Nu există nicio garanție a poziționării memoriei.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Crearea unui `String` plasează metadatele de dimensiuni fixe pe stivă și \"\n\"datele de dimensiuni dinamice, șirul propriu-zis, pe heap:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Menționați că un `String` este susținut de un `Vec`, deci are o capacitate \"\n\"și o lungime și poate crește dacă este mutabil prin realocare pe heap.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Dacă cursanții vă întreabă despre acest lucru, puteți menționa că memoria de \"\n\"bază este alocată în heap cu ajutorul [System Allocator](https://doc.rust-\"\n\"lang.org/std/alloc/struct.System.html) și că alocatorii personalizați pot fi \"\n\"implementați cu ajutorul [Allocator API](https://doc.rust-lang.org/std/alloc/\"\n\"index.html)\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Putem inspecta dispunerea memoriei cu `unsafe` Rust. Cu toate acestea, ar \"\n\"trebui să precizați că acest lucru este, pe bună dreptate, nesigur!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"lume\\\"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// NU FACEȚI ASTA ACASĂ! Doar în scopuri educaționale.\\n\"\n\"    // Șirul de caractere nu oferă nicio garanție cu privire la aspectul \"\n\"său, astfel încât acest lucru ar putea duce la\\n\"\n\"    // comportament nedefinit.\\n\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"În mod tradițional, limbajele se împart în două mari categorii:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"Control total prin gestionarea manuală a memoriei: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"Programatorul decide când să aloce sau să elibereze memoria heap.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"Programatorul trebuie să determine dacă un pointer mai indică o memorie \"\n\"validă.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"Studiile arată că programatorii fac greșeli.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Siguranță totală prin gestionarea automată a memoriei în timpul execuției: \"\n\"Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"Un sistem de execuție se asigură că memoria nu este eliberată până când nu \"\n\"mai poate fi utilizată ca referință.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\"De obicei, se implementează cu numărarea referințelor, colectarea gunoiului \"\n\"sau RAII.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust oferă un nouă abordare:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Control total _și_ siguranță prin aplicarea în timpul compilării a \"\n\"gestionării corecte a memoriei.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\"Acest lucru se realizează cu ajutorul unui concept explicit de posesie.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"Această diapozitivă este menită să-i ajute pe studenții care vin din alte \"\n\"limbi să pună Rust în context.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C trebuie să gestioneze manual heap cu `malloc` și `free`. Printre erorile \"\n\"frecvente se numără uitarea apelării lui `free`, apelarea de mai multe ori \"\n\"pentru același pointer sau dereferențierea unui pointer după ce memoria la \"\n\"care acesta indică a fost eliberată.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++ dispune de instrumente precum pointeri inteligenți (`unique_ptr`, \"\n\"`shared_ptr`) care profită de garanțiile limbajului privind apelarea \"\n\"destructoriilor pentru a se asigura că memoria este eliberată atunci când o \"\n\"funcție se întoarce. Este încă destul de ușor să se utilizeze în mod greșit \"\n\"aceste instrumente și să se creeze erori similare cu cele din C.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java, Go și Python se bazează pe colectorul de gunoi pentru a identifica \"\n\"memoria care nu mai este accesibilă și pentru a o elimina. Acest lucru \"\n\"garantează faptul că orice pointer poate fi dereferențiat, eliminând astfel \"\n\"utilizarea după liber și alte clase de erori. Însă, GC are un cost în timpul \"\n\"execuției și este dificil de reglat corespunzător.\"\n\n#: src/memory-management/approaches.md\n#, fuzzy\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"Modelul de proprietate și împrumut al Rust poate, în multe cazuri, să obțină \"\n\"performanța lui C, cu alocări și operațiuni gratuite exact acolo unde sunt \"\n\"necesare - cost zero. De asemenea, acesta oferă instrumente similare cu \"\n\"indicatoarele inteligente din C++. Atunci când este necesar, sunt \"\n\"disponibile și alte opțiuni, cum ar fi numărarea referințelor, și există \"\n\"chiar și cratere de la terți disponibile pentru a sprijini colectarea \"\n\"gunoiului în timpul execuției (nu sunt acoperite în acest curs).\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Toate legăturile de variabile au un _scop_ în care sunt valabile și este o \"\n\"eroare să folosești o variabilă în afara domeniului său de aplicare:\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"Spunem că variabila _deține_ valoarea.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"La sfârșitul domeniului de aplicare, variabila este \\\"eliminată\\\", iar \"\n\"datele sunt eliberate.\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"Studenții familiarizați cu implementările de colectare a gunoiului știu că \"\n\"un colector de gunoi începe cu un set de \\\"rădăcini\\\" pentru a găsi toată \"\n\"memoria accesibilă. Principiul \\\"proprietarului unic\\\" din Rust este o idee \"\n\"similară.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"O atribuire va transfera _posesia_ între variabile:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"Atribuirea lui `s1` la `s2` transferă posesiunea.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Când `s1` iese din domeniul de aplicare, nu se întâmplă nimic: nu posedă \"\n\"nimic.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"Atunci când `s2` iese din domeniul de aplicare, datele șirului de caractere \"\n\"sunt eliberate.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"Înainte de mutarea în `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"După mutarea în `s2`:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stiva                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccesibl)\\\"    :     :                           :\\n\"\n\":   +—————+———+   :     :   +——+——+——+——+   :\\n\"\n\":   | ptr       |   o—+—+—+—+—>| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +——+——+——+——+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +—————+———+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +—————+———+   :  |\\n\"\n\":   | ptr       |   o—+—+—'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +—————+———+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Atunci când transmiteți o valoare unei funcții, valoarea este atribuită \"\n\"parametrului funcției. Acest lucru transferă posesia:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#, fuzzy\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Bună ziua {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"Felii\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Menționați că acest lucru este opusul valorilor implicite din C++, care \"\n\"copiază prin valoare, cu excepția cazului în care folosiți `std::move` (și \"\n\"constructorul move este definit!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"Doar posesia este cea care se schimbă. Generarea codului mașină pentru a \"\n\"manipula datele în sine este o chestiune de optimizare, iar astfel de copii \"\n\"sunt optimizate în mod agresiv.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"Valorile simple (cum ar fi numerele întregi) pot fi marcate cu `Copy` (a se \"\n\"vedea slide-urile ulterioare).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"În Rust, clonele sunt explicite (prin utilizarea lui `clone`).\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"In the `say_hello` example:\"\nmsgstr \"În exemplul `say_hello`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"Odată cu primul apel la `say_hello`, `main` nu mai deține `name` și, \"\n\"ulterior, nu îl mai poate utiliza.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"Memoria heap alocată pentru `name` va fi eliberată la sfârșitul funcției \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` poate păstra proprietatea dacă transmite `name` ca referință \"\n\"(`&name`) și dacă `say_hello` acceptă o referință ca parametru.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternativ, `main` poate transmite o clonă a lui `name` la primul apel \"\n\"(`name.clone()`).\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust face mai dificilă decât C++ crearea de copii din greșeală, făcând ca \"\n\"semantica de mutare să fie cea implicită și obligând programatorii să facă \"\n\"clonele explicite.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Copii defensive în C++ modern\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"C++ modern rezolvă acest lucru în mod diferit:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Duplicarea datelor din s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"Datele din heap de la `s1` sunt duplicate, iar `s2` primește propria copie \"\n\"independentă.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Atunci când `s1` și `s2` ies din domeniul de aplicare, fiecare își \"\n\"eliberează propria memorie.\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Before copy-assignment:\"\nmsgstr \"Înainte de atribuirea copiilor:\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"After copy-assignment:\"\nmsgstr \"După atribuirea copiilor:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"În C++ a fost făcută o alegere ușor diferită față de Rust. Deoarece `=` \"\n\"copiază date, datele șirului de caractere trebuie clonate. În caz contrar, \"\n\"am obține o dublă eliberare atunci când oricare dintre șiruri iese din \"\n\"domeniu.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ are, de asemenea, [`std::move`](https://en.cppreference.com/w/cpp/\"\n\"utility/move), care este utilizat pentru a indica când o valoare poate fi \"\n\"mutată. Dacă exemplul ar fi fost `s2 = std::move(s1)`, nu ar fi avut loc \"\n\"nicio alocare de heap. După mutare, `s1` ar fi într-o stare validă, dar \"\n\"nespecificată. Spre deosebire de Rust, programatorului i se permite să \"\n\"continue să folosească `s1`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"Spre deosebire de Rust, `=` în C++ poate rula cod arbitrar în funcție de \"\n\"tipul care este copiat sau mutat.\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clonare\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"Uneori, doriți să faceți o copie a unei valori. Caracteristica `Clone` \"\n\"realizează acest lucru.\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"Ideea lui `Clone` este de a face mai ușor de observat unde au loc alocări de \"\n\"heap. Căutați `.clone()` și alte câteva ca `Vec::new` sau `Box::new`.\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"Este obișnuit să \\\"clonezi\\\" problemele cu verificatorul de împrumuturi și \"\n\"să revii mai târziu pentru a încerca să optimizezi acele clone.\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` efectuează în general o copie profundă a valorii, ceea ce înseamnă \"\n\"că, dacă, de exemplu, clonezi un array, toate elementele array-ului sunt \"\n\"clonate și ele.\"\n\n#: src/memory-management/clone.md\n#, fuzzy\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"Comportamentul pentru `clone` este definit de utilizator, astfel încât \"\n\"acesta poate efectua o logică de clonare personalizată, dacă este necesar.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"În timp ce semantica de mutare este cea implicită, anumite tipuri sunt \"\n\"copiate în mod implicit:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Aceste tipuri implementează trăsătura `Copy`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Puteți opta pentru ca propriile tipuri să utilizeze semantica de copiere:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"După atribuire, atât `p1` cât și `p2` dețin propriile date.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"De asemenea, putem folosi `p1.clone()` pentru a copia explicit datele.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Copierea și clonarea nu sunt același lucru:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Copierea se referă la copiile pe biți ale regiunilor de memorie și nu \"\n\"funcționează pe obiecte arbitrare.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Copierea nu permite o logică personalizată (spre deosebire de constructorii \"\n\"de copiere din C++).\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Clonarea este o operațiune mai generală și permite, de asemenea, un \"\n\"comportament personalizat prin implementarea trăsăturii `Clone`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\"Copierea nu funcționează pe tipurile care implementează trăsătura `Drop`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"In the above example, try the following:\"\nmsgstr \"În exemplul de mai sus, încercați următoarele:\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Adăugați un câmp `String` la `struct Point`. Nu se va compila deoarece \"\n\"`String` nu este un tip `Copy`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Elimină `Copy` din atributul `derive`. Eroarea de compilare se află acum în \"\n\"`println!` pentru `p1`.\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Arătați că funcționează dacă clonați `p1` în locul lui.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"The `Drop` Trait\"\nmsgstr \"Trăsătura `Drop` (cădere)\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Valorile care implementează [`Drop`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Drop.html) pot specifica codul care trebuie executat atunci când ies din \"\n\"domeniul de aplicare:\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropping {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"d\\\"\"\nmsgstr \"'d'\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Ieșirea din blocul B\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Ieșirea din blocul A\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Ieșire principală\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\"Rețineți că `std::mem::drop` nu este același lucru cu `std::ops::Drop::drop`.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\"Valorile sunt eliminate automat atunci când ies din domeniul de aplicare.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"Atunci când o valoare este eliminată, dacă implementează `std::ops::Drop`, \"\n\"atunci va fi apelată implementarea `Drop::drop` a acesteia.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"Toate câmpurile sale vor fi apoi eliminate, indiferent dacă implementează \"\n\"sau nu `Drop`.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` este doar o funcție goală care acceptă orice valoare. \"\n\"Semnificația este că preia proprietatea asupra valorii, astfel încât la \"\n\"sfârșitul domeniului său de aplicare aceasta este eliminată. Acest lucru o \"\n\"face o modalitate convenabilă de a renunța în mod explicit la valori mai \"\n\"devreme decât ar fi ieșit altfel din domeniul de aplicare.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"Acest lucru poate fi util pentru obiectele care efectuează anumite \"\n\"activități la `drop`: eliberarea de blocaje, închiderea fișierelor etc.\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"De ce `Drop::drop` nu ia `self`?\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Răspuns scurt: Dacă ar fi făcut-o, `std::mem::drop` ar fi fost apelat la \"\n\"sfârșitul blocului, rezultând un alt apel la `Drop::drop` și o depășire a \"\n\"stivei!\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Încercați să înlocuiți `drop(a)` cu `a.drop()`.\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"În acest exemplu, vom implementa un tip de date complex care deține toate \"\n\"datele sale. Vom utiliza \\\"modelul de constructor\\\" pentru a sprijini \"\n\"construirea unei noi valori bucată cu bucată, utilizând funcții de confort.\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"Completați piesele lipsă.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// O reprezentare a unui pachet software.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Returnează o reprezentare a acestui pachet ca dependență, pentru a fi \"\n\"utilizată în\\n\"\n\"    /// construirea altor pachete.\\n\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"1\\\"\"\nmsgstr \"`dbg_size!(bool)`: dimensiune 1 octet, aliniere: 1 octet,\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// Un constructor pentru un pachet. Utilizați `build()` pentru a crea \"\n\"`Pachet` însuși.\\n\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\"Același lucru este valabil și pentru ultimul indice, astfel încât `&a[2..a.\"\n\"len()]` și `&a[2..]` sunt identice.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Setează versiunea pachetului.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Setează autorii pachetului.\\n\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"3\\\"\"\nmsgstr \"Codificați ambele funcții pentru a opera pe matrici 3 × 3.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Adăugați o dependență suplimentară.\\n\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Setați limba. Dacă nu este setată, limba este implicită la None.\\n\"\n\n#: src/memory-management/exercise.md\n#, fuzzy\nmsgid \"\\\"5\\\"\"\nmsgstr \"[Introducere](./welcome-day-1.md) (5 minute)\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\n#, fuzzy\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"[Box\"\nmsgstr \"Cutie (box)\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"](./smart-pointers/box.md) (10 minute)\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"[Rc](./smart-pointers/rc.md) (5 minute)\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\"[Obiecte de trăsături](./methods-and-traits/trait-objects.md) (10 minute)\"\n\n#: src/smart-pointers.md\n#, fuzzy\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"[Exercițiu: Arbore binar](./smart-pointers/exercise.md) (30 minute)\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) este un pointer \"\n\"deținut către datele de pe heap:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"cinci: {}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` implementează `Deref<Target = T>`, ceea ce înseamnă că puteți \"\n\"[apela metode din `T` direct pe un `Box<T>`](https://doc.rust-lang.org/std/\"\n\"ops/trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\"Tipurile de date recursive sau tipurile de date cu dimensiuni dinamice \"\n\"trebuie să utilizeze un `Box`:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// O listă nevidă: primul element și restul listei.\\n\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// O listă goală.\\n\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): explorarea în profunzime a regulilor de \"\n\"gestionare a memoriei din Rust, prin implementarea câtorva tipuri diferite \"\n\"de structuri de liste.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stiva Heap\\n\"\n\".- - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\": : : :\\n\"\n\": listă : : : :\\n\"\n\":   +------+----+----+ : : +------+----+----+ +------+----+----+ :\\n\"\n\":   | Cons | 1 | o--+----+-----+--->| Cons | 2 | o--++--->| Nil | // | // // \"\n\"| :\\n\"\n\":   +------+----+----+ : : +------+----+----+ +------+----+----+ :\\n\"\n\": : : :\\n\"\n\": : : :\\n\"\n\"'- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` este ca și `std::unique_ptr` în C++, cu excepția faptului că este \"\n\"garantat a nu fi nul.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Un `Box` poate fi util atunci când:\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\"au un tip a cărui dimensiune nu poate fi cunoscută la compilare, dar \"\n\"compilatorul Rust dorește să știe o dimensiune exactă.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"doriți să transferați proprietatea asupra unei cantități mari de date. \"\n\"Pentru a evita copierea unor cantități mari de date pe stivă, stocați în \"\n\"schimb datele pe heap într-un `Box`, astfel încât să fie mutat doar \"\n\"pointerul.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"Dacă nu se folosea `Box` și încercam să încorporăm o `List` direct în \"\n\"`List`, compilatorul nu ar fi calculat o dimensiune fixă a structurii în \"\n\"memorie (`List` ar fi avut o dimensiune infinită).\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` rezolvă această problemă, deoarece are aceeași dimensiune ca un \"\n\"pointer obișnuit și indică doar următorul element din `List` în heap.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Eliminați `Box` din definiția Listei și afișați eroarea de compilare. \"\n\"\\\"Recursiv cu indirecție\\\" este un indiciu că poate doriți să folosiți un \"\n\"Box sau o referință de un anumit tip, în loc să stocați direct o valoare.\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"Optimizari de nișă\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\"Deși `Box` seamănă cu `std::unique_ptr` în C++, acesta nu poate fi gol/null. \"\n\"Acest lucru face ca `Box` să fie unul dintre tipurile care permit \"\n\"compilatorului să optimizeze stocarea unor enumerații.\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\"De exemplu, `Opțiune&lt;Box<T>&gt;` are aceeași dimensiune ca și `Box<T>`, \"\n\"deoarece compilatorul utilizează valoarea NULL pentru a discrimina \"\n\"variantele în loc să utilizeze o etichetă explicită ([\\\"Optimizarea \"\n\"pointerului nul\\\"](https://doc.rust-lang.org/std/option/#representation)):\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\\\"Just box\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"Opțiune\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\\\"Dimensiunea just_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\\\"Dimensiunea cutiei opționale_box: {}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\\\"înainte: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) este un pointer \"\n\"partajat cu numărătoare de referințe. Folosiți-l atunci când trebuie să \"\n\"faceți referire la aceleași date din mai multe locuri:\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Consultați [`Arc`](../concurrency/shared_state/arc.md) și [`Mutex`](https://\"\n\"doc.rust-lang.org/std/sync/struct.Mutex.html) dacă vă aflați într-un context \"\n\"cu mai multe fire.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Puteți transforma un pointer partajat într-un pointer [`Weak`](https://doc.\"\n\"rust-lang.org/std/rc/struct.Weak.html) pentru a crea cicluri care vor fi \"\n\"abandonate.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"numărătoarea lui `Rc` asigură că valoarea sa conținută este valabilă atâta \"\n\"timp cât există referințe.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"`Rc` în Rust este ca `std::shared_ptr` în C++.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` este ieftin: creează un pointer la aceeași alocare și crește \"\n\"numărul de referințe. Nu realizează o clonă profundă și poate fi în general \"\n\"ignorată atunci când se caută probleme de performanță în cod.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` clonează de fapt valoarea interioară dacă este necesar (\\\"clone-\"\n\"on-write\\\") și returnează o referință mutabilă.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Utilizați `Rc::strong_count` pentru a verifica numărul de referințe.\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` vă oferă un obiect cu un număr slab de referințe pentru a \"\n\"crea cicluri care vor fi abandonate în mod corespunzător (probabil în \"\n\"combinație cu `RefCell`, pe slide-ul următor).\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\"Obiectele de trăsături permit valori de diferite tipuri, de exemplu într-o \"\n\"colecție:\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miau!\\\"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Bună ziua, cine ești? {}\\\"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Dispunerea memoriei după alocarea `pets`:\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stiva Heap\\n\"\n\".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\": : : :\\n\"\n\": animale de companie : : : +----+----+----+----+----+ :\\n\"\n\":   +-----------+-------+ : : : +-----+-----+ .-&gt;| F | i | d | o | :\\n\"\n\":   | ptr | o---++-+-+-----+--&gt;| o o | o o | o o | | | +----+----+----\"\n\"+----+----+ :\\n\"\n\":   | len | 2 | : : : +-|-|-|-+-|-|-|-+ `---------. :\\n\"\n\":   | capacitate | 2 | : :     | | | | | | date | :\\n\"\n\":   +-----------+-------+ : :     | | | | +-------+--|-------+ :\\n\"\n\": : :     | | | | '--&gt;|| nume | o, 4, 4 | :\\n\"\n\": : :     | | | | | vârstă | 5 | :\\n\"\n\"`- - - - - - - - - - - - - -' :     | | | +-------+----------+ :\\n\"\n\"                                  :     | | | :\\n\"\n\"                                  :     | | | | vtable :\\n\"\n\"                                  :     | | | +----------------------+ :\\n\"\n\"                                  :     | | '----&gt;| \\\"<Dog as Pet>::\"\n\"talk\\\" | :\\n\"\n\"                                  :     | | +----------------------+ :\\n\"\n\"                                  :     | | :\\n\"\n\"                                  :     | | date :\\n\"\n\"                                  :     | | +-------+-------+ :\\n\"\n\"                                  :     | '--&gt;| vieți | 9 | :\\n\"\n\"                                  :     | +-------+-------+ :\\n\"\n\"                                  :     | :\\n\"\n\"                                  :     | vtable :\\n\"\n\"                                  :     | +----------------------+ :\\n\"\n\"                                  : '----&gt;|| \\\"<Cat as Pet>::talk\\\" | :\\n\"\n\"                                  : +----------------------+ :\\n\"\n\"                                  : :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Tipurile care implementează o anumită trăsătură pot avea dimensiuni \"\n\"diferite. Acest lucru face imposibilă existența unor lucruri precum `Vec<dyn \"\n\"Pet>` în exemplul de mai sus.\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` este o modalitate de a indica compilatorului un tip dimensionat \"\n\"dinamic care implementează `Pet`.\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"În acest exemplu, `pets` este alocat pe stivă, iar datele vectorului se află \"\n\"pe heap. Cele două elemente ale vectorului sunt _fat pointeri_:\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"Un pointer gras este un pointer cu lățime dublă. Acesta are două componente: \"\n\"un pointer la obiectul real și un pointer la [virtual method table](https://\"\n\"en.wikipedia.org/wiki/Virtual_method_table) (vtable) pentru implementarea \"\n\"`Pet` a obiectului respectiv.\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"Datele pentru `Dog` numit Fido sunt câmpurile `name` și `age`. Pentru `Cat` \"\n\"există un câmp `lives`.\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"Comparați aceste ieșiri în exemplul de mai sus:\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"Un arbore binar este o structură de date de tip arbore în care fiecare nod \"\n\"are doi copii (stânga și dreapta). Vom crea un arbore în care fiecare nod \"\n\"stochează o valoare. Pentru un anumit nod N, toate nodurile din subarborele \"\n\"stâng al lui N conțin valori mai mici, iar toate nodurile din subarborele \"\n\"drept al lui N vor conține valori mai mari.\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"Implementați următoarele tipuri, astfel încât testele date să treacă.\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\"Credit suplimentar: implementați un iterator pe un arbore binar care \"\n\"returnează valorile în ordine.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// Un nod în arborele binar.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// Un subarbore posibil gol.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// Un container care stochează un set de valori, utilizând un arbore \"\n\"binar.\\n\"\n\"///\\n\"\n\"/// În cazul în care aceeași valoare este adăugată de mai multe ori, aceasta \"\n\"este stocată o singură dată.\\n\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// Implementați `new`, `insert`, `len` și `has`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\n#, fuzzy\nmsgid \"// not a unique item\\n\"\nmsgstr \"// nu este un element unic\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"[Borrowing](./borrowing.md) (55 minutes)\"\nmsgstr \"[Împrumut](../împrumut.md) (1 oră)\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\nmsgstr \"[Referințe](../references.md) (50 minute)\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 3 ore și 5 minute\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"[Împrumutând o valoare](./împrumut/împărtășit.md) (10 minute)\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"[Verificarea împrumutului](./împrumut/împrumutck.md) (10 minute)\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Borrow Errors](./borrowing/examples.md) (3 minutes)\"\nmsgstr \"[Împrumut](../împrumut.md) (1 oră)\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\"[Mutabilitatea interioară](./împrumut/interior-mutability.md) (10 minute)\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Statistici în domeniul sănătății](./împrumut/exercițiu.md) (30 \"\n\"minute)\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"În loc să transferați proprietatea atunci când apelați o funcție, puteți \"\n\"lăsa o funcție să _împrumute_ valoarea:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"Funcția `add` adună două puncte și returnează un nou punct.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Apelantul păstrează dreptul de proprietate asupra intrărilor.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"Acest diapozitiv reprezintă o revizuire a materialului despre referințe din \"\n\"ziua 1, cu o ușoară extindere pentru a include argumentele funcțiilor și \"\n\"valorile de returnare.\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"Notes on stack returns:\"\nmsgstr \"Note privind returnările de stivă:\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"Demonstrați că întoarcerea din `add` este ieftină deoarece compilatorul \"\n\"poate elimina operația de copiere. Modificați codul de mai sus pentru a \"\n\"imprima adresele stivei și rulați-l pe [Playground](https://play.rust-lang.\"\n\"org/) sau examinați ansamblul în [Godbolt](https://rust.godbolt.org/). În \"\n\"nivelul de optimizare \\\"DEBUG\\\", adresele ar trebui să se schimbe, în timp \"\n\"ce ele rămân aceleași atunci când treceți la setarea \\\"RELEASE\\\":\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"Compilatorul Rust poate face optimizarea valorii de returnare (RVO).\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\"În C++, eliziunea de copiere trebuie definită în specificațiile limbajului, \"\n\"deoarece constructorii pot avea efecte secundare. În Rust, acest lucru nu \"\n\"reprezintă deloc o problemă. Dacă RVO nu a avut loc, Rust va efectua \"\n\"întotdeauna o copie `memcpy` simplă și eficientă.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Rust impune constrângeri asupra modalităților în care puteți împrumuta \"\n\"valori:\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Puteți avea una sau mai multe valori `&T` la un moment dat, _sau_\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Puteți avea exact o singură valoare `&mut T`.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"Rețineți că cerința este ca referințele conflictuale să nu _existe_ în \"\n\"același punct. Nu contează unde este dereferențiată referința.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Codul de mai sus nu se compilează pentru că `a` este împrumutat ca mutabil \"\n\"(prin `c`) și ca imuabil (prin `b`) în același timp.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Mutați instrucțiunea `println!` pentru `b` înainte de domeniul de aplicare \"\n\"care introduce `c` pentru a face codul să fie compilat.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"După această modificare, compilatorul își dă seama că `b` este folosit doar \"\n\"înainte de noul împrumut mutabil de la `a` la `c`. Aceasta este o \"\n\"caracteristică a verificatorului de împrumuturi numită \\\"durate de viață non-\"\n\"lexicale\\\".\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"Constrângerea de referință exclusivă este destul de puternică. Rust o \"\n\"folosește pentru a se asigura că nu se produc curse de date. De asemenea, \"\n\"Rust se bazează pe această constrângere pentru a optimiza codul. De exemplu, \"\n\"o valoare din spatele unei referințe partajate poate fi stocată în siguranță \"\n\"într-un registru pe durata de viață a referinței respective.\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"Verificatorul de împrumuturi este conceput pentru a se adapta la multe \"\n\"modele comune, cum ar fi preluarea de referințe exclusive la diferite \"\n\"câmpuri dintr-o structură în același timp. Dar, există unele situații în \"\n\"care nu prea \\\"înțelege\\\", ceea ce duce adesea la \\\"lupta cu verificatorul \"\n\"de împrumuturi\\\"\"\n\n#: src/borrowing/examples.md\n#, fuzzy\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\"Ca exemplu concret al modului în care aceste reguli de împrumut previn \"\n\"erorile de memorie, luați în considerare cazul modificării unei colecții în \"\n\"timp ce există referințe la elementele sale:\"\n\n#: src/borrowing/examples.md\n#, fuzzy\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/borrowing/examples.md\n#, fuzzy\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"În mod similar, luați în considerare cazul invalidării iteratorilor:\"\n\n#: src/borrowing/examples.md\n#, fuzzy\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\"În ambele cazuri, modificarea colecției prin introducerea de noi elemente în \"\n\"colecție poate invalida referințele existente la elementele colecției dacă \"\n\"colecția trebuie realocată.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"În unele situații, este necesar să se modifice datele din spatele unei \"\n\"referințe partajate (numai pentru citire). De exemplu, o structură de date \"\n\"partajată ar putea avea o memorie cache internă și ar putea dori să \"\n\"actualizeze această memorie cache prin metode numai pentru citire.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"Modelul \\\"mutabilității interioare\\\" permite accesul exclusiv (mutabil) în \"\n\"spatele unei referințe partajate. Biblioteca standard oferă mai multe \"\n\"modalități de a face acest lucru, toate asigurând în același timp siguranța, \"\n\"de obicei prin efectuarea unei verificări în timpul execuției.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"Celula/RefCell\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"// Rețineți că `cell` NU este declarat ca fiind mutabil.\\n\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\"// Acest lucru declanșează o eroare în timpul execuției.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"Celula/RefCell\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Celula<T>`\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\"`Cell` înfășoară o valoare și permite obținerea sau stabilirea valorii, \"\n\"chiar și cu o referință partajată la `Cell`. Cu toate acestea, nu permite \"\n\"referințe la valoarea respectivă. Deoarece nu există referințe, regulile de \"\n\"împrumut nu pot fi încălcate.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"Principalul lucru care trebuie reținut din acest diapozitiv este că Rust \"\n\"oferă modalități _sigure_ de a modifica datele din spatele unei referințe \"\n\"partajate. Există o varietate de moduri de a asigura această siguranță, iar \"\n\"`RefCell` și `Cell` sunt două dintre ele.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` aplică regulile obișnuite de împrumut din Rust (fie mai multe \"\n\"referințe partajate, fie o singură referință exclusivă) cu o verificare în \"\n\"timpul execuției. În acest caz, toate împrumuturile sunt foarte scurte și nu \"\n\"se suprapun niciodată, astfel încât verificările reușesc întotdeauna.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\"Blocul suplimentar din exemplul `RefCell` are rolul de a încheia împrumutul \"\n\"creat prin apelul la `borrow_mut` înainte de a imprima celula. Încercarea de \"\n\"a imprima o `RefCell` împrumutată nu face decât să afișeze mesajul \"\n\"`\\\"{borrowed}\\\"`.\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` este un mijloc mai simplu de a asigura siguranța: are o metodă `set` \"\n\"care ia `&self`. Acest lucru nu necesită o verificare în timpul execuției, \"\n\"dar necesită mutarea valorilor, ceea ce poate avea propriile costuri.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Lucrați la implementarea unui sistem de monitorizare a sănătății. În cadrul \"\n\"acestuia, trebuie să țineți evidența statisticilor de sănătate ale \"\n\"utilizatorilor.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Veți începe cu niște funcții stubbed într-un bloc `impl`, precum și cu o \"\n\"definiție a structurii `User`. Scopul dumneavoastră este de a implementa \"\n\"metodele stubbed out pe `struct` `User` definită în blocul `impl`.\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Copiați codul de mai jos în <https://play.rust-lang.org/> și completați \"\n\"metodele lipsă:\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Actualizați statisticile unui utilizator pe baza măsurătorilor de la o \"\n\"vizită la medic\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#, fuzzy\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"Eu sunt {} și vârsta mea este {}\\\"\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\nmsgstr \"\"\n\"[Adnotări privind durata de viață](./slices-and-lifetimes/lifetime-\"\n\"annotations.md) (10 minute)\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minute)\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minute)\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Parsarea Protobuf](./slices-and-lifetimes/exercise.md) (30 \"\n\"minute)\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"O referință are o _durată de viață_, care nu trebuie să \\\"supraviețuiască\\\" \"\n\"valorii la care se referă. Acest lucru este verificat de către verificatorul \"\n\"de împrumut.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"Durata de viață poate fi implicită - aceasta este ceea ce am văzut până \"\n\"acum. Duratele de viață pot fi, de asemenea, explicite: `&'a Point`, \"\n\"`&'document str`. Duratele de viață încep cu `'`, iar `'a` este un nume \"\n\"implicit tipic. Citiți `&'a Point` ca \\\"un `Point` împrumutat care este \"\n\"valabil cel puțin pentru durata de viață `a`\\\".\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"Adnotările privind durata de viață creează constrângeri; compilatorul \"\n\"verifică dacă există o soluție validă.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"Duratele de viață devin mai complicate atunci când se ia în considerare \"\n\"transmiterea valorilor către și returnarea valorilor din funcții.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// Care este durata de viață a lui p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"În acest exemplu, compilatorul nu știe ce durată de viață să deducă pentru \"\n\"`p3`. Privind în interiorul corpului funcției arată că poate doar să \"\n\"presupună în mod sigur că durata de viață a lui `p3` este cea mai scurtă \"\n\"dintre `p1` și `p2`. Dar, la fel ca tipurile, Rust necesită adnotări \"\n\"explicite ale duratei de viață pentru argumentele funcțiilor și valorile de \"\n\"returnare.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"Adăugați `'a` în mod corespunzător la `left_most`:\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"Acest lucru spune: \\\"date fiind p1 și p2, care amândouă trăiesc mai mult de \"\n\"`'a`, valoarea de întoarcere trăiește cel puțin `'a`.\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"În cazuri obișnuite, duratele de viață pot fi eludate, așa cum este descris \"\n\"în slide-ul următor.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Duratele de viață în apelurile de funcții\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"Duratele de viață pentru argumentele funcțiilor și valorile de retur trebuie \"\n\"să fie specificate în întregime, dar Rust permite ca duratele de viață să \"\n\"fie eludate în majoritatea cazurilor cu [câteva reguli simple](https://doc.\"\n\"rust-lang.org/nomicon/lifetime-elision.html).\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\"Fiecare argument care nu are o adnotare de durată de viață primește una.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"În cazul în care există un singur argument pe durata de viață, acesta este \"\n\"atribuit tuturor valorilor de returnare neanunțate.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"Dacă există mai multe durate de viață ale argumentelor, dar prima este \"\n\"pentru `self`, această durată de viață este acordată tuturor valorilor de \"\n\"returnare neanunțate.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"În acest exemplu, `cab_distance` este eliminat în mod trivial.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"Funcția `nearest` oferă un alt exemplu de funcție cu referințe multiple în \"\n\"argumentele sale care necesită o adnotare explicită.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"Încercați să ajustați semnătura pentru a \\\"minți\\\" cu privire la perioadele \"\n\"de viață returnate:\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"Acest lucru nu se va compila, demonstrând că validitatea adnotărilor este \"\n\"verificată de compilator. Rețineți că acest lucru nu este valabil și pentru \"\n\"pointeri brute (unsafe), iar aceasta este o sursă comună de erori în cazul \"\n\"Rust unsafe.\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"Elevii pot întreba când trebuie să folosească duratele de viață. \"\n\"Împrumuturile Rust au _întotdeauna_ durate de viață. De cele mai multe ori, \"\n\"eliziunea și inferența de tip înseamnă că acestea nu trebuie să fie scrise. \"\n\"În cazuri mai complicate, adnotările privind durata de viață pot ajuta la \"\n\"rezolvarea ambiguității. De multe ori, în special în cazul prototipurilor, \"\n\"este mai ușor să lucrați cu datele deținute prin clonarea valorilor acolo \"\n\"unde este necesar.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Duratele de viață în structurile de date\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"În cazul în care un tip de date stochează date împrumutate, acesta trebuie \"\n\"să fie adnotat cu o durată de viață:\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"La revedere {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"Vulpea cea iute și brună sare peste câinele leneș.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"În exemplul de mai sus, adnotarea pentru `Highlight` impune ca datele care \"\n\"stau la baza `&str` conținute să aibă o durată de viață cel puțin egală cu \"\n\"cea a oricărei instanțe de `Highlight` care utilizează aceste date.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Dacă `text` este consumat înainte de sfârșitul duratei de viață a lui `fox` \"\n\"(sau `dog`), verificatorul de împrumuturi aruncă o eroare.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Tipurile cu date împrumutate îi obligă pe utilizatori să păstreze datele \"\n\"originale. Acest lucru poate fi util pentru a crea vizualizări ușoare, dar, \"\n\"în general, le face ceva mai greu de utilizat.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Atunci când este posibil, faceți ca structurile de date să dețină direct \"\n\"datele lor.\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Unele structuri cu referințe multiple în interior pot avea mai multe \"\n\"adnotări de durată de viață. Acest lucru poate fi necesar în cazul în care \"\n\"este necesar să se descrie relațiile de durată de viață între referințe, pe \"\n\"lângă durata de viață a structurii în sine. Acestea sunt cazuri de utilizare \"\n\"foarte avansate.\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"În acest exercițiu, veți construi un parser pentru [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Nu vă faceți griji, \"\n\"este mai simplu decât pare! Aceasta ilustrează un model comun de parsare, \"\n\"trecând felii de date. Datele de bază în sine nu sunt niciodată copiate.\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"Analiza completă a unui mesaj protobuf necesită cunoașterea tipurilor de \"\n\"câmpuri, indexate prin numerele de câmp. Acest lucru este furnizat de obicei \"\n\"într-un fișier `proto`. În acest exercițiu, vom codifica aceste informații \"\n\"în instrucțiuni `match` în funcții care sunt apelate pentru fiecare câmp.\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"We'll use the following proto:\"\nmsgstr \"Puteți utiliza următorul `Cargo.toml`:\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"Un mesaj proto este codificat ca o serie de câmpuri, unul după altul. \"\n\"Fiecare este implementat ca o \\\"etichetă\\\" urmată de valoare. Eticheta \"\n\"conține un număr de câmp (de exemplu, `2` pentru câmpul `id` al unui mesaj \"\n\"`Person`) și un tip de fir care definește modul în care încărcătura utilă ar \"\n\"trebui să fie determinată din fluxul de octeți.\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"Întregii, inclusiv tag-ul, sunt reprezentați cu o codificare de lungime \"\n\"variabilă numită VARINT. Din fericire, `parse_varint` este definit pentru \"\n\"dumneavoastră mai jos. Codul dat definește, de asemenea, callback-uri pentru \"\n\"a gestiona câmpurile `Person` și `PhoneNumber` și pentru a analiza un mesaj \"\n\"într-o serie de apeluri la aceste callback-uri.\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"Ceea ce vă rămâne de făcut este să implementați funcția `parse_field` și \"\n\"trăsătura `ProtoMessage` pentru `Person` și `PhoneNumber`.\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\\\"Invalid varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\\\"Tip de fir invalid\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"Unexpected EOF\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\\\"Lungime invalidă\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\\\"Tip de fir neașteptat)\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\\\"Șir nevalabil (nu UTF-8)\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// Un tip de fir, așa cum se vede pe fir.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// Varint WireType indică faptul că valoarea este un singur VARINT.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64, -- nu este necesar pentru acest exercițiu\\n\"\n\"    /// Tipul de fir Len indică faptul că valoarea este o lungime \"\n\"reprezentată sub forma unui număr de caractere\\n\"\n\"    /// VARINT urmat de exact acest număr de octeți.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\"/// I32 WireType indică faptul că valoarea este exact 4 octeți în\\n\"\n\"    /// little-endian care conțin un număr întreg semnat pe 32 de biți.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// Valoarea unui câmp, tipizată în funcție de tipul de fir.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64), -- nu este necesar pentru acest exercițiu\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// Un câmp, care conține numărul câmpului și valoarea acestuia.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64, -- nu este necesar pentru acest exercițiu\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Analizează un VARINT, returnând valoarea analizată și octeții rămași.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// Acesta este ultimul octet din VARINT, deci convertiți-l în\\n\"\n\"            // un u64 și returnați-l.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// Mai mult de 7 octeți este invalid.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Convertește o etichetă într-un număr de câmp și un tip de fir.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Parsează un câmp, returnând octeții rămași\\n\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"Pe baza tipului de fir, construiți un câmp, consumând atâția octeți câți \"\n\"sunt necesari.\\\"\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"Întoarceți câmpul și toți octeții neconsumați.\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Parsează un mesaj în datele date, apelând `T::add_field` pentru fiecare \"\n\"câmp din\\n\"\n\"/// mesajul.\\n\"\n\"///\\n\"\n\"/// Se consumă întreaga intrare.\\n\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Implementați ProtoMessage pentru Person și PhoneNumber.\\n\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"// Eroare de dezarhivare deoarece `value` are o lungime de 4 bytes.\\n\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"// skip everything else\\n\"\nmsgstr \"// săriți peste orice altceva\\n\"\n\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"b \\\"hello\\\"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Bine ați venit la Ziua 1\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"Astăzi, vom aborda câteva subiecte mai avansate din Rust:\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"Iteratori: o scufundare în profunzime în trăsătura `Iterator`.\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Modules and visibility.\"\nmsgstr \"Module și vizibilitate.\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"Testare\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"Gestionarea erorilor: panici, `Result` și operatorul try `?`.\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\"Unsafe Rust: portița de scăpare atunci când nu te poți exprima în Rust sigur.\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Intorducere](../welcome-day-4.md) (3 minute)\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"[Iteratori](../iteratori.md) (45 minute)\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"[Module](../modules.md) (40 minute)\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"[Testare](../testing.md) (1 oră și 5 minute)\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 20 de minute\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"[Iterator](./iterators/iterator.md) (5 minute)\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"[IntoIterator](./iterators/intoiterator.md) (5 minute)\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"[FromIterator](./iterators/fromiterator.md) (5 minute)\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: înlănțuirea metodelor Iterator](./iterators/exercițiu.md) (30 \"\n\"minute)\"\n\n#: src/iterators.md src/testing.md\n#, fuzzy\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 45 de minute\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"Caracteristica [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html) permite iterația peste valorile dintr-o colecție. Aceasta \"\n\"necesită o metodă `next` și oferă o mulțime de metode. Multe tipuri de \"\n\"bibliotecă standard implementează `Iterator` și o puteți implementa și \"\n\"dumneavoastră:\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"Caracteristica `Iterator` implementează multe operații comune de programare \"\n\"funcțională asupra colecțiilor (de exemplu, `map`, `filter`, `reduce` etc.). \"\n\"Aceasta este trăsătura în care puteți găsi toată documentația referitoare la \"\n\"acestea. În Rust, aceste funcții ar trebui să producă cod la fel de eficient \"\n\"ca și implementările imperative echivalente.\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` este trăsătura care face ca buclele for să funcționeze. Este \"\n\"implementată prin tipuri de colecții, cum ar fi `Vec<T>` și referințe la \"\n\"acestea, cum ar fi `&amp;Vec<T>` și `&amp;[T]`. De asemenea, este \"\n\"implementată și în cazul intervalelor. Acesta este motivul pentru care \"\n\"puteți itera un vector cu `for i in some_vec { ... }`, dar `some_vec.next()` \"\n\"nu există.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Trăsătura `Iterator` vă spune cum să _iterați_ după ce ați creat un \"\n\"iterator. Trăsătura conexă `IntoIterator` vă spune cum să creați iteratorul:\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Sintaxa de aici înseamnă că fiecare implementare a lui `IntoIterator` \"\n\"trebuie să declare două tipuri:\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: tipul peste care iterăm, cum ar fi `i8`,\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: tipul `Iterator` returnat de metoda `into_iter`.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Rețineți că `IntoIter` și `Item` sunt legate: iteratorul trebuie să aibă \"\n\"același tip `Item`, ceea ce înseamnă că returnează `Opțiune`<Item>`\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"Exemplul itera peste toate combinațiile de coordonate x și y.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"Încercați să iterați peste grilă de două ori în `main`. De ce nu reușește \"\n\"acest lucru? Rețineți că `IntoIterator::into_iter` preia proprietatea lui \"\n\"`self`.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"Rezolvați această problemă implementând `IntoIterator` pentru `&Grid` și \"\n\"stocând o referință la `Grid` în `GridIter`.\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"Aceeași problemă poate apărea și în cazul tipurilor din biblioteca standard: \"\n\"`for e in some_vector` va prelua proprietatea lui `some_vector` și va itera \"\n\"peste elementele deținute din acel vector. Folosiți în schimb `for e in \"\n\"&some_vector` pentru a itera peste referințele la elementele din \"\n\"`some_vector`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`]](https://doc.rust-lang.org/std/iter/trait.FromIterator.\"\n\"html) vă permite să construiți o colecție dintr-un [`Iterator`](https://doc.\"\n\"rust-lang.org/std/iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator`\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"Există două moduri de a specifica `B` pentru această metodă:\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"Cu \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, după cum se \"\n\"arată. Prescurtarea `_` folosită aici îi permite lui Rust să deducă tipul \"\n\"elementelor `Vec`.\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"Cu inferență de tip: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rescrieți exemplul pentru a utiliza această formă.\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Există, de asemenea, implementări care vă permit să faceți lucruri \"\n\"interesante, cum ar fi convertirea unui `Iterator&lt;Item = Rezultat<V, \"\n\"E>&gt;` într-un `Resultat&lt;Vec<V>, E&gt;`.\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"Puteți implementa trăsătura [`Iterator`](https://doc.rust-lang.org/std/iter/\"\n\"trait.Iterator.html) pe propriile tipuri:\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Copiați următorul cod în <https://play.rust-lang.org/> și faceți ca testele \"\n\"să treacă. Încercați să evitați să alocați un `Vec` pentru rezultatele \"\n\"intermediare:\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calculează diferențele dintre elementele din `valorile` decalate cu \"\n\"`offset`,\\n\"\n\"/// înfășurându-se de la sfârșitul lui `values` la început.\\n\"\n\"///\\n\"\n\"/// Elementul `n` al rezultatului este `values[(n+offset)%len] - \"\n\"values[n]`.\\n\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"[Module](./module/modules/modules.md) (5 minute)\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"[Ierarhia sistemului de fișiere](./modules/filesystem.md) (5 minute)\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"[Vizibilitate](./modules/visibility.md) (5 minute)\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"[use, super, self](./modules/paths.md) (10 minute)\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Module pentru o bibliotecă GUI](./modules/exercise.md) (15 \"\n\"minute)\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Am văzut cum blocurile `impl` ne permit să atribuim funcții de namespace la \"\n\"un tip.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\"În mod similar, `mod` ne permite să folosim tipuri și funcții de spațiu de \"\n\"nume:\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"În modulul foo\\\"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"În modulul de bar\\\"\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Pachetele oferă funcționalitate și includ un fișier `Cargo.toml` care \"\n\"descrie cum se construiește un pachet de 1+ crates.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Crates reprezintă un arbore de module, în care un crate binar creează un \"\n\"executabil, iar un crate de bibliotecă compilează o bibliotecă.\"\n\n#: src/modules/modules.md\n#, fuzzy\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\"Modulele definesc organizarea, domeniul de aplicare și reprezintă punctul \"\n\"central al acestei secțiuni.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\"Omiterea conținutului modulului îi va spune lui Rust să îl caute într-un alt \"\n\"fișier:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"Acest lucru îi spune lui Rust că conținutul modulului `garden` se găsește la \"\n\"`src/garden.rs`. În mod similar, un modul `garden::vegetables` se găsește la \"\n\"`src/garden/vegetables.rs`.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"The `crate` root is in:\"\nmsgstr \"Rădăcina `crate` este în:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (pentru o bibliotecă)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (pentru un crate binar)\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"Modulele definite în fișiere pot fi, de asemenea, documentate, folosind \"\n\"\\\"inner doc comments\\\". Acestea documentează elementul care le conține - în \"\n\"acest caz, un modul.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! Acest modul implementează grădina, inclusiv o germinație foarte \"\n\"performantă\\n\"\n\"//! foarte performantă.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Reexportați tipurile din acest modul.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Semănați pachetele de semințe date.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Recoltați produsele din grădină care sunt gata.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"Înainte de Rust 2018, modulele trebuiau să fie localizate la `module/mod.rs` \"\n\"în loc de `module.rs`, iar aceasta este încă o alternativă funcțională \"\n\"pentru edițiile după 2018.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"Motivul principal pentru care s-a introdus `filename.rs` ca alternativă la \"\n\"`filename/mod.rs` a fost acela că multe fișiere numite `mod.rs` pot fi greu \"\n\"de distins în IDE-uri.\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"În cazul în care este vorba de o înglobare mai profundă, se pot utiliza \"\n\"dosare, chiar dacă modulul principal este un fișier:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"Locul în care rust va căuta modulele poate fi schimbat cu o directivă de \"\n\"compilare:\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"Acest lucru este util, de exemplu, dacă doriți să plasați testele pentru un \"\n\"modul într-un fișier numit `some_module_test.rs`, similar convenției din Go.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Modulele reprezintă o limită de confidențialitate:\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Elementele modulului sunt private în mod implicit (ascunde detaliile de \"\n\"implementare).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Elementele părinților și ale fraților sunt întotdeauna vizibile.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"Cu alte cuvinte, dacă un element este vizibil în modulul `foo`, el este \"\n\"vizibil în toți descendenții lui `foo`.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"Utilizați cuvântul cheie `pub` pentru a face modulele publice.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"În plus, există specificatori avansați `pub(...)` pentru a restricționa \"\n\"domeniul de aplicare al vizibilității publice.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"A se vedea [Rust Reference](https://doc.rust-lang.org/reference/visibility-\"\n\"and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"Configurarea vizibilității `pub(crate)` este un model comun.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"Mai rar, puteți oferi vizibilitate unei anumite căi de acces.\"\n\n#: src/modules/visibility.md\n#, fuzzy\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"În orice caz, vizibilitatea trebuie să fie acordată unui modul strămoș (și \"\n\"tuturor descendenților săi).\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"use, super, self\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"Un modul poate aduce simboluri dintr-un alt modul în domeniul de aplicare cu \"\n\"`use`. De obicei, veți vedea ceva de genul acesta în partea de sus a \"\n\"fiecărui modul:\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Trasee\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Căile de acces se rezolvă după cum urmează:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As a relative path:\"\nmsgstr \"Ca o cale relativă:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` sau `self::foo` se referă la `foo` din modulul curent,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` se referă la `foo` din modulul părinte.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"As an absolute path:\"\nmsgstr \"Ca o cale absolută:\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` se referă la `foo` din rădăcina cratei curente,\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` se referă la `foo` din cadrul `bar` crate.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"Se obișnuiește să se \\\"reexporte\\\" simboluri pe o cale mai scurtă. De \"\n\"exemplu, la nivelul superior `lib.rs` dintr-o cutie poate avea\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"făcând ca `DiskStorage` și `NetworkStorage` să fie disponibile pentru alte \"\n\"crates cu o cale scurtă și convenabilă.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"În cea mai mare parte, numai elementele care apar într-un modul trebuie să \"\n\"fie \\\"utilizate\\\". Cu toate acestea, o trăsătură trebuie să se afle în \"\n\"domeniul de aplicare pentru a apela orice metodă a acelei trăsături, chiar \"\n\"dacă un tip care implementează acea trăsătură se află deja în domeniul de \"\n\"aplicare. De exemplu, pentru a utiliza metoda `read_to_string` pe un tip \"\n\"care implementează trăsătura `Read`, trebuie să `use std::io::Read`.\"\n\n#: src/modules/paths.md\n#, fuzzy\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"Instrucțiunea `use` poate avea un wildcard: `use std::io::*`. Acest lucru \"\n\"este descurajat deoarece nu este clar ce elemente sunt importate, iar \"\n\"acestea se pot schimba în timp.\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"În acest exercițiu, veți reorganiza o mică implementare a unei biblioteci \"\n\"GUI. Această bibliotecă definește o trăsătură `Widget` și câteva \"\n\"implementări ale acestei trăsături, precum și o funcție `main`.\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"De obicei, fiecare tip sau set de tipuri strâns legate între ele este inclus \"\n\"în propriul modul, astfel încât fiecare tip de widget ar trebui să aibă \"\n\"propriul său modul.\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"Setare\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"Locul de joacă Rust acceptă doar un singur fișier, așa că va trebui să \"\n\"creați un proiect Cargo în sistemul de fișiere local:\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"Modificați fișierul `src/main.rs` rezultat pentru a adăuga declarațiile \"\n\"`mod` și adăugați fișiere suplimentare în directorul `src`.\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"Sursă\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"Iată implementarea unui singur modul al bibliotecii GUI:\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Lățimea naturală a lui `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Desenați widget-ul într-un buffer.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Desenează widget-ul pe ieșirea standard.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Adăugați 4 padding-uri pentru margini\\n\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Modificați draw_into pentru a returna Result<(), std::fmt::Error>. \"\n\"Apoi, utilizați\\n\"\n\"        // ?-operator aici în loc de .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// adăugați un pic de umplutură\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"Acesta este un mic text demonstrativ GUI.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\n#, fuzzy\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Faceți clic pe mine!\\\"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"Încurajați elevii să împartă codul într-un mod natural pentru ei și să se \"\n\"obișnuiască cu declarațiile obligatorii `mod`, `use` și `pub`. După aceea, \"\n\"discutați ce organizații sunt cele mai idiomatice.\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ---- ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ---- ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Lățimea etichetei\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHETĂ: Label-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Eticheta-drapează_în\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ---- ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Lățimea butonului\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHETĂ: Button-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Buton-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ---- ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: Lățimea ferestrei\\n\"\n\"        // Adăugați 4 padding-uri pentru margini\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHETĂ: Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: după ce ați învățat despre gestionarea erorilor, puteți schimba\\n\"\n\"        // draw_into pentru a returna Result<(), std::fmt::Error>. Apoi, \"\n\"utilizați\\n\"\n\"        // operatorul ?- aici în loc de .unwrap().\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing.md\n#, fuzzy\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"[Module de testare](./testing/unit-tests.md) (5 minute)\"\n\n#: src/testing.md\n#, fuzzy\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"[Alte tipuri de teste](./testing/other.md) (10 minute)\"\n\n#: src/testing.md\n#, fuzzy\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"[Compilatorul Lints și Clippy](./testing/lints.md) (5 minute)\"\n\n#: src/testing.md\n#, fuzzy\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"[Exercițiu: Algoritmul Luhn](./testing/exercițiu.md) (30 minute)\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Teste unitare\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust și Cargo vin cu un cadru simplu de testare a unităților:\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Testele unitare sunt acceptate în tot codul dumneavoastră.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\"Testele de integrare sunt suportate prin intermediul directorului `tests/`.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"Testele sunt marcate cu `#[test]`. Testele unitare sunt deseori plasate într-\"\n\"un modul `tests` imbricate, folosind `#[cfg(test)]` pentru a le compila \"\n\"condiționat numai atunci când se construiesc testele.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Bună lume\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Acest lucru vă permite să testați unitar ajutoarele private.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"Atributul `#[cfg(test)]` este activ numai atunci când executați `cargo test`.\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\"Executați testele în locul de joacă pentru a arăta rezultatele acestora.\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Teste de integrare\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Dacă doriți să vă testați biblioteca ca și client, utilizați un test de \"\n\"integrare.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Creați un fișier `.rs` în `tests/`:\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Aceste teste au acces numai la API-ul public al seriei dumneavoastră.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Teste de documentare\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust are un suport încorporat pentru testele de documentare:\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"```rust\\n\"\n\"/// Scurtează un șir de caractere la lungimea dată.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # folosește playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\n\"pub fn shorten_string(s: &str, length: usize) -> &str {\\n\"\n\"    &s[..std::cmp::min(length, s.len())]]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\"Blocurile de cod din comentariile `///` sunt considerate automat ca fiind \"\n\"cod Rust.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Codul va fi compilat și executat ca parte din `cargo test`.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"Adăugarea lui `# ` în cod îl va ascunde din documentație, dar îl va compila/\"\n\"executa în continuare.\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Testați codul de mai sus pe [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\n#, fuzzy\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"Compilatorul Rust produce mesaje de eroare fantastice, precum și indicații \"\n\"încorporate utile. [Clippy](https://doc.rust-lang.org/clippy/) oferă și mai \"\n\"multe indicii, organizate în grupuri care pot fi activate pentru fiecare \"\n\"proiect în parte.\"\n\n#: src/testing/lints.md\n#, fuzzy\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X probabil că încape într-un u16, nu? {}\\\"\"\n\n#: src/testing/lints.md\n#, fuzzy\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"Rulați exemplul de cod și examinați mesajul de eroare. Aici sunt vizibile și \"\n\"linte, dar acestea nu vor fi afișate odată ce codul se compilează. Treceți \"\n\"la site-ul Playground pentru a afișa aceste linte.\"\n\n#: src/testing/lints.md\n#, fuzzy\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"După ce ați rezolvat problemele, rulați `clippy` pe site-ul locului de joacă \"\n\"pentru a afișa avertismentele clippy. Clippy are o documentație extinsă a \"\n\"lints-urilor sale și adaugă noi lints (inclusiv lints default-deny) tot \"\n\"timpul.\"\n\n#: src/testing/lints.md\n#, fuzzy\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"Rețineți că erorile sau avertismentele cu `help: ...` pot fi corectate cu \"\n\"`cargo fix` sau prin intermediul editorului dumneavoastră.\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"Algoritmul Luhn\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[Algoritmul Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) este \"\n\"utilizat pentru a valida numerele cardurilor de credit. Algoritmul primește \"\n\"un șir de caractere ca intrare și face următoarele operații pentru a valida \"\n\"numărul cardului de credit:\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"Ignoră toate spațiile. Respinge numărul cu mai puțin de două cifre.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"Mergând de la **dreapta la stânga**, se dublează fiecare a doua cifră: \"\n\"pentru numărul `1234`, dublăm `3` și `1`. Pentru numărul `98765`, se \"\n\"dublează `6` și `8`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"După ce o cifră a fost dublată, se adună cifrele dacă rezultatul este mai \"\n\"mare de 9. Astfel, când se dublează `7` se obține `14` care devine `1 + 4 = \"\n\"5`.\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Se adună toate cifrele nedublate și dublate.\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"Numărul cardului de credit este valabil dacă suma se termină cu `0`.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"Codul furnizat oferă o implementare eronată a algoritmului luhn, împreună cu \"\n\"două teste unitare de bază care confirmă că majoritatea algoritmului este \"\n\"implementat corect.\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Copiați codul de mai jos în <https://play.rust-lang.org/> și completați \"\n\"funcțiile și metodele care lipsesc:\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// Aceasta este versiunea cu erori care apare în problemă.\\n\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// Aceasta este soluția și trece toate testele de mai jos.\\n\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Este {cc_number} un număr de card de credit valid? {}\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"yes\\\"\"\nmsgstr \"Da (inițializat la compilare)\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"nu\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0 0\\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\"0\\\"\"\nmsgstr \"'0'\"\n\n#: src/testing/solution.md\n#, fuzzy\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"[Error Handling](./error-handling.md) (55 minutes)\"\nmsgstr \"[Gestionarea erorilor](../error-handling.md) (45 minute)\"\n\n#: src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[Unsafe Rust](../unsafe-rust.md) (1 oră și 5 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"[Panici](./error-handling/panics.md) (3 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"[Operator de încercare](./error-handling/try.md) (5 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\"[Încercați conversiile](./error-handling/try-conversions.md) (5 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"[Error Trait](./error-handling/error.md) (5 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minute)\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\"[Exercițiu: Rescrierea cu rezultat](./error-handling/exercise.md) (20 minute)\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust tratează erorile fatale cu un \\\"panic\\\".\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Rust va declanșa o panică în cazul în care se produce o eroare fatală în \"\n\"timpul execuției:\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Panica este pentru erori irecuperabile și neașteptate.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Panicile sunt simptome ale unor erori în program.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\"Eșecurile în timpul execuției, cum ar fi verificările eșuate ale limitelor, \"\n\"pot provoca panică\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"Afirmațiile (cum ar fi `assert!`) intră în panică în caz de eșec\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"Panicile cu scop specific pot utiliza macroul `panic!`.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"O panică va \\\"derula\\\" stiva, eliminând valorile ca și cum funcțiile s-ar fi \"\n\"întors.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Folosiți API-uri care nu se blochează (cum ar fi `Vec::get`) dacă nu este \"\n\"acceptabilă blocarea.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"În mod implicit, o panică va determina derularea stivei. Desfășurarea poate \"\n\"fi prinsă:\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"Nici o problemă aici!\\\"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"Oh, nu!\\\"\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\"Capturarea este neobișnuită; nu încercați să implementați excepții cu \"\n\"`catch_unwind`!\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Acest lucru poate fi util în cazul serverelor care trebuie să continue să \"\n\"funcționeze chiar dacă o singură cerere se blochează.\"\n\n#: src/error-handling/panics.md\n#, fuzzy\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Acest lucru nu funcționează dacă `panic = 'abort'` este setat în `Cargo.\"\n\"toml`.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"Erorile în timpul execuției, cum ar fi connection-refused sau file-not-\"\n\"found, sunt tratate cu tipul `Result`, dar potrivirea acestui tip la fiecare \"\n\"apel poate fi greoaie. Operatorul try `?` este utilizat pentru a returna \"\n\"erorile către apelant. Acesta vă permite să transformați opțiunea comună\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"into the much simpler\"\nmsgstr \"în mult mai simplu\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\"Putem folosi acest lucru pentru a simplifica codul de tratare a erorilor:\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"nume de utilizator sau eroare: {username:?}\\\"\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"Simplificarea funcției `read_username` pentru a folosi `?`.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"Variabila `username` poate fi fie `Ok(string)`, fie `Err(error)`.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Utilizați apelul `fs::write` pentru a testa diferite scenarii: niciun \"\n\"fișier, fișier gol, fișier cu nume de utilizator.\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"Rețineți că `main` poate returna un `Result<(), E>` atâta timp cât \"\n\"implementează `std::process:Termination`. În practică, acest lucru înseamnă \"\n\"că `E` implementează `Debug`. Executabilul va imprima varianta `Err` și va \"\n\"returna o stare de ieșire diferită de zero în caz de eroare.\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"Extinderea efectivă a lui `?` este puțin mai complicată decât s-a arătat \"\n\"anterior:\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"works the same as\"\nmsgstr \"funcționează la fel ca\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Apelul `From::from` de aici înseamnă că încercăm să convertim tipul de \"\n\"eroare în tipul returnat de funcție.\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"Eroare IO: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Nu am găsit niciun nume de utilizator în {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"Operatorul `?` trebuie să returneze o valoare compatibilă cu tipul de retur \"\n\"al funcției. Pentru `Result`, aceasta înseamnă că tipurile de eroare trebuie \"\n\"să fie compatibile. O funcție care returnează `Result<T, ErrorOuter>` poate \"\n\"folosi `?` pentru o valoare de tip `Result<U, ErrorInner>` numai dacă \"\n\"`ErrorOuter` și `ErrorInner` sunt de același tip sau dacă `ErrorOuter` \"\n\"implementează `From<ErrorInner>`.\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"O alternativă obișnuită la o implementare `From` este `Result::map_err`, în \"\n\"special atunci când conversia are loc într-un singur loc.\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"Nu există nicio cerință de compatibilitate pentru `Option`. O funcție care \"\n\"returnează `Option<T>` poate utiliza operatorul `?` pe `Option<U>` pentru \"\n\"tipuri arbitrare `T` și `U`.\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"O funcție care returnează `Result` nu poate utiliza `?` pentru `Option` și \"\n\"invers. Cu toate acestea, `Option::ok_or` transformă `Option` în `Result`, \"\n\"în timp ce `Result::ok` transformă `Result` în `Option`.\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Tipuri de erori dinamice\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Uneori dorim să permitem returnarea oricărui tip de eroare fără a scrie \"\n\"propriul nostru enum care să acopere toate posibilitățile diferite. `std::\"\n\"error::Error` facilitează acest lucru.\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Conte: {count}\\\"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Eroare: {err}\\\"\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"Funcția `read_count` poate returna `std::io::Error` (din operațiile cu \"\n\"fișiere) sau `std::num::ParseIntError` (din `String::parse`).\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Acest lucru economisește cod, dar renunță la capacitatea de a trata în mod \"\n\"curat diferite cazuri de eroare în mod diferit în program. Ca atare, în \"\n\"general nu este o idee bună să folosiți `Box<dyn Error>` în API-ul public al \"\n\"unei biblioteci, dar poate fi o opțiune bună într-un program în care doriți \"\n\"doar să afișați mesajul de eroare undeva.\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\"Asigurați-vă că implementați trăsătura `std::error::Error` atunci când \"\n\"definiți un tip de eroare personalizat, astfel încât acesta să poată fi \"\n\"încadrat. Dar dacă aveți nevoie să suportați atributul `no_std`, rețineți că \"\n\"trăsătura `std::error::Error` este în prezent compatibilă cu `no_std` doar \"\n\"în [nightly](https://github.com/rust-lang/rust/issues/103765).\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"Crăiasa [thiserror](https://docs.rs/thiserror/) este o modalitate populară \"\n\"de a crea o enumerație a erorilor, așa cum am făcut pe pagina anterioară:\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\"`thiserror` este adesea utilizat în biblioteci pentru a crea tipuri de erori \"\n\"personalizate care implementează `From<T>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\"`anyhow` este adesea utilizat de aplicații pentru a ajuta la gestionarea \"\n\"erorilor în funcții, inclusiv adăugarea de informații contextuale la erori.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Nu am găsit niciun nume de utilizator în {0}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Nu s-a reușit deschiderea {path}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Nu a reușit să citească\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Nume de utilizator: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Eroare: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror`\"\nmsgstr \"`Error`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"Macroul derivat `Error` este furnizat de `thiserror` și are o mulțime de \"\n\"atribute utile pentru a ajuta la definirea tipurilor de erori într-un mod \"\n\"compact.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"Caracteristica `std::error::Error` este derivată automat.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\"Mesajul din `#[error]` este utilizat pentru a obține caracteristica \"\n\"`Display`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow`\"\nmsgstr \"\\\"oricum\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` este în esență un înveliș în jurul lui `Box<dyn Error>`. Ca \"\n\"atare, în general, nu este o alegere bună pentru API-ul public al unei \"\n\"biblioteci, dar este utilizat pe scară largă în aplicații.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`anyhow::Result<V>` este un alias de tip pentru `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\"Tipul real de eroare din interiorul acestuia poate fi extras pentru \"\n\"examinare, dacă este necesar.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"Funcționalitatea oferită de `anyhow::Result<T>` poate fi cunoscută \"\n\"dezvoltatorilor Go, deoarece oferă modele de utilizare și ergonomie similare \"\n\"cu `(T, error)` din Go.\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` este o trăsătură implementată pentru tipurile standard \"\n\"`Result` și `Option`. `use anyhow::Context` este necesar pentru a activa `.\"\n\"context()` și `.with_context()` pentru aceste tipuri.\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"Exercițiu: rescrierea cu `Result`\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"Următorul exemplu implementează un parser foarte simplu pentru un limbaj de \"\n\"expresii. Cu toate acestea, acesta gestionează erorile prin panică. \"\n\"Rescrieți-l pentru a utiliza în schimb o gestionare idiomatică a erorilor și \"\n\"pentru a propaga erorile la o întoarcere din `main`. Nu ezitați să folosiți \"\n\"`thiserror` și `anyhow`.\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"SUGESTIE: începeți prin a remedia gestionarea erorilor în funcția `parse`. \"\n\"Odată ce aceasta funcționează corect, actualizați `Tokenizer` pentru a \"\n\"implementa `Iterator<Item=Result<Token, TokenizerError>>`` și gestionați \"\n\"acest lucru în parser.\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// Un operator aritmetic.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// Un simbol în limbajul de exprimare.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// O expresie în limbajul de expresie.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// O referință la o variabilă.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// Un număr literal.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// O operațiune binară.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Caracter neașteptat {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Sfârșitul neașteptat al intrării\\\"\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"Număr întreg de 32 de biți invalid\\\"\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Jetoane neașteptate {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\"// Se uită înainte pentru a analiza o operațiune binară, dacă este \"\n\"prezentă.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Caracter neașteptat \\\"{0}\\\" în intrare\\\"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Eroare de tokenizare: {0}\\\"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Jetoane neașteptate {0:?}\\\"\"\n\n#: src/error-handling/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Număr invalid\\\"\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"[Nesigur](./unsafe-rust/unsafe.md) (5 minute)\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\"[Dereferențierea pointerilor brute](./unsafe-rust/dereferencing.md) (10 \"\n\"minute)\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\"[Variabile statice mutabile](./unsafe-rust/mutable-static.md) (5 minute)\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"[Uniuni](./unsafe-rust/unions.md) (5 minute)\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"[Funcții nesigure](./unsafe-rust/unsafe-functions.md) (5 minute)\"\n\n#: src/unsafe-rust.md\n#, fuzzy\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"[Trăsături nesigure](./unsafe-rust/unsafe-traits.md) (5 minute)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"[Exercițiu: Împachetare FFI](./unsafe-rust/exercise.md) (30 minute)\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 1 oră și 5 minute\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Limbajul Rust are două părți:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"**Safe Rust:** sigur în memorie, fără comportament nedefinit posibil.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Unsafe Rust:** poate declanșa un comportament nedefinit dacă sunt \"\n\"încălcate condițiile prealabile.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"În acest curs vom vedea mai ales Rust sigur, dar este important să știm ce \"\n\"este Rust nesigur.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Codul nesigur este, de obicei, mic și izolat, iar corectitudinea sa trebuie \"\n\"documentată cu atenție. Acesta este de obicei acoperit de un strat de \"\n\"abstractizare sigur.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Unsafe Rust vă oferă acces la cinci noi capacități:\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Dereferențierea indicatoarelor brute.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Accesarea sau modificarea variabilelor statice mutabile.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Access `union` fields.\"\nmsgstr \"Accesați câmpurile `union`.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"Apelarea funcțiilor `unsafe`, inclusiv a funcțiilor `extern`.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Implementarea trăsăturilor `unsafe`.\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"În continuare vom aborda pe scurt capacitățile nesigure. Pentru detalii \"\n\"complete, vă rugăm să consultați [Capitolul 19.1 din Rust Book](https://doc.\"\n\"rust-lang.org/book/ch19-01-unsafe-rust.html) și [Rustonomicon](https://doc.\"\n\"rust-lang.org/nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Unsafe Rust nu înseamnă că codul este incorect. Înseamnă că dezvoltatorii au \"\n\"dezactivat caracteristicile de siguranță ale compilatorului și trebuie să \"\n\"scrie singuri codul corect. Înseamnă că compilatorul nu mai aplică regulile \"\n\"de siguranță a memoriei din Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"Crearea de pointeri este sigură, dar dereferențierea lor necesită `unsafe`:\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"Atenție!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"```rust,editabil\\n\"\n\"fn main() {\\n\"\n\"    let mut num = 5;\\n\"\n\"\\n\"\n\"    let r1 = &mut num as *mut i32;\\n\"\n\"    let r2 = r1 as *const i32;\\n\"\n\"\\n\"\n\"    // Sigur, deoarece r1 și r2 au fost obținute din referințe și deci sunt\\n\"\n\"    // garantate ca fiind non-null și aliniate corespunzător, obiectele care \"\n\"stau la baza lor\\n\"\n\"    // referințele din care au fost obținute sunt vii pe tot parcursul\\n\"\n\"    // întregul bloc nesigur, și nu sunt accesate nici prin intermediul \"\n\"blocului\\n\"\n\"    // referințe, nici în același timp prin intermediul altor pointeri.\\n\"\n\"    unsafe {\\n\"\n\"        println!(\\\"r1 este: {}\\\", *r1);\\n\"\n\"        *r1 = 10;\\n\"\n\"        println!(\\\"r2 este: {}\\\", *r2);\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 este: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"uhoh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 este: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// NU ESTE SIGUR. NU FACEȚI ACEST LUCRU.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 este: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Este o bună practică (și este cerută de ghidul de stil Android Rust) să \"\n\"scrieți un comentariu pentru fiecare bloc `unsafe`, explicând modul în care \"\n\"codul din interiorul acestuia îndeplinește cerințele de siguranță ale \"\n\"operațiilor nesigure pe care le efectuează.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"În cazul dereferențierii pointerilor, aceasta înseamnă că pointerii trebuie \"\n\"să fie [_valabili_](https://doc.rust-lang.org/std/ptr/index.html#safety), \"\n\"adică:\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Pointerul trebuie să nu fie nul.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Pointerul trebuie să fie _dereferențiabil_ (în limitele unui singur obiect \"\n\"alocat).\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"Obiectul nu trebuie să fi fost dezalocat.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Nu trebuie să existe accese simultane la aceeași locație.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"În cazul în care pointerul a fost obținut prin turnarea unei referințe, \"\n\"obiectul subiacent trebuie să fie viu și nu se poate utiliza nicio referință \"\n\"pentru a accesa memoria.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\"În cele mai multe cazuri, indicatorul trebuie, de asemenea, să fie bine \"\n\"aliniat.\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"Secțiunea \\\"NOT SAFE\\\" oferă un exemplu de un tip comun de eroare UB: `*r1` \"\n\"are durata de viață `'static`, astfel încât `r3` are tipul `&'static String` \"\n\"și, prin urmare, trăiește mai mult decât `s`. Crearea unei referințe dintr-\"\n\"un pointer necesită _grea atenție_.\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Este sigur să citiți o variabilă statică imuabilă:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Bună lume\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Cu toate acestea, deoarece pot apărea curse de date, nu este sigur să se \"\n\"citească și să se scrie variabilele statice mutabile:\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"// SIGURANȚĂ: Nu există alte fire care ar putea accesa `COUNTER`.\\n\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"Programul de aici este sigur, deoarece are un singur fir de execuție. Cu \"\n\"toate acestea, compilatorul Rust este conservator și va presupune ce este \"\n\"mai rău. Încercați să eliminați `unsafe` și să vedeți cum compilatorul \"\n\"explică faptul că este un comportament nedefinit să mutați o statică din mai \"\n\"multe fire de execuție.\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Utilizarea unui static mutabil este, în general, o idee proastă, dar există \"\n\"unele cazuri în care ar putea avea sens în codul `no_std` de nivel scăzut, \"\n\"cum ar fi implementarea unui alocator de heap sau lucrul cu unele API-uri C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Uniunile sunt ca și enumerațiile, dar trebuie să urmăriți singur câmpul \"\n\"activ:\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"Nici un comportament nedefinit în timpul execuției:\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Uniunile sunt foarte rar necesare în Rust, deoarece puteți utiliza de obicei \"\n\"un enum. Ele sunt ocazional necesare pentru a interacționa cu API-urile \"\n\"bibliotecilor C.\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Dacă doriți doar să reinterpretați octeții ca fiind de un tip diferit, \"\n\"probabil că doriți [`std::mem::transmute`](https://doc.rust-lang.org/stable/\"\n\"std/mem/fn.transmute.html) sau un înveliș sigur, cum ar fi [`zerocopy`]\"\n\"(https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Apelarea funcțiilor nesigure\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"O funcție sau o metodă poate fi marcată `unsafe` dacă are condiții \"\n\"prealabile suplimentare pe care trebuie să le respectați pentru a evita un \"\n\"comportament nedefinit:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece indicii sunt în ordinea corectă, în limitele lui\\n\"\n\"    // șirului de caractere și se află pe limitele secvenței UTF-8.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"char count: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\"// SIGURANȚĂ: `abs` nu se ocupă de pointeri și nu are nicio siguranță\\n\"\n\"    // cerințe.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Valoarea absolută a lui -3 în conformitate cu C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Nerespectarea cerinței de codificare UTF-8 încalcă siguranța memoriei!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_ununchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Scrierea funcțiilor nesigure\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Puteți marca propriile funcții ca fiind \\\"nesigure\\\" dacă acestea necesită \"\n\"anumite condiții pentru a evita un comportament nedefinit.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Schimbă valorile indicate de indicatoarele date.\\n\"\n\"///\\n\"\n\"/// # Siguranță\\n\"\n\"///\\n\"\n\"/// Punctele trebuie să fie valide și aliniate corespunzător.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"Aceasta este de obicei o problemă doar pentru funcțiile externe care fac \"\n\"lucruri cu pointeri care ar putea încălca modelul de memorie Rust, dar în \"\n\"general orice funcție C poate avea un comportament nedefinit în orice \"\n\"circumstanțe arbitrare.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"În acest exemplu, `\\\"C\\\"` este ABI; [sunt disponibile și alte ABI-uri]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"De fapt, nu vom folosi pointeri pentru acest lucru, deoarece acest lucru \"\n\"poate fi realizat în siguranță cu referințe.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Rețineți că codul nesigur este permis în cadrul unei funcții nesigure fără \"\n\"un bloc `unsafe`. Putem interzice acest lucru cu \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Încercați să-l adăugați și vedeți ce se \"\n\"întâmplă.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Implementarea trăsăturilor nesigure\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Ca și în cazul funcțiilor, puteți marca o trăsătură ca fiind \\\"nesigură\\\" \"\n\"dacă implementarea trebuie să garanteze anumite condiții pentru a evita un \"\n\"comportament nedefinit.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"De exemplu, categoria `zerocopy` are o trăsătură nesigură care arată [ceva \"\n\"de genul acesta](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.\"\n\"html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Siguranță\\n\"\n\"/// Tipul trebuie să aibă o reprezentare definită și să nu aibă umplutură.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece u32 are o reprezentare definită și nu are umplutură.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"Ar trebui să existe o secțiune `# Siguranță` în Rustdoc pentru trăsătura \"\n\"care să explice cerințele pentru ca trăsătura să fie implementată în \"\n\"siguranță.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"Secțiunea de siguranță efectivă pentru `AsBytes` este mai lungă și mai \"\n\"complicată.\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Trăsăturile încorporate `Send` și `Sync` sunt nesigure.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Înfășurătorul FFI sigur\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust are un suport excelent pentru apelarea funcțiilor prin intermediul unei \"\n\"interfețe de funcții străine (FFI). Vom folosi acest lucru pentru a construi \"\n\"un înveliș sigur pentru funcțiile `libc` pe care le-ați folosi din C pentru \"\n\"a citi numele fișierelor dintr-un director.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Va trebui să consultați paginile din manual:\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"De asemenea, veți dori să navigați în modulul [`std::ffi`](https://doc.rust-\"\n\"lang.org/std/ffi/). Acolo veți găsi o serie de tipuri de șiruri de caractere \"\n\"de care aveți nevoie pentru exercițiu:\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Encoding\"\nmsgstr \"Codificare\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"Folosește\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) și [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"UTF-8\"\nmsgstr \"\"\n\"Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice \"\n\"caracter Unicode.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Text processing in Rust\"\nmsgstr \"Prelucrarea textului în Rust\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) și [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"NUL-terminated\"\nmsgstr \"Terminat cu NUL\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Communicating with C functions\"\nmsgstr \"Comunicarea cu funcțiile C\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) și \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"OS-specific\"\nmsgstr \"Specific sistemului de operare\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"Communicating with the OS\"\nmsgstr \"Comunicarea cu sistemul de operare\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"You will convert between all these types:\"\nmsgstr \"Veți face conversia între toate aceste tipuri:\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`&str` în `CString`: trebuie să alocați spațiu pentru un caracter `\\\\0` la \"\n\"sfârșit,\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\"`CString` la `*const i8`: aveți nevoie de un pointer pentru a apela \"\n\"funcțiile C,\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`*const i8` la `&CStr`: aveți nevoie de ceva care să poată găsi caracterul \"\n\"`\\\\0` din urmă,\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"`&CStr` la `&[u8]`: o porțiune de octeți este interfața universală pentru \"\n\"\\\"unele date necunoscute\\\",\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"`&&[u8]` la `&OsStr`: `&OsStr` este un pas spre `OsString`, utilizați \"\n\"[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) \"\n\"pentru a-l crea,\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr` în `OsString`: trebuie să clonați datele din `&OsStr` pentru a le \"\n\"putea returna și a apela din nou `readdir`.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) are, de asemenea, un \"\n\"capitol foarte util despre FFI.\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Copiați codul de mai jos în <https://play.rust-lang.org/> și completați \"\n\"funcțiile și metodele care lipsesc:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Tip opac. A se vedea https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Dispunere în conformitate cu pagina de manual Linux pentru readdir(3), \"\n\"unde ino_t și\\n\"\n\"    // off_t sunt rezolvate în conformitate cu definițiile din\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\"// Dispunere în conformitate cu pagina de manual macOS pentru dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// A se vedea https://github.com/rust-lang/libc/issues/414 și secțiunea \"\n\"privind\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE din pagina de manual macOS pentru \"\n\"stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platformele care existau înainte ca aceste actualizări să fie \"\n\"disponibile\\\" se referă la\\n\"\n\"        // la macOS (spre deosebire de iOS / wearOS / etc.) pe Intel și \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Apelați opendir și returnați o valoare Ok dacă a funcționat,\\n\"\n\"        // în caz contrar, se returnează Err cu un mesaj.\\n\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\"// Continuați să apelați readdir până când primim înapoi un pointer NULL.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Chemați closedir după cum este necesar.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\"Copiați următorul cod server și client în `src/bin/server.rs` și, respectiv, \"\n\"`src/bin/client.rs`. Sarcina dumneavoastră este de a completa aceste fișiere \"\n\"așa cum este descris mai jos.\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Invalid path: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SAFETY: path.as_ptr() nu poate fi NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"Nu s-a putut deschide {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Continuați să apelați readdir până când primim înapoi un pointer NULL.\\n\"\n\"        // SIGURANȚĂ: self.dir nu este niciodată NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// Am ajuns la sfârșitul directorului.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// SAFETY: dirent nu este NULL și dirent.d_name este NUL\\n\"\n\"        // terminat.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SIGURANȚĂ: self.dir nu este NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Nu s-a putut închide {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Caracter non-UTF-8 în calea de acces\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Bine ați venit la Rust în Android\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust este acceptat pentru dezvoltarea platformei native pe Android. Acest \"\n\"lucru înseamnă că puteți scrie noi servicii de sistem de operare în Rust, \"\n\"precum și extinde serviciile existente.\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"Vom încerca să îl sunăm pe Rust de la unul dintre proiectele dumneavoastră \"\n\"astăzi. Așadar, încercați să găsiți un colțișor din baza dumneavoastră de \"\n\"cod în care să putem muta câteva linii de cod în Rust. Cu cât mai puține \"\n\"dependențe și tipuri \\\"exotice\\\", cu atât mai bine. Ceva care analizează \"\n\"niște octeți brute ar fi ideal.\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"Vorbitorul poate menționa oricare dintre următoarele, având în vedere \"\n\"utilizarea sporită a Rust în Android:\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"Exemplu de serviciu: [DNS prin HTTP](https://security.googleblog.com/2022/07/\"\n\"dns-over-http3-in-android.html)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"Biblioteci: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"Driverele nucleului: [Binder](https://lore.kernel.org/rust-for-\"\n\"linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Vom folosi un dispozitiv virtual Android pentru a testa codul nostru. \"\n\"Asigurați-vă că aveți acces la unul sau creați unul nou cu:\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Vă rugăm să consultați [Android Developer Codelab](https://source.android.\"\n\"com/docs/setup/start) pentru detalii.\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish este un dispozitiv Android de referință conceput pentru a \"\n\"funcționa pe desktop-uri Linux generice. De asemenea, este planificat și \"\n\"suport pentru MacOS.\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"Imaginea de sistem Cuttlefish păstrează o fidelitate ridicată față de \"\n\"dispozitivele reale și este emulatorul ideal pentru a rula multe cazuri de \"\n\"utilizare Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Sistemul de compilare Android (Soong) acceptă Rust prin intermediul unui \"\n\"număr de module:\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"Tipul de modul\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"Descriere\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\"```javascript\\n\"\n\"rust_binary {\\n\"\n\"    name: \\\"cxx_test\\\",\\n\"\n\"    srcs: [\\\"lib.rs\\\"],\\n\"\n\"    rustlibs: [\\\"libcxx\\\"],\\n\"\n\"    static_libs: [\\\"libcxx_test_cpp\\\"],\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Produce un binar Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\"Produce o bibliotecă Rust și oferă atât variantele `rlib`, cât și `dylib`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Produce o bibliotecă Rust C utilizabilă de modulele `cc` și oferă atât \"\n\"variante statice cât și partajate.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Produce o bibliotecă Rust `proc-macro`. Acestea sunt analoge cu plugin-urile \"\n\"de compilator.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Produce un binar de testare Rust care utilizează harnașamentul standard de \"\n\"testare Rust.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Produce un binar Rust fuzz folosind `libfuzzer`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Generează sursa și produce o bibliotecă Rust care oferă o interfață pentru \"\n\"un anumit protobuf.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Generează sursa și produce o bibliotecă Rust care conține legături Rust \"\n\"pentru bibliotecile C.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"În continuare vom analiza `rust_binary` și `rust_library`.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"Alte elemente pe care vorbitorul le poate menționa:\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo nu este optimizat pentru depozite multilingve și, de asemenea, \"\n\"descarcă pachete de pe internet.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"Pentru conformitate și performanță, Android trebuie să aibă cratere în \"\n\"copac. De asemenea, trebuie să interacționeze cu codul C/C++/Java. Soong \"\n\"umple acest gol.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong are multe asemănări cu Bazel, care este varianta open-source a lui \"\n\"Blaze (utilizată în google3).\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\"Există un plan de tranziție de la [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/) și [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) la Bazel.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\"Învățarea regulilor de compilare de tip Bazel este utilă pentru toți \"\n\"dezvoltatorii Rust OS.\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"Fapt amuzant: Data din Star Trek este un Android de tip Soong.\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"Rust Binaries\"\nmsgstr \"Binare Rust\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Să începem cu o aplicație simplă. La rădăcina unei verificări AOSP, creați \"\n\"următoarele fișiere:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Demo Rust.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#, fuzzy\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Tipărește un mesaj de salut pe ieșirea standard.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Bună ziua de la Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Acum puteți să construiți, să distribuiți și să rulați fișierul binar:\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Rust Libraries\"\nmsgstr \"Biblioteci Rust\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Utilizați `rust_library` pentru a crea o nouă bibliotecă Rust pentru Android.\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Aici declarăm o dependență față de două biblioteci:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, pe care îl definim mai jos,\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, care este un crate deja vândut în [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Este necesar pentru a evita eroarea de link dinamic.\\n\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"Salutări\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"src/main.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Biblioteca de felicitări.\\n\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Salutați `name`.\\n\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Bună ziua {name}, mă bucur să vă cunosc!\\\"\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Construiți, distribuiți și rulați programul binar la fel ca înainte:\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Limbajul [Android Interface Definition Language (AIDL)](https://developer.\"\n\"android.com/guide/components/aidl) este acceptat în Rust:\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Codul Rust poate apela serverele AIDL existente,\"\n\n#: src/android/aidl.md\n#, fuzzy\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Puteți crea noi servere AIDL în Rust.\"\n\n#: src/android/aidl/birthday-service.md\n#, fuzzy\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\"Pentru a ilustra cum să folosim Rust cu Binder, vom parcurge procesul de \"\n\"creare a unei interfețe Binder. Apoi, vom implementa serviciul descris și \"\n\"vom scrie codul clientului care vorbește cu serviciul respectiv.\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"AIDL Interfaces\"\nmsgstr \"Interfețe AIDL\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Declarați API-ul serviciului dumneavoastră utilizând o interfață AIDL:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Interfață de serviciu de ziua de naștere. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Generează un mesaj de \\\"La mulți ani\\\". */\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust nu este activat în mod implicit\\n\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\"Rețineți că structura directoarelor din directorul `aidl/` trebuie să \"\n\"corespundă cu numele pachetului utilizat în fișierul AIDL, de exemplu, \"\n\"pachetul este `com.example.birthdayservice`, iar fișierul se află la `aidl/\"\n\"com/example/IBirthdayService.aidl`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"Generated Service API\"\nmsgstr \"Serviciul generat API\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\"Binder generează o trăsătură corespunzătoare definiției interfeței. \"\n\"trăsătură pentru a vorbi cu serviciul.\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"Cod Rust generat:\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\"Serviciul dvs. va trebui să implementeze această trăsătură, iar clientul \"\n\"dvs. va folosi această trăsătură pentru a vorbi cu serviciul.\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\"Legăturile generate pot fi găsite la `out/soong/.intermediates/<path to \"\n\"module>/`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\"Evidențiați modul în care semnătura funcției generate, în special tipurile \"\n\"de argumente și de retur, corespund definiției interfeței.\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\"`String` pentru un argument are ca rezultat un tip Rust diferit de `String` \"\n\"ca tip de returnare.\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"Service Implementation\"\nmsgstr \"Implementarea serviciilor\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Acum putem implementa serviciul AIDL:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"Implementarea serviciilor\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"La mulți ani {name}, felicitări cu {years} ani!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\"Indicați calea către trăsătura generată `IBirthdayService` și explicați de \"\n\"ce este necesar fiecare dintre segmente.\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\"TODO: Ce face trăsătura `binder::Interface`? Există metode de suprascriere? \"\n\"Unde se află sursa?\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"AIDL Server\"\nmsgstr \"Server AIDL\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"În cele din urmă, putem crea un server care să expună serviciul:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Slujbă de ziua de naștere.\\n\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Punct de intrare pentru serviciul de aniversare.\\n\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Nu a reușit să înregistreze serviciul\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"src/bin/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// Pentru a evita eroarea de legătură dinamică.\\n\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\"Procesul de preluare a implementării unui serviciu definit de utilizator (în \"\n\"acest caz, tipul `BirthdayService`, care implementează `IBirthdayService`) \"\n\"și pornirea acestuia ca serviciu Binder are mai mulți pași și poate părea \"\n\"mai complicat decât sunt obișnuiți studenții care au folosit Binder din C++ \"\n\"sau dintr-un alt limbaj. Explicați-le elevilor de ce este necesar fiecare \"\n\"pas.\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"Creați o instanță a tipului dvs. de serviciu (`BirthdayService`).\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\"Înfășurați obiectul serviciului în tipul `Bn*` corespunzător \"\n\"(`BnBirthdayService` în acest caz). Acest tip este generat de Binder și \"\n\"oferă funcționalitatea comună Binder care ar fi furnizată de clasa de bază \"\n\"`BnBinder` în C++. În Rust nu avem moștenire, așa că în schimb folosim \"\n\"compoziția, punând `BirthdayService` în cadrul `BnBinderService` generat.\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\"Apelați `add_service`, dându-i un identificator de serviciu și obiectul \"\n\"serviciului dumneavoastră (obiectul `BnBirthdayService` în exemplul de față).\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\"Apelați `join_thread_pool` pentru a adăuga firul curent la fondul de fire al \"\n\"Binder și pentru a începe să asculte conexiunile.\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Acum putem construi, împinge și porni serviciul:\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"Într-un alt terminal, verificați dacă serviciul rulează:\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"De asemenea, puteți apela serviciul cu `service call`:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"AIDL Client\"\nmsgstr \"Client AIDL\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\"În cele din urmă, putem crea un client Rust pentru noul nostru serviciu.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Apelarea serviciului de aniversare.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Nu a reușit să se conecteze la BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// Call the service.\\n\"\nmsgstr \"/// Apelarea serviciului de aniversare.\\n\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\"```rust,editable\\n\"\n\"enum Result {\\n\"\n\"    Ok(i32),\\n\"\n\"    Err(String),\\n\"\n\"}\\n\"\n\"\\n\"\n\"fn divide_in_two(n: i32) -> Result {\\n\"\n\"    if n % 2 == 0 {\\n\"\n\"        Result::Ok(n / 2)\\n\"\n\"    } else {\\n\"\n\"        Result::Err(format!(\\\"nu se poate împărți {n} în două părți \"\n\"egale\\\"))\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"\\n\"\n\"fn main() {\\n\"\n\"    let n = 100;\\n\"\n\"    match divide_in_two(n) {\\n\"\n\"        Result::Ok(half) => println!(\\\"{n} împărțit la doi este {half}\\\"),\\n\"\n\"        Result::Err(msg) => println!(\\\"regret, a apărut o eroare: {msg}\\\"),\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"src/bin/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Observați că clientul nu depinde de `libbirthdayservice`.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Creați, distribuiți și rulați clientul pe dispozitivul dvs:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\"`Strong<dyn IBirthdayService>` este obiectul trăsătură care reprezintă \"\n\"serviciul la care s-a conectat clientul.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\"`Strong` este un tip de pointer inteligent personalizat pentru Binder. \"\n\"Acesta gestionează atât un număr de referințe în cadrul procesului pentru \"\n\"obiectul de serviciu, cât și numărul global de referințe Binder care \"\n\"urmărește câte procese au o referință la obiect.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\"Rețineți că obiectul de trăsătură pe care clientul îl utilizează pentru a \"\n\"vorbi cu serviciul utilizează exact aceeași trăsătură pe care o \"\n\"implementează serverul. Pentru o anumită interfață Binder, există o singură \"\n\"trăsătură Rust generată pe care o utilizează atât clientul, cât și serverul.\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\"Utilizați același identificator de serviciu utilizat la înregistrarea \"\n\"serviciului. Ideal ar fi ca acesta să fie definit într-o casetă comună de \"\n\"care să depindă atât clientul, cât și serverul.\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Să extindem API-ul cu mai multe funcționalități: dorim să permitem \"\n\"clienților să specifice o listă de linii pentru felicitarea de ziua de \"\n\"naștere:\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\"Aceasta are ca rezultat o definiție actualizată a trăsăturii pentru \"\n\"`IBirthdayService`:\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\"Observați cum `String[]` din definiția AIDL este tradus ca `&[String]` în \"\n\"Rust, adică tipurile idiomatice Rust sunt utilizate în legăturile generate \"\n\"ori de câte ori este posibil:\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"argumentele matricei `in` sunt transformate în felii.\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"argetele `out` și `inout` sunt traduse în `&amp;mut Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-definition.md\n#, fuzzy\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"Valorile de returnare sunt convertite în returnarea unui `Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"Updating Client and Service\"\nmsgstr \"Actualizarea clientului și a serviciului\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\"Actualizați codul clientului și al serverului pentru a ține cont de noul API.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\\\"Habby birfday to yuuuuuuu\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\\\"Și, de asemenea, multe altele\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\"TODO: Să mutăm fragmentele de cod în fișierele de proiect, unde vor fi \"\n\"construite efectiv?\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"Working With AIDL Types\"\nmsgstr \"Lucrul cu tipurile AIDL\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"Tipurile AIDL se traduc în tipul idiomatic Rust corespunzător:\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\"Tipurile primitive se adaptează (în mare parte) la tipurile idiomatice Rust.\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\"Sunt acceptate tipuri de colecții precum slices, `Vec`s și tipuri de șiruri \"\n\"de caractere.\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\"Referințele la obiecte AIDL și la mânerele de fișiere pot fi trimise între \"\n\"clienți și servicii.\"\n\n#: src/android/aidl/types.md\n#, fuzzy\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"Mânerele de fișiere și pachetele sunt pe deplin acceptate.\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"Tipurile primitive se mapează (în mare parte) în mod idiomatic:\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rugină prin exemplu\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"Notiță\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`bool`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`i8`\"\nmsgstr \"\"\n\"Biblioteca standard are o implementare a `From<i8> pentru i16`, ceea ce \"\n\"înseamnă că putem converti o variabilă `x` de tip `i8` în `i16` prin \"\n\"apelarea `i16::from(x)`. Sau, mai simplu, cu `x.into()`, deoarece \"\n\"implementarea `From<i8> for i16` creează automat o implementare a `Into<i16> \"\n\"for i8`.\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Note that bytes are signed.\"\nmsgstr \"// Mai mult de 7 octeți este invalid.\\n\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"Rețineți utilizarea lui `u16`, NU `u32`.\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`i32`\"\nmsgstr \"\"\n\"Ar fi avut loc o copiere implicită a matricei. Din moment ce `i32` este un \"\n\"tip care implică copiere, atunci `[i32; 3]` implică, de asemenea, copierea.\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`long`\"\nmsgstr \"\"\n\"Precizați că bucla `while let` va continua atâta timp cât valoarea se \"\n\"potrivește cu modelul.\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`i64`\"\nmsgstr \"`i64`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`double`\"\nmsgstr \"Eliberări dublate în C++ modern\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\"Tipurile de matrice (`T[]`, `byte[]` și `List<T>`) sunt convertite în tipul \"\n\"de matrice Rust corespunzător, în funcție de modul în care sunt utilizate în \"\n\"semnătura funcției:\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"Poziție\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`in` argument\"\nmsgstr \"argument:\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"`Box<T>`\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`out`/`inout` argument\"\nmsgstr \"argument `out`/`inout`\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"Înapoi\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\"În Android 13 sau versiunile ulterioare, sunt acceptate matricele de \"\n\"dimensiuni fixe, adică `T[N]` devine `[T; N]`. Tablourile de dimensiuni fixe \"\n\"pot avea dimensiuni multiple (de exemplu, int\\\\[3\\\\]\\\\[4\\\\]). În backend-ul \"\n\"Java, array-urile de dimensiuni fixe sunt reprezentate ca tipuri de array-\"\n\"uri.\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\"Array-urile din câmpurile parcelabile sunt întotdeauna convertite în \"\n\"`Vec<T>`.\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\"Obiectele AIDL pot fi trimise fie ca un tip AIDL concret, fie ca interfață \"\n\"`IBinder`, care a fost eliminată ca tip:\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"/** Același lucru, dar folosind un obiect binder. */\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"/** Același lucru, dar folosind `IBinder`. */\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementarea interfeței AIDL `IBirthdayService`.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementarea interfeței AIDL `IBirthdayService`.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"/// Apelarea serviciului de aniversare.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\"// Efectuați aceeași operațiune, dar trecând furnizorul ca un `SpIBinder`.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\"Rețineți utilizarea lui `BnBirthdayInfoProvider`. Acesta are același scop ca \"\n\"și `BnBirthdayService` pe care l-am văzut anterior.\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"Binder for Rust acceptă trimiterea directă de colete:\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"/** Același lucru, dar cu un parcelabil. */\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\"Fișierele pot fi trimise între clienții/serverele Binder utilizând tipul \"\n\"`ParcelFileDescriptor`:\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"/** Același lucru, dar încarcă informații dintr-un fișier. */\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\"// Deschideți un fișier și puneți informațiile despre ziua de naștere în \"\n\"el.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\\\"/data/local/tmp/birthday.info\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"Nume registru\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\\\"{years}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"// Creați un `ParcelFileDescriptor` din fișier și trimiteți-l.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\"// Conversia descriptorului de fișier într-un `File`. `ParcelFileDescriptor` \"\n\"înfășoară\\n\"\n\"        // un `OwnedFd`, care poate fi clonat și apoi utilizat pentru a crea \"\n\"un `File`\\n\"\n\"        // obiect.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Lungime invalidă\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\"`ParcelFileDescriptor` înfășoară un `OwnedFd` și, prin urmare, poate fi \"\n\"creat dintr-un `File` (sau orice alt tip care înfășoară un `OwnedFd`) și \"\n\"poate fi utilizat pentru a crea un nou handle `File` pe partea cealaltă.\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\"Alte tipuri de descriptori de fișiere pot fi înfășurate și trimise, de \"\n\"exemplu, TCP, UDP și socket-uri UNIX.\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"Rust în Android\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\"Pornind de la [Testing](../testing.md), vom analiza acum modul în care \"\n\"funcționează testele unitare în AOSP. Utilizați modulul `rust_test` pentru \"\n\"testele unitare:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"hello_rust/Android.bp_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\\\"leftpad\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\\\"leftpad_test\\\"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"Rust nesigur\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"hello_rust/src/lib.rs_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Biblioteca de felicitări.\\n\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Introduceți la stânga `s` în `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"Acum puteți să generați automat legăturile:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"Abordarea generală arată în felul următor:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\"```text\\n\"\n\"INFO: Timp scurs: 2.666s, Calea critică: 2.40s\\n\"\n\"INFO: 3 procese: 2 interne, 1 linux-sandbox.\\n\"\n\"INFO: Construirea s-a finalizat cu succes, 3 acțiuni totale\\n\"\n\"//comprehensive-rust-android/testing/testing:libleftpad_test_host A TRECUT \"\n\"în 2.3s\\n\"\n\"    A TRECUT libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    A TRECUT libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Cazuri de testare: finalizat cu 2 cazuri de trecere și 0 eșecuri din 2 \"\n\"cazuri de testare\\n\"\n\"```\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\"Observați că ați menționat doar rădăcina bibliotecii. Testele se găsesc \"\n\"recursiv în modulele imbricate.\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"[googletest](https://docs.rs/googletest): Bibliotecă cuprinzătoare de \"\n\"testare a afirmațiilor de testare în tradiția GoogleTest pentru C++.\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"Dacă schimbăm ultimul element în `\\\"!\\\"`, testul eșuează cu un mesaj de \"\n\"eroare structurat care indică eroarea:\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest nu face parte din Rust Playground, așa că trebuie să executați \"\n\"acest exemplu într-un mediu local. Utilizați `cargo add googletest` pentru a-\"\n\"l adăuga rapid la un proiect Cargo existent.\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"Linia `use googletest::prelude::*;` importă un număr de [macros și tipuri \"\n\"utilizate în mod obișnuit](https://docs.rs/googletest/latest/googletest/\"\n\"prelude/index.html).\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), a self-guided Rust course: it provides a guided introduction to \"\n\"the library, with exercises to help you get comfortable with `googletest` \"\n\"macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\"Acest lucru este doar o mică parte, deoarece există numeroase elemente de \"\n\"potrivire încorporate. Luați în considerare parcurgerea primului capitol din \"\n\"[\\\"Testare avansată pentru aplicații Rust\\\"](https://github.com/mainmatter/\"\n\"rust-advanced-testing-workshop), un curs Rust auto-ghidat: acesta oferă o \"\n\"introducere ghidată în bibliotecă, cu exerciții care să vă ajute să vă \"\n\"acomodați cu macro-urile `googletest`, cu potrivitorii săi și cu filozofia \"\n\"sa generală.\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"O caracteristică deosebit de plăcută este faptul că neconcordanțele în \"\n\"șirurile de caractere de mai multe linii sunt afișate sub forma unui dif:\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Tiparea puternică a lui Rust ne ghidează în acest sens\\n\"\n\"                 Cod sigur pe care îl veți scrie.\\\"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Umorul caraghios al lui Rust ne ghidează în acest sens\\n\"\n\"            Cod sigur pe care îl vei scrie.\\\"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"prezintă o diferență de culori (culorile nu sunt prezentate aici):\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"Crate este un port Rust al [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"Pentru mocking, [Mockall](https://docs.rs/mockall/) este o bibliotecă \"\n\"utilizată pe scară largă. Trebuie să vă refactorizați codul pentru a utiliza \"\n\"trăsături, pe care le puteți apoi mock-ui rapid:\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"Sfatul de aici este pentru Android (AOSP), unde Mockall este biblioteca de \"\n\"mocking recomandată. Există și alte [biblioteci de mocking disponibile pe \"\n\"crates.io](https://crates.io/keywords/mock), în special în domeniul mocking-\"\n\"ului serviciilor HTTP. Celelalte biblioteci de mocking funcționează într-un \"\n\"mod similar cu Mockall, ceea ce înseamnă că acestea facilitează obținerea \"\n\"unei implementări simulate a unei anumite trăsături.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"Rețineți că mocking-ul este oarecum _controversat_: mocks vă permite să \"\n\"izolați complet un test de dependențele sale. Rezultatul imediat este o \"\n\"execuție mai rapidă și mai stabilă a testelor. Pe de altă parte, mock-urile \"\n\"pot fi configurate greșit și pot returna rezultate diferite de cele pe care \"\n\"le-ar face dependențele reale.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"Dacă este posibil, se recomandă să folosiți dependențele reale. Ca exemplu, \"\n\"multe baze de date vă permit să configurați un backend în memorie. Acest \"\n\"lucru înseamnă că obțineți comportamentul corect în testele dvs., în plus, \"\n\"sunt rapide și se vor curăța automat după ele însele.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"În mod similar, multe cadre web vă permit să porniți un server în proces \"\n\"care se leagă la un port aleatoriu pe `localhost`. Preferați întotdeauna \"\n\"acest lucru în locul mocking-ului în afara cadrului, deoarece vă ajută să vă \"\n\"testați codul în mediul real.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall nu face parte din Rust Playground, așa că trebuie să executați acest \"\n\"exemplu într-un mediu local. Utilizați `cargo add mockall` pentru a adăuga \"\n\"rapid Mockall la un proiect Cargo existent.\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall are mult mai multe funcționalități. În special, puteți configura \"\n\"așteptări care depind de argumentele transmise. Aici folosim acest lucru \"\n\"pentru a imita o pisică care devine flămândă la 3 ore după ce a fost hrănită \"\n\"ultima dată:\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"Puteți utiliza `.times(n)` pentru a limita numărul de apeluri ale unei \"\n\"metode mock la `n` --- mock-ul va intra automat în panică atunci când va fi \"\n\"abandonat dacă acest lucru nu este îndeplinit.\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Ar trebui să folosiți caseta `log` pentru a înregistra automat în `logcat` \"\n\"(pe dispozitiv) sau `stdout` (pe gazdă):\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"salut_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"salut_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Demonstrație de logare Rust.\\n\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Înregistrează o salutare.\\n\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\"Concurența în Rust:\\n\"\n\"A se vedea [Concurența în Rust](concurrency.md).\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Program de pornire.\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Lucrurile merg bine.\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Ceva a mers prost!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\"Creați, distribuiți și rulați programul binar pe dispozitivul dumneavoastră:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Jurnalele apar în `adb logcat`:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust are un suport excelent pentru interoperabilitatea cu alte limbaje. \"\n\"Acest lucru înseamnă că puteți:\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Apelarea funcțiilor Rust din alte limbaje.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Apelarea funcțiilor scrise în alte limbaje din Rust.\"\n\n#: src/android/interoperability.md\n#, fuzzy\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Atunci când apelați funcții într-o limbă străină, spunem că utilizați o \"\n\"_interfață de funcții străine_, cunoscută și sub numele de FFI.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"Interoperability with C\"\nmsgstr \"Interoperabilitatea cu C++\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust are un suport complet pentru legarea fișierelor de obiecte cu o \"\n\"convenție de apelare C. În mod similar, puteți exporta funcții Rust și le \"\n\"puteți apela din C.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Puteți să o faceți manual, dacă doriți:\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"// SIGURANȚĂ: `abs` nu are nicio cerință de siguranță.\\n\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"Am văzut deja acest lucru în [Exercițiul [Safe FFI Wrapper] (../../exerciții/\"\n\"zi-3/safe-ffi-wrapper.md).\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Acest lucru presupune cunoașterea completă a platformei țintă. Nu se \"\n\"recomandă pentru producție.\"\n\n#: src/android/interoperability/with-c.md\n#, fuzzy\nmsgid \"We will look at better options next.\"\nmsgstr \"În continuare, vom examina opțiuni mai bune.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Using Bindgen\"\nmsgstr \"Utilizarea Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Instrumentul [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) poate genera automat legăturile dintr-un fișier de antet C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"First create a small C library:\"\nmsgstr \"Mai întâi creați o mică bibliotecă C:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"interoperabilitate/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"interoperabilitate/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\"```c\\n\"\n\"#include \\\"libbirthday.h\\\"\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| La mulți ani %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Felicitări cu %i ani!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Adăugați acest lucru la fișierul `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"interoperabilitate/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Creați un fișier de antet de înfășurare pentru bibliotecă (nu este strict \"\n\"necesar în acest exemplu):\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"interoperabilitate/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Acum puteți să generați automat legăturile:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"Exemple de legături\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"În cele din urmă, putem utiliza legăturile în programul nostru Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"_main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"interoperabilitate/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\"// SIGURANȚĂ: Pointerul pe care îl trecem este valid pentru că provine dintr-\"\n\"un Rust\\n\"\n\"    // referință, iar `name` pe care îl conține se referă la `name` de mai \"\n\"sus, care de asemenea\\n\"\n\"    // rămâne valabil. `print_card` nu stochează niciunul dintre cei doi \"\n\"pointeri pentru a-i folosi ulterior\\n\"\n\"    // după ce se întoarce.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"În cele din urmă, putem rula teste generate automat pentru a ne asigura că \"\n\"legăturile funcționează:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\"```rust,editabile\\n\"\n\"fn main() {\\n\"\n\"    match std::env::args().next().as_deref() {\\n\"\n\"        Some(\\\"cat\\\") => println!(\\\"Va face lucruri de pisică\\\"),\\n\"\n\"        Some(\\\"ls\\\") => println!(\\\"Va face ls unor fișiere\\\"),\\n\"\n\"        Some(\\\"mv\\\") => println!(\\\"Va muta niște fișiere\\\"),\\n\"\n\"        Some(\\\"rm\\\") => println!(\\\"Uh, periculos!\\\"),\\n\"\n\"        None => println!(\\\"Hmm, niciun nume de program?\\\"),\\n\"\n\"        _ => println!(\\\"Nume de program necunoscut!\\\"),\\n\"\n\"    }\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Fișier generat, săriți linting\\n\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Calling Rust\"\nmsgstr \"Apelarea Rust din C\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Exportul funcțiilor și tipurilor Rust în C este ușor:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"interoperabilitate/interoperabilitate/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Demonstrație Rust FFI.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analizați numerele.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) este cel mai mic!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) este probabil mai mare decât x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"interoperabilitate/interoperabilitate/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"interoperabilitate/interoperabilitate/rusine/libanaliza/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Acum putem apela acest lucru dintr-un binar C:\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"interoperabilitate/rust/analiza/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"interoperabilitate/încălzire/antreprenoriat/analiza/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` dezactivează manipularea obișnuită a numelor din Rust, astfel \"\n\"încât simbolul exportat va fi doar numele funcției. De asemenea, puteți \"\n\"utiliza `#[export_name = \\\"some_name\\\"]` pentru a specifica orice nume \"\n\"doriți.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"[CXX crate](https://cxx.rs/) face posibilă realizarea unei \"\n\"interoperabilități sigure între Rust și C++.\"\n\n#: src/android/interoperability/cpp.md\n#, fuzzy\nmsgid \"The overall approach looks like this:\"\nmsgstr \"Abordarea generală arată în felul următor:\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX se bazează pe o descriere a semnăturilor funcțiilor care vor fi expuse \"\n\"de la un limbaj la celălalt. Această descriere este furnizată cu ajutorul \"\n\"blocurilor externe dintr-un modul Rust adnotat cu macroul atribut `#[cxx::\"\n\"bridge]`.\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Structuri partajate cu câmpuri vizibile pentru ambele limbi.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#, fuzzy\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Tipuri și semnături Rust expuse în C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\"\n\"Concurența în Rust:\\n\"\n\"A se vedea [Concurența în Rust](concurrency.md).\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// Tipuri și semnături C++ expuse în Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\\\"C++\\\"\"\nmsgstr \"Cu C\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\"Puntea este, în general, declarată într-un modul `ffi` din cadrul seriei \"\n\"dumneavoastră.\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"Din declarațiile făcute în modulul punte, CXX va genera definiții de tip/\"\n\"funcție Rust și C++ corespunzătoare pentru a expune aceste elemente în \"\n\"ambele limbaje.\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"Pentru a vizualiza codul Rust generat, utilizați [cargo-expand](https://\"\n\"github.com/dtolnay/cargo-expand) pentru a vizualiza macroul proc extins. \"\n\"Pentru majoritatea exemplelor, veți folosi `cargo expand ::ffi` pentru a \"\n\"extinde doar modulul `ffi` (deși acest lucru nu se aplică pentru proiectele \"\n\"Android).\"\n\n#: src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"Pentru a vizualiza codul C++ generat, căutați în `target/cxxbridge`.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Declarații Rust Bridge\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Tip opac\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Metoda pe `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"funcție:\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"Elementele declarate în modulul `extern \\\"Rust\\\"` fac trimitere la elemente \"\n\"care se află în domeniul de aplicare în modulul părinte.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"Generatorul de cod CXX utilizează secțiunea (secțiunile) `extern \\\"Rust\\\"` \"\n\"pentru a produce un fișier antet C++ care conține declarațiile C++ \"\n\"corespunzătoare. Antetul generat are aceeași cale ca și fișierul sursă Rust \"\n\"care conține puntea, dar cu extensia de fișier .rs.h.\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\n#, fuzzy\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"Rezultă (aproximativ) următorul C++:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"Declarații de punte C++\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"Rezultă (aproximativ) următorul Rust:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"Programatorul nu trebuie să promită că semnăturile pe care le-a introdus \"\n\"sunt corecte. CXX efectuează verificări statice pentru a se asigura că \"\n\"semnăturile corespund exact cu ceea ce este declarat în C++.\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\n#, fuzzy\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"blocurile `unsafe extern` vă permit să declarați funcții C++ care pot fi \"\n\"apelate în siguranță din Rust.\"\n\n#: src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"Sunt acceptate numai enumerațiile de tip C (unitate).\"\n\n#: src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"Un număr limitat de trăsături sunt acceptate pentru `#[derive()]` pe tipuri \"\n\"partajate. Funcționalitatea corespunzătoare este, de asemenea, generată \"\n\"pentru codul C++, de exemplu, dacă derivați `Hash`, se generează și o \"\n\"implementare a `std::hash` pentru tipul C++ corespunzător.\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Cod Rust generat:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"Cod C++ generat:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"În ceea ce privește Rust, codul generat pentru enumerațiile partajate este \"\n\"de fapt o structură care înfășoară o valoare numerică. Acest lucru se \"\n\"datorează faptului că nu este UB în C++ ca o clasă enum să dețină o valoare \"\n\"diferită de toate variantele enumerate, iar reprezentarea noastră Rust \"\n\"trebuie să aibă același comportament.\"\n\n#: src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 necesită adâncime > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Succes!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\"Funcțiile Rust care returnează `Result` sunt transformate în excepții în \"\n\"limbajul C++.\"\n\n#: src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"Excepția aruncată va fi întotdeauna de tipul `rust::Error`, care expune în \"\n\"primul rând o modalitate de a obține șirul de mesaje de eroare. Mesajul de \"\n\"eroare va proveni din implantul `Display` al tipului de eroare.\"\n\n#: src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"O dezarhivare de panică din Rust în C++ va determina întotdeauna terminarea \"\n\"imediată a procesului.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"Trăsături 'Error'\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"Funcțiile C++ declarate pentru a returna un `Result` vor prinde orice \"\n\"excepție lansată în partea C++ și o vor returna ca valoare `Err` funcției \"\n\"Rust care o apelează.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"Dacă o excepție este aruncată de o funcție externă \\\"C++\\\" care nu este \"\n\"declarată de puntea CXX pentru a returna `Result`, programul apelează `std::\"\n\"terminate` din C++. Comportamentul este echivalent cu cel al unei excepții \"\n\"aruncate printr-o funcție `noexcept` C++.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"Exemplu C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"Sir\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::string`\"\nmsgstr \"șir:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Celula<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"Aceste tipuri pot fi utilizate în câmpurile structurilor partajate și în \"\n\"argumentele și returnările funcțiilor externe.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"Rețineți că `String` din Rust nu se referă direct la `std::string`. Există \"\n\"câteva motive pentru acest lucru:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` nu respectă invarianta UTF-8 pe care `String` o cere.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"Cele două tipuri au configurații diferite în memorie și, prin urmare, nu pot \"\n\"fi transmise direct între limbi.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` necesită constructori de mutare care nu se potrivesc cu \"\n\"semantica de mutare a Rust, astfel încât un `std::string` nu poate fi \"\n\"transmis ca valoare către Rust.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Construirea pentru Android: C++\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"Creați o `cc_library_static` pentru a construi biblioteca C++, inclusiv \"\n\"fișierul sursă și antetul generat de CXX.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"Indicați că `libcxx_test_bridge_header` și `libcxx_test_bridge_code` sunt \"\n\"dependențele pentru legăturile C++ generate de CXX. Vom arăta cum sunt \"\n\"configurate acestea în slide-ul următor.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"Rețineți că trebuie să depindeți și de biblioteca `cxx-bridge-header` pentru \"\n\"a trage definițiile CXX comune.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"Documentația completă pentru utilizarea CXX în Android poate fi găsită în \"\n\"[the Android docs](https://source.android.com/docs/setup/build/rust/building-\"\n\"rust-modules/android-rust-patterns#rust-cpp-interop-using-cxx). Este posibil \"\n\"să doriți să împărtășiți acest link cu clasa, astfel încât elevii să știe \"\n\"unde pot găsi din nou aceste instrucțiuni în viitor.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"Creați două reguli de gen: Una pentru a genera antetul CXX și una pentru a \"\n\"genera fișierul sursă CXX. Acestea sunt apoi folosite ca intrări în \"\n\"`cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Generați un antet C++ care să conțină legăturile C++\\n\"\n\"// la funcțiile exportate Rust din lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Generarea codului C++ pe care Rust îl apelează.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(locația cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"Instrumentul `cxxbridge` este un instrument independent care generează \"\n\"partea C++ a modulului punte. Acesta este inclus în Android și este \"\n\"disponibil ca instrument Soong.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"Prin convenție, dacă fișierul sursă Rust este `lib.rs`, fișierul de antet se \"\n\"va numi `lib.rs.h`, iar fișierul sursă se va numi `lib.rs.cc`. Totuși, \"\n\"această convenție de denumire nu este impusă.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\"Creați un `rust_binary` care depinde de `libcxx` și de `cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Interoperability with Java\"\nmsgstr \"Interoperabilitate cu Java\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java poate încărca obiecte partajate prin intermediul [Java Native Interface \"\n\"(JNI)](https://en.wikipedia.org/wiki/Java_Native_Interface). Crăiasa [`jni` \"\n\"crate](https://docs.rs/jni/) vă permite să creați o bibliotecă compatibilă.\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Mai întâi, creăm o funcție Rust pentru a exporta în Java:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"interoperabilitate/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI demo.\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// Implementarea metodei HelloWorld::hello.\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"sistem\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Bună ziua, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"interoperabilitate/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"În cele din urmă, putem apela această funcție din Java:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"interoperabilitate/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"Bună lume!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Bună lume!\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\"În cele din urmă, puteți să construiți, să sincronizați și să executați \"\n\"programul binar:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"Acesta este un exercițiu de grup: Ne vom uita la unul dintre proiectele la \"\n\"care lucrați și vom încerca să integrăm în el Rust. Câteva sugestii:\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"Apelați serviciul AIDL cu un client scris în Rust.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"Mutați o funcție din proiectul dvs. în Rust și apelați-o.\"\n\n#: src/exercises/android/morning.md\n#, fuzzy\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"Nu se oferă nicio soluție aici, deoarece este o întrebare deschisă: se \"\n\"bazează pe faptul că cineva din clasă are o bucată de cod pe care o puteți \"\n\"transforma în Rust din mers.\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Bine ați venit la Rust în Android\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Rust este suportat pentru bibliotecile terților în Chromium, cu un cod de \"\n\"lipire de prima parte pentru a face legătura între Rust și codul C++ \"\n\"existent în Chromium.\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"Astăzi, vom apela la Rust pentru a face ceva prostesc cu șiruri de \"\n\"caractere. Dacă aveți un colț de cod în care afișați un șir UTF8 \"\n\"utilizatorului, nu ezitați să urmați această rețetă în partea dvs. de bază \"\n\"de cod în loc de partea despre care vorbim noi.\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"Asigurați-vă că puteți construi și rula Chromium. Orice platformă și orice \"\n\"set de indicatori de compilare este în regulă, atâta timp cât codul dvs. \"\n\"este relativ recent (începând cu poziția de commit 1223636, corespunzând \"\n\"lunii noiembrie 2023):\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"(Pentru un timp de iterație cât mai scurt, se recomandă o componentă, o \"\n\"construcție de depanare. Aceasta este opțiunea implicită)\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"Consultați [How to build Chromium](https://www.chromium.org/developers/how-\"\n\"tos/get-the-code/) dacă nu ați ajuns deja în acest punct. Fiți atenți: \"\n\"configurarea pentru a construi Chromium necesită timp.\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"De asemenea, se recomandă să aveți instalat codul Visual Studio.\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"About the exercises\"\nmsgstr \"Despre exerciții\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"Această parte a cursului cuprinde o serie de exerciții care se bazează unul \"\n\"pe celălalt. Le vom face repartizate pe tot parcursul cursului și nu doar la \"\n\"sfârșit. Dacă nu aveți timp să terminați o anumită parte, nu vă faceți \"\n\"griji: puteți recupera în intervalul următor.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"Comunitatea Rust folosește de obicei `cargo` și bibliotecile din [crates.io]\"\n\"(https://crates.io/). Chromium este construit folosind `gn` și `ninja` și un \"\n\"set curatorial de dependențe.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"Când scrieți cod în Rust, aveți de ales între:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"Utilizați `gn` și `ninja` cu ajutorul șabloanelor din `//build/rust/*.gni` \"\n\"(de exemplu `rust_static_library` pe care îl vom întâlni mai târziu). Acest \"\n\"lucru utilizează toolchain-ul și crates auditate de Chromium.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"Folosiți `cargo`, dar [limitați-vă la lanțul de instrumente și la crates \"\n\"auditate de Chromium](https://chromium.googlesource.com/chromium/src/+/refs/\"\n\"heads/main/docs/rust.md#Using-cargo)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"Folosiți `cargo`, având încredere într-un [toolchain](https://rustup.rs/) și/\"\n\"sau [lăzi descărcate de pe internet](https://crates.io/)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"De aici încolo ne vom concentra pe `gn` și `ninja`, deoarece acesta este \"\n\"modul în care codul Rust poate fi integrat în browserul Chromium. În același \"\n\"timp, Cargo este o parte importantă a ecosistemului Rust și ar trebui să îl \"\n\"păstrați în setul de instrumente.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"exercițiu:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Split into small groups and:\"\nmsgstr \"Împărțiți-vă în grupuri mici și:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"Gândiți-vă la scenarii în care \\\"încărcătura\\\" poate oferi un avantaj și \"\n\"evaluați profilul de risc al acestor scenarii.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"Discutați ce instrumente, biblioteci și grupuri de persoane trebuie să fie \"\n\"de încredere atunci când se utilizează `gn` și `ninja`, `cargo` offline etc.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"Cereți elevilor să evite să tragă cu ochiul la notele vorbitorului înainte \"\n\"de a finaliza exercițiul. Presupunând că cei care urmează cursul sunt fizic \"\n\"împreună, rugați-i să discute în grupuri mici de 3-4 persoane.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"Note/sugestii legate de prima parte a exercițiului (\\\"scenarii în care Cargo \"\n\"poate oferi un avantaj\\\"):\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"Este fantastic faptul că atunci când se scrie un instrument sau se creează \"\n\"prototipuri pentru o parte din Chromium, se are acces la ecosistemul bogat \"\n\"de biblioteci crates.io. Există un crate pentru aproape orice și, de obicei, \"\n\"acestea sunt destul de plăcute de utilizat. (`clap` pentru parsarea liniei \"\n\"de comandă, `serde` pentru serializare/deserializare în/din diverse formate, \"\n\"`itertools` pentru lucrul cu iteratori, etc.).\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"`cargo` face mai ușoară încercarea unei biblioteci (doar adăugați o singură \"\n\"linie la `Cargo.toml` și începeți să scrieți cod)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"Poate că merită să comparăm modul în care CPAN a ajutat la transformarea lui \"\n\"`perl` într-o alegere populară. Sau comparând cu `python` + `pip`.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"Experiența de dezvoltare este foarte plăcută nu numai prin instrumentele \"\n\"Rust de bază (de exemplu, utilizarea `rustup` pentru a trece la o versiune \"\n\"diferită de `rustc` atunci când se testează un crate care trebuie să \"\n\"funcționeze pe nightly, current stable și old stable), ci și printr-un \"\n\"ecosistem de instrumente terțe (de exemplu, Mozilla oferă `cargo vet` pentru \"\n\"simplificarea și partajarea auditurilor de securitate; crate `criterion` \"\n\"oferă o modalitate simplificată de a rula teste de referință).\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"`cargo` facilitează adăugarea unui instrument prin `cargo install --locked \"\n\"cargo-vet`.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\"Ar putea fi utilă o comparație cu extensiile Chrome Extensions sau VScode \"\n\"Extensions.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"Exemple generale, generice, de proiecte în care `cargo` poate fi alegerea \"\n\"potrivită:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"Poate surprinzător, Rust devine din ce în ce mai popular în industrie pentru \"\n\"scrierea instrumentelor de linie de comandă. Amploarea și ergonomia \"\n\"bibliotecilor este comparabilă cu Python, fiind în același timp mai robust \"\n\"(datorită sistemului de tipuri bogat) și funcționând mai rapid (fiind un \"\n\"limbaj compilat, mai degrabă decât interpretat).\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"Participarea la ecosistemul Rust necesită utilizarea instrumentelor standard \"\n\"Rust, cum ar fi Cargo. Bibliotecile care doresc să primească contribuții \"\n\"externe și care doresc să fie utilizate în afara Chromium (de exemplu, în \"\n\"Bazel sau în mediile de compilare Android/Soong) ar trebui probabil să \"\n\"utilizeze Cargo.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"Exemple de proiecte legate de Chromium care sunt bazate pe `cargo`:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient` (experimentat în alte părți ale Google, ceea ce a dus \"\n\"la PR-uri cu îmbunătățiri de performanță)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"Biblioteci de fonturi precum `font-types`\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"instrumentul `gnrt` (îl vom întâlni mai târziu în curs) care depinde de \"\n\"`clap` pentru analiza liniei de comandă și de `toml` pentru fișierele de \"\n\"configurare.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"Avertisment: un motiv unic pentru a folosi `cargo` a fost indisponibilitatea \"\n\"lui `gn` la construirea și bootstraparea bibliotecii standard Rust la \"\n\"construirea lanțului de instrumente Rust)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` folosește copia Chromium a `cargo` și `rustc`. `gnrt` depinde \"\n\"de biblioteci terțe descărcate de pe internet, prin `run_gnrt.py` cere \"\n\"`cargo` ca numai conținutul `--blocat` să fie permis prin `Cargo.lock`)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"Elevii pot identifica următoarele elemente ca fiind de încredere implicită \"\n\"sau explicită:\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (compilatorul Rust), care la rândul său depinde de bibliotecile \"\n\"LLVM, de compilatorul Clang, de sursele `rustc` (preluate de pe GitHub, \"\n\"revizuite de echipa compilatorului Rust), de compilatorul binar Rust \"\n\"descărcat pentru bootstrap\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup` (poate că merită subliniat faptul că `rustup` este dezvoltat sub \"\n\"umbrela organizației https://github.com/rust-lang/ - la fel ca `rustc`)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`, `rustfmt`, etc.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"Diferite infrastructuri interne (roboți care construiesc `rustc`, sistemul \"\n\"de distribuire a lanțului de instrumente pre-construit către inginerii \"\n\"Chromium, etc.)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"Instrumente pentru mărfuri, cum ar fi `cargo audit`, `cargo vet`, etc.\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"Biblioteci Rust vândute în `//third_party/rust` (auditate de \"\n\"security@chromium.org)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\"Alte biblioteci Rust (unele de nișă, altele destul de populare și utilizate \"\n\"în mod obișnuit)\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"Chromium Rust policy\"\nmsgstr \"Politica privind rugina de crom\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium nu permite încă Rust de la prima parte, cu excepția unor cazuri \"\n\"rare, aprobate de [Area Tech Leads] (https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:ATL_OWNERS).\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"Politica Chromium cu privire la bibliotecile terților este prezentată [aici] \"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#rust) - Rust este permis pentru bibliotecile \"\n\"terților în diverse circumstanțe, inclusiv dacă acestea reprezintă cea mai \"\n\"bună opțiune pentru performanță sau securitate.\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"Foarte puține biblioteci Rust expun direct un API C/C++, ceea ce înseamnă că \"\n\"aproape toate aceste biblioteci vor necesita o cantitate mică de cod glue de \"\n\"la prima parte.\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stiva Heap\\n\"\n\".- - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - -.\\n\"\n\": : : :\\n\"\n\": listă : : : :\\n\"\n\":   +----+----+ : : +----+----+ +----+------+ :\\n\"\n\":   | 1 | o--+-----------+-----+--->| 2 | o--++--->| // | null | :\\n\"\n\":   +----+----+ : : +----+----+ +----+------+ :\\n\"\n\": : : :\\n\"\n\": : : :\\n\"\n\"`- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"Codul de lipire Rust de prima parte pentru o anumită crăpătură terță parte \"\n\"ar trebui să fie păstrat în mod normal în `third_party/rust/<crate>/\"\n\"<version>/wrapper`.\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"Din acest motiv, cursul de astăzi se va concentra pe:\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"Introducerea de biblioteci Rust de la terți (\\\"crates\\\")\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\"Scrierea codului de lipire pentru a putea utiliza aceste crates din Chromium \"\n\"C++.\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\"Dacă această politică se schimbă în timp, cursul va evolua pentru a ține \"\n\"pasul cu ea.\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"Reguli de construcție\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"Codul Rust este de obicei construit folosind `cargo`. Chromium se \"\n\"construiește cu `gn` și `ninja` pentru eficiență --- regulile sale statice \"\n\"permit un paralelism maxim. Rust nu face excepție.\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"Adăugarea de cod Rust în Chromium\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"În unele fișiere Chromium `BUILD.gn` existente, declarați o \"\n\"`rust_static_library`:\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"De asemenea, puteți adăuga `deps` pe alte obiective Rust. Mai târziu vom \"\n\"folosi acest lucru pentru a depinde de codul terților.\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"Trebuie să specificați atât rădăcina lăzii, cât și o listă completă de \"\n\"surse. `crate_root` este fișierul dat compilatorului Rust care reprezintă \"\n\"fișierul rădăcină al unității de compilare --- de obicei `lib.rs`. `sources` \"\n\"este o listă completă a tuturor fișierelor sursă de care `ninja` are nevoie \"\n\"pentru a determina când sunt necesare reconstrucțiile.\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(Nu există un astfel de lucru ca un `source_set` Rust, deoarece în Rust, un \"\n\"întreg crate este o unitate de compilare. O `static_library` este cea mai \"\n\"mică unitate)\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"Studenții s-ar putea să se întrebe de ce avem nevoie de un șablon gn, în loc \"\n\"să folosim [suportul încorporat al gn pentru bibliotecile statice Rust] \"\n\"(https://gn.googlesource.com/gn/+/main/docs/reference.\"\n\"md#func_static_library). Răspunsul este că acest șablon oferă suport pentru \"\n\"interopulare CXX, caracteristici Rust și teste unitare, unele dintre acestea \"\n\"urmând să le folosim mai târziu.\"\n\n#: src/chromium/build-rules/unsafe.md\n#, fuzzy\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"Includerea codului Rust `unsafe` Rust\"\n\n#: src/chromium/build-rules/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"Codul Rust nesigur este interzis în `rust_static_library` în mod implicit \"\n\"--- nu va fi compilat. Dacă aveți nevoie de cod Rust nesigur, adăugați \"\n\"`allow_unsafe = true` la ținta gn. (Mai târziu în curs vom vedea \"\n\"circumstanțe în care acest lucru este necesar)\"\n\n#: src/chromium/build-rules/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\n#, fuzzy\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\"Pur și simplu adăugați ținta de mai sus la `deps` a unei ținte Chromium C++.\"\n\n#: src/chromium/build-rules/depending.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# sau source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Tipurile sunt elidate în codul Rust, ceea ce face ca un IDE bun să fie și \"\n\"mai util decât în cazul C++. Codul Visual Studio funcționează bine pentru \"\n\"Rust în Chromium. Pentru a-l utiliza,\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"Asigurați-vă că VSCode-ul dumneavoastră are extensia `rust-analyzer`, nu \"\n\"formele anterioare de suport Rust\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"`gn gen out/Debug --export-rust-project` (sau echivalent pentru directorul \"\n\"de ieșire)\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"O demonstrație a unora dintre caracteristicile de adnotare și explorare a \"\n\"codului din rust-analyzer ar putea fi benefică dacă audiența este sceptică \"\n\"în mod natural față de IDE-uri.\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"Următorii pași vă pot ajuta cu demonstrația (dar nu ezitați să folosiți în \"\n\"schimb o bucată de Rust legată de Chromium cu care sunteți cel mai \"\n\"familiarizat):\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\"Deschideți `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"Așezați cursorul pe apelul `QrCode::new` (în jurul liniei 26) în \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"Demo **afișează documentația** (legături tipice: vscode = ctrl k i; vim/CoC \"\n\"= K).\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"Demonstrație **deplasați-vă la definiție** (legături tipice: vscode = F12; \"\n\"vim/CoC = g d). (Acest lucru vă va duce la `//third_party/rust/.../\"\n\"qr_code-.../src/lib.rs`)\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"Demo **outline** și navigați până la metoda `QrCode::with_bits` (în jurul \"\n\"liniei 164; conturul este în panoul de explorare a fișierelor din vscode; \"\n\"legături tipice vim/CoC = space o)\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"Demonstrație **Anotații de tip** (există câteva exemple frumoase în metoda \"\n\"`QrCode::with_bits`)\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"Ar putea fi util să subliniem că `gn gen ... --export-rust-project` va \"\n\"trebui să fie rulat din nou după editarea fișierelor `BUILD.gn` (ceea ce vom \"\n\"face de câteva ori în timpul exercițiilor din această sesiune).\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"Reguli de construcție\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"În construcția Chromium, adăugați o nouă țintă Rust la `//ui/base/BUILD.gn` \"\n\"care să conțină:\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**Important**: rețineți că `no_mangle` aici este considerat un tip de \"\n\"nesiguranță de către compilatorul Rust, deci va trebui să permiteți cod \"\n\"nesigur în ținta `gn`.\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"Adăugați această nouă țintă Rust ca dependență a `//ui/base:base`. Declarați \"\n\"această funcție în partea de sus a `ui/base/resource/resource_bundle.cc` \"\n\"(mai târziu, vom vedea cum poate fi automatizat acest lucru de către \"\n\"instrumentele de generare a legăturilor):\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"Apelați această funcție de undeva din `ui/base/resource/resource_bundle.cc` \"\n\"- sugerăm partea de sus a `ResourceBundle::MaybeMangleLocalizedString`. \"\n\"Construiți și rulați Chromium și asigurați-vă că \\\"Hello from Rust!\\\" este \"\n\"tipărit de multe ori.\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"Dacă utilizați VSCode, configurați Rust pentru a funcționa bine în VSCode. \"\n\"Aceasta va fi utilă în exercițiile următoare. Dacă ați reușit, veți putea \"\n\"folosi click dreapta \\\"Go to definition\\\" pe `println!`.\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Where to find help\"\nmsgstr \"Unde găsiți ajutor\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"Opțiunile disponibile pentru șablonul [`rust_static_library` gn](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"Informații despre [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"Informații despre [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"Informații despre comutatorul [`--export-rust-project`](https://gn.\"\n\"googlesource.com/gn/+/main/docs/reference.md#compilation-database) de la \"\n\"gn's [`--export-rust-project`](https://gn.googlesource.com/gn/+/main/docs/\"\n\"reference.md#compilation-database)\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[Cum se instalează rust-analyzer în VSCode](https://code.visualstudio.com/\"\n\"docs/languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"Acest exemplu este neobișnuit, deoarece se reduce la cel mai mic limbaj de \"\n\"interoperabilitate, C. Atât C++, cât și Rust pot declara și apela în mod \"\n\"nativ funcții ABI C. Mai târziu, în cadrul cursului, vom conecta C++ direct \"\n\"la Rust.\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"`allow_unsafe = true` este necesar aici deoarece `#[no_mangle]` ar putea \"\n\"permite ca Rust să genereze două funcții cu același nume, iar Rust nu mai \"\n\"poate garanta că este apelată cea corectă.\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"Dacă aveți nevoie de un executabil Rust pur, puteți face acest lucru \"\n\"folosind șablonul gn `rust_executable`.\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"Comunitatea Rust autorizează de obicei testele unitare într-un modul plasat \"\n\"în același fișier sursă ca și codul testat. Acest lucru a fost abordat [mai \"\n\"devreme](../testing.md) în cadrul cursului și arată astfel:\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"În Chromium plasăm testele unitare într-un fișier sursă separat și continuăm \"\n\"să urmăm această practică pentru Rust --- acest lucru face ca testele să \"\n\"poată fi descoperite în mod constant și ajută la evitarea reconstruirii \"\n\"fișierelor `.rs` a doua oară (în configurația `test`).\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\"Acest lucru are ca rezultat următoarele opțiuni pentru testarea codului Rust \"\n\"în Chromium:\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"Teste Rust native (adică `#[test]`). Descurajat în afara `//third_party/\"\n\"rust`.\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"teste `gtest` scrise în C++ și care utilizează Rust prin apeluri FFI. \"\n\"Suficient atunci când codul Rust este doar un strat FFI subțire și testele \"\n\"unitare existente oferă o acoperire suficientă pentru această caracteristică.\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"`gtest` testele sunt scrise în Rust și utilizează crate-ul testat prin \"\n\"intermediul API-ului său public (folosind `pub mod for_testing { ... }` dacă \"\n\"este necesar). Acesta este subiectul următoarelor slide-uri.\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"Menționați că testele Rust native ale craterelor terțe ar trebui să fie în \"\n\"cele din urmă exercitate de roboții Chromium. (Astfel de testări sunt \"\n\"necesare rareori --- doar după adăugarea sau actualizarea unor crates de la \"\n\"terți)\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"Câteva exemple pot ajuta la ilustrarea momentului în care ar trebui să se \"\n\"utilizeze `gtest` din C++ vs `gtest` din Rust:\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR are foarte puțină funcționalitate în stratul Rust de primă instanță (este \"\n\"doar un strat subțire de lipire FFI) și, prin urmare, utilizează testele \"\n\"unitare C++ existente pentru testarea atât a implementării C++, cât și a \"\n\"implementării Rust (parametrizând testele astfel încât să activeze sau să \"\n\"dezactiveze Rust utilizând o `ScopedFeatureList`).\"\n\n#: src/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"Integrarea PNG ipotetică/WIP ar putea avea nevoie să implementeze o \"\n\"implementare sigură în memorie a transformărilor de pixeli care sunt \"\n\"furnizate de `libpng`, dar care lipsesc din `png` crate - de exemplu RGBA => \"\n\"BGRA, sau corecția gamma. O astfel de funcționalitate ar putea beneficia de \"\n\"teste separate realizate în Rust.\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"Biblioteca [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/\"\n\"src/+/main/testing/rust_gtest_interop/README.md) oferă o modalitate de a:\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"Utilizați o funcție Rust ca și testcase `gtest` (folosind atributul \"\n\"`#[gtest(...)]`)\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"Utilizați `expect_eq!` și macrocomenzi similare (similar cu `assert_eq!`, \"\n\"dar fără a intra în panică și fără a încheia testul atunci când afirmația \"\n\"eșuează).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Exemplu:\"\n\n#: src/chromium/testing/build-gn.md\n#, fuzzy\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"Cel mai simplu mod de a construi teste Rust `gtest` este de a le adăuga la \"\n\"un binar de testare existent care conține deja teste scrise în C++. De \"\n\"exemplu:\"\n\n#: src/chromium/testing/build-gn.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\n#, fuzzy\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"Autorizarea testelor Rust într-o `static_library` separată funcționează, de \"\n\"asemenea, dar necesită declararea manuală a dependenței de bibliotecile de \"\n\"suport:\"\n\n#: src/chromium/testing/build-gn.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"După ce am adăugat `:my_rust_lib` la GN `deps`, mai trebuie să învățăm cum \"\n\"să importăm și să folosim `my_rust_lib` din `my_rust_lib_unittest.rs`. Nu am \"\n\"furnizat un `crate_name` explicit pentru `my_rust_lib`, astfel încât numele \"\n\"său de crate este calculat pe baza căii și a numelui complet al țintei. Din \"\n\"fericire, putem evita să lucrăm cu un astfel de nume greoi folosind macroul \"\n\"`chromium::import!` din crate-ul `chromium` importat automat:\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"Sub acoperire, macroul se extinde la ceva similar cu:\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"Mai multe informații pot fi găsite în [comentariul doc](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) al macroului `chromium::import`.\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"`rust_static_library` acceptă specificarea unui nume explicit prin \"\n\"intermediul proprietății `crate_name`, dar acest lucru este descurajat. Și \"\n\"este descurajată deoarece numele de ladă trebuie să fie unic la nivel \"\n\"global. crates.io garantează unicitatea numelor de ladă, astfel încât \"\n\"țintele GN `cargo_crate` (generate de instrumentul `gnrt`, abordat într-o \"\n\"secțiune ulterioară) utilizează nume de ladă scurte.\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"exercițiu:\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Time for another exercise!\"\nmsgstr \"E timpul pentru un alt exercițiu!\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"In your Chromium build:\"\nmsgstr \"În construcția Chromium:\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"Adăugați o funcție testabilă lângă `hello_from_rust`. Câteva sugestii: \"\n\"adunarea a două numere întregi primite ca argumente, calcularea celui de-al \"\n\"n-lea număr Fibonacci, însumarea numerelor întregi dintr-o felie etc.\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\"Adăugați un fișier separat `..._unittest.rs` cu un test pentru noua funcție.\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"Adăugați noile teste la `BUILD.gn`.\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\"Construiți testele, rulați-le și verificați dacă noul test funcționează.\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"Comunitatea Rust oferă mai multe opțiuni pentru interopulare C++/Rust, noi \"\n\"instrumente fiind dezvoltate în permanență. În prezent, Chromium utilizează \"\n\"un instrument numit CXX.\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"Descrieți întreaga graniță a limbajului într-un limbaj de definire a \"\n\"interfețelor (care seamănă foarte mult cu Rust) și apoi instrumentele CXX \"\n\"generează declarații pentru funcții și tipuri atât în Rust, cât și în C++.\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Consultați [CXX tutorial](https://cxx.rs/tutorial.html) pentru un exemplu \"\n\"complet de utilizare.\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"Vorbiți despre diagramă. Explicați că, în spatele scenei, aceasta face exact \"\n\"ceea ce ați făcut anterior. Precizați că automatizarea procesului are \"\n\"următoarele avantaje:\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"Instrumentul garantează că părțile C++ și Rust se potrivesc (de exemplu, \"\n\"veți obține erori de compilare dacă `#[cxx::bridge]` nu se potrivește cu \"\n\"definițiile reale C++ sau Rust, dar cu legături manuale nesincronizate veți \"\n\"obține Comportament nedefinit)\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"Instrumentul automatizează generarea de thunks FFI (funcții libere mici, \"\n\"compatibile cu C-ABI) pentru caracteristicile non-C (de exemplu, activarea \"\n\"apelurilor FFI în metodele Rust sau C++; legăturile manuale ar necesita \"\n\"crearea manuală a unor astfel de funcții libere de nivel superior)\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\"Instrumentul și biblioteca pot gestiona un set de tipuri de bază - de \"\n\"exemplu:\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&amp;[T]` poate fi trecut peste granița FFI, chiar dacă nu garantează o \"\n\"anumită ABI sau o anumită dispunere a memoriei. În cazul legăturilor \"\n\"manuale, `std::span<T>` / `&amp;[T]` trebuie să fie destructurate și \"\n\"reconstruite manual dintr-un pointer și o lungime - acest lucru este \"\n\"predispus la erori, având în vedere că fiecare limbaj reprezintă feliile \"\n\"goale în mod ușor diferit)\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"Indicatorii inteligenți, cum ar fi `std::unique_ptr<T>`, `std::\"\n\"shared_ptr<T>` și/sau `Box`, sunt suportați nativ. În cazul legăturilor \"\n\"manuale, ar trebui să se treacă pointeri brute compatibile cu C-ABI, ceea ce \"\n\"ar crește riscurile legate de durata de viață și siguranța memoriei.\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"tipurile `rust::String` și `CxxString` înțeleg și mențin diferențele de \"\n\"reprezentare a șirurilor de caractere între limbaje (de exemplu, `rust::\"\n\"String::lossy` poate construi un șir Rust de la o intrare non-UTF8 și `rust::\"\n\"String::c_str` poate termina un șir cu NUL).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"CXX cere ca întreaga graniță C++/Rust să fie declarată în modulele `cxx::\"\n\"bridge` din codul sursă `.rs`.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// Definițiile tipurilor și funcțiilor Rust merg aici\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Point out:\"\nmsgstr \"\"\n\"Ați putea indica modul în care sunt folosite anumite caractere specifice \"\n\"atunci când se află într-un șablon\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"Deși acesta arată ca un `mod` obișnuit din Rust, macroul procedural `#[cxx::\"\n\"bridge]` îi face lucruri complexe. Codul generat este mult mai sofisticat - \"\n\"deși acest lucru are ca rezultat un `mod` numit `ffi` în codul dumneavoastră.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Suport nativ pentru `std::unique_ptr` din C++ în Rust\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Suport pentru testare încorporat.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"Apeluri din C++ în Rust și tipuri Rust (în partea de sus)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"Apeluri din Rust în C++ și tipuri C++ (în partea de jos)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**Inconștiență greșită frecventă**: Se pare că un antet C++ este analizat de \"\n\"Rust, dar acest lucru este înșelător. Acest antet nu este niciodată \"\n\"interpretat de Rust, ci este pur și simplu `#inclus` în codul C++ generat în \"\n\"beneficiul compilatoarelor C++.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"Arătați corespondența dintre [tipurile Rust și C++](https://cxx.rs/bindings.\"\n\"html):\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX se potrivește în mod fundamental cazurilor în care:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\"Interfața Rust-C++ este suficient de simplă pentru a o putea declara în \"\n\"întregime.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"Folosiți doar tipurile suportate nativ de CXX, de exemplu `std::unique_ptr`, \"\n\"`std::string`, `&[u8]` etc.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"Are multe limitări --- de exemplu, lipsa de suport pentru tipul `Option` din \"\n\"Rust.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"Aceste limitări ne constrâng să folosim Rust în Chromium doar pentru \"\n\"\\\"noduri de frunze\\\" bine izolate, mai degrabă decât pentru o interfață Rust-\"\n\"C++ arbitrară. Atunci când se ia în considerare un caz de utilizare pentru \"\n\"Rust în Chromium, un bun punct de plecare este să se redacteze legăturile \"\n\"CXX pentru limita limbajului pentru a vedea dacă pare suficient de simplu.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\"De asemenea, ar trebui să discutați cu CXX despre alte puncte sensibile, de \"\n\"exemplu:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\"Gestionarea erorilor se bazează pe excepțiile C++ (prezentate în slide-ul \"\n\"următor)\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"Indicatorii de funcție sunt greu de utilizat.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"CXX [suportul pentru `Result<T,E>`](https://cxx.rs/binding/result.html) se \"\n\"bazează pe excepțiile C++, așa că nu îl putem folosi în Chromium. \"\n\"Alternative:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"Partea `T` din `Result<T, E>` poate fi:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"Se returnează prin intermediul parametrilor de ieșire (de exemplu, prin \"\n\"`&mut T`). Acest lucru necesită ca `T` să poată fi transmis peste granița \"\n\"FFI - de exemplu, `T` trebuie să fie:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"Un tip primitiv (cum ar fi `u32` sau `usize`)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"Un tip suportat nativ de `cxx` (precum `UniquePtr<T>`) care are o valoare \"\n\"implicită adecvată pentru a fi utilizată în caz de eșec (spre deosebire de \"\n\"`Box<T>`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"Reținută pe partea de rugină și expusă prin referință. Acest lucru poate fi \"\n\"necesar atunci când `T` este un tip Rust, care nu poate fi trecut peste \"\n\"granița FFI și nu poate fi stocat în `UniquePtr<T>`.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"Partea `E` din `Result<T, E>` poate fi:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"Se returnează sub formă de boolean (de exemplu, `true` reprezintă succesul, \"\n\"iar `false` reprezintă eșecul)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"Păstrarea detaliilor privind erorile este teoretic posibilă, dar până în \"\n\"prezent nu a fost necesară în practică.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Gestionarea erorilor\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Generatorul de coduri QR este [un exemplu](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:components/qr_code_generator/\"\n\"qr_code_generator_ffi_glue.rs;l=13-18;\"\n\"drc=7bf1bb75b910ca430501b9c6a74c1d18a0223ecca) în care se utilizează un \"\n\"boolean pentru a comunica succesul vs. eșecul și în care rezultatul de \"\n\"succes poate fi transmis peste granița FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"Elevii pot fi curioși în legătură cu semantica ieșirii `out_qr_size`. \"\n\"Aceasta nu este dimensiunea vectorului, ci dimensiunea codului QR (și, \"\n\"trebuie să recunoaștem, este un pic redundantă - este rădăcina pătrată a \"\n\"dimensiunii vectorului).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"Ar putea fi util să subliniem importanța inițializării `out_qr_size` înainte \"\n\"de a apela la funcția Rust. Crearea unei referințe Rust care indică o \"\n\"memorie neinițializată are ca rezultat un comportament nedefinit (spre \"\n\"deosebire de C++, când numai actul de dereferențiere a unei astfel de \"\n\"memorii are ca rezultat UB).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can't be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Dacă elevii întreabă despre `Pin`, explicați-le de ce CXX are nevoie de el \"\n\"pentru referințele mutabile la datele C++: răspunsul este că datele C++ nu \"\n\"pot fi mutate ca și datele Rust, deoarece pot conține pointeri \"\n\"autoreferențiali.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Gestionarea erorilor\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Un prototip al unui decodor PNG ilustrează ce se poate face atunci când \"\n\"rezultatul pozitiv nu poate fi transmis peste granița FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// Aceasta returnează un echivalent FFI-friendly al `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// Legături C++ pentru tipul `crate::png::ResultOfPngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// Legături C++ pentru tipul `crate::png::PngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` și `ResultOfPngReader` sunt tipuri Rust --- obiectele din aceste \"\n\"tipuri nu pot trece granița FFI fără o indirecțiune a unui `Box<T>`. Nu \"\n\"putem avea un `out_parameter: &amp;mut PngReader`, deoarece CXX nu permite \"\n\"ca C++ să stocheze obiecte Rust prin valoare.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"Acest exemplu ilustrează faptul că, chiar dacă CXX nu acceptă generici \"\n\"arbitrari și nici șabloane, putem totuși să le trecem peste granița FFI prin \"\n\"specializarea / monomorfizarea manuală într-un tip non-generic. În exemplu, \"\n\"`ResultOfPngReader` este un tip ne-generic care se transmite în metodele \"\n\"corespunzătoare ale `Result<T, E>` (de exemplu, în `is_err`, `unwrap` și/sau \"\n\"`as_mut`).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"Using cxx in Chromium\"\nmsgstr \"Utilizarea CXX în Chromium\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"În Chromium, definim un `#[cxx::bridge] mod` independent pentru fiecare nod \"\n\"frunză în care dorim să folosim Rust. De obicei, veți avea unul pentru \"\n\"fiecare `rust_static_library`. Trebuie doar să adăugați\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # listă de fișiere care conțin #[cxx::bridge], nu toate fișierele sursă\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"la ținta `rust_static_library` existentă, alături de `crate_root` și \"\n\"`sources`.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\"Anteturile C++ vor fi generate într-o locație sensibilă, astfel încât puteți \"\n\"doar să\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"Veți găsi câteva funcții utilitare în `//base` pentru a converti la/de la \"\n\"tipurile Chromium C++ la tipurile CXX Rust --- de exemplu [`SpanToRustSlice`]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:base/containers/\"\n\"span_rust.h;l=21).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"Studenții se pot întreba --- de ce mai avem nevoie de `allow_unsafe = true`?\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"Răspunsul general este că nici un cod C/C++ nu este \\\"sigur\\\" după \"\n\"standardele Rust obișnuite. Apelarea din Rust către C/C++ poate face lucruri \"\n\"arbitrare în memorie și poate compromite siguranța propriilor aranjamente de \"\n\"date din Rust. Prezența a _prea multor_ cuvinte cheie `unsafe` în interop C/\"\n\"C++ poate dăuna raportului semnal-zgomot al unui astfel de cuvânt cheie și \"\n\"este [controversată](https://steveklabnik.com/writing/the-cxx-debate), dar, \"\n\"strict, aducerea oricărui cod străin într-un binar Rust poate cauza un \"\n\"comportament neașteptat din perspectiva Rust.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"Răspunsul restrâns se află în diagrama din partea de sus a [acestei pagini]\"\n\"(../interoperabilitate-cu-cpp.md) --- în spatele scenei, CXX generează \"\n\"funcții Rust `unsafe` și `extern \\\"C\\\"` exact așa cum am făcut manual în \"\n\"secțiunea anterioară.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Interoperabilitate cu C\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Part one\"\nmsgstr \"Prima parte\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"În fișierul Rust pe care l-ați creat anterior, adăugați un `#[cxx::bridge]` \"\n\"care specifică o singură funcție, care va fi apelată din C++, numită \"\n\"`hello_from_rust`, care nu primește parametri și nu returnează nicio valoare.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"Modificați funcția `hello_from_rust` anterioară pentru a elimina `extern \"\n\"\\\"C\\\"` și `#[no_mangle]`. Aceasta este acum doar o funcție Rust standard.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"Modificați ținta `gn` pentru a construi aceste legături.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"În codul dvs. C++, eliminați declarația forward a lui `hello_from_rust`. În \"\n\"schimb, includeți fișierul antet generat.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Build and run!\"\nmsgstr \"Construiește și rulează!\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Part two\"\nmsgstr \"Partea a doua\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"Este o idee bună să vă jucați puțin cu CXX. Vă ajută să vă gândiți la cât de \"\n\"flexibil este de fapt Rust în Chromium.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Câteva note:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"Apelarea înapoi în C++ din Rust. Veți avea nevoie de:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"Un fișier header suplimentar pe care îl puteți `include!` din `cxx::bridge`. \"\n\"Va trebui să vă declarați funcția C++ în acest nou fișier de antet.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"Un bloc `unsafe` pentru a apela o astfel de funcție sau, alternativ, \"\n\"specificați cuvântul cheie `unsafe` în `#[cxx::bridge]` [așa cum este \"\n\"descris aici](https://cxx.rs/extern-c++.html#functions-and-member-functions).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"Este posibil să aveți nevoie și de `#include \\\"third_party/rust/cxx/v1/crate/\"\n\"include/cxx.h\\\"``\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"Treceți un șir C++ din C++ în Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"Treceți o referință la un obiect C++ în Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Obțineți în mod intenționat semnăturile funcțiilor Rust nepotrivite din \"\n\"`#[cxx::bridge]` și obișnuiți-vă cu erorile pe care le vedeți.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Obțineți în mod intenționat semnăturile funcțiilor C++ nepotrivite din \"\n\"`#[cxx::bridge]` și obișnuiți-vă cu erorile pe care le vedeți.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"Treceți un `std::unique_ptr` de un anumit tip din C++ în Rust, astfel încât \"\n\"Rust să poată deține un obiect C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"Creați un obiect Rust și treceți-l în C++, astfel încât C++ să îl dețină. \"\n\"(Indicație: aveți nevoie de un `Box`).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"Declararea unor metode pentru un tip C++. Apelați-le din Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"Declararea unor metode pentru un tip Rust. Apelați-le din C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Part three\"\nmsgstr \"Partea a treia\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"Acum că ați înțeles punctele forte și limitările interoperării CXX, gândiți-\"\n\"vă la câteva cazuri de utilizare pentru Rust în Chromium în care interfața \"\n\"ar fi suficient de simplă. Schițați cum ați putea defini această interfață.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\"Arătați corespondența dintre [tipurile Rust și C++](https://cxx.rs/bindings.\"\n\"html):\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"Șablonul [`rust_static_library` gn](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"Câteva dintre întrebările pe care le puteți întâlni:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"Am o problemă în ceea ce privește inițializarea unei variabile de tip X cu \"\n\"tipul Y, unde X și Y sunt ambele tipuri de funcții. Acest lucru se datorează \"\n\"faptului că funcția dvs. C++ nu se potrivește cu declarația din `cxx::\"\n\"bridge`.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"Se pare că pot converti în mod liber referințele C++ în referințe Rust. Nu \"\n\"riscă asta UB? În cazul tipurilor _opaque_ din CXX, nu, deoarece acestea \"\n\"sunt de dimensiune zero. Pentru tipurile triviale din CXX, da, este \"\n\"_posibil_ să provoace UB, deși designul CXX face destul de dificilă crearea \"\n\"unui astfel de exemplu.\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Bibliotecile Rust se numesc \\\"crates\\\" și se găsesc la [crates.io](https://\"\n\"crates.io). Este _foarte ușor_ pentru crates Rust să depindă unele de \"\n\"altele. Așa că o fac!\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Proprietate\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"bibliotecă:\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Ecosistemul Rust\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"\"\n\"Veți avea nevoie de un [sursele AOSP](https://source.android.com/docs/setup/\"\n\"download/downloading). Efectuați o descărcare a [resurselor cursului]\"\n\"(https://github.com/google/comprehensive-rust) pe aceeași mașină și mutați \"\n\"directorul `src/android/` în rădăcina surselor AOSP. Acest lucru va asigura \"\n\"că sistemul de compilare Android vede fișierele `Android.bp` din `src/\"\n\"android/`.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"Multe\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Puteți utiliza următorul `Cargo.toml`:\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Typical library size\"\nmsgstr \"Dimensiunea tipică a bibliotecii\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Large-ish\"\nmsgstr \"Mare-ish\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"Mic\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Transitive dependencies\"\nmsgstr \"Dependențe tranzitive\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"Iată câteva link-uri utile pentru a obține ajutor pe parcurs\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"Pentru un inginer Chromium, acest lucru are avantaje și dezavantaje:\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"Toate craterele folosesc un sistem comun de construire, astfel încât să \"\n\"putem automatiza includerea lor în Chromium...\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"... dar, de obicei, crates are dependențe tranzitive, așa că va trebui \"\n\"probabil să introduceți mai multe biblioteci.\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"We'll discuss:\"\nmsgstr \"Vom discuta:\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"Cum se pune o casetă în arborele de cod sursă Chromium\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"Cum să faci regulile de construcție `gn` pentru el\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"Cum se auditează codul sursă pentru a asigura o siguranță suficientă.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\n#, fuzzy\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"Configurarea fișierului `Cargo.toml` pentru a adăuga lăzi\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\n#, fuzzy\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium are un singur set de dependențe directe de crate gestionate la \"\n\"nivel central. Acestea sunt gestionate prin intermediul unui singur [`Cargo.\"\n\"toml`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/\"\n\"rust/chromium_crates_io/Cargo.toml):\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependențe]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# multe altele...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\n#, fuzzy\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"Ca și în cazul oricărui alt `Cargo.toml`, puteți specifica [mai multe \"\n\"detalii despre dependențe](https://doc.rust-lang.org/cargo/reference/\"\n\"specifying-dependencies.html) --- cel mai frecvent, veți dori să specificați \"\n\"`features` pe care doriți să le activați în crate.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\n#, fuzzy\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"Atunci când adăugați un crate la Chromium, va trebui adesea să furnizați \"\n\"câteva informații suplimentare într-un fișier suplimentar, `gnrt_config.\"\n\"toml`, pe care îl vom întâlni în continuare.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#, fuzzy\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"Alături de `Cargo.toml` se află [`gnrt_config.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/\"\n\"gnrt_config.toml). Acesta conține extensii specifice Chromium pentru \"\n\"gestionarea crate-urilor.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#, fuzzy\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"Dacă adăugați o ladă nouă, trebuie să specificați cel puțin `group`. Acesta \"\n\"este unul dintre următoarele:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"For instance,\"\nmsgstr \"De exemplu,\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#, fuzzy\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"În funcție de dispunerea codului sursă al crate-ului, este posibil să fie \"\n\"nevoie să folosiți acest fișier pentru a specifica unde pot fi găsite \"\n\"fișierul (fișierele) `LICENSE`.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#, fuzzy\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"Mai târziu, vom vedea alte lucruri pe care va trebui să le configurați în \"\n\"acest fișier pentru a rezolva problemele.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"Un instrument numit `gnrt` știe cum să descarce crates și cum să genereze \"\n\"regulile `BUILD.gn`.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"Pentru a începe, descărcați caseta pe care o doriți, astfel:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"Deși instrumentul `gnrt` face parte din codul sursă Chromium, prin rularea \"\n\"acestei comenzi veți descărca și rula dependențele sale de pe `crates.io`. \"\n\"Consultați [secțiunea anterioară](../cargo.md) în care se discută această \"\n\"decizie de securitate.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"This `vendor` command may download:\"\nmsgstr \"Această comandă `vendor` poate descărca:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"Lăzi (crates) utile\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"Dependențe directe și tranzitive\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"Versiuni noi ale altor crates, după cum este necesar pentru ca `cargo` să \"\n\"rezolve setul complet de crates cerut de Chromium.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium menține patch-uri pentru unele crates, păstrate în `//third_party/\"\n\"rust/chromium_crates_io/patches`. Acestea vor fi reaplicate în mod automat, \"\n\"dar dacă patch-urile nu reușesc este posibil să fie nevoie să luați măsuri \"\n\"manuale.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"După ce ați descărcat crate, generați fișierele `BUILD.gn` astfel:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"Acum rulați `git status`. Ar trebui să găsiți:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"Cel puțin un nou cod sursă de crate în `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"Cel puțin un nou `BUILD.gn` în `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"Un `README.chromium` adecvat\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"A se vedea [Rust Reference](https://doc.rust-lang.org/reference/type-layout.\"\n\"html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\"Uitați-vă cu atenție, în special la lucrurile generate în `third_party/rust`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"Vorbiți puțin despre semver --- și în special despre modul în care, în \"\n\"Chromium, permite mai multe versiuni incompatibile ale unei cutii, ceea ce \"\n\"este descurajat, dar uneori necesar în ecosistemul Cargo.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"Dacă nu reușiți să construiți, este posibil să fie din cauza unui `build.\"\n\"rs`: programe care fac lucruri arbitrare în momentul construirii. Acest \"\n\"lucru este în mod fundamental în contradicție cu proiectarea `gn` și \"\n\"`ninja`, care vizează reguli de construire statice, deterministe, pentru a \"\n\"maximiza paralelismul și repetabilitatea compilărilor.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"Unele acțiuni `build.rs` sunt acceptate în mod automat; altele necesită o \"\n\"acțiune:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"build script effect\"\nmsgstr \"efect de script de construcție\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Supported by our gn templates\"\nmsgstr \"Sprijinit de șabloanele noastre gn\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Work required by you\"\nmsgstr \"Lucrări solicitate de dumneavoastră\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\"Verificarea versiunii rustc pentru a configura funcțiile de activare și \"\n\"dezactivare\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"Da\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"Nici unul\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\"Verificarea platformei sau a unității centrale de procesare pentru a \"\n\"configura funcțiile activate și dezactivate\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"Produse generice\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"Da - specificați în `gnrt_config.toml`\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Building C/C++\"\nmsgstr \"Construirea C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"Nu\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Patch around it\"\nmsgstr \"Patch în jurul ei\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Arbitrary other actions\"\nmsgstr \"Alte acțiuni arbitrare\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"Din fericire, cele mai multe cratere nu conțin un script de construcție și, \"\n\"din fericire, majoritatea scripturilor de construcție efectuează doar \"\n\"primele două acțiuni.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\n#, fuzzy\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"Dacă `ninja` se plânge că lipsesc fișiere, verificați `build.rs` pentru a \"\n\"vedea dacă scrie fișiere de cod sursă.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\n#, fuzzy\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"În acest caz, modificați [`gnrt_config_config.toml`](../configuring-gnrt-\"\n\"config-toml.md) pentru a adăuga `build-script-outputs` la crate. Dacă \"\n\"aceasta este o dependență tranzitivă, adică una de care codul Chromium nu ar \"\n\"trebui să depindă direct, adăugați și `allow-first-party-usage=false`. \"\n\"Există deja câteva exemple în acel fișier:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\n#, fuzzy\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"Acum rulați din nou [`gnrt.py -- gen`](../generating-gn-gn-build-rules.md) \"\n\"pentru a regenera fișierele `BUILD.gn` pentru a informa ninja că acest \"\n\"fișier de ieșire este o intrare pentru etapele ulterioare de construire.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\n#, fuzzy\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"Unele crates utilizează crate-ul [`cc`](https://crates.io/crates/cc) pentru \"\n\"a construi și lega bibliotecile C/C++. Alte crates analizează C/C++ folosind \"\n\"[`bindgen`](https://crates.io/crates/bindgen) în scripturile lor de \"\n\"compilare. Aceste acțiuni nu pot fi suportate în contextul Chromium --- \"\n\"sistemul nostru de compilare gn, ninja și LLVM este foarte specific în \"\n\"exprimarea relațiilor dintre acțiunile de compilare.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\n#, fuzzy\nmsgid \"So, your options are:\"\nmsgstr \"Deci, opțiunile tale sunt:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\n#, fuzzy\nmsgid \"Avoid these crates\"\nmsgstr \"Evitați aceste lăzi\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\n#, fuzzy\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"Aplicați un plasture pe ladă.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\n#, fuzzy\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"Patch-urile ar trebui păstrate în `third_party/rust/chromium_crates_io/\"\n\"patches/<crate>` - a se vedea, de exemplu, [patches against the `cxx` crate]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - și vor fi aplicate automat de către \"\n\"`gnrt` de fiecare dată când actualizează crate-ul.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"Odată ce ați adăugat o casetă terță parte și ați generat reguli de \"\n\"construcție, este simplu să depindeți de o casetă. Găsiți ținta \"\n\"`rust_static_library` și adăugați un `dep` pe ținta `:lib` în cadrul crate-\"\n\"ului dumneavoastră.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"Specifically,\"\nmsgstr \"Specific sistemului de operare\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+ +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | nume ladă | \\\"/v\\\" | versiunea majoră a semver | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+ +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"Auditul caselor terților\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"Adăugarea de noi biblioteci este supusă [politicilor] standard ale Chromium \"\n\"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), dar, bineînțeles, este supusă și unei revizuiri de \"\n\"securitate. Deoarece este posibil să aduceți nu doar o singură crăiasă, ci \"\n\"și dependențe tranzitive, este posibil să existe o mulțime de cod de \"\n\"revizuit. Pe de altă parte, codul Rust sigur poate avea efecte secundare \"\n\"negative limitate. Cum ar trebui să îl revizuiți?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"În timp, Chromium își propune să treacă la un proces bazat pe [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"Între timp, pentru fiecare nouă ladă adăugată, verificăm următoarele:\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"Înțelegeți de ce este folosită fiecare ladă. Care este relația dintre lăzi? \"\n\"Dacă sistemul de compilare pentru fiecare crate conține un `build.rs` sau \"\n\"macroproceduri procedurale, încercați să aflați la ce folosesc. Sunt \"\n\"compatibile cu modul în care Chromium este construit în mod normal?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"Verificați dacă fiecare ladă pare a fi rezonabil de bine întreținută\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"Folosiți `cd third-party/rust/chromium_crates_io; cargo audit` pentru a \"\n\"verifica vulnerabilitățile cunoscute (mai întâi va trebui să `cargo install \"\n\"cargo-audit`, care, în mod ironic, implică descărcarea multor dependențe de \"\n\"pe internet[2](../cargo.md)))\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"Asigurați-vă că orice cod `unsafe` este suficient de bun pentru [Rule of Two]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/security/rule-\"\n\"of-2.md#unsafe-code-in-safe-languages)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"Verificați dacă se utilizează API-urile `fs` sau `net`\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"Citiți tot codul la un nivel suficient pentru a căuta orice lucru care nu \"\n\"este la locul lui și care ar fi putut fi introdus în mod rău intenționat. \"\n\"(În mod realist, nu puteți urmări 100% perfecțiune aici: de multe ori este \"\n\"prea mult cod)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"Acestea sunt doar linii directoare --- lucrați cu recenzenții de la \"\n\"`security@chromium.org` pentru a găsi modul corect de a deveni încrezător în \"\n\"ladă.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"Verificarea Crates în codul sursă Chromium\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` ar trebui să arate:\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"Cod de crăiță în `//third_party/rust/chromium_crates_io`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"Metadate (`BUILD.gn` și `README.chromium`) în `//third_party/rust/<crate>/\"\n\"<version>`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\"Vă rugăm să adăugați, de asemenea, un fișier `OWNERS` în această din urmă \"\n\"locație.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"Ar trebui să transferați toate acestea, împreună cu modificările `Cargo.\"\n\"toml` și `gnrt_config.toml`, în repo-ul Chromium.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**Important**: trebuie să folosiți `git add -f` pentru că altfel fișierele `.\"\n\"gitignore` pot duce la omiterea unor fișiere.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"Pe măsură ce faceți acest lucru, s-ar putea să constatați că verificările \"\n\"înainte de trimitere eșuează din cauza limbajului neincluziv. Acest lucru se \"\n\"datorează faptului că datele din Rust crate tind să includă nume de ramuri \"\n\"git, iar multe proiecte încă folosesc terminologia neinclusivă acolo. \"\n\"Așadar, este posibil să fie nevoie să rulați:\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\n#, fuzzy\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"În calitate de PROPRIETAR al oricărei dependențe de Chromium de la terți, \"\n\"trebuie [să o mențineți la zi cu toate corecturile de securitate] (https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#add-owners). Se speră că în curând vom automatiza acest lucru pentru Rust \"\n\"crates, dar, deocamdată, este în continuare responsabilitatea dvs. la fel ca \"\n\"pentru orice altă dependență terță parte.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"Adăugați [uwuify](https://crates.io/crates/uwuify) la Chromium, dezactivând \"\n\"[caracteristici implicite](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Presupuneți că crate-ul va fi utilizat \"\n\"în livrarea Chromium, dar nu va fi folosit pentru a gestiona intrările \"\n\"nesigure.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(În următorul exercițiu vom folosi uwuify din Chromium, dar nu ezitați să \"\n\"treceți peste și să faceți asta acum dacă doriți. Sau, puteți crea o nouă \"\n\"țintă [`rust_executable`](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) care utilizează `uwuify`).\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"Elevii vor trebui să descarce o mulțime de dependențe tranzitive.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"The total crates needed are:\"\nmsgstr \"Numărul total de lăzi necesare este:\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"Constant\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`,\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`,\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`,\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`,\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`,\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`, și\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"Dacă elevii descarcă chiar mai mult decât atât, probabil că au uitat să \"\n\"dezactiveze funcțiile implicite.\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"Mulțumim lui [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) pentru \"\n\"această ladă!\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"Reunind totul - Exercițiu\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"În acest exercițiu, veți adăuga o funcție Chromium complet nouă, reunind tot \"\n\"ceea ce ați învățat deja.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"The Brief from Product Management\"\nmsgstr \"Informarea din partea managementului de produs\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"A fost descoperită o comunitate de zâne care trăiește într-o pădure \"\n\"tropicală izolată. Este important să le livrăm Chromium pentru Pixies cât \"\n\"mai curând posibil.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"Cerința este de a traduce toate șirurile interfeței de utilizare a Chromium \"\n\"în limbajul Pixie.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"Nu avem timp să așteptăm traduceri adecvate, dar din fericire, limba pixie \"\n\"este foarte apropiată de limba engleză și se pare că există o casetă Rust \"\n\"care face traducerea.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"De fapt, ați [importat deja acea ladă în exercițiul anterior](https://crates.\"\n\"io/crates/uwuify).\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"(Evident, traducerile reale ale lui Chrome necesită o atenție și o diligență \"\n\"incredibile. Nu expediați asta!)\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"Pași\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"Modifică `ResourceBundle::MaybeMangleLocalizedString` astfel încât să \"\n\"uwuifice toate șirurile înainte de afișare. În această versiune specială a \"\n\"Chromium, ar trebui să facă întotdeauna acest lucru indiferent de setarea \"\n\"lui `mangle_localized_strings_`.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"Dacă ai făcut totul bine în toate aceste exerciții, felicitări, ar trebui să \"\n\"creezi Chrome pentru pixeli!\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 vs UTF8. Studenții ar trebui să fie conștienți de faptul că șirurile \"\n\"de caractere Rust sunt întotdeauna UTF8 și probabil vor decide că este mai \"\n\"bine să facă conversia pe partea C++ folosind `base::UTF16ToUTF8` și invers.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"Dacă studenții decid să facă conversia pe partea Rust, ei vor trebui să ia \"\n\"în considerare [`String::from_utf16`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#method.from_utf16), să ia în considerare gestionarea \"\n\"erorilor și să ia în considerare care dintre tipurile acceptate de [CXX pot \"\n\"transfera o mulțime de u16s](https://cxx.rs/binding/slice.html).\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Elevii pot proiecta granița C++/Rust în mai multe moduri diferite, de \"\n\"exemplu, preluarea și returnarea șirurilor de caractere prin valoare sau \"\n\"preluarea unei referințe mutabile la un șir de caractere. În cazul în care \"\n\"se utilizează o referință mutabilă, CXX îi va spune probabil elevului că \"\n\"trebuie să utilizeze [`Pin`](https://doc.rust-lang.org/std/pin/). Este \"\n\"posibil să fie necesar să explicați ce face `Pin` și apoi să explicați de ce \"\n\"CXX are nevoie de el pentru referințele mutabile la datele C++: răspunsul \"\n\"este că datele C++ nu pot fi mutate ca datele Rust, deoarece pot conține \"\n\"pointeri autoreferențiali.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"Ținta C++ care conține `ResourceBundle::MaybeMangleLocalizedString` va \"\n\"trebui să depindă de o țintă `rust_static_library`. Probabil că studentul a \"\n\"făcut deja acest lucru.\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"Ținta `rust_static_library` va trebui să depindă de `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\n\n#: src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"Soluțiile la exercițiile cu Chromium se găsesc în [această serie de CL]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Bine ați venit la Bare Metal Rust\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Acesta este un curs independent de o zi despre Rust, care se adresează \"\n\"persoanelor care sunt familiarizate cu elementele de bază ale Rust (poate în \"\n\"urma absolvirii cursului Comprehensive Rust) și care, în mod ideal, au și o \"\n\"anumită experiență în programarea bare-metal într-un alt limbaj, cum ar fi C.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Astăzi vom vorbi despre Rust \\\"bare-metal\\\": rularea codului Rust fără un \"\n\"sistem de operare sub noi. Acest subiect va fi împărțit în mai multe părți:\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"Ce este `no_std` Rust?\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Scrierea de firmware pentru microcontrolere.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"Scrierea codului bootloader / kernel pentru procesoarele de aplicații.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Câteva lădițe utile pentru dezvoltarea Rust pe suport metalic gol.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"Pentru partea de microcontroler a cursului vom folosi [BBC micro:bit]\"\n\"(https://microbit.org/) v2 ca exemplu. Este o [placă de dezvoltare](https://\"\n\"tech.microbit.org/hardware/) bazată pe microcontrolerul Nordic nRF51822 cu \"\n\"câteva LED-uri și butoane, un accelerometru și o busolă conectate I2C și un \"\n\"depanator SWD la bord.\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Pentru a începe, instalați câteva instrumente de care vom avea nevoie mai \"\n\"târziu. Pe gLinux sau Debian:\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"Și oferiți utilizatorilor din grupul `plugdev` acces la programatorul micro:\"\n\"bit:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"On MacOS:\"\nmsgstr \"Pe MacOS:\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`std`\"\nmsgstr \"no_std\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slices, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Opțiune`, `Rezultat`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` și toate funcțiile obișnuite legate de pointer\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` și `async`/`await`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Duration`\"\nmsgstr \"`Durată`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Error`\"\nmsgstr \"[Gestionarea erorilor](../error-handling.md) (45 minute)\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` și restul de `fs`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` și restul de `io`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` și restul de `thread`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` depinde de RNG.\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` reexportă conținutul atât al lui `core` cât și al lui `alloc`.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Un program minimal `no_std`\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"Aceasta va compila un binar gol.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\"`std` oferă un gestionar de panică; în lipsa acestuia, trebuie să ne \"\n\"furnizăm propriul gestionar.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"Acesta poate fi furnizat și de o altă ladă, cum ar fi `panic-halt`.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"În funcție de țintă, este posibil să fie nevoie să compilați cu `panic = \"\n\"\\\"abort\\\"` pentru a evita o eroare cu privire la `eh_personality`.\"\n\n#: src/bare-metal/minimal.md\n#, fuzzy\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"Rețineți că nu există niciun `main` sau alt punct de intrare; depinde de \"\n\"dumneavoastră să vă definiți propriul punct de intrare. Acest lucru va \"\n\"implica, de obicei, un script de linker și ceva cod de asamblare pentru a \"\n\"pregăti lucrurile pentru a permite rularea codului Rust.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Pentru a utiliza `alloc` trebuie să implementați un [alocator global (heap)]\"\n\"(https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece `HEAP` este folosit doar aici și `entry` este apelat doar \"\n\"o singură dată.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Dați alocatorului o anumită memorie de alocat.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Acum putem face lucruri care necesită alocare de heap.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"Șir\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` este un crate terț care implementează un alocator \"\n\"de bază pentru sistemul de prieteni. Sunt disponibile și alte crates, sau \"\n\"puteți să vă scrieți propriul alocator sau să vă conectați la alocatorul \"\n\"existent.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"Parametrul const al `LockedHeap` este ordinea maximă a alocatorului; adică, \"\n\"în acest caz, acesta poate aloca regiuni de până la 2\\\\*\\\\*32 octeți.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"Dacă orice crate din arborele de dependență depinde de `alloc`, atunci \"\n\"trebuie să aveți exact un alocator global definit în binarul dumneavoastră. \"\n\"De obicei, acest lucru se face în crate-ul binar de nivel superior.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"`extern crate panic_halt as _` este necesar pentru a ne asigura că crate-ul \"\n\"`panic_halt` este legat, astfel încât să obținem gestionarul de panică al \"\n\"acestuia.\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\"Acest exemplu va fi construit, dar nu va fi executat, deoarece nu are un \"\n\"punct de intrare.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"Crate `cortex_m_rt` oferă (printre altele) un gestionar de resetare pentru \"\n\"microcontrolerele Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"În continuare, vom examina modul de accesare a perifericelor, cu niveluri de \"\n\"abstractizare din ce în ce mai mari.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"Macroul `cortex_m_rt::entry` necesită ca funcția să aibă tipul `fn() -> !`, \"\n\"deoarece întoarcerea la gestionarul de resetare nu are sens.\"\n\n#: src/bare-metal/microcontrollers.md\n#, fuzzy\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Rulați exemplul cu `cargo embed --bin minimal`\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"Majoritatea microcontrolerelor accesează perifericele prin intermediul IO \"\n\"mapate în memorie. Să încercăm să aprindem un LED pe micro:bit-ul nostru:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// Adresa periferică a portului GPIO 0\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// Decalajele perifericelor GPIO\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// Câmpurile PIN_CNF\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configurați pinii GPIO 0 21 și 28 ca ieșiri push-pull.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece indicatorii sunt la registrele de control periferic \"\n\"valide, și\\n\"\n\"    // nu există alias-uri.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\"// Setați pinul 28 la nivel scăzut și pinul 21 la nivel ridicat pentru a \"\n\"aprinde LED-ul.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"Pinul 21 al GPIO 0 este conectat la prima coloană a matricei de LED-uri, iar \"\n\"pinul 28 la primul rând.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Run the example with:\"\nmsgstr \"Rulați exemplul cu:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Lăzi de acces periferic\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generează învelișuri Rust în \"\n\"mare parte sigure pentru perifericele cu memorie mapă din fișierele [CMSIS-\"\n\"SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html).\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"Fișierele SVD (System View Description) sunt fișiere XML furnizate de obicei \"\n\"de furnizorii de siliciu care descriu harta de memorie a dispozitivului.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Acestea sunt organizate în funcție de periferic, registru, câmp și valoare, \"\n\"cu nume, descrieri, adrese etc.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"Fișierele SVD sunt deseori eronate și incomplete, așa că există diverse \"\n\"proiecte care corectează greșelile, adaugă detaliile lipsă și publică \"\n\"lădițele generate.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` furnizează, printre altele, tabelul vectorial.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\n#, fuzzy\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Dacă instalați `cargo install cargo-binutils` atunci puteți rula `cargo \"\n\"objdump --bin pac -- -d --no-show-raw-insn` pentru a vedea binarul rezultat.\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"HAL crates\"\nmsgstr \"Lăzi (crates) HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) pentru multe microcontrolere oferă învelișuri în \"\n\"jurul diferitelor periferice. Acestea implementează în general trăsături din \"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Creați un înveliș HAL pentru portul GPIO 0.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\"`set_low` și `set_high` sunt metode ale trăsăturii `OutputPin` \"\n\"`embedded_hal`.\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"HAL crates există pentru multe dispozitive Cortex-M și RISC-V, inclusiv \"\n\"pentru diverse microcontrolere STM32, GD32, nRF, NXP, MSP430, AVR și PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"Crates cu suport pentru plăci\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Lăzile de susținere a plăcilor oferă un nivel suplimentar de împachetare \"\n\"pentru o anumită placă, pentru mai multă comoditate.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"În acest caz, suportul pentru plăci oferă doar nume mai utile și o mică \"\n\"inițializare.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"De asemenea, pachetul poate include drivere pentru unele dispozitive de la \"\n\"bord în afara microcontrolerului propriu-zis.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` include un driver simplu pentru matricea de LED-uri.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"The type state pattern\"\nmsgstr \"Modelul de stare de tip\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Eroare, mutat.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Eroare, mutat.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"Pinii nu implementează `Copy` sau `Clone`, astfel încât poate exista doar o \"\n\"singură instanță a fiecăruia. Odată ce un pin este mutat din structura \"\n\"portului, nimeni altcineva nu îl poate lua.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can't keep use the old instance afterwards.\"\nmsgstr \"\"\n\"Schimbarea configurației unui pin consumă vechea instanță de pin, astfel \"\n\"încât nu mai puteți continua să folosiți vechea instanță după aceea.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"Tipul unei valori indică starea în care se află aceasta: de exemplu, în \"\n\"acest caz, starea de configurare a unui pin GPIO. Acest lucru codifică \"\n\"mașina de stare în sistemul de tipuri și garantează că nu încercați să \"\n\"utilizați un pin într-un anumit mod fără să-l configurați mai întâi în mod \"\n\"corespunzător. Tranzițiile de stare ilegale sunt detectate în momentul \"\n\"compilării.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Puteți apela `is_high` pe un pin de intrare și `set_high` pe un pin de \"\n\"ieșire, dar nu și invers.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\n#, fuzzy\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"Multe lăzi HAL urmează acest model.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"Crăiasa [`embedded-hal`](https://crates.io/crates/embedded-hal) oferă o \"\n\"serie de caracteristici care acoperă perifericele comune ale \"\n\"microcontrolerului.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"PWM\"\nmsgstr \"PWM\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"Delay timers\"\nmsgstr \"Temporizatoare cu întârziere\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"Busuri și dispozitive I2C și SPI\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\"Trăsături similare pentru fluxurile de octeți (de exemplu, UART), \"\n\"magistralele CAN și RNG-uri și împărțite în [`embedded-io`](https://crates.\"\n\"io/crates/embedded-io), [`embedded-can`](https://crates.io/crates/embedded-\"\n\"can) și, respectiv, [`rand_core`](https://crates.io/crates/rand_core).\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"Alte crates implementează apoi [drivere](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) în funcție de aceste caracteristici, de \"\n\"exemplu, un driver pentru accelerometru poate avea nevoie de o implementare \"\n\"a bus-ului I2C sau SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\"Trăsăturile se referă la utilizarea perifericelor, dar nu la inițializarea \"\n\"sau configurarea acestora, deoarece inițializarea și configurarea sunt de \"\n\"obicei foarte specifice platformei.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Există implementări pentru multe microcontrolere, precum și pentru alte \"\n\"platforme, cum ar fi Linux pe Raspberry Pi.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"Crăiasa [`embedded-hal`](https://crates.io/crates/embedded-hal) oferă o \"\n\"serie de caracteristici care acoperă perifericele comune ale \"\n\"microcontrolerului.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\n#, fuzzy\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"Crăiasa [`embedded-hal`](https://crates.io/crates/embedded-hal) oferă o \"\n\"serie de caracteristici care acoperă perifericele comune ale \"\n\"microcontrolerului.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) este un set de instrumente utile pentru \"\n\"depanarea embedded, precum OpenOCD, dar mai bine integrat.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\"SWD (Serial Wire Debug) și JTAG prin sonde CMSIS-DAP, ST-Link și J-Link\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB stub și serverul Microsoft DAP (Debug Adapter Protocol)\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Integrarea Cargo\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed` este o subcomandă cargo pentru a construi și afișa binare, a \"\n\"înregistra ieșirea RTT (Real Time Transfers) și a conecta GDB. Este \"\n\"configurată de un fișier `Embed.toml` din directorul proiectului \"\n\"dumneavoastră.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) este \"\n\"un protocol standard Arm prin USB pentru ca un depanator in-circuit să \"\n\"acceseze portul de acces la depanare CoreSight al diferitelor procesoare Arm \"\n\"Cortex. Este ceea ce folosește depanatorul de bord de pe BBC micro:bit.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link este o gamă de depanatoare în circuit de la ST Microelectronics, iar \"\n\"J-Link este o gamă de la SEGGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"Portul de acces pentru depanare este, de obicei, fie o interfață JTAG cu 5 \"\n\"pini, fie o interfață de depanare prin cablu serial cu 2 pini.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs este o bibliotecă pe care o puteți integra în propriile \"\n\"instrumente, dacă doriți.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-\"\n\"protocol/) permite VSCode și altor IDE-uri să depaneze codul care rulează pe \"\n\"orice microcontroler acceptat.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed este un binar construit folosind biblioteca probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) este un mecanism de transfer de date între gazda \"\n\"de depanare și țintă prin intermediul unui număr de ringbufferi.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"Într-un terminal, sub `src/bare-metal/microcontrollers/examples/`:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"Într-un alt terminal din același director:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"On gLinux or Debian:\"\nmsgstr \"Pe gLinux sau Debian:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"In GDB, try running:\"\nmsgstr \"În GDB, încercați să rulați:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Other projects\"\nmsgstr \"Alte proiecte\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Concurrența în timp real bazată pe întreruperi\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\"Gestionarea resurselor partajate, trecerea mesajelor, programarea \"\n\"sarcinilor, coada de timp\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Ambasada](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"executori `async` cu priorități, cronometre, rețea, USB\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\"RTOS axat pe securitate, cu programare preemptivă și suport pentru unitatea \"\n\"de protecție a memoriei\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"Microkernel RTOS de la Oxide Computer Company cu protecție de memorie, \"\n\"drivere neprivilegiate, IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[Legături pentru FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Unele platforme au implementări `std`, de exemplu [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC poate fi considerat fie un RTOS, fie un cadru de concurență.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"Nu include niciun HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Acesta utilizează Cortex-M NVIC (Nested Virtual Interrupt Controller) pentru \"\n\"programare, în loc de un kernel propriu-zis.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"Cortex-M only.\"\nmsgstr \"Numai Cortex-M.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"Google folosește TockOS pe microcontrolerul Haven pentru cheile de \"\n\"securitate Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS este scris în mare parte în C, dar există legături Rust pentru \"\n\"scrierea de aplicații.\"\n\n#: src/exercises/bare-metal/morning.md\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Vom citi direcția de la o busolă I2C și vom înregistra citirile pe un port \"\n\"serial.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"După ce ați studiat exercițiile, puteți consulta [soluțile](solutions-\"\n\"morning.md) furnizate.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Vom citi direcția de la o busolă I2C și vom înregistra citirile pe un port \"\n\"serial. Dacă aveți timp, încercați să o afișați cumva și pe LED-uri sau să \"\n\"folosiți cumva butoanele.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"Hints:\"\nmsgstr \"Sugestii:\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Consultați documentația pentru pachetele [`lsm303agr`](https://docs.rs/\"\n\"lsm303agr/latest/lsm303agr/) și [`microbit-v2`](https://docs.rs/microbit-v2/\"\n\"latest/microbit/), precum și pentru [micro:bit hardware](https://tech.\"\n\"microbit.org/hardware/).\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\"Unitatea de măsurare inerțială LSM303AGR este conectată la magistrala \"\n\"internă I2C.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI este un alt nume pentru I2C, astfel încât perifericul master I2C se \"\n\"numește TWIM.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"Driverul LSM303AGR are nevoie de ceva care să implementeze trăsătura \"\n\"`embedded_hal::blocking::i2c::WriteRead`. Structura [`microbit::hal::Twim`]\"\n\"(https://docs.rs/microbit-v2/latest/microbit/hal/struct.Twim.html) \"\n\"implementează acest lucru.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"Aveți o structură [`microbit::Board`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/struct.Board.html) cu câmpuri pentru diverși pini și periferice.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"Dacă doriți, puteți consulta și [nRF52833 datasheet](https://infocenter.\"\n\"nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf), dar nu ar trebui să fie necesar \"\n\"pentru acest exercițiu.\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Descărcați [șablonul de exerciții] (../../comprehensive-rust-exercises.zip) \"\n\"și căutați în directorul `compass` următoarele fișiere.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\"_.cargo/config.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Vedeți ieșirea serială pe Linux cu:\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\"Sau, pe Mac OS, ceva de genul (numele dispozitivului poate fi ușor diferit):\"\n\n#: src/exercises/bare-metal/compass.md\n#, fuzzy\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Folosiți Ctrl+A Ctrl+Q pentru a ieși din picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Exercițiu de dimineață Bare Metal Rust\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([back to exercise](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configurați portul serial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Utilizați temporizatorul sistemului ca furnizor de întârzieri.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Configurați controlerul I2C și unitatea de măsurare inerțială.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Configurarea IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Configurați afișajul și cronometrul.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Gata.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Citiți datele busolei și înregistrați-le pe portul serial.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"Partiții: `&[T]`\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// Dacă este apăsat butonul A, se trece la modul următor și clipesc pentru \"\n\"scurt timp toate LED-urile\\n\"\n\"        // pornit.\\n\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"Application processors\"\nmsgstr \"Procesatori de aplicații\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Până acum am vorbit despre microcontrolere, cum ar fi seria Arm Cortex-M. \"\n\"Acum să încercăm să scriem ceva pentru Cortex-A. Pentru simplitate, vom \"\n\"lucra doar cu placa aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/\"\n\"system/arm/virt.html) a lui QEMU.\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"În linii mari, microcontrolerele nu au un MMU sau mai multe niveluri de \"\n\"privilegii (niveluri de excepție la procesoarele Arm, inele la x86), în timp \"\n\"ce procesoarele de aplicații au.\"\n\n#: src/bare-metal/aps.md\n#, fuzzy\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU suportă emularea mai multor mașini sau modele de plăci diferite pentru \"\n\"fiecare arhitectură. Placa \\\"virt\\\" nu corespunde unui anumit hardware real, \"\n\"ci este concepută exclusiv pentru mașini virtuale.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\"Înainte de a începe să rulăm codul Rust, trebuie să facem o anumită \"\n\"inițializare.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"intrare:\\n\"\n\"    /*\\n\"\n\"     * Încărcați și aplicați configurația de gestionare a memoriei, \"\n\"pregătită pentru a activa MMU și\\n\"\n\"     * memoria cache.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copiază intervalul PA acceptat în TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Asigură-te că tot ceea ce a precedat acest punct s-a finalizat, apoi \"\n\"invalidează orice\\n\"\n\"     * toate intrările TLB locale potențial vechi înainte de a începe să fie \"\n\"utilizate.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configurați sctlr_el1 pentru a activa MMU și memoria cache și nu \"\n\"continuați până când acest lucru\\n\"\n\"     * nu este finalizată.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Dezactivează captarea accesului în virgulă mobilă în EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Elimină secțiunea bss. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0: cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1: /* Pregătește stiva. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Setează vectorul de excepție. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Apel în codul Rust. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Buclă veșnică în așteptarea întreruperilor. */\\n\"\n\"2: wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"Aceasta este aceeași ca și în C: inițializarea stării procesorului, anularea \"\n\"BSS și stabilirea pointerului de stivă.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"BSS (simbolul de pornire al blocului, din motive istorice) este partea din \"\n\"fișierul obiect care conține variabilele alocate static care sunt \"\n\"inițializate la zero. Acestea sunt omise din imagine, pentru a se evita \"\n\"risipa de spațiu cu zerouri. Compilatorul pornește de la premisa că \"\n\"încărcătorul se va ocupa de punerea lor la zero.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"Este posibil ca BSS să fie deja zero, în funcție de modul în care memoria \"\n\"este inițializată și imaginea este încărcată, dar trebuie să îl punem la \"\n\"zero pentru a fi siguri.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"Trebuie să activăm MMU și memoria cache înainte de a citi sau scrie în \"\n\"memorie. Dacă nu o facem:\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"Accesările nealiniate vor fi defectuoase. Noi construim codul Rust pentru \"\n\"ținta `aarch64-unknown-none` care setează `+strict-align` pentru a preveni \"\n\"compilatorul să genereze accese nealiniate, deci ar trebui să fie în regulă \"\n\"în acest caz, dar nu este neapărat cazul în general.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"Dacă ar fi rulat într-o mașină virtuală, acest lucru poate duce la probleme \"\n\"de coerență a memoriei cache. Problema constă în faptul că mașina virtuală \"\n\"accesează memoria direct, cu memoria cache dezactivată, în timp ce gazda are \"\n\"alias-uri care pot fi stocate în memoria cache pentru aceeași memorie. Chiar \"\n\"dacă gazda nu accesează în mod explicit memoria, accesările speculative pot \"\n\"duce la umplerea memoriei cache, iar apoi modificările de la unul sau de la \"\n\"celălalt se vor pierde atunci când memoria cache este curățată sau când VM \"\n\"activează memoria cache. (Memoria cache este codificată în funcție de adresa \"\n\"fizică, nu de VA sau IPA)\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"Pentru simplitate, folosim doar o tabelă de pagini codificată (a se vedea \"\n\"`idmap.S`) care mapează identitar primul 1 GiB de spațiu de adrese pentru \"\n\"dispozitive, următorul 1 GiB pentru DRAM și încă 1 GiB mai sus pentru mai \"\n\"multe dispozitive. Acest lucru se potrivește cu dispunerea memoriei pe care \"\n\"o folosește QEMU.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"De asemenea, am configurat vectorul de excepții (`vbar_el1`), despre care \"\n\"vom vedea mai multe mai târziu.\"\n\n#: src/bare-metal/aps/entry-point.md\n#, fuzzy\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"Toate exemplele din această după-amiază presupun că vom funcționa la nivelul \"\n\"de excepție 1 (EL1). Dacă aveți nevoie să rulați la un alt nivel de \"\n\"excepție, va trebui să modificați `entry.S` în consecință.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"Inline assembly\"\nmsgstr \"Ansamblare în linie\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"Uneori trebuie să folosim asamblarea pentru a face lucruri care nu sunt \"\n\"posibile cu codul Rust. De exemplu, pentru a face un apel HVC (hypervisor \"\n\"call) pentru a spune firmware-ului să oprească sistemul:\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// Sigur pentru că acest lucru folosește doar registrele declarate și nu \"\n\"face\\n\"\n\"    // nimic cu memoria.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Dacă doriți să faceți acest lucru, folosiți crăiasa [`smccc`](https://\"\n\"crates.io/crates/smccc) care are învelișuri pentru toate aceste funcții.)\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI este Interfața de coordonare a stării de alimentare a brațului, un set \"\n\"standard de funcții pentru gestionarea stării de alimentare a sistemului și \"\n\"a procesorului, printre altele. Este implementată de firmware-ul EL3 și de \"\n\"hipervizoarele de pe multe sisteme.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"Sintaxa `0 => _` înseamnă inițializarea registrului la 0 înainte de a rula \"\n\"codul de asamblare în linie și ignorarea conținutului acestuia după aceea. \"\n\"Trebuie să folosim mai degrabă `inout` decât `in` deoarece apelul ar putea \"\n\"să distrugă conținutul registrelor.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Această funcție `main` trebuie să fie `#[no_mangle]` și `extern \\\"C\\\"` \"\n\"deoarece este apelată din punctul nostru de intrare în `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`-`_x3` sunt valorile registrelor `x0`-`x3`, care sunt utilizate în mod \"\n\"convențional de către bootloader pentru a transmite lucruri precum un \"\n\"pointer la arborele de dispozitive. În conformitate cu convenția standard de \"\n\"apelare aarch64 (care este cea pe care `extern \\\"C\\\"` specifică să o \"\n\"folosească), registrele `x0`-`x7` sunt folosite pentru primele 8 argumente \"\n\"transmise unei funcții, astfel încât `entry.S` nu trebuie să facă nimic \"\n\"special, cu excepția faptului că trebuie să se asigure că nu modifică aceste \"\n\"registre.\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Rulați exemplul în QEMU cu `make qemu_psci` în `src/bare-metal/aps/examples`.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Acces la memoria volatilă pentru MMIO\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"Utilizați `pointer::read_volatile` și `pointer::write_volatile`.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"Never hold a reference.\"\nmsgstr \"Nu țineți niciodată o referință.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"`addr_of!` vă permite să obțineți câmpurile structurilor fără a crea o \"\n\"referință intermediară.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Acces volatil: Operațiunile de citire sau scriere pot avea efecte secundare, \"\n\"deci împiedicați compilatorul sau hardware-ul să le reordoneze, să le \"\n\"dubleze sau să le eludeze.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"De obicei, dacă scrieți și apoi citiți, de exemplu, prin intermediul unei \"\n\"referințe mutabile, compilatorul poate presupune că valoarea citită este \"\n\"aceeași cu cea care tocmai a fost scrisă și nu se mai obosește să citească \"\n\"efectiv memoria.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Unele cutii existente pentru accesul volatil la hardware conțin referințe, \"\n\"dar acest lucru nu este corect. Ori de câte ori există o referință, \"\n\"compilatorul poate alege să o deregleze.\"\n\n#: src/bare-metal/aps/mmio.md\n#, fuzzy\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\"Utilizați macroul `addr_of!` pentru a obține pointeri de câmpuri de \"\n\"structură dintr-un pointer la structură.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"Let's write a UART driver\"\nmsgstr \"Să scriem un driver UART\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"Mașina QEMU 'virt' are o UART [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g), așa că haideți să scriem un driver pentru aceasta.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver minim pentru o UART PL011.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Construiește o nouă instanță a driverului UART pentru un dispozitiv \"\n\"PL011 la nivelul\\n\"\n\"    /// adresa de bază dată.\\n\"\n\"    ///\\n\"\n\"    /// # Siguranță\\n\"\n\"    ///\\n\"\n\"    /// Adresa de bază dată trebuie să indice cele 8 registre de control \"\n\"MMIO ale unui dispozitiv de tip\\n\"\n\"    /// PL011, care trebuie să fie mapate în spațiul de adrese al \"\n\"procesului\\n\"\n\"    /// ca memorie a dispozitivului și să nu aibă alte pseudonime.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Scrie un singur octet pe UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Așteptați până când există spațiu în bufferul TX.\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece știm că adresa de bază indică controlul\\n\"\n\"        // registrele de control ale unui dispozitiv PL011 care este mapat \"\n\"corespunzător.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Scrieți în bufferul TX.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Așteptați până când UART nu mai este ocupată.\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Rețineți că `Uart::new` este nesigură, în timp ce celelalte metode sunt \"\n\"sigure. Acest lucru se datorează faptului că, atâta timp cât apelantul lui \"\n\"`Uart::new` garantează că cerințele sale de siguranță sunt îndeplinite (de \"\n\"exemplu, că există doar o singură instanță a driverului pentru o anumită \"\n\"UART și nimic altceva care să se alăture spațiului său de adrese), atunci \"\n\"este întotdeauna sigur să apelăm mai târziu `write_byte`, deoarece putem \"\n\"presupune condițiile prealabile necesare.\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Am fi putut face invers (făcând `new` sigur, dar `write_byte` nesigur), dar \"\n\"ar fi fost mult mai puțin convenabil de utilizat, deoarece fiecare loc care \"\n\"apelează `write_byte` ar trebui să se gândească la siguranța lui `write_byte`\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Acesta este un model comun pentru scrierea de învelișuri sigure pentru cod \"\n\"nesigur: mutarea sarcinii de a dovedi soliditatea de la un număr mare de \"\n\"locuri la un număr mai mic de locuri.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"More traits\"\nmsgstr \"Mai multe trăsături\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Am derivat trăsătura `Debug`. Ar fi util să implementăm și alte câteva \"\n\"trăsături.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece conține doar un pointer către memoria dispozitivului, \"\n\"care poate fi\\n\"\n\"// accesată din orice context.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"Implementarea `Write` ne permite să folosim macrogramele `write!` și \"\n\"`writeln!` cu tipul nostru `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Rulați exemplul în QEMU cu `make qemu_minimal` în `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"A better UART driver\"\nmsgstr \"Un driver UART mai bun\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"PL011 are de fapt [o grămadă de registre](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), iar \"\n\"adăugarea de offset-uri pentru a construi pointeri pentru a le accesa este \"\n\"predispusă la erori și greu de citit. În plus, unele dintre ele sunt câmpuri \"\n\"de biți care ar fi frumos să fie accesate într-un mod structurat.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"Decalaj\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"Nume registru\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"Lăţime\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"V\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"GD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\n#, fuzzy\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\"Există, de asemenea, unele registre de identificare care au fost omise \"\n\"pentru a fi mai scurte.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"Crăiasa [`bitflags`](https://crates.io/crates/bitflags) este utilă pentru a \"\n\"lucra cu bitflags.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Semnalizatoare din registrul de semnalizare UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Liber la trimitere.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Set de date pregătit.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Detectarea purtătorului de date.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART ocupată cu transmiterea de date.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// Receive FIFO este gol.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// Transmit FIFO este plin.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// Receive FIFO este plin.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// Transmit FIFO este gol.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Indicator de inel.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\n#, fuzzy\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"Macroul `bitflags!` creează un nou tip, ceva de genul `Flags(u16)`, împreună \"\n\"cu o serie de implementări de metode pentru a obține și seta steaguri.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"Multiple registers\"\nmsgstr \"Registre multiple\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Putem folosi o structură pentru a reprezenta structura de memorie a \"\n\"registrelor UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\n#, fuzzy\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) îi spune compilatorului să așeze câmpurile structurii în \"\n\"ordine, urmând aceleași reguli ca și în C. Acest lucru este necesar pentru \"\n\"ca structura noastră să aibă o dispunere previzibilă, deoarece reprezentarea \"\n\"implicită Rust permite compilatorului (printre altele) să reordoneze \"\n\"câmpurile după cum crede de cuviință.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"Acum să folosim noua structură `Registers` în driverul nostru.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver pentru o UART PL011.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece știm că self.registers indică controlul\\n\"\n\"        // registre ale unui dispozitiv PL011 care este mapat în mod \"\n\"corespunzător.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Citește și returnează un octet în așteptare, sau `None` dacă nu a fost \"\n\"nimic\\n\"\n\"    /// primit.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece știm că self.registers indică controlul\\n\"\n\"        // registre ale unui dispozitiv PL011 care este mapat în mod \"\n\"corespunzător.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Verificați dacă există condiții de eroare în biții 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Rețineți utilizarea lui `addr_of!` / `addr_of_mut!` pentru a obține pointeri \"\n\"la câmpuri individuale fără a crea o referință intermediară, ceea ce ar fi \"\n\"nesigur.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Using it\"\nmsgstr \"Folosirea Cargo\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Să scriem un mic program care utilizează driverul nostru pentru a scrie pe \"\n\"consola serială și pentru a reda ecourile octeților care intră.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Adresa de bază a UART PL011 primară.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece `PL011_BASE_ADDRESS` este adresa de bază a unui \"\n\"dispozitiv PL011,\\n\"\n\"    // și nimic altceva nu accesează acest interval de adrese.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"La revedere!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Ca și în exemplul [inline assembly](../inline-assembly.md), această funcție \"\n\"`main` este apelată din codul punctului de intrare în `entry.S`. Pentru \"\n\"detalii, consultați notele vorbitorului de acolo.\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Rulați exemplul în QEMU cu `make qemu` în `src/bare-metal/aps/examples`.\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Ar fi frumos să putem folosi macrogramele de logare de la [`log`](https://\"\n\"crates.io/crates/log) crate. Putem face acest lucru prin implementarea \"\n\"trăsăturii `Log`.\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Inițializează loggerul UART.\\n\"\n\n#: src/bare-metal/aps/logging.md\n#, fuzzy\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"Desfășurarea în `log` este sigură deoarece inițializăm `LOGGER` înainte de a \"\n\"apela `set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Trebuie să inițializăm loggerul înainte de a-l utiliza.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Rețineți că gestionarul nostru de panică poate acum să înregistreze \"\n\"detaliile panicii.\"\n\n#: src/bare-metal/aps/logging/using.md\n#, fuzzy\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Rulați exemplul în QEMU cu `make qemu_logger` în `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 definește un tabel de vectori de excepții cu 16 intrări, pentru 4 \"\n\"tipuri de excepții (sincronă, IRQ, FIQ, SError) din 4 stări (EL curent cu \"\n\"SP0, EL curent cu SPx, EL inferior utilizând AArch64, EL inferior utilizând \"\n\"AArch32). Implementăm acest lucru în asamblare pentru a salva registrele \"\n\"volatile pe stivă înainte de a apela în codul Rust:\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\"EL reprezintă nivelul de excepție; toate exemplele noastre din această după-\"\n\"amiază rulează în EL1.\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"Pentru simplificare, nu facem distincție între SP0 și SPx pentru excepțiile \"\n\"EL curente, sau între AArch32 și AArch64 pentru excepțiile EL inferioare.\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"Pentru acest exemplu, ne limităm la înregistrarea excepției și la oprirea \"\n\"alimentării, deoarece nu ne așteptăm ca vreuna dintre acestea să se întâmple.\"\n\n#: src/bare-metal/aps/exceptions.md\n#, fuzzy\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"Ne putem gândi la gestionarii de excepții și la contextul nostru principal \"\n\"de execuție mai mult sau mai puțin ca la fire diferite. [`Send` și `Sync`]\"\n\"(../../concurrency/send-sync.md) vor controla ceea ce putem partaja între \"\n\"ele, la fel ca în cazul firelor de execuție. De exemplu, dacă dorim să \"\n\"partajăm o anumită valoare între gestionarii de excepții și restul \"\n\"programului, iar aceasta este `Send`, dar nu `Sync`, atunci va trebui să o \"\n\"înfășurăm în ceva de genul `Mutex` și să o punem într-o statică.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot fără C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Suportă x86, aarch64 și RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"Se bazează pe LinuxBoot în loc să aibă multe drivere.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Tutorial Rust RaspberryPi OS](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"Inițializare, driver UART, bootloader simplu, JTAG, niveluri de excepție, \"\n\"tratarea excepțiilor, tabele de pagini\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"Unele dificultăți în ceea ce privește întreținerea și inițializarea cache-\"\n\"ului în Rust, nu neapărat un exemplu bun de copiat pentru codul de producție.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Analiza statică pentru a determina utilizarea maximă a stivei.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"Tutorialul RaspberryPi OS rulează codul Rust înainte ca MMU și memoria cache \"\n\"să fie activate. Aceasta va citi și va scrie în memorie (de exemplu, stiva). \"\n\"Cu toate acestea:\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"Fără MMU și memoria cache, accesările nealiniate vor eșua. Se construiește \"\n\"cu `aarch64-unknown-none`, care setează `+strict-align` pentru a împiedica \"\n\"compilatorul să genereze accese nealiniate, deci ar trebui să fie în regulă, \"\n\"dar acest lucru nu este neapărat valabil în general.\"\n\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"Dacă ar fi rulat într-o mașină virtuală, acest lucru poate duce la probleme \"\n\"de coerență a memoriei cache. Problema constă în faptul că mașina virtuală \"\n\"accesează memoria direct, cu memoria cache dezactivată, în timp ce gazda are \"\n\"alias-uri care pot fi stocate în memoria cache pentru aceeași memorie. Chiar \"\n\"dacă gazda nu accesează în mod explicit memoria, accesările speculative pot \"\n\"duce la umplerea cache-ului, iar apoi modificările de la unul sau de la \"\n\"celălalt se vor pierde. Din nou, acest lucru este în regulă în acest caz \"\n\"particular (care rulează direct pe hardware fără hipervizor), dar nu este un \"\n\"model bun în general.\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Lăzi (crates) utile\"\n\n#: src/bare-metal/useful-crates.md\n#, fuzzy\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"Vom trece în revistă câteva crates care rezolvă unele probleme comune în \"\n\"programarea bare-metal.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"Crăiasa [`zerocopy`](https://docs.rs/zerocopy/) (din Fuchsia) oferă \"\n\"trăsături și macro-uri pentru conversia în siguranță între secvențe de \"\n\"octeți și alte tipuri.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"Acest lucru nu este potrivit pentru MMIO (deoarece nu utilizează citiri și \"\n\"scrieri volatile), dar poate fi util pentru lucrul cu structuri partajate cu \"\n\"hardware, de exemplu prin DMA, sau trimise prin intermediul unei interfețe \"\n\"externe.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` poate fi implementat pentru tipurile pentru care orice model de \"\n\"octeți este valabil și, prin urmare, poate fi convertit în siguranță dintr-o \"\n\"secvență de octeți nesigură.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Încercarea de a deriva `FromBytes` pentru aceste tipuri ar eșua, deoarece \"\n\"`RequestType` nu utilizează toate valorile u32 posibile ca discriminanți, \"\n\"astfel încât nu toate modelele de octeți sunt valide.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` are tipuri pentru primitive numerice care cunosc \"\n\"ordinea octeților.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Rulați exemplul cu `cargo run` în `src/bare-metal/useful-crates/zerocopy-\"\n\"example/`. (Nu va rula în Playground din cauza dependenței de crate)\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"Crăiasa [`aarch64-paging`](https://crates.io/crates/aarch64-paging) vă \"\n\"permite să creați tabele de pagini în conformitate cu arhitectura sistemului \"\n\"de memorie virtuală AArch64.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Creați o nouă tabelă de pagini cu corespondență de identitate.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\"// Maparea unei regiuni de 2 MiB de memorie ca fiind numai pentru citire.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Setați `TTBR0_EL1` pentru a activa tabelul de pagini.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Deocamdată, acceptă doar EL1, dar ar trebui să fie ușor de adăugat suportul \"\n\"pentru alte niveluri de excepție.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Aceasta este utilizată în Android pentru [Protected VM Firmware] (https://cs.\"\n\"android.com/android/platform/superproject/+/master:packages/modules/\"\n\"Virtualization/pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"Nu există o modalitate ușoară de a rula acest exemplu, deoarece trebuie să \"\n\"ruleze pe hardware real sau în QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"este o crăiasă terță parte care implementează un alocator de bază pentru \"\n\"sistemul de prieteni. Acesta poate fi utilizat atât pentru [`LockedHeap`]\"\n\"(https://docs.rs/buddy_system_allocator/0.9.0/buddy_system_allocator/struct.\"\n\"LockedHeap.html) care implementează [`GlobalAlloc`](https://doc.rust-lang.\"\n\"org/core/alloc/trait.GlobalAlloc.html), astfel încât să puteți utiliza crate-\"\n\"ul standard `alloc` (așa cum am văzut [înainte](../alloc.md)), cât și pentru \"\n\"alocarea altor spații de adrese. De exemplu, am putea dori să alocăm spațiu \"\n\"MMIO pentru BAR-uri PCI:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"BAR-urile PCI au întotdeauna o aliniere egală cu dimensiunea lor.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\n#, fuzzy\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Rulați exemplul cu `cargo run` în `src/bare-metal/useful-crates/allocator-\"\n\"example/`. (Nu va rula în Playground din cauza dependenței de crate)\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"Uneori doriți ceva care poate fi redimensionat ca un `Vec`, dar fără alocare \"\n\"de heap. [`tinyvec`](https://crates.io/crates/tinyvec) oferă acest lucru: un \"\n\"vector susținut de o matrice sau de o felie, care poate fi alocat static sau \"\n\"pe stivă, care ține evidența numărului de elemente utilizate și intră în \"\n\"panică dacă încercați să utilizați mai multe decât sunt alocate.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` necesită ca tipul de element să implementeze `Default` pentru \"\n\"inițializare.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\n#, fuzzy\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playground include `tinyvec`, deci acest exemplu va rula bine în linie.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` și celelalte primitive de sincronizare din `std::sync` nu \"\n\"sunt disponibile în `core` sau `alloc`. Cum putem gestiona sincronizarea sau \"\n\"mutabilitatea interioară, cum ar fi pentru partajarea stării între diferite \"\n\"unități centrale de procesare?\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"Crăiasa [`spin`](https://crates.io/crates/spin) oferă echivalente bazate pe \"\n\"spinlock pentru multe dintre aceste primitive.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"Aveți grijă să evitați blocajul dacă luați blocaje în gestionarii de \"\n\"întreruperi.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` are, de asemenea, o implementare a unui mutex de blocare a biletului; \"\n\"echivalenți ai lui `RwLock`, `Barrier` și `Once` din `std::sync`; și `Lazy` \"\n\"pentru inițializare leneșă.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"Crăiasa [`once_cell`](https://crates.io/crates/once_cell) are, de asemenea, \"\n\"câteva tipuri utile pentru inițializarea târzie cu o abordare ușor diferită \"\n\"de `spin::once::Once`.\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playground include `spin`, astfel că acest exemplu va rula fără \"\n\"probleme în linie.\"\n\n#: src/bare-metal/android.md\n#, fuzzy\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Pentru a construi un binar Rust de tip bare-metal în AOSP, trebuie să \"\n\"utilizați o regulă Soong `rust_ffi_static` pentru a construi codul Rust, \"\n\"apoi un `cc_binary` cu un script linker pentru a produce binarul propriu-zis \"\n\"și apoi un `raw_binary` pentru a converti ELF-ul într-un binar brut gata de \"\n\"a fi rulat.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"Pentru mașinile virtuale care rulează sub crosvm pe aarch64, biblioteca \"\n\"[vmbase](https://android.googlesource.com/platform/packages/modules/\"\n\"Virtualization/+/refs/heads/master/vmbase/) oferă un script de linker și \"\n\"valori implicite utile pentru regulile de compilare, împreună cu un punct de \"\n\"intrare, logare a consolei UART și multe altele.\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"Macroul `main!` marchează funcția principală, care va fi apelată din punctul \"\n\"de intrare `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md\n#, fuzzy\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"Punctul de intrare `vmbase` se ocupă de inițializarea consolei și emite un \"\n\"PSCI_SYSTEM_OFF pentru a închide VM dacă funcția principală se întoarce.\"\n\n#: src/exercises/bare-metal/afternoon.md\n#, fuzzy\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"Vom scrie un driver pentru dispozitivul de ceas în timp real PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"După ce ați studiat exercițiile, puteți consulta [soluțiile](solutions-\"\n\"afternoon.md) furnizate.\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"RTC driver\"\nmsgstr \"Conductor RTC\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"Mașina virtuală QEMU aarch64 are un ceas în timp real [PL031](https://\"\n\"developer.arm.com/documentation/ddi0224/c) la 0x9010000. Pentru acest \"\n\"exercițiu, trebuie să scrieți un driver pentru acesta.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"Utilizați-o pentru a imprima ora curentă pe consola serială. Puteți utiliza \"\n\"crate-ul [`chrono`](https://crates.io/crates/chrono) pentru formatarea datei/\"\n\"orei.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"Utilizați registrul de potrivire și starea brută a întreruperii pentru a \"\n\"aștepta ocupat până la un anumit moment, de exemplu, 3 secunde în viitor. \"\n\"(Chemați [`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/fn.\"\n\"spin_loop.html) în interiorul buclei)\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"extindere dacă aveți timp:_ Activați și gestionați întreruperea generată de \"\n\"meciul RTC. Puteți utiliza driverul furnizat în crăiasa [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) pentru a configura controlerul generic de întreruperi Arm \"\n\"Generic Interrupt Controller.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\"Utilizați întreruperea RTC, care este conectată la GIC ca `IntId::spi(2)`.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"Odată ce întreruperea este activată, puteți pune nucleul în stare de veghe \"\n\"prin intermediul `arm_gic::wfi()`, ceea ce va face ca nucleul să doarmă până \"\n\"când va primi o întrerupere.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Descărcați [șablonul de exerciții] (../../comprehensive-rust-exercises.zip) \"\n\"și căutați în directorul `rtc` următoarele fișiere.\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"_src/exceptions.rs_ (ar trebui să fie nevoie să modificați acest lucru doar \"\n\"pentru a treia parte a exercițiului):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\"_src/logger.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_ (nu ar trebui să fie nevoie să modificați acest lucru):\"\n\n#: src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Rulați codul în QEMU cu `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rust bare metal După-amiază\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([back to exercise](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Adresele de bază ale GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Adresa de bază a PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// IRQ-ul utilizat de PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece `GICD_BASE_ADDRESS` și `GICR_BASE_ADDRESS` sunt baza\\n\"\n\"    // adrese ale unui distribuitor și, respectiv, redistribuitor GICv3, și\\n\"\n\"    // nimic altceva nu accesează aceste intervale de adrese.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece `PL031_BASE_ADDRESS` este adresa de bază a unui \"\n\"dispozitiv PL031,\\n\"\n\"    // și nimic altceva nu accesează acest interval de adrese.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Așteptați timp de 3 secunde, fără întreruperi.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"În așteptare pentru {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Am terminat de așteptat\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Așteptați încă 3 secunde pentru o întrerupere.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Registrul de date\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Registrul de corespondență\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Încărcați registrul\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Registrul de control\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Registru de setare sau ștergere a măștii de întrerupere\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Starea de întrerupere brută\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Stare de întrerupere mascată\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Registrul de ștergere a întreruperilor\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"Vom scrie un driver pentru dispozitivul de ceas în timp real PL031.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Construiește o nouă instanță a driverului RTC pentru un dispozitiv PL031 \"\n\"la nivelul\\n\"\n\"    /// adresa de bază dată.\\n\"\n\"    ///\\n\"\n\"    /// # Siguranță\\n\"\n\"    ///\\n\"\n\"    /// Adresa de bază dată trebuie să indice registrele de control MMIO ale \"\n\"unui dispozitiv de tip\\n\"\n\"    /// dispozitiv PL031, care trebuie să fie mapate în spațiul de adrese al \"\n\"procesului\\n\"\n\"    /// ca memorie a dispozitivului și să nu aibă alte pseudonime.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Citește valoarea curentă a RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece știm că self.registers indică controlul\\n\"\n\"        // registre ale unui dispozitiv PL031 care este cartografiat în mod \"\n\"corespunzător.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Scrie o valoare de potrivire. Atunci când valoarea RTC se potrivește cu \"\n\"aceasta, se declanșează o întrerupere\\n\"\n\"    /// va fi generată (dacă este activată).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Întoarce dacă registrul de potrivire se potrivește cu valoarea RTC, dacă \"\n\"este sau nu\\n\"\n\"    /// întreruperea este activată.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Returnează dacă există în prezent o întrerupere în așteptare.\\n\"\n\"    ///\\n\"\n\"    /// Acest lucru ar trebui să fie adevărat dacă și numai dacă `matched` \"\n\"returnează true și dacă\\n\"\n\"    /// întreruperea este mascată.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Setează sau șterge masca de întrerupere.\\n\"\n\"    ///\\n\"\n\"    /// Când masca este adevărată, întreruperea este activată; când este \"\n\"falsă, întreruperea este activată\\n\"\n\"    /// întreruperea este dezactivată.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Șterge o întrerupere în așteptare, dacă există.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Sigur, deoarece conține doar un pointer către memoria dispozitivului, \"\n\"care poate fi\\n\"\n\"// accesată din orice context.\\n\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Bine ați venit la Concurrency în Rust\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust are un suport complet pentru concurență folosind fire de execuție OS cu \"\n\"mutexuri și canale.\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Sistemul de tipuri Rust joacă un rol important în transformarea multor erori \"\n\"de concurență în erori de timp de compilare. Acest lucru este deseori \"\n\"denumit _concurență fără frică_, deoarece vă puteți baza pe compilator \"\n\"pentru a asigura corectitudinea la momentul execuției.\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"[Threads](./concurrency/threads.md) (30 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"[Channels](./concurrency/channels.md) (20 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"[Send and Sync](./concurrency/send-sync.md) (15 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"[Shared State](./concurrency/shared-state.md) (30 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"[Exercises](./concurrency/sync-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Exercițiu: Geometrie](./references/exercise.md) (30 minute)\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze \"\n\"aproximativ 2 ore și 20 de minute\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\"Rust ne permite să accesăm setul de instrumente de simultaneitate al \"\n\"sistemului de operare: fire, primitive de sincronizare, etc.\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\"Sistemul de tipuri ne oferă siguranță pentru simultaneitate fără \"\n\"caracteristici speciale.\"\n\n#: src/concurrency/welcome.md\n#, fuzzy\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\"Aceleași instrumente care ajută la accesul \\\"concurent\\\" într-un singur fir \"\n\"(de exemplu, o funcție apelată care ar putea modifica un argument sau salva \"\n\"referințe la acesta pentru a fi citite mai târziu) ne salvează de problemele \"\n\"legate de mai multe fire de execuție.\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"[Plain Threads](./concurrency/threads/plain.md) (15 minutes)\"\nmsgstr \"[impl Trait](./generics/impl-trait.md) (5 minute)\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"[Scoped Threads](./concurrency/threads/scoped.md) (15 minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"This segment should take about 30 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 40 de minute\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\"Firele de execuție din Rust funcționează în mod similar cu cele din alte \"\n\"limbaje:\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Numărătoarea în fir: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Firul principal: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"Firele sunt toate fire de tip daemon, firul principal nu le așteaptă.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Panica firelor este independentă una de cealaltă.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\"Panicile pot transporta o sarcină utilă, care poate fi despachetată cu \"\n\"`downcast_ref`.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\"API-urile Rust pentru fire de execuție nu par prea diferite de cele din C++.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"Rulați exemplul cu:\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\"o sincronizare de 5ms este suficient de liberă pentru ca firele principale \"\n\"și cele generate să rămână în mare parte în același timp.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\"Observați că programul se termină înainte ca firul generat să ajungă la 10!\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\"Acest lucru se datorează faptului că main încheie programul, iar firele de \"\n\"execuție generate nu îl fac să persiste.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\"Comparați cu pthreads/C++ std::thread/boost::thread dacă se dorește acest \"\n\"lucru.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"Cum putem aștepta ca firul generat să se finalizeze?\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"utilizat pentru a construi o instanță implicită a unui tip.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\"`JoinHandle` are o metodă [`.join()`](https://doc.rust-lang.org/std/thread/\"\n\"struct.JoinHandle.html#method.join) care se blochează.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"Utilizați `let handle = thread::spawn(...)` și mai târziu `handle.join()` \"\n\"pentru a aștepta ca firul să se termine.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"Acum, ce se întâmplă dacă vrem să returnăm o valoare?\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Look at docs again:\"\nmsgstr \"Uită-te din nou la documente:\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"Cu toate acestea, puteți utiliza un [scoped thread](https://doc.rust-lang.\"\n\"org/std/thread/fn.scope.html) pentru acest lucru:\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returnează `thread::Result<T>`\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"Utilizați valoarea de returnare `Result` din `handle.join()` pentru a obține \"\n\"acces la sarcina utilă de panică. Acesta este un moment bun pentru a vorbi \"\n\"despre [`Any`](https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Ok, what about the other case?\"\nmsgstr \"Bine, dar celălalt caz?\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\"Declanșează o panică în firul de discuție, observați cum acest lucru nu \"\n\"afectează `main`.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Utilizați valoarea de returnare `Result` din `handle.join()` pentru a obține \"\n\"acces la sarcina utilă de panică. Acesta este un moment bun pentru a vorbi \"\n\"despre [`Any`](https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\"Acum putem returna valori de la fire! Dar cum rămâne cu preluarea intrărilor?\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"Capturați ceva prin referință în închiderea firului.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"Un mesaj de eroare indică faptul că trebuie să o mutăm.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\"Mutați-l înăuntru, vedeți că putem calcula și apoi returna o valoare \"\n\"derivată.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"If we want to borrow?\"\nmsgstr \"Dacă vrem să împrumutăm?\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\"Main ucide firele de execuție ale copiilor atunci când se întoarce, dar o \"\n\"altă funcție s-ar întoarce și le-ar lăsa în funcțiune.\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\"Aceasta ar fi o utilizare a stivei după returnare, ceea ce încalcă siguranța \"\n\"memoriei!\"\n\n#: src/concurrency/threads/plain.md\n#, fuzzy\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"Cum putem evita acest lucru? a se vedea slide-ul următor.\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Firele normale nu pot împrumuta din mediul lor:\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Cu toate acestea, puteți utiliza un [scoped thread](https://doc.rust-lang.\"\n\"org/std/thread/fn.scope.html) pentru acest lucru:\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"Motivul este că, atunci când funcția `thread::scope` se finalizează, toate \"\n\"firele sunt garantate a fi unite, astfel încât pot returna date împrumutate.\"\n\n#: src/concurrency/threads/scoped.md\n#, fuzzy\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Se aplică regulile normale de împrumut Rust: puteți împrumuta fie în mod \"\n\"mutabil de către un singur fir, fie în mod imuabil de către orice număr de \"\n\"fire.\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"\"\n\"[Senders and Receivers](./concurrency/channels/senders-receivers.md) (10 \"\n\"minutes)\"\nmsgstr \"[Referințe partajate](./references/shared.md) (10 minute)\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"[Unbounded Channels](./concurrency/channels/unbounded.md) (2 minutes)\"\nmsgstr \"[Uniuni](./unsafe-rust/unions.md) (5 minute)\"\n\n#: src/concurrency/channels.md\n#, fuzzy\nmsgid \"[Bounded Channels](./concurrency/channels/bounded.md) (10 minutes)\"\nmsgstr \"[Limite ale trăsăturilor](./generics/trait-bounds.md) (10 minute)\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 20 de minute\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Canalele Rust au două părți: un `Sender<T>` și un `Receiver<T>`. Cele două \"\n\"părți sunt conectate prin intermediul canalului, dar nu se văd decât \"\n\"punctele finale.\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Recepționat: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` înseamnă Multi-Producer, Single-Consumer. `Sender` și `SyncSender` \"\n\"implementează `Clone` (astfel încât să puteți face mai mulți producători), \"\n\"dar `Receiver` nu o face.\"\n\n#: src/concurrency/channels/senders-receivers.md\n#, fuzzy\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` și `recv()` returnează `Result`. Dacă acestea returnează `Err`, \"\n\"înseamnă că omologul `Sender` sau `Receiver` este abandonat și canalul este \"\n\"închis.\"\n\n#: src/concurrency/channels/unbounded.md\n#, fuzzy\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"Obțineți un canal nemărginit și asincron cu `mpsc::channel()`:\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Mesaj {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: mesaj trimis {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: terminat\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"Cu canale limitate (sincrone), `send` poate bloca firul curent:\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"Apelul la `send` va bloca firul curent până când va exista spațiu în canal \"\n\"pentru noul mesaj. Firul poate fi blocat la nesfârșit dacă nimeni nu citește \"\n\"de pe canal.\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"Un apel la `send` va eșua cu o eroare (de aceea returnează `Result`) dacă \"\n\"canalul este închis. Un canal este închis atunci când receptorul este \"\n\"abandonat.\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\"Un canal delimitat cu dimensiunea zero se numește \\\"canal de întâlnire\\\". \"\n\"Fiecare trimitere va bloca firul curent până când un alt fir va apela `read`.\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"[Marker Traits](./concurrency/send-sync/marker-traits.md) (2 minutes)\"\nmsgstr \"[Trăsături nesigure](./unsafe-rust/unsafe-traits.md) (5 minute)\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"[Send](./concurrency/send-sync/send.md) (2 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"[Sync](./concurrency/send-sync/sync.md) (2 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"[Examples](./concurrency/send-sync/examples.md) (10 minutes)\"\nmsgstr \"\"\n\"[Tupluri și vectori](./tuples-and-arrays/tuples-and-arrays.md)  (10 minute)\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Cum știe Rust să interzică accesul partajat între fire de execuție? \"\n\"Răspunsul se află în două trăsături:\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): un tip `T` \"\n\"este `Send` dacă este sigur să muți un `T` peste o limită de fir.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): un tip `T` \"\n\"este `Sync` dacă este sigur să muți un `&T` peste o limită de fir.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"`Send` și `Sync` sunt [trăsături nesigure](../unsafe/unsafe-traits.md). \"\n\"Compilatorul le va deriva în mod automat pentru tipurile dvs. atâta timp cât \"\n\"acestea conțin doar tipurile `Send` și `Sync`. De asemenea, le puteți \"\n\"implementa manual atunci când știți că este valabil.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Aceste trăsături pot fi considerate ca fiind indicatoare ale faptului că \"\n\"tipul are anumite proprietăți de siguranță a firelor.\"\n\n#: src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\"Acestea pot fi utilizate în cadrul constrângerilor generice ca și trăsături \"\n\"normale.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Un tip `T` este [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.\"\n\"html) dacă este sigur să muți o valoare `T` către un alt fir.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"Efectul mutării proprietății către un alt fir este că _destructori_ vor rula \"\n\"în acel fir. Așadar, întrebarea este când puteți aloca o valoare într-un fir \"\n\"și o puteți dezaloca în alt fir.\"\n\n#: src/concurrency/send-sync/send.md\n#, fuzzy\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"De exemplu, o conexiune la biblioteca SQLite trebuie să fie accesată numai \"\n\"de pe un singur fir de execuție.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Un tip `T` este [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.\"\n\"html) dacă este sigur să accesezi o valoare `T` din mai multe fire de \"\n\"execuție în același timp.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Mai exact, definiția este:\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` este `Sync` dacă și numai dacă `&T` este `Send`\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Această afirmație este, în esență, un mod prescurtat de a spune că, dacă un \"\n\"tip este sigur pentru utilizarea partajată, este, de asemenea, sigur pentru \"\n\"a trece referințe ale acestuia între fire.\"\n\n#: src/concurrency/send-sync/sync.md\n#, fuzzy\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Acest lucru se datorează faptului că, dacă un tip este Sync, înseamnă că \"\n\"poate fi partajat între mai multe fire de execuție fără riscul de curse de \"\n\"date sau alte probleme de sincronizare, astfel încât este sigur să îl mutați \"\n\"pe un alt fir de execuție. O referință la tip este, de asemenea, sigură \"\n\"pentru a fi mutată în alt fir, deoarece datele la care face referire pot fi \"\n\"accesate în siguranță din orice fir.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"Majoritatea tipurilor pe care le întâlniți sunt de tip `Send + Sync`:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\"`Arc<T>`: În mod explicit, thread-safe prin numărul de referințe atomice.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`: În mod explicit, thread-safe prin blocare internă.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\"`AtomicBool`, `AtomicU8`, ....: Utilizează instrucțiuni atomice speciale.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Tipurile generice sunt de obicei `Send + Sync` atunci când parametrii de tip \"\n\"sunt `Send + Sync`.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Aceste tipuri pot fi mutate în alte fire de execuție, dar nu sunt sigure \"\n\"pentru fire de execuție. De obicei, din cauza mutabilității interioare:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`Cell<T>`\"\nmsgstr \"`Celula<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"Aceste tipuri sunt sigure pentru firul de execuție, dar nu pot fi mutate în \"\n\"alt fir de execuție:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T: Sync>`: Utilizează primitive la nivelul sistemului de operare \"\n\"care trebuie să fie dezalocate pe firul care le-a creat.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send +Sync`\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Aceste tipuri nu sunt sigure pentru fire de execuție și nu pot fi mutate în \"\n\"alte fire de execuție:\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: fiecare `Rc<T>` are o referință la un `RcBox<T>`, care conține un \"\n\"număr de referințe neatomice.\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust presupune că indicatoarele brute pot avea \"\n\"considerații speciale privind concurența.\"\n\n#: src/concurrency/shared-state.md\n#, fuzzy\nmsgid \"[Arc](./concurrency/shared-state/arc.md) (5 minutes)\"\nmsgstr \"[Rc](./smart-pointers/rc.md) (5 minute)\"\n\n#: src/concurrency/shared-state.md\n#, fuzzy\nmsgid \"[Mutex](./concurrency/shared-state/mutex.md) (15 minutes)\"\nmsgstr \"[Nesigur](./unsafe-rust/unsafe.md) (5 minute)\"\n\n#: src/concurrency/shared-state.md\n#, fuzzy\nmsgid \"[Example](./concurrency/shared-state/example.md) (10 minutes)\"\nmsgstr \"[Nesigur](./unsafe-rust/unsafe.md) (5 minute)\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) permite \"\n\"accesul partajat numai pentru citire prin intermediul `Arc::clone`:\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` este acronimul de la \\\"Atomic Reference Counted\\\", o versiune thread \"\n\"safe a `Rc` care utilizează operații atomice.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` implementează `Clone` indiferent dacă `T` o face sau nu. \"\n\"Implementează `Send` și `Sync` dacă și numai dacă `T` le implementează pe \"\n\"amândouă.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` are costul operațiunilor atomice care se execută, dar după \"\n\"aceea utilizarea lui `T` este gratuită.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Atenție la ciclurile de referință, `Arc` nu folosește un garbage collector \"\n\"pentru a le detecta.\"\n\n#: src/concurrency/shared-state/arc.md\n#, fuzzy\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` poate fi de ajutor.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) asigură \"\n\"excluderea reciprocă _și_ permite accesul mutabil la `T` în spatele unei \"\n\"interfețe de numai citire:\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"Magnitudinea lui {v:?} după normalizare: {}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Observați cum avem o implementare de pătură [`impl<T: Send> Sync for \"\n\"Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-\"\n\"for-Mutex%3CT%3E).\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` în Rust arată ca o colecție cu un singur element - datele protejate.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\"Nu este posibil să se uite să se achiziționeze mutexul înainte de a accesa \"\n\"datele protejate.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Puteți obține un `&amp;mut T` dintr-un `&amp;Mutex<T>` prin luarea unui \"\n\"blocaj. `MutexGuard` se asigură că `&amp;mut T` nu supraviețuiește mai mult \"\n\"decât blocajul deținut.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` implementează atât `Send` cât și `Sync` dacă (dacă și numai dacă) \"\n\"`T` implementează `Send`.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"O contraparte de blocare la citire-scriere - `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"De ce `lock()` returnează `Result`? \"\n\n#: src/concurrency/shared-state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"În cazul în care firul care deținea `Mutex` intră în panică, `Mutex` devine \"\n\"\\\"otrăvit\\\" pentru a semnala că datele pe care le protejează ar putea fi \"\n\"într-o stare inconsistentă. Apelul la `lock()` pe un mutex otrăvit eșuează \"\n\"cu un [`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.\"\n\"html). Puteți apela `into_inner()` la eroare pentru a recupera datele \"\n\"indiferent de situație.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Să vedem `Arc` și `Mutex` în acțiune:\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// folosiți std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"O posibilă soluție:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"Părți notabile:\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` este înfășurat atât în `Arc` cât și în `Mutex`, deoarece preocupările \"\n\"lor sunt ortogonale.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Înfășurarea unui `Mutex` într-un `Arc` este un model comun de partajare a \"\n\"stării mutabile între fire.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` trebuie să fie clonat ca `v2` înainte de a putea fi mutat într-\"\n\"un alt fir de execuție. Rețineți că `move` a fost adăugat la semnătura \"\n\"lambda.\"\n\n#: src/concurrency/shared-state/example.md\n#, fuzzy\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Blocurile sunt introduse pentru a restrânge cât mai mult posibil domeniul de \"\n\"aplicare al `LockGuard`.\"\n\n#: src/concurrency/sync-exercises.md\n#, fuzzy\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Dining Philosophers](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minute)\"\n\n#: src/concurrency/sync-exercises.md\n#, fuzzy\nmsgid \"\"\n\"[Multi-threaded Link Checker](./concurrency/sync-exercises/link-checker.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Verificator de legături cu mai multe fire](./concurrency/sync-exercises/\"\n\"link-checker.md) (20 minute)\"\n\n#: src/concurrency/sync-exercises.md\n#, fuzzy\nmsgid \"[Solutions](./concurrency/sync-exercises/solutions.md) (30 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"Acest segment ar trebui să dureze aproximativ 1 oră și 10 minute\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Problema filozofilor care servesc masa este o problemă clasică în domeniul \"\n\"concurenței:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"Cinci filozofi iau masa împreună la aceeași masă. Fiecare filozof are \"\n\"propriul loc la masă. Între fiecare farfurie se află câte o furculiță. Felul \"\n\"de mâncare servit este un fel de spaghete care trebuie mâncate cu două \"\n\"furculițe. Fiecare filozof nu poate decât să gândească și să mănânce \"\n\"alternativ. În plus, un filozof poate mânca spaghetele doar dacă are atât \"\n\"furculița din stânga, cât și cea din dreapta. Astfel, cele două furculițe \"\n\"vor fi disponibile doar atunci când cei doi vecini cei mai apropiați \"\n\"gândesc, nu mănâncă. După ce un filozof individual termină de mâncat, el va \"\n\"pune jos ambele furculițe.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Veți avea nevoie de o [instalare Cargo] locală (../../cargo/running-locally.\"\n\"md) pentru acest exercițiu. Copiați codul de mai jos într-un fișier numit \"\n\"`src/main.rs`, completați spațiile goale și testați dacă `cargo run` nu se \"\n\"blochează:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Eureka! {} are o idee nouă!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Ridicați furculițele...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} mănâncă...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"Lăzi HAL\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hypatia\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Platon\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristotel\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Create forks\\n\"\nmsgstr \"// Creați furci\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Creați filosofi\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\"// Fă-i pe fiecare dintre ei să gândească și să mănânce de 100 de ori\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Emiteți gândurile lor\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Puteți utiliza următorul `Cargo.toml`:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[pachet]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"versiune = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Să folosim noile noastre cunoștințe pentru a crea un verificator de legături \"\n\"cu mai multe fire. Acesta ar trebui să pornească de la o pagină web și să \"\n\"verifice dacă legăturile de pe pagină sunt valide. Ar trebui să verifice în \"\n\"mod recursiv alte pagini din același domeniu și să continue să facă acest \"\n\"lucru până când toate paginile sunt validate.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\"Pentru aceasta, veți avea nevoie de un client HTTP, cum ar fi [`reqwest`]\"\n\"(https://docs.rs/reqwest/). De asemenea, veți avea nevoie de o modalitate de \"\n\"a găsi link-uri, putem folosi [`scraper`](https://docs.rs/scraper/). În cele \"\n\"din urmă, vom avea nevoie de o modalitate de gestionare a erorilor, vom \"\n\"folosi [`thiserror`](https://docs.rs/thiserror/).\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"Creați un nou proiect Cargo și adăugați următoarele dependențe:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Dacă `cargo add` eșuează cu `error: no such subcommand`, atunci vă rugăm să \"\n\"editați manual fișierul `Cargo.toml`. Adăugați dependențele enumerate mai \"\n\"jos.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\"Apelurile `cargo add` vor actualiza fișierul `Cargo.toml` astfel încât să \"\n\"arate astfel:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[pachet]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"versiune = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependențe]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"]] } }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Acum puteți descărca pagina de start. Încercați cu un site mic, cum ar fi \"\n\"`https://www.google.org/`.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Fișierul dvs. `src/main.rs` ar trebui să arate cam așa:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"eroare de solicitare: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"Verificarea împrumuturilor\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"On {base_url:#}: ignorat neparsabil {href:?}: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Link-uri: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Could not extract links: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Rulați codul din `src/main.rs` cu\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Folosiți fire de execuție pentru a verifica legăturile în paralel: trimiteți \"\n\"URL-urile care trebuie verificate pe un canal și lăsați câteva fire de \"\n\"execuție să verifice URL-urile în paralel.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#, fuzzy\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Extindeți acest lucru pentru a extrage în mod recursiv legăturile din toate \"\n\"paginile de pe domeniul `www.google.org`. Puneți o limită superioară de \"\n\"aproximativ 100 de pagini, astfel încât să nu ajungeți să fiți blocat de \"\n\"site.\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} încearcă să mănânce\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// Pentru a evita un blocaj, trebuie să rupem simetria\\n\"\n\"            // undeva. Acest lucru va schimba bifurcațiile de fire de \"\n\"execuție \\n\"\n\"           //fără a dezinitializa niciuna dintre ele.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"Verificator de legături\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"/// Determină dacă legăturile din pagina dată trebuie extrase.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Marchează pagina dată ca fiind vizitată, returnând false dacă a fost \"\n\"deja vizitată\\n\"\n\"    /// fost vizitată.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// Expeditorul a fost abandonat. Nu mai vin comenzi.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Am primit o eroare de crawling: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\n#, fuzzy\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"URL-uri proaste: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"\\\"Async\\\" este un model de simultaneitate în care mai multe sarcini sunt \"\n\"executate simultan prin executarea fiecărei sarcini până când se blochează, \"\n\"apoi se trece la o altă sarcină care este gata să progreseze. Acest model \"\n\"permite rularea unui număr mai mare de sarcini pe un număr limitat de fire \"\n\"de execuție. Acest lucru se datorează faptului că, de obicei, costurile de \"\n\"operare per sarcină sunt foarte scăzute, iar sistemele de operare oferă \"\n\"primitive pentru identificarea eficientă a I/O care pot continua.\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"Funcționarea asincronă a Rust se bazează pe \\\"futures\\\", care reprezintă \"\n\"munca ce poate fi finalizată în viitor. Futures sunt \\\"interogate\\\" până \"\n\"când semnalează că sunt finalizate.\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"Futures sunt interogate de un timp de execuție asincron și sunt disponibile \"\n\"mai multe timpuri de execuție diferite.\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python are un model similar în `asyncio`. Cu toate acestea, tipul său \"\n\"`Future` se bazează pe callback și nu pe polled. Programele asincrone din \"\n\"Python necesită o \\\"buclă\\\", similară cu un timp de execuție în Rust.\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"`Promise` din JavaScript este similar, dar se bazează din nou pe callback. \"\n\"Timpul de execuție al limbajului implementează bucla de evenimente, astfel \"\n\"încât multe dintre detaliile rezolvării promisiunilor sunt ascunse.\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"[Async Basics](./concurrency/async.md) (30 minutes)\"\nmsgstr \"[Generice](../generics.md) (45 minute)\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"\"\n\"[Channels and Control Flow](./concurrency/async-control-flow.md) (20 minutes)\"\nmsgstr \"\"\n\"[Lasă controlul să curgă](./pattern-matching/let-control-flow.md) (10 minute)\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"[Pitfalls](./concurrency/async-pitfalls.md) (55 minutes)\"\nmsgstr \"[Referințe](../references.md) (50 minute)\"\n\n#: src/concurrency/welcome-async.md\n#, fuzzy\nmsgid \"[Exercises](./concurrency/async-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Exercițiu: Geometrie](./references/exercise.md) (30 minute)\"\n\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"[async/await](./concurrency/async/async-await.md) (10 minutes)\"\nmsgstr \"[async/await](./concurrency/async/async/async-await.md) (10 minute)\"\n\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"[Futures](./concurrency/async/futures.md) (4 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"[Runtimes](./concurrency/async/runtimes.md) (10 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/async.md\n#, fuzzy\nmsgid \"[Tasks](./concurrency/async/tasks.md) (10 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"La un nivel înalt, codul Rust asincron seamănă foarte mult cu codul \"\n\"secvențial \\\"normal\\\":\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Contele este: {i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"Rețineți că acesta este un exemplu simplificat pentru a arăta sintaxa. Nu \"\n\"există nicio operațiune de lungă durată sau vreo concurență reală!\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"What is the return type of an async call?\"\nmsgstr \"Care este tipul de returnare al unui apel asincron?\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\"Utilizați `let future: () = async_main(10);` în `main` pentru a vedea tipul.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"Cuvântul cheie \\\"async\\\" este un zahăr sintactic. Compilatorul înlocuiește \"\n\"tipul return cu un future.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"Nu puteți face ca `main` să fie asincron, fără instrucțiuni suplimentare \"\n\"pentru compilator cu privire la modul de utilizare a viitorului returnat.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"Aveți nevoie de un executor pentru a rula cod asincron. `block_on` blochează \"\n\"firul curent până când viitorul furnizat a fost executat până la finalizare.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` așteaptă în mod asincron finalizarea unei alte operațiuni. Spre \"\n\"deosebire de `block_on`, `.await` nu blochează firul curent.\"\n\n#: src/concurrency/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"`.await` poate fi folosit numai în interiorul unei funcții `async` (sau \"\n\"bloc; acestea sunt prezentate mai târziu).\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) este o \"\n\"trăsătură, implementată de obiecte care reprezintă o operațiune care poate \"\n\"să nu fie încă finalizată. Un viitor poate fi interogat, iar `poll` \"\n\"returnează un [`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html).\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"O funcție asincronă returnează un `impl Future`. De asemenea, este posibil \"\n\"(dar mai puțin obișnuit) să implementați `Future` pentru propriile tipuri. \"\n\"De exemplu, `JoinHandle` returnat de `tokio::spawn` implementează `Future` \"\n\"pentru a permite îmbinarea cu acesta.\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"Cuvântul cheie `.await`, aplicat la un Future, determină funcția asincronă \"\n\"curentă să se oprească până când Future-ul este gata și apoi evaluează la \"\n\"ieșire.\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"Tipurile `Future` și `Poll` sunt implementate exact așa cum se arată; faceți \"\n\"clic pe linkuri pentru a vedea implementările din documentație.\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"Nu vom ajunge la `Pin` și `Context`, deoarece ne vom concentra pe scrierea \"\n\"de cod asincron, mai degrabă decât pe construirea de noi primitive \"\n\"asincrone. Pe scurt:\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"`Context` permite unui Future să se programeze pentru a fi interogat din nou \"\n\"atunci când are loc un eveniment.\"\n\n#: src/concurrency/async/futures.md\n#, fuzzy\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` se asigură că viitorul nu este mutat în memorie, astfel încât \"\n\"indicatorii către acel viitor rămân valabili. Acest lucru este necesar \"\n\"pentru a permite ca referințele să rămână valabile după un `.await`.\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"Un _runtime_ oferă suport pentru efectuarea de operații asincrone (un \"\n\"_reactor_) și este responsabil pentru executarea futures (un _executor_). \"\n\"Rust nu are un timp de execuție \\\"încorporat\\\", dar sunt disponibile mai \"\n\"multe opțiuni:\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/): performant, cu un ecosistem bine dezvoltat de \"\n\"funcționalități precum [Hyper](https://hyper.rs/) pentru HTTP sau [Tonic]\"\n\"(https://github.com/hyperium/tonic) pentru gRPC.\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/): își propune să fie un \\\"std pentru async\\\" \"\n\"și include un timp de execuție de bază în `async::task`.\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/): simplu și ușor\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"Mai multe aplicații mai mari au propriile lor timpuri de execuție. De \"\n\"exemplu, [Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/\"\n\"main/src/lib/fuchsia-async/src/lib.rs) are deja unul.\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"Rețineți că, dintre timpii de execuție enumerați, numai Tokio este acceptat \"\n\"în zona de joacă Rust. De asemenea, terenul de joacă nu permite niciun fel \"\n\"de I/O, astfel încât cele mai multe lucruri asincrone interesante nu pot fi \"\n\"rulate în terenul de joacă.\"\n\n#: src/concurrency/async/runtimes.md\n#, fuzzy\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"Futures sunt \\\"inerți\\\", în sensul că nu fac nimic (nici măcar nu încep o \"\n\"operațiune de I/O) decât dacă există un executor care să le interogheze. \"\n\"Acest lucru este diferit de JS Promises, de exemplu, care vor fi executate \"\n\"până la finalizare chiar dacă nu sunt folosite niciodată.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio oferă:\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\"Un timp de execuție cu mai multe fire de execuție pentru executarea de cod \"\n\"asincron.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"O versiune asincronă a bibliotecii standard.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"Un ecosistem mare de biblioteci.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Numărătoarea în sarcină: {i}!\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Sarcina principală: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\"Cu ajutorul macroului `tokio::main` putem face acum ca `main` să fie \"\n\"asincronizat.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"Funcția `spawn` creează o nouă \\\"sarcină\\\" concurentă.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"Notă: `spawn` ia un `Future`, nu se apelează `.await` pe `count_to`.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"**Further exploration:**\"\nmsgstr \"**Explorare suplimentară:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"De ce `count_to` nu ajunge (de obicei) la 10? Acesta este un exemplu de \"\n\"anulare asincronă. `tokio::spawn` returnează un handle care poate fi \"\n\"așteptat pentru a aștepta până când se termină.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"Încearcă `count_to(10).await` în loc de spawning.\"\n\n#: src/concurrency/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"Încercați să așteptați sarcina returnată de `tokio::spawn`.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust are un sistem de sarcini, care este o formă de threading ușor.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"O sarcină are un singur viitor de nivel superior pe care executorul îl \"\n\"sondează pentru a progresa. Acel viitor poate avea unul sau mai multe \"\n\"viitoare imbricate pe care metoda sa `poll` le interoghează, ceea ce \"\n\"corespunde, în linii mari, unei stive de apeluri. Concurența în cadrul unei \"\n\"sarcini este posibilă prin interogarea mai multor futures mai mici, cum ar \"\n\"fi cursele dintre un cronometru și o operațiune I/O.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"ascultând pe portul 2000\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"Conexiune nouă de la {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b \\\"Cine ești tu?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"eroare de socket\\\"\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Mulțumesc că ați sunat, {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"Copiați acest exemplu în fișierul pregătit `src/main.rs` și rulați-l de \"\n\"acolo.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"Încercați să vă conectați la acesta cu un instrument de conexiune TCP, cum \"\n\"ar fi [nc](https://www.unix.com/man-page/linux/1/nc/) sau [telnet](https://\"\n\"www.unix.com/man-page/linux/1/telnet/).\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"Cereți elevilor să vizualizeze care ar fi starea serverului de exemplu cu \"\n\"câțiva clienți conectați. Ce sarcini există? Care este viitorul lor?\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"Aceasta este prima dată când vedem un bloc `async`. Acesta este asemănător \"\n\"cu o închidere, dar nu primește niciun argument. Valoarea sa de întoarcere \"\n\"este un Future, similar cu un `async fn`.\"\n\n#: src/concurrency/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"Refaceți blocul asincron într-o funcție și îmbunătățiți gestionarea erorilor \"\n\"folosind `?`.\"\n\n#: src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"[Async Channels](./concurrency/async-control-flow/channels.md) (10 minutes)\"\nmsgstr \"\"\n\"[Canale asincrone](./concurrency/async-control-flow/channels.md) (10 minute)\"\n\n#: src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"[Join](./concurrency/async-control-flow/join.md) (4 minutes)\"\nmsgstr \"[Join](control-flow/join.md)\"\n\n#: src/concurrency/async-control-flow.md\n#, fuzzy\nmsgid \"[Select](./concurrency/async-control-flow/select.md) (5 minutes)\"\nmsgstr \"[Selectare](control-flow/select.md)\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\"Mai multe crates au suport pentru canale asincrone. De exemplu, `tokio`:\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"A primit {count} ping-uri până acum.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler complete\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Nu a reușit să trimită ping.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"A trimis {} ping-uri până acum.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Ceva a mers prost în sarcina de gestionare a ping-ului.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\"Schimbați dimensiunea canalului la `3` și vedeți cum afectează execuția.\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\"În general, interfața este similară cu cea a canalelor `sync`, așa cum se \"\n\"vede în [morning class](concurrency/channels.md).\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"Încercați să eliminați apelul `std::mem::drop`. Ce se întâmplă? De ce?\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"Crate [Flume](https://docs.rs/flume/latest/flume/) are canale care \"\n\"implementează atât `sync` cât și `async` `send` și `recv`. Acest lucru poate \"\n\"fi convenabil pentru aplicațiile complexe cu sarcini de procesare atât IO, \"\n\"cât și grele pentru CPU.\"\n\n#: src/concurrency/async-control-flow/channels.md\n#, fuzzy\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"Ceea ce face ca lucrul cu canalele `async` să fie preferabil este \"\n\"capacitatea de a le combina cu alte `future` pentru a le combina și a crea \"\n\"un flux de control complex.\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"O operațiune de îmbinare așteaptă până când toți viitorii dintr-un set de \"\n\"viitoare sunt gata și returnează o colecție de rezultate ale acestora. Acest \"\n\"lucru este similar cu `Promise.all` în JavaScript sau `asyncio.gather` în \"\n\"Python.\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"Pentru mai multe futures de tipuri disjuncte, puteți utiliza `std::future::\"\n\"join!`, dar trebuie să știți câte futures veți avea în momentul compilării. \"\n\"Acest lucru se află în prezent în crăiasa `futures`, urmând a fi stabilizat \"\n\"în curând în `std::future`.\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"Riscul `join` este ca unul dintre futures să nu se rezolve niciodată, ceea \"\n\"ce ar face ca programul dumneavoastră să se blocheze.\"\n\n#: src/concurrency/async-control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"De asemenea, puteți combina `join_all` cu `join!`, de exemplu, pentru a uni \"\n\"toate cererile către un serviciu http, precum și o interogare a unei baze de \"\n\"date. Încercați să adăugați un `tokio::time::sleep` la viitor, folosind \"\n\"`futures::join!`. Acesta nu este un timeout (care necesită `select!`, \"\n\"explicat în capitolul următor), ci demonstrează `join!`.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"O operațiune de selectare așteaptă până când oricare dintre un set de \"\n\"viitoare este gata și răspunde la rezultatul viitorului respectiv. În \"\n\"JavaScript, această operațiune este similară cu `Promise.race`. În Python, \"\n\"se compară cu `asyncio.wait(task_set, return_when=asyncio.FIRST_COMPLETED)`.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"La fel ca o instrucțiune match, corpul instrucțiunii `select!` are mai multe \"\n\"brațe, fiecare de forma `pattern = future => statement`. Când `future` este \"\n\"gata, `statement` este executat cu variabilele din `pattern` legate de \"\n\"rezultatul `future`.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"Nu a reușit să trimită pisica.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"Nu a reușit să trimită câinele.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"Nu a reușit să primească câștigătorul\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"Câștigătorul este {winner:?}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"În acest exemplu, avem o cursă între o pisică și un câine. \"\n\"`first_animal_to_finish_race` ascultă ambele canale și îl va alege pe cel \"\n\"care ajunge primul. Deoarece câinele are nevoie de 50ms, câștigă împotriva \"\n\"pisicii care are nevoie de 500ms.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\"În acest exemplu, puteți utiliza canale `oneshot`, deoarece canalele trebuie \"\n\"să primească doar un singur `send`.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\"Încercați să adăugați un termen limită la cursă, demonstrând că ați selectat \"\n\"diferite tipuri de viitoruri.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"Rețineți că `select!` renunță la ramurile nepotrivite, ceea ce anulează \"\n\"viitorul acestora. Este cel mai ușor de utilizat atunci când fiecare \"\n\"execuție a `select!` creează noi futures.\"\n\n#: src/concurrency/async-control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\"O alternativă este de a trece `&mut future` în locul viitorului însuși, dar \"\n\"acest lucru poate duce la probleme, discutate în continuare în slide-ul cu \"\n\"privire la fixarea.\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"Async / await oferă o abstractizare convenabilă și eficientă pentru \"\n\"programarea asincronă concurentă. Cu toate acestea, modelul async/await din \"\n\"Rust vine și el cu partea sa de capcane și piedici. În acest capitol \"\n\"ilustrăm câteva dintre ele:\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"[Blocking the Executor](./concurrency/async-pitfalls/blocking-executor.md) \"\n\"(10 minutes)\"\nmsgstr \"[Blocarea executorului](pitfalls/blocking-executor.md)\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"[Pin](./concurrency/async-pitfalls/pin.md) (20 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"[Async Traits](./concurrency/async-pitfalls/async-traits.md) (5 minutes)\"\nmsgstr \"[Trăsături asincrone](pitfalls/async-traits.md)\"\n\n#: src/concurrency/async-pitfalls.md\n#, fuzzy\nmsgid \"\"\n\"[Cancellation](./concurrency/async-pitfalls/cancellation.md) (20 minutes)\"\nmsgstr \"[Anulare](pitfalls/cancellation.md)\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"Blocking the executor\"\nmsgstr \"Blocarea executorului\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"Majoritatea timpilor de execuție asincronă permit doar executarea simultană \"\n\"a sarcinilor IO. Aceasta înseamnă că sarcinile care blochează CPU vor bloca \"\n\"executorul și vor împiedica executarea altor sarcini. O soluție ușoară este \"\n\"utilizarea unor metode echivalente asincrone acolo unde este posibil.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\"\\\"viitorul {id} a dormit timp de {duration_ms}ms, a terminat după {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"Rulați codul și vedeți că somnul se produce consecutiv și nu concomitent.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"Aroma `\\\"current_thread\\\"` pune toate sarcinile pe un singur fir. Acest \"\n\"lucru face ca efectul să fie mai evident, dar eroarea este încă prezentă în \"\n\"varianta cu mai multe fire.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"Schimbă `std::thread::sleep` cu `tokio::time::sleep` și așteaptă rezultatul.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"O altă soluție ar fi `tokio::task::spawn_blocking` care generează un fir \"\n\"real și transformă mânerul său într-un viitor fără a bloca executorul.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"Nu ar trebui să vă gândiți la sarcini ca la fire de sistem de operare. \"\n\"Acestea nu se corelează 1 la 1 și majoritatea executorilor vor permite \"\n\"rularea mai multor sarcini pe un singur fir OS. Acest lucru este deosebit de \"\n\"problematic atunci când interacționați cu alte biblioteci prin intermediul \"\n\"FFI, în cazul în care biblioteca respectivă ar putea depinde de stocarea \"\n\"locală a firelor de execuție sau ar putea fi mapată pe anumite fire de \"\n\"execuție ale sistemului de operare (de exemplu, CUDA). Preferați `tokio::\"\n\"task::spawn_blocking` în astfel de situații.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\n#, fuzzy\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"Utilizați mutexurile de sincronizare cu grijă. Menținerea unui mutex peste \"\n\"un `.await` poate provoca blocarea unei alte sarcini, iar acea sarcină poate \"\n\"fi executată pe același fir.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"Blocurile și funcțiile asincrone returnează tipuri care implementează \"\n\"trăsătura `Future`. Tipul returnat este rezultatul unei transformări a \"\n\"compilatorului care transformă variabilele locale în date stocate în \"\n\"interiorul viitorului.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"Unele dintre aceste variabile pot conține indicatori către alte variabile \"\n\"locale. Din acest motiv, viitorul nu ar trebui să fie mutat niciodată într-o \"\n\"altă locație de memorie, deoarece aceasta ar invalida acești indicatori.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"Pentru a preveni deplasarea tipului de viitor în memorie, acesta poate fi \"\n\"interogat numai prin intermediul unui pointer fixat. `Pin` este un înveliș \"\n\"în jurul unei referințe care interzice toate operațiunile care ar putea muta \"\n\"instanța la care indică într-o altă locație de memorie.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// Un element de lucru. În acest caz, doar dormiți pentru timpul dat și \"\n\"răspundeți\\n\"\n\"// cu un mesaj pe canalul `respond_on`.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// Un lucrător care ascultă munca într-o coadă și o execută.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Prefă-te că lucrezi.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"nu a reușit să trimită răspunsul\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: raportați numărul de iterații la fiecare 100ms\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\"// Un solicitant care solicită lucrări și așteaptă ca acestea să fie \"\n\"finalizate.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"nu a reușit să trimită în coada de lucru\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"eșuat în așteptarea răspunsului\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"rezultatul muncii pentru iterația {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"Este posibil să recunoașteți acest lucru ca fiind un exemplu de model actor. \"\n\"De obicei, actorii apelează `select!` într-o buclă.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\"Aceasta este o rezumare a câtorva dintre lecțiile anterioare, așa că nu vă \"\n\"grăbiți cu ea.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"Adăugați în mod naiv un `_ = sleep(Duration::from_millis(100)) => { println!\"\n\"(..) }` la `select!`. Aceasta nu se va executa niciodată. De ce?\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\"În schimb, adăugați un `timeout_fut` care să conțină acel viitor în afara \"\n\"`loop`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"Acest lucru tot nu funcționează. Urmați erorile compilatorului, adăugând \"\n\"`&mut` la `timeout_fut` în `select!` pentru a evita deplasarea, apoi \"\n\"utilizați `Box::pin`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\"Acest lucru se compilează, dar odată ce expiră timpul de așteptare este \"\n\"`Poll::Ready` la fiecare iterație (un viitor fuzionat ar ajuta cu acest \"\n\"lucru). Actualizați pentru a reseta `timeout_fut` de fiecare dată când \"\n\"expiră.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box alocă pe heap. În unele cazuri, `std::pin::pin!` (stabilizat doar \"\n\"recent, codul mai vechi folosind adesea `tokio::pin!`) este, de asemenea, o \"\n\"opțiune, dar este dificil de utilizat pentru un viitor care este realocat.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"O altă alternativă este să nu folosiți `pin` deloc, ci să generați o altă \"\n\"sarcină care va trimite la un canal `oneshot` la fiecare 100ms.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"Datele care conțin indicatoare către ele însele se numesc autoreferențiale. \"\n\"În mod normal, verificatorul de împrumuturi Rust ar împiedica mutarea \"\n\"datelor autoreferențiale, deoarece referințele nu pot supraviețui datelor la \"\n\"care indică. Cu toate acestea, transformarea codului pentru blocurile și \"\n\"funcțiile asincrone nu este verificată de verificatorul de împrumuturi.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` este un înveliș în jurul unei referințe. Un obiect nu poate fi mutat \"\n\"de la locul său folosind un pointer fixat. Cu toate acestea, el poate fi \"\n\"mutat printr-un pointer nefixat.\"\n\n#: src/concurrency/async-pitfalls/pin.md\n#, fuzzy\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"Metoda `poll` a trăsăturii `Future` utilizează `Pin<&mut Self>` în loc de \"\n\"`&mut Self` pentru a se referi la instanță. De aceea, poate fi apelată numai \"\n\"pe un pointer fixat.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\"Metodele asincrone din trăsături au fost stabilizate doar recent, în \"\n\"versiunea 1.75. Acest lucru a necesitat suport pentru utilizarea poziției de \"\n\"întoarcere `impl Trait` (RPIT) în traits, deoarece desugrăvirea pentru \"\n\"`async fn` include `-> impl Future<Output = ...>`.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\"Cu toate acestea, chiar și cu suportul nativ de astăzi, există unele capcane \"\n\"în jurul `async fn` și RPIT în trăsături:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\"Return-position impl Trait captează toate duratele de viață din domeniul de \"\n\"aplicare (astfel încât unele modele de împrumut nu pot fi exprimate)\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\"Trăsăturile ale căror metode utilizează poziția de returnare `impl trait` \"\n\"sau `async` nu sunt compatibile cu `dyn`.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"Crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) oferă o \"\n\"soluție de rezolvare prin intermediul unei macro:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"alergând toți cei care dorm...\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"adormit pentru {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` este ușor de utilizat, dar rețineți că utilizează alocări heap \"\n\"pentru a realiza acest lucru. Această alocare în heap are costuri \"\n\"suplimentare de performanță.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"Provocările în ceea ce privește suportul lingvistic pentru `async trait` \"\n\"sunt adânci Rust și probabil nu merită să fie descrise în profunzime. Niko \"\n\"Matsakis a făcut o treabă bună explicându-le în [această postare](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) dacă sunteți interesat să aprofundați.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"Încercați să creați o nouă structură de somn care va dormi pentru o perioadă \"\n\"de timp aleatorie și adăugați-o la Vec.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"Renunțarea la un viitor implică faptul că acesta nu mai poate fi interogat \"\n\"niciodată. Acest lucru se numește _cancellation_ și poate avea loc în orice \"\n\"punct de așteptare (`await`). Este necesară o atenție deosebită pentru a se \"\n\"asigura că sistemul funcționează corect chiar și atunci când futures sunt \"\n\"anulate. De exemplu, nu trebuie să se blocheze sau să piardă date.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\"Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice \"\n\"caracter Unicode.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tic!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"Compilatorul nu vă ajută în ceea ce privește siguranța la anulare. Trebuie \"\n\"să citiți documentația API și să vă gândiți la starea pe care o deține \"\n\"`async fn`.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"Spre deosebire de `panic` și `?`, anularea face parte din fluxul normal de \"\n\"control (față de gestionarea erorilor).\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"The example loses parts of the string.\"\nmsgstr \"Exemplul pierde părți din șir.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"Ori de câte ori ramura `tick()` se termină prima, se renunță la `next()` și \"\n\"la `buf` al acestuia.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\"`LinesReader` poate fi securizat împotriva anulării prin includerea lui \"\n\"`buf` în structură:\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// prefixează buf și bytes cu self.\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) este sigur în ceea ce privește anularea, deoarece ține \"\n\"evidența dacă un tick a fost \\\"livrat\\\".\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) este sigur în ceea ce privește anularea, \"\n\"deoarece fie returnează, fie nu citește datele.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) este similar cu exemplul și _nu este_ \"\n\"sigur la anulare. Consultați documentația sa pentru detalii și alternative.\"\n\n#: src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Dining Philosophers](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minute)\"\n\n#: src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"\"\n\"[Broadcast Chat Application](./concurrency/async-exercises/chat-app.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\"[Aplicație de chat cu difuzare](./concurrency/async-exercises/chat-app.md) \"\n\"(30 minute)\"\n\n#: src/concurrency/async-exercises.md\n#, fuzzy\nmsgid \"[Solutions](./concurrency/async-exercises/solutions.md) (20 minutes)\"\nmsgstr \"[Șiruri](./types-and-values/strings.md) (10 minute)\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Filozofii care mănâncă - Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\"Vezi [dining philosophers](dining-philosophers.md) pentru o descriere a \"\n\"problemei.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Ca și înainte, veți avea nevoie de o [instalare Cargo] locală (../../cargo/\"\n\"running-locally.md) pentru acest exercițiu. Copiați codul de mai jos într-un \"\n\"fișier numit `src/main.rs`, completați spațiile goale și testați dacă `cargo \"\n\"run` nu se blochează:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"// Continuă să încerci până când avem ambele furci\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Fă-i să gândească și să mănânce\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"Deoarece de data aceasta folosiți Async Rust, veți avea nevoie de o \"\n\"dependență `tokio`. Puteți utiliza următorul `Cargo.toml`:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[pachet]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"versiune = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependențe]\\n\"\n\"tokio = {version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"]}\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"De asemenea, rețineți că de data aceasta trebuie să folosiți modulele \"\n\"`Mutex` și `mpsc` de la `tokio` crate.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#, fuzzy\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"Poți face ca implementarea ta să fie cu un singur fir de execuție?\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"În acest exercițiu, dorim să folosim noile noastre cunoștințe pentru a \"\n\"implementa o aplicație de chat cu difuzare. Avem un server de chat la care \"\n\"clienții se conectează și își publică mesajele. Clientul citește mesajele \"\n\"utilizatorilor de la intrarea standard și le trimite la server. Serverul de \"\n\"chat difuzează fiecare mesaj pe care îl primește către toți clienții.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"Pentru aceasta, folosim [un canal de difuzare](https://docs.rs/tokio/latest/\"\n\"tokio/sync/broadcast/fn.channel.html) pe server și [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/0.4.0/tokio_websockets/) pentru \"\n\"comunicarea dintre client și server.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"Creați un nou proiect Cargo și adăugați următoarele dependențe:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.37.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.2\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[pachet]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"versiune = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependențe]\\n\"\n\"futures-util = { version = \\\"0.3.28\\\", features = [\\\"sink\\\"]] }\\n\"\n\"http = \\\"0.2.9\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"]] }\\n\"\n\"tokio-websockets = { version = \\\"0.4.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] } }\\n\"\n\"```\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"API-urile necesare\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"Veți avea nevoie de următoarele funcții din `tokio` și [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/0.4.0/tokio_websockets/). Petreceți câteva \"\n\"minute pentru a vă familiariza cu API-ul.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implementat de `WebsocketStream`: pentru \"\n\"citirea asincronă a mesajelor dintr-un flux Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implementat de `WebsocketStream`: pentru \"\n\"trimiterea asincronă de mesaje pe un flux Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): pentru citirea asincronă a mesajelor utilizatorului \"\n\"de la intrarea standard.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): pentru abonarea la un canal de \"\n\"difuzare.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"Două binare\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"În mod normal, într-un proiect Cargo, puteți avea un singur fișier binar și \"\n\"un singur fișier `src/main.rs`. În acest proiect, avem nevoie de două \"\n\"fișiere binare. Unul pentru client și unul pentru server. Ați putea eventual \"\n\"să le faceți două proiecte Cargo separate, dar noi le vom pune într-un \"\n\"singur proiect Cargo cu două binare. Pentru ca acest lucru să funcționeze, \"\n\"codul clientului și cel al serverului trebuie să se regăsească în `src/bin` \"\n\"(a se vedea [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"Copiați următorul cod server și client în `src/bin/server.rs` și, respectiv, \"\n\"`src/bin/client.rs`. Sarcina dumneavoastră este de a completa aceste fișiere \"\n\"așa cum este descris mai jos.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\"// TODO: Pentru un indiciu, consultați descrierea sarcinii de mai jos.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"ascultând pe portul 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"Conexiune nouă de la {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Împachetați fluxul TCP brut într-un websocket.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"Rularea fișierelor binare\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"Rulați serverul cu:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"și clientul cu:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"Implementați funcția `handle_connection` în `src/bin/server.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"Indicație: Folosiți `tokio::select!` pentru a efectua concomitent două \"\n\"sarcini într-o buclă continuă. O sarcină primește mesaje de la client și le \"\n\"difuzează. Cealaltă trimite mesajele primite de server către client.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"Completați funcția principală din `src/bin/client.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"Sugestie: Ca și înainte, utilizați `tokio::select!` într-o buclă continuă \"\n\"pentru a efectua concomitent două sarcini: (1) citirea mesajelor \"\n\"utilizatorului de la intrarea standard și trimiterea lor la server și (2) \"\n\"primirea mesajelor de la server și afișarea lor pentru utilizator.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"Opțional: După ce ați terminat, modificați codul pentru a difuza mesajele \"\n\"către toți clienții, cu excepția expeditorului mesajului.\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\"// Dacă nu am primit furculița din stânga, renunțăm la furculița din \"\n\"dreapta, dacă avem\\n\"\n\"                // o avem și lăsăm celelalte sarcini să progreseze.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\"// Dacă nu am primit furculița din dreapta, renunțăm la furculița din stânga \"\n\"și lăsăm\\n\"\n\"                // alte sarcini să progreseze.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\n#, fuzzy\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// Încuietorile sunt aruncate aici\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\"// tx este abandonat aici, așa că nu este nevoie să îl abandonăm explicit \"\n\"mai târziu\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Iată un idee: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Bine ați venit pe chat! Scrieți un mesaj\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// O buclă continuă care face două activități în același timp: (1) primește\\n\"\n\"    // mesaje de la 'ws_stream' și le transmite, și (2) primește\\n\"\n\"    // mesajele la apelul 'bcast_rx' și le trimite clientului.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"De la client {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Bucla continuă pentru trimiterea și primirea simultană de mesaje.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"De la server: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"vă mulțumim că ați parcurs Comprehensive Rust 🦀!_ Sperăm că v-a plăcut și \"\n\"că a fost util.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Cursul nu este perfect, așa că, dacă ați observat greșeli sau aveți idei de \"\n\"îmbunătățire, vă rugăm să ne [contactați pe GitHub](https://github.com/\"\n\"google/comprehensive-rust/discussions).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"Următorul glosar își propune să ofere o scurtă definiție a numeroși termeni \"\n\"Rust. În cazul traducerilor, acesta servește, de asemenea, pentru a face \"\n\"legătura între termenul respectiv și originalul în limba engleză.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"alocare:  \\n\"\n\"Alocarea dinamică a memoriei pe [heap](memory-management/stack-vs-heap.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"argument:\\n\"\n\"Informații care sunt transmise într-o funcție sau metodă.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Bare-metal Rust:\\n\"\n\"Dezvoltare Rust de nivel scăzut, adesea implementată pe un sistem fără \"\n\"sistem de operare. A se vedea [Bare-metal Rust](bare-metal.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"bloc:\\n\"\n\"A se vedea [Blocuri](control-flow/blocks.md) și _scope_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"împrumut (borrow):\\n\"\n\"A se vedea [Împrumut](ownership/borrowing.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"verificator de împrumuturi (borrow checker):\\n\"\n\"Partea din compilatorul Rust care verifică dacă toate împrumuturile de date \"\n\"sunt valide.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"paranteze:\\n\"\n\"`{` și `}`. Numite și _acolade_, ele delimitează _blocuri_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"construire:  \\n\"\n\"Procesul de conversie a codului sursă în cod executabil sau într-un program \"\n\"utilizabil.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"apel (call):  \\n\"\n\"Invocarea sau execuția unei funcții sau metode.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"canal (channel):  \\n\"\n\"Folosit pentru a transmite în siguranță mesaje [între fire de execuție] \"\n\"(concurrency/channels.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:\\n\"\n\"Cursurile de aici se numesc în comun Fundamentele Rust 🦀.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"concurența (concurrency):\\n\"\n\"Executarea mai multor sarcini sau procese în același timp.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Concurența în Rust:\\n\"\n\"A se vedea [Concurența în Rust](concurrency.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"constantă:\\n\"\n\"O valoare care nu se modifică în timpul execuției unui program.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"fluxul de control:  \\n\"\n\"Ordinea în care sunt executate instrucțiunile sau declarațiile individuale \"\n\"într-un program.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"crash:\\n\"\n\"Un eșec neașteptat și netratat sau o terminare a unui program.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"enumerare (enumeration):\\n\"\n\"Un tip de date care conține una dintre mai multe constante numite, eventual \"\n\"cu un tupluplu sau o structură asociată.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"eroare (error):\\n\"\n\"O condiție sau un rezultat neașteptat care se abate de la comportamentul \"\n\"așteptat.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"gestionarea erorilor:\\n\"\n\"Procesul de gestionare și de răspuns la erorile care apar în timpul \"\n\"execuției programului.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"exercițiu:\\n\"\n\"O sarcină sau o problemă concepută pentru a exersa și testa abilitățile de \"\n\"programare.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"funcție:\\n\"\n\"Un bloc de cod reutilizabil care îndeplinește o sarcină specifică.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"colector de gunoi (garbage collector):\\n\"\n\"Un mecanism care eliberează automat memoria ocupată de obiecte care nu mai \"\n\"sunt utilizate.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"generice (generics):  \\n\"\n\"O caracteristică care permite scrierea de cod cu caractere de substituție \"\n\"pentru tipuri, permițând reutilizarea codului cu diferite tipuri de date.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"imuabile (immutable):\\n\"\n\"Nu poate fi modificat după creare.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"testul de integrare:\\n\"\n\"Un tip de test care verifică interacțiunile dintre diferitele părți sau \"\n\"componente ale unui sistem.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"cuvânt cheie:\\n\"\n\"Un cuvânt rezervat într-un limbaj de programare care are o semnificație \"\n\"specifică și care nu poate fi folosit ca identificator.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"bibliotecă:  \\n\"\n\"O colecție de rutine precompilate sau cod care poate fi utilizat de programe.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"macro:  \\n\"\n\"Macro-urile Rust pot fi recunoscute prin introducerea unui `!` în nume. \"\n\"Macrogramele sunt utilizate atunci când funcțiile normale nu sunt \"\n\"suficiente. Un exemplu tipic este `format!`, care acceptă un număr variabil \"\n\"de argumente, ceea ce nu este acceptat de funcțiile Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"funcția `main`:\\n\"\n\"Programele Rust încep să fie executate cu funcția `main`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"potrivire (match):\\n\"\n\"O construcție a fluxului de control din Rust care permite potrivirea de \"\n\"tipare pe valoarea unei expresii.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"scurgere de memorie (memory leak):\\n\"\n\"O situație în care un program nu reușește să elibereze memoria care nu mai \"\n\"este necesară, ceea ce duce la o creștere treptată a utilizării memoriei.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"metoda:\\n\"\n\"O funcție asociată cu un obiect sau un tip în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"modul:  \\n\"\n\"Un spațiu de nume care conține definiții, cum ar fi funcții, tipuri sau \"\n\"trăsături, pentru a organiza codul în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"mutare (move):\\n\"\n\"Transferul proprietății unei valori de la o variabilă la alta în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"mutabil:\\n\"\n\"O proprietate din Rust care permite variabilelor să fie modificate după ce \"\n\"au fost declarate.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"posesia (ownership):\\n\"\n\"Conceptul din Rust care definește ce parte a codului este responsabilă \"\n\"pentru gestionarea memoriei asociate cu o valoare.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"panică:\\n\"\n\"O stare de eroare irecuperabilă în Rust care duce la terminarea programului.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"parametru:\\n\"\n\"O valoare care este transmisă într-o funcție sau metodă atunci când este \"\n\"apelată.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"șablon (pattern):\\n\"\n\"O combinație de valori, literali sau structuri care pot fi comparate cu o \"\n\"expresie în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"sarcina utilă:  \\n\"\n\"Datele sau informațiile transportate de un mesaj, eveniment sau structură de \"\n\"date.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"program:  \\n\"\n\"Un set de instrucțiuni pe care un computer le poate executa pentru a \"\n\"îndeplini o anumită sarcină sau pentru a rezolva o anumită problemă.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"limbaj de programare:  \\n\"\n\"Un sistem formal utilizat pentru a comunica instrucțiuni unui calculator, \"\n\"cum ar fi Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"receptor:\\n\"\n\"Primul parametru dintr-o metodă Rust care reprezintă instanța asupra căreia \"\n\"este apelată metoda.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"numărarea referințelor:\\n\"\n\"O tehnică de gestionare a memoriei în care se urmărește numărul de referințe \"\n\"la un obiect, iar obiectul este dezalocat atunci când numărul ajunge la zero.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"return:\\n\"\n\"Un cuvânt cheie din Rust utilizat pentru a indica valoarea care trebuie \"\n\"returnată de o funcție.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:\\n\"\n\"Un limbaj de programare de sisteme care se concentrează pe siguranță, \"\n\"performanță și concurență.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Noțiuni fundamentale ale Rust:\\n\"\n\"Zilele 1 - 3 ale acestui curs.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust în Android:\\n\"\n\"A se vedea [Rust in Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Rust în Android:\\n\"\n\"A se vedea [Rust in Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"sigur (safe):  \\n\"\n\"Se referă la codul care respectă regulile de proprietate și împrumut ale \"\n\"Rust, prevenind erorile legate de memorie.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"domeniul de aplicare:  \\n\"\n\"Regiunea unui program în care o variabilă este valabilă și poate fi \"\n\"utilizată.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"biblioteca standard:  \\n\"\n\"O colecție de module care oferă funcționalități esențiale în Rust.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static:\\n\"\n\"Un cuvânt cheie din Rust folosit pentru a defini variabile statice sau \"\n\"elemente cu o durată de viață `'static`'.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\"șir:\\n\"\n\"Un tip de date care stochează date textuale. Consultați [`String` vs `str`]\"\n\"(basic-syntax/string-slices.html) pentru mai multe informații.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"struct:  \\n\"\n\"Un tip de date compozit în Rust care grupează variabile de diferite tipuri \"\n\"sub un singur nume.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"test:\\n\"\n\"Un modul Rust care conține funcții care testează corectitudinea altor \"\n\"funcții.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"fir de execuție:\\n\"\n\"O secvență separată de execuție într-un program, permițând executarea \"\n\"simultană.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"siguranța firelor de execuție:\\n\"\n\"Proprietatea unui program care asigură un comportament corect într-un mediu \"\n\"cu mai multe fire de execuție.\"\n\n#: src/glossary.md\n#, fuzzy\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"trăsătură:\\n\"\n\"O colecție de metode definite pentru un tip necunoscut, oferind o modalitate \"\n\"de a realiza polimorfismul în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"trăsături obligatorii:\\n\"\n\"O abstractizare prin care puteți cere tipurilor să implementeze anumite \"\n\"trăsături de interes pentru dumneavoastră.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"tuplu:  \\n\"\n\"Un tip de date compozit care conține variabile de diferite tipuri. Câmpurile \"\n\"tuplu nu au nume și sunt accesate prin numerele lor ordinale.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"tip:  \\n\"\n\"O clasificare care specifică ce operații pot fi efectuate asupra valorilor \"\n\"datelor în Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"inferența de tip:  \\n\"\n\"Capacitatea compilatorului Rust de a deduce tipul unei variabile sau \"\n\"expresii.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"comportament nedefinit:\\n\"\n\"Acțiuni sau condiții din Rust care nu au un rezultat specificat, ceea ce \"\n\"duce adesea la un comportament imprevizibil al programului.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"uniune (union):\\n\"\n\"Un tip de date care poate conține valori de tipuri diferite, dar numai una \"\n\"la un moment dat.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"test unitar:\\n\"\n\"Rust vine cu un suport încorporat pentru a rula teste unitare mici și teste \"\n\"de integrare mai mari. Consultați [Teste unitare](testing/unit-tests.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"tipul unitate:  \\n\"\n\"Tip care nu conține date, scris ca un tuplu fără membri.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"nesigur:  \\n\"\n\"Un subansamblul Rust care vă permite să declanșați _comportamentul \"\n\"nedefinit_. A se vedea [Rust nesigur](unsafe.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"variabilă:\\n\"\n\"O locație de memorie care stochează date. Variabilele sunt valabile într-un \"\n\"_scop_.\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Alte resurse privind Rust\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Comunitatea Rust a creat o multitudine de resurse online gratuite și de \"\n\"înaltă calitate.\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"Documentație oficială\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\"Proiectul Rust găzduiește multe resurse. Acestea se referă la Rust în \"\n\"general:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): cartea \"\n\"canonică gratuită despre Rust. Acoperă limbajul în detaliu și include câteva \"\n\"proiecte care pot fi construite.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): acoperă \"\n\"sintaxa Rust prin intermediul unei serii de exemple care prezintă diferite \"\n\"construcții. Uneori include mici exerciții în care vi se cere să dezvoltați \"\n\"codul din exemple.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): documentația \"\n\"completă a bibliotecii standard pentru Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): o carte \"\n\"incompletă care descrie gramatica și modelul de memorie Rust.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Ghiduri mai specializate găzduite pe site-ul oficial Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): acoperă Rust \"\n\"nesigur, inclusiv lucrul cu pointeri bruți și interfața cu alte limbaje \"\n\"(FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming în Rust](https://rust-lang.github.io/async-book/): \"\n\"acoperă noul model de programare asincronă care a fost introdus după ce a \"\n\"fost scrisă cartea Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): o \"\n\"introducere în utilizarea Rust pe dispozitive încorporate care nu au un \"\n\"sistem de operare.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Material didactic neoficial\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"O mică selecție de alte ghiduri și tutoriale pentru Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): acoperă \"\n\"Rust din perspectiva programatorilor C de nivel inferior.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): acoperă Rust din perspectiva dezvoltatorilor care scriu \"\n\"firmware în C.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust pentru profesioniști](https://overexact.com/rust-for-professionals/): \"\n\"acoperă sintaxa Rust folosind comparații cu alte limbaje precum C, C++, \"\n\"Java, JavaScript și Python.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exerciții pentru \"\n\"a vă ajuta să învățați Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): o serie de mici prezentări care acoperă atât partea de \"\n\"bază, cât și cea avansată a limbajului Rust. Sunt abordate și alte subiecte, \"\n\"cum ar fi WebAssembly și async/await.\"\n\n#: src/other-resources.md\n#, fuzzy\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): a self-paced workshop that goes beyond Rust's \"\n\"built-in testing framework. It covers `googletest`, snapshot testing, \"\n\"mocking as well as how to write your own custom test harness.\"\nmsgstr \"\"\n\"[Testarea avansată a aplicațiilor Rust](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): un atelier de lucru care merge mai departe de \"\n\"cadrul de testare încorporat în Rust. Acesta acoperă `googletest`, testarea \"\n\"instantanee, mocking, precum și cum să vă scrieți propriul harnașament de \"\n\"testare personalizat.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Beginner's Series to Rust] (https://docs.microsoft.com/en-us/shows/\"\n\"beginners-series-to-rust/) și [Take your first steps with Rust] (https://\"\n\"docs.microsoft.com/en-us/learn/paths/rust-first-steps/): două ghiduri Rust \"\n\"destinate noilor dezvoltatori. Primul este un set de 35 de videoclipuri, iar \"\n\"al doilea este un set de 11 module care acoperă sintaxa Rust și \"\n\"construcțiile de bază.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): explorarea în profunzime a regulilor de \"\n\"gestionare a memoriei din Rust, prin implementarea câtorva tipuri diferite \"\n\"de structuri de liste.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Vă rugăm să consultați [Little Book of Rust Books](https://lborb.github.io/\"\n\"book/) pentru și mai multe cărți Rust.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Materialul de aici se bazează pe numeroasele surse excelente din \"\n\"documentația Rust. Consultați pagina privind [alte resurse](other-resources.\"\n\"md) pentru o listă completă de resurse utile.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Materialul din `Comprehensive Rust` este licențiat în conformitate cu \"\n\"termenii licenței Apache 2.0, vă rugăm să consultați [`LICENSE`](https://\"\n\"github.com/google/comprehensive-rust/blob/main/LICENSE) pentru detalii.\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust în exemple\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Unele exemple și exerciții au fost copiate și adaptate din [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/). Vă rugăm să consultați \"\n\"directorul `third_party/rust-by-example/` pentru detalii, inclusiv termenii \"\n\"licenței.\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"Rust on Exercism\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exerciții pentru \"\n\"a vă ajuta să învățați Rust.\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Unele exerciții au fost copiate și adaptate din [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Vă rugăm să consultați directorul `third_party/\"\n\"rust-on-exercism/` pentru detalii, inclusiv termenii licenței.\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Secțiunea [Interoperabilitate cu C++](android/interoperabilitate/cpp.md) \"\n\"utilizează o imagine din [CXX](https://cxx.rs/). Vă rugăm să consultați \"\n\"directorul `third_party/cxx/` pentru detalii, inclusiv termenii licenței.\"\n"
  },
  {
    "path": "po/ru.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-05-04T15:55:40+03:00\\n\"\n\"PO-Revision-Date: 2023-08-25 14:28-0700\\n\"\n\"Last-Translator: Yauheni Baltukha <evgenii.boltuho@gmail.com>\\n\"\n\"Language-Team: \\n\"\n\"Language: ru\\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\"X-Generator: Poedit 3.3.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Добро пожаловать в Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Проведение курса\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Структура курса\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Горячие клавиши\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Переводы\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Использование Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Экосистема Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Примеры кода\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Локальный запуск Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"День 1: Утро\"\n\n#: src/SUMMARY.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Добро пожаловать\"\n\n# There should be two separate keys (or additional context): Hello Rust and Hello, World.\n# And translations should be accordingly: Знакомство с Rust и Привет, мир!\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Привет, мир!\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Что такое Rust?\"\n\n# Alternative translation: Достоинства. I'd rather not use преимущества, as it can be read as advantages over smth else,\n# but we also describe here modern language features (generics, unpacking and other syntax sugar),\n# which other languages have a plenty\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Сильные стороны\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Песочница\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Типы и значения\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Переменные\"\n\n# Direct translation is Значения, but section is about Литералы or Литералы значений\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Литералы\"\n\n# Операции are chosen over Операторы since description is about how to do simple arithmetics,\n# not the definition of operators\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Арифметические операции\"\n\n# Вывод типов is also possible, but the chosen Выведение типов is less ambiguous\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Выведение типов\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Упражнение: Числа Фибоначчи\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Решение\"\n\n# Управляющие конструкции is used in rust-lang book translation\n# Alternative simplified title: Ветвление и циклы\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Управляющие конструкции\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Выражение `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Циклы\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` и `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Метки\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Блоки и области видимости\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Области видимости и затенение\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Функции\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Макросы\"\n\n# Alternative translation: Сиракузская последовательность - frequently used in Russian sources\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Упражнение: Последовательность Коллатца\"\n\n# Утро - После обеда provides better schedule context, than Утро - Вторая половина дня\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"День 1: После обеда\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Кортежи и массивы\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Массивы\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Кортежи\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Обход массивов\"\n\n# Alternative: Распаковка\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Деструктуризация\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Упражнение: Вложенные массивы\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"Ссылки\"\n\n# Section describes borrowing, so that was used as a translation source\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"Заимствование\"\n\n# Section describes mutable borrowing o_O, so: Изменяемые ссылки\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"Изменяемые ссылки\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Срезы: `&[T]`\"\n\n#: src/SUMMARY.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Строки\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Упражнение: Геометрия\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Определяемые пользователем типы\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"Именованные структуры\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Кортежи\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"Перечисления\"\n\n# Rust documentation calls them Static items, that is why translation is: Статические объекты\n#: src/SUMMARY.md\nmsgid \"Static\"\nmsgstr \"Статические объекты\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Константы\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Псевдонимы типов\"\n\n# События лифта - weird, События системы управления лифтом - too long, so Управление лифтом was chosen;\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Упражнение: Управление лифтом\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"День 2: Утро\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Шаблоны и сопоставление\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Сопоставление\"\n\n# Alternative: Распаковка\n#: src/SUMMARY.md src/pattern-matching/destructuring.md\nmsgid \"Destructuring\"\nmsgstr \"Деструктуризация\"\n\n# Alternative: `Let` вместе с управляющими конструкциями\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"`Let` в потоке управления\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Упражнение: Вычисление выражения\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Методы и типажи\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Методы\"\n\n# rust-book has both `Типажи` and `Трейты` fixed\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Типажи\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Реализация типажей\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Супер-типажи\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"Associated Types\"\nmsgstr \"Скалярные типы\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Наследование\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"День 2: После обеда\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Обобщения\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Обобщённые функции\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Обобщённые типы данных\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Обобщённые типажи\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Ограничение типажа\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"Синтаксис `impl`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Упражнение: Обобщение `min`\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Стандартная библиотека: Типы\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Стандартная библиотека\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Документация\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Упражнение: Счётчик\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Стандартная библиотека: Типажи\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Сравнения\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Перегрузка операторов\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` и `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Преобразование типов\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` и `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Замыкания\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Упражнение: Шифр ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"День 3: Утро\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Управление памятью\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Куча и стек\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Подходы к управлению памятью\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Владение\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Перемещение\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"Клонирование\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Копируемые типы\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"Типаж `Drop`\"\n\n# Alternatives, based on common Design Patterns translations:\n# Паттерн Строитель, Паттерн Builder, Тип Строитель\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Упражнение: Тип-построитель\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Умные указатели\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n# Straightforward translation does little help.\n# Explanatory should include verbs and is hard to fit in less than three-four words.\n# So the Polymorphism was chosen.\n# The section shows how Rust handles it in pointers context.\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Полиморфизм\"\n\n# Alternative: Упражнение: Бинарное дерево\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Упражнение: Двоичное дерево\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"День 3: После обеда\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Заимствование\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Заимствование значения\"\n\n# Related Rust book translation: The Borrow Checker -> Анализатор заимствований\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Анализатор заимствований\"\n\n#: src/SUMMARY.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Ошибки заимствования\"\n\n# Rust book translation is used\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Внутренняя изменяемость\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Упражнение: Журнал здоровья\"\n\n# Alternatives:\n#   Управление временем жизни ссылок\n#   Концепция времени жизни ссылок\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Время жизни ссылок\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Аннотации времени жизни\"\n\n# Rust book translation is used (ch. 10.3)\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Неявное выведение времени жизни\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Аннотации в объявлении структур\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Упражнение: Разбор Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"День 4: Утро\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Итераторы\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"Типаж `Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"Типаж `IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"Типаж `FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Упражнение: Цепочка вычислений\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Модули\"\n\n# Rust book operates with Module Tree.\n# The corresponding translation was used (ch. 7.3).\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Дерево модулей\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Область видимости\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"Использование `use`, `super` и `self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Упражнение: Реорганизация графической библиотеки\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Тестирование\"\n\n# Alternative: Юнит-тесты\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"Модульные тесты\"\n\n# Alternatives:\n#   Прочие тесты\n#   Прочие типы тестов\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Интеграционные и прочие тесты\"\n\n# Alternatives:\n#   Ошибки компиляции и статические анализаторы\n#   Ошибки компиляции и статический анализ\n#   Ошибки, литер и Clippy\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Ошибки компиляции и Clippy\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Упражнение: Алгоритм Лу́на\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"День 4: После обеда\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Обработка ошибок\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Паники\"\n\n# Shouldn't it be the error propagation operator?!\n# Rust book translation is used (ch. 9.2)\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Проброс ошибок\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"Неявные преобразования\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Типаж `Error`\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` и `anyhow`\"\n\n# Alternative: Переписать через `Result`\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Упражнение: Замена на `Result`\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Небезопасный код в Rust\"\n\n# Небезопасный код is better aligned with Unsafe Rust title, but возможности better describes chapter content.\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"Небезопасные возможности\"\n\n# Rare alternative for Raw Pointers: Необработанные указатели\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Разыменование сырых указателей\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Изменяемые статические переменные\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Объединения\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Небезопасные функции\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Небезопасные типажи\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Упражнение: Обёртка интерфейса внешних функций\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"Типы AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Примитивные типы\"\n\n# Maybe alternatives:\n#  Массивоподобные типы\n#  Массивоподобные структуры данных\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Массивы\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"Скалярные типы\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Обработка ошибок Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Обработка ошибок C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Дополнительные типы\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Упражнения\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Упражнение\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Библиотека `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Решения\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Bare Metal: Утро\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Bare Metal: После обеда\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Concurrency: Утро\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Senders and Reveivers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/marker-traits.md\n#, fuzzy\nmsgid \"Marker Traits\"\nmsgstr \"Небезопасные типажи\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Dining Philosophers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Concurrency: После обеда\"\n\n#: src/SUMMARY.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async/tasks.md src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Каналы и поток управления\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Отмена\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Это трехдневный курс по языку Rust, разработанный командой Android. Курс \"\n\"охватывает весь спектр Rust, от базового синтаксиса до сложных тем, таких \"\n\"как обобщения (generics) и обработка ошибок. Последний день курса также \"\n\"затрагивает вопросы разработки для Android.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Цель курса --- научить вас языку Rust. Мы предполагаем, что вы ничего не \"\n\"знаете о Rust и надеемся:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Дать достаточно хорошее представление о синтаксисе и семантике Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Научить работать с существующим кодом и писать новые программы на Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Показать распространённые идиомы языка Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Первые три дня познакомят вас с основами Rust. После этого вам  предлагается \"\n\"углубиться в одну или несколько специализированных тем:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): рассчитанный на полдня курс по использованию Rust для \"\n\"разработки на платформе Android (AOSP). Сюда входит взаимодействие с C, C++ \"\n\"и Java.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Android](android.md): рассчитанный на полдня курс по использованию Rust для \"\n\"разработки на платформе Android (AOSP). Сюда входит взаимодействие с C, C++ \"\n\"и Java.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md): однодневное занятие по использованию Rust для \"\n\"низкоуровневой (embedded) разработки, охватывающее как микроконтроллеры, так \"\n\"и обычные процессоры.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency.md): полный день занятий по изучению \"\n\"многозадачности в Rust. Мы рассмотрим как классический подход, использующий \"\n\"потоки и мьютексы, так и асинхронный подход с использованием фьючерсов \"\n\"(future).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"За рамками курса\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust --- это объёмный язык, и мы не сможем охватить его целиком за несколько \"\n\"дней. Темы, выходящие за рамки курса:\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Написание макросов, см. [Глава 19.5 в The Rust Book](https://doc.rust-lang.\"\n\"org/book/ch19-06-macros.html) и [Rust by Example](https://doc.rust-lang.org/\"\n\"rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Предположения\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Предполагается, что вы уже умеете программировать. Rust --- это статически \"\n\"типизированный язык, и иногда мы будем сравнивать его с C и C++, чтобы лучше \"\n\"объяснить или подчеркнуть разницу в подходах к написанию кода на Rust.\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Если вы знаете, как программировать на языке с динамической типизацией, \"\n\"таком как Python или JavaScript, вы сможете успешно пройти этот курс.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Это пример _заметок для преподавателя_. Мы будем использовать их для \"\n\"добавления дополнительной информации к слайдам. Это могут быть ключевые \"\n\"моменты, которые преподаватель должен осветить, а также ответы на типичные \"\n\"вопросы, которые возникают в ходе прохождения курса.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Эта страница предназначена для преподавателя курса.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Вот краткая справочная информация о том, как мы проводили курс внутри \"\n\"компании Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Перед проведением курса желательно:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Ознакомиться с материалами курса. Мы добавили заметки для преподавателя на \"\n\"некоторых страницах, чтобы выделить ключевые моменты (пожалуйста, помогайте \"\n\"нам, добавляя свои заметки для преподавателей!). Убедитесь в том, что \"\n\"открыли заметки для преподавателя во всплывающем окне (нажмите на ссылку с \"\n\"маленькой стрелкой рядом с ”Заметки для преподавателя”). У вас откроется \"\n\"отдельное окно с заметками для преподавателя, в то время как основное окно \"\n\"вы можете демонстрировать классу.\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Определиться с датами. Поскольку курс требует как минимум три дня, мы \"\n\"рекомендуем вам запланировать три дня на протяжении двух недель. По нашему \"\n\"опыту, слушатели предпочитают иметь перерывы в течение курса, так как это \"\n\"помогает им лучше осмыслить информацию.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Найти помещение, достаточно просторное для очного участия. Мы рекомендуем, \"\n\"чтобы в классе было 15-20 человек. Это довольно немного для того, чтобы \"\n\"людям было комфортно задавать вопросы, а у преподавателя было время на то, \"\n\"чтобы на них отвечать.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"В день занятия приходите в аудиторию немного раньше, чтобы всё подготовить. \"\n\"Мы рекомендуем показывать слайды используя `mdbook serve`, запущенного на \"\n\"вашем ноутбуке (см. [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). Это обеспечивает оптимальную \"\n\"производительность без задержек при смене страниц. Использование ноутбука \"\n\"также позволит вам исправлять опечатки по мере их обнаружения вами или \"\n\"участниками курса.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Позвольте участникам решать упражнения самостоятельно или в небольших \"\n\"группах. Обычно мы уделяем упражнениям по 30-45 минут утром и во второй \"\n\"половине дня (включая время на разбор решений). Обязательно спросите, не \"\n\"испытывают ли слушатели трудности и нужно ли с чем-то помочь. Когда вы \"\n\"видите, что у нескольких человек одна и та же проблема, сообщите об этом \"\n\"классу и предложите решение, например, показав, как найти нужную информацию \"\n\"в стандартной библиотеке.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"На этом всё, удачи в прохождении курса! Мы надеемся, что вам будет так же \"\n\"весело, как и нам!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Пожалуйста, [оставьте отзыв](https://github.com/google/comprehensive-rust/\"\n\"discussions/86), чтобы мы могли продолжать совершенствовать курс. Мы хотели \"\n\"бы услышать, что было хорошо и что можно сделать лучше. Ваши студенты также \"\n\"могут [присылать нам свои отзывы](https://github.com/google/comprehensive-\"\n\"rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Расписание курса:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Добро пожаловать](../welcome-day-1.md) (5 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Кортежи и массивы](../tuples-and-arrays.md) (35 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (55 minutes)\"\nmsgstr \"[Ссылки](../references.md) (55 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[Определяемые пользователем типы](../user-defined-types.md) (50 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](../welcome-day-2.md) (3 минуты)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[Шаблоны и сопоставление](../pattern-matching.md) (1 час)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\nmsgstr \"[Методы и типажи](../methods-and-traits.md) (50 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (4 hours, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (40 minutes)\"\nmsgstr \"[Обобщения](../generics.md) (40 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](../welcome-day-3.md) (3 минуты)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[Управление памятью](../memory-management.md) (1 час)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[Умные указатели](../smart-pointers.md) (55 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (55 minutes)\"\nmsgstr \"[Заимствование](../borrowing.md) (55 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\nmsgstr \"[Время жизни ссылок](../lifetimes.md) (50 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](../welcome-day-4.md) (3 минуты)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[Модули](../modules.md) (40 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[Тестирование](../testing.md) (45 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (55 minutes)\"\nmsgstr \"[Обработка ошибок](../error-handling.md) (55 минут)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Глубокое погружение\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"В дополнение к 4-х дневному курсу по основам Rust, мы рассмотрим ещё \"\n\"несколько специализированных тем:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Android Deep Dive](../android.md) --- это полудневный курс по использованию \"\n\"Rust для разработки на платформе Android. Сюда входит взаимодействие с C, C+\"\n\"+ и Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Вам потребуется [AOSP](https://source.android.com/docs/setup/download/\"\n\"downloading). Загрузите [репозиторий курса](https://github.com/google/\"\n\"comprehensive-rust) на тот же компьютер, что и курс и переместите каталог \"\n\"`src/android/` в корневой каталог вашего AOSP. Это гарантирует, что система \"\n\"сборки Android увидит файлы `Android.bp` в `src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Убедитесь, что `adb sync` работает с вашим эмулятором или реальным \"\n\"устройством, и предварительно соберите все примеры Android, используя `src/\"\n\"android/build_all.sh`. Прочтите скрипт, чтобы увидеть команды, которые он \"\n\"запускает, и убедитесь, что они работают, когда вы запускаете их вручную.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Bare-Metal Deep Dive](../bare-metal.md): занятие на полный день по \"\n\"использованию Rust для низкоуровневой (embedded) разработки. Рассматриваются \"\n\"как микроконтроллеры, так и прикладные процессоры.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Что касается части микроконтроллеров, то вам нужно будет заранее приобрести \"\n\"плату разработки [BBC micro:bit](https://microbit.org/) v2. Всем нужно будет \"\n\"установить несколько пакетов, как описано на [странице приветствия](../bare-\"\n\"metal.md).\"\n\n# Discussible\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Конкурентная многозадачность в Rust\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Concurrency Deep Dive](../concurrency.md) это целый день занятий по \"\n\"классической, а также `async`/`await` конкурентности.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Вам понадобится настроенный новый крейт, а также загруженные зависимости, \"\n\"готовые к работе. Затем вы можете скопировать примеры в `src/main.rs`, чтобы \"\n\"поэкспериментировать с ними:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"{{%course outline Concurrency}}\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Формат\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Курс задуман весьма интерактивным, и мы рекомендуем, чтобы вопросы \"\n\"содействовали изучению Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"В mdBook есть несколько полезных сочетаний клавиш:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Стрелка-влево\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Переход на предыдущую страницу.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Стрелка-вправо\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Переход на следующую страницу.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Выполнение примера кода, находящегося в фокусе.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Активировать панель поиска.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"Курс был переведен на другие языки группой замечательных волонтёров:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Бразильский португальский](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) от [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) и \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Китайский (упрощенный)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"от [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK) и [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Китайский (традиционный)](https://google.github.io/comprehensive-rust/zh-\"\n\"TW/) от [@hueich](https://github.com/hueich), [@victorhsieh](https://github.\"\n\"com/victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen]\"\n\"(https://github.com/kuanhungchen) и [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Корейский](https://google.github.io/comprehensive-rust/ko/) от [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan) и [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Испанский](https://google.github.io/comprehensive-rust/es/) от [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Используйте кнопку выбора языка в правом верхнем углу для переключения между \"\n\"языками.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Незавершённые переводы\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Бенгальский](https://google.github.io/comprehensive-rust/bn/) от \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Французский](https://google.github.io/comprehensive-rust/fr/): [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) и \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Немецкий](https://google.github.io/comprehensive-rust/de/) от [@Throvn]\"\n\"(https://github.com/Throvn) и [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[Японский](https://google.github.io/comprehensive-rust/ja/) от [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) и [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Итальянский](https://google.github.io/comprehensive-rust/it/) от \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) и [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Если вы хотите помочь в этом, пожалуйста, ознакомьтесь с [our instructions]\"\n\"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) о \"\n\"том, как приступить к работе. Переводы координируются с помощью [issue \"\n\"tracker](https://github.com/google/comprehensive-rust/issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Когда вы начнете читать о Rust, то вскоре познакомитесь с [Cargo](https://\"\n\"doc.rust-lang.org/cargo/), стандартным инструментом, используемым в \"\n\"экосистеме Rust для создания и запуска приложений. Здесь мы хотим дать \"\n\"краткий обзор того, что такое Cargo и как он вписывается в более широкую \"\n\"экосистему и в этот курс.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Установка\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Наряду с Cargo и rustc, Rustup будет установлен как утилита командной \"\n\"строки, которую вы можете использовать для установки/переключения наборов \"\n\"инструментов, настройки кросс-компиляции и т. д.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"В Debian/Ubuntu вы можете установить Cargo, исходный код Rust и [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) с помощью\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Экосистема Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Экосистема Rust состоит из ряда инструментов, основными из которых являются:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: компилятор Rust, который превращает файлы `.rs` в исполняемые файлы \"\n\"и другие промежуточные форматы.\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: менеджер зависимостей Rust и инструмент сборки. Cargo знает, как \"\n\"загрузить зависимости, размещённые на <https://crates.io>, и передать их \"\n\"`rustc` при сборке вашего проекта. Cargo также поставляется со встроенным \"\n\"иструментом запуска тестов, который используется для выполнения модульных \"\n\"тестов.\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: программа установки и обновления набора инструментов Rust. Этот \"\n\"инструмент используется для установки и обновления rustc и cargo при выходе \"\n\"новых версий Rust. Кроме того, `rustup` также может загружать документацию \"\n\"стандартной библиотеки. У вас может быть установлено несколько версий Rust \"\n\"одновременно и `rustup` позволит вам переключаться между ними по мере \"\n\"необходимости.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/pattern-matching/destructuring.md\n#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Ключевые моменты:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"У Rust стремительный график релизов: новая версия выходит каждые шесть \"\n\"недель. Новые версии поддерживают обратную совместимость со старыми версиями \"\n\"--- в дополнение они предоставляют новые функциональные возможности.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Существует три вида релизов: ”stable”, ”beta” и ”nightly”.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Новые функции тестируются на ”nightly”, ”beta” --- это то, что становится \"\n\"”stable” каждые шесть недель.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"У Rust также есть \\\\[редакции\\\\]: текущая редакция --- Rust 2021. \"\n\"Предыдущими редакциями были Rust 2015 и Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"Редакциями позволено вносить обратно--несовместимые изменения в язык.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Чтобы избежать сбоев, редакцию для своего пакета можно явно указать в файле \"\n\"`Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Чтобы избежать разделения экосистемы, компилятор Rust может смешивать код, \"\n\"написанный для разных редакций.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Стоит упомянуть, что использование компилятора напрямую, а не через `cargo`, \"\n\"является редким явлением (большинство пользователей никогда этого не делают).\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Cargo сам по себе является чрезвычайно мощным и всеобъемлющим инструментом. \"\n\"Он поддерживает множество дополнительных функций, включая, помимо прочего:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Структура проекта/пакета\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Управление зависимостями для разработки (dev) и времени выполнения (runtime)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Он также расширяем с помощью плагинов подкоманд (таких как [cargo clippy]\"\n\"(https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Подробнее читайте в [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Примеры кода в этом курсе\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"В этом курсе мы в основном будем изучать язык Rust на примерах, которые \"\n\"могут быть выполнены в вашем браузере. Это значительно упрощает настройку и \"\n\"обеспечивает единообразный опыт для всех.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Установка Cargo по-прежнему рекомендуется: это облегчит вам выполнение \"\n\"упражнений. В последний день мы выполним более масштабное упражнение, \"\n\"которое покажет вам, как работать с зависимостями, и для этого вам \"\n\"понадобится Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Блоки кода в этом курсе полностью интерактивны:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Вы можете использовать \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" для выполнения кода, когда фокус ввода находится в текстовом поле.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Большинство примеров кода доступны для редактирования, как показано выше. \"\n\"Несколько примеров кода недоступны для редактирования по разным причинам:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Встроенный в страницу редактор кода не может запускать модульные тесты. \"\n\"Скопируйте код и откройте его в Rust Playground, чтобы продемонстрировать \"\n\"модульные тесты.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Встроенные в страницу редакторы кода теряют своё состояние в тот момент, \"\n\"когда вы уходите со страницы! Именно по этой причине учащиеся должны \"\n\"выполнять упражнения, используя локальную установку Rust или Rust Playground.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Запуск кода локально с помощью Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Если вы хотите поэкспериментировать с кодом на своей системе, то вам нужно \"\n\"будет сначала установить Rust. Сделайте это, следуя [инструкциям в The Rust \"\n\"Book](https://doc.rust-lang.org/book/ch01-01-installation.html). В вашей \"\n\"системе появятся инструменты `rustc` и `cargo`. На момент написания статьи \"\n\"последний стабильный выпуск Rust имеет следующие версии:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"После этого выполните следующие шаги, чтобы собрать исполняемый файл на \"\n\"основе одного из примеров в этом курсе:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Нажмите кнопку ”Copy to clipboard” на примере кода, который вы хотите \"\n\"скопировать.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Используйте `cargo new exercise`, чтобы создать новую директорию `exercise/` \"\n\"для вашего кода:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Перейдите в директорию `exercise/` и выполните `cargo run` для сборки и \"\n\"запуска исполняемого файла:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Замените шаблонный код в `src/main.rs` своим кодом. Например, используя \"\n\"пример кода с предыдущей страницы, сделайте `src/main.rs` похожим на\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Используйте `cargo run` для сборки и запуска обновленного исполняемого файла:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Используйте `cargo check` для быстрой проверки проекта на наличие ошибок и \"\n\"`cargo build` для компиляции проекта без его запуска. Вы найдете результат в \"\n\"директории `target/debug/` для отладочной сборки. Используйте `cargo build --\"\n\"release` для создания оптимизированной финальной сборки в `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Вы можете добавить зависимости для вашего проекта, отредактировав файл \"\n\"`Cargo.toml`. Когда вы запустите команду `cargo`, она автоматически загрузит \"\n\"и скомпилирует недостающие зависимости для вас.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Предложите участникам занятия установить Cargo и использовать локальный \"\n\"редактор. Это облегчит им жизнь, так как у них будет подходящая среда \"\n\"разработки.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Добро пожаловать в День 1\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"Это первый день курса. Сегодня мы пройдёмся по многим темам:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Базовый синтаксис Rust: переменные, скалярные и составные типы, \"\n\"перечисления, структуры, ссылки, функции и методы.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Расписание\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"In this session:\"\nmsgstr \"В этом занятии:\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[Добро пожаловать](./welcome-day-1.md) (5 минут)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\nmsgstr \"[Типы и значения](./types-and-values.md) (40 минут)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"[Управляющие конструкции](./control-flow-basics.md) (40 минут)\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 2-х часов и 5-и минут.\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Пожалуйста, напомните студентам, что:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Они могут задавать вопросы по мере их появления, не откладывая их до конца.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"Занятие задумано как интерактивное, и дискуссии крайне приветствуются!\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Как преподаватель, вы должны стараться поддерживать релевантность дискуссий, \"\n\"например, поддерживать обсуждения, связанные с тем, как в Rust делается что-\"\n\"либо в сравнении с каким--либо другим языком.  Бывает трудно найти \"\n\"правильный баланс, но все же сделайте выбор в пользу наличия дискуссий, \"\n\"поскольку они вовлекают учащихся гораздо больше, чем одностороннее общение.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Часто вопросы будут приводить к обсуждениям, опережающим порядок показа \"\n\"слайдов.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Это совершенно нормально! Повторение --- важная часть обучения. Помните, что \"\n\"слайды --- это всего лишь вспомогательный материал, и вы вольны пропускать \"\n\"их по  своему усмотрению.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"In this segment:\"\nmsgstr \"В этом сегменте:\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"Сегмент займёт примерно 15 минут.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust --- это новый язык программирования, [версия 1.0](https://blog.rust-\"\n\"lang.org/2015/05/15/Rust-1.0.html) которого была выпущена в 2015 году:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Rust --- это статически компилируемый язык, выступающий в той же роли, что и \"\n\"C++.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` использует LLVM в качестве бэкенда.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust поддерживает множество [платформ и архитектур](https://doc.rust-lang.\"\n\"org/nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, …\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, …\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust используется для широкого спектра устройств:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"прошивки и загрузчики,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"смарт-экраны,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"мобильные устройства,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"настольные компьютеры,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"серверы.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust подходит для той же области, что и C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Высокая гибкость.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Высокий уровень контроля.\"\n\n#: src/hello-world/what-is-rust.md\n#, fuzzy\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Может использоваться на очень ограниченных устройствах, таких как мобильные \"\n\"телефоны.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Не имеет среды выполнения или сборки мусора.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Ориентирован на надежность и безопасность без ущерба для производительности.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Некоторые уникальные преимущества Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Нет неинициализированных переменных.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Нет двойных освобождений.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Нет использования-после-освобождения (use-after-free).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Нет `NULL` указателей.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Нет забытых заблокированных мьютексов.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Нет гонок данных между потоками.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Нет инвалидации итераторов.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Проверка границ массива.\"\n\n#: src/hello-world/benefits.md\n#, fuzzy\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Определено целочисленное переполнение.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Перечисления и сопоставление с образцом.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Обобщения (generics).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"Нет накладных расходов для FFI.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Абстракции с нулевой стоимостью (zero-cost abstractions).\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Отличные ошибки компилятора.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Встроенный менеджер зависимостей.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Встроенная поддержка тестирования.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Великолепная поддержка протокола языкового сервера (LSP).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Обязательно спросите учащихся, с какими языками у них есть опыт работы. В \"\n\"зависимости от ответа вы можете подчеркнуть различные особенности Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Опыт работы с C или C++: Rust устраняет целый класс _ошибок времени \"\n\"выполнения_ с помощью анализатора заимствований. Вы получаете \"\n\"производительность, как в C и C++, минуя проблем с безопасностью памяти. \"\n\"Кроме того, вы получаете современный язык с такими конструкциями, как \"\n\"сопоставление с образцом и встроенное управление зависимостями.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"Опыт работы с Java, Go, Python, JavaScript…: Вы получаете ту же безопасность \"\n\"памяти, что и в этих языках, плюс схожее чувство языка высокого уровня. В \"\n\"дополнение к этому, вы получаете высокую и предсказуемую производительность, \"\n\"такую как в C и C++ (без сборщика мусора), а также доступ к аппаратному \"\n\"обеспечению (если он понадобится).\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\n# Follow the page title (Привет, мир!) with an exclamation mark\n#: src/types-and-values.md\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Привет, мир!](./types-and-values/hello-world.md) (5 минут)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[Переменные](./types-and-values/variables.md) (5 минут)\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[Литералы](./types-and-values/values.md) (5 minutes)\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[Арифметические операции](./types-and-values/arithmetic.md) (3 минуты)\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[Выведение типов](./types-and-values/inference.md) (3 минуты)\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Упражнение: Числа Фибоначчи](./types-and-values/exercise.md) (15 minutes)\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/generics.md\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"Сегмент займёт примерно 40 минут.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Давайте перейдём к самой простой из возможных программ на Rust, классической \"\n\"программе Привет, мир!\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Что вы видите:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Функции объявляются с помощью `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Блоки разделяются фигурными скобками, как в C и C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Функция `main` является точкой входа в программу.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"В Rust есть макросы, например `println!`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"Строки закодированы в UTF-8 и могут содержать любой символ Юникода.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"На этом слайде мы пытаемся помочь студентам ознакомиться с кодом на Rust. В \"\n\"течение следующих четырёх дней они увидят его в большом количестве, поэтому \"\n\"мы начинаем с чего-то знакомого.\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust очень похож на другие языки, такие как C/C++/Java. Rust императивный \"\n\"(не функциональный), и он не пытается что--то изобретать заново без крайней \"\n\"необходимости.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"\"\n\"Rust --- это современный язык с полной поддержкой таких вещей, как Юникод.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust использует макросы для ситуаций, когда вы хотите иметь переменное \"\n\"количество аргументов (без [перегрузки](../control-flow-basics/functions.md) \"\n\"функций).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"„Гигиеничность“ макросов означает, что они случайно не захватывают \"\n\"идентификаторы из области, в которой они используются. Макросы в Rust на \"\n\"самом деле гигиеничны лишь [частично](https://veykril.github.io/tlborm/decl-\"\n\"macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Типы\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Литералы\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Знаковые целые числа\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Беззнаковые целые числа\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Числа с плавающей запятой\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Символы Юникода\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Логические значения\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Типы имеют следующие размеры:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` и `fN` -- _N_ бит,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` и `usize` -- размерность указателя,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` -- 32 бита,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` -- 8 бит.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Существует несколько вариантов синтаксиса, которые не показаны выше:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust анализует _использование_ переменной для определения её типа:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Слайд показывает, что компилятор языка выводит неявно заданный тип значения \"\n\"переменной, основываясь на её объявлении и дальнейшем использовании.\"\n\n# Alternative: скомпилированный машинный код\n# but it's too many compile-rooted words around.\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Здесь очень важно отметить, что это отнюдь не динамическая типизация; тип \"\n\"есть и неизменен. Для переменных, объявленных таким образом, сгенерированный \"\n\"машинный код будет идентичен варианту с явным указанием типа. Компилятор \"\n\"лишь берёт на себя часть работы, позволяя писать более лаконичный код.\"\n\n# A note about floating-point numbers.\n# A translation used in Rust book: число с плавающей точкой\n# Broadly used alternative: число с плавающей запятой\n# But. It's a literal value, which never has a comma in representation.\n# Number i18n seems inapplicable here.\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"По умолчанию, в отсутствие ограничений, тип целочисленого литерала будет \"\n\"выведен как `i32`. Что в сообщениях об ошибках иногда показывается как \"\n\"`{integer}`. Аналогично, умолчание для литералов чисел с плавающей точкой \"\n\"--- `f64`\"\n\n# Localization of Rust error messages doesn't seem to be complete.\n# https://github.com/rust-lang/rfcs/issues/1843\n#\n# So keep the messages as close to the actual compiler output as possible:\n# error[E0277]: can't compare `{float}` with `{integer}`\n# ...\n# ...^^^^ no implementation for `{float} == {integer}`\n# ...\n# error[E0308]: mismatched types\n# ...\n# ...^^^^ expected floating-point number, found integer\n#\n# ERROR word is not included in the cited cause, so maybe translated\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ОШИБКА: no implementation for `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[Выражение `if`](./control-flow-basics/if.md) (4 минуты)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[Циклы](./control-flow-basics/loops.md) (5 минут)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"[break и continue](./control-flow-basics/break-continue.md) (4 минуты)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\"[Блоки и области видимости](./control-flow-basics/blocks-and-scopes.md) (5 \"\n\"минут)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[Функции](./control-flow-basics/functions.md) (3 минуты)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[Макросы](./control-flow-basics/macros.md) (2 минуты)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Упражнение: Последовательность Коллатца](./control-flow-basics/exercise.md) \"\n\"(15 минут)\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Выражение `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"[Выражение `if`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) работает так же, как и оператор `if` в других языках:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Помимо этого, можно использовать `if` как выражение. Последнее выражение  \"\n\"внутри одного из блоков (в зависимости от значения условия) становится  \"\n\"значением всего выражения `if`:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Обе ветки выражения `if` должны быть одинакового типа. Попробуйте показать, \"\n\"что происходит, если добавить `;` после `x / 2` во втором примере.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"Выражение `while`\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[Ключевое слово `while`](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops)\\n\"\n\"работает примерно так же, как и в других языках программирования\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Блоки\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Блоки в языке Rust имеют тип и значение, которые равны типу и значению \"\n\"последнего выражения в блоке. Например:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Однако, если за последним выражением в блоке следует `;`, то результатом \"\n\"такого  блока (а также его тип) будет `()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Можно показать, как меняется значение блока при изменении последней строки  \"\n\"в блоке. Например, можно добавить/убрать точку с запятой или использовать \"\n\"`return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"В объявлении функции за каждым параметром следует его тип (противоположно \"\n\"некоторым языкам программирования), затем тип возвращаемого значения.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Последнее выражение в теле функции (или любом блоке) становится возвращаемым \"\n\"значением. Просто отбросьте символ `;` в конце выражения.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Некоторые функции не имеют возвращаемого значения и возвращают ‘тип unit’, \"\n\"`()`. Компилятор определит это, если возвращаемый тип `-> ()` не указан.\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Каждая функция имеет единственную реализацию:\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"Всегда принимает один набор типов параметров.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Добро пожаловать\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[Кортежи и массивы](./tuples-and-arrays.md) (35 минут)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (55 minutes)\"\nmsgstr \"[Ссылки](./references.md) (55 минут)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"[Определяемые пользователем типы](./user-defined-types.md) (50 минут)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 2-х часов и 35-и минут.\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"[Массивы](./tuples-and-arrays/arrays.md) (5 минут)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"[Кортежи](./tuples-and-arrays/tuples.md) (5 минут)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"[Обход массивов](./tuples-and-arrays/iteration.md) (3 минуты)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"[Деструктуризация](./tuples-and-arrays/destructuring.md) (5 минут)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"[Упражнение: Вложенные массивы](./tuples-and-arrays/exercise.md) (15 минут)\"\n\n# Not quite clear who is an addressee of the duration info.\n# Should it be the speaker, than the better translation would be:\n#   На сегмент следует отвести около 35 минут\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"Сегмент займёт примерно 35 минут.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Значение массива `[T; N]` содержит `N` элементов одинакового типа `T`. Где \"\n\"`N` (длина массива) --- это константа времени компиляции. Следует обратить \"\n\"внимание, что длина является _частью типа_, как следствие `[u8; 3]` и `[u8; \"\n\"4]` --- это разные типы. Срезы, длина которых определяется во время \"\n\"выполнения, рассматриваются в курсе позднее.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"Попробуйте обратиться к элементу за пределами массива. Проверка границ \"\n\"доступа осуществляется во время выполнения. Компилятор может опустить такие \"\n\"проверки при оптимизации кода. Также их можно исключить используя \"\n\"небезопасные методы языка.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Мы можем использовать литералы для присваивания значений массивам.\"\n\n# Struggled to make a clear translation without explicitly mentioning\n# the formatting traits...\n# Should not that much confuse attendees, since it's in the speaker notes.\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"Параметр форматирования `?` предписывает макросу `println!` запросить \"\n\"реализацию трейта отладочного вывода: `{}` запрашивает форматирование по \"\n\"умолчанию (`std::fmt::Display`), `{:?}` -- отладочное представление (`std::\"\n\"fmt::Debug`). Другие, например, целочисленные типы и строки реализуют трейт \"\n\"`Display`, но для массовов реализован только трейт `Debug`. Поэтому \"\n\"использование `{:?}` здесь обязательно.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Добавление `#`, например `{a:#?}`, позволяет использовать более наглядный \"\n\"формат \\\"красивой печати\\\", с отступами и переносами строк.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Как и массивы, кортежи имеют фиксированную длину.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Кортежи группируют значения разных типов в составной тип.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Доступ к полям кортежа можно получить используя точку и индекс значения, \"\n\"например `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"Пустой кортеж `()` называется _единичным типом_ и обозначает пустое значение \"\n\"или пустой возвращаемый тип. Сходно с использованием `void` в других языках.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"Выражение `for` позволяет обходить элементы массива (но не кортежа).\"\n\n# Could it be \"на четвёртый день курса\"?\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Циклы используют типаж `IntoIterator`, который подробно рассматривается в \"\n\"четвёртый день курса.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"Нововведение здесь -- это макрос `assert_ne!`. Он, а также макросы \"\n\"`assert_eq!` and `assert!` проверяются всегда. В то время как отладочные \"\n\"варианты, например `debug_assert!`, исключаются при компиляции релизных \"\n\"сборок.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"При работе с кортежами и другими структурированными значениями часто \"\n\"возникает потребность извлечь внутренние значения в локальные переменные. \"\n\"Это можно сделать непосредственно обратившись к внутренним значениям:\"\n\n# left & right - are variables names - no translation needed\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"left: {left}, right: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"Rust, однако, поддерживает синтаксис присваивания с разложением по шаблону \"\n\"большего значения на составные части:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Используемые здесь шаблоны являются \\\"неопровержимыми\\\", что означает, что \"\n\"компилятор может статически проверить, что значение справа от `=` имеет ту \"\n\"же структуру, что и шаблон.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Имя переменной -- это неопровержимый шаблон, который всегда соответствует \"\n\"любому значению, отсюда возможность использовать `let` для объявления \"\n\"единственной переменной.\"\n\n# Alternative to деструктуризацию: распаковку\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust также поддерживает использование шаблонов в условных выражениях, \"\n\"позволяя одновременно выполнять сравнение на равенство и деструктуризацию. \"\n\"Этот вариант использования шаблонов подробно рассматривается позднее.\"\n\n# It seems weird to edit the first chunk of code with indexed access.\n# Hence example is translated in singular,\n# referring to the only last (second) code snippet\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Отредактируйте пример, чтобы показать ошибку компиляции, когда шаблон не \"\n\"соответствует сопоставляемому значению.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Элементами массива также могут быть массивы:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"Каков тип этой переменной?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Используя приведенное выше, реализуйте функцию `transpose`, которая \"\n\"транспонирует матрицу (заменит строки в столбцы):\"\n\n# Multiplication sign \"×\" looks better than just \"x\"\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Скопируйте приведенный ниже код в <https://play.rust-lang.org/> и напишите \"\n\"реализацию функции транспонирования. Считать, что размер передаваемой на \"\n\"вход матрицы -- всегда 3×3.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: удалить после реализации.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n# Alternatives:\n# комментарий вынуждает rustfmt сохранить форматирование - better, but too long\n# комментарий для rustfmt, сохраняет форматирование\n# rustfmt воспроизведёт перенос на новую строку - almost\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- rustfmt сохранит перенос на следующую строку\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"Исходная матрица: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"Транспонированная матрица: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Strings](./references/strings.md) (10 minutes)\"\nmsgstr \"\"\n\"Больше информации об использовании шаблонов в языке Rust можно найти на \"\n\"[странице про сопоставление с шаблоном](../pattern-matching.md).\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/error-handling.md src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"Сегмент займёт примерно 55 минут.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust статически запрещает висячие ссылки:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"В некоторых случаях Rust будет автоматически разыменовывать ссылки, в \"\n\"частности, при вызове методов (попробуйте `ref_x.count_ones()`).\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"Мы подробнее поговорим о заимствовании, когда перейдем к владению.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Обратите внимание на разницу между `let mut ref_x: &i32` и `let ref_x: &mut \"\n\"i32`. Первая представляет собой изменяемую ссылку, которая может быть \"\n\"привязана к разным значениям, в то время как вторая --- ссылку на изменяемое \"\n\"значение.\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Срезы\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\"Срезы позволяют ссылаться на непрерывную последовательность элементов в \"\n\"коллекции:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Срезы заимствуют данные у коллекции.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"Вопрос: Что произойдет, если вы измените значение в `a[3]`?\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Мы создаем срез, заимствуя `a` и указывая начальный и конечный индексы в \"\n\"скобках.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Если срез начинается с индекса 0, синтаксис Rust позволяет отбросить \"\n\"начальный индекс, таким образом, `&a[0..a.len()]` и `&a[..a.len()]` \"\n\"идентичны .\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"То же верно и для последнего индекса, поэтому `&a[2..a.len()]` и `&a[2..]` \"\n\"идентичны.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"Чтобы создать срез всего массива, можно использовать `&a[..]`.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` --- это ссылка на срез элементов типа `i32`. Обратите внимание, что тип \"\n\"`s` (`&[i32]`) больше не указывает длину массива. Это позволяет выполнять \"\n\"вычисления на срезах разных размеров.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Срезы всегда заимствуют у другого объекта. В этом примере `a` должен \"\n\"оставаться ‘живым’ (в области видимости) по крайней мере столько же, сколько \"\n\"и срез.\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"Вопрос об изменении `a[3]` может породить интересную дискуссию, но ответ \"\n\"заключается в том, что по соображениям безопасности памяти вы не можете \"\n\"сделать это через `a` после создания среза, но можете безопасно читать \"\n\"данные как из `a`, так и из `s`. Более подробная информация будет изложена в \"\n\"разделе анализатора заимствований.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Теперь давайте разберемся с двумя типами строк в Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`String` is an owned, heap-allocated buffer of UTF-8 bytes.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"Привет, мир!\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` представляет срез строки, который является неизменяемой ссылкой на \"\n\"строковые данные в кодировке UTF-8, хранящиеся в памяти. Строковые литералы \"\n\"(`”Hello”`) хранятся в исполняемом файле программы.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"Тип `String` в Rust --- это обертка вокруг вектора байтов.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Как и во многих других типах, `String::from()` создает строку из строкового \"\n\"литерала; `String::new()` создает новую пустую строку, в которую строковые \"\n\"данные могут быть добавлены с помощью методов `push()` и `push_str()`.\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"Макрос `format!()` --- это удобный способ сгенерировать строку из \"\n\"динамических значений. Он принимает ту же строку формата, что и `println!()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Для программистов на C++: думайте о `&str` как о `const char*` из C++, но \"\n\"таком, который всегда указывает на корректную строку в памяти. `String` в \"\n\"Rust --- это примерный эквивалент `std::string` из C++ (основное отличие: \"\n\"она может содержать только байты в кодировке UTF-8 и не будет использовать \"\n\"оптимизацию для небольших строк).\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"Байтовые строки позволяют создать значение `&[u8]`:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Сырые строки позволяют создавать значение `&str` с отключенным \"\n\"экранированием: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Вы можете поставить двойные \"\n\"кавычки, используя равное количество символов `#` с обеих сторон кавычек:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\n#, fuzzy\nmsgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\nmsgstr \"\"\n\"Больше информации об использовании шаблонов в языке Rust можно найти на \"\n\"[странице про сопоставление с шаблоном](../pattern-matching.md).\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"Сегмент займёт примерно 50 минут.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Байтовые строки позволяют создать значение `&[u8]`:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"Добро пожаловать в День 1\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](./welcome-day-2.md) (3 минуты)\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"\"\n\"Больше информации об использовании шаблонов в языке Rust можно найти на \"\n\"[странице про сопоставление с шаблоном](../pattern-matching.md).\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 2-х часов и 10-и минут.\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"\"\n\"Больше информации об использовании шаблонов в языке Rust можно найти на \"\n\"[странице про сопоставление с шаблоном](../pattern-matching.md).\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md src/memory-management.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"Сегмент займёт примерно 1 час.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"Выражение `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"Выражение `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[Выражение `if let`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions) позволяет выполнять разные ветки кода в зависимости \"\n\"от того, соответствует ли какое-либо  значение шаблону или нет:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"Выражение `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Аналогично выражению `if let` существует [выражение`while let`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#predicate-pattern-\"\n\"loops),\\n\"\n\"которое в цикле проверяет сопоставление какого-либо выражения шаблону:\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Здесь `next()`-итератор, возвращённый выражением `v.into_iter()`, возвращает \"\n\"объект типа `Option<i32>`.\\n\"\n\"Сначала будет возращаться `Some(x)` для каждого элемента вектора,\\n\"\n\"после чего `next()` вернёт `None`. Выражение `while let` позволяет нам \"\n\"лаконично\\n\"\n\"проитерировать все значения вектора.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"`if let` может быть более лаконично, чем `match`. Например, когда нужно \"\n\"проверить только один вариант. Выражение `match`, напротив, требует проверки \"\n\"всех вариантов.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"Типичным случаем использования является проверка на значение `Some` при \"\n\"работе с типом `Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"В отличие от выражения `match`, `if let` не позволяет использовать охранные \"\n\"выражения.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"Выражение `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Уточнить, что циклы `while let` будут продолжаться до тех пор, пока значение \"\n\"будет соответствовать шаблону.\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Этот цикл можно переписать как бесконечный цикл, который прерывается, когда \"\n\"результат `iter.next()` перестаёт соответствовать `Some(x)`. Выражение \"\n\"`while let` позволяет описать ту же самую логику более лаконично.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"\"\n\"Больше информации об использовании шаблонов в языке Rust можно найти на \"\n\"[странице про сопоставление с шаблоном](../pattern-matching.md).\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Упражнение: Журнал событий\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Generics](./generics.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"Including 10 minute breaks, this session should take about 4 hours\"\nmsgstr \"Вместе с 10-ти минутными паузами урок займёт около 4-х часов.\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::From(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"This segment should take about 1 hour and 20 minutes\"\nmsgstr \"Сегмент займёт примерно 1 час и 20 минут.\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Содержимое интерпретируется как Markdown. Все опубликованные крейты \"\n\"библиотек Rust автоматически документируются на [`docs.rs`](https://docs.rs) \"\n\"с помощью инструмента [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-\"\n\"rustdoc.html). Документирование всех общедоступных элементов API используя \"\n\"этот подход является идиоматичным.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Покажите стедентам сгенерированную документацию для крейта `rand` в [`docs.\"\n\"rs/rand`](https://docs.rs/rand) .\"\n\n#: src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"Сегмент займёт примерно 1 час и 40 минут.\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](./welcome-day-3.md) (3 минуты)\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 2-х часов и 20-и минут.\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\n# If translated the ASCII images must be updated accordingly\n# (len, capacity, heap contents representation)\n# Keep unchanged for now.\n# TODO: Translate all together\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Hello!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"{name}, привет!\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Алиса\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (55 minutes)\"\nmsgstr \"[Заимствование](./borrowing.md) (55 минут)\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 1-го часа и 55-и минут.\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Errors](./borrowing/examples.md) (3 minutes)\"\nmsgstr \"[Ошибки заимствования](./borrowing/examples.md) (3 минуты)\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Скопируйте приведенный ниже код в <https://play.rust-lang.org/> и реализуйте \"\n\"функции:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n# Literal alternative: Боб\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Борис\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"Добро пожаловать в День 1\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"[Добро пожаловать](./welcome-day-4.md) (3 минуты)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"[Итераторы](./iterators.md) (45 минут)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"[Модули](./modules.md) (40 минут)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"[Тестирование](./testing.md) (45 минут)\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 2-х часов и 40-и минут.\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"Сегмент займёт примерно 45 минут.\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Привет, мир!\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Скопируйте текст программы ниже в <https://play.rust-lang.org/> и напишите \"\n\"дополнительные тесты, раскрывающие недочёты реализации. Исправьте все \"\n\"обнаруженные проблемы.\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (55 minutes)\"\nmsgstr \"[Обработка ошибок](./error-handling.md) (55 минут)\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"Сегмент займёт примерно 1 час и 5 минут.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Привет, мир!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n# Alternative: Непредсказуемое поведение\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// Неопределённое поведение!\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n# Literal alternative: Тип AIDL\n# But as a table column caption language abbreviation is enough.\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n# Literal alternative: Тип Rust\n# But as a table column caption language name is enough.\n# Type context is right above the table for both primitives and type-mapping.\n#\n# There should be a different translation for android/aidl/types/arrays.md:\n# Unlike other column headers this one should have the \"Type\" word translated\n# Translation: Тип Rust - no msgctxt to differentiate\n#: src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\n#: src/android/aidl/types/arrays.md\nmsgid \"Rust Type\"\nmsgstr \"Rust\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"Примечание\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"`boolean`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"`i8`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"`i32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"`long`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"`i64`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"`double`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"возвращаемое значение\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n# In terms of free == non-member\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"// Свободная функция\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n# Literal alternative: Тип C++\n# But as a table column caption language name is enough. Type mapping context\n# is right above the table in the slide header.\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n# Java binary definition, srcs: [...]\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n# Java binary definition, main_class\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"Мини-упражнение\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Пример:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Встроенная поддержка тестирования.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"Примечания:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n# Table column caption\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Характеристика\"\n\n# Table column caption\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"C++\"\n\n# Table column caption\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"Система сборки\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"Множество\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Ознакомившись с упражнениями, вы можете изучить предоставленные \"\n\"\\\\[solutions\\\\].\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Ознакомившись с упражнениями, вы можете изучить предоставленные \"\n\"\\\\[solutions\\\\].\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Threads](./concurrency/threads.md) (30 minutes)\"\nmsgstr \"[Потоки](./concurrency/threads.md) (30 минут)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Channels](./concurrency/channels.md) (20 minutes)\"\nmsgstr \"[Каналы](./concurrency/channels.md) (20 минут)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Send and Sync](./concurrency/send-sync.md) (15 minutes)\"\nmsgstr \"[Типажи Send и Sync](./concurrency/send-sync.md) (15 минут)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Shared State](./concurrency/shared-state.md) (30 minutes)\"\nmsgstr \"[Разделяемое состояние](./concurrency/shared-state.md) (30 минут)\"\n\n#: src/concurrency/welcome.md\nmsgid \"[Exercises](./concurrency/sync-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Упражнения](./concurrency/sync-exercises.md) (1 час и 10 минут)\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\"Вместе с 10-ти минутными паузами урок займёт около 3-х часов и 20-и минут.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"[Plain Threads](./concurrency/threads/plain.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"[Scoped Threads](./concurrency/threads/scoped.md) (15 minutes)\"\nmsgstr \"\"\n\n# Not quite clear who is an addressee of the duration info.\n# Should it be the speaker, than the better translation would be:\n#   На сегмент следует отвести около 30 минут\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes\"\nmsgstr \"Сегмент займёт примерно 30 минут.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"[Senders and Reveivers](./concurrency/channels/senders-receivers.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"[Unbounded Channels](./concurrency/channels/unbounded.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md\nmsgid \"[Bounded Channels](./concurrency/channels/bounded.md) (10 minutes)\"\nmsgstr \"\"\n\n# Not quite clear who is an addressee of the duration info.\n# Should it be the speaker, than the better translation would be:\n#   На сегмент следует отвести около 20 минут\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes\"\nmsgstr \"Сегмент займёт примерно 20 минут.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"[Marker Traits](./concurrency/send-sync/marker-traits.md) (2 minutes)\"\nmsgstr \"[Массивы](./tuples-and-arrays/arrays.md) (5 минут)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Send](./concurrency/send-sync/send.md) (2 minutes)\"\nmsgstr \"[Send](./concurrency/send-sync/send.md) (2 минуты)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Sync](./concurrency/send-sync/sync.md) (2 minutes)\"\nmsgstr \"[Sync](./concurrency/send-sync/sync.md) (2 минуты)\"\n\n#: src/concurrency/send-sync.md\nmsgid \"[Examples](./concurrency/send-sync/examples.md) (10 minutes)\"\nmsgstr \"[Примеры](./concurrency/send-sync/examples.md) (10 минут)\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Arc](./concurrency/shared-state/arc.md) (5 minutes)\"\nmsgstr \"[Arc](./concurrency/shared-state/arc.md) (5 минут)\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Mutex](./concurrency/shared-state/mutex.md) (15 minutes)\"\nmsgstr \"[Mutex](./concurrency/shared-state/mutex.md) (15 минут)\"\n\n#: src/concurrency/shared-state.md\nmsgid \"[Example](./concurrency/shared-state/example.md) (10 minutes)\"\nmsgstr \"[Пример](./concurrency/shared-state/example.md) (10 минут)\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Обедающие философы](./concurrency/sync-exercises/dining-philosophers.md) \"\n\"(20 минут)\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"\"\n\"[Multi-threaded Link Checker](./concurrency/sync-exercises/link-checker.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md\nmsgid \"[Solutions](./concurrency/sync-exercises/solutions.md) (30 minutes)\"\nmsgstr \"[Решения](./concurrency/sync-exercises/solutions.md) (30 минут)\"\n\n# Not quite clear who is an addressee of the duration info.\n# Should it be the speaker, than the better translation would be:\n#   На сегмент следует отвести примерно столько-то времени\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"Сегмент займёт примерно 1 час и 10 минут.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Async Basics](./concurrency/async.md) (30 minutes)\"\nmsgstr \"[Основы асинхронности](./concurrency/async.md) (30 минут)\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"[Channels and Control Flow](./concurrency/async-control-flow.md) (20 minutes)\"\nmsgstr \"\"\n\n# Following Rust book (foreword)\n# Alternatives:\n#   Ловушки\n#   Частые ошибки\n#: src/concurrency/welcome-async.md\nmsgid \"[Pitfalls](./concurrency/async-pitfalls.md) (55 minutes)\"\nmsgstr \"[Подводные камни](./concurrency/async-pitfalls.md) (55 минут)\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"[Exercises](./concurrency/async-exercises.md) (1 hour and 10 minutes)\"\nmsgstr \"[Упражнения](./concurrency/async-exercises.md) (1 час и 10 минут)\"\n\n#: src/concurrency/async.md\nmsgid \"[async/await](./concurrency/async/async-await.md) (10 minutes)\"\nmsgstr \"[async/await](./concurrency/async/async-await.md) (10 минут)\"\n\n#: src/concurrency/async.md\nmsgid \"[Futures](./concurrency/async/futures.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[Runtimes](./concurrency/async/runtimes.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"[Tasks](./concurrency/async/tasks.md) (10 minutes)\"\nmsgstr \"[Задачи](./concurrency/async/tasks.md) (10 минут)\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"\"\n\"[Async Channels](./concurrency/async-control-flow/channels.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Join](./concurrency/async-control-flow/join.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow.md\nmsgid \"[Select](./concurrency/async-control-flow/select.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Blocking the Executor](./concurrency/async-pitfalls/blocking-executor.md) \"\n\"(10 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"[Pin](./concurrency/async-pitfalls/pin.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Async Traits](./concurrency/async-pitfalls/async-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"[Cancellation](./concurrency/async-pitfalls/cancellation.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Dining Philosophers](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\nmsgstr \"\"\n\"[Обедающие философы](./concurrency/async-exercises/dining-philosophers.md) \"\n\"(20 minutes)\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"\"\n\"[Broadcast Chat Application](./concurrency/async-exercises/chat-app.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises.md\nmsgid \"[Solutions](./concurrency/async-exercises/solutions.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.37.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.2\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Поток управления\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"\"\n#~ \"Запрограммируйте обе функции так, чтобы они работали с матрицами размером \"\n#~ \"3 × 3.\"\n\n#, fuzzy\n#~ msgid \"String References\"\n#~ msgstr \"Висячие ссылки\"\n\n#, fuzzy\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` --- изменяемый строковый буфер.\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"Большая часть синтаксиса Rust будет знакома вам по C, C++ или Java:\"\n\n#, fuzzy\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"Блоки и области видимости разделены фигурными скобками.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"Строковые комментарии начинаются с `//`, блочные комментарии заключены в \"\n#~ \"`/* …*/`.\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"Ключевые слова, такие как `if` и `while`, работают так же.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"\"\n#~ \"Присваивание переменной выполняется с помощью `=`, сравнение выполняется \"\n#~ \"с помощью `==`.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"Объявление массива и доступ к нему:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"Объявление кортежа и доступ к нему:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"Массивы:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"Кортежи:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"Пустой кортеж `()` также известен как ”единичный тип”. Это одновременно и \"\n#~ \"тип, и единственное допустимое значение этого типа --- и тип, и его \"\n#~ \"значение выражаются как `()`. Он используется, например, для указания \"\n#~ \"того, что функция или выражение не имеет возвращаемого значения, как мы \"\n#~ \"увидим на следующем слайде.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"Вы можете думать о нем как о `void`, который может быть знаком вам по \"\n#~ \"другим языкам программирования.\"\n\n#, fuzzy\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"Функция `main` является точкой входа в программу.\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Терминология Rust:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str` --- неизменяемая ссылка на срез строки.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` --- изменяемый строковый буфер.\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Почему Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Гарантии времени компиляции\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Гарантии времени выполнения\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Современные возможности\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Базовый синтаксис\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String и str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Перегрузка\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Массивы и циклы for\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"Выражение if\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"Выражение for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"Выражение while\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"Выражение if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"Выражение while let\"\n\n#, fuzzy\n#~ msgid \"Storing Books\"\n#~ msgstr \"Строки\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"Курс проходит в быстром темпе и охватывает много вопросов:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"День 2: Составные типы данных, шаблоны (patterns), стандартная библиотека.\"\n\n#, fuzzy\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"День 3: Типажи (traits) и обобщения (generics), обработка ошибок, \"\n#~ \"тестирование, небезопасный Rust.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Это позволит \\\\[rust-analyzer\\\\]\\\\[1\\\\] переходить к определениям в \"\n#~ \"исходном коде. Мы предлагаем использовать [VS Code](https://code.\"\n#~ \"visualstudio.com/) для редактирования кода (поддерживается любой \"\n#~ \"совместимый с LSP редактор).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Некоторым также нравится использовать семейство IDE [JetBrains](https://\"\n#~ \"www.jetbrains.com/clion/), которые выполняют собственный анализ, но имеют \"\n#~ \"свои особенности. Если вы предпочитаете их, вы можете установить [Rust \"\n#~ \"Plugin](https://www.jetbrains.com/rust/). Обратите внимание, что по \"\n#~ \"состоянию на январь 2023 года отладка работает только в CLion.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"Идея первого дня состоит в том, чтобы показать Rust _достаточно_, чтобы \"\n#~ \"иметь возможность говорить о знаменитом анализаторе заимствований. То, \"\n#~ \"как Rust работает с памятью --- важная особенность языка и мы должны \"\n#~ \"показать её студентам с самого начала.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Если вы преподаете в классе, то стоит проработать расписание. Мы \"\n#~ \"предлагаем разбить день на две части (по слайдам):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Утро: с 9:00 до 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Вторая половина дня: с 13:00 до 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Вы, конечно, можете изменять расписание по мере необходимости. \"\n#~ \"Пожалуйста, не забудьте добавить перерывы. Мы рекомендуем делать перерыв \"\n#~ \"каждый час!\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Привет 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Небольшой пример программы на Rust:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Точка входа в программу\\n\"\n#~ \"    let mut x: i32 = 6;  // Объявление изменяемой переменной\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Макрос для печати, наподобие printf\\n\"\n#~ \"    while x != 1 {       // Нет круглых скобок вокруг выражения\\n\"\n#~ \"        if x % 2 == 0 {  // Математика, как и в других языках\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Код реализует гипотезу Коллатца: считается, что цикл всегда будет \"\n#~ \"заканчиваться, но это еще не доказано. Отредактируйте код и \"\n#~ \"поэкспериментируйте с разными входными данными.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Объясните, что все переменные статически типизированы. Попробуйте убрать \"\n#~ \"`i32` чтобы инициировать вывод типа. Попробуйте использовать `i8` и \"\n#~ \"получить целочисленное переполнение.\"\n\n#, fuzzy\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Измените `let mut x` на `let x`, обсудите ошибку компилятора.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Покажите, как `print!` выдает ошибку компиляции, если аргументы не \"\n#~ \"соответствуют строке формата.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Покажите, как нужно использовать `{}` в качестве заполнителя, если вы \"\n#~ \"хотите напечатать выражение, которое сложнее, чем просто одна переменная.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Продемонстрируйте студентам стандартную библиотеку, покажите им, как \"\n#~ \"найти `std::fmt`, который содержит правила мини--языка форматирования. \"\n#~ \"Важно, чтобы учащиеся ознакомились с поиском по стандартной библиотеке.\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Безопасность памяти во время компиляции.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Отсутствие неопределенного поведения во время выполнения.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Современные возможности.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Управление статической памятью во время компиляции:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Нет утечек памяти (_в основном_, см. примечания).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"В (безопасном) Rust возможны утечки памяти. Вот некоторые примеры:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Вы можете использовать [`Box::leak`](https://doc.rust-lang.org/std/boxed/\"\n#~ \"struct.Box.html#method.leak) для утечки указателя. Это может быть \"\n#~ \"использовано для получения инициализированных статических переменных, \"\n#~ \"размерность которых определяется во время выполнения.\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Вы можете использовать [`std::mem::forget`](https://doc.rust-lang.org/std/\"\n#~ \"mem/fn.forget.html), чтобы заставить компилятор “забыть” о значении \"\n#~ \"(значит, что деструктор никогда не будет вызван).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Вы также можете случайно создать ссылочный цикл ([reference cycle]\"\n#~ \"(https://doc.rust-lang.org/book/ch15-06-reference-cycles.html)) с помощью \"\n#~ \"`Rc` или `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"Некоторые могут счесть неограниченное заполнение коллекции утечкой \"\n#~ \"памяти, и Rust не защищает от этого.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"В рамках данного курса ”Отсутствие утечек памяти” следует понимать как \"\n#~ \"”Практически полное отсутствие _случайных_ утечек памяти”.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"Целочисленное переполнение определяется с помощью флага времени \"\n#~ \"компиляции. Варианты --- это либо паника (управляемый сбой программы), \"\n#~ \"либо переполнение (wrap-around). По умолчанию вы получаете панику в \"\n#~ \"режиме отладочной сборки (`cargo build`) и переполнение в режиме \"\n#~ \"финальной (`cargo build --release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"Проверка границ не может быть отключена с помощью флага компилятора. Ее \"\n#~ \"также нельзя отключить напрямую с помощью ключевого слова `unsafe`. \"\n#~ \"Однако `unsafe` позволяет вызывать функции, такие как `slice::\"\n#~ \"get_unchecked`, которые не проверяют границы.\"\n\n#, fuzzy\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust создан с учетом опыта, накопленного за последние 40 лет.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Особенности языка\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Набор инструментов\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Абстракции с нулевой стоимостью, аналогичные C++, означают, что вам не \"\n#~ \"нужно ‘платить’ за высокоуровневые программные конструкции памятью или \"\n#~ \"процессорным временем. Например, написание цикла с использованием `for` \"\n#~ \"должно порождать примерно те же низкоуровневые инструкции, что и при \"\n#~ \"использовании конструкции `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Пожалуй, стоит упомянуть, что перечисления в Rust --- это ‘Алгебраические \"\n#~ \"типы данных’, также известные как ‘тип-сумма’, которые позволяют системе \"\n#~ \"типов выражать такие вещи, как `Option<T>` и `Result<T, E>`.\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Обратите внимание учащихся на важность чтения ошибок компилятора --- \"\n#~ \"многие разработчики привыкли игнорировать длинные выходные сигналы \"\n#~ \"компилятора. Компилятор Rust значительно более многословен, чем другие \"\n#~ \"компиляторы. Он часто предоставляет _полезную_ обратную связь, готовую к \"\n#~ \"копированию и вставке в ваш код.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"Стандартная библиотека Rust невелика по сравнению с такими языками, как \"\n#~ \"Java, Python и Go. Rust не содержит некоторых компонентов, которые вы \"\n#~ \"могли бы счесть стандартными и неотъемлемыми:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"генератор случайных чисел, но см. [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"поддержка SSL или TLS, но см. [rusttls](https://docs.rs/rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"поддержка JSON, но см. [serde_json](https://docs.rs/serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Причина этого заключается в том, что функциональность из стандартной \"\n#~ \"библиотеки не может просто исчезнуть, поэтому она должна быть чрезвычайно \"\n#~ \"стабильной. В приведённых выше примерах сообщество Rust всё ещё работает \"\n#~ \"над поиском наилучшего решения --- и, возможно, для некоторых из этих \"\n#~ \"вещей не существует единого ”наилучшего решения”.\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust поставляется со встроенным менеджером пакетов Cargo, что значительно \"\n#~ \"упрощает загрузку и компиляцию сторонних пакетов. Вследствие этого \"\n#~ \"стандартная библиотека может быть меньше.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Поиск хороших покетов от сторонних разработчиков может стать проблемой. \"\n#~ \"Сайты, такие как <https://lib.rs/> помогают в этом, позволяя сравнивать \"\n#~ \"показатели состояния пакетов, чтобы отыскать подходящие и заслуживающие \"\n#~ \"доверия.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) --- это хорошо \"\n#~ \"поддерживаемая реализация LSP, используемая во многих IDE и текстовых \"\n#~ \"редакторах.\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(r#\\\"<a href=\\\"link.html\\\">link</a>\\\"#);\\n\"\n#~ \"    println!(\\\"<a href=\\\\\\\"link.html\\\\\\\">link</a>\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", b\\\"abc\\\");\\n\"\n#~ \"    println!(\\\"{:?}\\\", &[97, 98, 99]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let t: (i8, bool) = (7, true);\\n\"\n#~ \"    println!(\\\"1st index: {}\\\", t.0);\\n\"\n#~ \"    println!(\\\"2nd index: {}\\\", t.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let t: (i8, bool) = (7, true);\\n\"\n#~ \"    println!(\\\"1-й индекс: {}\\\", t.0);\\n\"\n#~ \"    println!(\\\"2-й индекс: {}\\\", t.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Как и в C++, в Rust есть ссылки:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Мы должны разыменовывать `ref_x` при присваивании значения, аналогично \"\n#~ \"указателям в C и C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"Ссылки, объявленные как `mut`, могут быть привязаны к разным значениям в \"\n#~ \"течение срока жизни.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"\"\n#~ \"Говорят, что ссылка ”заимствует” значение, на которое она ссылается.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust отслеживает время жизни всех ссылок, чтобы убедиться, что они живут \"\n#~ \"достаточно долго.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: [i32; 6] = [10, 20, 30, 40, 50, 60];\\n\"\n#~ \"    println!(\\\"a: {a:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let s: &[i32] = &a[2..4];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"s: {s:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    println!(\\\"массив: {array:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"String и str\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Вы можете заимствовать `&str` срезы из `String` с помощью оператора `&` \"\n#~ \"и , при необходимости, указывать диапазон среза.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Rust--версия знаменитого вопроса для интервью [FizzBuzz](https://en.\"\n#~ \"wikipedia.org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"В `main` мы ссылаемся на функцию, которая определена ниже. При этом ни \"\n#~ \"предварительные объявления, ни заголовки не требуются.\"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"Выражение диапазона в цикле `for` в `fizzbuzz_to()` содержит `=n`, что \"\n#~ \"ведет к включению верхней границы диапазона.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Все языковые элементы в Rust могут быть задокументированы с \"\n#~ \"использованием особого синтаксиса `///`.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"/// Determine whether the first argument is divisible by the second \"\n#~ \"argument.\\n\"\n#~ \"///\\n\"\n#~ \"/// If the second argument is zero, the result is false.\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // Corner case, early return\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // The last expression in a block is the return \"\n#~ \"value\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"/// Определяет, делится ли первый аргумент на второй.\\n\"\n#~ \"///\\n\"\n#~ \"/// Если второй аргумент равен нулю, то результат равен false.\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // Особый случай, досрочное возвращение\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // Последнее выражение в блоке - это возвращаемое \"\n#~ \"значение\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Этот курс не включает rustdoc на слайдах, просто для экономии места, но в \"\n#~ \"реальном коде они должны присутствовать.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"Inner doc комментарии будут рассмотрены позже (на странице о модулях).\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Методы это функции, связанные с типом. Аргумент `self` в методе --- это \"\n#~ \"экземпляр типа, с которым он связан:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Rectangle {\\n\"\n#~ \"    width: u32,\\n\"\n#~ \"    height: u32,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl Rectangle {\\n\"\n#~ \"    fn area(&self) -> u32 {\\n\"\n#~ \"        self.width * self.height\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    fn inc_width(&mut self, delta: u32) {\\n\"\n#~ \"        self.width += delta;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut rect = Rectangle { width: 10, height: 5 };\\n\"\n#~ \"    println!(\\\"old area: {}\\\", rect.area());\\n\"\n#~ \"    rect.inc_width(5);\\n\"\n#~ \"    println!(\\\"new area: {}\\\", rect.area());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"struct Rectangle {\\n\"\n#~ \"    width: u32,\\n\"\n#~ \"    height: u32,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl Rectangle {\\n\"\n#~ \"    fn area(&self) -> u32 {\\n\"\n#~ \"        self.width * self.height\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    fn inc_width(&mut self, delta: u32) {\\n\"\n#~ \"        self.width += delta;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut rect = Rectangle { width: 10, height: 5 };\\n\"\n#~ \"    println!(\\\"старая площадь: {}\\\", rect.area());\\n\"\n#~ \"    rect.inc_width(5);\\n\"\n#~ \"    println!(\\\"новая площадь: {}\\\", rect.area());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Мы подробнее рассмотрим методы в сегодняшнем упражнении и на завтрашнем \"\n#~ \"занятии.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"Добавьте конструктор `Rectangle::new` и вызовите его из `main`:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn new(width: u32, height: u32) -> Rectangle {\\n\"\n#~ \"    Rectangle { width, height }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Добавьте конструктор `Rectangle::new_square(width: u32)`, чтобы показать, \"\n#~ \"что конструкторы могут принимать произвольные параметры.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Перегрузка функций\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Перегрузка не поддерживается:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Всегда принимает фиксированное количество параметров.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Значения по умолчанию не поддерживаются:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Все вызовы имеют одинаковое количество аргументов.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"В качестве альтернативы иногда используются макросы.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Однако параметры функции могут быть обобщенными:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"coin toss: {}\\\", pick_one(\\\"heads\\\", \\\"tails\\\"));\\n\"\n#~ \"    println!(\\\"cash prize: {}\\\", pick_one(500, 1000));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"подбрасывание монеты: {}\\\", pick_one(\\\"орел\\\", \"\n#~ \"\\\"решка\\\"));\\n\"\n#~ \"    println!(\\\"денежный приз: {}\\\", pick_one(500, 1000));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"При использовании обобщений тип `Into<T>` из стандартной библиотеки может \"\n#~ \"обеспечить своего рода ограниченный полиморфизм в отношении типов \"\n#~ \"аргументов. Мы увидим более подробную информацию в следующих разделах.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"День 1: Утренние упражнения\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"В этих упражнениях мы рассмотрим две составляющие Rust:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Неявные преобразования между типами.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Массивы и циклы `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"\"\n#~ \"Несколько вещей, которые следует учитывать при выполнении упражнений:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Используйте локальную установку Rust, если это возможно. Таким образом вы \"\n#~ \"можете получить автодополнение в вашем редакторе. Смотрите страницу \"\n#~ \"[Using Cargo](../../cargo.md) для получения подробной информации об \"\n#~ \"установке Rust.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"В качестве альтернативы используйте Rust Playground.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Фрагменты кода намеренно недоступны для редактирования: встроенные \"\n#~ \"фрагменты кода теряют свое состояние, если вы уходите со страницы.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust не применяет автоматически _неявные преобразования_ между типами ([в \"\n#~ \"отличие от C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Это можно увидеть в следующей программе:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Все целочисленные типы в Rust реализуют типажи [`From<T>`](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.From.html) и [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html), что позволяет выполнять \"\n#~ \"преобразования между ними. Типаж `From<T>` имеет единственный метод \"\n#~ \"`from()` и аналогично, типаж `Into<T>` имеет единственный метод `into()`. \"\n#~ \"Реализация этих типажей --- это то, как тип выражает, что он может быть \"\n#~ \"преобразован в другой тип.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"В стандартной библиотеке есть реализация `From<i8> для i16`, что значит, \"\n#~ \"что мы можем преобразовать переменную `x` типа `i8` в `i16`, вызвав `i16::\"\n#~ \"from(x)`. Или, проще, с помощью `x.into()`, потому что реализация \"\n#~ \"`From<i8> для i16` автоматически создает реализацию `Into<i16> для i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"То же самое относится к реализациям `From` для ваших собственных типов, \"\n#~ \"поэтому достаточно реализовать только `From`, чтобы автоматически \"\n#~ \"получить соответствующую реализацию `Into`.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"\"\n#~ \"Запустите приведенную выше программу и посмотрите на ошибку компилятора.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Измените приведенный выше код, чтобы использовать `into()` для выполнения \"\n#~ \"преобразования.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Измените типы `x` и `y` на другие (такие как `f32`, `bool`, `i128`), \"\n#~ \"чтобы увидеть, из каких и в какие типы можно выполнить преобразование. \"\n#~ \"Попробуйте преобразовать малые типы в большие и наоборот. Ознакомьтесь c \"\n#~ \"[документацией стандартной библиотеки](https://doc.rust-lang.org/std/\"\n#~ \"convert/trait.From.html), чтобы узнать, реализован ли `From<T>` для \"\n#~ \"проверяемых пар.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Массивы и циклы `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Мы видели, что массив может быть объявлен следующим образом:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Вы можете распечатать массив, запросив его отладочное представление \"\n#~ \"используя `{:?}`:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    println!(\\\"array: {array:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    println!(\\\"массив: {array:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust позволяет итерироваться по массивам и диапазонам используя ключевое \"\n#~ \"слово `for`:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterating over array:\\\");\\n\"\n#~ \"    for n in &array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"\\n\"\n#~ \"    print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"    for i in 0..3 {\\n\"\n#~ \"        print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Итерация по массиву:\\\");\\n\"\n#~ \"    for n in array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"\\n\"\n#~ \"    print!(\\\"Итерация по диапазону:\\\");\\n\"\n#~ \"    for i in 0..3 {\\n\"\n#~ \"        print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"fn transpose(matrix: [[i32; 3]; 3]) -> [[i32; 3]; 3] {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn pretty_print(matrix: &[[i32; 3]; 3]) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let matrix = [\\n\"\n#~ \"        [101, 102, 103], // <-- the comment makes rustfmt add a newline\\n\"\n#~ \"        [201, 202, 203],\\n\"\n#~ \"        [301, 302, 303],\\n\"\n#~ \"    ];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"matrix:\\\");\\n\"\n#~ \"    pretty_print(&matrix);\\n\"\n#~ \"\\n\"\n#~ \"    let transposed = transpose(matrix);\\n\"\n#~ \"    println!(\\\"transposed:\\\");\\n\"\n#~ \"    pretty_print(&transposed);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: удалите это, когда закончите со своей реализацией.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"fn transpose(matrix: [[i32; 3]; 3]) -> [[i32; 3]; 3] {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn pretty_print(matrix: &[[i32; 3]; 3]) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let matrix = [\\n\"\n#~ \"        [101, 102, 103], // <-- комментарий заставляет rustfmt добавить \"\n#~ \"переход на новую строку\\n\"\n#~ \"        [201, 202, 203],\\n\"\n#~ \"        [301, 302, 303],\\n\"\n#~ \"    ];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"матрица:\\\");\\n\"\n#~ \"    pretty_print(&matrix);\\n\"\n#~ \"\\n\"\n#~ \"    let transposed = transpose(matrix);\\n\"\n#~ \"    println!(\\\"транспонированная матрица:\\\");\\n\"\n#~ \"    pretty_print(&transposed);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Бонусный вопрос\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Могли бы вы использовать срезы `&[i32]`, вместо жестко закодированных \"\n#~ \"матриц 3 × 3, как тип аргументов и возвращаемых значений? Что-то вроде \"\n#~ \"`&[&[i32]]` для двумерного среза срезов. Почему или почему нет?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Смотрите [пакет `ndarray`](https://docs.rs/ndarray/), чтобы узнать больше \"\n#~ \"о реализации многомерных контейнеров.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"Решение и ответ на бонусный вопрос доступны в разделе [Решение](solutions-\"\n#~ \"morning.md#arrays-and-for-loops).\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Как мы уже заметили, выражение `if` может использоваться для  условного \"\n#~ \"выполнения одного из двух блоков. Однако, в Rust сами блоки могут  иметь \"\n#~ \"значения. Значение одного из двух блоков (в зависимости от значения \"\n#~ \"условия)  и станет значением всего выражения `if`. Другие выражения \"\n#~ \"управления потоком (такие как `while`, `for` и `match`), работают схожим \"\n#~ \"образом.\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"То же правило работает и для функций: функция возвращает значение  \"\n#~ \"последнего выражения в теле:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn double(x: i32) -> i32 {\\n\"\n#~ \"    x + x\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"doubled: {}\\\", double(7));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn double(x: i32) -> i32 {\\n\"\n#~ \"    x + x\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"удвоенное: {}\\\", double(7));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"\"\n#~ \"Этот слайд показывает, что в языке Rust у блоков есть тип и значение. \"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"Выражение [`for`](https://doc.rust-lang.org/std/keyword.for.html) очень \"\n#~ \"похоже на выражение [`while let`](while-let-expressions.md).  Оно неявно \"\n#~ \"вызывает `into_iter()` для итерируемого объекта:\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Здесь также можно использовать выражения `break` и `continue`.\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"В языке Rust нет специального синтаксиса для итерации по индексам \"\n#~ \"контейнеров.\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` -- это диапазон, который реализует трейт `Iterator`. \"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` -- это метод, который возвращает итератор, который пропускает \"\n#~ \"каждый второй элемент. \"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Попробуйте присвоить что-нибудь к `x` и объясните ошибки компиляции, \"\n#~ \"которые при этом появятся. Сделайте `v` изменяемым и поменяйте цикл `for` \"\n#~ \"на `for x in v.iter_mut()`.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    while x != 1 {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Final x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    while x != 1 {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Конечное значение x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Program name: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Missing name?\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Имя программы: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Имя не указано.\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"Начиная с версии 1.65, похожая конструкция [`let-else`](https://doc.rust-\"\n#~ \"lang.org/rust-by-example/flow_control/let_else.html) позволяет проводить \"\n#~ \"деструктурирующее присвоение, а при ошибке исполнить ветку с не \"\n#~ \"возвращающим блоком (`panic`/`return`/`break`/`continue`). Например:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", second_word_to_upper(\\\"foo bar\\\"));\\n\"\n#~ \"}\\n\"\n#~ \" \\n\"\n#~ \"fn second_word_to_upper(s: &str) -> Option<String> {\\n\"\n#~ \"    let mut it = s.split(' ');\\n\"\n#~ \"    let (Some(_), Some(item)) = (it.next(), it.next()) else {\\n\"\n#~ \"        return None;\\n\"\n#~ \"    };\\n\"\n#~ \"    Some(item.to_uppercase())\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", second_word_to_upper(\\\"foo bar\\\"));\\n\"\n#~ \"}\\n\"\n#~ \" \\n\"\n#~ \"fn second_word_to_upper(s: &str) -> Option<String> {\\n\"\n#~ \"    let mut it = s.split(' ');\\n\"\n#~ \"    let (Some(_), Some(item)) = (it.next(), it.next()) else {\\n\"\n#~ \"        return None;\\n\"\n#~ \"    };\\n\"\n#~ \"    Some(item.to_uppercase())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Перечисления и сопоставление с образцом.\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Управление памятью: стек и куча, ручное управление памятью, управление \"\n#~ \"памятью на основе области видимости и сборка мусора.\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Владение: семантика перемещения, копирование и клонирование, \"\n#~ \"заимствование и время жизни.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Скопируйте приведенный ниже код в <https://play.rust-lang.org/> и \"\n#~ \"реализуйте функции:\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"День 1: Базовый Rust, владение и анализатор заимствований.\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (рекомендуется)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"Вы можете следовать инструкции для установки Cargo, компилятора Rust и \"\n#~ \"других стандартных инструментов экосистемы с помощью инструмента [rustup]\"\n#~ \"(https://rust-analyzer.github.io/), который поддерживается Rust \"\n#~ \"Foundation.\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"Менеджеры пакетов\"\n"
  },
  {
    "path": "po/tr.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2025-11-15T12:48:01+03:00\\n\"\n\"PO-Revision-Date: 2025-11-16 19:20+0300\\n\"\n\"Last-Translator: akerem@protonmail.com\\n\"\n\"Language-Team: Turkish <gnome-turk@gnome.org>\\n\"\n\"Language: tr\\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\"X-Generator: Poedit 3.8\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Comprehensive Rust'a Hoş Geldiniz 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Kursun Çalıştırılması\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Kurs Yapısı\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Klavye Kısayolları\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Çeviriler\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Cargo'yu Kullanmak\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust Ekosistemi\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Kod Örnekleri\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Cargo'nun Yerel (Local) Olarak Çalıştırılması\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Gün 1: Sabah\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Hoş Geldiniz\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Merhaba, Dünya\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Rust Nedir?\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Rust'ın Faydaları\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Deneme Alanı (Playground)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Türler ve Değerler\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Değişkenler\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Değerler\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Aritmetik\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Tür Çıkarımı (Type Inference)\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Alıştırma: Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/closures/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Çözüm\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Kontrol Akışı Temelleri\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Bloklar ve Kapsamlar\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"`if` İfadeleri\"\n\n#: src/SUMMARY.md src/control-flow-basics/match.md\nmsgid \"`match` Expressions\"\nmsgstr \"`match` İfadeleri\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Döngüler\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` ve `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Etiketler\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Fonksiyonlar\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Makrolar\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Alıştırma: Collatz Sekansı\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Gün 1: Öğleden Sonra\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Demetler (Tuples) ve Diziler (Arrays)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Diziler\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Demetler\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Dizi Adımlama (Iteration)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Desenler ve Ayrıştırma (Destructuring)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Alıştırma: İçiçe Diziler\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"Referanslar\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Paylaşılan (Shared) Referanslar\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Dışlayan (Exclusive) Referanslar\"\n\n#: src/SUMMARY.md src/references.md src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Dilimler (Slices)\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Dizeler (Strings)\"\n\n#: src/SUMMARY.md src/references.md src/references/dangling.md\nmsgid \"Reference Validity\"\nmsgstr \"Referans Geçerliliği (Validity)\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Alıştırma: Geometri\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Kullanıcı Tanımlı Türler\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"İsimli Yapılar (Named Structs)\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Demet Yapıları (Tuple Structs)\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Enumlar\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Tür Eş İsimleri (Type Aliases)\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Const\"\nmsgstr \"Const\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"Static\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Alıştırma: Asansör Olayları\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Gün 2: Sabah\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Desen Eşleştirme\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/infallible.md\nmsgid \"Irrefutable Patterns\"\nmsgstr \"Reddedilemez Desenler (Irrefutable Patterns)\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Değerleri Eşleştirmek\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"Yapıları Ayrıştırma (Destructuring Structs)\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Enum'ları Ayrıştırma (Destructuring)\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Let'li Kontrol Akışı\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow/if-let.md\nmsgid \"`if let` Expressions\"\nmsgstr \"`if let` İfadeleri\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow/while-let.md\nmsgid \"`while let` Statements\"\nmsgstr \"`while let` Deyimleri\"\n\n#: src/SUMMARY.md\nmsgid \"`let else`\"\nmsgstr \"`let else`\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Alıştırma: İfade Değerlendirmesi\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Metotlar ve Özellikler (Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Metotlar\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Özellikler (Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Özelliklerin (Traits) Gerçekleştirimi\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Üstözellikler (Supertraits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"İlişkili Türler\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Türetme (Deriving)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Alıştırma: Genel Kaydedici\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Genelleştirmeler (Generics)\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Genelleştirilmiş (Generic) Fonksiyonlar\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Özellik (Trait) Sınırları\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Genelleştirilmiş (Generic) Veri Türleri\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Genelleştirilmiş (Generic) Özellikler (Traits)\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Alıştırma: Genelleştirilmiş (Generic) `min`\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Gün 2: Öğleden Sonra\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/closures.md\nmsgid \"Closures\"\nmsgstr \"Çevreleyiciler (Closures)\"\n\n#: src/SUMMARY.md src/closures.md src/closures/syntax.md\nmsgid \"Closure Syntax\"\nmsgstr \"Çevreleyici Sözdizimi (Closure Syntax)\"\n\n#: src/SUMMARY.md src/closures.md src/closures/capturing.md\nmsgid \"Capturing\"\nmsgstr \"Yakalama (Capturing)\"\n\n#: src/SUMMARY.md src/closures.md\nmsgid \"Closure Traits\"\nmsgstr \"Çevreleyici Özellikler (Closure Traits)\"\n\n#: src/SUMMARY.md src/closures.md src/closures/exercise.md\nmsgid \"Exercise: Log Filter\"\nmsgstr \"Alıştırma: Kaydedici (Log) Filtresi\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Standart Kütüphane Türleri\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Standart Kütüphane\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Dokümantasyon\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Alıştırma: Sayıcı\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Standart Kütüphanedeki Özellikler (Traits)\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Karşılaştırmalar\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Operatörler\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` ve `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Tür Dönüştürme (Casting)\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` ve `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, yapı (struct) güncelleme sözdizimi\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Alıştırma: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Gün 3: Sabah\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Bellek Yönetimi\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Program Belleğinin Gözden Geçirilmesi\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Bellek Yönetimine Yaklaşımlar\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Sahiplik\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Taşıma Semantiği\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Kopyalanan Türler\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Alıştırma: İnşa Edici / Yapıcı Tür (Builder Type)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Akıllı Göstericiler\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Sahipli Özellik Nesneleri (Owned Trait Objects)\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Alıştırma: İkili Ağaç\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Gün 3: Öğleden Sonra\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Ödünç Alma\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Bir Değeri Ödünç Alma\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Ödünç Alma Kontrolü\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Ödünç Alma Hataları\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"İç Değişebilirlik (Interior Mutability)\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability/cell.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability/refcell.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Alıştırma: Sağlık İstatistikleri\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Ömürler (Lifetimes)\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Borrowing and Functions\"\nmsgstr \"Ödünç Alma (Borrowing) ve Fonksiyonlar\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/returning-borrows.md\nmsgid \"Returning Borrows\"\nmsgstr \"Ödünç Alınanları Geri Döndürmek (Return)\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/multiple-borrows.md\nmsgid \"Multiple Borrows\"\nmsgstr \"Çoklu Ödünç Almalar\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/borrow-both.md\nmsgid \"Borrow Both\"\nmsgstr \"Her İkisini Birden Ödünç Al\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/borrow-one.md\nmsgid \"Borrow One\"\nmsgstr \"Yalnızca Birini Ödünç Al\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Ömür Atlaması (Elision)\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Veri Yapılarında Ömürler\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Alıştırma: Protobuf Ayrıştırma\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Gün 4: Sabah\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Adımlayıcılar (Iterators)\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Motivation\"\nmsgstr \"Motivasyon\"\n\n#: src/SUMMARY.md src/iterators/iterator.md\nmsgid \"`Iterator` Trait\"\nmsgstr \"`Iterator` Özelliği (Trait)\"\n\n#: src/SUMMARY.md src/iterators/helpers.md\nmsgid \"`Iterator` Helper Methods\"\nmsgstr \"`Iterator` Yardımcı Metotları\"\n\n#: src/SUMMARY.md src/iterators/collect.md\nmsgid \"`collect`\"\nmsgstr \"`collect`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Alıştırma: Adımlayıcı Metot Zincirleme\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Modüller\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Dosya Sistemi Hiyerarşisi\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Görünürlük\"\n\n#: src/SUMMARY.md src/modules.md\nmsgid \"Encapsulation\"\nmsgstr \"Kapsülleme (Encapsulation)\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Alıştırma: Bir GUI Kütüphanesi için Modüller\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Test Etme\"\n\n#: src/SUMMARY.md src/testing.md src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Birim Testleri\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Diğer Test Türleri\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Derleyici Tüyleri (Lint) ve Clippy Aracı\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Alıştırma: Luhn Algrotiması\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Gün 4: Öğleden Sonra\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\n#: src/idiomatic/welcome.md\nmsgid \"Error Handling\"\nmsgstr \"Hata İşleme\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panikler (Panics)\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Try Operatörü\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Try Dönüşümleri\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error` Özelliği (Trait)\"\n\n#: src/SUMMARY.md src/error-handling/thiserror.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/SUMMARY.md src/error-handling/anyhow.md src/idiomatic/welcome.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Alıştırma: `Result` ile Yeniden Yazma\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Emniyetsiz (Unsafe) Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"Emniyetsiz\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Ham Göstericilerinin İçeriği (Dereferencing)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Değişebilir Statik Değişkenler\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Birlikler (Unions)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Emniyetsiz (Unsafe) Fonksiyonlar\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"Unsafe Rust Functions\"\nmsgstr \"Emniyetsiz (Unsafe) Rust Fonksiyonlar\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"Unsafe External Functions\"\nmsgstr \"Emniyetsiz (Unsafe) Harici Fonksiyonlar\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Emniyetsiz (Unsafe) Fonksiyonları Çağırma\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Emniyetsiz Özellikler (Unsafe Traits)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Alıştırma: FFI Sarmalayıcı\"\n\n#: src/SUMMARY.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Kurulum (Setup)\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"İnşa (Build) Kuralları\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"İkili (Binary) Dosya\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Kütüphane\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Doğum Günü Servisi Eğitimi\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Arayüz\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"Servis API\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Servis\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Sunucu\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Dağıtmak (Deploy)\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"İstemci\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"API'yi Değiştirme\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Gerçekleştirimleri (Implementations) Güncellenme\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"AIDL Türler\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"İlkel (Primitive) Türler\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Dizi Türleri\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Nesnelerin Gönderilmesi\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"Parsellenebilir Gönderme\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Dosyaların Gönderilmesi\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Taklit Etme (Mocking)\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Kayıt Tutma (Logging)\"\n\n#: src/SUMMARY.md src/android/interoperability.md\n#: src/unsafe-deep-dive/motivations.md\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Interoperability\"\nmsgstr \"Birlikte Çalışabilirlik (Interoperability)\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"C ile\"\n\n#: src/SUMMARY.md src/android/interoperability/with-c/c-library.md\nmsgid \"A Simple C Library\"\nmsgstr \"Basit bir C Kütüphanesi\"\n\n#: src/SUMMARY.md\nmsgid \"Bindgen\"\nmsgstr \"Bindgen\"\n\n#: src/SUMMARY.md src/android/interoperability/with-c/run-our-binary.md\nmsgid \"Running Our Binary\"\nmsgstr \"İkili Dosyamızı Çalıştırmak\"\n\n#: src/SUMMARY.md src/android/interoperability/with-c/rust-library.md\nmsgid \"A Simple Rust Library\"\nmsgstr \"Basit bir Rust Kütüphanesi\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"C Tarafından Rust'ı Kullanma\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"C++ ile\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Köprü Modülü\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust Köprüsü\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"Oluşturulan (Generated) C++\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ Köprüsü\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Paylaşılan (Shared) Türler\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Paylaşılan (Shared) Enum'lar\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Rust Hata İşleme\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"C++ Hata İşleme\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Ek Türler\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Android için inşa: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Android için inşa: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Android için inşa: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Java ile\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Chromium ve Cargo Ekosistemlerinin Karşılaştırılması\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"İlke (Policy)\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Emniyetsiz (Unsafe) Kod\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Chromium C++'dan Rust Koduna Bağımlılık\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\n#: src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Alıştırma\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` Kütüphanesi\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Rust Testleri için GN Kuralları\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` Makrosu\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"C++ ile Birlikte Çalışabilirlik (Interoperability)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Bağlamalara Örnek\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"CXX'in Sınırlamaları\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"CXX Hata İşleme\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Hata İşleme: QR Örneği\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Hata İşleme: PNG Örneği\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Chromium'da CXX'i Kullanma\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Üçüncü Taraf Kasalarnı Eklenmesi\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Cargo.toml'yi Yapılandırma\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"`gnrt_config.toml`'yi Yapılandırma\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Kasaların İndirilmesi\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"`gn` İnşa Kurallarının Oluşturulması\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Problemlerin Çözülmesi\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Kod Oluşturan İnşa Betikleri (Build Scripts )\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\"C++ Kodunu İnşa Eden (Build) veya Keyfi Eylemler Gerçekleştiren İnşa \"\n\"Betikleri\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Bir Kasaya Bağımlılık\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Gözden Geçirmeler (Reviews) ve Denetimler (Audits)\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Chromium Kaynak Kodunun Kontrol Edilmesi\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Kasaları Güncel Tutmak\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Bir Araya Getirmek - Alıştırma\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Alıştırma Çözümleri\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Yalın Sistem (Bare Metal): Sabah\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Minimal Bir Örnek\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Mikrodenetleyiciler\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"Ham MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC'ler\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Kasaları (Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Kart Destek Kasaları (Board Support Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Tür Durum Deseni\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` ve `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Hata Ayıklama\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Diğer Projeler\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Alıştırmalar\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Pusula\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Çözümler\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Yalın Sistem (Bare Metal): Öğleden Sonra\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Uygulama İşlemcileri\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Rust'a Hazırlanmak\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Satır İçi Assembly\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Bir UART Sürücü Yazalım\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Daha Fazla Özellik (Trait)\"\n\n#: src/SUMMARY.md src/bare-metal/aps/safemmio/using.md\nmsgid \"Using It\"\nmsgstr \"Onu Kullan\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Daha İyi Bir UART Sürücüsü\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags Kasası\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Çoklu Yazmaçlar (Registers)\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"Driver\"\nmsgstr \"Sürücü\"\n\n#: src/SUMMARY.md src/bare-metal/aps/safemmio/registers.md\nmsgid \"safe-mmio\"\nmsgstr \"safe-mmio\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"İstisnalar\"\n\n#: src/SUMMARY.md src/bare-metal/aps/aarch64-rt.md\nmsgid \"aarch64-rt\"\nmsgstr \"aarch64-rt\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Kullanışlı Kasalar (Crates)\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Bare-Metal on Android\"\nmsgstr \"Android'de Yalın Sistem (Bare Metal)\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC Sürücüsü\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Eşzamanlılık: Sabah\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"İş Parçacıkları (Threads)\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Temel İş Parçacıkları (Plain Threads)\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Kapsamlı İş Parçacıkları (Threads)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Kanallar\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Vericiler ve Alıcılar\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Sınırsız Kanallar\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Sınırlı Kanallar\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` ve `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"Marker Özellikleri (Traits)\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Örnekler\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Paylaşımlı Durum (State)\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Örnek\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Filozofların Akşam Yemeği\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Çok İş Parçacıklı Link Denetleyicisi\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Eşzamanlılık: Öğleden Sonra\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Async Temelleri\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Future Özellikleri (Traits)\"\n\n#: src/SUMMARY.md src/concurrency/async.md\n#: src/concurrency/async/state-machine.md\nmsgid \"State Machine\"\nmsgstr \"Durum Makinesi\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Çalışma Zamanları\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio Kasası\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Görevler\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Kanallar ve Kontrol Akışı\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Async Kanalları\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Tuzaklar\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Yürütücünün/Çalıştırıcının (Executor) Engellenmesi\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Async Özellikleri (Traits)\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"İptal (Cancellation)\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Yayımlamalı Sohbet Uygulaması\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Idiomatic Rust\"\nmsgstr \"Rust’ta Tavsiye Edilen Pratikler (Idiomatic)\"\n\n#: src/SUMMARY.md src/idiomatic/welcome.md\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"Leveraging the Type System\"\nmsgstr \"Tür Sistemini (Type System) Etkin Kullanmak\"\n\n#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"Newtype Pattern\"\nmsgstr \"Yeni Tür (Newtype) Deseni\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"Semantic Confusion\"\nmsgstr \"Anlamsal Karışıklık\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"Parse, Don't Validate\"\nmsgstr \"Ayrıştır, Doğrulama Yapma\"\n\n#: src/SUMMARY.md\nmsgid \"Is It Encapsulated?\"\nmsgstr \"O Kapsülleme (Encapsulation) mi?\"\n\n#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"Extension Traits\"\nmsgstr \"Genişletme Özellikleri (Extension Trait)\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"Extending Foreign Types\"\nmsgstr \"Yabancı (Foreing) Türlerin Genişletilmesi (Extend)\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"Method Resolution Conflicts\"\nmsgstr \"Metot İsmi Çözümlemesinde (Resolution) Çatışmalar (Conflict)\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"Trait Method Conflicts\"\nmsgstr \"Özellik Metodunda (Trait Method) İsim Çatışmaları\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"Extending Other Traits\"\nmsgstr \"Diğer Özelliklerin (Traits) Genişletilmesi\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"Should I Define An Extension Trait?\"\nmsgstr \"Bir Genişletme Özelliği (Extension Trait) Tanımlamalı mıyım?\"\n\n#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md\nmsgid \"Typestate Pattern\"\nmsgstr \"Tür Durum (Typestate) Deseni\"\n\n#: src/SUMMARY.md\nmsgid \"Typestate Pattern Example\"\nmsgstr \"Tür Durum Deseni Örneği\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"Beyond Simple Typestate\"\nmsgstr \"Basit Tür Durumunun Ötesi\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"Typestate Pattern with Generics\"\nmsgstr \"Genelleştirmelerle (Generic) Tür Durum Deseni\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\nmsgid \"Serializer: implement Root\"\nmsgstr \"Serializer: Root'u Gerçekleştirin (Implement)\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"Serializer: implement Struct\"\nmsgstr \"Serializer: Struct'ı Gerçekleştirin\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"Serializer: implement Property\"\nmsgstr \"Serializer: Property'i Gerçekleştirin\"\n\n#: src/SUMMARY.md\nmsgid \"Serializer: Complete implementation\"\nmsgstr \"Serializer: Gerçekleştirimi Tamamlayın\"\n\n#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md\nmsgid \"Borrow checking invariants\"\nmsgstr \"Ödünç Alma Denetimi Kuralları\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"Lifetimes and Borrows: the Abstract Rules\"\nmsgstr \"Ömürler ve Ödünçler: Soyut Kurallar\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"Single-use values\"\nmsgstr \"Tek kullanımlık değerler\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"Mutually Exclusive References / \\\"Aliasing XOR Mutability\\\"\"\nmsgstr \"\"\n\"Birbirini Dışlayan (Mutually Exclusive) Referanslar / \\\"Örtüşme (Aliasing) \"\n\"YA DA Değiştirilebilirlik (Mutability)\\\"\"\n\n#: src/SUMMARY.md\nmsgid \"PhantomData and Types\"\nmsgstr \"PhantomData ve Türler\"\n\n#: src/SUMMARY.md\nmsgid \"PhantomData and Types (implementation)\"\nmsgstr \"PhantomData ve Türler (Gerçekleştirim)\"\n\n#: src/SUMMARY.md\nmsgid \"PhantomData: Lifetimes for External Resources\"\nmsgstr \"PhantomData: Harici Kaynaklar için Ömürler\"\n\n#: src/SUMMARY.md\nmsgid \"PhantomData: OwnedFd & BorrowedFd\"\nmsgstr \"PhantomData: OwnedFd & BorrowedFd\"\n\n#: src/SUMMARY.md src/idiomatic/leveraging-the-type-system.md\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"Token Types\"\nmsgstr \"Jeton Türler (Token Types)\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"Permission Tokens\"\nmsgstr \"İzin Jetonları\"\n\n#: src/SUMMARY.md\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"Token Types with Data: Mutex Guards\"\nmsgstr \"Veri İçeren Jeton Türleri : Mutex Filtreleri\"\n\n#: src/SUMMARY.md\nmsgid \"Branded pt 1: Variable-specific tokens\"\nmsgstr \"Etiketleme (Branded) Kısım 1: Değişkene özgü jetonlar\"\n\n#: src/SUMMARY.md\nmsgid \"Branded pt 2: `PhantomData` and Lifetime Subtyping\"\nmsgstr \"\"\n\"Etiketleme Kısım 2: `PhantomData` ve Ömür Alttürlemesi (Lifetime Subtyping)\"\n\n#: src/SUMMARY.md\nmsgid \"Branded pt 3: Implementation\"\nmsgstr \"Etiketleme Kısım 3: Gerçekleştirim (Implementation)\"\n\n#: src/SUMMARY.md\nmsgid \"Branded pt 4: Branded types in action.\"\nmsgstr \"Etiketleme Kısım 4: Pratikteki Etiketli Türler.\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"Motivations\"\nmsgstr \"Motivasyonlar\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/motivations.md\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"Data Structures\"\nmsgstr \"Veri Yapıları\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/motivations.md\n#: src/unsafe-deep-dive/motivations/performance.md\nmsgid \"Performance\"\nmsgstr \"Performans\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/unsafe-deep-dive/foundations.md\nmsgid \"Foundations\"\nmsgstr \"Temeller\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md\nmsgid \"What is unsafe?\"\nmsgstr \"Emniyetsiz olan (unsafe) nedir?\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"When is unsafe used?\"\nmsgstr \"Emniyetsiz (unsafe) anahtar kelimesi ne zaman kullanılır?\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md\nmsgid \"Data structures are safe\"\nmsgstr \"Veri yapıları emniyetlidir\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md\nmsgid \"Actions might not be\"\nmsgstr \"İşlemler olmayabilir\"\n\n#: src/SUMMARY.md src/unsafe-deep-dive/foundations.md\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Less powerful than it seems\"\nmsgstr \"Göründüğünden daha az güçlü\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Son sözler\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Teşekkürler!\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Sözlük\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Diğer Kaynaklar\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Emekler\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Bu, Google'daki Android ekibi tarafından geliştirilen ücretsiz bir Rust \"\n\"kursudur. Kurs, temel sözdiziminden genelleştirmeler (generics) ve hata \"\n\"işleme gibi ileri düzey konulara kadar Rust'ın tüm yelpazesini kapsar.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"Kursun en son sürümüne <https://google.github.io/comprehensive-rust/> \"\n\"adresinden ulaşılabilir. Başka bir yerde okuyorsanız, lütfen güncellemeleri \"\n\"kontrol edin.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"Kurs diğer dillerde de mevcuttur. Sayfanın sağ üst köşesinden tercih \"\n\"ettiğiniz dili seçin veya tüm mevcut çevirilerin listesi için [Çeviriler]\"\n\"(running-the-course/translations.md) sayfasını kontrol edin.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"Kurs ayrıca [PDF olarak](comprehensive-rust.pdf) da mevcuttur.\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Kursun amacı size Rust'ı öğretmektir. Rust hakkında hiçbir şey bilmediğinizi \"\n\"varsayıyoruz ve şunu umuyoruz:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Rust sözdizimi ve dili hakkında kapsamlı bir anlayış sunmayı.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\"Rust'ta mevcut programları değiştirmenize ve yeni programlar yazmanıza \"\n\"olanak sağlamayı.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Yaygın Rust kod kalıplarını göstermeyi.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\"İlk dört kurs gününe Rust Esasları (Rust Fundamentals) adını veriyoruz.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Buna dayanarak, bir veya daha fazla uzmanlık konusuna dalmaya davetlisiniz:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): Android platformu geliştirme (AOSP) için Rust'ın \"\n\"kullanımına ilişkin yarım günlük bir kurs. Buna C, C++ ve Java ile birlikte \"\n\"çalışabilirlik (interoperability) de dahildir.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust in Chromium-based \"\n\"browsers. This includes interoperability with C++ and how to include third-\"\n\"party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): Rust'ın Chromium tabanlı tarayıcılarda \"\n\"kullanılmasına ilişkin yarım günlük bir kurs. Bu, C++ ile birlikte \"\n\"çalışabilirliği ve üçüncü taraf kasaların (crate) Chromium'a nasıl dahil \"\n\"edileceğini içerir.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Yalın-sistem](bare-metal.md): Yalın sistem (gömülü) geliştirme için Rust'ın \"\n\"kullanımına ilişkin tam günlük bir ders. Hem mikrodenetleyiciler hem de \"\n\"uygulama işlemcileri kapsanmaktadır.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in \"\n\"Rust. We cover both classical concurrency (preemptively scheduling using \"\n\"threads and mutexes) and async/await concurrency (cooperative multitasking \"\n\"using futures).\"\nmsgstr \"\"\n\"[Eşzamanlılık](concurrency/welcome.md): Rust'ta eşzamanlılık üzerine tam \"\n\"günlük bir ders. Hem klasik eşzamanlılığı (iş parçacıkları ve muteksleri \"\n\"kullanarak kesintili/geçişli zamanlama) hem de async/await eşzamanlılığını \"\n\"(future özelliklerini kullanarak işbirlikçi çoklu görev) ele alıyoruz.\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"Hedef Dışı\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust geniş bir dil ve birkaç gün içinde tamamını ele almamız mümkün \"\n\"olmayacak. Aşağıdakiler bu kursun amaçları dışında kalır:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [the Rust Book](https://doc.rust-\"\n\"lang.org/book/) and [Rust by Example](https://doc.rust-lang.org/rust-by-\"\n\"example/macros.html) instead.\"\nmsgstr \"\"\n\"Makroların nasıl geliştirileceğini öğrenmek: lütfen bunun yerine [Rust \"\n\"Kitabı](https://doc.rust-lang.org/book/)'na ve [Örneklerle Rust](https://doc.\"\n\"rust-lang.org/rust-by-example/macros.html)'a bakınız.\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Varsayımlar\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Kurs, nasıl programlanacağını zaten bildiğinizi varsayar. Rust, statik tür \"\n\"sistemine sahip (statically-typed) bir dildir ve Rust yaklaşımını daha iyi \"\n\"açıklamak veya karşılaştırmak için bazen C ve C++ ile karşılaştırmalar \"\n\"yapacağız.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Python veya JavaScript gibi dinamik olarak yazılmış bir dilde nasıl \"\n\"programlanacağını biliyorsanız, o zaman da gayet iyi takip edebileceksiniz.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Bu bir _konuşmacı notu_ örneğidir. Bunları slaytlara ek bilgi eklemek için \"\n\"kullanacağız. Bunlar, eğitmenin ele alması gereken önemli noktaların yanı \"\n\"sıra sınıfta ortaya çıkan tipik soruların yanıtları da olabilir.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Bu sayfa kurs eğitmenine yöneliktir.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Kursu Google'da dahili olarak nasıl kullandığımıza dair biraz arka plan \"\n\"bilgisini burada bulabilirsiniz.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"Dersleri genellikle sabah 9:00'dan akşam 16:00'ya kadar yürütüyoruz ve \"\n\"ortasında 1 saatlik öğle yemeği arası veriyoruz. Geriye sabah dersi için \"\n\"3saat, öğleden sonra dersi için ise 3 saat kalıyor. Her iki oturum da \"\n\"öğrencilerin alıştırmalar üzerinde çalışmaları için birden fazla ara ve \"\n\"zaman içerir.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Kursu çalıştırmadan önce şunları yapmak isteyeceksiniz:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Ders materyaline aşina olun. Önemli noktaların vurgulanmasına yardımcı olmak \"\n\"için konuşmacı notları ekledik (lütfen daha fazla konuşmacı notuna katkıda \"\n\"bulunarak bize yardımcı olun!). Sunum yaparken, konuşmacı notlarını açılır \"\n\"pencerede açtığınızdan emin olmalısınız (\\\"Konuşmacı Notları\\\"nın yanındaki \"\n\"küçük oklu bağlantıya tıklayın). Bu şekilde sınıfa sunacağınız temiz bir \"\n\"ekrana sahip olursunuz.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Tarihlere karar verin. Kurs en az dört tam gün sürdüğünden, günleri iki \"\n\"haftaya yaymanızı öneririz. Kurs katılımcıları, kursta boşluk kalmasının, \"\n\"onlara verdiğimiz tüm bilgileri işlemelerine yardımcı olması açısından \"\n\"yararlı bulduklarını belirtmişlerdir.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Katılımcılarınız için yeterince büyük bir oda bulun. Sınıf mevcudunun 15-25 \"\n\"kişilik olmasını öneriyoruz. Bu, insanların rahatça soru sorabileceği kadar \"\n\"küçüktür --- aynı zamanda bir eğitmenin soruları yanıtlamak için zamanının \"\n\"olacağı kadar da küçüktür. Odada kendiniz ve öğrencileriniz için _masaların_ \"\n\"olduğundan emin olun: hepinizin oturup dizüstü bilgisayarlarınızla \"\n\"çalışabilmesi gerekir. Özellikle eğitmen olarak çok sayıda canlı kodlama \"\n\"yapacaksınız, bu nedenle kürsü size pek yardımcı olmayacaktır.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Kurs gününüzde, işleri ayarlamak için odaya biraz erken gelin. Doğrudan \"\n\"dizüstü bilgisayarınızda çalışan `mdbook serve` komutunu kullanarak sunum \"\n\"yapmanızı öneririz ([kurulum talimatlarına](https://github.com/google/\"\n\"comprehensive-rust#building) bakın). Bu, sayfaları değiştirirken gecikme \"\n\"olmadan en iyi performansı sağlar. Dizüstü bilgisayarınızı kullanmak, siz \"\n\"veya kurs katılımcılarının tespit ettiği yazım hatalarını düzeltmenize de \"\n\"olanak tanır.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"İnsanların alıştırmaları kendi başlarına veya küçük gruplar halinde \"\n\"çözmelerine izin verin. Genellikle sabah ve öğleden sonra alıştırmalara \"\n\"30-45 dakika harcıyoruz (çözümleri gözden geçirme (review) zamanı da dahil). \"\n\"İnsanlara takılıp kalmadıklarını veya yardımcı olabileceğiniz bir konu olup \"\n\"olmadığını sorduğunuzdan emin olun. Birkaç kişinin aynı sorunu yaşadığını \"\n\"gördüğünüzde bunu sınıfa söyleyin ve bir çözüm önerin; örneğin insanlara \"\n\"standart kütüphanede ilgili bilgiyi nerede bulabileceklerini gösterin.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Hepsi bu kadar, kursta iyi şanslar! Umarız bizim için olduğu kadar sizin \"\n\"için de eğlenceli olur!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Kursu geliştirmeye devam edebilmemiz için lütfen sonrasında [geri bildirimde \"\n\"bulunun](https://github.com/google/comprehensive-rust/discussions/86). Sizin \"\n\"için neyin işe yaradığını ve neyin daha iyi hale getirilebileceğini duymak \"\n\"isteriz. Öğrencileriniz de [bize geri bildirim gönderebilir](https://github.\"\n\"com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course.md\nmsgid \"Instructor Preparation\"\nmsgstr \"Eğitmen Hazırlığı\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Go through all the material:** Before teaching the course, make sure you \"\n\"have gone through all the slides and exercises yourself. This will help you \"\n\"anticipate questions and potential difficulties.\"\nmsgstr \"\"\n\"**Tüm materyalleri gözden geçirin:** Kursu vermeden önce, tüm slaytları ve \"\n\"alıştırmaları kendinizin de incelediğinden emin olun. Bu, soruları ve olası \"\n\"zorlukları önceden tahmin etmenize yardımcı olacaktır.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Prepare for live coding:** The course involves a lot of live coding. \"\n\"Practice the examples and exercises beforehand to ensure you can type them \"\n\"out smoothly during the class. Have the solutions ready in case you get \"\n\"stuck.\"\nmsgstr \"\"\n\"**Canlı kodlama (live coding) için hazırlanın:** Kurs sırasında çok sayıda \"\n\"canlı kodlama yapılacaktır. Örnekleri ve alıştırmaları önceden çalışarak \"\n\"sınıfta rahatça yazabileceğinizden emin olun. Takılırsanız çözüm yollarını \"\n\"hazır bulundurun.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Familiarize yourself with `mdbook`:** The course is presented using \"\n\"`mdbook`. Knowing how to navigate, search, and use its features will make \"\n\"the presentation smoother.\"\nmsgstr \"\"\n\"**`mdbook` ile tanışın:** Kurs, `mdbook` kullanılarak sunulmaktadır. Nasıl \"\n\"gezileceğini, arama yapılacağını ve özelliklerinin nasıl kullanılacağını \"\n\"bilmek sunumu daha akıcı hâle getirecektir.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Slice size helper:** Press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>B</kbd> \"\n\"to toggle a visual guide showing the amount of space available when \"\n\"presenting. Expect any content outside of the red box to be hidden \"\n\"initially. Use this as a guide when editing slides. You can also [enable it \"\n\"via this link](?show-red-box=true).\"\nmsgstr \"\"\n\"**Dilim (slice) boyut yardımcısı:** Sunum sırasında mevcut alanı görsel \"\n\"olarak göstermek için <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>B</kbd> \"\n\"tuşlarına basın. Kırmızı kutunun dışındaki içerik başlangıçta gizli \"\n\"olacaktır. Slaytları düzenlerken bunu bir rehber olarak kullanabilirsiniz. \"\n\"Ayrıca [bu bağlantı üzerinden de etkinleştirebilirsiniz](?show-red-box=true).\"\n\n#: src/running-the-course.md\nmsgid \"Creating a Good Learning Environment\"\nmsgstr \"İyi Bir Öğrenme Ortamı Yaratmak\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Encourage questions:** Reiterate that there are no \\\"stupid\\\" questions. A \"\n\"welcoming atmosphere for questions is crucial for learning.\"\nmsgstr \"\"\n\"**Soru sormayı teşvik edin:** \\\"Aptalca\\\" soru diye bir şey olmadığını \"\n\"vurgulayın. Soru sormaya açık bir ortam, öğrenme için çok önemlidir.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Manage time effectively:** Keep an eye on the schedule, but be flexible. \"\n\"It's more important that students understand the concepts than sticking \"\n\"rigidly to the timeline.\"\nmsgstr \"\"\n\"**Zamanı etkili bir şekilde yönetin:** Programı takip edin, ancak esnek \"\n\"olun. Öğrencilerin konuları anlamaları, zaman çizelgesine sıkı sıkıya bağlı \"\n\"kalmaktan daha önemlidir.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"**Facilitate group work:** During exercises, encourage students to work \"\n\"together. This can help them learn from each other and feel less stuck.\"\nmsgstr \"\"\n\"**Grup çalışmasını kolaylaştırın:** Alıştırmalar sırasında öğrencileri \"\n\"birlikte çalışmaya teşvik edin. Bu, birbirlerinden öğrenmelerine ve \"\n\"kendilerini daha az sıkışmış hissetmelerine yardımcı olabilir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust Esasları\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast-paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"İlk dört gün [Rust Temelleri](../welcome-day-1.md)'ni oluşturur. Günler \"\n\"hızlı geçiyor ve çok geniş bir konuyu kapsıyoruz!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Kurs programı:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"1. Gün Sabah (2 saat 10 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md src/idiomatic/welcome.md\nmsgid \"Segment\"\nmsgstr \"Bölüm\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/generics.md src/welcome-day-2-afternoon.md\n#: src/closures.md src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md src/idiomatic/welcome.md\n#: src/idiomatic/leveraging-the-type-system.md\n#: src/unsafe-deep-dive/motivations.md src/unsafe-deep-dive/foundations.md\nmsgid \"Duration\"\nmsgstr \"Süre\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/pattern-matching.md\n#: src/generics.md src/closures.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/idiomatic/leveraging-the-type-system.md\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"5 minutes\"\nmsgstr \"5 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/pattern-matching.md src/methods-and-traits.md\n#: src/modules.md src/unsafe-rust.md src/concurrency/welcome.md\n#: src/concurrency/threads.md src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"15 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/concurrency/welcome-async.md\nmsgid \"40 minutes\"\nmsgstr \"40 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-2.md src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"45 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 45 minutes, including breaks)\"\nmsgstr \"1. Gün Öğleden Sonra (2 saat 45 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"35 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"55 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\nmsgid \"1 hour\"\nmsgstr \"1 saat\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"2. Gün Sabah (2 saat 50 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/welcome-day-2.md src/methods-and-traits.md\n#: src/closures.md src/std-types.md src/welcome-day-3.md src/borrowing.md\n#: src/lifetimes.md src/welcome-day-4.md src/iterators.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"3 dakika\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\nmsgid \"50 minutes\"\nmsgstr \"50 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (2 hours and 50 minutes, including breaks)\"\nmsgstr \"2. Gün Öğleden Sonra (2 saat 50 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/unsafe-rust.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"30 minutes\"\nmsgstr \"30 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"3. Gün Sabah (2 saat 20 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"3. Gün Öğleden Sonra (2 saat 10 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-3-afternoon.md\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"1 saat 5 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"4. Gün Sabah (2 saat 50 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"4. Gün Öğleden Sonra (2 saat 20 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 15 minutes\"\nmsgstr \"1 saat 15 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Derin Dalışlar\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Rust'ın Esasları hakkındaki 4 günlük derse ek olarak, daha özel konuları da \"\n\"ele alıyoruz:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Android'de Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Rust in Android](../android.md) ayrıntılı incelemesi, Android platformu \"\n\"geliştirme için Rust'ı kullanma konusunda yarım günlük bir kurstur. Buna C, \"\n\"C++ ve Java ile birlikte çalışabilirlik (interoperability) de dahildir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Bir [AOSP kasasına](https://source.android.com/docs/setup/download/\"\n\"downloading) ihtiyacınız olacak. Aynı makinede [kurs deposunu](https://\"\n\"github.com/google/comprehensive-rust) kontrol edin ve `src/android/` \"\n\"dizinini AOSP kasasının kök dizinine taşıyın. Bu, Android inşa (build) \"\n\"sisteminin `src/android/` içindeki `Android.bp` dosyalarını görmesini \"\n\"sağlayacaktır.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"`adb sync` emülatörünüzle veya gerçek cihazınızla çalıştığından emin olun ve \"\n\"tüm Android örneklerini `src/android/build_all.sh` kullanarak önceden inşa \"\n\"(build) edin. Çalıştırdığı komutları görmek için betiği okuyun ve bunları \"\n\"elle çalıştırdığınızda çalıştıklarından emin olun.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Chromium'da Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"[Chromium'da Rust](../chromium.md)'ın ayrıntılı incelemesi, Rust'ın Chromium \"\n\"tarayıcısının bir parçası olarak kullanılmasına ilişkin yarım günlük bir \"\n\"kurstur. Bu, Chromium'un `gn` yapı sisteminde Rust'ın kullanılmasını, üçüncü \"\n\"taraf kitaplıkların (\\\"kasalar/crates\\\") getirilmesini ve C++ ile birlikte \"\n\"çalışabilirliğini içerir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Chromium'u derleyebiliyor olmanız gerekecek --- hız için bir debug, \"\n\"component inşası (build) [önerilir](../chromium/setup.md), ancak herhangi \"\n\"bir inşa işlemi de işe yarayacaktır. İnşa ettiğiniz Chromium tarayıcısını \"\n\"çalıştırabildiğinizden emin olun.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Yalın-Sistem (Bare-metal) Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Yalın-Sistem Rust](../bare-metal.md) ayrıntılı incelemesi, yalın sistem \"\n\"(gömülü) geliştirme için Rust kullanımına ilişkin tam günlük bir derstir. \"\n\"Hem mikrodenetleyiciler hem de uygulama işlemcileri kapsanmaktadır.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Mikrodenetleyici kısmı için [BBC micro:bit](https://microbit.org/) v2 \"\n\"geliştirme kartını önceden satın almanız gerekecek. Herkesin [karşılama \"\n\"sayfasında](../bare-metal.md) açıklandığı gibi bir dizi paketi yüklemesi \"\n\"gerekecektir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Rust'ta Eşzamanlılık\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day \"\n\"class on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Rust'ta Eşzamanlılık](../concurrency/welcome.md) ayrıntılı incelemesi, \"\n\"klasik ve aynı zamanda `async`/`await` eşzamanlılığı üzerine tam günlük bir \"\n\"derstir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Yeni bir kasa (crate) kurulumuna ve bağımlılıkların indirilip kullanıma \"\n\"hazır hale getirilmesine ihtiyacınız olacak. Daha sonra örnekleri denemek \"\n\"için kopyalayıp `src/main.rs` dosyasına yapıştırabilirsiniz:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Sabah (3 saat 20 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/references.md\n#: src/std-types.md src/memory-management.md src/borrowing.md\n#: src/error-handling.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async-pitfalls.md src/concurrency/async-exercises.md\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"20 minutes\"\nmsgstr \"20 dakika\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"Send ve Sync\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"1 saat 10 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 30 minutes, including breaks)\"\nmsgstr \"Öğleden Sonra (3 saat 30 dakika, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Idiomatic Rust](../idiomatic/welcome.md) deep dive is a 2-day class on \"\n\"Rust idioms and patterns.\"\nmsgstr \"\"\n\"[Rust’ta Tavsiye Edilen Pratikler (Idiomatic)](../idiomatic/welcome.md) \"\n\"derinlemesine incelemesi,Rust kod kalıpları (idiom) ve desenleri üzerine 2 \"\n\"günlük bir derstir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You should be familiar with the material in [Rust Fundamentals](../welcome-\"\n\"day-1.md) before starting this course.\"\nmsgstr \"\"\n\"Bu kursa başlamadan önce [Rust Temelleri](../welcome-day-1.md) dersindeki \"\n\"materyale aşina olmanız gerekir.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"course outline Idiomatic Rust\"\nmsgstr \"ders planı Rust’ta Tavsiye Edilen Pratikler (Idiomatic)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Unsafe (Work in Progress)\"\nmsgstr \"Emniyetsiz Rust (Devam Eden Çalışma)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Unsafe](../unsafe-deep-dive/welcome.md) deep dive is a two-day class on \"\n\"the _unsafe_ Rust language. It covers the fundamentals of Rust's safety \"\n\"guarantees, the motivation for `unsafe`, review process for `unsafe` code, \"\n\"FFI basics, and building data structures that the borrow checker would \"\n\"normally reject.\"\nmsgstr \"\"\n\"[Emniyetsiz Rust](../unsafe-deep-dive/welcome.md) derinlemesine incelemesi, \"\n\"_unsafe_ Rust dili üzerine iki günlük bir sınıftır. Rust'ın emniyet \"\n\"garantilerinin temellerini, `unsafe` motivasyonunu, `unsafe` kod için \"\n\"inceleme (review) sürecini, FFI temellerini ve ödünç alma denetleyicisinin \"\n\"(borrow checker) normalde reddedeceği veri yapılarını oluşturmayı kapsar.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (1 hour, including breaks)\"\nmsgstr \"1. Gün Sabah (1 saat, aralar dahil)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/unsafe-deep-dive/foundations.md\nmsgid \"2 minutes\"\nmsgstr \"2 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"25 minutes\"\nmsgstr \"25 dakika\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Format\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Kursun çok etkileşimli olması amaçlanıyor ve soruların Rust'ın keşfini \"\n\"yönlendirmesine izin vermenizi öneririz!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Bu mdBook'ta birkaç kullanışlı klavye kısayolu vardır:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"<kbd>Arrow-Left</kbd>: Önceki sayfaya gidin.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"<kbd>Arrow-Right</kbd>: Sonraki sayfaya gidin.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"\"\n\"<kbd>Ctrl</kbd> + <kbd>Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"<kbd>Ctrl</kbd> + <kbd>Enter</kbd>: Odaklı kod örneğini yürütün.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"<kbd>s</kbd>: Arama çubuğunu etkinleştirin.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"\"\n\"Mention that these shortcuts are standard for `mdbook` and can be useful \"\n\"when navigating any `mdbook`\\\\-generated site.\"\nmsgstr \"\"\n\"Bu kısayolların `mdbook` için standart olduğunu ve `mdbook` tarafından \"\n\"oluşturulan herhangi bir sitede gezinirken yararlı olabileceğini belirtin.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"You can demonstrate each shortcut live to the students.\"\nmsgstr \"Her kısayolu öğrencilere canlı olarak gösterebilirsiniz.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"\"\n\"The <kbd>s</kbd> key for search is particularly useful for quickly finding \"\n\"topics that have been discussed earlier.\"\nmsgstr \"\"\n\"Arama için <kbd>s</kbd> tuşu, daha önce tartışılan konuları hızlıca bulmak \"\n\"için özellikle yararlıdır.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"\"\n\"<kbd>Ctrl</kbd> + <kbd>Enter</kbd> will be super important for you since \"\n\"you'll do a lot of live coding.\"\nmsgstr \"\"\n\"Canlı kodlamayı çok fazla yapacağınız için <kbd>Ctrl</kbd> + <kbd>Enter</\"\n\"kbd> sizin için çok önemli olacak.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"Kurs bir grup harika gönüllüler tarafından diğer dillere çevrildi:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Brezilya Portekizcesi](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"yazanlar: [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) ve \"\n\"[@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Çince (Basitleştirilmiş)](https://google.github.io/comprehensive-rust/zh-\"\n\"CN/) yazanlar: [@suetfei](https://github.com/suetfei), [@wnghl](https://\"\n\"github.com/wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://\"\n\"github.com/kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd]\"\n\"(https://github.com/superwhd), [@SketchK](https://github.com/SketchK) ve \"\n\"[@nodmp](https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Çince (Geleneksel)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"yazanlar: [@hueich](https://github.com/hueich), [@victorhsieh](https://\"\n\"github.com/victorhsieh), [@mingyc](https://github.com/mingyc), \"\n\"[@kuanhungchen](https://github.com/kuanhungchen) ve [@johnathan79717]\"\n\"(https://github.com/johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) \"\n\"and [@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: \"\n\"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://github.\"\n\"com/javad-jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]\"\n\"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/\"\n\"hamidrezakp) ve [@mehrad77](https://github.com/mehrad77).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[Japonca](https://google.github.io/comprehensive-rust/ja/) yazanlar: \"\n\"[@CoinEZ-JPN](https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) ve \"\n\"[@kantasv](https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Korece](https://google.github.io/comprehensive-rust/ko/) yazanlar: \"\n\"[@keispace](https://github.com/keispace), [@jiyongp](https://github.com/\"\n\"jiyongp), [@jooyunghan](https://github.com/jooyunghan) ve [@namhyung]\"\n\"(https://github.com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Bengalce](https://google.github.io/comprehensive-rust/bn/) yazanlar: \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[Ukraynaca](https://google.github.io/comprehensive-rust/uk/) yazanlar: [@git-\"\n\"user-cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) ve [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Diller arasında geçiş yapmak için sağ üst köşedeki dil seçiciyi kullanın.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Tamamlanmamış Çeviriler\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Devam eden çok sayıda çeviri var. En son güncellenen çevirilere bağlantı \"\n\"veriyoruz:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[Arapça](https://google.github.io/comprehensive-rust/ar/) yazanlar: \"\n\"[@younies](https://github.com/younies)\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Bengalce](https://google.github.io/comprehensive-rust/bn/) yazanlar: \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Fransızca](https://google.github.io/comprehensive-rust/fr/) yazanlar: \"\n\"[@KookaS](https://github.com/KookaS), [@vcaen](https://github.com/vcaen) ve \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Almanca](https://google.github.io/comprehensive-rust/de/) yazanlar: \"\n\"[@Throvn](https://github.com/Throvn) ve [@ronaldfw](https://github.com/\"\n\"ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[İtalyanca](https://google.github.io/comprehensive-rust/it/) yazanlar: \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) ve [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\"Çevirilerin tam listesi ve güncel durumları [son güncelleme tarihi \"\n\"itibarıyla](https://google.github.io/comprehensive-rust/translation-report.\"\n\"html) veya [kursun en son sürümüyle senkronize edilmiş olarak](https://\"\n\"google.github.io/comprehensive-rust/synced-translation-report.html) da \"\n\"mevcuttur.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Bu çabaya yardımcı olmak istiyorsanız nasıl başlayacağınızı öğrenmek için \"\n\"lütfen [talimatlarımıza](https://github.com/google/comprehensive-rust/blob/\"\n\"main/TRANSLATIONS.md) bakın. Çeviriler [sorun izleyicide](https://github.com/\"\n\"google/comprehensive-rust/issues/282) üzerinde koordine edilir.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"This is a good opportunity to thank the volunteers who have contributed to \"\n\"the translations.\"\nmsgstr \"\"\n\"Çevirilere katkıda bulunan gönüllülere teşekkür etmek için iyi bir fırsat.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If there are students in the class who speak any of the listed languages, \"\n\"you can encourage them to check out the translated versions and even \"\n\"contribute if they find any issues.\"\nmsgstr \"\"\n\"Eğer sınıfta listelenen dillerden herhangi birini konuşan öğrenciler varsa, \"\n\"onları çevrilmiş versiyonları kontrol etmeye ve hatta herhangi bir sorun \"\n\"bulurlarsa katkıda bulunmaya teşvik edebilirsiniz.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Highlight that the project is open source and contributions are welcome, not \"\n\"just for translations but for the course content itself.\"\nmsgstr \"\"\n\"Projenin açık kaynaklı olduğunu ve yalnızca çeviriler için değil, ders \"\n\"içeriğinin kendisi için de katkıların memnuniyetle karşılandığını vurgulayın.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Rust hakkında okumaya başladığınızda, Rust ekosisteminde Rust uygulamalarını \"\n\"inşa etmek (build) ve çalıştırmak için kullanılan standart araç [Cargo]\"\n\"(https://doc.rust-lang.org/cargo/) ile yakında tanışacaksınız. Burada \"\n\"Cargo'nun ne olduğuna, daha geniş ekosisteme nasıl uyum sağladığına ve bu \"\n\"eğitime nasıl uyduğuna dair kısa bir genel bakış sunmak istiyoruz.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Kurulum\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Lütfen <https://rustup.rs/> adresindeki talimatları izleyin.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install different compiler versions.\"\nmsgstr \"\"\n\"Bu size Cargo derleme aracını (`cargo`) ve Rust derleyicisini (`rustc`) \"\n\"verecektir. Ayrıca farklı derleyici sürümlerini yüklemek için \"\n\"kullanabileceğiniz bir komut satırı yardımcı programı olan `rustup`'ı da \"\n\"alacaksınız.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Rust'u kurduktan sonra editörünüzü/düzenleyicinizi veya IDE'nizi Rust ile \"\n\"çalışacak şekilde yapılandırmalısınız. Çoğu editör bunu, [VS Code](https://\"\n\"code.visualstudio.com/), [Emacs](https://rust-analyzer.github.io/manual.\"\n\"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) ve diğerleri için otomatik tamamlama ve tanıma atlama \"\n\"işlevselliği sağlayan [rust-analyzer](https://rust-analyzer.github.io/) ile \"\n\"haberleşerek yapar. Ayrıca [RustRover](https://www.jetbrains.com/rust/) \"\n\"adında farklı bir IDE de mevcuttur.\"\n\n#: src/cargo.md\nmsgid \"On Debian/Ubuntu, you can install `rustup` via `apt`:\"\nmsgstr \"Debian/Ubuntu'da `rustup`'ı `apt` yoluyla kurabilirsiniz:\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"Mac işletim sisteminde Rust'ı yüklemek için [Homebrew](https://brew.sh/)'i \"\n\"kullanabilirsiniz, ancak bu eski bir sürüm sağlayabilir. Bu nedenle Rust'ı \"\n\"resmi sitesinden kurmanız önerilir.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Rust Ekosistemi\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Rust ekosistemi bir dizi araçtan oluşur; bunların başlıcaları şunlardır:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler that turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: `.rs` dosyalarını ikili (binary) dosyalara ve diğer ara biçimlere \"\n\"(format) dönüştüren Rust derleyicisi.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: Rust bağımlılık yöneticisi ve inşa (build) aracı. Cargo, genellikle \"\n\"<https://crates.io> üzerinde barındırılan bağımlılıkları nasıl indireceğini \"\n\"bilir ve projenizi oluştururken bunları `rustc` derleyicisine aktarır. Cargo \"\n\"ayrıca birim testlerini yürütmek için kullanılan yerleşik bir test \"\n\"çalıştırıcısıyla birlikte gelir.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: Rust araç zinciri (toolchain) yükleyicisi ve güncelleyicisi. Bu \"\n\"araç, Rust'ın yeni sürümleri yayınlandığında `rustc` ve `cargo` \"\n\"programlarını yüklemek ve güncellemek için kullanılır. Ek olarak, `rustup` \"\n\"standart kitaplık için belgeleri de indirebilir. Aynı anda birden fazla Rust \"\n\"sürümünü yükleyebilirsiniz ve `rustup` gerektiğinde bunlar arasında geçiş \"\n\"yapmanıza olanak tanır.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/unsafe-rust/unsafe-functions/calling.md\n#: src/android/setup.md src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Anahtar noktalar:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust'un her altı haftada bir yeni sürümünün çıktığı hızlı bir sürüm programı \"\n\"var. Yeni sürümler, eski sürümlerle geriye dönük uyumluluğu korur ve ayrıca \"\n\"yeni işlevsellik sağlar.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"Üç sürüm kanalı vardır: \\\"kararlı (stable)\\\", \\\"beta\\\" ve \\\"gecelik \"\n\"(nightly)\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Yeni özellikler \\\"gecelik (nightly)\\\" kanalında test ediliyor, \\\"beta\\\" her \"\n\"altı haftada bir \\\"kararlı (stable)\\\" hale geliyor.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Bağımlılıklar ayrıca alternatif olarak [kayıtlardan](https://doc.rust-lang.\"\n\"org/cargo/reference/registries.html), git'ten, klasörlerden ve daha \"\n\"fazlasından çözülebilir.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2024. Previous editions were Rust 2015, Rust 2018 \"\n\"and Rust 2021.\"\nmsgstr \"\"\n\"Rust'ın ayrıca [yayınları](https://doc.rust-lang.org/edition-guide/) \"\n\"(editions) vardır: mevcut yayın (edition) Rust 2024'dür. Önceki yayınlar \"\n\"Rust 2015, Rust 2018 ve Rust 2021'di.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Yayınların dilde geriye dönük olarak uyumsuz değişiklikler yapmasına izin \"\n\"verilir.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Kodun kırılmasını (breaking code) önlemek için yayınlar isteğe bağlıdır: \"\n\"`Cargo.toml` dosyası aracılığıyla kasanızın (crate) sürümünü seçersiniz.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Ekosistemin bölünmesini önlemek için Rust derleyicileri farklı sürümler için \"\n\"yazılan kodları karıştırabilir.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Derleyiciyi `cargo` yoluyla değil de doğrudan kullanmanın oldukça nadir \"\n\"olduğunu unutmayın (çoğu kullanıcı asla kullanmaz).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Cargo'nun kendisinin son derece güçlü ve kapsamlı bir araç olduğunu \"\n\"belirtmekte fayda var. Aşağıdakiler dahil olmakla ve bunlarla sınırlı \"\n\"olmamak üzere birçok gelişmiş özelliğe sahiptir:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Proje/paket yapısı\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[çalışma alanları](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Geliştirici Bağımlılıkları ve Çalışma Zamanı Bağımlılığı yönetimi/önbelleğe \"\n\"alma\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[genel kurulum](https://doc.rust-lang.org/cargo/commands/cargo-install.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Ayrıca alt komut eklentileriyle de genişletilebilir ([cargo Clippy](https://\"\n\"github.com/rust-lang/rust-clippy) gibi).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"[Resmi Cargo Kitabı'ndan](https://doc.rust-lang.org/cargo/) daha fazlasını \"\n\"okuyun\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Bu Eğitimdeki Kod Örnekleri\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Bu eğitimde çoğunlukla Rust dilini tarayıcınız üzerinden yürütebileceğiniz \"\n\"örnekler üzerinden inceleyeceğiz. Bu, kurulumu çok daha kolay hale getirir \"\n\"ve herkes için tutarlı bir deneyim sağlar.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise that shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Cargo'yu kurmanız hâlâ tavsiye edilir: Alıştırmaları yapmanızı \"\n\"kolaylaştıracaktır. Son gün, bağımlılıklarla nasıl çalışacağınızı gösteren \"\n\"daha kapsamlı bir alıştırma yapacağız ve bunun için Cargo'ya ihtiyacınız var.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Bu kurstaki kod blokları tamamen etkileşimlidir:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Düzenle beni!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"You can use <kbd>Ctrl</kbd> + <kbd>Enter</kbd> to execute the code when \"\n\"focus is in the text box.\"\nmsgstr \"\"\n\"Metin kutusuna odaklanıldığında kodu çalıştırmak için <kbd>Ctrl</kbd> + \"\n\"<kbd>Enter</kbd> tuşlarını kullanabilirsiniz.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Çoğu kod örneği yukarıda gösterildiği gibi düzenlenebilir. Birkaç kod örneği \"\n\"çeşitli nedenlerden dolayı düzenlenemez:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Gömülü deneme alanları (playgrounds) birim testlerini yürütemez. Birim \"\n\"testlerini göstermek için kodu kopyalayıp yapıştırın ve gerçek Deneme \"\n\"Alanında (Playground) açın.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Gömülü deneme alanları, sayfadan uzaklaştığınız anda durumlarını kaybeder! \"\n\"Öğrencilerin alıştırmaları yerel bir Rust kurulumu kullanarak veya Deneme \"\n\"Alanı aracılığıyla çözmelerinin nedeni budur.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Cargo'nun Yerel (Local) Olarak Çalıştırılması\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Kodu kendi sisteminizde denemek istiyorsanız, önce Rust'u yüklemeniz \"\n\"gerekecektir. Bunu [Rust Book'taki talimatları](https://doc.rust-lang.org/\"\n\"book/ch01-01-installation.html) uygulayarak yapın. Bu size çalışan bir \"\n\"`rustc` ve `cargo`vermelidir. Bu yazının yazıldığı sırada en son kararlı \"\n\"Rust sürümü şu sürüm numaralarına sahiptir:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Rust geriye dönük uyumluluğu koruduğu için daha sonraki herhangi bir sürümü \"\n\"de kullanabilirsiniz.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Bunu yaptıktan sonra, bu eğitimdeki örneklerden birinden bir Rust ikili \"\n\"(binary) programı oluşturmak için şu adımları izleyin:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Kopyalamak istediğiniz örneğin üzerindeki \\\"Panoya kopyala\\\" düğmesine \"\n\"tıklayın.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Kodunuz için yeni bir `exercise/` dizini oluşturmak için `cargo new \"\n\"exercise` komutunu kullanın:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"İkili (binary) dosyanızı inşa etmek (build) ve çalıştırmak için `exercise/` \"\n\"dizinine gidin ve `cargo run` komutunu kullanın:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boilerplate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"`src/main.rs` dosyasındaki standart kodu kendi kodunuzla değiştirin. \"\n\"Örneğin, önceki sayfadaki örneği kullanarak `src/main.rs` dosyasını şu \"\n\"şekilde yapın\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Güncellenmiş ikili (binary) dosyanızı inşa etmek (build) ve çalıştırmak \"\n\"(run) için `cargo run` komutunu kullanın:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Projenizi hatalara karşı hızlı bir şekilde kontrol etmek için `cargo check` \"\n\"komutunu kullanın, çalıştırmadan derlemek için `cargo build` komutunu \"\n\"kullanın. Normal bir hata ayıklama inşasında (build) çıktıyı `target/debug/` \"\n\"içinde bulacaksınız. `target/release/` içinde optimize edilmiş bir sürüm \"\n\"inşası oluşturmak için `cargo build --release` komutunu kullanın.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"`Cargo.toml` dosyasını düzenleyerek projeniz için bağımlılıklar \"\n\"ekleyebilirsiniz. `cargo` komutlarını çalıştırdığınızda, eksik \"\n\"bağımlılıkları sizin için otomatik olarak indirip derleyecektir.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Sınıf katılımcılarını Cargo'yu yüklemeye ve yerel bir metin düzenleyici \"\n\"kullanmaya teşvik etmeye çalışın. Normal bir gelişim ortamına sahip \"\n\"olacakları için hayatları kolaylaşacaktır.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"1. Gün'e Hoş Geldiniz\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"Rust Esasları'nın ilk günü. Bugün çok fazla konuyu ele alacağız:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Temel Rust sözdizimi: değişkenler, skaler ve bileşik türleri, numaralandırma \"\n\"türleri (enums), yapılar (structs), referanslar, fonksiyonlar ve metotlar.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Türler ve tür çıkarımı (inference).\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"Kontrol akışı yapıları (constructs): döngüler, koşullar vb.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"\"\n\"Kullanıcı tanımlı türler: yapılar (structs) ve numaralandırmalar (enums)\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md src/idiomatic/welcome.md\nmsgid \"Schedule\"\nmsgstr \"Zamanlama (Schedule)\"\n\n#: src/welcome-day-1.md src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 10 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Lütfen öğrencilere şunu hatırlatın:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"Sorular akıllarına geldiğinde sormalılar, sona saklamamalılar.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"\"\n\"Sınıfın etkileşimli olması amaçlanıyor ve tartışmalar çok teşvik ediliyor!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs. some other \"\n\"language. It can be hard to find the right balance, but err on the side of \"\n\"allowing discussions since they engage people much more than one-way \"\n\"communication.\"\nmsgstr \"\"\n\"Bir eğitmen olarak tartışmaları güncel tutmaya çalışmalısınız, yani Rust'ın \"\n\"işi nasıl yaptığı ve başka bir dilin işi nasıl yaptığıyla ilgili \"\n\"tartışmaları sürdürün. Doğru dengeyi bulmak zor olabilir, ancak insanları \"\n\"tek yönlü iletişimden çok daha fazla meşgul ettiği için tartışmalara izin \"\n\"vermeyi tercih edin.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Sorular çoğunlukla slaytlardan önce bazı şeyler hakkında konuşacağımız \"\n\"anlamına gelecektir.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Bu kesinlikle sorun değil! Tekrar etmek, öğrenmenin önemli bir parçasıdır. \"\n\"Slaytların sadece bir destek olduğunu ve istediğiniz gibi atlamakta özgür \"\n\"olduğunuzu unutmayın.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"İlk günün amacı, Rust'ta diğer dillerle hemen hemen paralel olması gereken \"\n\"\\\"temel\\\" şeyleri göstermektir. Rust'ın daha gelişmiş kısımları ilerleyen \"\n\"günlerde gelecek.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Eğer bunu bir sınıfta öğretiyorsanız, burası programın üzerinden geçmek için \"\n\"iyi bir yerdir. Her bölümün sonunda bir alıştırma ve ardından bir ara \"\n\"olduğunu unutmayın. Aradan sonra alıştırma çözümünü tamamlamayı planlayın. \"\n\"Burada listelenen zamanlar kursun programa uygun devam etmesi için bir \"\n\"öneridir. Esnek olmaktan ve gerektiği gibi ayarlamaktan çekinmeyin!\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 15 dakika sürmelidir. İçeriği:\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/closures.md src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\n#: src/idiomatic/leveraging-the-type-system.md\n#: src/unsafe-deep-dive/motivations.md src/unsafe-deep-dive/foundations.md\nmsgid \"Slide\"\nmsgstr \"Slayt\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/closures.md src/std-types.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/modules.md src/unsafe-rust.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/unsafe-deep-dive/foundations.md\nmsgid \"10 minutes\"\nmsgstr \"10 dakika\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language that had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust, [2015'te 1.0 sürümü](https://blog.rust-lang.org/2015/05/15/Rust-1.0.\"\n\"html) çıkan yeni bir programlama dilidir:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust, C++ ile benzer role sahip statik olarak derlenen bir dildir\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` arka tarafta (backend) LLVM'yi kullanır.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust birçok [platformu ve mimariyi](https://doc.rust-lang.org/nightly/rustc/\"\n\"platform-support.html) destekler:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust çok çeşitli cihazlarda kullanılır:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"donanım yazılımlarında (firmwares) ve önyükleyicilerde (boot loaders),\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"akıllı ekranlarda,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"cep telefonlarında,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"masaüstü bilgisayarlarda,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"sunucularda.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust, C++ ile aynı alanda yer almaktadır:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Yüksek esneklik.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Yüksek düzeyde kontrol.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"Mikrodenetleyiciler gibi çok kısıtlı cihazlara ölçeklendirilebilir.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Çalışma zamanı veya çöp toplama özelliği yoktur.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Performanstan ödün vermeden güvenilirlik ve emniyete (safety) odaklanır.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Rust'ın bazı benzersiz yok satan noktaları:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_Derleme zamanı bellek emniyeti_ - derleme zamanında tüm bellek hataları \"\n\"sınıfları önlenir\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"İlklendirilmemiş değişken yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Adresi iki kez serbest bırakma (double free) yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Serbest bıraktıktan sonra kullanma (use after free) yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"`NULL` göstericileri yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Kilitli halde unutulmuş hiçbir mutex yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"İş parçacıkları (threads) arasında veri yarışları (data races) yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Adımlayıcıyının (iterator) geçersiz kılınması (invalidation) yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_Tanımsız çalışma zamanı davranışı yok_ - Bir Rust deyiminin yaptığı şey \"\n\"hiçbir zaman belirtilmemiş (unspecified) olarak bırakılmaz\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Dizi erişiminde sınırlar kontrol edilir.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"Tamsayı taşması tanımlıdır (panic veya wrap-around).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_Modern dil özellikleri_ - üst seviye diller kadar etkileyici ve ergonomik\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Numaralandırmalar (Enums) ve desen eşleştirme.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Genelleştirmeler (Generics).\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"FFI ek yükü yok.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Sıfır maliyetli soyutlamalar.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Mükemmel derleyici hata mesajları.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Yerleşik bağımlılık yöneticisi.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Test için yerleşik destek.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Mükemmel Dil Sunucusu Protokolü (Language Server Protocol) desteği.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"Burada fazla zaman geçirmeyin. Bu noktaların tümü ileride daha derinlemesine \"\n\"ele alınacaktır.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Sınıfa hangi dillerde deneyime sahip olduklarını mutlaka sorun. Cevabınıza \"\n\"bağlı olarak Rust'ın farklı özelliklerini vurgulayabilirsiniz:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"C veya C++ deneyimi: Rust, ödünç alma denetleyicisi (borrow checker) \"\n\"aracılığıyla tüm _çalışma zamanı hatalarını(runtime errors)_ ortadan \"\n\"kaldırır. C ve C++'daki gibi performans elde edersiniz bununla birlikte \"\n\"bellek emniyetsizliği sorunları yaşamazsınız. Ayrıca desen eşleştirme \"\n\"(pattern matching) ve yerleşik bağımlılık yönetimi (dependency management) \"\n\"gibi yapılara sahip modern bir dil elde edersiniz.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Java, Go, Python, JavaScript... ile deneyim: Bu dillerdekiyle aynı bellek \"\n\"emniyetine (safety) ve benzer bir yüksek seviyeli dil hissini elde \"\n\"edersiniz. Ayrıca C ve C++ gibi hızlı ve öngörülebilir performans (çöp \"\n\"toplayıcı yok) ve düşük seviyeli donanıma erişim (ihtiyaç duymanız halinde) \"\n\"elde edersiniz.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Deneme Alanı](https://play.rust-lang.org/) kısa Rust programlarını \"\n\"çalıştırmanın kolay bir yolunu sunar ve bu kurstaki örnekler ve \"\n\"alıştırmaların temelini oluşturur. Deneme alanında \\\"merhaba-dünya\\\" ile \"\n\"başlayan programı çalıştırmayı deneyin. Deneme alanı birkaç kullanışlı \"\n\"özellik ile birlikte gelir:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"Kodunuzu \\\"standart\\\" şekilde biçimlendirmek için \\\"Tools\\\" altında \"\n\"`rustfmt` seçeneğini kullanın.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust kodu oluşturmak için iki ana \\\"profil\\\" (profile) vardır: Hata ayıklama \"\n\"(ekstra çalışma zamanı kontrolleri, daha az optimizasyon) ve Sürüm (release) \"\n\"(daha az çalışma zamanı kontrolü, çok fazla optimizasyon). Bunlara üst \"\n\"kısımdaki \\\"Hata Ayıklama\\\" bölümünden erişilebilir.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Eğer ilgileniyorsanız, oluşturulan asm kodunu görmek için \\\"...\\\" altındaki \"\n\"\\\"ASM\\\"yi kullanın.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Öğrenciler araya girerken onları deneme alanını açmaya ve biraz deney \"\n\"yapmaya teşvik edin. Kursun geri kalanında sekmeyi açık tutmaya ve bir \"\n\"şeyler denemeye teşvik edin. Bu özellikle Rust'ın optimizasyonları veya \"\n\"oluşturulan asm kodu hakkında daha fazla bilgi edinmek isteyen ileri düzey \"\n\"öğrenciler için faydalıdır.\"\n\n#: src/types-and-values.md src/concurrency/async.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 40 dakika sürmelidir. İçeriği:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Mümkün olan en basit Rust programına, klasik bir Merhaba Dünya programına \"\n\"geçelim:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Merhaba 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Ne görüyorsunuz:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Fonksiyonlar `fn` ile tanıtılır.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"`main` fonksiyon programın giriş noktasıdır (entry point).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"\"\n\"Bloklar, C ve C++'daki gibi küme parantezleriyle sınırları belirlenmiştir.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Statements end with `;`.\"\nmsgstr \"Deyimler (Statements) `;` ile biter.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"`println` is a macro, indicated by the `!` in the invocation.\"\nmsgstr \"`println` bir makrodur ve çağrısı için `!` gerekir.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Rust dilinindeki dizeler (strings) UTF-8 olarak kodlanmıştır ve herhangi bir \"\n\"Unicode karakteri içerebilir.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Bu slayt öğrencilerin Rust kodu konusunda rahat olmalarını sağlamaya \"\n\"çalışmaktadır. Önümüzdeki dört gün içinde çok şey görecekler, bu yüzden \"\n\"aşina bir şeyle küçükten başlıyoruz.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust, C/C++/Java geleneğindeki diğer dillere çok benzer. Rust emirli bir \"\n\"dildir (imperative) ve kesinlikle gerekmedikçe bir şeyleri yeniden \"\n\"keşfetmeye çalışmaz.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for Unicode.\"\nmsgstr \"Rust, Ünikodu tam olarak destekleyen modern bir dildir.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust, değişken sayıda argümana sahip olmak istediğiniz durumlar için \"\n\"makroları kullanır (fonksiyon [yüklemesi (overloading)](../control-flow-\"\n\"basics/functions.md) yoktur).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"`println!` is a macro because it needs to handle an arbitrary number of \"\n\"arguments based on the format string, which can't be done with a regular \"\n\"function. Otherwise it can be treated like a regular function.\"\nmsgstr \"\"\n\"`println!` bir makrodur çünkü biçim dizesine (format string) dayalı olarak \"\n\"rastgele sayıda argümanı işlemesi gerekir; bu da normal bir fonksiyonla \"\n\"yapılamaz. Aksi takdirde normal bir fonksiyon gibi ele alınabilir.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust çok paradigmalı bir dildir. Örneğin, güçlü [nesne yönelimli programlama \"\n\"özelliklerine](https://doc.rust-lang.org/book/ch17-00-oop.html) sahiptir ve \"\n\"çeşitli [fonksiyonel kavramları](https://doc.rust-lang.org/book/ch13-00-\"\n\"functional-features.html) (fonksiyonel bir dil olmasa da) içerir.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust, statik tür sistemine sahip olmasıyla tür emniyeti sağlar. Değişken \"\n\"bağlamaları (binding) `let` ile yapılır:\"\n\n#: src/types-and-values/variables.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Değişkenlerin varsayılan olarak değiştirilemez (immutable) olduğunu \"\n\"göstermek için `x = 20`'in yorum satırını kaldırın. Değişikliklere izin \"\n\"vermek için `mut` anahtar kelimesini ekleyin.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Warnings are enabled for this slide, such as for unused variables or \"\n\"unnecessary `mut`. These are omitted in most slides to avoid distracting \"\n\"warnings. Try removing the mutation but leaving the `mut` keyword in place.\"\nmsgstr \"\"\n\"Bu slayt için kullanılmayan değişkenler veya gereksiz `mut` gibi uyarılar \"\n\"(warnings) etkinleştirildi. Dikkat dağıtan uyarılardan kaçınmak için çoğu \"\n\"slaytta bunlar atlanır. Atamayı içeren yorum satırını kaldırmayı deneyin, \"\n\"ancak `mut` anahtar sözcüğünü yerinde kalmaya devam etsin.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"Buradaki `i32` değişkenin türüdür. Bunun derleme zamanında bilinmesi \"\n\"gerekir, ancak tür çıkarımı (type inference) (daha sonra ele alınacaktır), \"\n\"programcının birçok durumda bunu atlamasına olanak tanır.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"Burada bazı temel yerleşik türler ve her türün değişmez değerlerinin \"\n\"(literal values) sözdizimi (syntax) verilmiştir.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Türler\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Değişmezler\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"İşaretli tamsayılar\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"İşaretsiz tamsayılar\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Ondalıklı (floating point) sayılar\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Ünikod skaler değerler\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Boole'sal\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Türlerin genişlikleri/boyutları aşağıdaki gibidir:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` ve `fN` türleri _N_ bit genişliğinde,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` ve `usize` türleri göstericinin genişliğinde,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` türü 32 bit genişliğinde,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` türü 8 bit genişliğinde.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes that are not shown above:\"\nmsgstr \"Yukarıda gösterilmeyen birkaç sözdizimi (syntax) vardır:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Rakamlardaki tüm alt çizgiler atlanabilir, bunlar yalnızca okunabilirlik \"\n\"içindir. Yani `1_000`, `1000` (veya `10_00`) olarak ve `123_i64`, `123i64` \"\n\"olarak yazılabilir.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"sonuç: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"İlk defa `main` dışında bir fonksiyon görüyoruz, ancak anlamı açık: üç \"\n\"tamsayı alır ve bir tamsayı geri döndürür. Fonksiyonlar daha sonra daha \"\n\"detaylı olarak ele alınacaktır.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\"Aritmetik, benzer öncelik (precedence) kurallarıyla birlikte diğer \"\n\"dillerdeki aritmetiğe oldukça benzerdir.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"Peki, tamsayı taşması ne olacak? C ve C++'da _işaretli_ tamsayıların taşması \"\n\"aslında tanımsızdır (undefined) ve çalışma zamanında bilinmeyen şeyler \"\n\"olabilir. Rust'ta ise bu tanımlıdır.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Bir hata ayıklama (debug) inşasında paniğe (kontrollü) neden olan ve bir \"\n\"sürüm (release) inşasında sarmalanan (wrap) bir tamsayı taşmasını görmek \"\n\"için `i32`'leri `i16` olarak değiştirin. Taşma (overflow), doyum \"\n\"(saturating), elde (carrying) gibi işlemlerinin kontrolü için başka \"\n\"seçenekler de vardır. Bunlara metot sözdizimi ile erişilir, örneğin `(a * b).\"\n\"saturating_add(b * c).saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"Aslında derleyici sabit ifadelerin (constant expression) taşmasını \"\n\"algılayacaktır, bu nedenle örnek ayrı bir fonksiyon gerektirir.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust, türü belirlemek için değişkenin nasıl _kullanıldığına_ bakacaktır:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Bu slayt, Rust derleyicisinin değişken bildirimleri ve kullanımları \"\n\"tarafından verilen kısıtlamalara (constraints) dayanarak türleri nasıl \"\n\"çıkarım (inference) yapabildiğini gösterir.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Bu şekilde bildirilen değişkenlerin herhangi bir veriyi tutabilecek dinamik \"\n\"\\\"herhangi bir tür\\\" olmadığını vurgulamak çok önemlidir. Böyle bir bildirim \"\n\"tarafından oluşturulan makine kodu, bir türün açık (explicit) bildirimiyle \"\n\"aynıdır. Derleyici bizim için işi yapar ve daha kısa kod yazmamıza yardımcı \"\n\"olur.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Bir tamsayı değişmezinin (integer literal) türünü hiçbir \"\n\"şeykısıtlamadığında, Rust varsayılan olarak türü `i32` yapar. Bu bazen hata \"\n\"mesajlarında \\\"{integer}\\\" olarak görünür. Benzer şekilde, ondalıklı sayı \"\n\"değişmezleri (floating-point literals) için varsayılan tür `f64`'tür.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"\"\n\"// HATA: `{float} == {integer}` için gerçekleştirim (implementation) yok\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0, 1]`. For `n > 1`, the next number is \"\n\"the sum of the previous two.\"\nmsgstr \"\"\n\"Fibonacci dizisi `[0, 1]` ile başlar. `n > 1` için bir sonraki sayı, önceki \"\n\"ikisinin toplamıdır.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the nth Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"N'inci Fibonacci sayısını hesaplayan `fib(n)` adlı bir fonksiyon yazın. Bu \"\n\"fonksiyon ne zaman paniğe (panic) uğrar?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// Temel durum.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Bunu gerçekleştirin (implement)\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// Özyinelemeli (recursive) durum.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"This exercise is a classic introduction to recursion.\"\nmsgstr \"\"\n\"Bu alıştırma, özyinelemeye (recursion) klasik bir giriş niteliğindedir.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Encourage students to think about the base cases and the recursive step.\"\nmsgstr \"\"\n\"Öğrencileri temel durumları ve yinelemeli adımları (recursive step) \"\n\"düşünmeye teşvik edin.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The question \\\"When will this function panic?\\\" is a hint to think about \"\n\"integer overflow. The Fibonacci sequence grows quickly!\"\nmsgstr \"\"\n\"\\\"Bu fonksiyon ne zaman paniğe (panic) uğrar?\\\" sorusu, tam sayı taşması \"\n\"(integer overflow) hakkında düşünmeniz için bir ipucudur. Fibonacci dizisi \"\n\"hızla büyüyor!\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Students might come up with an iterative solution as well, which is a great \"\n\"opportunity to discuss the trade-offs between recursion and iteration (e.g., \"\n\"performance, stack overflow for deep recursion).\"\nmsgstr \"\"\n\"Öğrenciler adımlamalı (iterative) bir çözüm de bulabilirler; bu, \"\n\"özyinelemeli (recursion) ile adımlamalı (iteration) arasındaki dengeleri \"\n\"(örneğin, performans, derin özyineleme için yığın taşması) tartışmak için \"\n\"harika bir fırsattır.\"\n\n#: src/types-and-values/solution.md\nmsgid \"Walk through the solution step-by-step.\"\nmsgstr \"Çözümü adım adım uygulayın.\"\n\n#: src/types-and-values/solution.md\nmsgid \"Explain the recursive calls and how they lead to the final result.\"\nmsgstr \"\"\n\"Özyinelemeli çağrıları ve bunların nihai sonuca nasıl yol açtığını açıklayın.\"\n\n#: src/types-and-values/solution.md\nmsgid \"\"\n\"Discuss the integer overflow issue. With `u32`, the function will panic for \"\n\"`n` around 47. You can demonstrate this by changing the input to `main`.\"\nmsgstr \"\"\n\"Tamsayı taşma sorununu tartışın. `u32` ile fonksiyon, 47 civarında `n` için \"\n\"paniğe uğrayacaktır. Bunu, girdiyi `main` olarak değiştirerek \"\n\"gösterebilirsiniz.\"\n\n#: src/types-and-values/solution.md\nmsgid \"\"\n\"Show an iterative solution as an alternative and compare its performance and \"\n\"memory usage with the recursive one. An iterative solution will be much more \"\n\"efficient.\"\nmsgstr \"\"\n\"Alternatif olarak adımlamalı (iterative) bir çözüm gösterin ve performansını \"\n\"ve bellek kullanımını özyinelemeli (recursive) çözümle karşılaştırın. \"\n\"Adımlamalı (iterative) bir çözüm çok daha verimli olacaktır.\"\n\n#: src/types-and-values/solution.md src/control-flow-basics/match.md\n#: src/references/dangling.md src/user-defined-types/named-structs.md\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/pattern-matching/infallible.md\n#: src/pattern-matching/destructuring-structs.md\n#: src/pattern-matching/let-control-flow/let-else.md src/closures/syntax.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/borrowing/shared.md\n#: src/borrowing/borrowck.md src/borrowing/interior-mutability/refcell.md\n#: src/iterators/motivation.md src/iterators/iterator.md\n#: src/iterators/helpers.md src/iterators/collect.md\n#: src/modules/encapsulation.md src/error-handling/result.md\n#: src/error-handling/anyhow.md src/concurrency/async/state-machine.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"More to Explore\"\nmsgstr \"Daha Fazlasını Keşfedin\"\n\n#: src/types-and-values/solution.md\nmsgid \"\"\n\"For a more advanced discussion, you can introduce memoization or dynamic \"\n\"programming to optimize the recursive Fibonacci calculation, although this \"\n\"is beyond the scope of the current topic.\"\nmsgstr \"\"\n\"Daha ileri bir tartışma için, özyinelemeli (recursive) Fibonacci \"\n\"hesaplamasını optimize etmek amacıyla bellekleme (memoization) veya dinamik \"\n\"programlama tekniklerini tanıtabilirsiniz; ancak bu, mevcut konunun kapsamı \"\n\"dışındadır.\"\n\n#: src/control-flow-basics.md src/methods-and-traits.md src/modules.md\n#: src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 45 dakika sürmelidir. İçeriği:\"\n\n#: src/control-flow-basics.md\nmsgid \"if Expressions\"\nmsgstr \"if İfadeleri (Expressions)\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"4 dakika\"\n\n#: src/control-flow-basics.md\nmsgid \"match Expressions\"\nmsgstr \"match İfadeleri (Expressions)\"\n\n#: src/control-flow-basics.md\nmsgid \"break and continue\"\nmsgstr \"break ve continue\"\n\n#: src/control-flow-basics.md\nmsgid \"We will now cover the many kinds of flow control found in Rust.\"\nmsgstr \"\"\n\"Şimdi, Rust'ta bulunan birçok akış kontrol (flow control) çeşitlerini ele \"\n\"alacağız.\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"Most of this will be very familiar to what you have seen in other \"\n\"programming languages.\"\nmsgstr \"\"\n\"Bunların çoğu diğer programlama dillerinde gördüklerinize çok tanıdık \"\n\"gelecektir.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`.\"\nmsgstr \"\"\n\"Rust dilindeki bir blok, `{}` parantezleri içine alınmış bir ifadeler dizisi \"\n\"(sequence of expressions) içerir.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"The final expression of a block determines the value and type of the whole \"\n\"block.\"\nmsgstr \"\"\n\"Bir bloğun son ifadesi (expression), tüm bloğun değerini ve türünü belirler.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"// dbg!(y);\\n\"\nmsgstr \"// dbg!(y);\\n\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"Son ifade `;` ile bitiyorsa, ortaya çıkan değer ve tür `()` olur.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"\"\n\"Bir değişkenin kapsamı (scope) onu çevreleyen blokla (enclosing block) \"\n\"sınırlıdır.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can explain that dbg! is a Rust macro that prints and returns the value \"\n\"of a given expression for quick and dirty debugging.\"\nmsgstr \"\"\n\"\\\"dbg!\\\"'nin, hızlı ve basitçe hata ayıklama için verilen bir ifadenin \"\n\"değerini yazdırmaya ve geri döndürmeye yarayan bir Rust makrosu olduğunu \"\n\"açıklayabilirsiniz.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Bloktaki son satırı değiştirerek bloğun değerinin nasıl değiştiğini \"\n\"gösterebilirsiniz. Örneğin, noktalı virgül eklemek/kaldırmak veya bir \"\n\"`return` kullanmak.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Demonstrate that attempting to access `y` outside of its scope won't compile.\"\nmsgstr \"\"\n\"`y` değişkenine kapsamı (scope) dışından erişmeye çalışmanın derleme hatası \"\n\"olacağını gösterin.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"Values are effectively \\\"deallocated\\\" when they go out of their scope, even \"\n\"if their data on the stack is still there.\"\nmsgstr \"\"\n\"Değerler, yığındaki (stack) verileri hala orada olsa bile, kapsamlarının \"\n\"(scope) dışına çıktıklarında etkili bir şekilde \\\"tahsisleri geri verilir \"\n\"(deallocated)\\\".\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"`if` ifadeleri\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"[`if` ifadelerini](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) tam olarak diğer dillerdeki `if` deyimleri (statement) \"\n\"gibi kullanabilirsiniz:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"sıfır!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"büyükçe\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"aşırı büyük\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Ayrıca, `if`'i ifade (expresssion) olarak da kullanabilirsiniz. Her bloğun \"\n\"son ifadesi `if` ifadesinin değeri olur:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"küçük\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"büyük\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"sayının boyutu: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"`if` bir ifade (expression) olduğundan ve belirli bir türe sahip olması \"\n\"gerektiğinden, her iki dal bloğunun da aynı türde olması gerekir. İkinci \"\n\"örnekte `\\\"küçük\\\"`ten sonra `;` eklerseniz ne olacağını gösterin.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"An `if` expression should be used in the same way as the other expressions. \"\n\"For example, when it is used in a `let` statement, the statement must be \"\n\"terminated with a `;` as well. Remove the `;` before `println!` to see the \"\n\"compiler error.\"\nmsgstr \"\"\n\"Bir `if` ifadesi diğer ifadelerle aynı şekilde kullanılmalıdır. Örneğin, bir \"\n\"`let` ifadesinde kullanıldığında, ifadenin `;` ile de sonlandırılması \"\n\"gerekir. Derleyici hatasını görmek için `println!`'den önceki `;`'yi \"\n\"kaldırın.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"`match` can be used to check a value against one or more options:\"\nmsgstr \"\"\n\"`match` bir değeri bir veya daha fazla seçeneğe göre kontrol etmek için \"\n\"kullanılabilir:\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"one\\\"\"\nmsgstr \"\\\"bir\\\"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"ten\\\"\"\nmsgstr \"\\\"on\\\"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"one hundred\\\"\"\nmsgstr \"\\\"yüz\\\"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"something else\\\"\"\nmsgstr \"\\\"başka bir şey\\\"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"Like `if` expressions, `match` can also return a value;\"\nmsgstr \"\"\n\"`if` ifadeleri gibi `match` ifadesi de bir değeri geri döndürebilir (return);\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\\\"The value of {flag} is {val}\\\"\"\nmsgstr \"\\\"{flag}'in değeri = {val}\\\"\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` arms are evaluated from top to bottom, and the first one that \"\n\"matches has its corresponding body executed.\"\nmsgstr \"\"\n\"`match` kolları (arms) yukarıdan aşağıya doğru değerlendirilir ve eşleşen \"\n\"ilk kolun karşılık gelen gövdesi (body) çalıştırılır.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"There is no fall-through between cases the way that `switch` works in other \"\n\"languages.\"\nmsgstr \"\"\n\"`switch`'in diğer dillerdeki çalışma şekli gibi durumlar (cases) arasında  \"\n\"aşağıya geçiş (fall-through) yoktur.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"The body of a `match` arm can be a single expression or a block. Technically \"\n\"this is the same thing, since blocks are also expressions, but students may \"\n\"not fully understand that symmetry at this point.\"\nmsgstr \"\"\n\"Bir `match` kolunun gövdesi tek bir ifade (expression) veya bir blok \"\n\"olabilir. Teknik olarak bu aynı şeydir, çünkü bloklar da bir ifadedir, ancak \"\n\"öğrenciler bu noktadaki denk yapıyı (symmetry) tam olarak anlamayabilirler.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` expressions need to be exhaustive, meaning they either need to cover \"\n\"all possible values or they need to have a default case such as `_`. \"\n\"Exhaustiveness is easiest to demonstrate with enums, but enums haven't been \"\n\"introduced yet. Instead we demonstrate matching on a `bool`, which is the \"\n\"simplest primitive type.\"\nmsgstr \"\"\n\"`match` ifadelerinin kapsamlı (exhaustive) olması gerekir, yani ya tüm olası \"\n\"değerleri kapsamaları ya da `_` gibi varsayılan bir duruma (case) sahip \"\n\"olmaları gerekir. Kapsamlılık (Exhaustiveness) enumlarla gösterilmesi en \"\n\"kolay olanıdır, ancak enumlar henüz tanıtılmadı. Bunun yerine, en basit \"\n\"ilkel tür olan `bool` üzerinde eşleştirmeyi (matching) gösteriyoruz.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"This slide introduces `match` without talking about pattern matching, giving \"\n\"students a chance to get familiar with the syntax without front-loading too \"\n\"much information. We'll be talking about pattern matching in more detail \"\n\"tomorrow, so try not to go into too much detail here.\"\nmsgstr \"\"\n\"Bu slayt, desen eşleştirmesinden (pattern matching) bahsetmeden `match`'i \"\n\"tanıtıyor ve öğrencilere çok fazla bilgi yüklemeden sözdizimine (syntax) \"\n\"aşina olma şansı veriyor. Desen eşleştirmesi hakkında yarın daha detaylı \"\n\"konuşacağız, bu yüzden burada çok fazla detaya girmemeye çalışın.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"To further motivate the usage of `match`, you can compare the examples to \"\n\"their equivalents written with `if`. In the second case, matching on a \"\n\"`bool`, an `if {} else {}` block is pretty similar. But in the first example \"\n\"that checks multiple cases, a `match` expression can be more concise than \"\n\"`if {} else if {} else if {} else`.\"\nmsgstr \"\"\n\"`match` kullanımını daha da motive etmek için, örnekleri `if` ile yazılmış \"\n\"eşdeğerleriyle karşılaştırabilirsiniz. İkinci durumda, bir `bool` üzerinde \"\n\"eşleme (matching) yapmak, `if {} else {}` bloğuna oldukça benzer. Ancak \"\n\"birden fazla durumu kontrol eden ilk örnekte, bir `match` ifadesi `if {} \"\n\"else if {} else if {} else` ifadesinden daha az ve öz olabilir.\"\n\n#: src/control-flow-basics/match.md\nmsgid \"\"\n\"`match` also supports match guards, which allow you to add an arbitrary \"\n\"logical condition that will get evaluated to determine if the match arm \"\n\"should be taken. However talking about match guards requires explaining \"\n\"about pattern matching, which we're trying to avoid on this slide.\"\nmsgstr \"\"\n\"`match` ayrıca eşleşme filtrelerini (match guards) da destekler, bu da \"\n\"eşleşme kolunun (match arm) alınıp alınmaması gerektiğini belirlemek için \"\n\"değerlendirilecek keyfi bir mantıksal koşul (condition) eklemenize olanak \"\n\"tanır. Ancak eşleşme filtreleri hakkında konuşmak, bu slaytta kaçınmaya \"\n\"çalıştığımız desen eşleştirmesi (pattern matching) hakkında açıklama \"\n\"gerektirir.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"\"\n\"Rust dilinde üç döngüsel anahtar kelime vardır: `while`, `loop`, ve `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[`while` anahtar kelimesi](https://doc.rust-lang.org/reference/expressions/\"\n\"loop-expr.html#predicate-loops) diğer dillerdeki gibi işler ve koşul doğru \"\n\"olduğu sürece döngü gövdesini yürütür (execute).\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`for` döngüsü](https://doc.rust-lang.org/std/keyword.for.html) değer \"\n\"aralıkları (ranges of values) veya bir koleksiyondaki (collection) öğeler \"\n\"üzerinde adımlama yapar (iterate):\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"`for` döngülerinin başlığının altında, farklı türdeki aralıklar/\"\n\"koleksiyonlar üzerinde adımlamayı gerçekleştirmek için \\\"adımlayıcılar\\\" adı \"\n\"verilen bir kavram kullanılır. Adımlayıcılar (iterators) daha sonra daha \"\n\"ayrıntılı olarak tartışılacaktır.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"İlk `for` döngüsünün yalnızca `4`'e kadar adımladığını unutmayın. Kapalı bir \"\n\"aralık için `1..=5` sözdizimini gösterin.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`loop` deyimi](https://doc.rust-lang.org/std/keyword.loop.html), bir \"\n\"`break`'e kadar sonsuz döner.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The `loop` statement works like a `while true` loop. Use it for things like \"\n\"servers that will serve connections forever.\"\nmsgstr \"\"\n\"`loop` deyimi `while true` döngüsü gibi çalışır. Bağlantılara sonsuza kadar \"\n\"hizmet edecek sunucular gibi şeyler için kullanın.\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Bir sonraki adıma hemen başlamak istiyorsanız [`continue`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#continue-expressions) kullanın.\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). With \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Herhangi bir döngüden erken çıkmak istiyorsanız, [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions) kullanın. \"\n\"`loop` ile, isteğe bağlı bir ifade yazılabilir ve bu ifade, `loop` \"\n\"ifadesinin değeri olur.\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct that can return a non-trivial \"\n\"value. This is because it's guaranteed to only return at a `break` statement \"\n\"(unlike `while` and `for` loops, which can also return when the condition \"\n\"fails).\"\nmsgstr \"\"\n\"`loop`'un önemsiz olmayan (non-trivial) bir değer geri döndüren tek döngüsel \"\n\"yapı olduğunu unutmayın. Bunun nedeni, en az bir `break` ifadesinde \"\n\"sonlanmasının garantili olmasıdır (koşul başarısız olduğunda da sonlanabilen \"\n\"`while` ve `for` döngülerinin aksine).\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument that is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Hem `continue` ve `break` isteğe bağlı olarak iç içe geçmiş döngülerden \"\n\"çıkmak için kullanılan bir etiket (label) argümanını alabilir:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"Labeled break also works on arbitrary blocks, e.g.\"\nmsgstr \"Etiketli break, keyfi olarak yazılan bloklarda da çalışır, örneğin.\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"This line gets skipped\\\"\"\nmsgstr \"\\\"Bu satır geçilece\\\"\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Bildirim (declaration) parametrelerinin ardından bir tür (bazı programlama \"\n\"dillerinin tersi) ve ardından bir geri dönüş türü gelir.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Bir fonksiyon gövdesindeki (veya herhangi bir bloktaki) son ifade \"\n\"(expression), geri dönüş değeri (return value) olur. İfadenin sonundaki `;` \"\n\"işaretini silmeniz yeterlidir. `return` anahtar kelimesi erken geri dönüş \"\n\"(early return) için kullanılabilir, ancak fonksiyonun sonunda \\\"yalın (bare) \"\n\"değer\\\" kullanmak daha yaygındır (idiomatic) (`return`kullanmak için \"\n\"`gcd`'yi yeniden düzenleyin - refactor).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the return type is omitted.\"\nmsgstr \"\"\n\"Bazı fonksiyonların geri dönüş değeri (return value) yoktur ve 'birim türü \"\n\"(unit type)', `()` geri döndürürler. Eğer geri dönüş türü yazılmazsa, \"\n\"derleyici birim türünü çıkarım (infer) yapacaktır.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\"Fonksiyon yüklemesi (overloading) desteklenmez -- her fonksiyonun tek bir \"\n\"gerçekleştirimi (implementation) vardır.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Her zaman sabit sayıda parametre alır. Varsayılan argümanlar (default \"\n\"arguments) desteklenmez. Makrolar değişken sayıda argüman alan fonksiyonları \"\n\"(variadic functions) desteklemek için kullanılabilir.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Her zaman tek bir parametre türü kümesi alır. Bu türler genelleştirilmiş \"\n\"(generic) olabilir, bu konuya daha sonra değinilecektir.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Makrolar, derleme sırasında Rust koduna genişletilir ve değişken sayıda \"\n\"argüman alabilir. Sonda olan `!` işaretiyle ayırt edilirler. Rust standart \"\n\"kütüphanesi çeşitli yararlı makrolar içerir.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)`, [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.\"\n\"html)'de açıklanan biçimi (formatting) uygulayarak standart çıktıya bir \"\n\"satır yazdırır.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` tıpkı `println!` gibi işler ancak sonucu bir dize \"\n\"(string) olarak geri döndürür.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"\"\n\"`dbg!(expression)` ifadenin değerini kaydeder (loggging) ve onu geri \"\n\"döndürür.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` kodun bir kısmını henüz gerçekleştirilmemiş (not-yet-implemented) \"\n\"olarak işaretler. Eğer yürütülürse (execute), paniğe neden olur.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"Bu bölümden çıkarılacak sonuç, bu ortak kolaylıkların mevcut olduğu ve \"\n\"bunların nasıl kullanılacağıdır. Bunların neden makro olarak tanımlandığı ve \"\n\"neye genişledikleri özellikle kritik değildir.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"Kurs, makroların tanımlanmasını (define) kapsamaz, ancak daha sonraki bir \"\n\"bölümde `derive` makrolarının kullanımı anlatılacaktır.\"\n\n#: src/control-flow-basics/macros.md src/pattern-matching/match.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"More To Explore\"\nmsgstr \"Daha Fazlasını Keşfedin\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"There are a number of other useful macros provided by the standard library. \"\n\"Some other examples you can share with students if they want to know more:\"\nmsgstr \"\"\n\"Standart kütüphane tarafından sağlanan birçok başka kullanışlı makro vardır. \"\n\"Öğrenciler daha fazlasını öğrenmek isterse onlarla paylaşabileceğiniz bazı \"\n\"diğer örnekler:\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"[`assert!`](https://doc.rust-lang.org/stable/std/macro.assert.html) and \"\n\"related macros can be used to add assertions to your code. These are used \"\n\"heavily in writing tests.\"\nmsgstr \"\"\n\"[`assert!`](https://doc.rust-lang.org/stable/std/macro.assert.html) ve \"\n\"ilgili makrolar, kodunuza doğrulamalar (assertions) eklemek için \"\n\"kullanılabilir. Bu makrolar, test yazımında yoğun şekilde kullanılır.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"[`unreachable!`](https://doc.rust-lang.org/stable/std/macro.unreachable.\"\n\"html) is used to mark a branch of control flow that should never be hit.\"\nmsgstr \"\"\n\"[`unreachable!`](https://doc.rust-lang.org/stable/std/macro.unreachable.\"\n\"html), hiçbir zaman ulaşılmaması gereken bir kontrol akışı dalını \"\n\"işaretlemek için kullanılır.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"[`eprintln!`](https://doc.rust-lang.org/stable/std/macro.eprintln.html) \"\n\"allows you to print to stderr.\"\nmsgstr \"\"\n\"[`eprintln!`](https://doc.rust-lang.org/stable/std/macro.eprintln.html) \"\n\"stderr'e yazdırmanıza olanak tanır.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\"[Collatz sanısı](https://en.wikipedia.org/wiki/Collatz_conjecture), sıfırdan \"\n\"büyük herhangi bir n<sub>1</sub> için aşağıdaki şekilde tanımlanır:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"Eğer _n<sub>i</sub>_ 1 ise, dizi _n<sub>i</sub>_'de sonlanır.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"\"\n\"Eğer _n<sub>i</sub>_ çift ise, o zaman _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\"Eğer _n<sub>i</sub>_ tek sayı ise _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"Örneğin, _n<sub>1</sub>_ = 3 ile başalrsak:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"3 tek sayıdır, dolayısıyla _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"10 çift sayıdır, dolayısıyla _n<sub>3</sub>_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"5 tek sayıdır, dolayısıyla _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"16 çift sayıdır, dolayısıyla _n<sub>5</sub>_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"8 çift sayıdır, dolayısıyla _n<sub>6</sub>_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"4 çift sayıdır, dolayısıyla _n<sub>7</sub>_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"2 çifttir, bu yüzden _n<sub>8</sub>_ = 1; ve\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"sekans sonlandırılır.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the Collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Belirli bir başlangıç `n` için Collatz dizisin uzunluğunu hesaplayan bir \"\n\"fonksiyon yazın.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// `n`'den başlayan collatz sekansının uzunluğunu belirle.\\n\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Uzunluk: {}\\\"\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"// should be 15\\n\"\nmsgstr \"// 15 olmalı\\n\"\n\n#: src/control-flow-basics/solution.md\nmsgid \"\"\n\"Note that the argument `n` is marked as `mut`, allowing you to change the \"\n\"value of `n` in the function. Like variables, function arguments are \"\n\"immutable by default and you must add `mut` if you want to modify their \"\n\"value. This does not affect how the function is called or how the argument \"\n\"is passed in.\"\nmsgstr \"\"\n\"Argüman `n`’in `mut` olarak işaretlendiğine dikkat edin; bu, fonksiyon \"\n\"içinde `n`’in değerini değiştirmenize imkân tanır. Değişkenlerde olduğu \"\n\"gibi, fonksiyon argümanları da varsayılan olarak değiştirilemezdir \"\n\"(immutable) ve değerlerini değiştirmek istiyorsanız `mut` eklemeniz gerekir. \"\n\"Bu, fonksiyonun nasıl çağrıldığını veya argümanın nasıl iletildiğini \"\n\"etkilemez.\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Tekrar Hoş Geldiniz\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 45 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 45 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 35 dakika sürmelidir. İçeriği:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"We have seen how primitive types work in Rust. Now it's time for you to \"\n\"start building new composite types.\"\nmsgstr \"\"\n\"Rust'ta (primitive) ilkel türlerin nasıl çalıştığını gördük. Şimdi yeni \"\n\"bileşik (composite) türler oluşturmaya başlamanın zamanı geldi.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Arrays can also be initialized using the shorthand syntax, e.g. `[0; 1024]`. \"\n\"This can be useful when you want to initialize all elements to the same \"\n\"value, or if you have a large array that would be hard to initialize \"\n\"manually.\"\nmsgstr \"\"\n\"Diziler ayrıca kısaltma sözdizimi (shorthand syntax) kullanılarak da \"\n\"ilklendirilebilir, örneğin `[0; 1024]`. Bu, tüm elemanları aynı değere \"\n\"başlatmak istediğinizde veya manuel olarak başlatılması zor olan büyük bir \"\n\"diziniz varsa yararlı olabilir.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Bir `[T; N]` dizi türünün değeri , aynı `T` türdeki `N` (derleme zamanı \"\n\"sabiti) öğelerini/elemanlarını tutar. Dizinin uzunluğunun _türünün parçası_ \"\n\"olduğuna dikkat edin, bu da `[u8; 3]' ve '[u8; 4]` dizilerinin iki farklı \"\n\"tür olarak kabul edildiği anlamına gelir. Dilimler (slices), ki çalışma \"\n\"zamanında belirlenen bir boyuta sahiptir, daha sonra ele alınacaktır.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. The compiler is able to \"\n\"determine that the index is unsafe, and will not compile the code:\"\nmsgstr \"\"\n\"Sınırların dışında (out-of-bounds) bir dizi (array) elemanına erişmeyi \"\n\"deneyin. Derleyici, indeksin emniyetsiz (unsafe) olduğunu belirleyebilir ve \"\n\"kodu derlemez:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\\\"a: {a:?}\\\"\"\nmsgstr \"\\\"a: {a:?}\\\"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Array accesses are checked at runtime. Rust can usually optimize these \"\n\"checks away; meaning if the compiler can prove the access is safe, it \"\n\"removes the runtime check for better performance. They can be avoided using \"\n\"unsafe Rust. The optimization is so good that it's hard to give an example \"\n\"of runtime checks failing. The following code will compile but panic at \"\n\"runtime:\"\nmsgstr \"\"\n\"Dizi erişimleri çalışma zamanında kontrol edilir. Rust genellikle bu \"\n\"kontrolleri optimize edebilir; yani, derleyici erişimin güvenli olduğunu \"\n\"kanıtlayabilirse, daha iyi performans için çalışma zamanı kontrolünü \"\n\"kaldırır. Bu kontroller, unsafe Rust kullanılarak da atlanabilir. \"\n\"Optimizasyon o kadar iyidir ki, çalışma zamanı kontrollerinin başarısız \"\n\"olduğu bir örnek vermek zordur. Aşağıdaki kod derlenecektir ancak çalışma \"\n\"zamanında panik (panic) ile sonuçlanacaktır:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Dizilere değer atamak için değişmezleri (literals) kullanabiliriz.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Arrays are not heap-allocated. They are regular values with a fixed size \"\n\"known at compile time, meaning they go on the stack. This can be different \"\n\"from what students expect if they come from a garbage-collected language, \"\n\"where arrays may be heap allocated by default.\"\nmsgstr \"\"\n\"Diziler dinamik bellek (heap) üzerinde tahsis edilmez. Derleme zamanında \"\n\"(compile time) bilinen sabit bir boyuta sahip normal değerlerdir, yani \"\n\"yığında (stack) yer alırlar. Çöp toplayıcılı (garbage-collected) bir dilden \"\n\"gelen öğrenciler için bu beklediklerinden farklı olabilir; çünkü bu dillerde \"\n\"diziler varsayılan olarak yığında (heap) tahsis ediliyor olabilir.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"There is no way to remove elements from an array, nor add elements to an \"\n\"array. The length of an array is fixed at compile-time, and so its length \"\n\"cannot change at runtime.\"\nmsgstr \"\"\n\"“Bir diziden öğe çıkarmanın ya da bir diziye öğe eklemenin bir yolu yoktur. \"\n\"Bir dizinin uzunluğu derleme zamanında sabittir ve bu nedenle çalışma \"\n\"zamanında (runtime) değiştirilemez.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"Debug Printing\"\nmsgstr \"Hata ayıklama amacıyla çıktı verme\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"`println!` makrosu `?` biçim (format) parametresiyle hata ayıklama \"\n\"gerçekleştirimini (implementation) ister: `{}` varsayılan çıktıyı verir, \"\n\"`{:?}` hata ayıklama çıktısını verir. Tamsayılar (integer) ve dizeler \"\n\"(string) gibi türler varsayılan çıktıyı uygular (default output), ancak \"\n\"diziler (arrays) yalnızca hata ayıklama çıktısını (debug output) uygular. \"\n\"Bu, bahsi geçen kodda hata ayıklama çıktısını kullanmamız gerektiği anlamına \"\n\"gelir.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"`#` eklemek, örneğin `{a:#?}`, okunması daha kolay olabilecek \\\"güzel \"\n\"yazdırma (pretty printing)\\\" biçimini (format) çağırır.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Diziler gibi, demetlerin (tuple) de sabit bir uzunluğu vardır.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\"Demetler farklı türdeki değerleri bir bileşik tür (compound type) halinde \"\n\"gruplandırır.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Bir demetin alanlarına (fields) nokta ve değerin indeksi ile erişilebilir, \"\n\"örneğin `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"Boş demet `()`, \\\"birim türü (unit type)\\\" olarak anılır ve, diğer \"\n\"dillerdeki `void`'e benzer şekilde, bir geri dönüş değerinin (return value) \"\n\"bulunmadığını belirtir.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Unlike arrays, tuples cannot be used in a `for` loop. This is because a \"\n\"`for` loop requires all the elements to have the same type, which may not be \"\n\"the case for a tuple.\"\nmsgstr \"\"\n\"Dizilerin aksine, demetler (tuple) `for` döngüsünde kullanılamaz. Bunun \"\n\"nedeni, `for` döngüsünün tüm elemanların aynı türde olmasını \"\n\"gerektirmesidir; bu, demet için geçerli olmayabilir.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"There is no way to add or remove elements from a tuple. The number of \"\n\"elements and their types are fixed at compile time and cannot be changed at \"\n\"runtime.\"\nmsgstr \"\"\n\"Bir demete (tuple) eleman eklemenin veya çıkarmanın bir yolu yoktur. Eleman \"\n\"sayısı ve türleri derleme zamanında (compile time) sabittir ve çalışma \"\n\"zamanında (runtime) değiştirilemez.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\"'for' deyimi (statement) diziler üzerinde adımlamayı/dolaşmayı destekler \"\n\"(ancak demetler (tuples) üzerinde desteklemez).\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Bu fonksiyonellik `IntoIterator` özelliğini (trait) kullanıyor, ancak bunu \"\n\"henüz ele almadık.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked, while debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"`assert_ne!` makrosu burada yenidir. Ayrıca `assert_eq!` ve `assert!` \"\n\"makroları da vardır. Bunlar her zaman kontrol edilirken, `debug_assert!` \"\n\"gibi yalnızca hata ayıklama varyantları sürüm inşasında (release build) \"\n\"hiçbir şeye derlenmez.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust supports using pattern matching to destructure a larger value like a \"\n\"tuple into its constituent parts:\"\nmsgstr \"\"\n\"Rust, bir demet (tuple) gibi daha büyük bir değeri, onu oluşturan parçalara \"\n\"ayrıştırmak (destructure) için desen eşleştirmeyi (pattern matching) \"\n\"kullanmayı destekler:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"{tuple:?}: {}\\\"\"\nmsgstr \"\\\"{tuple:?}: {}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"ordered\\\"\"\nmsgstr \"\\\"sıralanmış\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"unordered\\\"\"\nmsgstr \"\\\"sıralı de\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Burada kullanılan desenler (patterns) \\\"reddedilemez (irrefutable)\\\"dir, \"\n\"yani derleyici `=` sağındaki değerin desenle aynı yapıya sahip olduğunu \"\n\"statik olarak doğrulayabilir.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Bir değişken adı, her zaman herhangi bir değerle eşleşen reddedilemez \"\n\"(irrefutable) bir desendir, bu nedenle tek bir değişkeni bildirmek için \"\n\"`let`'i kullanabiliriz.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust ayrıca koşullu ifadelerde desenlerin (patterns) kullanılmasını \"\n\"destekleyerek eşitlik karşılaştırmasının (comparison) ve ayrıştırmasının \"\n\"(destructuring) aynı anda gerçekleşmesine olanak tanır. Bu desen eşleştirme \"\n\"stili daha sonra daha ayrıntılı olarak tartışılacaktır.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Desenin (pattern) eşleştirilen değerle eşleşmediğinde oluşacak derleyici \"\n\"hatasını göstermek için yukarıdaki örnekleri düzenleyin.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Diziler başka diziler de içerebilir:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"Bu değişkenin türü nedir?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` that \"\n\"transposes a matrix (turns rows into columns):\"\nmsgstr \"\"\n\"Bir matrisin devriğini (transpose) yapacak (satırları sütunlara çevirecek) \"\n\"`transpose` fonksiyonu yazmak için yukarıdaki gibi bir dizi kullanın:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Aşağıdaki kodu <https://play.rust-lang.org/> adresine kopyalayın ve \"\n\"fonksiyonu gerçekleştirin (implement). Bu fonksiyon yalnızca 3x3'lük \"\n\"matrislerde çalışır.\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- bu yorum, rustfmt'nin yeni satır eklemesini sağlar\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"Original:\\\"\"\nmsgstr \"\\\"Orjinali:\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"\\\\nTransposed:\\\"\"\nmsgstr \"\\\"\\\\nDevriği alınmış hâli:\\\"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md src/iterators.md\n#: src/error-handling.md src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 55 dakika sürmelidir. İçerir:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking ownership \"\n\"of the value, and is also called \\\"borrowing\\\". Shared references are read-\"\n\"only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"Bir referans, değerin sahipliğini almadan başka bir değere erişmenin bir \"\n\"yolunu sağlar ve \\\"ödünç alma (borrowing)\\\" olarak da adlandırılır. \"\n\"Paylaşılan referanslar (shared reference) salt okunurdur (read-only) ve \"\n\"referans edilen veriler değiştirilemez.\"\n\n#: src/references/shared.md src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/references/shared.md\nmsgid \"'B'\"\nmsgstr \"'B'\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"`T` türüne yönelik paylaşılan referansın türü `&T`'dir. `&` operatörüyle bir \"\n\"referans değeri (reference value) oluşturulur. `*` operatörü bir referansın \"\n\"içeriğine eriştirir (dereference) ve onun değerini verir.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References can never be null in Rust, so null checking is not necessary.\"\nmsgstr \"\"\n\"Rust'ta referanslar hiçbir zaman null olamaz, bu yüzden null kontrolü (null \"\n\"checking) gerekli değildir.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"Bir referansın, atıfta bulunduğu (refer) değeri \\\"ödünç aldığı (barrow)\\\" \"\n\"söylenir ve bu, göstericilere aşina olmayan öğrenciler için iyi bir \"\n\"modeldir: kod, değere erişmek için referansı kullanabilir, ancak değer yine \"\n\"de orijinal değişken tarafından \\\"sahiplidir (owned)\\\". Kurs, 3. günde \"\n\"sahiplik (ownership) konusunda daha ayrıntılı bilgi verecektir.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"Referanslar göstericiler (pointers) olarak gerçekleştirilir (implement) ve \"\n\"önemli bir avantaj şudur ki, gösterdikleri şeyin boyutundan çok daha küçük \"\n\"olabilmeleridir. C veya C++'a aşina olan öğrenciler referansları \"\n\"göstericiler olarak tanıyacaklardır. Kursun ilerleyen bölümlerinde Rust'ın, \"\n\"ham göstericilerin (raw pointers) kullanılmasından kaynaklanan bellek \"\n\"emniyeti hatalarını (memory-safety bugs) nasıl önlediği ele alınacaktır.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Explicit referencing with `&` is usually required. However, Rust performs \"\n\"automatic referencing and dereferencing when invoking methods.\"\nmsgstr \"\"\n\"Açık bir şekilde (explicit) `&` ile referans vermek genellikle gereklidir. \"\n\"Ancak, Rust metotları çağırırken referans verme ve referanstan çıkarma \"\n\"(dereferencing) işlemlerini otomatik olarak gerçekleştirir.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust bazı durumlarda, özellikle de metotları çağırırken (`r.is_ascii()`'i \"\n\"deneyin) otomatik olarak referansın içeriğine erişecektir (auto-\"\n\"dereference). C++'daki gibi `->` operatörüne gerek yoktur.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"Bu örnekte, `r` değiştirilebilir (mutable) olduğundan ona tekrar atama \"\n\"yapılabilir (reassigned) (`r = &b`). Bunun `r`'yi yeniden bağladığını (re-\"\n\"bind) ve böylece başka bir şeye atıfta bulunduğunu (refer) unutmayın. Bu C++ \"\n\"dilinden, bir referansa atamanın (assignment) referans verilenin değerini \"\n\"değiştirmesinden, farklıdır.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"Paylaşılan bir referans (shared reference), atıfta bulunduğu (refer) değerin \"\n\"değiştirilmesine (modify), bu değer değiştirilebilir (mutable) olsa bile, \"\n\"izin vermez. `*r = 'X'`'i deneyin.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust.\"\nmsgstr \"\"\n\"Rust, yeterince uzun süre hayatta olmalarını sağlamak için tüm referansların \"\n\"ömrülerini (lifetime) takip eder. Emniyetli (safe) Rust'ta boşa çıkan \"\n\"referanslar (dangling reference) oluşamaz.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"We will talk more about borrowing and preventing dangling references when we \"\n\"get to ownership.\"\nmsgstr \"\"\n\"Sahipliğe (ownership) geçince ödünç alma (borrowing) konusunu daha detaylı \"\n\"konuşacağız.\\n\"\n\"Sahiplik (ownership) konusuna geldiğimizde ödünç alma ve boşa çıkan \"\n\"referansları (dangling references) daha detaylı konuşacağız.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"Değiştirilebilir referanslar (mutable reference) olarak da bilinen dışlayan \"\n\"(exclusive) referanslar, atıfta bulundukları (refer) değerin \"\n\"değiştirilmesine olanak tanır. Aynı zamanda, `&mut T` türüne sahiplerdir.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"Dışlayan (exclusive)\\\" kelimesinden kasıt, değere erişmek için yalnızca bu \"\n\"referansın kullanılabileceği, diğerlerinin dışlanacağıdır. Aynı anda başka \"\n\"hiçbir referans (paylaşılan veya dışlayan olsun farketmez) mevcut olamaz ve \"\n\"dışlayan referans (exclusive reference) varken atıfta bulunan değere \"\n\"erişilemez. `x_coord` hayattayken bir `&point.0` oluşturmayı veya \"\n\"`point.0`'ı değiştirmeyi deneyin.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one is a shared reference that can be bound to \"\n\"different values, while the second is an exclusive reference to a mutable \"\n\"value.\"\nmsgstr \"\"\n\"`let mut x_coord: &i32` ve `let x_coord: &mut i32` arasındaki farka dikkat \"\n\"ettiğinizden emin olun. Birincisi, farklı değerlere bağlanabilen (bind) \"\n\"paylaşımlı bir referanstır (shared reference), ikincisi, değiştirilebilir \"\n\"bir değere (mutable value) dışlayan bir referanstır (exclusive reference).\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\"Bir dilim (slice) size daha büyük bir koleksiyonun içinden bir görüntü verir:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Dilimler (slice), dilimlenmiş türden verileri ödünç alır (borrowing).\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"`a`'yı ödünç alıp (borrowing) başlangıç ​​ve bitiş indekslerini köşeli \"\n\"parantez içinde belirterek bir dilim (slice) oluşturuyoruz.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Dilim (slice) indeks 0'da başlıyorsa, Rust'ın aralık sözdizimi (range \"\n\"syntax) başlangıç indeksini kullanmamaya izin verir; bu, `&a[0..a.len()]` ve \"\n\"`&a[..a.len()]`dilimlerinin aynı olduğu anlamına gelir.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Aynı şey bitiş indeksi için de geçerlidir, dolayısıyla `&a[2..a.len()]` ve \"\n\"`&a[2..]` aynıdır.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Tüm bir dizinin dilimini (slice) kolayca oluşturmak için `&a[..]`'ı \"\n\"kullanabiliriz.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s`,`i32`'lerin bir dilimine (slice) referanstır. `s` (`&[i32]`) türünün \"\n\"artık dizi uzunluğundan bahsetmediğine dikkat edin. Bu bize farklı \"\n\"boyutlardaki dilimler üzerinde hesaplama yapmamızı sağlar.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Dilimler (slice) her zaman başka bir nesneden ödünç alır (borrow). Bu \"\n\"örnekte `a`'nın en azından dilimimiz (slice) kadar 'canlı \"\n\"(alive)' (kapsamında) kalması gerekiyor.\"\n\n#: src/references/slices.md\nmsgid \"You can't \\\"grow\\\" a slice once it's created:\"\nmsgstr \"Bir dilimi (slice) oluşturduktan sonra onu \\\"büyütemezsiniz\\\":\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"You can't append elements of the slice, since it doesn't own the backing \"\n\"buffer.\"\nmsgstr \"\"\n\"Dilim (slice), destekleyici arabelleğe (backing buffer) sahip olmadığından, \"\n\"dilimin öğelerine ekleyemezsiniz.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"You can't grow a slice to point to a larger section of the backing buffer. A \"\n\"slice does not have information about the length of the underlying buffer \"\n\"and so you can't know how large the slice can be grown.\"\nmsgstr \"\"\n\"Bir dilimi (slice), destekleyici arabelleğin (backing buffer) daha büyük bir \"\n\"bölümüne işaret edecek şekilde büyütemezsiniz. Bir dilim, temel arabelleği \"\n\"(underlying buffer) uzunluğu hakkında bilgi içermez ve bu nedenle dilimin ne \"\n\"kadar büyütülebileceğini bilemezsiniz.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To get a larger slice you have to back to the original buffer and create a \"\n\"larger slice from there.\"\nmsgstr \"\"\n\"Daha büyük bir dilim (slice) elde etmek için, orijinal arabelleği (buffer) \"\n\"kullanarak daha büyük bir dilim (slice) oluşturmalısınız.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Artık Rust'taki iki dize (string) türünü anlayabiliyoruz:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\"`&str`, `&[u8]`e benzer şekilde, UTF-8 olarak kodlanmış baytların bir \"\n\"dilimidir (slice).\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\"`String`, `Vec<T>`ye benzer şekildedir, UTF-8 olarak kodlanmış baytlardan \"\n\"oluşan sahipli bir arabellektir.\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"Dünya\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Merhaba \\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str`, bir bellek bloğunda saklanan UTF-8 olarak kodlanmış dize (string) \"\n\"verilerine değiştirilemez (immutable) referans olan bir dize dilimi (string \"\n\"slice) sunar. Dize değişmezleri (string literals) (`\\\"Hello\\\"`), programın \"\n\"ikili (binary) dosyasında saklanır.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Rust'ın `String` türü, baytlardan oluşan bir vektörün bir sarmalayıcı \"\n\"türüdür. Bir `Vec<T>` gibi, bu türden veri `String` türü tarafından \"\n\"sahiplidir (owned).\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Diğer birçok türde olduğu gibi, `String::from()` bir dize değişmezinden \"\n\"(string literal) bir string oluşturur; `String::new()` yeni bir boş dize \"\n\"oluşturur ve dizeye veriler `push()` ve `push_str()` metotları kullanılarak \"\n\"eklenebilir.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"`format!()` makrosu, dinamik değerlerden sahipli bir dize oluşturmak için \"\n\"uygun bir yoldur. Aynı biçimin `println!()` makrosundaki gibi aynı biçim \"\n\"tanımlamasını kabul eder.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"`String`'den `&str` dilimlerini (slices) `&` ve isteğe bağlı olarak aralık \"\n\"seçimi (range selection) ile ödünç alabilirsiniz (barrow). Karakter \"\n\"sınırlarının dışını da kapsayacak bir bayt aralığı seçerseniz, ifade \"\n\"(expression) paniğe neden olacaktır. `chars` adımlayıcısı, karakterler \"\n\"üzerinde adımlama yapar ve karakter sınırlarını doğru bulmaya çalışmak \"\n\"yerine tercih edilir.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"C++ programcıları için: `&str`'yi C++'daki `std::string_view` olarak \"\n\"düşünün, ancak her zaman bellekteki geçerli bir dizeye işaret eder. Rust \"\n\"dilindeki `String`, C++'daki `std::string`'in kabaca eşdeğeridir (ana fark: \"\n\"yalnızca UTF-8 olarak kodlanmış baytlar içerebilir ve asla küçük dize \"\n\"optimizasyonu / small-string optimization kullanmaz).\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"Bayt dizelerinden değişmezler (Byte strings literals), doğrudan bir `&[u8]` \"\n\"değeri oluşturmanıza olanak tanır:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"Ham (raw) dizeler, kaçış karakterlerininin devre dışı bırakıldığı bir `&str` \"\n\"değeri oluşturmanıza olanak tanır: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Dizenin içindeki \"\n\"çift tırnakları, dizeyi oluşturan tırnakların her iki tarafınaa eşit sayıda \"\n\"`#` karakteri koyarak görebilirsiniz:\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"Rust enforces a number of rules for references that make them always safe to \"\n\"use. One rule is that references can never be `null`, making them safe to \"\n\"use without `null` checks. The other rule we'll look at for now is that \"\n\"references can't _outlive_ the data they point to.\"\nmsgstr \"\"\n\"Rust, referansların her zaman emniyetli (safe) kullanılmasını sağlayan bir \"\n\"dizi kural uygular. Bunlardan biri, referansların asla `null` \"\n\"olamayacağıdır; bu da `null` kontrolü yapmadan emniyetli kullanılmalarını \"\n\"sağlar. Şimdi bakacağımız diğer kural ise, referansların gösterdikleri \"\n\"veriden _daha uzun ömürlü (outlive)_ olamayacaklarıdır.\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"This slide gets students thinking about references as not simply being \"\n\"pointers, since Rust has different rules for references than other languages.\"\nmsgstr \"\"\n\"Bu slayt, Rust'ın referanslar için diğer dillerden farklı kuralları \"\n\"olduğundan, öğrencilerin referansların sadece göstericiler (pointers) \"\n\"olmadığını düşünmelerini sağlar.\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"We'll look at the rest of Rust's borrowing rules on day 3 when we talk about \"\n\"Rust's ownership system.\"\nmsgstr \"\"\n\"Rust'ın ödünç alma (borrowing) kurallarının geri kalanına, 3. günde Rust'ın \"\n\"sahiplik (ownership) sisteminden bahsederken bakacağız.\"\n\n#: src/references/dangling.md\nmsgid \"\"\n\"Rust's equivalent of nullability is the `Option` type, which can be used to \"\n\"make any type \\\"nullable\\\" (not just references/pointers). We haven't yet \"\n\"introduced enums or pattern matching, though, so try not to go into too much \"\n\"detail about this here.\"\nmsgstr \"\"\n\"Rust dilindeki null olabilirliğin karşılığı `Option` türüdür, bu tür \"\n\"herhangi bir türü \\\"null olabilir (nullable)\\\" hâle getirmek için \"\n\"kullanılabilir (sadece referanslar/göstericiler değil). Ancak henüz \"\n\"enum'ları veya desen eşleştirmeyi (pattern matching) tanıtmadık, bu yüzden \"\n\"burada bu konulara fazla girmemeye çalış.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"3 boyutlu geometri için, bir noktayı `[f64;3]` olarak temsil eden birkaç \"\n\"yardımcı fonksiyon oluşturacağız. Fonksiyon imzalarını belirlemek size \"\n\"kalmış.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Bir vektörün büyüklüğünü, koordinatlarının karelerini toplayarak \"\n\"hesaplayın\\n\"\n\"// ve karekökünü alın. Karekökü hesaplamak için `sqrt()` metodunu kullanın,\\n\"\n\"// örneğin `v.sqrt()` gibi.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Bir vektörü, büyüklüğünü hesaplayarak ve tüm koordinatlarını bu \"\n\"büyüklüğe\\n\"\n\"// bölererek normalize edin.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\"// Çalışmanızı test etmek için aşağıdaki `main` fonksiyonunu kullanın.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Birim vektörünün büyüklüğü: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"{v:?} vektörünün büyüklüğü: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Normalize edildikten sonra {v:?} vektörünün büyüklüğü: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Verilen vektörün büyüklüğünü hesaplayın.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// Vektörün büyüklüğünü, yönünü değiştirmeden 1.0'a değiştirin.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"Note that in `normalize` we were able to do `*item /= mag` to modify each \"\n\"element. This is because we're iterating using a mutable reference to an \"\n\"array, which causes the `for` loop to give mutable references to each \"\n\"element.\"\nmsgstr \"\"\n\"`normalize` fonksiyonunda her bir elemanı değiştirmek için `*item /= mag` \"\n\"yapabildiğimize dikkat edin. Bunun sebebi, bir diziye değiştirilebilir \"\n\"(mutable) referans kullanarak döngü de dönmemizdir; bu da `for` döngüsünün \"\n\"her elemana değiştirilebilir (mutable) referanslar vermesini sağlar.\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"It is also possible to take slice references here, e.g., `fn \"\n\"magnitude(vector: &[f64]) -> f64`. This makes the function more general, at \"\n\"the cost of a runtime length check.\"\nmsgstr \"\"\n\"Burada dilim (slice) referansları almak da mümkündür, örneğin, `fn \"\n\"magnitude(vector: &[f64]) -> f64`. Bu, çalışma zamanı uzunluğu kontrolü \"\n\"pahasına fonksiyonu daha genel hâle getirir.\"\n\n#: src/user-defined-types.md src/std-types.md src/std-traits.md\n#: src/memory-management.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 1 saat sürmelidir. İçeriği:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"\"\n\"C ve C++ dillerindeki gibi Rust'ın da özel (kullanıcı tanımlı) yapılara \"\n\"desteği vardır:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} {} yaşında\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"Önemli Noktalar:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Yapılar C veya C++'daki gibi çalışır.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"C++'daki gibi ve C'den farklı olarak, bir türü tanımlamak için typedef'e \"\n\"gerek yoktur.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"C++'dan farklı olarak yapılar arasında kalıtım (inheritance) yoktur.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"Bu, insanlara farklı yapı türleri olduğunu duyurmak için iyi bir zaman \"\n\"olabilir.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"Sıfır boyutlu (zero-sized) yapılar (örn. `struct Foo;`), bir özelliğin \"\n\"(trait) bazı türlere gerçekleştiriminde (implementing) kullanılabilir, ancak \"\n\"değer olarak kendisinde saklamak istenilen herhangi bir veri yoktur.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"Sonraki slaytta alan adları (field names) önemli olmadığında kullanılan \"\n\"Demet (Tuple) yapıları tanıtılacaktır.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Eğer zaten doğru adlara sahip değişkenleriniz varsa, o zaman yapıyı bir \"\n\"kısaltma kullanarak oluşturabilirsiniz.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Struct fields do not support default values. Default values are specified by \"\n\"implementing the `Default` trait which we will cover later.\"\nmsgstr \"\"\n\"Yapı alanları (struct fields) varsayılan değerleri desteklemez. Varsayılan \"\n\"değerler, daha sonra ele alacağımız `Default` özelliği (trait) uygulanarak \"\n\"belirtilir.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"You can also demonstrate the struct update syntax here:\"\nmsgstr \"\"\n\"Burada aynı zamanda yapı güncelleme sözdizimini (struct update syntax) de \"\n\"gösterebilirsiniz:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"It allows us to copy the majority of the fields from the old struct without \"\n\"having to explicitly type it all out. It must always be the last element.\"\nmsgstr \"\"\n\"Bu, eski yapının (struct) alanlarının çoğunu açıkça tek tek yazmak zorunda \"\n\"kalmadan kopyalamamıza olanak tanır. Bu her zaman son öğe olmalıdır.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"It is mainly used in combination with the `Default` trait. We will talk \"\n\"about struct update syntax in more detail on the slide on the `Default` \"\n\"trait, so we don't need to talk about it here unless students ask about it.\"\nmsgstr \"\"\n\"Bu, çoğunlukla `Default` özelliği (trait) ile birlikte kullanılır. `Default` \"\n\"özelliği ile ilgili slaytta yapı güncelleme sözdizimini (struct update \"\n\"syntax) daha detaylı ele alacağız, bu yüzden öğrenciler sormadıkça burada \"\n\"bahsetmemize gerek yok.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\"Alan adları (field names) önemsizse demet (tuple) yapısını kullanabilirsiniz:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Bu genellikle tek alanlı sarmalayıcılar (single-field wrappers - newtype \"\n\"deseni olarak adlandırılır) için kullanılır:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"NASA'daki bir roket bilim adamına sorun\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Yeni tür (newtype) deseni, ilkel (primitive) bir türdeki değer hakkındaki ek \"\n\"bilgileri kodlamanın harika bir yoludur, örneğin:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"Sayı bazı birimlerde ölçülür: Yukarıdaki örnekte `Newtons`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Değer, oluşturulduğunda bir miktar doğrulamadan geçti, bu nedenle artık onu \"\n\"her kullanımda yeniden doğrulamanız gerekmiyor: `PhoneNumber(String)` veya \"\n\"`OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The newtype pattern is covered extensively in the [\\\"Idiomatic Rust\\\" module]\"\n\"(../idiomatic/leveraging-the-type-system/newtype-pattern.md).\"\nmsgstr \"\"\n\"Yeni tür deseni (newtype pattern) [\\\"Rust’ta Tavsiye Edilen Pratikler \"\n\"(Idiomatic)\\\" modülünde](../idiomatic/leveraging-the-type-system/newtype-\"\n\"pattern.md) ayrıntılı olarak ele alınmıştır.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Yeni türde desenindeki tek alana erişerek bir `Newtons` türüne `f64` \"\n\"değerinin nasıl ekleneceğini gösterin.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally avoids implicit conversions, like automatic unwrapping or \"\n\"using booleans as integers.\"\nmsgstr \"\"\n\"Rust genellikle bir nesnenin değerinin otomatik çözülmesini (automatic \"\n\"unwrapping) veya bool değerlerinin tamsayı olarak kullanılması gibi örtük \"\n\"dönüşümlerden (implicit conversions) kaçınır.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Operator overloading is discussed on Day 2 ([Standard Library Traits](../std-\"\n\"traits.md)).\"\nmsgstr \"\"\n\"Operatör yüklemesi 2. günde ([Standart Kütüphanedeki Özellikler (Traits)](../\"\n\"std-traits.md)) tartışıldı.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"When a tuple struct has zero fields, the `()` can be omitted. The result is \"\n\"a zero-sized type (ZST), of which there is only one value (the name of the \"\n\"type).\"\nmsgstr \"\"\n\"Bir demet (tuple) yapısının sıfır alanı varsa, `()` kısmı atlanabilir. \"\n\"Böylece ortaya sıfır boyutlu (zero-sized) bir tür (SBT/ZST) çıkar ve bu \"\n\"türün yalnızca bir değeri vardır (türün adı).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"This is common for types that implement some behavior but have no data \"\n\"(imagine a `NullReader` that implements some reader behavior by always \"\n\"returning EOF).\"\nmsgstr \"\"\n\"Bu, bazı davranışları uygulayan verisi olmayan türler için yaygındır (her \"\n\"zaman EOF döndüren bir `NullReader` hayal edin; okuma davranışını uygular \"\n\"ama veri içermez).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"Örnek, [Mars İklim Yörünge Aracı](https://en.wikipedia.org/wiki/\"\n\"Mars_Climate_Orbiter) hatasına incelikli bir göndermedir.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"`enum` anahtar sözcüğü birkaç farklı varyanta sahip bir türün yaratılmasına \"\n\"olanak sağlar:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Basit (Simple) varyant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Demet (Tuple) varyantı\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Yapı (Struct) varyantı\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {player_move:?}\\\"\"\nmsgstr \"\\\"Sıradaki hamle: {player_move:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\"Numaralandırmalar, bir dizi değeri tek bir tür altında toplamanıza olanak \"\n\"tanır.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction`, varyantları olan bir türdür. `Direction`'ın iki değeri vardır: \"\n\"`Direction::Left` ve `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` üç varyantı olan bir türdür. Rust, varyant ek yüküne (variant \"\n\"payloads) ek olarak, çalışma zamanında hangi varyantın `PlayerMove` \"\n\"değerinde olduğunu bilmesi için bir ayırıcı (discriminant) da depolar.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\"Bu, yapıları ve numaralandırmaları karşılaştırmak için iyi bir zaman \"\n\"olabilir:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"Her ikisinde de, alanları olmayan basit bir versiyona (birim yapı) veya \"\n\"farklı alan türlerine sahip bir versiyona (varyant ek yükleri) sahip \"\n\"olabilirsiniz.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Bir enum'ın farklı varyantlarını ayrı yapılarla bile uygulayabilirsiniz \"\n\"ancak o zaman da hepsi bir enum'da tanımlanmış olduğunda olacağı gibi aynı \"\n\"türde olmazlardı.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust, ayırıcıyı (discriminant) depolamak için minimum alan kullanır.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"Gerekirse, gereken en küçük boyuttaki bir tam sayıyı depolar\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"İzin verilen varyant değerleri tüm bit desenlerini kapsamıyorsa, ayırıcıyı \"\n\"kodlamak için geçersiz bit desenleri kullanır (\\\"niş/oyuk/niche \"\n\"optimizasyonu\\\"). Örneğin, `Option<&u8>`, `None` varyantı için bir tamsayıya \"\n\"gösterici veya `NULL` depolar.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"Gerekirse ayırıcıyı kontrol edebilirsiniz (örneğin, C ile uyumluluk için):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"`repr` olmadan, ayırıcı tür 2 baytlık olur, çünkü 10001 2 bayta sığar.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"Rust, enum'ların daha az yer kaplamasını sağlamak için kullanabileceği \"\n\"çeşitli optimizasyonlara sahiptir.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Null gösterici optimizasyonu: [Bazı türler](https://doc.rust-lang.org/std/\"\n\"option/#representation) için, Rust `size_of::<T>()`'nin `size_of::\"\n\"<Option<T>>()`'ye eşit olduğunu garanti eder.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Bitsel gösterimin pratikte nasıl _görünebileceğini_ göstermek istiyorsanız \"\n\"örnek kod aşağıdadır. Derleyicinin bu gösterimle (representation) ilgili \"\n\"hiçbir garanti sağlamadığını, dolayısıyla bunun tamamen emniyetsiz olduğunu \"\n\"belirtmek önemlidir.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"Bir tür eş ismi, başka bir tür için bir isim oluşturur. Her iki tür de \"\n\"birbirinin yerine kullanılabilir.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\"// Eş isimler (aliases) uzun ve karmaşık türlerde daha kullanışlıdır:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A [newtype](tuple-structs.html) is often a better alternative since it \"\n\"creates a distinct type. Prefer `struct InventoryCount(usize)` to `type \"\n\"InventoryCount = usize`.\"\nmsgstr \"\"\n\"Bir [yeni tür (newtype)](tuple-structs.html) deseni genellikle farklı bir \"\n\"tür oluşturduğu için daha iyi bir seçenektir. `type InventoryCount = usize` \"\n\"yerine `struct InventoryCount(usize)`'ı tercih edin.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"C programcıları bunun, `typedef`'e benzer olduğunu anlayacaklardır.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are [inlined]\"\n\"(https://rust-lang.github.io/rfcs/0246-const-vs-static.html) wherever they \"\n\"are used:\"\nmsgstr \"\"\n\"Sabitler (constants) derleme zamanında (compile-time) değerlendirilir ve \"\n\"değerleri kullanıldıkları her yerde [satır içi](https://rust-lang.github.io/\"\n\"rfcs/0246-const-vs-static.html) (inline) olarak belirtilir:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"Sadece `const` olarak işaretlenen fonksiyonlar derleme zamanında çağrılarak \"\n\"`const` değerler üretilebilir. Ancak `const` fonksiyonlar çalışma zamanında \"\n\"da çağrılabilir.\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\"`const`'un C++'ın `constexpr`'ına anlamsal olarak benzer davrandığını \"\n\"belirtin\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"Statik değişkenler programın tüm yürütmesi (execution) boyunca yaşayacak ve \"\n\"bu nedenle taşınmayacaklar (not move):\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"RustOS 3.14'e Hoş Geldiniz\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"[Rust RFC Kitabında](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html) belirtildiği gibi, statik kullanımı satır içi (inline) özelliği vermez \"\n\"ve gerçek bir ilişkili bellek konumuna sahiptir. Bu, emniyetsiz (unsafe) ve \"\n\"gömülü (embedded) kod için yararlıdır ve değişken, program yürütmesinin \"\n\"tamamı boyunca yaşar. Global kapsamlı (globally-scoped) bir değerin nesne \"\n\"kimliğine (object identity) ihtiyaç duyması için bir nedeni olmadığında, \"\n\"genellikle `const` tercih edilir.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"`statik`, C++'daki değiştirilebilir olan global değişkenlere benzer.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static`, `Mutex<T>` gibi iç değişebilirliğe (interior mutability) sahip \"\n\"türlerin gerektirdiği şekilde bellekteki bir adres ve durumu nesneye kimlik \"\n\"olarak sağlar.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"Çünkü `static` değişkenlere herhangi bir iş parçacığından (thread) \"\n\"erişilebildiğinden, bunların `Sync` olması gerekir. İç değişebilirlik \"\n\"(Interior mutability) [`Mutex`](https://doc.rust-lang.org/std/sync/struct.\"\n\"Mutex.html), atomik veya benzer yöntemlerle mümkündür.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"It is common to use `OnceLock` in a static as a way to support \"\n\"initialization on first use. `OnceCell` is not `Sync` and thus cannot be \"\n\"used in this context.\"\nmsgstr \"\"\n\"İlk kullanımda ilklendirmeyi (initialization) desteklemek için `static` \"\n\"içinde `OnceLock` kullanmak yaygındır. `OnceCell`, `Sync` olmadığı için bu \"\n\"bağlamda kullanılamaz.\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"İş parçacığı için yerel (thread-local) veriler `std::thread_local` makrosu \"\n\"ile oluşturulabilir.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"Bir asansör kontrol sistemindeki bir olayı temsil etmek için bir veri yapısı \"\n\"oluşturacağız. Çeşitli olayları yapılandırmak için türleri ve fonksiyonları \"\n\"tanımlamak size kalmış. Türlerin `{:?}` ile biçimlendirilmesine (format) \"\n\"izin vermek için `#[derive(Debug)]` kullanın.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"Bu alıştırma yalnızca, `main`'in hatasız çalışması için veri yapıları \"\n\"oluşturmayı ve doldurmayı gerektirir. Kursun bir sonraki kısmı bu yapılardan \"\n\"veri almayı kapsayacaktır.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"/// Asansör sisteminde kontrolörün tepki vermesi gereken bir olay.\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: gerekli değişkeleri (variant) ekle\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\"/// Bir seyahat yönü.\\n\"\n\"\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// Kabin verilen kata ulaşmış durumda.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// Kabin kapıları açılmış durumda.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// Kabin kapıları kapanmış durumda.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"/// Verilen kattaki asansör lobisinde yön düğmesine basıldı.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// Asansör kabininde bir kat düğmesine basıldı.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"Zemin kattaki bir yolcu yukarı düğmesine basmış durumda: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"Kabin zemin kata ulaşmış durumda: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"Kabin kapısı açıldı: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"Bir yolcu 3. katın düğmesine basmış durumda: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"Kabin kapısı kapandı: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"Kabin 3. kata ulaşmış durumda: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"If students ask about `#![allow(dead_code)]` at the top of the exercise, \"\n\"it's necessary because the only thing we do with the `Event` type is print \"\n\"it out. Due to a nuance of how the compiler checks for dead code this causes \"\n\"it to think the code is unused. They can ignore it for the purpose of this \"\n\"exercise.\"\nmsgstr \"\"\n\"Eğer öğrenciler alıştırmanın en üstündeki `#![allow(dead_code)]` satırını \"\n\"sorarlarsa, bunun nedeni `Event` türüyle yaptığımız tek şeyin onu ekrana \"\n\"yazdırmak olmasıdır. Derleyicinin ölü kodu (dead code) kontrol etme \"\n\"biçimindeki bir ayrıntı nedeniyle, bu durum kodun kullanılmadığını sanmasına \"\n\"yol açar. Öğrenciler bu satırı bu alıştırma özelinde görmezden gelebilirler.\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// Bir düğmeye basıldı.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// Kabin verilen kata ulaşmış durumda.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// Kabin kapıları açılmış durumda.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// Kabin kapıları kapanmış durumda.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// Bir kat tamsayı olarak temsil edilir.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// Kullanıcının erişebileceği bir düğme.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// Verilem katta asansör lobisinde bulunan bir düğme.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// Kabinin içindeki bir kat düğmesi.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"2. Gün'e Hoş Geldiniz\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Rust'ı artık yeterince gördüğümüze göre, bugün Rust'ın tür sistemine \"\n\"odaklanacağız:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"Desen eşleştirme (pattern matching): yapılardan veri çıkarma.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Metotlar: fonksiyonları türlerle ilişkilendirme.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"\"\n\"Özellikler (traits): birden fazla tür tarafından paylaşılan davranışlar.\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"\"\n\"Genelleştirmeler (Generics): türleri diğer türler üzerinden \"\n\"parametrelendirme.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Standart kütüphane türleri ve özellikleri (traits): Rust'ın zengin standart \"\n\"kütüphanesinde bir tur.\"\n\n#: src/welcome-day-2.md\nmsgid \"Closures: function pointers with data.\"\nmsgstr \"Çevreleyiciler (closures): veriyle birlikte fonksiyon göstericileri.\"\n\n#: src/welcome-day-2.md src/welcome-day-2-afternoon.md src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 50 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 50 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/pattern-matching.md src/generics.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 50 dakika sürmelidir. İçeriği:\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"In day 1 we briefly saw how patterns can be used to _destructure_ compound \"\n\"values. Let's review that and talk about a few other things patterns can \"\n\"express:\"\nmsgstr \"\"\n\"1. günde, bileşik değere (compound values) _ayrıştırmak (destructure)_ için \"\n\"desenlerin (pattern) nasıl kullanılabileceğini kısaca görmüştük. Şimdi bunu \"\n\"gözden geçirelim ve desenlerin ifade edebileceği birkaç diğer şey hakkında \"\n\"konuşalım:\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"// This does the same thing as above.\\n\"\nmsgstr \"// Bu, yukarıdakiyle aynı şeyi yapar.\\n\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"// Ignore the first element, only bind the second and third.\\n\"\nmsgstr \"// İlk elemanı yoksay, sadece ikinci ve üçüncüyü bağla.\\n\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"// Ignore everything but the last element.\\n\"\nmsgstr \"// Son eleman hariç her şeyi yoksay.\\n\"\n\n#: src/pattern-matching/infallible.md src/pattern-matching/match.md\n#: src/generics/exercise.md src/generics/solution.md src/std-traits/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"All of the demonstrated patterns are _irrefutable_, meaning that they will \"\n\"always match the value on the right hand side.\"\nmsgstr \"\"\n\"Gösterilen desenlerin tümü _reddedilemezdir (irrefutable)_, yani her zaman \"\n\"sağ taraftaki değerle eşleşeceklerdir.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"Patterns are type-specific, including irrefutable patterns. Try adding or \"\n\"removing an element to the tuple and look at the resulting compiler errors.\"\nmsgstr \"\"\n\"Desenler, reddedilemez (irrefutable) desenler de dahil olmak üzere türe \"\n\"özgüdür (type-specific). Demete (tuple) bir eleman eklemeyi veya çıkarmayı \"\n\"deneyin ve ortaya çıkan derleyici hatalarına bakın.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"Variable names are patterns that always match and bind the matched value \"\n\"into a new variable with that name.\"\nmsgstr \"\"\n\"Değişken adları her zaman eşleşen ve eşleştikleri değeri bu isimle yeni bir \"\n\"değişkene bağlayan (bind) desenlerdir.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"`_` is a pattern that always matches any value, discarding the matched value.\"\nmsgstr \"\"\n\"`_` her zaman herhangi bir değerle eşleşen ve eşleşen değeri atan \"\n\"(discarding) bir desendir.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"`..` allows you to ignore multiple values at once.\"\nmsgstr \"`..` aynı anda birden fazla değeri yok saymanıza olanak tanır.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"\"\n\"You can also demonstrate more advanced usages of `..`, such as ignoring the \"\n\"middle elements of a tuple.\"\nmsgstr \"\"\n\"Ayrıca, bir demetin (tuple) ortadaki elemanlarını yok saymak gibi `..`'nın \"\n\"daha gelişmiş kullanımlarını da gösterebilirsiniz.\"\n\n#: src/pattern-matching/infallible.md\nmsgid \"All of these patterns work with arrays as well:\"\nmsgstr \"Bu desenlerin tümü dizilerle (arrays) de çalışır:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The patterns can be simple values, similarly to `switch` in C and C++, but \"\n\"they can also be used to express more complex conditions:\"\nmsgstr \"\"\n\"`match` anahtar kelimesi, bir değeri bir veya daha fazla _desene (pattern)_ \"\n\"göre eşleştirmenizi sağlar. Desenler, C ve C++'daki `switch`'e benzer \"\n\"şekilde basit değerler olabilir, ancak daha karmaşık koşulları ifade etmek \"\n\"için de kullanılabilirler:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Çıkılıyor\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Etrafta hareket ediliyor\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Sayı girişi\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Küçük harf: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Başka bir şey\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm. We will learn more about this on the next \"\n\"slide.\"\nmsgstr \"\"\n\"Desendeki bir değişken (bu örnekte `key`) eşleşme kolu (match arm) içinde \"\n\"kullanılabilecek bir bağlama (binding) oluşturacaktır. Bunu bir sonraki \"\n\"slaytta daha ayrıntılı öğreneceğiz.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A match guard causes the arm to match only if the condition is true. If the \"\n\"condition is false the match will continue checking later cases.\"\nmsgstr \"\"\n\"Bir eşleşme filtresi (match guard), kolun yalnızca koşul doğruysa \"\n\"eşleşmesine neden olur. Koşul yanlışsa, eşleşme diğer durumları kontrol \"\n\"etmeye devam edecektir.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Bir desendeyken bazı özel karakterlerin nasıl kullanıldığına dikkat edin\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` bir `veya (or)` olarak\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` matches any number of items\"\nmsgstr \"`..` herhangi sayıda öğeyle eşleşir\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` kapsayıcı bir aralığı (inclusive range) temsil eder\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` bir joker karakterdir\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Ayrı bir sözdizimi özelliği olarak eşleşme filtreleri (match guards), tek \"\n\"başına desenlerin izin verdiğinden daha karmaşık fikirleri kısaca ifade \"\n\"etmek istediğimizde önemli ve gereklidir.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards are different from `if` expressions after the `=>`. An `if` \"\n\"expression is evaluated after the match arm is selected. Failing the `if` \"\n\"condition inside of that block won't result in other arms of the original \"\n\"`match` expression being considered. In the following example, the wildcard \"\n\"pattern `_ =>` is never even attempted.\"\nmsgstr \"\"\n\"Bunlar, eşleşme kolunun (match arm) içindeki ayrı bir `if` ifadesiyle aynı \"\n\"değildir. Dal (branch) bloğunun içindeki bir `if` ifadesi (`=>`'dan sonra), \"\n\"eşleşme kolu seçildikten sonra gerçekleşir. O bloğun içindeki `if` koşulunun \"\n\"başarısız olması, orijinal `match` ifadesinin diğer kollarının dikkate \"\n\"alınmasıyla sonuçlanmaz.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Uppercase\\\"\"\nmsgstr \"\\\"Büyük harf\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Bug: this is never printed\\\"\"\nmsgstr \"\\\"Hata (bug): bu asla yazdırılmıyor\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Filtrede tanımlanan koşul, bir `|` içeren bir desendeki her ifade için \"\n\"geçerlidir.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Note that you can't use an existing variable as the condition in a match \"\n\"arm, as it will instead be interpreted as a variable name pattern, which \"\n\"creates a new variable that will shadow the existing one. For example:\"\nmsgstr \"\"\n\"Bir eşleşme kolunda (match arm) mevcut bir değişkeni koşul olarak \"\n\"kullanamayacağınızı unutmayın, çünkü bunun yerine bir değişken adı deseni \"\n\"(variable name pattern) olarak yorumlanacaktır, bu da mevcut olanı \"\n\"gölgeleyecek (shadow) yeni bir değişken oluşturur. Örneğin:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Expected value is 5, actual is {expected}\\\"\"\nmsgstr \"\\\"Beklenen değer 5, gerçek değer {expected}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Value was something else\\\"\"\nmsgstr \"\\\"Değer başka bir şeydi\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Here we're trying to match on the number 123, where we want the first case \"\n\"to check if the value is 5. The naive expectation is that the first case \"\n\"won't match because the value isn't 5, but instead this is interpreted as a \"\n\"variable pattern which always matches, meaning the first branch will always \"\n\"be taken. If a constant is used instead this will then work as expected.\"\nmsgstr \"\"\n\"Burada 123 sayısıyla eşleştirmeye çalışıyoruz, ilk durumun değerin 5 olup \"\n\"olmadığını kontrol etmesini istiyoruz. Doğal beklenti, değer 5 olmadığı için \"\n\"ilk durumun eşleşmeyeceğidir, ancak bunun yerine bu, her zaman eşleşen bir \"\n\"değişken deseni olarak yorumlanır, yani her zaman ilk dal alınacaktır. Bunun \"\n\"yerine bir sabit (constant) kullanılırsa bu beklendiği gibi çalışacaktır.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Another piece of pattern syntax you can show students is the `@` syntax \"\n\"which binds a part of a pattern to a variable. For example:\"\nmsgstr \"\"\n\"Öğrencilere gösterebileceğiniz başka bir desen sözdizimi parçası, bir \"\n\"desenin bir bölümünü bir değişkene bağlayan `@` sözdizimidir. Örneğin:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"outer: {outer:?}, inner: {inner}\\\"\"\nmsgstr \"\\\"dış: {outer:?}, iç: {inner}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"In this example `inner` has the value 123 which it pulled from the `Option` \"\n\"via destructuring, `outer` captures the entire `Some(inner)` expression, so \"\n\"it contains the full `Option::Some(123)`. This is rarely used but can be \"\n\"useful in more complex patterns.\"\nmsgstr \"\"\n\"Bu örnekte `inner`, ayrıştırma (destructuring) yoluyla `Option`'dan çektiği \"\n\"123 değerine sahiptir, `outer` ise tüm `Some(inner)` ifadesini yakalar, bu \"\n\"nedenle tam `Option::Some(123)`'ü içerir. Bu nadiren kullanılır ancak daha \"\n\"karmaşık desenlerde faydalı olabilir.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Yapılar (Structs)\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, structs can also be destructured by matching:\"\nmsgstr \"\"\n\"Demetler (tuples) gibi, yapılar (structs) da eşleştirme (matching) yoluyla \"\n\"ayrıştırılabilir. (destructured):\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, diğer alanlar yoksayıldı\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\"`foo`'daki değişmez (literal) değerleri diğer desenlerle eşleşecek şekilde \"\n\"değiştirin.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\"`Foo`'ya yeni bir alan ekleyin ve desende gerektiği gibi değişiklikler yapın.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"Try `match &foo` and check the type of captures. The pattern syntax remains \"\n\"the same, but the captures become shared references. This is [match \"\n\"ergonomics](https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) and \"\n\"is often useful with `match self` when implementing methods on an enum.\"\nmsgstr \"\"\n\"`match &foo`'yu deneyin ve yakalanan (captures) değerlerin türünü kontrol \"\n\"edin. Desen sözdizimi aynı kalır, ancak yakalananlar paylaşılan referanslar \"\n\"(shared references) haline gelir. Bu [eşleşme ergonomisidir (match \"\n\"ergonomics)](https://rust-lang.github.io/rfcs/2005-match-ergonomics.html) ve \"\n\"bir enum üzerinde metotlar uygularken `match self` ile genellikle \"\n\"kullanışlıdır.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The same effect occurs with `match &mut foo`: the captures become exclusive \"\n\"references.\"\nmsgstr \"\"\n\"Aynı etki `match &mut foo` ile de meydana gelir: yakalanan (captures) \"\n\"değerler dışlayan (exclusive) referanslar haline gelir.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the first arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"Bir yakalanan(capture) değer ile bir sabit (constant) ifade arasındaki \"\n\"ayrımı fark etmek zor olabilir. İlk koldaki `2`'yi bir değişken yapmayı \"\n\"deneyin ve çalışmadığını görün. Sonra o değişkeni bir `const` olacak şekilde \"\n\"değiştirin ve tekrar çalıştığını görün.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"Demetler (tuples) gibi, enum'lar da eşleştirme yoluyla ayrıştırılabilir \"\n\"(destructured):\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Desenler, değişkenleri değerlerinizin parçalarına bağlamak için de \"\n\"kullanılabilir. Türlerinizin yapısını bu şekilde inceleyebilirsiniz. Basit \"\n\"bir `enum` türüyle başlayalım:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"{n} iki eşit parçaya bölünemez\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} ikiye bölündüğünde {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"üzgünüm, bir hata oluştu: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Burada `Result` değerini _ayrıştırmak (destructure)_ için kolları (arm) \"\n\"kullandık. İlk kolda, `half`, `Ok` varyantının içindeki değere bağlanır. \"\n\"İkinci kolda, `msg` hata mesajına bağlanır.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"`if`/`else` ifadesi, daha sonra bir `match` ile açılan (unpacked) bir enum \"\n\"geri döndürüyor.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Enum tanımına üçüncü bir varyant eklemeyi ve kodu çalıştırırken hataları \"\n\"göstermeyi deneyebilirsiniz. Kodunuzun artık kapsayıcı olmadığı \"\n\"(inexhaustive) yerlere ve derleyicinin size nasıl ipuçları vermeye \"\n\"çalıştığına dikkat çekin.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Enum varyantlarındaki değerlere yalnızca desen eşleştirmesi yapıldıktan \"\n\"sonra erişilebilir.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Aramanın kapsayıcı olmadığında (inexhaustive) ne olduğunu gösterin. Rust \"\n\"derleyicisinin tüm durumların ele alındığını onaylayarak sağladığı avantaja \"\n\"dikkat edin.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate the syntax for a struct-style variant by adding one to the enum \"\n\"definition and the `match`. Point out how this is syntactically similar to \"\n\"matching on a struct.\"\nmsgstr \"\"\n\"Enum tanımına ve `match`'e bir tane ekleyerek yapı stili (struct-style) bir \"\n\"varyant için sözdizimini (syntax) gösterin. Bunun sözdizimsel olarak bir \"\n\"yapı (struct) üzerinde eşleştirmeye (matching) nasıl benzediğine dikkat \"\n\"çekin.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs that differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust'ın diğer dillerden farklı olan birkaç kontrol akışı yapısı vardır. \"\n\"Bunlar desen eşleştirme (pattern matching) için kullanılır:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"`if let` ifadeleri\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"`while let` ifadeleri\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"`let else` ifadeleri\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[`if let` ifadesi](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions), bir değerin bir desenle eşleşip eşleşmediğine \"\n\"bağlı olarak farklı kod çalıştırmanıza olanak tanır:\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"\\\"slept for {duration:?}\\\"\"\nmsgstr \"\\\"{duration:?} kadar uyunuldu\\\"\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"`match`'in aksine, `if let` tüm dalları kapsamak zorunda değildir. Bu onu \"\n\"`match`'den daha özlü (concise) yapabilir.\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"`Option` ile çalışırken yaygın bir kullanım, `Some` değerlerini işlemektir.\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"`match`'in aksine, `if let` desen eşleştirme için filtre koşul grubu (guard \"\n\"clauses) desteklemez.\"\n\n#: src/pattern-matching/let-control-flow/if-let.md\nmsgid \"With an `else` clause, this can be used as an expression.\"\nmsgstr \"Bir `else` durumuyla, bu bir ifade (expression) olarak kullanılabilir.\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant that \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"`if let`'te olduğu gibi, bir değeri tekrar tekrar bir desene göre test eden \"\n\"bir [`while let`](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-pattern-loops) çeşidi vardır:\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\\\"Comprehensive Rust 🦀\\\"\"\nmsgstr \"\\\"Comprehensive Rust 🦀\\\"\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"// (There are more efficient ways to reverse a string!)\\n\"\nmsgstr \"// (Bir dizeyi tersine çevirmenin daha verimli yolları var!)\\n\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Burada [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) dize boşalana kadar `Some(c)` geri döndürür, \"\n\"ardından `None` geri döndürür. `while let` tüm öğeler arasında adımlamaya \"\n\"(iterating) devam etmemizi sağlar.\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"`while let` döngüsünün, değer desenle eşleştiği sürece devam edeceğine \"\n\"dikkat çekin.\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"`while let` döngüsünü, `name.pop()` için açılacak bir değer olmadığında \"\n\"kesintiye uğrayan bir if ifadesiyle sonsuz bir döngü olarak yeniden \"\n\"yazabilirsiniz. `while let` yukarıdaki senaryo için sözdizimsel kolaylık \"\n\"sağlar.\"\n\n#: src/pattern-matching/let-control-flow/while-let.md\nmsgid \"\"\n\"This form cannot be used as an expression, because it may have no value if \"\n\"the condition is false.\"\nmsgstr \"\"\n\"Bu form bir ifade (expression) olarak kullanılamaz, çünkü koşul yanlışsa \"\n\"hiçbir değeri olmayabilir.\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"`let else` Statements\"\nmsgstr \"`let else` Deyimleri\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"Bir deseni eşleştirip fonksiyondan geri döndürmenin yaygın durumu için [`let \"\n\"else`](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html) \"\n\"kullanın. \\\"else\\\" durumu farklı olmalıdır (diverge) (`return`, `break` veya \"\n\"`panic` - bloğun sonundan çıkmak dışında her şey).\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"None alındı\\\"\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"boş dize alındı\\\"\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"onaltılık bir basamak değil\\\"\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"sonuç: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\n#: src/generics/trait-bounds.md src/testing/solution.md src/android/testing.md\n#: src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\"\n\"This early return-based control flow is common in Rust error handling code, \"\n\"where you try to get a value out of a `Result`, returning an error if the \"\n\"`Result` was `Err`.\"\nmsgstr \"\"\n\"Bu erken geri döndürme tabanlı kontrol akışı (early return-based control \"\n\"flow), Rust hata işleme (error handling) kodunda yaygındır; burada bir \"\n\"`Result`'tan bir değer almaya çalışırsınız ve `Result` `Err` ise bir hata \"\n\"geri döndürürsünüz.\"\n\n#: src/pattern-matching/let-control-flow/let-else.md\nmsgid \"\"\n\"If students ask, you can also demonstrate how real error handling code would \"\n\"be written with `?`.\"\nmsgstr \"\"\n\"Öğrenciler sorarsa, gerçek hata işleme kodunun `?` ile nasıl yazılacağını da \"\n\"gösterebilirsiniz.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\"Aritmetik ifadeler için basit bir özyinelemeli değerlendirici (recursive \"\n\"evaluator) yazalım.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"An example of a small arithmetic expression could be `10 + 20`, which \"\n\"evaluates to `30`. We can represent the expression as a tree:\"\nmsgstr \"\"\n\"Küçük bir aritmetik ifadenin bir örneği, `30` olarak değerlendirilen `10 + \"\n\"20` olabilir. İfadeyi bir ağaç olarak temsil edebiliriz:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, \"\n\"which evaluates to `85`. We represent this as a much bigger tree:\"\nmsgstr \"\"\n\"Daha büyük ve daha karmaşık bir ifade, `85` olarak değerlendirilen `(10 * 9) \"\n\"+ ((3 - 4) * 5)` olacaktır. Bunu çok daha büyük bir ağaç olarak temsil \"\n\"ediyoruz:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"In code, we will represent the tree with two types:\"\nmsgstr \"Kodda, ağacı iki türle temsil (represent) edeceğiz:\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\"/// İki alt ifade (subexpression) üzerinde gerçekleştirilecek bir işlem.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// Ağaç şeklinde bir ifade (expression).\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// İki alt ifade üzerinde bir işlem.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// Bir değişmez (literal) değer\\n\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"`Box` türü burada bir akıllı göstericidir (smart pointer) ve kursun \"\n\"ilerleyen bölümlerinde ayrıntılı olarak ele alınacaktır. Bir ifade, \"\n\"testlerde görüldüğü gibi `Box::new` ile \\\"kutulanabilir (boxed)\\\". \"\n\"Kutulanmış bir ifadeyi değerlendirmek için, onu \\\"kutudan çıkarmak (unbox)\\\" \"\n\"için referans kaldırma (deref) operatörünü (`*`) kullanın: \"\n\"`eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"Kodu Rust deneme alanına (playground) kopyalayıp yapıştırın ve `eval`'i \"\n\"uygulamaya başlayın. Son ürün testleri geçmelidir. `todo!()` kullanmak ve \"\n\"testleri birer birer geçmek yardımcı olabilir. Bir testi geçici olarak \"\n\"`#[ignore]` ile de atlayabilirsiniz:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust, fonksiyonları yeni türlerinizle ilişkilendirmenize (associate) olanak \"\n\"tanır. Bunu bir `impl` bloğu ile yaparsınız:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// Alıcı (receiver) yok, statik bir metot\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\"// self'e dışlayacak olan (exclusive) ödünç alınmış (borrowed) okuma-yazma \"\n\"erişimi\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\"// self'e paylaşılan ve salt okunur (read-only) ödünç alınmış (borrowed) \"\n\"erişim\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"{} tur kaydedildi, {} için:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Tur {idx}: {lap} sn\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self (covered later)\\n\"\nmsgstr \"// self'in dışlayan (exclusive) sahipliği (daha sonra ele alınacak)\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Yarış {} bitti, toplam tur süresi: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Türkiye Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"`self` argümanları \\\"alıcıyı (receiver)\\\" ( metodun üzerinde işlem yaptığı \"\n\"nesne) belirtir. Bir metot için birkaç yaygın alıcı vardır:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: nesneyi çağırandan paylaşılan ve değiştirilemez (shared and \"\n\"immutable) bir referans kullanarak ödünç alır (borrows). Nesne daha sonra \"\n\"tekrar kullanılabilir.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: nesneyi çağırandan benzersiz ve değiştirilebilir (unique and \"\n\"mutable) bir referans kullanarak ödünç alır (borrows). Nesne daha sonra \"\n\"tekrar kullanılabilir.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: nesnenin sahipliğini (ownership) alır ve onu çağırandan uzağa taşır. \"\n\"Metot, nesnenin sahibi olur. Sahipliği açıkça (explicitly) aktarılmadığı \"\n\"sürece, metot geri döndüğünde nesne düşürülür (deallocated). Tam sahiplik \"\n\"otomatik olarak değiştirilebilirlik (mutability) anlamına gelmez.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: yukarıdakiyle aynı, ancak metot nesneyi değiştirebilir.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors that are called `new` by convention.\"\nmsgstr \"\"\n\"Alıcı (receiver) yok: bu, yapı (struct) üzerinde statik bir metot haline \"\n\"gelir. Genellikle geleneksel olarak `new` olarak adlandırılan yapıcılar \"\n\"(constructors) oluşturmak için kullanılır.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Metotları fonksiyonlarla karşılaştırarak tanıtmak faydalı olabilir.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Metotlar bir türün (bir yapı veya enum gibi) bir örneği üzerinden çağrılır; \"\n\"ilk parametre, örneği (instance) `self` olarak temsil (represents) eder.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Geliştiriciler, metot alıcı sözdiziminden (method receiver syntax) \"\n\"yararlanmak ve onları daha düzenli tutmaya yardımcı olmak için metotları \"\n\"kullanmayı seçebilirler. Metotları kullanarak tüm gerçekleştirim \"\n\"(implementation) kodunu tek bir öngörülebilir yerde tutabiliriz.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note that methods can also be called like associated functions by explicitly \"\n\"passing the receiver in, e.g. `CarRace::add_lap(&mut race, 20)`.\"\nmsgstr \"\"\n\"Metotların, alıcıyı (receiver) açıkça ileterek ilişkili fonksiyonlar gibi de \"\n\"çağrılabileceğini unutmayın, örn. `CarRace::add_lap(&mut race, 20)`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"Bir metot alıcısı (receiver) olan `self` anahtar kelimesinin kullanımına \"\n\"dikkat çekin.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Bunun `self: Self` için kısaltılmış bir terim olduğunu gösterin ve belki de \"\n\"yapı (struct) adının nasıl kullanılabileceğini de gösterin.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"`Self`'in, `impl` bloğunun içinde olduğu tür için bir tür takma adı (type \"\n\"alias) olduğunu ve bloğun başka yerlerinde de kullanılabileceğini açıklayın.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"`self`'in diğer yapılar gibi nasıl kullanıldığına ve bireysel alanlara \"\n\"(individual fields) atıfta bulunmak için nokta (.) notasyonunun nasıl \"\n\"kullanılabileceğine dikkat edin.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"`finish`'i iki kez çalıştırmayı deneyerek `&self`'in `self`'ten nasıl farklı \"\n\"olduğunu göstermek için bu iyi bir zaman olabilir.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"`self` üzerindeki varyantların ötesinde, `Box<Self>` gibi alıcı (receiver) \"\n\"türleri olmasına izin verilen [özel sarmalayıcı türleri](https://doc.rust-\"\n\"lang.org/reference/special-types-and-traits.html) de vardır.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust, özellikler (traits) ile türler üzerinde soyutlama yapmanıza olanak \"\n\"tanır. Arayüzlere (interfaces) benzerler:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"/// Bu evcil hayvandan bir cümle geri döndürün.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// Bu evcil hayvanı selamlayan bir dizeyi terminale yazdırın.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"Bir özellik (trait), türlerin özelliği gerçekleştirmek (implement) için \"\n\"sahip olması gereken bir dizi metodu tanımlar.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"Bir sonraki \\\"Genelleştirmeler (Generics)\\\" bölümünde, bir özelliği (trait) \"\n\"gerçekleştiren tüm türler üzerinde jenerik olan fonksiyonelliğin nasıl \"\n\"oluşturulacağını göreceğiz.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Ah sen ne şirinsin! Adın ne? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Hav, benim adım {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"`Type` için `Trait`'i gerçekleştirmek (implement) üzere bir `impl Trait for \"\n\"Type { .. }` bloğu kullanırsınız.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"Go arayüzlerinin (interfaces) aksine, sadece eşleşen metotlara sahip olmak \"\n\"yeterli değildir: `talk()` metoduna sahip bir `Cat` türü, bir `impl Pet` \"\n\"bloğunda olmadığı sürece `Pet`'i otomatik olarak karşılamaz.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Özellikler (traits), bazı metotların varsayılan gerçekleştirmelerini \"\n\"(implementations) sağlayabilir. Varsayılan gerçekleştirmeler, özelliğin tüm \"\n\"metotlarına dayanabilir. Bu durumda, `greet` sağlanır ve `talk`'a dayanır.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Multiple `impl` blocks are allowed for a given type. This includes both \"\n\"inherent `impl` blocks and trait `impl` blocks. Likewise multiple traits can \"\n\"be implemented for a given type (and often types implement many traits!). \"\n\"`impl` blocks can even be spread across multiple modules/files.\"\nmsgstr \"\"\n\"Belirli bir tür için birden fazla `impl` bloğuna izin verilir. Bu hem doğal \"\n\"`impl` bloklarını hem de özellik (trait) `impl` bloklarını içerir. Aynı \"\n\"şekilde belirli bir tür için birden fazla özellik gerçekleştirilebilir (ve \"\n\"genellikle türler birçok özelliği gerçekleştirir!). `impl` blokları birden \"\n\"fazla modüle/dosyaya bile yayılabilir.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"Bir özellik (trait), onu gerçekleştiren türlerin _üstözellikler \"\n\"(supertraits)_ olarak adlandırılan diğer özellikleri de gerçekleştirmesini \"\n\"gerektirebilir. Burada, `Pet`'i gerçekleştiren herhangi bir tür `Animal`'ı \"\n\"da gerçekleştirmelidir.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{}, {} bacağa sahip\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"Bu bazen \\\"özellik kalıtımı (trait inheritance)\\\" olarak adlandırılır ancak \"\n\"öğrencilerin bunun nesne yönelimli kalıtım (OO inheritance) gibi \"\n\"davranmasını beklememesi gerekir. Bu sadece bir özelliğin gerçekleştirmeleri \"\n\"üzerinde ek bir gereksinimi (requirement) belirtir.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types that are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"İlişkili türler (associated types), özellik (trait) gerçekleştirimi \"\n\"tarafından sağlanan yer tutucu (placeholder) türlerdir.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"İlişkili türler (associated types) bazen \\\"çıktı türleri (output types)\\\" \"\n\"olarak da adlandırılır. Anahtar gözlem, bu türü çağıranın değil, \"\n\"gerçekleştirenin (implementer) seçmesidir.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"Aritmetik operatörler ve `Iterator` da dahil olmak üzere birçok standart \"\n\"kütüphane özelliğinin (traits) ilişkili türleri vardır.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Desteklenen özellikler (traits), özel türleriniz için aşağıdaki gibi \"\n\"otomatik olarak gerçekleştirilebilir (implemented):\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\"// Default özelliği (trait) `default` yapıcısını (constructor) ekler.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// Clone özelliği (trait) `clone` metodunu ekler.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// Debug özelliği (trait) `{:?}` ile yazdırma desteği ekler.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{p1:?} vs. {p2:?}\\\"\"\nmsgstr \"\\\"{p1:?} vs. {p2:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"Türetme (derivation), makrolarla gerçekleştirilir (implemented) ve birçok \"\n\"kasa (crate) kullanışlı fonksiyonellik eklemek için faydalı türetme (derive) \"\n\"makroları sağlar. Örneğin, `serde`, `#[derive(Serialize)]` kullanarak bir \"\n\"yapı (struct) için serileştirme desteği türetebilir.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is usually provided for traits that have a common boilerplate \"\n\"implementation that is correct for most cases. For example, demonstrate how \"\n\"a manual `Clone` impl can be repetitive compared to deriving the trait:\"\nmsgstr \"\"\n\"Türetme (derivation) genellikle, çoğu durum için doğru olan yaygın bir \"\n\"basmakalıpsal (boilerplate) gerçekleştirmeye sahip özellikler (traits) için \"\n\"sağlanır. Örneğin, bir manuel `Clone` gerçekleştiriminin (impl) özelliği \"\n\"(trait) türetmeye kıyasla nasıl tekrarlanabilen bir yapıda olabileceğini \"\n\"gösterin:\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Not all of the `.clone()`s in the above are necessary in this case, but this \"\n\"demonstrates the generally boilerplate-y pattern that manual impls would \"\n\"follow, which should help make the use of `derive` clear to students.\"\nmsgstr \"\"\n\"Yukarıdaki `.clone()`'ların hepsi bu durumda gerekli değildir, ancak bu, \"\n\"manuel gerçekleştirmelerin (impls) izleyeceği genel basmakalıpsal \"\n\"(boilerplate-y) deseni gösterir, bu da öğrencilere `derive` kullanımını \"\n\"netleştirmeye yardımcı olmalıdır.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Alıştırma: Kaydedici Özelliği (Logger Trait)\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code that might log its progress can then take an `&impl Logger`. In \"\n\"testing, this might put messages in the test logfile, while in a production \"\n\"build it would send messages to a log server.\"\nmsgstr \"\"\n\"Bir `log` metoduna sahip bir `Logger` özelliği (trait) kullanarak basit bir \"\n\"kayıt (logging) aracı tasarlayalım. İlerlemesini kaydedebilecek kod daha \"\n\"sonra bir `&impl Logger` alabilir. Testte bu, mesajları test kayıt dosyasına \"\n\"(logfile) koyabilirken, bir üretim (production) inşasında mesajları bir \"\n\"kayıt sunucusuna (log server) gönderir.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"Ancak, aşağıda verilen `StderrLogger` ayrıntı seviyesine (verbosity) \"\n\"bakılmaksızın tüm mesajları kaydeder. Göreviniz, maksimum ayrıntı seviyesi \"\n\"üzerindeki mesajları yoksayacak bir `VerbosityFilter` türü yazmaktır.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. In the \"\n\"\\\"Generics\\\" segment, we will see how to make the wrapper generic over the \"\n\"wrapped type.\"\nmsgstr \"\"\n\"Bu yaygın bir desendir: bir özellik gerçekleştirmesini (trait \"\n\"implementation) saran ve aynı özelliği gerçekleştiren, süreçte davranış \"\n\"ekleyen bir yapı (struct). \\\"Genelleştirmeler (Generics)\\\" bölümünde, \"\n\"sarmalayıcıyı (wrapper) sarılmış tür (wrapped type) üzerinde genelleştirmeyi \"\n\"(generic) göreceğiz.\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#: src/generics/generic-data.md src/closures/exercise.md\n#: src/closures/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Belirtilen ayrıntı seviyesinde bir mesaj kaydedin.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#: src/generics/generic-data.md src/closures/exercise.md\n#: src/closures/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"ayrıntı seviyesi={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#: src/generics/generic-data.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\"/// Yalnızca belirtilen ayrıntı seviyesine kadar olan mesajları kaydedin.\\n\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Implement the `Logger` trait for `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\"// TODO: `VerbosityFilter` için `Logger` özelliğini (trait) gerçekleştirin.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#: src/generics/generic-data.md src/closures/exercise.md\n#: src/closures/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"Bilginiz Olsun\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#: src/generics/generic-data.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Eyvah\\\"\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Trait\"\n\n#: src/generics.md\nmsgid \"dyn Trait\"\nmsgstr \"dyn Trait\"\n\n#: src/generics.md\nmsgid \"Exercise: Generic min\"\nmsgstr \"Alıştırma: Genelleştirilmiş min\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust, algoritmaları veya veri yapılarını (sıralama veya ikili ağaç gibi) \"\n\"kullanılan veya depolanan türler üzerinde soyutlamanıza olanak tanıyan \"\n\"genelleştirmeleri (generics) destekler.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"bir sayı seçildi: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a string: {:?}\\\"\"\nmsgstr \"\\\"bir dize seçildi: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"'L'\"\nmsgstr \"'L'\"\n\n#: src/generics/generic-functions.md\nmsgid \"'R'\"\nmsgstr \"'R'\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"It can be helpful to show the monomorphized versions of `pick`, either \"\n\"before talking about the generic `pick` in order to show how generics can \"\n\"reduce code duplication, or after talking about generics to show how \"\n\"monomorphization works.\"\nmsgstr \"\"\n\"Genelleştirmelerin (generics) kod tekrarını nasıl azaltabileceğini göstermek \"\n\"için genelleştirilmiş `pick`'ten önce veya genelleştirmelerden sonra tek \"\n\"biçimli hâle getirmenin (monomorphization) nasıl çalıştığını göstermek için \"\n\"`pick`'in tek biçimli hâle getirilmiş (monomorphized) sürümlerini göstermek \"\n\"faydalı olabilir.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\"Rust, argümanların ve geri dönüş değerinin türlerine dayanarak T için bir \"\n\"tür çıkarır (infers).\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"In this example we only use the primitive types `i32` and `char` for `T`, \"\n\"but we can use any type here, including user-defined types:\"\nmsgstr \"\"\n\"Bu örnekte `T` için yalnızca ilkel (primitive) `i32` ve `char` türlerini \"\n\"kullanıyoruz, ancak burada kullanıcı tanımlı türler (user-defined types) de \"\n\"dahil olmak üzere herhangi bir türü kullanabiliriz:\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `left + right` \"\n\"if `cond` is false. Even if only the `pick` instantiation with integers is \"\n\"used, Rust still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"Bu, C++ şablonlarına (templates) benzer, ancak Rust, genelleştirilmiş \"\n\"(generic) fonksiyonu kısmen de olsa anında derler, bu nedenle bu fonksiyon \"\n\"kısıtlamalarla (constraints) eşleşen tüm türler için geçerli olmalıdır. \"\n\"Örneğin, `cond` yanlışsa `left + right` geri döndürmek için `pick`'i \"\n\"değiştirmeyi deneyin. Yalnızca tamsayılarla `pick` örneği kullanılsa bile, \"\n\"Rust bunu yine de geçersiz kabul eder. C++ bunu yapmanıza izin verirdi.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Genelleştirilmiş (generic) kod, çağrıldığı yerlerde (call sites) \"\n\"genelleştirilmemiş (özelleştirilmiş) koda dönüştürülür. Bu, sıfır maliyetli \"\n\"bir soyutlamadır: soyutlama olmadan veri yapılarını elle kodlamış olsaydınız \"\n\"alacağınız sonucun aynısını elde edersiniz.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"Genelleştirmelerle (generics) çalışırken, genellikle türlerin bazı \"\n\"özellikleri (trait) gerçekleştirmesini (implement) istersiniz, böylece bu \"\n\"özelliğin metotlarını çağırabilirsiniz.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait`:\"\nmsgstr \"Bunu `T: Trait` ile yapabilirsiniz:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NotCloneable` and passing it to `duplicate`.\"\nmsgstr \"Bir `NotCloneable` yapıp `duplicate`'e geçirmeyi deneyin.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\"Birden fazla özellik (trait) gerektiğinde, bunları birleştirmek için `+` \"\n\"kullanın.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Öğrencilerin kod okurken karşılaşacakları bir `where` yan tümcesi gösterin.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\"Çok sayıda parametreniz varsa fonksiyon imzasını (signature) sadeleştirir.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Daha güçlü kılan ek özelliklere sahiptir.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Birisi sorarsa, ekstra özellik, \\\":\\\" solundaki türün `Option<T>` gibi keyfi \"\n\"olabilmesidir.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"Rust'ın (şimdilik) özelleştirmeyi (specialization) desteklemediğini \"\n\"unutmayın. Örneğin, orijinal `duplicate` verildiğinde, özel bir \"\n\"`duplicate(a: u32)` eklemek geçersizdir.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"You can use generics to abstract over the concrete field type. Returning to \"\n\"the exercise for the previous segment:\"\nmsgstr \"\"\n\"Belirli alan türü (concrete field type) üzerinde soyutlama yapmak için \"\n\"genelleştirmeleri (generics) kullanabilirsiniz. Önceki bölümün alıştırmasına \"\n\"geri dönersek:\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why is `L` specified twice in `impl<L: Logger> .. VerbosityFilter<L>`? \"\n\"Isn't that redundant?\"\nmsgstr \"\"\n\"_S:_ Neden `L`, `impl<L: Logger> .. VerbosityFilter<L>`'de iki kez \"\n\"belirtiliyor? Bu gereksiz (redundant) değil mi?\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Bunun nedeni, genelleştirilmiş (generic) tür için genel bir gerçekleştirme \"\n\"bölümü (generic implementation section) olmasıdır. Onlar, bağımsız olarak \"\n\"genelleştirilmiştir (generic).\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `L`.\"\nmsgstr \"Bu, bu metotların herhangi bir `L` için tanımlandığı anlamına gelir.\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl VerbosityFilter<StderrLogger> { .. }`.\"\nmsgstr \"`impl VerbosityFilter<StderrLogger> { .. }` yazmak mümkündür.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`VerbosityFilter` is still generic and you can use `VerbosityFilter<f64>`, \"\n\"but methods in this block will only be available for \"\n\"`VerbosityFilter<StderrLogger>`.\"\nmsgstr \"\"\n\"`VerbosityFilter` hala genelleştirilmiştir türdür ve `VerbosityFilter<f64>` \"\n\"türünü kullanabilirsiniz, ancak bu bloktaki metotlar yalnızca \"\n\"`VerbosityFilter<StderrLogger>` için mevcut olacaktır.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Note that we don't put a trait bound on the `VerbosityFilter` type itself. \"\n\"You can put bounds there as well, but generally in Rust we only put the \"\n\"trait bounds on the impl blocks.\"\nmsgstr \"\"\n\"`VerbosityFilter` türünün kendisine bir özellik sınırı (trait \"\n\"bound)koymadığımıza dikkat edin. Oraya da sınırlar koyabilirsiniz, ancak \"\n\"genellikle Rust'ta özellik sınırlarını (trait bounds) yalnızca `impl` \"\n\"bloklarına koyarız.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used. For example the [`From<T>`]\"\n\"(https://doc.rust-lang.org/std/convert/trait.From.html) trait is used to \"\n\"define type conversions:\"\nmsgstr \"\"\n\"Özellikler (traits), tıpkı türler ve fonksiyonlar gibi genelleştirilmiş \"\n\"(generic) de olabilir. Bir özelliğin parametreleri, kullanıldığında belirli \"\n\"(concrete) türler alır. Örneğin, [`From<T>`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) özelliği tür dönüşümlerini (type conversions) \"\n\"tanımlamak için kullanılır:\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"Tamsayıdan dönüştürüldü: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"Bool'dan dönüştürüldü: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple, and copied here for reference.\"\nmsgstr \"\"\n\"`From` özelliği (trait) kursun ilerleyen bölümlerinde ele alınacaktır, ancak \"\n\"[`std` belgelerindeki tanımı](https://doc.rust-lang.org/std/convert/trait.\"\n\"From.html) basittir ve referans için buraya kopyalanmıştır.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"Özelliğin (trait) gerçekleştirmeleri (implementations), olası tüm tür \"\n\"parametrelerini kapsamak zorunda değildir. Burada, `Foo` için `From<&str>` \"\n\"gerçekleştirmesi olmadığından `Foo::from(\\\"hello\\\")` derlenmezdi.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"Genelleştirilmiş (generic) özellikler (traits) türleri \\\"girdi\\\" olarak \"\n\"alırken, ilişkili türler (associated types) bir tür \\\"çıktı\\\" türüdür. Bir \"\n\"özelliğin farklı girdi türleri için birden çok gerçekleştirmesi \"\n\"(implementation) olabilir.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"Aslında, Rust herhangi bir T türü için bir özelliğin (trait) en fazla bir \"\n\"gerçekleştiriminin (implementation) eşleşmesini gerektirir. Diğer bazı \"\n\"dillerden farklı olarak, Rust'ın \\\"en spesifik\\\" eşleşmeyi seçmek için bir \"\n\"sezgisi (heuristic) yoktur. Bu desteği eklemek için [özelleştirme \"\n\"(specialization)](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html) adı verilen bir çalışma vardır.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Özellik sınırlarına (trait bounds) benzer şekilde, fonksiyon argümanlarında \"\n\"ve geri dönüş değerlerinde bir `impl Trait` sözdizimi kullanılabilir:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Sözdizimsel kolaylık:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types that you cannot name. The meaning \"\n\"of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"`impl Trait`, isimlendiremeyeceğiniz türlerle çalışmanıza olanak tanır. \"\n\"`impl Trait`'in anlamı farklı konumlarda biraz farklıdır.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"Bir parametre için, `impl Trait` bir özellik sınırına (trait bound) sahip \"\n\"anonim bir genelleştirilmiş (generic) parametre gibidir.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Bir geri dönüş türü için, bu, geri dönüş türünün, türü isimlendirmeden \"\n\"özelliği (trait) gerçekleştiren (implement) bir belirli (concrete) tür \"\n\"olduğu anlamına gelir. Bu, genel bir API'de belirli olan türü açığa çıkarmak \"\n\"istemediğinizde kullanışlı olabilir.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"Geri dönüş konumunda (return position) çıkarım (inference) yapmak zordur. \"\n\"`impl Foo` geri döndüren bir fonksiyon, geri döndürdüğü belirli olan türü \"\n\"kaynakta yazmadan seçer. `collect<B>() -> B` gibi genelleştirilmiş bir tür \"\n\"döndüren bir fonksiyon, `B`'yi sağlayan herhangi bir türü geri döndürebilir \"\n\"ve çağıranın, `let x: Vec<_> = foo.collect()` veya tür belirteciyle (turbo \"\n\"balığı / turbofish) ile `foo.collect::<Vec<_>>()` gibi birini seçmesi \"\n\"gerekebilir.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"`debuggable`'ın türü nedir? Hata mesajının ne gösterdiğini görmek için `let \"\n\"debuggable: () = ..`'yi deneyin.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\"Rust, genelleştirmeler (generics) yoluyla statik yönlendirme (static \"\n\"dispatch) için özellikleri (trait) kullanmaya ek olarak, özellik nesneleri \"\n\"(trait objects) yoluyla silinmiş türle (type-erased), dinamik yönlendirmeyi \"\n\"(dynamic dispatch) destekler:\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miyav!\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"\"\n\"// Genelleştirmeleri (generics) ve statik yönlendirmeyi (static dispatch) \"\n\"kullanır.\\n\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Merhaba, nasılsın? {}\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"\"\n\"// Tür silmeyi (type-erasure) ve dinamik yönlendirmeyi (dynamic dispatch) \"\n\"kullanır.\\n\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve that type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\"`impl Trait` de dahil olmak üzere genelleştirmeler (generics), \"\n\"genelleştirmenin oluşturulduğu her farklı tür için fonksiyonun özel bir \"\n\"örneğini oluşturmak üzere tek biçimli hâle getirmeyi (monomorphization) \"\n\"kullanır. Bu, genelleştirilmiş bir fonksiyon içinden bir özellik (trait) \"\n\"metodunu çağırmanın hala statik yönlendirme (static dispatch) kullandığı \"\n\"anlamına gelir, çünkü derleyici tam tür bilgisine sahiptir ve hangi türün \"\n\"özellik gerçekleştiriminin (trait implementation) kullanılacağını çözebilir.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\"`dyn Trait` kullanırken, bunun yerine bir [sanal metot tablosu (virtual \"\n\"method table)](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable) \"\n\"aracılığıyla dinamik yönlendirme (dynamic dispatch) kullanır. Bu, hangi \"\n\"türde `Pet` geçirilirse geçirilsin kullanılan tek bir `fn dynamic` sürümü \"\n\"olduğu anlamına gelir.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\"`dyn Trait` kullanırken, özellik nesnesinin (trait object) bir tür dolaylı \"\n\"yol (indirection) arkasında olması gerekir. Bu durumda bu bir referanstır, \"\n\"ancak `Box` gibi akıllı gösterici (smart pointer) türleri de kullanılabilir \"\n\"(bu 3. günde gösterilecektir).\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\"Çalışma zamanında, bir `&dyn Pet`, \\\"genişletilmiş bir gösterici (fat \"\n\"pointer)\\\" olarak temsil edilir, yani iki göstericiden oluşan bir çift: Bir \"\n\"gösterici, `Pet`'i gerçekleştiren (implement) belirli nesneye işaret eder ve \"\n\"diğeri o tür için özellik gerçekleştiriminin (trait implementation) sanal \"\n\"metot tablosuna (vtable) işaret eder. `&dyn Pet` üzerinde `talk` metodunu \"\n\"çağırırken, derleyici sanal metot tablosunda `talk` için fonksiyon \"\n\"göstericisini (function pointer) arar ve ardından `Dog` veya `Cat`'e \"\n\"göstericiyi o fonksiyona geçirerek fonksiyonu çağırır. Derleyicinin bunu \"\n\"yapmak için `Pet`'in belirli olan türünü (concrete type) bilmesi gerekmez.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\"Bir `dyn Trait`, \\\"silinmiş tür (type-erased)\\\" olarak kabul edilir, çünkü \"\n\"artık somut türün ne olduğuna dair derleme zamanı bilgisine sahip değiliz.\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"Bu kısa alıştırmada, [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.\"\n\"Ord.html) özelliğini (trait) kullanarak iki değerin minimumunu belirleyen \"\n\"genelleştirilmiş (generic) bir `min` fonksiyonu gerçekleştireceksiniz \"\n\"(implement).\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in the tests.\\n\"\nmsgstr \"// TODO: testlerde kullanılan `min` fonksiyonunu gerçekleştirin.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"'7'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"merhaba\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"hoşçakal\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"yarasa\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"armadillo\\\"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"Öğrencilere [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html) \"\n\"özelliğini (trait) ve [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/\"\n\"enum.Ordering.html) enum'ını gösterin.\"\n\n#: src/closures.md src/concurrency/threads.md src/concurrency/shared-state.md\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 30 dakika sürmelidir. İçeriği:\"\n\n#: src/closures/syntax.md\nmsgid \"Closures are created with vertical bars: `|..| ..`.\"\nmsgstr \"Çevreleyiciler (closures) dikey çubuklarla oluşturulur: `|..| ..`.\"\n\n#: src/closures/syntax.md\nmsgid \"// Argument and return type can be inferred for lightweight syntax:\\n\"\nmsgstr \"\"\n\"// Hafif sözdizimi (lightweight syntax) için, argüman ve geri dönüş türü \"\n\"çıkarımı yapılabilir:\\n\"\n\n#: src/closures/syntax.md\nmsgid \"// Or we can specify types and bracket the body to be fully explicit:\\n\"\nmsgstr \"\"\n\"// Veya türleri belirtebilir ve tamamen açık (fully explicit) olmak için \"\n\"gövdeyi parantez içine alabiliriz:\\n\"\n\n#: src/closures/syntax.md\nmsgid \"\"\n\"The arguments go between the `|..|`. The body can be surrounded by `{ .. }`, \"\n\"but if it is a single expression these can be omitted.\"\nmsgstr \"\"\n\"Argümanlar `|..|` arasına girer. Gövde `{ .. }` içine alınır., ancak tek bir \"\n\"ifade (expression) ise bunlar atlanabilir.\"\n\n#: src/closures/syntax.md\nmsgid \"\"\n\"Argument types are optional, and are inferred if not given. The return type \"\n\"is also optional, but can only be written if using `{ .. }` around the body.\"\nmsgstr \"\"\n\"Argüman türleri isteğe bağlıdır ve eğer verilmezse türler çıkarım \"\n\"(inference) yapılır. Geri dönüş türü (return type) de isteğe bağlıdır, ancak \"\n\"yalnızca gövdenin etrafında `{ .. }` varsa yazılabilir.\"\n\n#: src/closures/syntax.md\nmsgid \"\"\n\"The examples can both be written as mere nested functions instead -- they do \"\n\"not capture any variables from their lexical environment. We will see \"\n\"captures next.\"\nmsgstr \"\"\n\"Örneklerin her ikisi de bunun yerine sadece iç içe fonksiyonlar olarak \"\n\"yazılabilir -- çünkü bulundukları sözcüksel ortamdan (lexical environment) \"\n\"herhangi bir değişkeni yakalamazlar. Yakalamayı (capturing) bir sonraki \"\n\"adımda göreceğiz.\"\n\n#: src/closures/syntax.md\nmsgid \"\"\n\"The ability to store functions in variables doesn't just apply to closures, \"\n\"regular functions can be put in variables and then invoked the same way that \"\n\"closures can: [Example in the playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda).\"\nmsgstr \"\"\n\"Fonksiyonları değişkenlerde saklama yeteneği sadece çevreleyicilere \"\n\"(closures) özgü değildir, düzenli (regular) fonksiyonlar da değişkenlere \"\n\"konulabilir ve ardından çevreleyicilerle aynı şekilde çağrılabilir: [Deneme \"\n\"alanında (playground) örnek](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=817cbeeefc49f3d0d180a3d6d54c8bda).\"\n\n#: src/closures/syntax.md\nmsgid \"\"\n\"The linked example also demonstrates that closures that don't capture \"\n\"anything can also coerce to a regular function pointer.\"\nmsgstr \"\"\n\"Bağlantısı verilen örnek ayrıca hiçbir şey yakalamayan (capture) \"\n\"çevreleyicilerin (closures) de düzenli bir fonksiyon göstericisine (regular \"\n\"function pointer) dönüştürülebileceğini (coerce) göstermektedir.\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"A closure can capture variables from the environment where it was defined.\"\nmsgstr \"\"\n\"Bir çevreleyici (closure), tanımlandığı ortamdan değişkenleri yakalayabilir \"\n\"(capture).\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"By default, a closure captures values by reference. Here `max_value` is \"\n\"captured by `clamp`, but still available to `main` for printing. Try making \"\n\"`max_value` mutable, changing it, and printing the clamped values again. Why \"\n\"doesn't this work?\"\nmsgstr \"\"\n\"Varsayılan olarak, bir çevreleyici (closure) değerleri referans yoluyla \"\n\"yakalar. Burada `max_value`, `clamp` tarafından yakalanır, ancak yazdırma \"\n\"için `main`'de hala kullanılabilir. `max_value` değişkenini değiştirilebilir \"\n\"(mutable) yapmayı, değiştirmeyi ve değerleri tekrar yazdırmayı deneyin. Bu \"\n\"neden işe yaramıyor?\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"If a closure mutates values, it will capture them by mutable reference. Try \"\n\"adding `max_value += 1` to `clamp`.\"\nmsgstr \"\"\n\"Bir çevreleyici (closure) değerleri değiştirirse, onları değiştirilebilir \"\n\"(mutable) referans yoluyla yakalar. `clamp`'e `max_value += 1` eklemeyi \"\n\"deneyin.\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"You can force a closure to move values instead of referencing them with the \"\n\"`move` keyword. This can help with lifetimes, for example if the closure \"\n\"must outlive the captured values (more on lifetimes later).\"\nmsgstr \"\"\n\"Bir çevreleyiciyi (closure), `move` anahtar kelimesiyle değerleri referans \"\n\"almak yerine taşımaya (move) zorlayabilirsiniz. Bu, ömürlerle (lifetimes) \"\n\"ilgili yardımcı olabilir, örneğin çevreleyici yakalanan değerlerden daha \"\n\"uzun yaşamalıysa (ömürler hakkında daha sonra daha fazla bilgi).\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"This looks like `move |v| ..`. Try adding this keyword and see if `main` can \"\n\"still access `max_value` after defining `clamp`.\"\nmsgstr \"\"\n\"Bu, `move |v| ..` gibi görünüyor. Bu anahtar kelimeyi eklemeyi deneyin ve \"\n\"`clamp`'i tanımladıktan sonra `main`'in hala `max_value`'e erişip \"\n\"erişemediğini görün.\"\n\n#: src/closures/capturing.md\nmsgid \"\"\n\"By default, closures will capture each variable from an outer scope by the \"\n\"least demanding form of access they can (by shared reference if possible, \"\n\"then exclusive reference, then by move). The `move` keyword forces capture \"\n\"by value.\"\nmsgstr \"\"\n\"Varsayılan olarak, çevreleyiciler (closures) dış kapsamdan (outer scope) her \"\n\"değişkeni, yapabildikleri en az talepkar erişim biçimiyle yakalarlar \"\n\"(mümkünse paylaşılan (shared) referansla, sonra dışlayan (exclusive) \"\n\"referansla, sonra taşıma (move) ile). `move` anahtar kelimesi, değerle \"\n\"yakalamayı (move)zorlar.\"\n\n#: src/closures/traits.md\nmsgid \"Closure traits\"\nmsgstr \"Çevreleyici özellikleri (Closure traits)\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"Closures or lambda expressions have types that cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Çevreleyicilerin (closures) veya lambda ifadelerinin isimlendirilemeyen \"\n\"türleri vardır. Ancak, özel [`Fn`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Fn.html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html) ve \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) \"\n\"özelliklerini (traits) gerçekleştirirler (implement):\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"The special types `fn(..) -> T` refer to function pointers - either the \"\n\"address of a function, or a closure that captures nothing.\"\nmsgstr \"\"\n\"Özel `fn(..) -> T` türleri, fonksiyon göstericilerine (function pointers) \"\n\"referans verir - ya bir fonksiyonun adresi ya da hiçbir şey yakalamayan \"\n\"(capture) bir çevreleyici (closure).\"\n\n#: src/closures/traits.md\nmsgid \"\\\"Calling {func_name}({input}): {}\\\"\"\nmsgstr \"\\\"Çağrılıyor {func_name}({input}): {}\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"-itis\\\"\"\nmsgstr \"\\\"sendromu\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"{x}{suffix}\\\"\"\nmsgstr \"\\\"{x} {suffix}\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"add_suffix\\\"\"\nmsgstr \"\\\"add_suffix\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"senior\\\"\"\nmsgstr \"\\\"son sınıf\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"appendix\\\"\"\nmsgstr \"\\\"apandis\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"/\\\"\"\nmsgstr \"\\\"/\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"accumulate\\\"\"\nmsgstr \"\\\"accumulate\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"red\\\"\"\nmsgstr \"\\\"kırmızı\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"green\\\"\"\nmsgstr \"\\\"yeşil\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"blue\\\"\"\nmsgstr \"\\\"mavi\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"take_and_reverse\\\"\"\nmsgstr \"\\\"take_and_reverse\\\"\"\n\n#: src/closures/traits.md\nmsgid \"\\\"reversed: \\\"\"\nmsgstr \"\\\"ters çevrilmiş: \\\"\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_suffix`) neither consumes nor mutates captured values. It \"\n\"can be called needing only a shared reference to the closure, which means \"\n\"the closure can be executed repeatedly and even concurrently.\"\nmsgstr \"\"\n\"Bir `Fn` (ör. `add_suffix`) yakalanan değerleri (captured values) ne tüketir \"\n\"ne de değiştirir. Sadece çevreleyiciye (closure) paylaşılan bir referans \"\n\"(shared reference) gerektirerek çağrılabilir, bu da çevreleyicinin tekrar \"\n\"tekrar ve hatta eş zamanlı olarak (concurrently) yürütülebileceği anlamına \"\n\"gelir.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure \"\n\"object is accessed via exclusive reference, so it can be called repeatedly \"\n\"but not concurrently.\"\nmsgstr \"\"\n\"Bir `FnMut` (ör. `accumulate`) yakalanan değerleri (captured values) \"\n\"değiştirebilir. Çevreleyici (closure) nesnesine dışlayan (exclusive) \"\n\"referans yoluyla erişilir, bu nedenle tekrar tekrar çağrılabilir ancak eş \"\n\"zamanlı olarak (concurrently) çağrılamaz.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `take_and_reverse`), you may only call it \"\n\"once. Doing so consumes the closure and any values captured by move.\"\nmsgstr \"\"\n\"Eğer bir `FnOnce`'ınız varsa (ör. `take_and_reverse`), onu yalnızca bir kez \"\n\"çağırabilirsiniz. Bunu yapmak, çevreleyiciyi (closure) ve taşıma (move) ile \"\n\"yakalanan tüm değerleri tüketir.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut`, `FnOnce`'ın bir alt türüdür. `Fn`, `FnMut` ve `FnOnce`'ın bir alt \"\n\"türüdür. Yani, `FnOnce`'ın istendiği her yerde bir `FnMut` kullanabilirsiniz \"\n\"ve `FnMut` veya `FnOnce`'ın istendiği her yerde bir `Fn` kullanabilirsiniz.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"Bir çevreleyici (closure) alan bir fonksiyon tanımladığınızda, \"\n\"yapabiliyorsanız `FnOnce` (yani onu bir kez çağırırsınız), değilse `FnMut` \"\n\"ve son olarak `Fn` almalısınız. Bu, çağırana (caller) en fazla esnekliği \"\n\"sağlar.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(which can be passed to a consumer of any of the three closure traits), then \"\n\"`FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"Buna karşılık, bir çevreleyiciniz (closure) olduğunda, sahip olabileceğiniz \"\n\"en esnek olan `Fn`'dir (üç çevreleyici özelliğinin (trait) herhangi birinin \"\n\"tüketicisine geçirilebilir), sonra `FnMut` ve son olarak `FnOnce`.\"\n\n#: src/closures/traits.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_suffix`) and `Clone` (e.g. \"\n\"`take_and_reverse`), depending on what the closure captures. Function \"\n\"pointers (references to `fn` items) implement `Copy` and `Fn`.\"\nmsgstr \"\"\n\"Derleyici ayrıca, çevreleyicinin (closure) ne yakaladığına bağlı olarak \"\n\"`Copy` (ör. `add_suffix` için) ve `Clone` (ör. `take_and_reverse`) çıkarımı \"\n\"yapar (infers). Fonksiyon göstericileri (`fn` öğelerine referanslar) \"\n\"`Copy`'yi ve `Fn`'yi gerçekleştirir (implement).\"\n\n#: src/closures/exercise.md\nmsgid \"\"\n\"Building on the generic logger from this morning, implement a `Filter` that \"\n\"uses a closure to filter log messages, sending those that pass the filtering \"\n\"predicate to an inner logger.\"\nmsgstr \"\"\n\"Bu sabahki genel kaydediciden (logger) yola çıkarak, kayıt mesajlarını \"\n\"filtrelemek için bir çevreleyici (closure) kullanan bir `Filter` \"\n\"gerçekleştirin (implement), filtreleme koşulunu geçenleri bir iç kaydediciye \"\n\"(logger) gönderin.\"\n\n#: src/closures/exercise.md\nmsgid \"// TODO: Define and implement `Filter`.\\n\"\nmsgstr \"// TODO: `Filter`'ı tanımlayın ve gerçekleştirin (implement).\\n\"\n\n#: src/closures/exercise.md src/closures/solution.md\nmsgid \"\\\"yikes\\\"\"\nmsgstr \"\\\"berbat\\\"\"\n\n#: src/closures/exercise.md src/closures/solution.md\nmsgid \"\\\"yikes, something went wrong\\\"\"\nmsgstr \"\\\"berbat, bir şeyler ters gitti\\\"\"\n\n#: src/closures/exercise.md src/closures/solution.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"eyvah\\\"\"\n\n#: src/closures/solution.md\nmsgid \"/// Only log messages matching a filtering predicate.\\n\"\nmsgstr \"\"\n\"/// Yalnızca bir filtreleme koşuluyla eşleşen günlük mesajlarını kaydet.\\n\"\n\n#: src/closures/solution.md\nmsgid \"\"\n\"Note that the `P: Fn(u8, &str) -> bool` bound on the first `Filter` impl \"\n\"block isn't strictly necessary, but it helps with type inference when \"\n\"calling `new`. Demonstrate removing it and showing how the compiler now \"\n\"needs type annotations for the closure passed to `new`.\"\nmsgstr \"\"\n\"İlk `Filter` impl bloğundaki `P: Fn(u8, &str) -> bool` sınırının kesinlikle \"\n\"gerekli olmadığını, ancak `new` çağrılırken tür çıkarımına (type inference) \"\n\"yardımcı olduğunu unutmayın. Onu kaldırmayı gösterin ve derleyicinin şimdi \"\n\"`new`'e geçirilen çevreleyici (closure) için tür ek açıklamalarına (type \"\n\"annotations) nasıl ihtiyaç duyduğunu gösterin.\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"Vec\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Bu bölümdeki slaytların her biri için, dokümantasyon sayfalarını gözden \"\n\"geçirerek biraz zaman ayırın ve daha yaygın metotlardan bazılarını öne \"\n\"çıkarın.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library that helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust, Rust kütüphaneleri ve programları tarafından kullanılan bir dizi ortak \"\n\"türün oluşturulmasına yardımcı olan bir standart kütüphane ile birlikte \"\n\"gelir. Bu şekilde, her hangi iki kütüphane aynı `String` türünü kullandığı \"\n\"için sorunsuzca birlikte çalışabilir.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"Aslında Rust, Standart Kütüphanenin birkaç katmanını içerir: `core`, `alloc` \"\n\"ve `std`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core`, `libc`'ye, tahsis ediciye (allocator) ve hatta bir işletim \"\n\"sisteminin varlığına bağlı olmayan en temel türleri ve fonksiyonları içerir.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types that require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc`, `Vec`, `Box` ve `Arc` gibi global bir dinamik bellek tahsis \"\n\"edicisini (heap allocator) gerektiren türleri içerir.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Gömülü Rust uygulamaları genellikle sadece `core` ve bazen de `alloc` \"\n\"kullanır.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust, kapsamlı bir dokümantasyonla birlikte gelir. Örneğin:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"[Döngüler](https://doc.rust-lang.org/stable/reference/expressions/loop-expr.\"\n\"html) hakkındaki tüm ayrıntılar.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"[`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.html) gibi ilkel \"\n\"türler (primitive types).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`Option`](https://doc.rust-lang.org/stable/std/option/enum.Option.html) \"\n\"veya [`BinaryHeap`](https://doc.rust-lang.org/stable/std/collections/struct.\"\n\"BinaryHeap.html) gibi standart kütüphane türleri.\"\n\n#: src/std-types/docs.md\nmsgid \"Use `rustup doc --std` or <https://std.rs> to view the documentation.\"\nmsgstr \"\"\n\"Dokümantasyonu görüntülemek için `rustup doc --std` veya <https://std.rs> \"\n\"kullanın.\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"Aslında, kendi kodunuzu belgeleyebilirsiniz:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// İlk argümanın ikinci argümana bölünüp bölünemeyeceğini belirle.\\n\"\n\"///\\n\"\n\"/// İkinci argüman sıfır ise, sonuç yanlıştır.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"İçerikler Markdown olarak işlenir. Yayınlanan tüm Rust kütüphane kasaları \"\n\"(crates), [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) \"\n\"aracı kullanılarak [`docs.rs`](https://docs.rs) adresinde otomatik olarak \"\n\"belgelenir. Bir API'deki tüm genel (public) öğeleri bu deseni kullanarak \"\n\"belgelemek, tercih edilen yaklaşımdır (idiomatic).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Bir öğeyi, öğenin içinden (bir modülün içi gibi) belgelemek için \\\"iç \"\n\"doküman yorumları (inner doc comments)\\\" olarak adlandırılan `//!` veya `/\"\n\"*! .. */` kullanın:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Bu modül, tamsayıların bölünebilirliği ile ilgili fonksiyonellik \"\n\"içerir.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Öğrencilere <https://docs.rs/rand> adresindeki `rand` kasası (crate) için \"\n\"oluşturulmuş belgeleri gösterin.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Daha önce `Option<T>`'nin bazı kullanımlarını görmüştük. Ya `T` türünde bir \"\n\"değer saklar ya da hiçbir şey saklamaz. Örneğin, [`String::find`](https://\"\n\"doc.rust-lang.org/stable/std/string/struct.String.html#method.find) bir \"\n\"`Option<usize>` geri döndürür.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Karakter bulunamadı\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` sadece standart kütüphanede kullanılır gibi bir şey yoktur, yaygın \"\n\"olarak kullanılır.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap`, bir `Option` içindeki değeri geri döndürür veya paniğe (panic) \"\n\"neden olur. `expect` benzerdir ancak bir hata mesajı (error message) alır.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"None durumunda panik alabilirsiniz, ancak None'ı kontrol etmeyi \"\n\"\\\"yanlışlıkla\\\" unutamazsınız.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"Bir şeyler üzerinde çalışırken her yerde `unwrap`/`expect` kullanmak \"\n\"yaygındır, ancak üretim (production) kodu genellikle `None`'ı daha şık bir \"\n\"şekilde ele alır.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The \\\"niche optimization\\\" means that `Option<T>` often has the same size in \"\n\"memory as `T`, if there is some representation that is not a valid value of \"\n\"T. For example, a reference cannot be NULL, so `Option<&T>` automatically \"\n\"uses NULL to represent the `None` variant, and thus can be stored in the \"\n\"same memory as `&T`.\"\nmsgstr \"\"\n\"\\\"Niş/oyuk optimizasyonu (niche optimization)\\\", T'nin geçerli bir değeri \"\n\"olmayan bir gösterimi (representation) varsa, `Option<T>`'nin genellikle \"\n\"bellekte `T` ile aynı boyuta sahip olduğu anlamına gelir. Örneğin, bir \"\n\"referans NULL olamaz, bu nedenle `Option<&T>` `None` varyantını temsil etmek \"\n\"için otomatik olarak NULL kullanır ve bu sayede `&T` ile aynı bellekte \"\n\"saklanabilir.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result`, `Option`'a benzer, ancak her biri farklı bir enum varyantına sahip \"\n\"bir işlemin başarısını veya başarısızlığını belirtir. Genelleştirilmiştir \"\n\"(generic): `Result<T, E>`; burada `T`, `Ok` varyantında kullanılır ve `E`, \"\n\"`Err` varyantında görünür.\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"günlük.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Sevgili günlük: {contents} ({bytes} bayt)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Dosya içeriği okunamadı\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"Günlük açılamadı: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"`Option`'da olduğu gibi, başarılı değer `Result`'ın içinde yer alır ve \"\n\"geliştiriciyi onu açıkça (explicitly) çıkarmaya zorlar. Bu, hata kontrolünü \"\n\"teşvik eder. Bir hatanın asla olmaması gereken durumlarda, `unwrap()` veya \"\n\"`expect()` çağrılabilir ve bu aynı zamanda geliştiricinin niyetinin de bir \"\n\"işaretidir.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"`Result` dokümantasyonunu okumanız tavsiye edilir. Kurs sırasında değil, ama \"\n\"bahsetmeye değer. Fonksiyonel tarzda programlamaya yardımcı olan birçok \"\n\"kullanışlı metot ve fonksiyon içerir.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result`, 4. Günde göreceğimiz gibi hata işlemeyi (error handling) \"\n\"gerçekleştirmek (implement) için standart türdür.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) türü, \"\n\"büyüyebilir, UTF-8 olarak kodlanmış bir dizedir (string):\"\n\n#: src/std-types/string.md src/std-traits/comparisons.md\n#: src/std-traits/read-and-write.md src/memory-management/review.md\n#: src/testing/unit-tests.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Merhaba\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: uzunluk = {}, kapasite = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: uzunluk = {}, kapasite = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇹🇷\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: uzunluk = {}, karakter sayısı = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String`, [`Deref<Target = str>`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#deref-methods-str) özelliğini gerçekleştirir (implement), \"\n\"bu da bir `String` üzerinde tüm `str` metotlarını çağırabileceğiniz anlamına \"\n\"gelir.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` yeni bir boş dize geri döndürür, dizeye ne kadar veri eklemek \"\n\"istediğinizi bildiğinizde `String::with_capacity` kullanın.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len`, `String`'in bayt cinsinden boyutunu geri döndürür (bu, \"\n\"karakter cinsinden uzunluğundan farklı olabilir).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars`, gerçek karakterler üzerinde bir adımlayıcı (iterator) geri \"\n\"döndürür. [yazıbirim (grapheme) kümeleri](https://docs.rs/unicode-\"\n\"segmentation/latest/unicode_segmentation/struct.Graphemes.html) nedeniyle \"\n\"bir `char`'ın bir insanın \\\"karakter\\\" olarak kabul edeceği şeyden farklı \"\n\"olabileceğini unutmayın.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"İnsanlar dizelerden (strings) bahsettiğinde, ya `&str` ya da `String`'den \"\n\"bahsediyor olabilirler.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Bir tür `Deref<Target = T>`'yi gerçekleştirdiğinde (implement), derleyici \"\n\"`T`'den metotları şeffaf bir şekilde çağırmanıza izin verir.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"`Deref` özelliğini (trait) henüz tartışmadık, bu yüzden bu noktada bu \"\n\"çoğunlukla dokümantasyondaki kenar çubuğunun yapısını (neden String türünün \"\n\"altında str metodlarının da görüldüğünü) açıklar.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String`, `Deref<Target = str>` özelliğini gerçekleştirir (implement) ve bu \"\n\"ona şeffaf bir şekilde `str`'nin metotlarına erişim sağlar.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"`let s3 = s1.deref();` ve `let s3 = &*s1;` yazıp karşılaştırın.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String`, bir bayt vektörü etrafında bir sarmalayıcı (wrapper) olarak \"\n\"gerçekleştirilmiştir (implement), vektörlerde desteklenen birçok işlem \"\n\"`String`'de de desteklenir, ancak bazı ek garantilerle.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"Bir `String`'e erimenin farklı yollarını karşılaştırın:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"`i`'nin sınırlar içinde veya dışında olduğu `s3.chars().nth(i).unwrap()` \"\n\"kullanarak bir karaktere erişmek.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"Bu dilimin (slice) karakter sınırlarına denk gelip gelmediği durumlarda \"\n\"`s3[0..4]` kullanarak bir alt dizeye erişmek.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Birçok tür, [`to_string`](https://doc.rust-lang.org/std/string/trait.\"\n\"ToString.html#tymethod.to_string) metodu ile bir dizeye dönüştürülebilir. Bu \"\n\"özellik (trait), `Display`'i gerçekleştiren (implement) tüm türler için \"\n\"otomatik olarak gerçekleştirilir, bu nedenle biçimlendirilebilen (format) \"\n\"her şey bir dizeye de dönüştürülebilir.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html), standart yeniden \"\n\"boyutlandırılabilir dinamik bellekten tahsis edilen arabellektir (heap-\"\n\"allocated buffer):\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: uzunluk = {}, kapasite = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: uzunluk = {}, kapasite = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"\"\n\"// Bir vektörü elemanlarla ilklendirmek (initialize) için standart makro.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Sadece çift elemanları tut.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Ardışık kopyaları sil.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec`, [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n\"html#deref-methods-%5BT%5D) özelliğini gerçekleştirir (implement), bu da bir \"\n\"`Vec` üzerinde dilim (slice) metotlarını çağırabileceğiniz anlamına gelir.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec`, `String` ve `HashMap` ile birlikte bir koleksiyon türüdür. İçerdiği \"\n\"veriler dinamik bellekte (heap) saklanır. Bu, veri miktarının derleme \"\n\"zamanında bilinmesi gerekmediği anlamına gelir. Çalışma zamanında \"\n\"büyüyebilir veya küçülebilir.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"`Vec<T>`'nin de genelleştirilmiş (generic) bir tür olduğuna, ancak `T`'yi \"\n\"açıkça belirtmek zorunda olmadığınıza dikkat edin. Rust tür çıkarımında \"\n\"(type inference) her zaman olduğu gibi, `T` ilk `push` çağrısı sırasında \"\n\"belirlenmiştir.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]`, `Vec::new()` yerine kullanılacak standart bir makrodur ve \"\n\"vektöre başlangıç elemanları eklemeyi destekler.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Vektörün elemanlarına erişmek için `[` `]` kullanırsınız, ancak sınırlar \"\n\"dışındaysa paniğe (panic) neden olurlar. Alternatif olarak, `get` kullanmak \"\n\"bir `Option` geri döndürür. `pop` fonksiyonu son elemanı siler.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\"HashDoS saldırılarına karşı korumalı standart özet haritası (hash map):\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Fadiş\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Dede Korkut Hikayeleri\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Aşk-ı Memnu\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"İnce Mehmed\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"{} kitap hakkında bilgimiz var, ama İnce Mehmed hakkında yok.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Keloğlan Masalları \\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} sayfa\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} bilinmiyor.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Eğer bir şey bulunmazsa bir değer eklemek için .entry() metodunu \"\n\"kullanın.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap`, başlangıç (prelude) kısmında tanımlı değildir ve kapsama (scope) \"\n\"alınması gerekir.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Aşağıdaki kod satırlarını deneyin. İlk satır bir kitabın hash haritasında \"\n\"olup olmadığına bakar ve yoksa alternatif bir değer geri döndürür. İkinci \"\n\"satır, kitap bulunmazsa alternatif değeri hash haritasına ekler.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Osmanlı Cadısı\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"Gri Gökyüzü \\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"`vec!`'in aksine, maalesef standart bir `hashmap!` makrosu yoktur.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Ancak, Rust 1.56'dan beri, HashMap [`From<[(K, V); N]>`](https://doc.rust-\"\n\"lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,+V);\"\n\"+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E) özelliğini (trait) \"\n\"gerçekleştirir (implement), bu da bir özet haritasını (hash map) bir \"\n\"değişmez (literal) diziden kolayca ilklendirmemize (initialize) olanak tanır:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` that yields key-value \"\n\"tuples.\"\nmsgstr \"\"\n\"Alternatif olarak HashMap, anahtar-değer (key-value) demetleri (tuple) \"\n\"üreten herhangi bir `Iterator`'dan oluşturulabilir.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"Bu tür, `std::collections::hash_map::Keys` gibi birkaç \\\"metoda özgü\\\" geri \"\n\"dönüş türüne sahiptir. Bu türler genellikle Rust belgelerindeki aramalarda \"\n\"görünür. Öğrencilere bu türün belgelerini ve `keys` metoduna geri dönen \"\n\"yardımcı bağlantıyı gösterin.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of what values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"Bu alıştırmada çok basit bir veri yapısı alıp onu genelleştirilmiş (generic) \"\n\"hale getireceksiniz. Hangi değerlerin görüldüğünü ve her birinin kaç kez \"\n\"göründüğünü takip etmek için bir [`std::collections::HashMap`](https://doc.\"\n\"rust-lang.org/stable/std/collections/struct.HashMap.html) kullanır.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hardcoded to only work for `u32` values. \"\n\"Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"`Counter`'ın ilk versiyonu sadece `u32` değerleri için çalışacak şekilde \"\n\"kodlanmıştır. Yapıyı ve metotlarını, izlenen değerin türü üzerinde \"\n\"genelleştirme (generic) yapın, bu şekilde `Counter` her tür değeri \"\n\"izleyebilir.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Eğer erken bitirirseniz, `count` metodunu gerçekleştirmek (implement) için \"\n\"gereken özet (hash) arama sayısını yarıya indirmek için [`entry`](https://\"\n\"doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry) \"\n\"metodunu kullanmayı deneyin.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"/// Counter, T türündeki her bir değerin kaç kez görüldüğünü sayar.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Yeni bir Counter oluştur.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Verilen değerin bir tekrarını say.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Verilen değerin kaç kez görüldüğünü geri döndür.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"{} değer {}`e eşit görüldü\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"elma\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"portakal\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"{} elma alındı\\\"\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From ve Into\"\n\n#: src/std-traits.md\nmsgid \"Read and Write\"\nmsgstr \"Read ve Write\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"Default, yapı güncelleme sözdizimi (struct update syntax)\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Standart kütüphane türlerinde olduğu gibi, her bir özellik (trait) için de \"\n\"dokümantasyonu gözden geçirmeye zaman ayırın.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"Bu bölüm uzun. Ortasında bir mola verin.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Bu özellikler (traits), değerler arasında karşılaştırmaları destekler. Tüm \"\n\"özellikler, bu özellikleri gerçekleştiren (implement) alanlar içeren türler \"\n\"için türetilebilir.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` ve `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq`, gerekli metot `eq` ve sağlanan metot `ne` ile kısmi bir denklik \"\n\"ilişkisidir. `==` ve `!=` operatörleri bu metotları çağırır.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` tam bir denklik ilişkisidir (yansımalı, simetrik ve geçişme) \"\n\"(reflexive, symmetric, and transitive) ve `PartialEq` özelliğini kapsar \"\n\"(imply). Tam denklik gerektiren fonksiyonlar, bir özellik sınırı (trait \"\n\"bound) olarak `Eq` kullanır.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` ve `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd`, `partial_cmp` metoduyla kısmi bir sıralama tanımlar. `<`, \"\n\"`<=`, `>=` ve `>` operatörlerini gerçekleştirmek (implement) için kullanılır.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord`, `cmp`'nin `Ordering` geri döndürdüğü tam bir sıralamadır.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` farklı türler arasında gerçekleştirilebilir (implement), ancak \"\n\"`Eq` yansımalı (reflexive) olduğu için gerçekleştirilemez:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"Pratikte bu özellikleri (traits) türetmek (derive) yaygındır, ancak onları \"\n\"gerçekleştirmek (implement) yaygın değildir.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"When comparing references in Rust, it will compare the value of the things \"\n\"pointed to, it will NOT compare the references themselves. That means that \"\n\"references to two different things can compare as equal if the values \"\n\"pointed to are the same:\"\nmsgstr \"\"\n\"Rust'ta referansları karşılaştırırken, gösterdikleri şeylerin değerini \"\n\"karşılaştırır, referansların kendilerini DEĞİL. Bu, gösterilen değerler \"\n\"aynıysa, iki farklı şeye yapılan referansların eşit olarak \"\n\"karşılaştırılabileceği anlamına gelir:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Operatör yüklemesi (overloading), [`std::ops`](https://doc.rust-lang.org/std/\"\n\"ops/index.html)'deki özellikler (traits) aracılığıyla gerçekleştirilir \"\n\"(implement):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\nmsgstr \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"Tartışma noktaları:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"`&Point` için `Add`'i gerçekleştirebilirsiniz (implement). Bu hangi \"\n\"durumlarda kullanışlıdır?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Cevap: `Add:add`, `self`'i tüketir. Operatörü yüklediğiniz `T` türü `Copy` \"\n\"değilse, operatörü `&T` için de yüklemey yapmayı (overloading) \"\n\"düşünmelisiniz. Bu, çağrı yerleride (call site) gereksiz klonlamayı önler.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"`Output` neden bir ilişkili türdür (associated type)? Metodun bir tür \"\n\"parametresi yapılabilir miydi?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Kısa cevap: Fonksiyon tür parametreleri çağıran (caller) tarafından kontrol \"\n\"edilir, ancak ilişkili türler (`Output` gibi) bir özelliğin (trait) \"\n\"gerçekleştiricisi (implementer) tarafından kontrol edilir.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"İki farklı tür için `Add` gerçekleştirebilirsiniz (implement), örn. `impl \"\n\"Add<(i32, i32)> for Point`, bu bir `Point`'e bir demet (tuple) eklerdi.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"The `Not` trait (`!` operator) is notable because it does not convert the \"\n\"argument to `bool` like the same operator in C-family languages; instead, \"\n\"for integer types it flips each bit of the number, which, arithmetically, is \"\n\"equivalent to subtracting the argument from `-1`: `!5 == -6`.\"\nmsgstr \"\"\n\"`Not` özelliği (`!` operatörü) dikkat çekicidir çünkü C dillerindeki aynı \"\n\"operatör gibi argümanı `bool`'a dönüştürmez; bunun yerine, tam sayı türleri \"\n\"için sayının her bitini tersine çevirir; bu da aritmetik olarak argümanı \"\n\"`-1`'den çıkarmaya eşdeğerdir: `!5 == -6`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions. Unlike `as`, these traits correspond to \"\n\"lossless, infallible conversions.\"\nmsgstr \"\"\n\"Türler, tür dönüşümlerini kolaylaştırmak için [`From`](https://doc.rust-lang.\"\n\"org/std/convert/trait.From.html) ve [`Into`](https://doc.rust-lang.org/std/\"\n\"convert/trait.Into.html) özelliklerini gerçekleştirir (implement). `as`'in \"\n\"aksine, bu özellikler (traits) kayıpsız, hatasız dönüşümlere karşılık gelir.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) \"\n\"gerçekleştirildiğinde (implement) [`Into`](https://doc.rust-lang.org/std/\"\n\"convert/trait.Into.html) otomatik olarak gerçekleştirilir:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Bu yüzden sadece `From`'u gerçekleştirmek (implement) yaygındır, çünkü \"\n\"türünüz `Into` gerçekleştirmesini de alacaktır.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"\\\"Bir `String`'e dönüştürülebilen herhangi bir şey\\\" gibi bir fonksiyon \"\n\"argümanı girdi türü bildirirken, kural tam tersidir, `Into` kullanmalısınız. \"\n\"Fonksiyonunuz `From`'u gerçekleştiren (implement) türleri ve _sadece_ \"\n\"`Into`'yu gerçekleştirenleri kabul edecektir.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust'ta _örtük (implicit)_ tür dönüşümleri yoktur, ancak `as` ile açık \"\n\"(explicit) tür dönüştürmelerini (casts) destekler. Bunlar genellikle \"\n\"tanımlandıkları yerlerde C semantiğini takip eder.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"u16 olarak: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"i16 olarak: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"u8 olarak: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"`as`'in sonuçları Rust'ta _her zaman_ tanımlıdır ve platformlar arasında \"\n\"tutarlıdır. Bu, işaret (sign) değiştirme veya daha küçük bir türe dönüştürme \"\n\"(cast) konusundaki sezginizle uyuşmayabilir -- belgeleri kontrol edin ve \"\n\"açıklık için yorum yapın.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"`as` ile dönüştürme (cast), yanlış kullanılması kolay olan nispeten keskin \"\n\"bir araçtır ve gelecekteki bakım çalışmaları (maintenance work) kullanılan \"\n\"türleri veya türlerdeki değer aralıklarını değiştirdikçe ince hataların \"\n\"kaynağı olabilir. Tür dnüştürmesi en iyi, niyetin koşulsuz olarak kesmeyi \"\n\"belirtmek olduğu durumlarda kullanılır (örneğin, yüksek bitlerde ne olursa \"\n\"olsun bir `u64`'ün alt 32 bitini `as u32` ile seçmek).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"Hatasız tür dönüştürmeleri (cast) için (örneğin `u32`'den `u64`'e), \"\n\"dönüşümün gerçekten hatasız olduğunu doğrulamak için `as` yerine `From` veya \"\n\"`Into` kullanmayı tercih edin. Hatalı olabilecek dönüştürmeler (cast) için, \"\n\"uyan ve uymayan dnüştürmeleri (cast) ele almak istediğinizde `TryFrom` ve \"\n\"`TryInto` mevcuttur.\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"Bu slayttan sonra bir mola vermeyi düşünün.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as`, C++'daki bir statik dönüştürmeye (static cast) benzer. Veri kaybı \"\n\"olabilecek durumlarda `as` kullanımı genellikle önerilmez veya en azından \"\n\"açıklayıcı bir yorumu hak eder.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Bu, tamsayıları bir indeks olarak kullanmak üzere `usize`'a dönüştürürken \"\n\"yaygındır.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) ve [`BufRead`]\"\n\"(https://doc.rust-lang.org/std/io/trait.BufRead.html) kullanarak, `u8` \"\n\"kaynakları üzerinde soyutlama yapabilirsiniz:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"dilimdeki (slice) satırlar: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"dosyadaki satırlar: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Benzer şekilde, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"`u8` alıcıları (sinks) üzerinde soyutlama yapmanızı sağlar:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {buffer:?}\\\"\"\nmsgstr \"\\\"Kaydedildi: {buffer:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"`Default` Özelliği (Trait)\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"trait produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"özelliği (trait), bir tür için varsayılan bir değer üretir.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"Evliya Çelebi\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y ayarlandı!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Doğrudan gerçekleştirilebilir (implement) veya `#[derive(Default)]` \"\n\"aracılığıyla türetilebilir.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"Türetilmiş bir gerçekleştirme (implementation), tüm alanların varsayılan \"\n\"değerlerine ayarlandığı bir değer üretecektir.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Bu, yapıdaki (struct) tüm türlerin de `Default`'u gerçekleştirmesi \"\n\"(implement) gerektiği anlamına gelir.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Standart Rust türleri genellikle `Default`'u makul değerlerle (ör. `0`, \"\n\"`\\\"\\\"`, vb.) gerçekleştirir (implement).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"\"\n\"Kısmi yapı ilklendirmesi (partial struct initialization), default özelliği \"\n\"ile güzel çalışır.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Rust standart kütüphanesi, türlerin `Default`'u gerçekleştirebileceğinin \"\n\"(implement) farkındadır ve onu kullanan kullanışlı metotlar sağlar.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"`..` sözdizimine [yapı güncelleme sözdizimi (struct update syntax)](https://\"\n\"doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-\"\n\"other-instances-with-struct-update-syntax) denir.\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"Bu örnekte, klasik [\\\"ROT13\\\" şifresini](https://en.wikipedia.org/wiki/\"\n\"ROT13) gerçekleştireceksiniz (implement). Bu kodu deneme alanına \"\n\"(playground) kopyalayın ve eksik kısımları gerçekleştirin. Sonucun hala \"\n\"geçerli UTF-8 olduğundan emin olmak için yalnızca ASCII alfabetik \"\n\"karakterleri döndürün.\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// `RotDecoder` için `Read` özelliğini (trait) gerçekleştirin.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"B gnensn ineznx tnlrfvlyr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"O tarafa varmak gayesiyle!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"Her biri 13 karakter kaydırma (ROT13) yapan iki adet RotDecoder örneğini \"\n\"ardı ardına (biri diğerinin çıktısını okuyarak) çalıştırırsan ne olur?\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"3. Gün'e Hoş Geldiniz\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"Bugün, şunları ele alacağız:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Bellek yönetimi, ömürler (lifetimes) ve ödünç alma denetleyicisi (borrow \"\n\"checker): Rust'ın bellek emniyetini (memory safety) nasıl sağladığı.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\"Akıllı göstericiler (Smart pointers): standart kütüphane gösterici türleri.\"\n\n#: src/welcome-day-3.md src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 20 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/memory-management.md\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"Programlar iki şekilde bellek tahsis eder (allocate):\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Yığın (Stack): Yerel değişkenler için sürekli olan bir bellek alanı.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\"Değerlerin derleme zamanında (compile time) bilinen sabit boyutları (fixed \"\n\"size) vardır.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\"Son derece hızlı: sadece bir yığın göstericisi (stack pointer) yeni bir \"\n\"değer alır.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\"Yönetimi kolay: fonksiyon çağrılarını izler (fonksiyon nereden çağrıldı \"\n\"bilgisinin kaydı).\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\"Mükemmel bellek yerelliği (memory locality) sağlar (önbellek durumları için).\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\"Dinamik Bellek (Heap): Fonksiyon çağrıları dışındaki değerlerin depolanması.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Bazı değerlerin çalışma zamanında belirlenen dinamik boyutları vardır.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some bookkeeping needed.\"\nmsgstr \"\"\n\"Yığından (stack) biraz daha yavaş: bazı yönetim işlemleri (bookkeeping) \"\n\"gerekir.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Bellek yerelliği garantisi yoktur.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Bir `String` oluşturmak, yığına (stack) sabit boyutlu üst veri (metadata) ve \"\n\"dinamik belleğe (heap) ise gerçek dizeyi (string) tutan dinamik boyutlu \"\n\"verileri koyar:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Bir `String`'in aslında bir `Vec` kullandığını, bu nedenle bir kapasitesi ve \"\n\"uzunluğu olduğunu ve değiştirilebilir (mutable) ise dinamik bellekte (heap) \"\n\"yeniden tahsis (reallocation) yoluyla büyüyebileceğini belirtin.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Öğrenciler sorarsa, temel belleğin (underlying memory) [Sistem Tahsis \"\n\"Edicisi (System Allocator)](https://doc.rust-lang.org/std/alloc/struct.\"\n\"System.html) kullanılarak dinamik bellekten (heap) tahsis edildiğini ve özel \"\n\"bellek tahsis edicilerin (custom allocators) [Tahsis Edici API'si (Allocator \"\n\"API)](https://doc.rust-lang.org/std/alloc/index.html) kullanılarak \"\n\"gerçekleştirilebileceğini belirtebilirsiniz.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Bellek düzenini (memory layout) `unsafe` Rust ile inceleyebiliriz. Ancak, \"\n\"bunun haklı olarak emniyetsiz (unsafe) olduğuna dikkat etmelisiniz!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"dünya\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// BUNU EVDE DENEMEYİN! Sadece eğitim amaçlıdır.\\n\"\n\"    // String, düzeni hakkında hiçbir garanti vermez, bu nedenle bu\\n\"\n\"    // tanımsız davranışa (undefined behavior) yol açabilir.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"kapasite = {capacity}, ptr = {ptr:#x}, uzunluk = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Geleneksel olarak, diller iki geniş kategoriye ayrılmıştır:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"Manuel bellek yönetimi ile tam kontrol: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\"Programcı, dinamik bellek (heap) tahsis etme (allocate) veya serbest bırakma \"\n\"(free) zamanına karar verir.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"Programcı, bir göstericinin (pointer) hala geçerli belleği gösterip \"\n\"göstermediğini belirlemelidir.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"Araştırmalar, programcıların hata yaptığını gösteriyor.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Çalışma zamanında (runtime) otomatik bellek yönetimi ile tam emniyet \"\n\"(safety): Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"Bir çalışma zamanı sistemi (runtime system), belleğin artık referans \"\n\"alınamayana kadar serbest bırakılmamasını sağlar.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Typically implemented with reference counting or garbage collection.\"\nmsgstr \"\"\n\"Genellikle referans sayımı (reference counting) veya çöp toplama (garbage \"\n\"collection) ile gerçekleştirilir.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust yeni bir karışım sunar:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Derleme zamanında (compile time) doğru bellek yönetiminin zorunlu kılınması \"\n\"yoluyla tam kontrol _ve_ emniyet (safety).\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Bunu, açık sahiplik (explicit ownership) kavramıyla yapar.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"Bu slaytın amacı, farklı programlama dillerinden gelen öğrencilerin Rust’ın \"\n\"nerede durduğunu kavramalarına yardımcı olmaktır.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C, dinamik belleği (heap) manuel olarak `malloc` ve `free` ile yönetir. \"\n\"Yaygın hatalar arasında `free` çağırmayı unutmak, aynı gösterici için birden \"\n\"çok kez `free` fonksiyonunu çağırmak veya gösterdiği bellek serbest \"\n\"bırakıldıktan (free) sonra bir göstericinin içeriğine erişmek \"\n\"(dereferencing) yer alır.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to misuse these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++, bir fonksiyon geri döndüğünde tahsis edilen belleğin serbest \"\n\"bırakılmasını sağlamak için yıkıcı özel üye fonksiyonlarını (destructors) \"\n\"çağırma konusundaki dil garantilerinden yararlanan akıllı göstericiler \"\n\"(`unique_ptr`, `shared_ptr`) gibi araçlara sahiptir. Bu araçları yanlış \"\n\"kullanmak ve C'ye benzer hatalar oluşturmak hala oldukça kolaydır.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java, Go ve Python, artık erişilemeyen belleği belirlemek ve atmak için çöp \"\n\"toplayıcıya (garbage collector) güvenir. Bu, herhangi bir göstericinin \"\n\"içeriğine erişilebileceğini (dereferenced) garanti eder, serbest bırakma \"\n\"sonrası kullanım (use-after-free) ve diğer hata sınıflarını ortadan \"\n\"kaldırır. Ancak, ÇT'nin (GC) bir çalışma zamanı (runtime cost) maliyeti \"\n\"vardır ve doğru bir şekilde ayarlamak zordur.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero-cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even crates available to support runtime garbage collection (not covered \"\n\"in this class).\"\nmsgstr \"\"\n\"Rust'ın sahiplik (ownership) ve ödünç alma (borrowing) modeli, birçok \"\n\"durumda, C'nin performansını, tam olarak gerekli oldukları yerde -sıfır \"\n\"maliyetle (zero cost)- tahsis (alloc) ve serbest bırakma (free) işlemleriyle \"\n\"elde edebilir. Ayrıca C++'nın akıllı göstericilerine (smart pointers) benzer \"\n\"araçlar da sağlar. Gerektiğinde, referans sayımı (reference counting) gibi \"\n\"diğer seçenekler de mevcuttur ve hatta çalışma zamanı çöp toplamayı (runtime \"\n\"garbage collection) desteklemek için mevcut olan kasalar (crates) bile \"\n\"vardır (bu derste ele alınmamaktadır).\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Tüm değişken bağlamalarının (variable bindings) geçerli oldukları bir \"\n\"_kapsamı (scope)_ vardır ve bir değişkeni kapsamı dışında kullanmak bir \"\n\"hatadır:\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"Değişkenin değeri _sahiplendiğini_ söyleriz. Her Rust değerinin her zaman \"\n\"tam olarak \\\"bir\\\" sahibi vardır.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"Kapsamın (scope) sonunda, değişken _düşürülür (dropped)_ ve veriler serbest \"\n\"bırakılır (free). Kaynakları serbest bırakmak için burada bir yıkıcı  \"\n\"(destructor) çalışabilir.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"Çöp toplama (garbage collection) gerçekleştirmelerine (implementations) \"\n\"aşina olan öğrenciler, bir çöp toplayıcının tüm erişilebilir belleği \"\n\"(reachable memory) bulmak için bir dizi \\\"kök (roots)\\\" ile başladığını \"\n\"bilirler. Rust'ın \\\"tek sahip (single owner)\\\" ilkesi benzer bir fikirdir.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\"Bir atama (assignment), değişkenler arasında _sahipliği (ownership)_ aktarır:\"\n\n#: src/memory-management/move.md src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Merhaba!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// dbg!(s1);\\n\"\nmsgstr \"// dbg!(s1);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"`s1`'in `s2`'ye atanması sahipliği (ownership) aktarır.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"`s1` kapsam (scope) dışına çıktığında hiçbir şey olmaz: hiçbir şeye sahip \"\n\"değildir.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\"`s2` kapsam (scope) dışına çıktığında, dize (string) verisi serbest \"\n\"bırakılır.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"`s2`'ye taşımadan (move) önce:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"`s2`'ye taşıdıktan (move) sonra:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Yığın (Stack)                     Dinamik Bellek (Heap)\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- - -.\\n\"\n\":                           :     :                                               :\\n\"\n\":    s1 \"\n\"\\\"(erişilemez)\\\"      :     :                                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+----\"\n\"+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| M  | e  | r  | h  | a  | b  | a  \"\n\"| !  |   :\\n\"\n\":   | len       |     8 |   :  |  :   +----+----+----+----+----+----+----\"\n\"+----+   :\\n\"\n\":   | capacity  |     8 |   :  \"\n\"|  :                                               :\\n\"\n\":   +-----------+-------+   :  \"\n\"|  :                                               :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - - - - \"\n\"- - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     8 |   :\\n\"\n\":   | capacity  |     8 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Bir değeri bir fonksiyona geçirdiğinizde, değer fonksiyon parametresine \"\n\"atanır. Bu, sahipliği (ownership) aktarır:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Merhaba {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Ayşe\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Bunun C++'daki varsayılanların tersi olduğunu belirtin; C++ `std::move` \"\n\"kullanmadığınız sürece (ve taşıyan yapıcı özel üye fonksiyonu (move \"\n\"constructor) tanımlanmışsa!) değere göre kopyalama yapar.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"Sadece sahiplik (ownership) taşınır. Verinin kendisini işlemek için herhangi \"\n\"bir makine kodunun üretilip üretilmediği bir optimizasyon meselesidir ve bu \"\n\"tür kopyalamalar agresif bir şekilde optimize edilerek kaldırılır.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"Basit değerler (tamsayılar gibi) `Copy` olarak işaretlenebilir (sonraki \"\n\"slaytları inceleyin).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"Rust'ta, klonlamalar (clones) açıktır (`clone` kullanarak).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"`say_hello` örneğinde:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"`say_hello`'ya yapılan ilk çağrıyla, `main` `name`'in sahipliğinden \"\n\"(ownership) vazgeçer. Daha sonra, `name` artık `main` içinde kullanılamaz.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"`name` için tahsis edilen dinamik bellek (heap), `say_hello` fonksiyonunun \"\n\"sonunda serbest bırakılacaktır.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main`, `name`'i referans olarak (`&name`) geçirirse ve `say_hello` \"\n\"parametresinde bir referans kabul ederse sahipliği elinde tutabilir.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Alternatif olarak, `main` ilk çağrıda `name`'in bir klonunu (`name.\"\n\"clone()`)geçirebilir.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust, taşıma (move) semantiğini varsayılan yaparak ve programcıları \"\n\"klonlamaları açık hale getirmeye zorlayarak, C++'a göre istemeden kopya \"\n\"oluşturmayı daha zor hale getirir.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Modern C++'da Savunmacı Kopyalar\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Modern C++ bunu farklı şekilde çözer:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// s1'deki veriyi çoğalt.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\"`s1`'den gelen dinamik bellek (heap) verisi kopyalanır ve `s2` kendi \"\n\"bağımsız kopyasını alır.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"`s1` ve `s2` kapsam (scope) dışına çıktığında, her biri kendi belleğini \"\n\"serbest bırakır.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"Kopyalayan atama'dan (copy-assignment) önce:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"Kopyalayan atamadan (copy-assignment) sonra:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++, Rust'tan biraz farklı bir seçim yapmıştır. `=` veriyi kopyaladığı için, \"\n\"dize (string) verisinin klonlanması gerekir. Aksi takdirde, herhangi bir \"\n\"dize kapsam dışına çıktığında çifte serbest bırakma (double-free) hatası \"\n\"alırdık.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ ayrıca bir değerin ne zaman taşınabileceğini belirtmek için kullanılan \"\n\"[`std::move`](https://en.cppreference.com/w/cpp/utility/move)'a sahiptir. \"\n\"Eğer örnek `s2 = std::move(s1)` olsaydı, hiçbir dinamik bellek (heap) \"\n\"tahsisi gerçekleşmezdi. Taşıma işleminden sonra, `s1` geçerli ancak belirsiz \"\n\"bir durumda olurdu. Rust'tan farklı olarak, programcının `s1`'i kullanmaya \"\n\"devam etmesine izin verilir.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"that is being copied or moved.\"\nmsgstr \"\"\n\"Rust'tan farklı olarak, C++'daki `=` kopyalanan veya taşınan türe göre \"\n\"belirlenen keyfi kodları çalıştırabilir.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"Bazen bir değerin bir kopyasını oluşturmak _istersiniz_. `Clone` özelliği \"\n\"(trait) bunu gerçekleştirir.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"`Clone` fikri, dinamik bellek (heap) tahsislerinin nerede meydana geldiğini \"\n\"kolayca tespit etmektir. `.clone()` ve `vec!` veya `Box::new` gibi birkaç \"\n\"diğerine bakın.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"Ödünç alma denetleyicisi (borrow checker) ile ilgili sorunlardan \"\n\"\\\"klonlayarak kurtulmak\\\" ve daha sonra bu klonları optimize etmeye çalışmak \"\n\"için geri dönmek yaygındır.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` genellikle değerin derin bir kopyasını (deep copy) gerçekleştirir, \"\n\"yani örneğin bir diziyi klonlarsanız, dizinin tüm elemanları da klonlanır.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"`clone`'un davranışı kullanıcı tanımlıdır, bu nedenle gerekirse özel \"\n\"klonlama mantığı gerçekleştirebilir.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Taşıma (move) semantiği varsayılan olsa da, belirli türler varsayılan olarak \"\n\"kopyalanır:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Bu türler `Copy` özelliğini (trait) gerçekleştirir.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\"Kendi türlerinizi kopya semantiğini (copy semantics) kullanacak şekilde \"\n\"seçebilirsiniz:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Atamadan sonra hem `p1` hem de `p2` kendi verilerine sahiptir.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"Veriyi açıkça kopyalamak için `p1.clone()` da kullanabiliriz.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Kopyalama (copying) ve klonlama (cloning) aynı şey değildir:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Kopyalama, bellek bölgelerinin bitsel kopyalarına atıfta bulunur ve keyfi \"\n\"nesneler üzerinde çalışmaz.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Kopyalama, özel mantığa izin vermez (C++'daki kopyalayan yapıcı özel üye \"\n\"fonksiyonlarının -copy constructors- aksine).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Klonlama daha genel bir işlemdir ve ayrıca `Clone` özelliğini (trait) \"\n\"gerçekleştirerek özel davranışlara da olanak tanır.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"`Drop` özelliğini (trait) gerçekleştiren türlerde kopyalama çalışmaz.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"Yukarıdaki örnekte, aşağıdakileri deneyin:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"`struct Point`'e bir `String` alanı ekleyin. `String` bir `Copy` türü \"\n\"olmadığı için derlenmeyecektir.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"`derive` özniteliğinden `Copy`'yi kaldırın. Derleyici hatası şimdi `p1` için \"\n\"`println!`'dedir.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Bunun yerine `p1`'i klonlarsanız çalıştığını gösterin.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because Rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\"Paylaşılan (shared) referanslar `Copy`/`Clone`'dur, değiştirilebilir \"\n\"(mutable) referanslar değildir. Bunun nedeni, Rust'ın değiştirilebilir \"\n\"referansların dışlayan (exclusive) olmasını gerektirmesidir, bu nedenle \"\n\"paylaşılan bir referansın kopyasını oluşturmak geçerli olsa da, \"\n\"değiştirilebilir bir referansın kopyasını oluşturmak Rust'ın ödünç alma \"\n\"(borrowing) kurallarını ihlal eder.\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"`Drop` Özelliği\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) özelliğini \"\n\"gerçekleştiren (implement) değerler, kapsam (scope) dışına çıktıklarında \"\n\"çalışacak kodu belirtebilirler:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"{} düşürülüyor\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting innermost block\\\"\"\nmsgstr \"\\\"En içteki bloktan çıkılıyor\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting next block\\\"\"\nmsgstr \"\\\"Sonraki bloktan çıkılıyor\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"main'den çıkılıyor\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\"`std::mem::drop`'un `std::ops::Drop::drop` ile aynı olmadığını unutmayın.\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"Değerler kapsam dışına çıktıklarında otomatik olarak düşürülür (drop).\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"Bir değer düşürüldüğünde, `std::ops::Drop`'u gerçekleştiriyorsa, `Drop::\"\n\"drop` gerçekleştirmesi çağrılır.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"`Drop`'u gerçekleştirip gerçekleştirmediğine bakılmaksızın tüm alanları da \"\n\"düşürülür.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` sadece herhangi bir değeri alan boş bir fonksiyondur. \"\n\"Önemi, değerin sahipliğini (ownership) almasıdır, bu yüzden kapsamının \"\n\"(scope) sonunda düşürülür (drop). Bu, değerleri normalde kapsam dışına \"\n\"çıkacaklarından daha erken bir zamanda açıkça düşürmenin uygun bir yoludur.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"Bu, `drop` üzerinde bir miktar iş yapan nesneler için yararlı olabilir: \"\n\"kilitleri bırakma, dosyaları kapatma vb.\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"`Drop::drop` neden `self` almaz?\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Kısa cevap: Eğer alsaydı, bloğun sonunda `std::mem::drop` çağrılır, bu da \"\n\"`Drop::drop`'a başka bir çağrıya ve bir yığın taşmasına (stack overflow) \"\n\"neden olurdu!\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"`drop(a)`'yı `a.drop()` ile değiştirmeyi deneyin.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"Bu örnekte, tüm verilerine sahip olan karmaşık bir veri türü \"\n\"gerçekleştireceğiz (implement). Yeni bir değeri parça parça, kolaylık \"\n\"sağlayan fonksiyonlar kullanarak oluşturmayı desteklemek için \\\"inşa edici \"\n\"desenini (builder pattern)\\\" kullanacağız.\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"Eksik parçaları doldurun.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// Bir yazılım paketinin bir temsili.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Bu paketin bir bağımlılık olarak bir temsilini, diğer paketleri\\n\"\n\"    /// inşa etmek (build) için döndürün.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// Bir Paket için bir inşa edici (builder). `Package`'ın kendisini \"\n\"oluşturmak için `build()` kullanın.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Paket sürümünü ayarlayın.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Paket yazarlarını ayarlayın.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Ek bir bağımlılık ekleyin.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Dili ayarlayın. Ayarlanmazsa, dil varsayılan olarak None olur.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"Box<T>\"\nmsgstr \"Box<T>\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html), dinamik bellek \"\n\"(heap) üzerindeki verilere sahip olunan (owned) bir göstericidir:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"beş: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>`, `Deref<Target = T>` özelliğini (trait) gerçekleştirir (implement), \"\n\"bu da [`T`'den metotları doğrudan bir `Box<T>` üzerinde çağırabileceğiniz]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion) \"\n\"anlamına gelir.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes cannot be stored \"\n\"inline without a pointer indirection. `Box` accomplishes that indirection:\"\nmsgstr \"\"\n\"Özyinelemeli (recursive) veri türleri veya dinamik boyutlara sahip veri \"\n\"türleri, bir gösterici dolaylılığı (pointer indirection) olmadan satır içi \"\n\"(inline) olarak saklanamaz. `Box` bu dolaylılığı sağlar:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// Boş olmayan bir liste: ilk eleman ve listenin geri kalanı.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// Boş bir liste.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Yığın (Stack)                   Dinamik Bellek (Heap)\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"liste                   :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Eleman  | 1  | o--+----+-----+--->| Eleman  | 2  | o--+--->| Yok  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box`, C++'daki `std::unique_ptr`'e benzer, ancak null olmaması garanti \"\n\"edilir.\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"Bir `Box` şu durumlarda yararlı olabilir:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size can't be known at compile time, but the Rust compiler \"\n\"wants to know an exact size.\"\nmsgstr \"\"\n\"boyutu derleme zamanında bilinemeyen bir türünüz varsa, ancak Rust \"\n\"derleyicisi tam bir boyut bilmek istiyorsa.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"büyük miktarda verinin sahipliğini (ownership) aktarmak istiyorsanız. Yığın \"\n\"(stack) üzerinde büyük miktarda veri kopyalamaktan kaçınmak için, bunun \"\n\"yerine veriyi dinamik bellekte (heap) bir `Box` içinde saklayın, böylece \"\n\"sadece gösterici taşınır.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"`Box` kullanılmasaydı ve bir `List`'i doğrudan `List`'e gömmeye çalışsaydık, \"\n\"derleyici bellekteki yapı (struct) için sabit bir boyut hesaplayamazdı \"\n\"(`List` sonsuz boyutta olurdu).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box`, normal bir göstericiyle aynı boyuta sahip olduğu ve dinamik \"\n\"bellekteki (heap) `List`'in bir sonraki elemanına işaret ettiği için bu \"\n\"sorunu çözer.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Liste tanımındaki `Box`'ı kaldırın ve derleyici hatasını gösterin. \"\n\"\\\"dolaylılık olmadan özyinelemeli (recursive without indirection)\\\" mesajını \"\n\"alırız, çünkü veri özyinelemesi için değeri doğrudan saklamak yerine \"\n\"dolaylılık, yani bir `Box` veya bir tür referans kullanmalıyız.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums (the \\\"niche optimization\\\").\"\nmsgstr \"\"\n\"`Box` C++'daki `std::unique_ptr`'e benzese de, boş/null olamaz. Bu, `Box`'ı \"\n\"derleyicinin bazı enumların depolanmasını optimize etmesine olanak tanıyan \"\n\"türlerden biri yapar (\\\"niş optimizasyonu\\\").\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) referans sayımlı \"\n\"(reference-counted) bir paylaşılan göstericidir. Aynı veriye birden çok \"\n\"yerden referans vermeniz gerektiğinde bunu kullanın:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"Each `Rc` points to the same shared data structure, containing strong and \"\n\"weak pointers and the value:\"\nmsgstr \"\"\n\"Her `Rc`, güçlü (strong) ve zayıf (weak) göstericileri ve değeri içeren aynı \"\n\"paylaşılan veri yapısına işaret eder:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Çok iş parçacıklı (multi-threaded) bir bağlamdaysanız [`Arc`](../concurrency/\"\n\"shared-state/arc.md) ve [`Mutex`](https://doc.rust-lang.org/std/sync/struct.\"\n\"Mutex.html)'e bakın.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Düşürülecek (drop) döngüler oluşturmak için paylaşılan bir göstericiyi bir \"\n\"[`Weak`](https://doc.rust-lang.org/std/rc/struct.Weak.html) göstericiye \"\n\"_düşürebilirsiniz (downgrade)_.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"`Rc`'nin sayımı, içerdiği değerin referanslar olduğu sürece geçerli olmasını \"\n\"sağlar.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Rust'taki `Rc`, C++'daki `std::shared_ptr`'e benzer.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` ucuzdur: aynı tahsise bir gösterici oluşturur ve referans \"\n\"sayısını artırır. Derin bir klon (deep clone) yapmaz ve genellikle koddaki \"\n\"performans sorunlarını ararken göz ardı edilebilir.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` aslında gerekirse iç değeri klonlar (\\\"yazmada-klonla / clone-on-\"\n\"write\\\") ve değiştirilebilir (mutable) bir referans döndürür.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Referans sayısını kontrol etmek için `Rc::strong_count` kullanın.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` size düzgün bir şekilde düşürülecek (drop) döngüler \"\n\"oluşturmak için _zayıf referans sayımlı (weakly reference-counted)_ bir \"\n\"nesne verir (muhtemelen `RefCell` ile kombinasyon halinde).\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\"Daha önce özellik nesnelerinin (trait objects) referanslarla nasıl \"\n\"kullanılabileceğini görmüştük, örn. `&dyn Pet`. Ancak, sahip olunan (owned) \"\n\"bir özellik nesnesi oluşturmak için `Box` gibi akıllı göstericilerle de \"\n\"özellik nesnelerini kullanabiliriz: `Box<dyn Pet>`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"`pets` tahsis edildikten sonraki bellek düzeni:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - \"\n\"- - - -.\\n\"\n\":                               :     :                                             :\\n\"\n\":    \\\"pets: Vec<Box<dyn Pet>>\\\"  :     :   \\\"data: Cat\\\"         +----+----\"\n\"+----+----+ :\\n\"\n\":   +-----------+-------+       :     :  +-------+-------+    | F  | i  | d  \"\n\"| o  | :\\n\"\n\":   | ptr       |   o---+-------+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |       :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |       :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+       :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                               :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                               :  |  :       |              +-------\"\n\"+--|-------+   :\\n\"\n\"`- - - - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, \"\n\"4, 4 |   :\\n\"\n\"                                   `--+-->| o o | o o-|----->| age   \"\n\"|        5 |   :\\n\"\n\"                                      :   +-|---+-|---+      +-------\"\n\"+----------+   :\\n\"\n\"                                      :     |     \"\n\"|                                 :\\n\"\n\"                                      `- - -| - - |- - - - - - - - - - - - - \"\n\"- - - -'\\n\"\n\"                                            |     |\\n\"\n\"                                            |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                      .- - -| - - |- - - - - - - - - - - - - \"\n\"- - - -.\\n\"\n\"                                      :     |     |       \"\n\"vtable                    :\\n\"\n\"                                      :     |     |      \"\n\"+----------------------+   :\\n\"\n\"                                      :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :     |            \"\n\"+----------------------+   :\\n\"\n\"                                      :     |             \"\n\"vtable                    :\\n\"\n\"                                      :     |            \"\n\"+----------------------+   :\\n\"\n\"                                      :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :                  \"\n\"+----------------------+   :\\n\"\n\"                                      :                                             :\\n\"\n\"                                      '- - - - - - - - - - - - - - - - - - - \"\n\"- - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - \"\n\"- - - -.\\n\"\n\":                               :     :                                             :\\n\"\n\":    \\\"pets: Vec<Box<dyn Pet>>\\\"  :     :   \\\"data: Cat\\\"         +----+----\"\n\"+----+----+ :\\n\"\n\":   +-----------+-------+       :     :  +-------+-------+    | F  | i  | d  \"\n\"| o  | :\\n\"\n\":   | ptr       |   o---+-------+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |       :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |       :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+       :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                               :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                               :  |  :       |              +-------\"\n\"+--|-------+   :\\n\"\n\"`- - - - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, \"\n\"4, 4 |   :\\n\"\n\"                                   `--+-->| o o | o o-|----->| age   \"\n\"|        5 |   :\\n\"\n\"                                      :   +-|---+-|---+      +-------\"\n\"+----------+   :\\n\"\n\"                                      :     |     \"\n\"|                                 :\\n\"\n\"                                      `- - -| - - |- - - - - - - - - - - - - \"\n\"- - - -'\\n\"\n\"                                            |     |\\n\"\n\"                                            |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                      .- - -| - - |- - - - - - - - - - - - - \"\n\"- - - -.\\n\"\n\"                                      :     |     |       \"\n\"vtable                    :\\n\"\n\"                                      :     |     |      \"\n\"+----------------------+   :\\n\"\n\"                                      :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :     |            \"\n\"+----------------------+   :\\n\"\n\"                                      :     |             \"\n\"vtable                    :\\n\"\n\"                                      :     |            \"\n\"+----------------------+   :\\n\"\n\"                                      :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                      :                  \"\n\"+----------------------+   :\\n\"\n\"                                      :                                             :\\n\"\n\"                                      '- - - - - - - - - - - - - - - - - - - \"\n\"- - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Belirli bir özelliği (trait) gerçekleştiren türler farklı boyutlarda \"\n\"olabilir. Bu, yukarıdaki örnekte `Vec<dyn Pet>` gibi şeylere sahip olmayı \"\n\"imkansız kılar.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet`, derleyiciye `Pet`'i gerçekleştiren dinamik boyutlu bir tür \"\n\"hakkında bilgi vermenin bir yoludur.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"Örnekte, `pets` yığın (stack) üzerinde tahsis edilir ve vektör verisi \"\n\"dinamik bellektedir (heap). İki vektör elemanı _genişletilmiş \"\n\"göstericilerdir (fat pointers)_:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"Genişletilmiş bir gösterici (fat pointer), çift genişlikli bir göstericidir. \"\n\"İki bileşeni vardır: gerçek nesneye bir gösterici ve o belirli nesnenin \"\n\"`Pet` gerçekleştirmesi için [sanal metot tablosuna (virtual method table)]\"\n\"(https://en.wikipedia.org/wiki/Virtual_method_table) (vtable) bir gösterici.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"Fido adındaki `Dog` için veri, `name` ve `age` alanlarıdır. `Cat`'in bir \"\n\"`lives` alanı vardır.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"Yukarıdaki örnekte bu çıktıları karşılaştırın:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/smart-pointers/trait-objects.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values. A \"\n\"given value should only be stored in the tree once, i.e. no duplicate nodes.\"\nmsgstr \"\"\n\"Bir ikili ağaç (binary tree), her düğümün (node) iki çocuğa (sol ve sağ) \"\n\"sahip olduğu bir ağaç türü veri yapısıdır. Her düğümün bir değer sakladığı \"\n\"bir ağaç oluşturacağız. Belirli bir N düğümü için, N'nin sol alt ağacındaki \"\n\"tüm düğümler daha küçük değerler içerir ve N'nin sağ alt ağacındaki tüm \"\n\"düğümler daha büyük değerler içerir. Belirli bir değer ağaçta yalnızca bir \"\n\"kez saklanmalıdır, yani aynı değere sahip düğümler olmamalıdır.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\"Aşağıdaki türleri gerçekleştirin (implement), böylece verilen testler geçer.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// İkili ağaçtaki (binary tree) bir düğüm.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// Muhtemelen boş bir alt ağaç.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// İkili ağaç (binary tree) kullanarak bir değerler kümesini saklayan bir \"\n\"kap.\\n\"\n\"///\\n\"\n\"/// Aynı değer birden çok kez eklenirse, yalnızca bir kez saklanır.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// `Subtree` için `new`, `insert`, `len` ve `has`'ı gerçekleştirin.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// benzersiz bir öğe değil\\n\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2024&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"We've already seen that a reference cannot _outlive_ the value it borrows:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"There's also a second main rule that the borrow checker enforces: The \"\n\"_aliasing_ rule. For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The \\\"outlives\\\" rule was demonstrated previously when we first looked at \"\n\"references. We review it here to show students that the borrow checking is \"\n\"following a few different rules to validate borrowing.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced. Try \"\n\"commenting out `*c = 20` and show that the compiler error still occurs even \"\n\"if we never use `c`.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the intermediate reference `c` isn't necessary to trigger a borrow \"\n\"conflict. Replace `c` with a direct mutation of `a` and demonstrate that \"\n\"this produces a similar error. This is because direct mutation of a value \"\n\"effectively creates a temporary mutable reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `dbg!` statement for `b` before the scope that introduces `c` to \"\n\"make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Technically, multiple mutable references to a piece of data can exist at the \"\n\"same time via re-borrowing. This is what allows you to pass a mutable \"\n\"reference into a function without invalidating the original reference. [This \"\n\"playground example](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=8f5896878611566845fe3b0f4dc5af68) \"\n\"demonstrates that behavior.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust uses the exclusive reference constraint to ensure that data races do \"\n\"not occur in multi-threaded code, since only one thread can have mutable \"\n\"access to a piece of data at a time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust also uses this constraint to optimize code. For example, a value behind \"\n\"a shared reference can be safely cached in a register for the lifetime of \"\n\"that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Fields of a struct can be borrowed independently of each other, but calling \"\n\"a method on a struct will borrow the whole struct, potentially invalidating \"\n\"references to individual fields. See [this playground snippet](https://play.\"\n\"rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=f293a31f2d4d0d31770486247c2e8437) \"\n\"for an example of this.\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and the next sub-slides present a few of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/cell.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value using only a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the inner value. Since there are no references, borrowing rules cannot be \"\n\"broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/cell.md\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/cell.md\nmsgid \"\"\n\"`Cell` is a simple means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"`RefCell` allows accessing and mutating a wrapped value by providing \"\n\"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without \"\n\"actually being Rust references.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"These types perform dynamic checks using a counter in the `RefCell` to \"\n\"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow \"\n\"calling methods on the inner value without allowing references to escape.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{cell:?}\\\"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"The extra block in the example is to end the borrow created by the call to \"\n\"`borrow_mut` before we print the cell. Trying to print a borrowed `RefCell` \"\n\"just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability/refcell.md\nmsgid \"\"\n\"There are also `OnceCell` and `OnceLock`, which allow initialization on \"\n\"first use. Making these useful requires some more knowledge than students \"\n\"have at this time.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes.md\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 1 saat 5 dakika sürmelidir. İçeriği:\"\n\n#: src/lifetimes/simple-borrows.md\nmsgid \"Borrowing with Functions\"\nmsgstr \"\"\n\n#: src/lifetimes/simple-borrows.md\nmsgid \"\"\n\"As part of borrow checking, the compiler needs to reason about how borrows \"\n\"flow into and out of functions. In the simplest case borrows last for the \"\n\"duration of the function call:\"\nmsgstr \"\"\n\n#: src/lifetimes/simple-borrows.md\nmsgid \"// Borrow `val` for the function call.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/simple-borrows.md\nmsgid \"// Borrow has ended and we're free to mutate.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/simple-borrows.md\nmsgid \"\"\n\"In this example we borrow `val` for the call to `borrows`. This would limit \"\n\"our ability to mutate `val`, but once the function call returns the borrow \"\n\"has ended and we're free to mutate again.\"\nmsgstr \"\"\n\n#: src/lifetimes/returning-borrows.md\nmsgid \"\"\n\"But we can also have our function return a reference! This means that a \"\n\"borrow flows back out of a function:\"\nmsgstr \"\"\n\n#: src/lifetimes/returning-borrows.md\nmsgid \"// x = 5; // 🛠️❌ `x` is still borrowed!\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/returning-borrows.md\nmsgid \"\"\n\"Rust functions can return references, meaning that a borrow can flow back \"\n\"out of a function.\"\nmsgstr \"\"\n\n#: src/lifetimes/returning-borrows.md\nmsgid \"\"\n\"If a function returns a reference (or another kind of borrow), it was likely \"\n\"derived from one of its arguments. This means that the return value of the \"\n\"function will extend the borrow for one or more argument borrows.\"\nmsgstr \"\"\n\n#: src/lifetimes/returning-borrows.md\nmsgid \"\"\n\"This case is still fairly simple, in that only one borrow is passed into the \"\n\"function, so the returned borrow has to be the same one.\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"But what about when there are multiple borrows passed into a function and \"\n\"one being returned?\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\\\"Return either `a` or `b`\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"// Which one is still borrowed?\\n\"\n\"    // Should either mutation be allowed?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"This code does not compile right now because it is missing lifetime \"\n\"annotations. Before we get it to compile, use this opportunity to have \"\n\"students to think about which of our argument borrows should be extended by \"\n\"the return value.\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"We pass two borrows into `multiple` and one is going to come back out, which \"\n\"means we will need to extend the borrow of one of the argument lifetimes. \"\n\"Which one should be extended? Do we need to see the body of `multiple` to \"\n\"figure this out?\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"When borrow checking, the compiler doesn't look at the body of `multiple` to \"\n\"reason about the borrows flowing out, instead it looks only at the signature \"\n\"of the function for borrow analysis.\"\nmsgstr \"\"\n\n#: src/lifetimes/multiple-borrows.md\nmsgid \"\"\n\"In this case there is not enough information to determine if `a` or `b` will \"\n\"be borrowed by the returned reference. Show students the compiler errors and \"\n\"introduce the lifetime syntax:\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"In this case, we have a function where either `a` or `b` may be returned. In \"\n\"this case we use the lifetime annotations to tell the compiler that both \"\n\"borrows may flow into the return value.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"// Which one is still borrowed?\\n\"\n\"    // Should either mutation be allowed?\\n\"\n\"    // a += 7;\\n\"\n\"    // b += 7;\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"The `pick` function will return either `a` or `b` depending on the value of \"\n\"`c`, which means we can't know at compile time which one will be returned.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"To express this to the compiler, we use the same lifetime for both `a` and \"\n\"`b`, along with the return type. This means that the returned reference will \"\n\"borrow BOTH `a` and `b`!\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"Uncomment both of the commented lines and show that `r` is borrowing both \"\n\"`a` and `b`, even though at runtime it will only point to one of them.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-both.md\nmsgid \"\"\n\"Change the first argument to `pick` to show that the result is the same \"\n\"regardless of if `a` or `b` is returned.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"In this example `find_nearest` takes in multiple borrows but returns only \"\n\"one of them. The lifetime annotations explicitly tie the returned borrow to \"\n\"the corresponding argument borrow.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"/// Searches `points` for the point closest to `query`.\\n\"\n\"/// Assumes there's at least one point in `points`.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"// query // What happens if we do this instead?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"// `query` isn't borrowed at this point.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"It may be helpful to collapse the definition of `find_nearest` to put more \"\n\"focus on the signature of the function. The actual logic in the function is \"\n\"somewhat complex and isn't important for the purpose of borrow analysis.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"When we call `find_nearest` the returned reference doesn't borrow `query`, \"\n\"and so we are free to drop it while `nearest` is still active.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"But what happens if we return the wrong borrow? Change the last line of \"\n\"`find_nearest` to return `query` instead. Show the compiler error to the \"\n\"students.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"The first thing we have to do is add a lifetime annotation to `query`. Show \"\n\"students that we can add a second lifetime `'b` to `find_nearest`.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"Show the new error to the students. The borrow checker verifies that the \"\n\"logic in the function body actually returns a reference with the correct \"\n\"lifetime, enforcing that the function adheres to the contract set by the \"\n\"function's signature.\"\nmsgstr \"\"\n\n#: src/lifetimes/borrow-one.md\nmsgid \"\"\n\"The \\\"help\\\" note in the error notes that we can add a lifetime bound `'b: \"\n\"'a` to say that `'b` will live at least as long as `'a`, which would then \"\n\"allow us to return `query`. On the next slide we'll talk about lifetime \"\n\"variance, which is the rule that allows us to return a longer lifetime when \"\n\"a shorter one is expected.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Fonksiyon Çağrılarında Ömürler\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Walk through applying the lifetime elision rules to each of the example \"\n\"functions. `only_args` is completed by the first rule, `identity` is \"\n\"completed by the second, and `Foo::get` is completed by the third.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If all lifetimes have not been filled in by applying the three elision rules \"\n\"then you will get a compiler error telling you to add annotations manually.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// drop(doc);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data. A struct cannot live longer than the data \"\n\"it references.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `doc` is dropped before the end of the lifetime of `noun` or `verb`, the \"\n\"borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"Messages\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream. These \"\n\"are combined into a single integer, as decoded in `unpack_tag` below.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"Varint\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"Wire Types\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Proto defines several wire types, only two of which are used in this \"\n\"exercise.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The `Varint` wire type contains a single varint, and is used to encode proto \"\n\"values of type `int32` such as `Person.id`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The `Len` wire type contains a length expressed as a varint, followed by a \"\n\"payload of that number of bytes. This is used to encode proto values of type \"\n\"`string` such as `Person.name`. It is also used to encode proto values \"\n\"containing sub-messages such as `Person.phones`, where the payload contains \"\n\"an encoding of the sub-message.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"The given code also defines callbacks to handle `Person` and `PhoneNumber` \"\n\"fields, and to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    // little-endian order containing a 64-bit signed integer or double \"\n\"type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float \"\n\"type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I32(i32),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md src/modules/exercise.md\n#: src/modules/solution.md src/testing/unit-tests.md src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"beautiful name\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Evan\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1234-777-9090\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"home\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// Put that all together into a single parse.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"maxwell\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1202-555-1212\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"+1800-867-5308\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"mobile\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// cast for simplicity\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"4. Gün'e Hoş Geldiniz\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"Testing.\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"Iterator Trait\"\nmsgstr \"Adımlayıcı Özelliği (Iterator Trait)\"\n\n#: src/iterators.md\nmsgid \"Iterator Helper Methods\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"collect\"\nmsgstr \"collect\"\n\n#: src/iterators.md\nmsgid \"IntoIterator\"\nmsgstr \"IntoIterator\"\n\n#: src/iterators/motivation.md\nmsgid \"Motivating Iterators\"\nmsgstr \"Adımlayıcılara (Iterators) Motive Edici Şeyler\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"If you want to iterate over the contents of an array, you'll need to define:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"Some state to keep track of where you are in the iteration process, e.g. an \"\n\"index.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"A condition to determine when iteration is done.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"Logic for updating the state of iteration each loop.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"Logic for fetching each element using that iteration state.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"In a C-style for loop you declare these things directly:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"In Rust we bundle this state and logic together into an object known as an \"\n\"\\\"iterator\\\".\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"This slide provides context for what Rust iterators do under the hood. We \"\n\"use the (hopefully) familiar construct of a C-style `for` loop to show how \"\n\"iteration requires some state and some logic, that way on the next slide we \"\n\"can show how an iterator bundles these together.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"Rust doesn't have a C-style `for` loop, but we can express the same thing \"\n\"with `while`:\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"There's another way to express array iteration using `for` in C and C++: You \"\n\"can use a pointer to the front and a pointer to the end of the array and \"\n\"then compare those pointers to determine when the loop should end.\"\nmsgstr \"\"\n\n#: src/iterators/motivation.md\nmsgid \"\"\n\"If students ask, you can point out that this is how Rust's slice and array \"\n\"iterators work under the hood (though implemented as a Rust iterator).\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait defines how an object can be used to produce a sequence of values. For \"\n\"example, if we wanted to create an iterator that can produce the elements of \"\n\"a slice it might look something like this:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `SliceIter` example implements the same logic as the C-style `for` loop \"\n\"demonstrated on the last slide.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"Point out to the students that iterators are lazy: Creating the iterator \"\n\"just initializes the struct but does not otherwise do any work. No work \"\n\"happens until the `next` method is called.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"Iterators don't need to be finite! It's entirely valid to have an iterator \"\n\"that will produce values forever. For example, a half open range like `0..` \"\n\"will keep going until integer overflow occurs.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The \\\"real\\\" version of `SliceIter` is the [`slice::Iter`](https://doc.rust-\"\n\"lang.org/stable/std/slice/struct.Iter.html) type in the standard library, \"\n\"however the real version uses pointers under the hood instead of an index in \"\n\"order to eliminate bounds checks.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `SliceIter` example is a good example of a struct that contains a \"\n\"reference and therefore uses lifetime annotations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"You can also demonstrate adding a generic parameter to `SliceIter` to allow \"\n\"it to work with any kind of slice (not just `&[i32]`).\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"In addition to the `next` method that defines how an iterator behaves, the \"\n\"`Iterator` trait provides 70+ helper methods that can be used to build \"\n\"customized iterators.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Create a range from 1 to 10\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Keep only even numbers\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Square each number\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"// Sum up all the squared numbers\\n\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\\\"The sum of squares of even numbers from 1 to 10 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Many of these helper methods take the original iterator and produce a new \"\n\"iterator with different behavior. These are know as \\\"iterator adapter \"\n\"methods\\\".\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Some methods, like `sum` and `count`, consume the iterator and pull all of \"\n\"the elements out of it.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"These methods are designed to be chained together so that it's easy to build \"\n\"a custom iterator that does exactly what you need.\"\nmsgstr \"\"\n\n#: src/iterators/helpers.md\nmsgid \"\"\n\"Rust's iterators are extremely efficient and highly optimizable. Even \"\n\"complex iterators made by combining many adapter methods will still result \"\n\"in code as efficient as equivalent imperative implementations.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"The [`collect`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html#method.collect) method lets you build a collection from an [`Iterator`]\"\n\"(https://doc.rust-lang.org/std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"Any iterator can be collected in to a `Vec`, `VecDeque`, or `HashSet`. \"\n\"Iterators that produce key-value pairs (i.e. a two-element tuple) can also \"\n\"be collected into `HashMap` and `BTreeMap`.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"Show the students the definition for `collect` in the standard library docs. \"\n\"There are two ways to specify the generic type `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"If students are curious about how this works, you can bring up the \"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"trait, which defines how each type of collection gets built from an iterator.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"In addition to the basic implementations of `FromIterator` for `Vec`, \"\n\"`HashMap`, etc., there are also more specialized implementations which let \"\n\"you do cool things like convert an `Iterator<Item = Result<V, E>>` into a \"\n\"`Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/collect.md\nmsgid \"\"\n\"The reason type annotations are often needed with `collect` is because it's \"\n\"generic over its return type. This makes it harder for the compiler to infer \"\n\"the correct type in a lot of cases.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and creating a \"\n\"`GridRefIter` that iterates by reference. A version with both `GridIter` and \"\n\"`GridRefIter` is available [in this playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=947e371c7295af758504f01f149023a1).\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells Rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"Visibility and Encapsulation\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Like with items in a module, struct fields are also private by default. \"\n\"Private fields are likewise visible within the rest of the module (including \"\n\"child modules). This allows us to encapsulate implementation details of \"\n\"struct, controlling what data and functionality is visible externally.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\\\"Is {} big? {}\\\"\"\nmsgstr \"\\\"{} büyük mü? {}\\\"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\\\"foo.val = {}\\\"\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"// let foo = Foo { val: 42, is_big: true };\\n\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"// println!(\\\"Is {} big? {}\\\", foo.val, foo.is_big);\\n\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"This slide demonstrates how privacy in structs is module-based. Students \"\n\"coming from object-oriented languages may be used to types being the \"\n\"encapsulation boundary, so this demonstrates how Rust behaves differently \"\n\"while showing how we can still achieve encapsulation.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Note how the `is_big` field is fully controlled by `Foo`, allowing `Foo` to \"\n\"control how it's initialized and enforce any invariants it needs to (e.g. \"\n\"that `is_big` is only `true` if `val > 100`).\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Point out how helper functions can be defined in the same module (including \"\n\"child modules) in order to get access to the type's private fields/methods.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"The first commented out line demonstrates that you cannot initialize a \"\n\"struct with private fields. The second one demonstrates that you also can't \"\n\"directly access private fields.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Enums do not support privacy: Variants and data within those variants is \"\n\"always public.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"If students want more information about privacy (or lack thereof) in enums, \"\n\"you can bring up `#[doc_hidden]` and `#[non_exhaustive]` and show how \"\n\"they're used to limit what can be done with an enum.\"\nmsgstr \"\"\n\n#: src/modules/encapsulation.md\nmsgid \"\"\n\"Module privacy still applies when there are `impl` blocks in other modules \"\n\"[(example in the playground)](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=3e61f43c88de12bcdf69c1d6df9ab3da).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Yollar (Paths)\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"Cargo Kurulumu (Setup)\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Rust and Cargo come with a simple unit test framework. Tests are marked with \"\n\"`#[test]`. Unit tests are often put in a nested `tests` module, using \"\n\"`#[cfg(test)]` to conditionally compile them only when building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Merhaba Dünya\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Entegrasyon Testleri\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Dokümantasyon Testleri\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"There are compiler lints visible here, but not clippy lints. Run `clippy` on \"\n\"the playground site to show clippy warnings. Clippy has extensive \"\n\"documentation of its lints, and adds new lints (including default-deny \"\n\"lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Ignore all spaces. Reject numbers with fewer than two digits. Reject letters \"\n\"and other non-digit characters.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: accept whitespace.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: reject all other characters.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// New: check that we have at least two digits\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"Error Trait\"\nmsgstr \"Error Özelliği (Trait)\"\n\n#: src/error-handling.md\nmsgid \"thiserror\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"anyhow\"\nmsgstr \"\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"In case of a fatal runtime error, Rust triggers a \\\"panic\\\":\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"I/O error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Dinamik Hata Türleri\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) crate provides macros to help \"\n\"avoid boilerplate when defining error types. It provides derive macros that \"\n\"assist in implementing `From<T>`, `Display`, and the `Error` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\\\"I/O error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"Note that the (`thiserror::`)`Error` derive macro, while it has the effect \"\n\"of implementing the (`std::error::`)`Error` trait, is not the same this; \"\n\"traits and macros do not share a namespace.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type \"\n\"with support for carrying additional contextual information, which can be \"\n\"used to provide a semantic trace of what the program was doing leading up to \"\n\"the error.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"This can be combined with the convenience macros from [`thiserror`](https://\"\n\"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom \"\n\"error types.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Error` may be familiar to Go developers, \"\n\"as it provides similar behavior to the Go `error` type and `Result<T, \"\n\"anyhow::Error>` is much like a Go `(T, error)` (with the convention that \"\n\"only one element of the pair is meaningful).\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the \"\n\"specific error type stored inside can be extracted for examination if \"\n\"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct.\"\n\"Error.html#method.downcast).\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"In this exercise we're revisiting the expression evaluator exercise that we \"\n\"did in day 2. Our initial solution ignores a possible error case: Dividing \"\n\"by zero! Rewrite `eval` to instead use idiomatic error handling to handle \"\n\"this error case and return an error when it occurs. We provide a simple \"\n\"`DivideByZeroError` type to use as the error type for `eval`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"// The original implementation of the expression evaluator. Update this to\\n\"\n\"// return a `Result` and produce an error when dividing by 0.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Cannot divide by zero!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The starting code here isn't exactly the same as the previous exercise's \"\n\"solution: We've added in an explicit panic to show students where the error \"\n\"case is. Point this out if students get confused.\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 15 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 1 saat 15 dakika sürmelidir. İçeriği:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: p1 and p2 were created by taking raw pointers to a local, so \"\n\"they\\n\"\n\"    // are guaranteed to be non-null, aligned, and point into a single \"\n\"(stack-)\\n\"\n\"    // allocated object.\\n\"\n\"    //\\n\"\n\"    // The object underlying the raw pointers lives for the entire function, \"\n\"so\\n\"\n\"    // it is not deallocated while the raw pointers still exist. It is not\\n\"\n\"    // accessed through references while the raw pointers exist, nor is it\\n\"\n\"    // accessed from other threads concurrently.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// Mutation may soundly be observed through a raw pointer, like in C.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// UNSOUND. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r: &i32 = unsafe { &*p1 };\\n\"\n\"    dbg!(r);\\n\"\n\"    x = 50;\\n\"\n\"    dbg!(r); // Object underlying the reference has been mutated. This is \"\n\"UB.\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"UNSOUND\\\" section gives an example of a common kind of UB bug: naïvely \"\n\"taking a reference to the dereference of a raw pointer sidesteps the \"\n\"compiler's knowledge of what object the reference is actually pointing to. \"\n\"As such, the borrow checker does not freeze `x` and so we are able to modify \"\n\"it despite the existence of a reference to it. Creating a reference from a \"\n\"pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"Merhaba, dünya!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, mutable static variables are unsafe to read and write because \"\n\"multiple threads could do so concurrently without synchronization, \"\n\"constituting a data race.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using mutable statics soundly requires reasoning about concurrency without \"\n\"the compiler's help:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is sound because it is single-threaded. However, the Rust \"\n\"compiler reasons about functions individually so can't assume that. Try \"\n\"removing the `unsafe` and see how the compiler explains that it is undefined \"\n\"behavior to access a mutable static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The 2024 Rust edition goes further and makes accessing a mutable static by \"\n\"reference an error by default.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is almost always a bad idea, you should use interior \"\n\"mutability instead.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"There are some cases where it might be necessary in low-level `no_std` code, \"\n\"such as implementing a heap allocator or working with some C APIs. In this \"\n\"case you should use pointers rather than references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// Undefined behavior!\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe functions may come from two places:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Rust functions declared unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe foreign functions in `extern \\\"C\\\"` blocks.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"We will look at the two kinds of unsafe functions next.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"preconditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid, properly aligned, and not otherwise accessed \"\n\"for\\n\"\n\"/// the duration of the function call.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"// SAFETY: Our caller promised that the pointers are valid, properly \"\n\"aligned\\n\"\n\"    // and have no other access.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"// SAFETY: The pointers must be valid, aligned and unique because they came\\n\"\n\"    // from references.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function --- it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/rust.md\nmsgid \"\"\n\"Note that Rust 2021 and earlier allow unsafe code within an unsafe function \"\n\"without an `unsafe` block. This changed in the 2024 edition. We can prohibit \"\n\"it in older editions with `#[deny(unsafe_op_in_unsafe_fn)]`. Try adding it \"\n\"and see what happens.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"You can declare foreign functions for access from Rust with `unsafe extern`. \"\n\"This is unsafe because the compiler has to way to reason about their \"\n\"behavior. Functions declared in an `extern` block must be marked as `safe` \"\n\"or `unsafe`, depending on whether they have preconditions for safe use:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust-library.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md\n#: src/bare-metal/aps/logging/using.md\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"// `abs` doesn't deal with pointers and doesn't have any safety \"\n\"requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"/// # Safety\\n\"\n\"    ///\\n\"\n\"    /// `s` must be a pointer to a NUL-terminated C string which is valid \"\n\"and\\n\"\n\"    /// not modified for the duration of this function call.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"// SAFETY: We pass a pointer to a C string literal which is valid for\\n\"\n\"        // the duration of the program.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\\\"String length: {}\\\"\"\nmsgstr \"\\\"Dize uzunluğu: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\\\"String\\\"\"\nmsgstr \"\\\"String\\\"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"Rust used to consider all extern functions unsafe, but this changed in Rust \"\n\"1.82 with `unsafe extern` blocks.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"`abs` must be explicitly marked as `safe` because it is an external function \"\n\"(FFI). Calling external functions is usually only a problem when those \"\n\"functions do things with pointers which might violate Rust's memory model, \"\n\"but in general any C function might have undefined behaviour under any \"\n\"arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/extern-c.md\nmsgid \"\"\n\"Note that there is no verification that the Rust function signature matches \"\n\"that of the function definition -- that's up to you!\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"Failing to uphold the safety requirements breaks memory safety!\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"// 8 bytes\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\\\"{pk:?}\\\"\"\nmsgstr \"\\\"{pk:?}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"Always include a safety comment for each `unsafe` block. It must explain why \"\n\"the code is actually safe. This example is missing a safety comment and is \"\n\"unsound.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"The second argument to `slice::from_raw_parts` is the number of _elements_, \"\n\"not bytes! This example demonstrates unexpected behavior by reading past the \"\n\"end of one array and into another.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"This is undefined behavior because we're reading past the end of the array \"\n\"that the pointer was derived from.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"`log_public_key` should be unsafe, because `pk_ptr` must meet certain \"\n\"prerequisites to avoid undefined behaviour. A safe function which can cause \"\n\"undefined behaviour is said to be `unsound`. What should its safety \"\n\"documentation say?\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"The standard library contains many low-level unsafe functions. Prefer the \"\n\"safe alternatives when possible!\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions/calling.md\nmsgid \"\"\n\"If you use an unsafe function as an optimization, make sure to add a \"\n\"benchmark to demonstrate the gain.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Emniyetsiz Özelliklerin (Unsafe Traits) Gerçekleştirilmesi\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `IntoBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Emniyetli FFI Sarıcı (Wrapper)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\"// TODO: uyarlamanız (implementation) bittiğinde bu yorum satırını silin.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"FFI binding code is typically generated by tools like [bindgen](https://\"\n\"github.com/rust-lang/rust-bindgen), rather than being written manually as we \"\n\"are doing here. However, bindgen can't run in an online playground.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {path:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call closedir as needed.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html).\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The code on the following pages can be found in the [`src/android/` \"\n\"directory](https://github.com/google/comprehensive-rust/tree/main/src/\"\n\"android) of the course material. Please `git clone` the repository to follow \"\n\"along.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust through several modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items the speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repositories, and also downloads \"\n\"packages from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interoperate with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to [Bazel](https://bazel.build/), which is the \"\n\"open-source variant of Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let's start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Rust dilinden merhaba!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"\"\n\"Go through the build steps and demonstrate them running in your emulator.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Notice the extensive documentation comments? The Android build rules enforce \"\n\"that all modules have documentation. Try removing it and see what error you \"\n\"get.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Stress that the Rust build rules look like the other Soong rules. This is by \"\n\"design, to make using Rust as easy as C++ or Java.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/android-\"\n\"crates-io/crates/`](https://cs.android.com/android/platform/superproject/\"\n\"main/+/main:external/rust/android-crates-io/crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"A Rust crate named `greetings` must be built by a rule called \"\n\"`libgreetings`. Note how the Rust code uses the crate name, as is normal in \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"Again, the build rules enforce that we add documentation comments to all \"\n\"public items.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"Rust supports the [Android Interface Definition Language (AIDL)](https://\"\n\"developer.android.com/guide/components/aidl):\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"AIDL enables Android apps to interact with each other.\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"Since Rust is a first-class citizen in this ecosystem, other processes on \"\n\"the device can call Rust services.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate using Rust with Binder, we will create a Binder interface. \"\n\"Then, we'll implement the service and write a client that talks to it.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Binder generates a trait for each interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_out/soong/.intermediates/.../com_example_birthdayservice.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond to the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Note that `wishHappyBirthday` and other AIDL IPC methods take `&self` \"\n\"(instead of `&mut self`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"This is necessary because Binder responds to incoming requests on a thread \"\n\"pool, allowing for multiple requests to be processed in parallel. This \"\n\"requires that the service methods only get a shared reference to `self`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Any state that needs to be modified by the service will have to be put in \"\n\"something like a `Mutex` to allow for safe mutation.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"The correct approach for managing service state depends heavily on the \"\n\"details of your service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where is the source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case, \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps. This may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in the corresponding `Bn*` type (`BnBirthdayService` \"\n\"in this case). This type is generated by Binder and provides common Binder \"\n\"functionality, similar to the `BnBinder` base class in C++. Since Rust \"\n\"doesn't have inheritance, we use composition, putting our `BirthdayService` \"\n\"within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let's extend the API: we'll let clients specify a list of lines for the \"\n\"birthday card:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"AIDL Türü\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Rust Türü\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) are translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"`int[3][4]`). In the Java backend, fixed-size arrays are represented as \"\n\"array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"Android'de Test Etme\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/run-our-binary.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libgoogletest_example\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"googletest_example\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"googletest.rs\\\"\"\nmsgstr \"\\\"googletest.rs\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libgoogletest_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libmockall_example\\\"\"\nmsgstr \"\\\"libmockall_example\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"mockall_example\\\"\"\nmsgstr \"\\\"mockall_example\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"mockall.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libmockall\\\"\"\nmsgstr \"\\\"libmockall\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://rust-exercises.com/advanced-testing/), a self-guided \"\n\"Rust course: it provides a guided introduction to the library, with \"\n\"exercises to help you get comfortable with `googletest` macros, its matchers \"\n\"and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/run-our-binary.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"The logger implementation in `liblogger` is only needed in the final binary, \"\n\"if you're logging from a library you only need the `log` facade crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language, you're using a _foreign \"\n\"function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"This is a key ability of Rust: compiled code becomes indistinguishable from \"\n\"compiled C or C++ code.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Technically, we say that Rust can be compiled to the same [ABI](https://en.\"\n\"wikipedia.org/wiki/Application_binary_interface) (application binary \"\n\"interface) as C code.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/\"\n\"exercise.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"The [`\\\"C\\\"` part](https://doc.rust-lang.org/reference/items/external-blocks.\"\n\"html#abi) of the `extern` block tells Rust that `abs` can be called using \"\n\"the C [ABI](https://en.wikipedia.org/wiki/Application_binary_interface) \"\n\"(application binary interface).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"The `safe fn abs` part tells Rust that `abs` is a safe function. By default, \"\n\"extern functions are unsafe, but since `abs(x)` can't trigger undefined \"\n\"behavior with any `x`, we can declare it safe.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"Let's first create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\n#: src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/c-library.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The Android build rules will automatically call `bindgen` for you behind the \"\n\"scenes.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Notice that the Rust code in `main` is still hard to write. It is good \"\n\"practice to encapsulate the output of `bindgen` in a Rust library which \"\n\"exposes a safe interface to caller.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/run-our-binary.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\"\n\"Exporting Rust functions and types to C is easy. Here's a simple Rust \"\n\"library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\"\n\"/// Analyze the numbers.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust-library.md\nmsgid \"\"\n\"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported \"\n\"symbol will just be the name of the function. You can also use \"\n\"`#[unsafe(export_name = \\\"some_name\\\")]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) enables safe interoperability between Rust \"\n\"and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"// Free function\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Oluşturulan (Generated) Rust:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"C++ Türü\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"Android'de İnşa Etme (Build)\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"/// HelloWorld::hello method implementation.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Merhaba, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"The `unsafe(no_mangle)` attribute instructs Rust to emit the \"\n\"`Java_HelloWorld_hello` symbol exactly as written. This is important so that \"\n\"Java can recognize the symbol as a `hello` method on the `HelloWorld` class.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"By default, Rust will mangle (rename) symbols so that a binary can link in \"\n\"two versions of the same Rust crate.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Chromium'daki Rust'a Hoş Geldiniz\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF-8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"Alıştırmalar hakkında\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises that build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"Küçük bir alıştırma\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich type \"\n\"system) and running faster (as a compiled, rather than interpreted language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's Rust policy can be found [here](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:docs/rust.md;l=22). Rust can be used for both \"\n\"first-party and third-party code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Using Rust for pure first-party code looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - -.\\n\"\n\":                   :           :                     :\\n\"\n\": Existing Chromium :           :  Chromium Rust      :\\n\"\n\": \\\"C++\\\"             :           :  code               :\\n\"\n\": +---------------+ :           : +----------------+  :\\n\"\n\": |               | :           : |                |  :\\n\"\n\": |         o-----+-+-----------+-+->              |  :\\n\"\n\": |               | : Language  : |                |  :\\n\"\n\": +---------------+ : boundary  : +----------------+  :\\n\"\n\":                   :           :                     :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"The third-party case is also common. It's likely that you'll also need a \"\n\"small amount of first-party glue code, because very few Rust libraries \"\n\"directly expose a C/C++ API.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"The scenario of using a third-party crate is the more complex one, so \"\n\"today's course will focus on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Writing glue code to be able to use those crates from Chromium C++. (The \"\n\"same techniques are used when working with first-party Rust code).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"İnşa (Build) Kuralları\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"İnşa (build) kuralları alıştırması\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md\n#: src/bare-metal/aps/logging/using.md\nmsgid \"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important:** note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/\"\n\"reference/abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might \"\n\"allow Rust to generate two functions with the same name, and Rust can no \"\n\"longer guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need memory-safe implementations of \"\n\"pixel transformations that are provided by `libpng` but missing in the `png` \"\n\"crate - e.g. RGBA => BGRA, or gamma correction. Such functionality may \"\n\"benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Örnek:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF-8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception:** It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Alıştırma: C++ ile Birlikte Çalışabilirlik\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[unsafe(no_mangle)]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"İnşa et (Build) ve çalıştır!\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"C++ kütüphanesi\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important:** you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF-16 vs UTF-8. Students should be aware that Rust strings are always \"\n\"UTF-8, and will probably decide that it's better to do the conversion on the \"\n\"C++ side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Or, if you'd prefer \\\"standalone\\\" solutions that don't require applying \"\n\"patchsets or integration with core Chromium code, you can find them in the \"\n\"[`//chromium/src/codelabs/rust` subdirectory in Chromium](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:codelabs/rust/).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"You should see \\\"NXP ARM mbed\\\" in the output of `lsusb` if the device is \"\n\"available. If you are using a Linux environment on a Chromebook, you will \"\n\"need to share the USB device with Linux, via `chrome://os-settings/crostini/\"\n\"sharedUsbDevices`.\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a crate implementing a basic buddy system \"\n\"allocator. Other crates are available, or you can write your own or hook \"\n\"into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors that describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organized by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects that \"\n\"patch the mistakes, add missing details, and publish the generated crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialization.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct, nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can't use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state it is in: e.g., in this case, the \"\n\"configuration state of a GPIO pin. This encodes the state machine into the \"\n\"type system and ensures that you don't try to use a pin in a certain way \"\n\"without properly configuring it first. Illegal state transitions are caught \"\n\"at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs are broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initializing or configuring \"\n\"them, as initialization and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library that you can integrate into your own tools if you want \"\n\"to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ring buffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\".\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"These are typically small systems with very limited resources.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Larger systems with more resources are typically called application \"\n\"processors, built around processors such as the ARM Cortex-A or Intel Atom.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"For simplicity we'll just work with QEMU's aarch64 ['virt'](https://qemu-\"\n\"project.gitlab.io/qemu/system/arm/virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86).\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Application processors have more resources, and often run an operating \"\n\"system, instead of directly executing the target application on startup.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"We will still address this board as bare-metal, as if we were writing an \"\n\"operating system.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialization.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\"/**\\n\"\n\" * This is a generic entry point for an image. It carries out the\\n\"\n\" * operations required to prepare the loaded image to be run.\\n\"\n\" * Specifically, it\\n\"\n\" *\\n\"\n\" * - sets up the MMU with an identity map of virtual to physical\\n\"\n\" *   addresses, and enables caching\\n\"\n\" * - enables floating point\\n\"\n\" * - zeroes the bss section using registers x25 and above\\n\"\n\" * - prepares the stack, pointing to a section within the image\\n\"\n\" * - sets up the exception vector\\n\"\n\" * - branches to the Rust `main` function\\n\"\n\" *\\n\"\n\" * It preserves x0-x3 for the Rust entry point, as these may contain\\n\"\n\" * boot parameters.\\n\"\n\" */\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to\\n\"\n\"     * enable MMU and caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then\\n\"\n\"     * invalidate any potentially stale local TLB entries before they\\n\"\n\"     * start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed\\n\"\n\"     * until this has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This code is in `src/bare-metal/aps/examples/src/entry.S`. It's not \"\n\"necessary to understand this in detail -- the takeaway is that typically \"\n\"some low-level setup is needed to meet Rust's expectations of the system.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initializing the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file that contains statically allocated variables that are \"\n\"initialized to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialized and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target that sets `+strict-align` to prevent the compiler from \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) that \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level, you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialize the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \\\"C\\\"` \"\n\"because it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Just `#[no_mangle]` would be sufficient but [RFC3325](https://rust-lang.\"\n\"github.io/rfcs/3325-unsafe-attributes.html) uses this notation to draw \"\n\"reviewer attention to attributes that might cause undefined behavior if used \"\n\"incorrectly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/\"\n\"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]\"\n\"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.\"\n\"write_volatile).\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Never hold a reference to a location being accessed with these methods. Rust \"\n\"may read from (or write to, for `&mut`) a reference at any time.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use `&raw` to get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"// SAFETY: Some device is mapped at this address.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exists, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `&raw` to get struct field pointers from a pointer to the struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"For compatibility with old versions of Rust you can use the [`addr_of!`]\"\n\"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"`Send` is an auto-trait, but not implemented automatically because it is not \"\n\"implemented for pointers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md\n#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md\n#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md src/bare-metal/aps/safemmio/using.md\n#: src/bare-metal/aps/logging/using.md src/bare-metal/aps/aarch64-rt.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Additionally, some of them are bit fields, which would be nice to \"\n\"access in a structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers that have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `struct Flags(u16)`, \"\n\"along with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device with \"\n\"the\\n\"\n\"    /// given set of registers.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given pointer must point to the 8 MMIO control registers of a \"\n\"PL011\\n\"\n\"    /// device, which must be mapped into the address space of the process \"\n\"as\\n\"\n\"    /// device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `&raw const` / `&raw mut` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"The example isn't included in the slides because it is very similar to the \"\n\"`safe-mmio` example which comes next. You can run it in QEMU with `make \"\n\"qemu` under `src/bare-metal/aps/examples` if you need to.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"The [`safe-mmio`](https://crates.io/crates/safe-mmio) crate provides types \"\n\"to wrap registers that can be read or written safely.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Can't read\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Read has no side-effects\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Read has side-effects\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Can't write\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"[`ReadPure`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct.\"\n\"ReadPure.html)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"[`ReadOnly`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct.\"\n\"ReadOnly.html)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Can write\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"[`WriteOnly`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct.\"\n\"WriteOnly.html)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"[`ReadPureWrite`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct.\"\n\"ReadPureWrite.html)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"[`ReadWrite`](https://docs.rs/safe-mmio/latest/safe_mmio/fields/struct.\"\n\"ReadWrite.html)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"Reading `dr` has a side effect: it pops a byte from the receive FIFO.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"Reading `rsr` (and other registers) has no side-effects. It is a 'pure' read.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"There are a number of different crates providing safe abstractions around \"\n\"MMIO operations; we recommend the `safe-mmio` crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/registers.md\nmsgid \"\"\n\"The difference between `ReadPure` or `ReadOnly` (and likewise between \"\n\"`ReadPureWrite` and `ReadWrite`) is whether reading a register can have side-\"\n\"effects that change the state of the device, e.g., reading the data register \"\n\"pops a byte from the receive FIFO. `ReadPure` means that reads have no side-\"\n\"effects, they are purely reading data.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device with \"\n\"the\\n\"\n\"    /// given set of registers.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"The driver no longer needs any unsafe code!\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"`UniqueMmioPointer` is a wrapper around a raw pointer to an MMIO device or \"\n\"register. The caller of `UniqueMmioPointer::new` promises that it is valid \"\n\"and unique for the given lifetime, so it can provide safe methods to read \"\n\"and write fields.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"Note that `Uart::new` is now safe; `UniqueMmioPointer::new` is unsafe \"\n\"instead.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"These MMIO accesses are generally a wrapper around `read_volatile` and \"\n\"`write_volatile`, though on aarch64 they are instead implemented in assembly \"\n\"to work around a bug where the compiler can emit instructions that prevent \"\n\"MMIO virtualization.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"The `field!` and `field_shared!` macros internally use `&raw mut` and `&raw \"\n\"const` to get pointers to individual fields without creating an intermediate \"\n\"reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"`field!` needs a mutable reference to a `UniqueMmioPointer`, and returns a \"\n\"`UniqueMmioPointer` that allows reads with side effects and writes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/driver.md\nmsgid \"\"\n\"`field_shared!` works with a shared reference to either a \"\n\"`UniqueMmioPointer` or a `SharedMmioPointer`. It returns a \"\n\"`SharedMmioPointer` that only allows pure reads.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\nmsgid \"\\\"\\\\n\\\\nBye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/safemmio/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_safemmio` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The first unwrap in `log` will succeed because we initialize `LOGGER` before \"\n\"calling `set_logger`. The second will succeed because `Uart::write_str` \"\n\"always returns `Ok`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\nmsgid \"\"\n\"The `aarch64-rt` crate provides the assembly entry point and exception \"\n\"vector that we implemented before. We just need to mark our main function \"\n\"with the `entry!` macro.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\nmsgid \"\"\n\"It also provides the `initial_pagetable!` macro to let us define an initial \"\n\"static pagetable in Rust, rather than in assembly code like we did before.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\nmsgid \"\"\n\"We can also use the UART driver from the `arm-pl011-uart` crate rather than \"\n\"writing our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Attributes to use for device memory in the initial identity map.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Attributes to use for normal memory in the initial identity map.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// 1 GiB of device memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// 1 GiB of normal memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Another 1 GiB of device memory starting at 256 GiB.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"system_off returned\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/aarch64-rt.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_rt` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\".\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialization, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some caveats around cache maintenance and initialization in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However, this has \"\n\"the problems mentioned at the beginning of this session regarding unaligned \"\n\"access and cache coherency.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Kullanışlı kasalar (crates)\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll look at a few crates that solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/main/+/main:packages/modules/\"\n\"Virtualization/guest/pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example by itself, as it needs to run on \"\n\"real hardware or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a crate that implements a basic buddy system allocator. It can be used \"\n\"both to implement [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html) (using [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html)) \"\n\"so you can use the standard `alloc` crate (as we saw [before](../alloc.md)), \"\n\"or for allocating other address space (using [`FrameAllocator`](https://docs.\"\n\"rs/buddy_system_allocator/0.9.0/buddy_system_allocator/struct.FrameAllocator.\"\n\"html)) . For example, we might want to allocate MMIO space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something that can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, that keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialization.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialization.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialization with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/\"\n\"libs/libvmbase/) library provides a linker script and useful defaults for \"\n\"the build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_memory.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Yalın (Bare) Metal Rust Öğleden Sonra\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device with the\\n\"\n\"    /// given set of registers.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 20 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Spawning new threads does not automatically delay program termination at the \"\n\"end of `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]\"\n\"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref).\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because `main` ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? See next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 20 dakika sürmelidir. İçeriği:\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a [`Sender<T>`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.Sender.html) and a [`Receiver<T>`](https://doc.rust-lang.\"\n\"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the \"\n\"channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for \"\n\"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` \"\n\"(so you can make multiple producers) but `Receiver` does not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.\"\n\"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv) return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"You get an unbounded and asynchronous channel with [`mpsc::channel()`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"An unbounded channel will allocate as much space as is necessary to store \"\n\"pending messages. The `send()` method will not block the calling thread.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"A call to `send()` will abort with an error (that is why it returns \"\n\"`Result`) if the channel is closed. A channel is closed when the receiver is \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/\"\n\"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current \"\n\"thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send()` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Like unbounded channels, a call to `send()` will abort with an error if the \"\n\"channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls \"\n\"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv).\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"Send\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"Sync\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are safe to access (via shared references) from multiple \"\n\"threads, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them. However, an already-locked mutex can have its \"\n\"guarded variable read by any thread with which the guard is shared.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows \"\n\"shared, read-only ownership via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"/// A struct that prints which thread drops it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"Dropped by {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"// Sleep for 0-500ms.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"// Now only the spawned threads will hold clones of `v`.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"// When the last spawned thread finishes, it will drop `v`'s contents.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability.md)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` if and only if `T` implements \"\n\"`Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned to make a new reference for each new spawned \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 1 saat 10 dakika sürmelidir. İçeriği:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a chopstick between each plate. The \"\n\"dish served is spaghetti which requires two chopsticks to eat. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right chopstick. \"\n\"Thus two chopsticks will only be available when their two nearest neighbors \"\n\"are thinking, not eating. After an individual philosopher finishes eating, \"\n\"they will put down both chopsticks.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_chopstick: ...\\n\"\n\"    // right_chopstick: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Pick up chopsticks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create chopsticks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2024\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Encourage students to focus first on implementing a solution that \\\"mostly\\\" \"\n\"works.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"The deadlock in the simplest solution is a general concurrency problem and \"\n\"highlights that Rust does not automatically prevent this sort of bug.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2024\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"This is a complex exercise and intended to give students an opportunity to \"\n\"work on a larger project than others. A success condition for this exercise \"\n\"is to get stuck on some \\\"real\\\" issue and work through it with the support \"\n\"of other students or the instructor.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the chopsticks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// To multiplex the non-cloneable Receiver, wrap it in Arc<Mutex<_>>.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 30 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 3 saat 30 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"async/await\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event such as a timeout occurs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`. We will address `Pin` in the \\\"Pitfalls\\\" segment.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"Rust transforms an async function or block to a hidden type that implements \"\n\"`Future`, using a state machine to track the function's progress. The \"\n\"details of this transform are complex, but it helps to have a schematic \"\n\"understanding of what is happening. The following function\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"/// Sum two D10 rolls plus a modifier.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"is transformed to something like\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Function has not begun yet.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Waiting for first `.await` to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Waiting for second `.await` to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Create future for first dice roll.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Poll sub-future for first dice roll.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Create future for second roll.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"// Poll sub-future for second dice roll.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"This example is illustrative, and isn't an accurate representation of the \"\n\"Rust compiler's transformation. The important things to notice here are:\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"Calling an async function does nothing but construct and return a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"All local variables are stored in the function's future, using an enum to \"\n\"identify where execution is currently suspended.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"An `.await` in the async function is translated into an a new state \"\n\"containing all live variables and the awaited future. The `loop` then \"\n\"handles that updated state, polling the future until it returns `Poll::\"\n\"Ready`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"Execution continues eagerly until a `Poll::Pending` occurs. In this simple \"\n\"example, every future is ready immediately.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"`main` contains a naïve executor, which just busy-loops until the future is \"\n\"ready. We will discuss real executors shortly.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"Imagine the `Future` data structure for a deeply nested stack of async \"\n\"functions. Each function's `Future` contains the `Future` structures for the \"\n\"functions it calls. This can result in unexpectedly large compiler-generated \"\n\"`Future` types.\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"This also means that recursive async functions are challenging. Compare to \"\n\"the common error of building recursive type, such as\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\nmsgid \"\"\n\"The fix for a recursive type is to add a layer of indrection, such as with \"\n\"`Box`. Similarly, a recursive async function must box the recursive future:\"\nmsgstr \"\"\n\n#: src/concurrency/async/state-machine.md\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"\\\"{n}\\\"\"\nmsgstr \"\\\"{n}\\\"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{page_sizes_dict:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"got: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"timeout\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send greeting\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Listener failed\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"The `listener` async block here is a common form: wait for some async event, \"\n\"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why \"\n\"does the `send` also fail in this situation?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"`select!` is also often used in a loop in \\\"actor\\\" architectures, where a \"\n\"task reacts to events in a loop. That has some pitfalls, which will be \"\n\"discussed in the next segment.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"Pin\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Recall an async function or block creates a type implementing `Future` and \"\n\"containing all of the local variables. Some of those variables can hold \"\n\"references (pointers) to other local variables. To ensure those remain \"\n\"valid, the future can never be moved to a different memory location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits were stabilized in the 1.75 release. This required \"\n\"support for using return-position `impl Trait` in traits, as the desugaring \"\n\"for `async fn` includes `-> impl Future<Output = ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support, there are some pitfalls around `async \"\n\"fn`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position `impl Trait` captures all in-scope lifetimes (so some \"\n\"patterns of borrowing cannot be expressed).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async traits cannot be used with [trait objects](../../smart-pointers/trait-\"\n\"objects.md) (`dyn Trait` support).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround \"\n\"for `dyn` support through a macro, with some caveats:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Running all sleepers...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Slept for {} ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are too deep to \"\n\"describe in-depth in this class. See [this blog post](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) by Niko Matsakis if you are interested in digging deeper. See also \"\n\"these keywords:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-\"\n\"return-types): short for [return-position `impl Trait`](../../generics/impl-\"\n\"trait.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.\"\n\"html): short for return-position `impl Trait` in trait (RPIT in trait).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the `Vec`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Filozofların Akşam Yemeği --- Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a \"\n\"description of the problem.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"// Keep trying until we have both chopsticks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tokio scheduler doesn't deadlock with 5 philosophers, so have 2.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2024\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2024\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.31\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.3.1\\\"\\n\"\n\"tokio = { version = \\\"1.48.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.13.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// Keep trying until we have both chopsticks\\n\"\n\"        // Pick up chopsticks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Welcome to Idiomatic Rust\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"[Rust Fundamentals](../welcome-day-1.md) introduced Rust syntax and core \"\n\"concepts. We now want to go one step further: how do you use Rust \"\n\"_effectively_ in your projects? What does _idiomatic_ Rust look like?\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"This course is opinionated: we will nudge you towards some patterns, and \"\n\"away from others. Nonetheless, we do recognize that some projects may have \"\n\"different needs. We always provide the necessary information to help you \"\n\"make informed decisions within the context and constraints of your own \"\n\"projects.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"⚠️ This course is under **active development**.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"The material may change frequently and there might be errors that have not \"\n\"yet been spotted. Nonetheless, we encourage you to browse through and \"\n\"provide early feedback!\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 5 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Bu oturum 10 dakikalık aralar dahil yaklaşık 5 saat 5 dakika sürmelidir. \"\n\"İçeriği:\"\n\n#: src/idiomatic/welcome.md\nmsgid \"5 hours and 5 minutes\"\nmsgstr \"5 saat 5 dakika\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"The course will cover the topics listed below. Each topic may be covered in \"\n\"one or more slides, depending on its complexity and relevance.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Foundations of API design\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Golden rule: prioritize clarity and readability at the callsite. People will \"\n\"spend much more time reading the call sites than declarations of the \"\n\"functions being called.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Make your API predictable\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Follow naming conventions (case conventions, prefer vocabulary precedented \"\n\"in the standard library - e.g., methods should be called \\\"push\\\" not \"\n\"\\\"push_back\\\", \\\"is_empty\\\" not \\\"empty\\\" etc.)\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Know the vocabulary types and traits in the standard library, and use them \"\n\"in your APIs. If something feels like a basic type/algorithm, check in the \"\n\"standard library first.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Use well-established API design patterns that we will discuss later in this \"\n\"class (e.g., newtype, owned/view type pairs, error handling)\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Write meaningful and effective doc comments (e.g., don't merely repeat the \"\n\"method name with spaces instead of underscores, don't repeat the same \"\n\"information just to fill out every markdown tag, provide usage examples)\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Leveraging the type system\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Short recap on enums, structs and type aliases\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Newtype pattern and encapsulation: parse, don't validate\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Extension traits: avoid the newtype pattern when you want to provide \"\n\"additional behaviour\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"RAII, scope guards and drop bombs: using `Drop` to clean up resources, \"\n\"trigger actions or enforce invariants\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"\\\"Token\\\" types: force users to prove they've performed a specific action\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"The typestate pattern: enforce correct state transitions at compile-time\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Using the borrow checker to enforce invariants that have nothing to do with \"\n\"memory ownership\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"OwnedFd/BorrowedFd in the standard library\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"[Branded types](https://plv.mpi-sws.org/rustbelt/ghostcell/paper.pdf)\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Don't fight the borrow checker\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"\\\"Owned\\\" types and \\\"view\\\" types: `&str` and `String`, `Path` and \"\n\"`PathBuf`, etc.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Don't hide ownership requirements: avoid hidden `.clone()`, learn to love \"\n\"`Cow`\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Split types along ownership boundaries\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Structure your ownership hierarchy like a tree\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Strategies to manage circular dependencies: reference counting, using \"\n\"indexes instead of references\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Interior mutability (Cell, RefCell)\"\nmsgstr \"İç Değişebilirlik (Interior mutability / Cell, RefCell)\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Working with lifetime parameters on user-defined data types\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Polymorphism in Rust\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"A quick refresher on traits and generic functions\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Rust has no inheritance: what are the implications?\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Using enums for polymorphism\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Using traits for polymorphism\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Using composition\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"How do I pick the most appropriate pattern?\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Working with generics\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Generic type parameter in a function or trait object as an argument?\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Trait bounds don't have to refer to the generic parameter\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Type parameters in traits: should it be a generic parameter or an associated \"\n\"type?\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Macros: a valuable tool to DRY up code when traits are not enough (or too \"\n\"complex)\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"What is the purpose of errors? Recovery vs. reporting.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Result vs. Option\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Designing good errors:\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Determine the error scope.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Capture additional context as the error flows upwards, crossing scope \"\n\"boundaries.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Leverage the `Error` trait to keep track of the full error chain.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"Leverage `thiserror` to reduce boilerplate when defining error types.\"\nmsgstr \"\"\n\n#: src/idiomatic/welcome.md\nmsgid \"\"\n\"Distinguish fatal errors from recoverable errors using `Result<Result<T, \"\n\"RecoverableError>, FatalError>`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Rust's type system is _expressive_: you can use types and traits to build \"\n\"abstractions that make your code harder to misuse.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"In some cases, you can go as far as enforcing correctness at _compile-time_, \"\n\"with no runtime overhead.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Types and traits can model concepts and constraints from your business \"\n\"domain. With careful design, you can improve the clarity and maintainability \"\n\"of the entire codebase.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Rust's type system borrows a lot of ideas from functional programming \"\n\"languages.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"For example, Rust's enums are known as \\\"algebraic data types\\\" in languages \"\n\"like Haskell and OCaml. You can take inspiration from learning material \"\n\"geared towards functional languages when looking for guidance on how to \"\n\"design with types. [\\\"Domain Modeling Made Functional\\\"](https://pragprog.\"\n\"com/titles/swdddf/domain-modeling-made-functional/) is a great resource on \"\n\"the topic, with examples written in F#.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Despite Rust's functional roots, not all functional design patterns can be \"\n\"easily translated to Rust.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"For example, you must have a solid grasp on a broad selection of advanced \"\n\"topics to design APIs that leverage higher-order functions and higher-kinded \"\n\"types in Rust.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Evaluate, on a case-by-case basis, whether a more imperative approach may be \"\n\"easier to implement. Consider using in-place mutation, relying on Rust's \"\n\"borrow-checker and type system to control what can be mutated, and where.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"The same caution should be applied to object-oriented design patterns. Rust \"\n\"doesn't support inheritance, and object decomposition should take into \"\n\"account the constraints introduced by the borrow checker.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"\"\n\"Mention that type-level programming can be often used to create \\\"zero-cost \"\n\"abstractions\\\", although the label can be misleading: the impact on compile \"\n\"times and code complexity may be significant.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"This segment should take about 5 hours and 5 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 5 saat 5 dakika sürmelidir. İçeriği:\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"1 hour and 30 minutes\"\nmsgstr \"1 saat 30 dakika\"\n\n#: src/idiomatic/leveraging-the-type-system.md\nmsgid \"1 hour and 35 minutes\"\nmsgstr \"1 saat 35 dakika\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"A _newtype_ is a wrapper around an existing type, often a primitive:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"/// A unique user identifier, implemented as a newtype around `u64`.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"\"\n\"Unlike type aliases, newtypes aren't interchangeable with the wrapped type:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"// 🛠️❌\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"\"\n\"The Rust compiler won't let you use methods or operators defined on the \"\n\"underlying type either:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"\"\n\"Students should have encountered the newtype pattern in the \\\"Fundamentals\\\" \"\n\"course, when they learned about [tuple structs](../../user-defined-types/\"\n\"tuple-structs.md).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"Run the example to show students the error message from the compiler.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"\"\n\"Modify the example to use a typealias instead of a newtype, such as `type \"\n\"MessageId = u64`. The modified example should compile, thus highlighting the \"\n\"differences between the two approaches.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern.md\nmsgid \"\"\n\"Stress that newtypes, out of the box, have no behaviour attached to them. \"\n\"You need to be intentional about which methods and operators you are willing \"\n\"to forward from the underlying type. In our `UserId` example, it is \"\n\"reasonable to allow comparisons between `UserId`s, but it wouldn't make \"\n\"sense to allow arithmetic operations like addition or subtraction.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"When a function takes multiple arguments of the same type, call sites are \"\n\"unclear:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"// [...]\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\\\"password\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\\\"username\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"// In another part of the codebase, we swap arguments by mistake.\\n\"\n\"// Bug (best case), security vulnerability (worst case)\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"The newtype pattern can prevent this class of errors at compile time:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"Run both examples to show students the successful compilation for the \"\n\"original example, and the compiler error returned by the modified example.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"Stress the _semantic_ angle. The newtype pattern should be leveraged to use \"\n\"distinct types for distinct concepts, thus ruling out this class of errors \"\n\"entirely.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"Nonetheless, note that there are legitimate scenarios where a function may \"\n\"take multiple arguments of the same type. In those scenarios, if correctness \"\n\"is of paramount importance, consider using a struct with named fields as \"\n\"input:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"// No need to check the definition of the `login` function to spot the \"\n\"issue.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/semantic-confusion.md\nmsgid \"\"\n\"Users are forced, at the callsite, to assign values to each field, thus \"\n\"increasing the likelihood of spotting bugs.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"The newtype pattern can be leveraged to enforce _invariants_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"// Other validation checks...\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"\"\n\"The newtype pattern, combined with Rust's module and visibility system, can \"\n\"be used to _guarantee_ that instances of a given type satisfy a set of \"\n\"invariants.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"\"\n\"In the example above, the raw `String` stored inside the `Username` struct \"\n\"can't be accessed directly from other modules or crates, since it's not \"\n\"marked as `pub` or `pub(in ...)`. Consumers of the `Username` type are \"\n\"forced to use the `new` method to create instances. In turn, `new` performs \"\n\"validation, thus ensuring that all instances of `Username` satisfy those \"\n\"checks.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"\"\n\"The `as_str` method allows consumers to access the raw string representation \"\n\"(e.g., to store it in a database). However, consumers can't modify the \"\n\"underlying value since `&str`, the returned type, restricts them to read-\"\n\"only access.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"Type-level invariants have second-order benefits.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/parse-don-t-validate.md\nmsgid \"\"\n\"The input is validated once, at the boundary, and the rest of the program \"\n\"can rely on the invariants being upheld. We can avoid redundant validation \"\n\"and \\\"defensive programming\\\" checks throughout the program, reducing noise \"\n\"and improving performance.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"Is It Truly Encapsulated?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"\"\n\"You must evaluate _the entire API surface_ exposed by a newtype to determine \"\n\"if invariants are indeed bullet-proof. It is crucial to consider all \"\n\"possible interactions, including trait implementations, that may allow users \"\n\"to bypass validation checks.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"// Validation checks...\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"// ‼️\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"\"\n\"`DerefMut` allows users to get a mutable reference to the wrapped value.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"\"\n\"The mutable reference can be used to modify the underlying data in ways that \"\n\"may violate the invariants enforced by `Username::new`!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"\"\n\"When auditing the API surface of a newtype, you can narrow down the review \"\n\"scope to methods and traits that provide mutable access to the underlying \"\n\"data.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"Remind students of privacy boundaries.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md\nmsgid \"\"\n\"In particular, functions and methods defined in the same module of the \"\n\"newtype can access its underlying data directly. If possible, move the \"\n\"newtype definition to its own separate module to reduce the scope of the \"\n\"audit.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"It may desirable to **extend** foreign types with new inherent methods. For \"\n\"example, allow your code to check if a string is a palindrome using method-\"\n\"calling syntax: `s.is_palindrome()`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"It might feel natural to reach out for an `impl` block:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"The Rust compiler won't allow it, though. But you can use the **extension \"\n\"trait pattern** to work around this limitation.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"A Rust item (be it a trait or a type) is referred to as:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"**foreign**, if it isn't defined in the current crate\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"**local**, if it is defined in the current crate\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"The distinction has significant implications for [coherence and orphan rules]\"\n\"(https://doc.rust-lang.org/stable/reference/items/implementations.html#r-\"\n\"items.impl.trait.orphan-rule), as we'll get a chance to explore in this \"\n\"section of the course.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"Compile the example to show the compiler error that's emitted.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"Highlight how the compiler error message nudges you towards the extension \"\n\"trait pattern.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"Explain how many type-system restrictions in Rust aim to prevent _ambiguity_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"What would happen if you were allowed to define new inherent methods on \"\n\"foreign types? Different crates in your dependency tree might end up \"\n\"defining different methods on the same foreign type with the same name.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"As soon as there is room for ambiguity, there must be a way to disambiguate. \"\n\"If disambiguation happens implicitly, it can lead to surprising or otherwise \"\n\"unexpected behavior. If disambiguation happens explicitly, it can increase \"\n\"the cognitive load on developers who are reading your code.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"Furthermore, every time a crate defines a new inherent method on a foreign \"\n\"type, it may cause compilation errors in _your_ code, as you may be forced \"\n\"to introduce explicit disambiguation.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"Rust has decided to avoid the issue altogether by forbidding the definition \"\n\"of new inherent methods on foreign types.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits.md\nmsgid \"\"\n\"Other languages (e.g, Kotlin, C#, Swift) allow adding methods to existing \"\n\"types, often called \\\"extension methods.\\\" This leads to different trade-\"\n\"offs in terms of potential ambiguities and the need for global reasoning.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"An **extension trait** is a local trait definition whose primary purpose is \"\n\"to attach new methods to foreign types.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"// Bring the extension trait into scope...\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"// ...then invoke its methods as if they were inherent methods\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\\\"dad\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\\\"grandma\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"The `Ext` suffix is conventionally attached to the name of extension traits.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"It communicates that the trait is primarily used for extension purposes, and \"\n\"it is therefore not intended to be implemented outside the crate that \"\n\"defines it.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"Refer to the [\\\"Extension Trait\\\" RFC](https://rust-lang.github.io/rfcs/0445-\"\n\"extension-trait-conventions.html) as the authoritative source for naming \"\n\"conventions.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"The extension trait implementation for a foreign type must be in the same \"\n\"crate as the trait itself, otherwise you'll be blocked by Rust's [_orphan \"\n\"rule_](https://github.com/rust-lang/rfcs/blob/master/text/2451-re-\"\n\"rebalancing-coherence.md#what-is-coherence-and-why-do-we-care).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"The extension trait must be in scope when its methods are invoked.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"Comment out the `use` statement in the example to show the compiler error \"\n\"that's emitted if you try to invoke an extension method without having the \"\n\"corresponding extension trait in scope.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"The example above uses an [_underscore import_](https://doc.rust-lang.org/\"\n\"stable/reference/items/use-declarations.html#r-items.use.as-underscore) \"\n\"(`use ext::StringExt as _`) to minimize the likelihood of a naming conflict \"\n\"with other imported traits.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"With an underscore import, the trait is considered to be in scope and you're \"\n\"allowed to invoke its methods on types that implement the trait. Its \"\n\"_symbol_, instead, is not directly accessible. This prevents you, for \"\n\"example, from using that trait in a `where` clause.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md\nmsgid \"\"\n\"Since extension traits aren't meant to be used in `where` clauses, they are \"\n\"conventionally imported via an underscore import.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"What happens when you have a name conflict between an inherent method and an \"\n\"extension method?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"// Which `count_ones` method is invoked?\\n\"\n\"    // The one from `CountOnesExt`? Or the inherent one from `i32`?\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"A foreign type may, in a newer version, add a new inherent method with the \"\n\"same name as our extension method.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Ask: What will happen in the example above? Will there be a compiler error? \"\n\"Will one of the two methods be given higher priority? Which one?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Add a `panic!(\\\"Extension trait\\\");` in the body of `CountOnesExt::\"\n\"count_ones` to clarify which method is being invoked.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"To prevent users of the Rust language from having to manually specify which \"\n\"method to use in all cases, there is a priority ordering system for how \"\n\"methods get \\\"picked\\\" first:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"Immutable (`&self`) first\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Inherent (method defined in the type's `impl` block) before Trait (method \"\n\"added by a trait impl).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"Mutable (`&mut self`) Second\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"Inherent before Trait.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"If every method with the same name has different mutability and was either \"\n\"defined in as an inherent method or trait method, with no overlap, this \"\n\"makes the job easy for the compiler.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"This does introduce some ambiguity for the user, who may be confused as to \"\n\"why a method they're relying on is not producing expected behavior. Avoid \"\n\"name conflicts instead of relying on this mechanism if you can.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Demonstrate: Change the signature and implementation of `CountOnesExt::\"\n\"count_ones` to `fn count_ones(&mut self) -> u32` and modify the invocation \"\n\"accordingly:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"`CountOnesExt::count_ones` is invoked, rather than the inherent method, \"\n\"since `&mut self` has a higher priority than `&self`, the one used by the \"\n\"inherent method.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"If an immutable inherent method and a mutable trait method exist for the \"\n\"same type, we can specify which one to use at the call site by using \"\n\"`(&<value>).count_ones()` to get the immutable (higher priority) method or \"\n\"`(&mut <value>).count_ones()`\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Point the students to the Rust reference for more information on [method \"\n\"resolution](https://doc.rust-lang.org/stable/reference/expressions/method-\"\n\"call-expr.html).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"Avoid naming conflicts between extension trait methods and inherent methods. \"\n\"Rust's method resolution algorithm is complex and may surprise users of your \"\n\"code.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"More to explore\"\nmsgstr \"Daha fazlasını keşfedin\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md\nmsgid \"\"\n\"The interaction between the priority search used by Rust's method resolution \"\n\"algorithm and automatic `Deref`ing can be used to emulate [specialization]\"\n\"(https://github.com/rust-lang/rust/issues/31844) on the stable toolchain, \"\n\"primarily in the context of macro-generated code. Check out [\\\"Autoref \"\n\"Specialization\\\"](https://github.com/dtolnay/case-studies/blob/master/\"\n\"autoref-specialization/README.md) for the specific details.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"What happens when you have a name conflict between two different trait \"\n\"methods implemented for the same type?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"// Which method is invoked?\\n\"\n\"// The one from `Ext1`? Or the one from `Ext2`?\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"The trait you are extending may, in a newer version, add a new trait method \"\n\"with the same name as your extension method. Or another extension trait for \"\n\"the same type may define a method with a name that conflicts with your own \"\n\"extension method.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"Ask: what will happen in the example above? Will there be a compiler error? \"\n\"Will one of the two methods be given higher priority? Which one?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"The compiler rejects the code because it cannot determine which method to \"\n\"invoke. Neither `Ext1` nor `Ext2` has a higher priority than the other.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"To resolve this conflict, you must specify which trait you want to use.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"Demonstrate: call `Ext1::is_palindrome(&\\\"dad\\\")` or `Ext2::\"\n\"is_palindrome(&\\\"dad\\\")` instead of `\\\"dad\\\".is_palindrome()`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"For methods with more complex signatures, you may need to use a more \"\n\"explicit [fully-qualified syntax](https://doc.rust-lang.org/reference/\"\n\"expressions/call-expr.html#disambiguating-function-calls).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md\nmsgid \"\"\n\"Demonstrate: replace `\\\"dad\\\".is_palindrome()` with `<&str as Ext1>::\"\n\"is_palindrome(&\\\"dad\\\")` or `<&str as Ext2>::is_palindrome(&\\\"dad\\\")`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"As with types, it may be desirable to **extend foreign traits**. In \"\n\"particular, to attach new methods to _all_ implementors of a given trait.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\\\"'{}'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\\\"'dad'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\\\"'4'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\\\"'true'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Highlight how we added new behavior to _multiple_ types at once. `.quoted()` \"\n\"can be called on string slices, numbers, and booleans since they all \"\n\"implement the `Display` trait.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"This flavor of the extension trait pattern uses [_blanket implementations_]\"\n\"(https://doc.rust-lang.org/stable/reference/glossary.html#blanket-\"\n\"implementation).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"A blanket implementation implements a trait for all types `T` that satisfy \"\n\"the trait bounds specified in the `impl` block. In this case, the only \"\n\"requirement is that `T` implements the `Display` trait.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Draw the students' attention to the implementation of `DisplayExt::quoted`: \"\n\"we can't make any assumptions about `T` other than that it implements \"\n\"`Display`. All our logic must either use methods from `Display` or functions/\"\n\"macros that don't require other traits.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"For example, we can call `format!` with `T`, but can't call `.\"\n\"to_uppercase()` because it is not necessarily a `String`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"We could introduce additional trait bounds on `T`, but it would restrict the \"\n\"set of types that can leverage the extension trait.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Conventionally, the extension trait is named after the trait it extends, \"\n\"followed by the `Ext` suffix. In the example above, `DisplayExt`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"There are entire crates that extend standard library traits with new \"\n\"functionality.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"`itertools` crate provides the `Itertools` trait that extends `Iterator`. It \"\n\"adds many iterator adapters, such as `interleave` and `unique`. It provides \"\n\"new algorithmic building blocks for iterator pipelines built with method \"\n\"chaining.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"`futures` crate provides the `FutureExt` trait, which extends the `Future` \"\n\"trait with new combinators and helper methods.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Extension traits can be used by libraries to distinguish between stable and \"\n\"experimental methods.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"Stable methods are part of the trait definition.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Experimental methods are provided via an extension trait defined in a \"\n\"different library, with a less restrictive stability policy. Some utility \"\n\"methods are then \\\"promoted\\\" to the core trait definition once they have \"\n\"been proven useful and their design has been refined.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Extension traits can be used to split a [dyn-incompatible trait](https://doc.\"\n\"rust-lang.org/reference/items/traits.html#r-items.traits.dyn-compatible) in \"\n\"two:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"A **dyn-compatible core**, restricted to the methods that satisfy dyn-\"\n\"compatibility requirements.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"An **extension trait**, containing the remaining methods that are not dyn-\"\n\"compatible (e.g., methods with a generic parameter).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md\nmsgid \"\"\n\"Concrete types that implement the core trait will be able to invoke all \"\n\"methods, thanks to the blanket impl for the extension trait. Trait objects \"\n\"(`dyn CoreTrait`) will be able to invoke all methods on the core trait as \"\n\"well as those on the extension trait that don't require `Self: Sized`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"In what scenarios should you prefer an extension trait over a free function?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"// vs\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"The main advantage of extension traits is **ease of discovery**.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"Extension methods can be easier to discover than free functions. Language \"\n\"servers (e.g., `rust-analyzer`) will suggest them if you type `.` after an \"\n\"instance of the foreign type.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"However, a bespoke extension trait might be overkill for a single method. \"\n\"Both approaches require an additional import, and the familiar method syntax \"\n\"may not justify the boilerplate of a full trait definition.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"**Discoverability:** Extension methods are easier to discover than free \"\n\"functions. Language servers (e.g., `rust-analyzer`) will suggest them if you \"\n\"type `.` after an instance of the foreign type.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"**Method Chaining:** A major ergonomic win for extension traits is method \"\n\"chaining. This is the foundation of the `Iterator` trait, allowing for \"\n\"fluent calls like `data.iter().filter(...).map(...)`. Achieving this with \"\n\"free functions would be far more cumbersome \"\n\"(`map(filter(iter(data), ...), ...)`).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"**API Cohesion:** Extension traits help create a cohesive API. If you have \"\n\"several related functions for a foreign type (e.g., `is_palindrome`, \"\n\"`word_count`, `to_kebab_case`), grouping them in a single `StrExt` trait is \"\n\"often cleaner than having multiple free functions for a user to import.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md\nmsgid \"\"\n\"**Trade-offs:** Despite these advantages, a bespoke extension trait might be \"\n\"overkill for a single, simple function. Both approaches require an \"\n\"additional import, and the familiar method syntax may not justify the \"\n\"boilerplate of a full trait definition.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"Typestate Pattern: Problem\"\nmsgstr \"Tür Durum (Typestate) Deseni: Problem\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"How can we ensure that only valid operations are allowed on a value based on \"\n\"its current state?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\\\"{name} {{\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"  {key}={value};\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"}\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"User\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"id\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"42\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\\\"name\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"// serializer.serialize_struct_end(); // ← Oops! Forgotten\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"This `Serializer` is meant to write a structured value.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"However, in this example we forgot to call `serialize_struct_end()` before \"\n\"`finish()`. As a result, the serialized output is incomplete or \"\n\"syntactically incorrect.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"One approach to fix this would be to track internal state manually, and \"\n\"return a `Result` from methods like `serialize_struct_field()` or `finish()` \"\n\"if the current state is invalid.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"But this has downsides:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"It is easy to get wrong as an implementer. Rust’s type system cannot help \"\n\"enforce the correctness of our state transitions.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"It also adds unnecessary burden on the user, who must handle `Result` values \"\n\"for operations that are misused in source code rather than at runtime.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"A better solution is to model the valid state transitions directly in the \"\n\"type system.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern.md\nmsgid \"\"\n\"In the next slide, we will apply the **typestate pattern** to enforce \"\n\"correct usage at compile time and make it impossible to call incompatible \"\n\"methods or forget to do a required action.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"Typestate Pattern: Example\"\nmsgstr \"Tür Durum (Typestate) Deseni: Örnek\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"The typestate pattern encodes part of a value’s runtime state into its type. \"\n\"This allows us to prevent invalid or inapplicable operations at compile time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"`Serializer` usage flowchart:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"This example is inspired by Serde’s [`Serializer` trait](https://docs.rs/\"\n\"serde/latest/serde/ser/trait.Serializer.html). Serde uses typestates \"\n\"internally to ensure serialization follows a valid structure. For more, see: \"\n\"<https://serde.rs/impl-serializer.html>\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"The key idea behind typestate is that state transitions happen by consuming \"\n\"a value and producing a new one. At each step, only operations valid for \"\n\"that state are available.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"In this example:\"\nmsgstr \"Bu örnekte:\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"We begin with a `Serializer`, which only allows us to start serializing a \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"Once we call `.serialize_struct(...)`, ownership moves into a \"\n\"`SerializeStruct` value. From that point on, we can only call methods \"\n\"related to serializing struct fields.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"The original `Serializer` is no longer accessible — preventing us from \"\n\"mixing modes (such as starting another _struct_ mid-struct) or calling \"\n\"`finish()` too early.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"Only after calling `.finish_struct()` do we receive the `Serializer` back. \"\n\"At that point, the output can be finalized or reused.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"If we forget to call `finish_struct()` and drop the `SerializeStruct` early, \"\n\"the `Serializer` is also dropped. This ensures incomplete output cannot leak \"\n\"into the system.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-example.md\nmsgid \"\"\n\"By contrast, if we had implemented everything on `Serializer` directly — as \"\n\"seen on the previous slide, nothing would stop someone from skipping \"\n\"important steps or mixing serialization flows.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"How do we manage increasingly complex configuration flows with many possible \"\n\"states and transitions, while still preventing incompatible operations?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"/* [...] */\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO, implement:\\n\"\n\"    //\\n\"\n\"    // fn serialize_struct(self, name: &str) -> SerializeStruct\\n\"\n\"    // fn finish(self) -> String\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO, implement:\\n\"\n\"    //\\n\"\n\"    // fn serialize_property(mut self, name: &str) -> \"\n\"SerializeStructProperty\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO,\\n\"\n\"    // How should we finish this struct? This depends on where it appears:\\n\"\n\"    // - At the root level: return `Serializer`\\n\"\n\"    // - As a property inside another struct: return `SerializeStruct`\\n\"\n\"    // - As a value inside a list: return `SerializeList`\\n\"\n\"    //\\n\"\n\"    // fn finish(self) -> ???\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO, implement:\\n\"\n\"    //\\n\"\n\"    // fn serialize_string(self, value: &str) -> SerializeStruct\\n\"\n\"    // fn serialize_struct(self, name: &str) -> SerializeStruct\\n\"\n\"    // fn serialize_list(self) -> SerializeList\\n\"\n\"    // fn finish(self) -> SerializeStruct\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO, implement:\\n\"\n\"    //\\n\"\n\"    // fn serialize_string(mut self, value: &str) -> Self\\n\"\n\"    // fn serialize_struct(mut self, value: &str) -> SerializeStruct\\n\"\n\"    // fn serialize_list(mut self) -> SerializeList\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"// TODO:\\n\"\n\"    // Like `SerializeStruct::finish`, the return type depends on nesting.\\n\"\n\"    //\\n\"\n\"    // fn finish(mut self) -> ???\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"Diagram of valid transitions:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"Building on our previous serializer, we now want to support **nested \"\n\"structures** and **lists**.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"However, this introduces both **duplication** and **structural complexity**.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"Even more critically, we now hit a **type system limitation**: we cannot \"\n\"cleanly express what `finish()` should return without duplicating variants \"\n\"for every nesting context (e.g. root, struct, list).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"From the diagram of valid transitions, we can observe:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"The transitions are recursive\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"The return types depend on _where_ a substructure or list appears\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"Each context requires a return path to its parent\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"With only concrete types, this becomes unmanageable. Our current approach \"\n\"leads to an explosion of types and manual wiring.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-advanced.md\nmsgid \"\"\n\"In the next chapter, we’ll see how **generics** let us model recursive flows \"\n\"with less boilerplate, while still enforcing valid operations at compile \"\n\"time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"By combining typestate modeling with generics, we can express a wider range \"\n\"of valid states and transitions without duplicating logic. This approach is \"\n\"especially useful when the number of states grows or when multiple states \"\n\"share behavior but differ in structure.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"We now have all the tools needed to implement the methods for the \"\n\"`Serializer` and its state type definitions. This ensures that our API only \"\n\"permits valid transitions, as illustrated in the following diagram:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"By leveraging generics to track the parent context, we can construct \"\n\"arbitrarily nested serializers that enforce valid transitions between \"\n\"struct, list, and property states.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"This enables us to build a recursive structure while maintaining strict \"\n\"control over which methods are accessible in each state.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"Methods common to all states can be defined for any `S` in `Serializer<S>`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics.md\nmsgid \"\"\n\"Marker types (e.g., `List<S>`) introduce no memory or runtime overhead, as \"\n\"they contain no data other than a possible Zero-Sized Type. Their only role \"\n\"is to enforce correct API usage through the type system.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\nmsgid \"\"\n\"Referring back to our original diagram of valid transitions, we can \"\n\"visualize the beginning of our implementation as follows:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\nmsgid \"\"\n\"At the \\\"root\\\" of our `Serializer`, the only construct allowed is a \"\n\"`Struct`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/root.md\nmsgid \"\"\n\"The `Serializer` can only be finalized into a `String` from this root level.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"\\\"{}{name}: \\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"\\\"{}}}\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"The diagram can now be expanded as follows:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"A `Struct` can only contain a `Property`;\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/struct.md\nmsgid \"\"\n\"Finishing a `Struct` returns control back to its parent, which in our \"\n\"previous slide was assumed the `Root`, but in reality however it can be also \"\n\"something else such as `Struct` in case of nested \\\"structs\\\".\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\\\"[\\\"\"\nmsgstr \"\\\"[\\\"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\\\"{value},\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\"\n\"With the addition of the Property state methods, our diagram is now nearly \"\n\"complete:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\"\n\"A property can be defined as a `String`, `Struct<S>`, or `List<S>`, enabling \"\n\"the representation of nested structures.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/property.md\nmsgid \"\"\n\"This concludes the step-by-step implementation. The full implementation, \"\n\"including support for `List<S>`, is shown in the next slide.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"Serializer: complete implementation\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"Looking back at our original desired flow:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"We can now see this reflected directly in the types of our serializer:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"The code for the full implementation of the `Serializer` and all its states \"\n\"can be found in [this Rust playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2024&gist=c9cbb831cd05fe9db4ce42713c83ca16).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"This pattern isn't a silver bullet. It still allows issues like:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"Empty or invalid property names (which can be fixed using [the newtype \"\n\"pattern](../../newtype-pattern.md))\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"Duplicate property names (which could be tracked in `Struct<S>` and handled \"\n\"via `Result`)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"If validation failures occur, we can also change method signatures to return \"\n\"a `Result`, allowing recovery:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"/* ... */\"\nmsgstr \"/* ... */\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"While this API is powerful, it’s not always ergonomic. Production \"\n\"serializers typically favor simpler APIs and reserve the typestate pattern \"\n\"for enforcing critical invariants.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/typestate-pattern/typestate-generics/complete.md\nmsgid \"\"\n\"One excellent real-world example is [`rustls::ClientConfig`](https://docs.rs/\"\n\"rustls/latest/rustls/client/struct.ClientConfig.html#method.builder), which \"\n\"uses typestate with generics to guide the user through safe and correct \"\n\"configuration steps.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"Using the Borrow checker to enforce Invariants\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"The borrow checker, while added to enforce memory ownership, can model other \"\n\"problems and prevent API misuse.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"/// Doors can be open or closed, and you need the right key to lock or \"\n\"unlock\\n\"\n\"/// one. Modelled with a Shared key and Owned door.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\\\"Opened the door with key shape '{}'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\\\"Door wasn't opened! Your key only opens locks with shape '{}'\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"We've seen the borrow checker prevent memory safety bugs (use-after-free, \"\n\"data races).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"We've also used types to shape and restrict APIs already using [the \"\n\"Typestate pattern](../leveraging-the-type-system/typestate-pattern.md).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"Language features are often introduced for a specific purpose.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Over time, users may develop ways of using a feature in ways that were not \"\n\"predicted when they were introduced.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Java 5 introduced Generics in 2004 with the [main stated purpose of enabling \"\n\"type-safe collections](https://jcp.org/en/jsr/detail?id=14).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Adoption was slow at first, but some new projects began designing their APIs \"\n\"around generics from the beginning.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Since then, users and developers of the language expanded the use of \"\n\"generics to other areas of type-safe API design:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Class information can be held onto via Java's `Class<T>` or Guava's \"\n\"`TypeToken<T>`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"The Builder pattern can be implemented using Recursive Generics.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"We aim to do something similar here: Even though the borrow checker was \"\n\"introduced to prevent use-after-free and data races, we treat it as just \"\n\"another API design tool.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"It can be used to model program properties that have nothing to do with \"\n\"preventing memory safety bugs.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"To use the borrow checker as a problem solving tool, we will need to \"\n\"\\\"forget\\\" that the original purpose of it is to prevent mutable aliasing in \"\n\"the context of preventing use-after-frees and data races.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"We should imagine working within situations where the rules are the same but \"\n\"the meaning is slightly different.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"This example uses ownership and borrowing are used to model the state of a \"\n\"physical door.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"`open_door` **consumes** a `LockedDoor` and returns a new `OpenDoor`. The \"\n\"old `LockedDoor` value is no longer available.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"If the wrong key is used, the door is left locked. It is returned as an \"\n\"`Err` case of the `Result`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"It is a compile-time error to try and use a door that has already been \"\n\"opened.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"Similarly, `lock_door` consumes an `OpenDoor`, preventing closing the door \"\n\"twice at compile time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"The rules of the borrow checker exist to prevent memory safety bugs, but the \"\n\"underlying logical system does not \\\"know\\\" what memory is.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"All the borrow checker does is enforce a specific set of rules of how users \"\n\"can order operations.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants.md\nmsgid \"\"\n\"This is just one case of piggy-backing onto the rules of the borrow checker \"\n\"to design APIs to be harder or impossible to misuse.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"// An internal data type to have something to hold onto.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"// The \\\"outer\\\" data.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"// let exclusive = exclusive_use(&mut value); // ❌🔨\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"// let shared = shared_use(&value); // ❌🔨\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"This example re-frames the borrow checker rules away from references and \"\n\"towards semantic meaning in non-memory-safety settings.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"Nothing is being mutated, nothing is being sent across threads.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"In rust's borrow checker we have access to three different ways of \"\n\"\\\"taking\\\" a value:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"Owned value `T`. Value is dropped when the scope ends, unless it is not \"\n\"returned to another scope.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"Shared Reference `&T`. Allows aliasing but prevents mutable access while \"\n\"shared references are in use.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"Mutable Reference `&mut T`. Only one of these is allowed to exist for a \"\n\"value at any one point, but can be used to create shared references.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"Ask: The two commented-out lines in the `demo` functions would cause \"\n\"compilation errors, Why?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"`demo_exclusive`: Because the `shared` value is still aliased after the \"\n\"`exclusive` reference is taken.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"`demo_denied`: Because `value` is consumed the line before the \"\n\"`shared_again_again` reference is taken from `&value`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"Remember that every `&T` and `&mut T` has a lifetime, just one the user \"\n\"doesn't have to annotate or think about most of the time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/generalizing-ownership.md\nmsgid \"\"\n\"We rarely specify lifetimes because the Rust compiler allows us to _elide_ \"\n\"them in most cases. See: [Lifetime Elision](../../../lifetimes/lifetime-\"\n\"elision.md)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Sometimes we want values that _can only be used once_. One critical example \"\n\"of this is in cryptography: A \\\"Nonce.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"/* specifics omitted */\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"/// A single-use number suitable for cryptographic purposes.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"/// A cryptographically sound random generator function.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"// chosen by a fair dice roll, https://xkcd.com/221/\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"/// Consume a nonce, but not the key or the data.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"// The key and data can be re-used, copied, etc. but the nonce cannot.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"// encrypt(nonce, &key, &data_2); // 🛠️❌\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"Problem: How can we guarantee a value is used only once?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Motivation: A nonce is a piece of random, unique data used in cryptographic \"\n\"protocols to prevent replay attacks.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Background: In practice people have ended up accidentally re-using nonces. \"\n\"Most commonly, this causes the cryptographic protocol to completely break \"\n\"down and stop fulfilling its function.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Depending on the specifics of nonce reuse and cryptography at hand, private \"\n\"keys can also become computable by attackers.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Rust has an obvious tool for achieving the invariant \\\"Once you use this, \"\n\"you can't use it again\\\": passing a value as an _owned argument_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Highlight: the `encrypt` function takes `nonce` by value (an owned \"\n\"argument), but `key` and `data` by reference.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"The technique for single-use values is as follows:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Keep constructors private, so a user can't construct values with the same \"\n\"inner value twice.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Don't implement `Clone`/`Copy` traits or equivalent methods, so a user can't \"\n\"duplicate data we want to keep unique.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Make the interior type opaque (like with the newtype pattern), so the user \"\n\"cannot modify an existing value on their own.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"Ask: What are we missing from the newtype pattern in the slide's code?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"Expect: Module boundary.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Demonstrate: Without a module boundary a user can construct a nonce on their \"\n\"own.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"Fix: Put `Key`, `Nonce`, and `new_nonce` behind a module.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/single-use-values.md\nmsgid \"\"\n\"Cryptography Nuance: A nonce might still be used twice if it was created \"\n\"through pseudo-random process with no actual randomness. That can't be \"\n\"prevented through this method. This API design prevents one nonce \"\n\"duplication, but not all logic bugs.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"We can use the mutual exclusion of `&T` and `&mut T` references to prevent \"\n\"data from being used before it is ready.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"/* fields omitted */\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// fake results\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// Send the query over, but don't wait for results.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// Finish executing the transaction and retrieve the results.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// The transaction `tx` mutably borrows `db`.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\\\"SELECT * FROM users\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"// This won't compile because `db` is already mutably borrowed by `tx`.\\n\"\n\"    // let results = db.results(); // ❌🔨\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// The borrow of `db` ends when `tx` is consumed by `commit()`.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"// Now it is possible to borrow `db` again.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"Motivation: In this database API queries are kicked off for asynchronous \"\n\"execution and the results are only available once the whole transaction is \"\n\"finished.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"A user might think that queries are executed immediately, and try to read \"\n\"results before they are made available. This API misuse could make the app \"\n\"read incomplete or incorrect data.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"While an obvious misunderstanding, situations such as this can happen in \"\n\"practice.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"Ask: Has anyone misunderstood an API by not reading the docs for proper use?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"Expect: Examples of early-career or in-university mistakes and \"\n\"misunderstandings.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"As an API grows in size and user base, a smaller percentage of users has \"\n\"deep knowledge of the system the API represents.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"This example shows how we can use Aliasing XOR Mutability to prevent this \"\n\"kind of misuse.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"The code might read results before they are ready if the programmer assumes \"\n\"that the queries execute immediately rather than kicked off for asynchronous \"\n\"execution.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"The constructor for the `Transaction` type takes a mutable reference to the \"\n\"database connection, and stores it in the returned `Transaction` value.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"The explicit lifetime here doesn't have to be intimidating, it just means \"\n\"\\\"`Transaction` is outlived by the `DatabaseConnection` that was passed to \"\n\"it\\\" in this case.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"The reference is mutable to completely lock out the `DatabaseConnection` \"\n\"from other usage, such as starting further transactions or reading the \"\n\"results.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"While a `Transaction` exists, we can't touch the `DatabaseConnection` \"\n\"variable that was created from it.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"Demonstrate: uncomment the `db.results()` line. Doing so will result in a \"\n\"compile error, as `db` is already mutably borrowed.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"Note: The query results not being public and placed behind a getter function \"\n\"lets us enforce the invariant \\\"users can only look at query results if \"\n\"there is no active transactions.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/aliasing-xor-mutability.md\nmsgid \"\"\n\"If the query results were placed in a public struct field, this invariant \"\n\"could be violated.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"PhantomData 1/4: De-duplicating Same Data & Semantics\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"\"\n\"The newtype pattern can sometimes come up against the DRY principle, how do \"\n\"we solve this?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"// And so on ...\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"\"\n\"Problem: We want to use the newtype pattern to differentiate permissions, \"\n\"but we're having to implement the same traits over and over again for the \"\n\"same data.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"\"\n\"Ask: Assume the details of each implementation here are the same between \"\n\"types, what are ways we can avoid repeating ourselves?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"Expect:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"Make this an enum, not distinct data types.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"\"\n\"Bundle the user ID with permission tokens like `struct Admin(u64, \"\n\"UserPermission, ModeratorPermission, AdminPermission);`\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"Adding a type parameter which encodes permissions.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-01-types.md\nmsgid \"Mentioning `PhantomData` ahead of schedule (it's in the title).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"PhantomData 2/4: Type-level tagging\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Let's solve the problem from the previous slide by adding a type parameter.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"// use std::marker::PhantomData;\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"// Admins are users\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"// impl <T> Debug for UserTag<T> {/* ... */}\\n\"\n\"// impl <T> PartialEq for UserTag<T> {/* ... */}\\n\"\n\"// impl <T> Eq for UserTag<T> {/* ... */}\\n\"\n\"// And so on ...\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"/* All functionality for users and above */\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"/* All functionality for only admins */\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Here we're using a type parameter and gating permissions behind \\\"tag\\\" \"\n\"types that implement different permission traits.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Tag types, or marker types, are zero-sized types that have some semantic \"\n\"meaning to users and API designers.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Ask: What issues does having it be an actual instance of that type pose?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Answer: If it's not a zero-sized type (like `()` or `struct MyTag;`), then \"\n\"we're allocating more memory than we need to when all we care for is type \"\n\"information that is only relevant at compile-time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"Demonstrate: remove the `tag` value entirely, then compile!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"This won't compile, as there's an unused (phantom) type parameter.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"This is where `PhantomData` comes in!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Demonstrate: Uncomment the `PhantomData` import, and make `ChatId<T>` the \"\n\"following:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"`PhantomData<T>` is a zero-sized type with a type parameter. We can \"\n\"construct values of it like other ZSTs with `let phantom: \"\n\"PhantomData<UserTag> = PhantomData;` or with the `PhantomData::default()` \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"Demonstrate: implement `From<u64>` for `ChatId<T>`, emphasizing the \"\n\"construction of `PhantomData`\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"// Or `PhantomData::default()`\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-02-types-implemented.md\nmsgid \"\"\n\"`PhantomData` can be used as part of the Typestate pattern to have data with \"\n\"the same structure but different methods, e.g., have `TaggedData<Start>` \"\n\"implement methods or trait implementations that `TaggedData<End>` doesn't.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"PhantomData 3/4: Lifetimes for External Resources\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"The invariants of external resources often match what we can do with \"\n\"lifetime rules.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"/// Direct FFI to a database library in C.\\n\"\n\"/// We got this API as is, we have no influence over it.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"// maximum 255 databases open at the same time\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"// ... etc.\\n\"\nmsgstr \"// ... vb.\\n\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Remember the transaction API from the [Aliasing XOR Mutability](./aliasing-\"\n\"xor-mutability.md) example.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"We held onto a mutable reference to the database connection within the \"\n\"transaction type to lock out the database while a transaction is active.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"In this example, we want to implement a `Transaction` API on top of an \"\n\"external, non-Rust API.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"We start by defining a `Transaction` type that holds onto `&mut \"\n\"DatabaseConnection`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Ask: What are the limits of this implementation? Assume the `u8` is accurate \"\n\"implementation-wise and enough information for us to use the external API.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Indirection takes up 7 bytes more than we need to on a 64-bit platform, as \"\n\"well as costing a pointer dereference at runtime.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Problem: We want the transaction to borrow the database connection that \"\n\"created it, but we don't want the `Transaction` object to store a real \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Ask: What happens when we remove the mutable reference in `Transaction` \"\n\"while keeping the lifetime parameter?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"Expect: Unused lifetime parameter!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Like with the type tagging from the previous slides, we can bring in \"\n\"`PhantomData` to capture this unused lifetime parameter for us.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"The difference is that we will need to use the lifetime alongside another \"\n\"type, but that other type does not matter too much.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"Demonstrate: change `Transaction` to the following:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"Update the `DatabaseConnection::new_transaction()` method:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"This gives an owned database connection that is tied to the \"\n\"`DatabaseConnection` that created it, but with less runtime memory footprint \"\n\"that the store-a-reference version did.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"Because `PhantomData` is a zero-sized type (like `()` or `struct \"\n\"MyZeroSizedType;`), the size of `Transaction` is now the same as `u8`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"The implementation that held onto a reference instead was as large as a \"\n\"`usize`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"This way of encoding relationships between types and values is very powerful \"\n\"when combined with unsafe, as the ways one can manipulate lifetimes becomes \"\n\"almost arbitrary. This is also dangerous, but when combined with tools like \"\n\"external, mechanically-verified proofs we can safely encode cyclic/self-\"\n\"referential types while encoding lifetime & safety expectations in the \"\n\"relevant data types.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-03-lifetimes.md\nmsgid \"\"\n\"The [GhostCell (2021)](https://plv.mpi-sws.org/rustbelt/ghostcell/) paper \"\n\"and its [relevant implementation](https://gitlab.mpi-sws.org/FP/ghostcell) \"\n\"show this kind of work off. While the borrow checker is restrictive, there \"\n\"are still ways to use escape hatches and then _show that the ways you used \"\n\"those escape hatches are consistent and safe._\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"PhantomData 4/4: OwnedFd & BorrowedFd\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"`BorrowedFd` is a prime example of `PhantomData` in action.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"// Create a file with a raw syscall with write-only and create permissions.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\\\"c_str.txt\\\"\"\nmsgstr \"\\\"c_str.txt\\\"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"// Pass the ownership of an integer file descriptor to an `OwnedFd`.\\n\"\n\"    // `OwnedFd::drop()` closes the file descriptor.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\\\"Could not open file with syscall!\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"// Create a `BorrowedFd` from an `OwnedFd`.\\n\"\n\"    // `BorrowedFd::drop()` does not close the file because it doesn't own \"\n\"it!\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"// std::mem::drop(owned_fd); // ❌🔨\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"// owned_fd will be dropped here, and the file will be closed.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"A file descriptor represents a specific process's access to a file.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"Reminder: Device and OS-specific features are exposed as if they were files \"\n\"on unix-style systems.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"[`OwnedFd`](https://rust-lang.github.io/rfcs/3128-io-safety.html#ownedfd-and-\"\n\"borrowedfdfd) is an owned wrapper type for a file descriptor. It _owns_ the \"\n\"file descriptor, and closes it when dropped.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"Note: We have our own implementation of it here, draw attention to the \"\n\"explicit `Drop` implementation.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"`BorrowedFd` is its borrowed counterpart, it does not need to close the file \"\n\"when it is dropped.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"Note: We have not explicitly implemented `Drop` for `BorrowedFd`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"`BorrowedFd` uses a lifetime captured with a `PhantomData` to enforce the \"\n\"invariant \\\"if this file descriptor exists, the OS file descriptor is still \"\n\"open even though it is not responsible for closing that file descriptor.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"The lifetime parameter of `BorrowedFd` demands that there exists another \"\n\"value in your program that lasts as long as that specific `BorrowedFd` or \"\n\"outlives it (in this case an `OwnedFd`).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"Demonstrate: Uncomment the `std::mem::drop(owned_fd)` line and try to \"\n\"compile to show that `borrowed_fd` relies on the lifetime of `owned_fd`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"This has been encoded by the API designers to mean _that other value is what \"\n\"keeps the access to the file open_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/borrow-checker-invariants/phantomdata-04-borrowedfd.md\nmsgid \"\"\n\"Because Rust's borrow checker enforces this relationship where one value \"\n\"must last at least as long as another, users of this API do not need to \"\n\"worry about handling this correct file descriptor aliasing and closing logic \"\n\"themselves.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Types with private constructors can be used to act as proof of invariants.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"// A public type with private fields behind a module boundary.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\\\"We have a token, so we can make assumptions.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"// We have a token, so we can do this work.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"// We could not get a token, so we can't call `protected_work`.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Motivation: We want to be able to restrict user's access to functionality \"\n\"until they've performed a specific task.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"We can do this by defining a type the API consumer cannot construct on their \"\n\"own, through the privacy rules of structs and modules.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"[Newtypes](./newtype-pattern.md) use the privacy rules in a similar way, to \"\n\"restrict construction unless a value is guaranteed to hold up an invariant \"\n\"at runtime.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"Ask: What is the purpose of the `proof: ()` field here?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Without `proof: ()`, `Token` would have no private fields and users would be \"\n\"able to construct values of `Token` arbitrarily.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Demonstrate: Try to construct the token manually in `main` and show the \"\n\"compilation error. Demonstrate: Remove the `proof` field from `Token` to \"\n\"show how users would be able to construct `Token` if it had no private \"\n\"fields.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"By putting the `Token` type behind a module boundary (`token`), users \"\n\"outside that module can't construct the value on their own as they don't \"\n\"have permission to access the `proof` field.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"The API developer gets to define methods and functions that produce these \"\n\"tokens. The user does not.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"The token becomes a proof that one has met the API developer's conditions of \"\n\"access for those tokens.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Ask: How might an API developer accidentally introduce ways to circumvent \"\n\"this?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types.md\nmsgid \"\"\n\"Expect answers like \\\"serialization implementations\\\", other parser/\\\"from \"\n\"string\\\" implementations, or an implementation of `Default`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"Token types work well as a proof of checked permission.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\\\"Password123\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"// We don't have to check that we have permissions, because\\n\"\n\"// the AdminToken argument is equivalent to such a check.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\\\"CoolUser\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\\\"Incorrect password! Could not prove privileges.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"This example shows modelling gaining administrator privileges for a chat \"\n\"client with a password and giving a user a moderator rank once those \"\n\"privileges are gained. The `AdminToken` type acts as \\\"proof of correct user \"\n\"privileges.\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"The user asked for a password in-code and if we get the password correct, we \"\n\"get a `AdminToken` to perform administrator actions within a specific \"\n\"environment (here, a chat client).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"Once the permissions are gained, we can call the `add_moderator` function.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"We can't call that function without the token type, so by being able to call \"\n\"it at all all we can assume we have permissions.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/permission-tokens.md\nmsgid \"\"\n\"Demonstrate: Try to construct the `AdminToken` in `main` again to reiterate \"\n\"that the foundation of useful tokens is preventing their arbitrary \"\n\"construction.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"Sometimes, a token type needs additional data. A mutex guard is an example \"\n\"of a token that represents permission + data.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"// The acquired MutexGuard is proof of exclusive access.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"Mutexes enforce mutual exclusion of read/write access to a value. We've \"\n\"covered Mutexes earlier in this course already (See: RAII/Mutex), but here \"\n\"we're looking at `MutexGuard` specifically.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"`MutexGuard` is a value generated by a `Mutex` that proves you have read/\"\n\"write access at that point in time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"`MutexGuard` also holds onto a reference to the `Mutex` that generated it, \"\n\"with `Deref` and `DerefMut` implementations that give access to the data of \"\n\"`Mutex` while the underlying `Mutex` keeps that data private from the user.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"If `mutex.lock()` does not return a `MutexGuard`, you don't have permission \"\n\"to change the value within the mutex.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"Not only do you have no permission, but you have no means to access the \"\n\"mutex data unless you gain a `MutexGuard`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"This contrasts with C++, where mutexes and lock guards do not control access \"\n\"to the data itself, acting only as a flag that a user must remember to check \"\n\"every time they read or manipulate data.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/mutex-guard.md\nmsgid \"\"\n\"Demonstrate: make the `mutex` variable mutable then try to dereference it to \"\n\"change its value. Show how there's no deref implementation for it, and no \"\n\"other way to get to the data held by it other than getting a mutex guard.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"Variable-Specific Tokens (Branding 1/4)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"What if we want to tie a token to a specific variable?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"// Works fine!\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"// let data_2 = Bytes { bytes: vec![0, 1] };\\n\"\n\"        // data_2.get_proven(&token_1); // Panics! Can we prevent this?\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"What if we want to tie a token to a _specific variable_ in our code? Can we \"\n\"do this in Rust's type system?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Motivation: We want to have a Token Type that represents a known, valid \"\n\"index into a byte array.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Once we have these proven indexes we would be able to avoid bounds checks \"\n\"entirely, as the tokens would act as the _proof of an existing index_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Since the index is known to be valid, `get_proven()` can skip the bounds \"\n\"check.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"In this example there's nothing stopping the proven index of one array being \"\n\"used on a different array. If an index is out of bounds in this case, it is \"\n\"undefined behavior.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"Demonstrate: Uncomment the `data_2.get_proven(&token_1);` line.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"The code here panics! We want to prevent this \\\"crossover\\\" of token types \"\n\"for indexes at compile time.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"Ask: How might we try to do this?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Expect students to not reach a good implementation from this, but be willing \"\n\"to experiment and follow through on suggestions.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"Ask: What are the alternatives, why are they not good enough?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Expect runtime checking of index bounds, especially as both `Vec::get` and \"\n\"`Bytes::get_index` already uses runtime checking.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"Runtime bounds checking does not prevent the erroneous crossover in the \"\n\"first place, it only guarantees a panic.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"The kind of token-association we will be doing here is called Branding. This \"\n\"is an advanced technique that expands applicability of token types to more \"\n\"API designs.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-01-motivation.md\nmsgid \"\"\n\"[`GhostCell`](https://plv.mpi-sws.org/rustbelt/ghostcell/paper.pdf) is a \"\n\"prominent user of this, later slides will touch on it.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"`PhantomData` and Lifetime Subtyping (Branding 2/4)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"Idea:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"Use a lifetime as a unique brand for each token.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Make lifetimes sufficiently distinct so that they don't implicitly convert \"\n\"into each other.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"// The main focus\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"// We want this to NOT compile\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"In Rust, lifetimes can have subtyping relations between one another.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"This kind of relation allows the compiler to determine if one lifetime \"\n\"outlives another.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Determining if a lifetime outlives another also allows us to say _the \"\n\"shortest common lifetime is the one that ends first_.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"This is useful in many cases, as it means two different lifetimes can be \"\n\"treated as if they were the same in the regions they do overlap.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"This is usually what we want. But here we want to use lifetimes as a way to \"\n\"distinguish values so we say that a token only applies to a single variable \"\n\"without having to create a newtype for every single variable we declare.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"**Goal**: We want two lifetimes that the rust compiler cannot determine if \"\n\"one outlives the other.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"We are using `try_coerce_lifetimes` as a compile-time check to see if the \"\n\"lifetimes have a common shorter lifetime (AKA being subtyped).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Note: This slide compiles, by the end of this slide it should only compile \"\n\"when `subtyped_lifetimes` is commented out.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"There are two important parts of this code:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"The `impl for<'a>` bound on the closure passed to `lifetime_separator`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"The way lifetimes are used in the parameter for `PhantomData`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"`for<'a>` bound on a Closure\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"We are using `for<'a>` as a way of introducing a lifetime generic parameter \"\n\"to a function type and asking that the body of the function to work for all \"\n\"possible lifetimes.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"What this also does is remove some ability of the compiler to make \"\n\"assumptions about that specific lifetime for the function argument, as it \"\n\"must meet rust's borrow checking rules regardless of the \\\"real\\\" lifetime \"\n\"its arguments are going to have. The caller is substituting in actual \"\n\"lifetime, the function itself cannot.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"This is analogous to a forall (Ɐ) quantifier in mathematics, or the way we \"\n\"introduce `<T>` as type variables, but only for lifetimes in trait bounds.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"When we write a function generic over a type `T`, we can't determine that \"\n\"type from within the function itself. Even if we call a function `fn foo<T, \"\n\"U>(first: T, second: U)` with two arguments of the same type, the body of \"\n\"this function cannot determine if `T` and `U` are the same type.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"This also prevents _the API consumer_ from defining a lifetime themselves, \"\n\"which would allow them to circumvent the restrictions we want to impose.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"PhantomData and Lifetime Variance\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"We already know `PhantomData`, which can introduce a formal no-op usage of \"\n\"an otherwise unused type or a lifetime parameter.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"Ask: What can we do with `PhantomData`?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Expect mentions of the Typestate pattern, tying together the lifetimes of \"\n\"owned values.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"Ask: In other languages, what is subtyping?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Expect mentions of inheritance, being able to use a value of type `B` when a \"\n\"asked for a value of type `A` because `B` is a \\\"subtype\\\" of `A`.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"Rust does have Subtyping! But only for lifetimes.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Ask: If one lifetime is a subtype of another lifetime, what might that mean?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"A lifetime is a \\\"subtype\\\" of another lifetime when it _outlives_ that \"\n\"other lifetime.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"The way that lifetimes used by `PhantomData` behave depends not only on \"\n\"where the lifetime \\\"comes from\\\" but on how the reference is defined too.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"The reason this compiles is that the [**Variance**](https://doc.rust-lang.\"\n\"org/stable/reference/subtyping.html#r-subtyping.variance) of the lifetime \"\n\"inside of `InvariantLifetime` is too lenient.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Note: Do not expect to get students to understand variance entirely here, \"\n\"just treat it as a kind of ladder of restrictiveness on the ability of \"\n\"lifetimes to establish subtyping relations.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Ask: How can we make it more restrictive? How do we make a reference type \"\n\"more restrictive in rust?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Expect or demonstrate: Making it `&'id mut ()` instead. This will not be \"\n\"enough!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"We need to use a [**Variance**](https://doc.rust-lang.org/stable/reference/\"\n\"subtyping.html#r-subtyping.variance) on lifetimes where subtyping cannot be \"\n\"inferred except on _identical lifetimes_. That is, the only subtype of `'a` \"\n\"the compiler can know is `'a` itself.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Note: Again, do not try to get the whole class to understand variance. Treat \"\n\"it as a ladder of restrictiveness for now.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Demonstrate: Move from `&'id ()` (covariant in lifetime and type), `&'id mut \"\n\"()` (covariant in lifetime, invariant in type), `*mut &'id mut ()` \"\n\"(invariant in lifetime and type), and finally `*mut &'id ()` (invariant in \"\n\"lifetime but not type).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Those last two should not compile, which means we've finally found \"\n\"candidates for how to bind lifetimes to `PhantomData` so they can't be \"\n\"compared to one another in this context.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Reason: `*mut` means [mutable raw pointer](https://doc.rust-lang.org/\"\n\"reference/types/pointer.html#r-type.pointer.raw). Rust has mutable pointers! \"\n\"But you cannot reason about them in safe rust. Making this a mutable raw \"\n\"pointer to a reference that has a lifetime complicates the compiler's \"\n\"ability subtype because it cannot reason about mutable raw pointers within \"\n\"the borrow checker.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"Wrap up: We've introduced ways to stop the compiler from deciding that \"\n\"lifetimes are \\\"similar enough\\\" by choosing a Variance for a lifetime in \"\n\"`PhantomData` that is restrictive enough to prevent this slide from \"\n\"compiling.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"That is, we can now create variables that can exist in the same scope as \"\n\"each other, but whose types are automatically made different from one \"\n\"another per-variable without much boilerplate.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-02-phantomdata.md\nmsgid \"\"\n\"The `for<'a>` quantifier is not just for function types. It is a [**Higher-\"\n\"ranked trait bound**](https://doc.rust-lang.org/reference/subtyping.html?\"\n\"search=Hiher#r-subtype.higher-ranked).\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Implementing Branded Types (Branding 3/4)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Constructing branded types is different to how we construct non-branded \"\n\"types.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"// The data we want to modify in this context.\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"// The function that uniquely brands the lifetime of a `Bytes`\\n\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Motivation: We want to have \\\"proven indexes\\\" for a type, and we don't want \"\n\"those indexes to be usable by different variables of the same type. We also \"\n\"don't want those indexes to escape a scope.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Our Branded Type will be `Bytes`: a byte array.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Our Branded Token will be `ProvenIndex`: an index known to be in range.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"There are several notable parts to this implementation:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"`new` does not return a `Bytes`, instead asking for \\\"starting data\\\" and a \"\n\"use-once Closure that is passed a `Bytes` when it is called.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"That `new` function has a `for<'a>` on its trait bound.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"We have both a getter for an index and a getter for a values with a proven \"\n\"index.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Ask: Why does `new` not return a `Bytes`?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Answer: Because we need `Bytes` to have a unique lifetime controlled by the \"\n\"API.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Ask: So what if `new()` returned `Bytes`, what is the specific harm that it \"\n\"would cause?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Answer: Think about the signature of that hypothetical `new()` method:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"`fn new<'a>() -> Bytes<'a> { ... }`\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"This would allow the API user to choose what the lifetime `'a` is, removing \"\n\"our ability to guarantee that the lifetimes between different instances of \"\n\"`Bytes` are unique and unable to be subtyped to one another.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Ask: Why do we need both a `get_index` and a `get_proven`?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Expect \\\"Because we can't know if an index is occupied at compile time\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"Ask: Then what's the point of the proven indexes?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Answer: Avoiding bounds checking while keeping knowledge of what indexes are \"\n\"occupied specific to individual variables, unable to erroneously be used on \"\n\"the wrong one.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-03-impl.md\nmsgid \"\"\n\"Note: The focus is not on only on avoiding overuse of bounds checks, but \"\n\"also on preventing that \\\"cross over\\\" of indexes.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"Branded Types in Action (Branding 4/4)\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"// bytes_2.get_proven(&index_1); // ❌🔨\\n\"\n\"            \\\"Computations done!\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\\\"{result}\\\"\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"We now have the implementation ready, we can now write a program where token \"\n\"types that are proofs of existing indexes cannot be shared between variables.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"Demonstration: Uncomment the `bytes_2.get_proven(&index_1);` line and show \"\n\"that it does not compile when we use indexes from different variables.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"Ask: What operations can we perform that we can guarantee would produce a \"\n\"proven index?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"Expect a \\\"push\\\" implementation, suggested demo:\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"Ask: Can we make this not just about a byte array, but as a general wrapper \"\n\"on `Vec<T>`?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"Trivial: Yes!\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"Maybe demonstrate: Generalising `Bytes<'id>` into `BrandedVec<'id, T>`\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"Ask: What other areas could we use something like this?\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"The resulting token API is **highly restrictive**, but the things that it \"\n\"makes possible to prove as safe within the Rust type system are meaningful.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"[GhostCell](https://plv.mpi-sws.org/rustbelt/ghostcell/paper.pdf), a \"\n\"structure that allows for safe cyclic data structures in Rust (among other \"\n\"previously difficult to represent data structures), uses this kind of token \"\n\"type to make sure cells can't \\\"escape\\\" a context where we know where \"\n\"operations similar to those shown in these examples are safe.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"This \\\"Branded Types\\\" sequence of slides is based off their `BrandedVec` \"\n\"implementation in the paper, which covers many of the implementation details \"\n\"of this use case in more depth as a gentle introduction to how `GhostCell` \"\n\"itself is implemented and used in practice.\"\nmsgstr \"\"\n\n#: src/idiomatic/leveraging-the-type-system/token-types/branded-04-in-action.md\nmsgid \"\"\n\"GhostCell also uses formal checks outside of Rust's type system to prove \"\n\"that the things it allows within this kind of context (lifetime branding) \"\n\"are safe.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"Welcome to Unsafe Rust\"\nmsgstr \"Emniyetsiz Rust'a Hoş Geldiniz\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"IMPORTANT: THIS MODULE IS IN AN EARLY STAGE OF DEVELOPMENT\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"Please do not consider this module of Comprehensive Rust to be complete. \"\n\"With that in mind, your feedback, comments, and especially your concerns, \"\n\"are very welcome.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"To comment on this module's development, please use the [GitHub issue \"\n\"tracker](https://github.com/google/comprehensive-rust/issues).\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"The `unsafe` keyword is easy to type, but hard to master. When used \"\n\"appropriately, it forms a useful and indeed essential part of the Rust \"\n\"programming language.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"By the end of this deep dive, you'll know how to work with `unsafe` code, \"\n\"review others' changes that include the `unsafe` keyword, and produce your \"\n\"own.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"What you'll learn:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"What the terms undefined behavior, soundness, and safety mean\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"Why the `unsafe` keyword exists in the Rust language\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"How to write your own code using `unsafe` safely\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"How to review `unsafe` code\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"Links to other sections of the course\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"The `unsafe` keyword has treatment in:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"_Rust Fundamentals_, the main module of Comprehensive Rust, includes a \"\n\"session on [Unsafe Rust](../unsafe-rust.html) in its last day.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"_Rust in Chromium_ discusses how to [interoperate with C++](../chromium/\"\n\"interoperability-with-cpp.md). Consult that material if you are looking into \"\n\"FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/welcome.md\nmsgid \"\"\n\"_Bare Metal Rust_ uses unsafe heavily to interact with the underlying host, \"\n\"among other things.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"Setting Up\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"Local Rust installation\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"\"\n\"You should have a Rust compiler installed that supports the 2024 edition of \"\n\"the language, which is any version of rustc higher than 1.84.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"(Optional) Create a local instance of the course\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"\"\n\"```console\\n\"\n\"$ git clone --depth=1 https://github.com/google/comprehensive-rust.git\\n\"\n\"Cloning into 'comprehensive-rust'...\\n\"\n\"...\\n\"\n\"$ cd comprehensive-rust\\n\"\n\"$ cargo install-tools\\n\"\n\"...\\n\"\n\"$ cargo serve # then open http://127.0.0.1:3000/ in a browser\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"\"\n\"Ask everyone to confirm that everyone is able to execute `rustc` with a \"\n\"version older that 1.87.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/setup.md\nmsgid \"\"\n\"For those people who do not, tell them that we'll resolve that in the break.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"We know that writing code without the guarantees that Rust provides ...\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"\"\n\"“Use-after-free (UAF), integer overflows, and out of bounds (OOB) reads/\"\n\"writes comprise 90% of vulnerabilities with OOB being the most common.”\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"\"\n\"\\\\--— **Jeff Vander Stoep and Chong Zang**, Google. \\\"[Queue the Hardening \"\n\"Enhancements](https://security.googleblog.com/2019/05/queue-hardening-\"\n\"enhancements.html)\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"... so why is `unsafe` part of the language?\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"1 minute\"\nmsgstr \"1 dakika\"\n\n#: src/unsafe-deep-dive/motivations.md\nmsgid \"\"\n\"The `unsafe` keyword exists because there is no compiler technology \"\n\"available today that makes it obsolete. Compilers cannot verify everything.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"TODO: Refactor this content into multiple slides as this slide is intended \"\n\"as an introduction to the motivations only, rather than to be an elaborate \"\n\"discussion of the whole problem.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Language interoperability allows you to:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Call functions written in other languages from Rust\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Write functions in Rust that are callable from other languages\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"However, this requires unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"{a:?}\\\"\"\nmsgstr \"\\\"{a:?}\\\"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"The Rust compiler can't enforce any safety guarantees for programs that it \"\n\"hasn't compiled, so it delegates that responsibility to you through the \"\n\"unsafe keyword.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"The code example we're seeing shows how to call the random function provided \"\n\"by libc within Rust. libc is available to scripts in the Rust Playground.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"This uses Rust's _foreign function interface_.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"This isn't the only style of interoperability, however it is the method \"\n\"that's needed if you want to work between Rust and some other language in a \"\n\"zero cost way. Another important strategy is message passing.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Message passing avoids unsafe, but serialization, allocation, data transfer \"\n\"and parsing all take energy and time.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Answers to questions\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"_Where does \\\"random\\\" come from?_  \\n\"\n\"libc is dynamically linked to Rust programs by default, allowing our code to \"\n\"rely on its symbols, including `random`, being available to our program.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"_What is the \\\"safe\\\" keyword?_  \\n\"\n\"It allows callers to call the function without needing to wrap that call in \"\n\"`unsafe`. The [`safe` function qualifier](https://doc.rust-lang.org/stable/\"\n\"edition-guide/rust-2024/unsafe-extern.html) was introduced in the 2024 \"\n\"edition of Rust and can only be used within `extern` blocks. It was \"\n\"introduced because `unsafe` became a mandatory qualifier for `extern` blocks \"\n\"in that edition.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"_What is the [`std::ffi::c_long`](https://doc.rust-lang.org/std/ffi/type.\"\n\"c_long.html) type?_  \\n\"\n\"According to the C standard, an integer that's at least 32 bits wide. On \"\n\"today's systems, It's an `i32` on Windows and an `i64` on Linux.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Consideration: type safety\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Modify the code example to remove the need for type casting later. Discuss \"\n\"the potential UB - long's width is defined by the target.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Changes from the original:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"It's also possible to completely ignore the intended type and create \"\n\"undefined behavior in multiple ways. The code below produces output most of \"\n\"the time, but generally results in a stack overflow. It may also produce \"\n\"illegal `char` values. Although `char` is represented in 4 bytes (32 bits), \"\n\"[not all bit patterns are permitted as a `char`](https://doc.rust-lang.org/\"\n\"std/primitive.char.html#validity-and-layout).\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Stress that the Rust compiler will trust that the wrapper is telling the \"\n\"truth.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Attempting to print a `[char; 2]` from randomly generated input will often \"\n\"produce strange output, including:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Mention that type safety is generally not a large concern in practice. Tools \"\n\"that produce wrappers automatically, i.e. bindgen, are excellent at reading \"\n\"header files and producing values of the correct type.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Consideration: Ownership and lifetime management\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"While libc's `random` function doesn't use pointers, many do. This creates \"\n\"many more possibilities for unsoundness.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"both sides might attempt to free the memory (double free)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"both sides can attempt to write to the data\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"For example, some C libraries expose functions that write to static buffers \"\n\"that are re-used between calls.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"/// Create a formatted time based on time `t`, including trailing newline.\\n\"\n\"    /// Read `man 3 ctime` details.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"now (1): {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"future:  {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"now (2): {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"_Aside:_ Lifetimes in the `format_timestamp()` function\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Neither `'a`, nor `'static`, correctly describe the lifetime of the string \"\n\"that's returned. Rust treats it as an immutable reference, but subsequent \"\n\"calls to `ctime` will overwrite the static buffer that the string occupies.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"Consideration: Representation mismatch\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Different programming languages have made different design decisions and \"\n\"this can create impedance mismatches between different domains.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\"\n\"Consider string handling. C++ defines `std::string`, which has an \"\n\"incompatible memory layout with Rust's `String` type. `String` also requires \"\n\"text to be encoded as UTF-8, whereas `std::string` does not. In C, text is \"\n\"represented by a null-terminated sequence of bytes (`char*`).\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"b\\\"Hello, C\\\\0\\\"\"\nmsgstr \"b\\\"Merhaba, C\\\\0\\\"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"b\\\"Hello, Rust\\\"\"\nmsgstr \"b\\\"Merhaba, Rust\\\"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"{c}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/interop.md\nmsgid \"\\\"{rust}\\\"\"\nmsgstr \"\\\"{rust}\\\"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"Some families of data structures are impossible to create in safe Rust.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"graphs\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"bit twiddling\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"self-referential types\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"intrusive data structures\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"\"\n\"Graphs: General-purpose graphs cannot be created as they may need to \"\n\"represent cycles. Cycles are impossible for the type system to reason about.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"\"\n\"Bit twiddling: Overloading bits with multiple meanings. Examples include \"\n\"using the NaN bits in `f64` for some other purpose or the higher-order bits \"\n\"of pointers on `x86_64` platforms. This is somewhat common when writing \"\n\"language interpreters to keep representations within the word size the \"\n\"target platform.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"Self-referential types are too hard for the borrow checker to verify.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/data-structures.md\nmsgid \"\"\n\"Intrusive data structures: store structural metadata (like pointers to other \"\n\"elements) inside the elements themselves, which requires careful handling of \"\n\"aliasing.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/performance.md\nmsgid \"TODO: Stub for now\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/motivations/performance.md\nmsgid \"\"\n\"It's easy to think of performance as the main reason for unsafe, but high \"\n\"performance code makes up the minority of unsafe blocks.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations.md\nmsgid \"Some fundamental concepts and terms.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations.md\nmsgid \"This segment should take about 25 minutes. It contains:\"\nmsgstr \"Bu bölüm yaklaşık 25 dakika sürmelidir. İçeriği:\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"What is “unsafety”?\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Unsafe Rust is a superset of Safe Rust.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Let's create a list of things that are enabled by the `unsafe` keyword.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Definitions from authoritative docs:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"From the [unsafe keyword's documentation]():\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Code or interfaces whose memory safety cannot be verified by the type system.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"...\"\nmsgstr \"...\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Here are the abilities Unsafe Rust has in addition to Safe Rust:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Dereference raw pointers\"\nmsgstr \"Bir ham göstericinin (raw pointer) içeriğine eriş (dereference)\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Implement unsafe traits\"\nmsgstr \"Emniyetsiz özelliklerin (unsafe traits) gerçekleştirilmesi\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Call unsafe functions\"\nmsgstr \"Emniyetsiz (Unsafe) fonksiyonları çağırma\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Mutate statics (including external ones)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Access fields of unions\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"From the [reference](https://doc.rust-lang.org/reference/unsafety.html)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"The following language level features cannot be used in the safe subset of \"\n\"Rust:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Dereferencing a raw pointer.\"\nmsgstr \"Bir ham göstericinin (raw pointer) içeriğine erişmek (dereferencing).\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Reading or writing a mutable or external static variable.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Accessing a field of a union, other than to assign to it.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Calling an unsafe function (including an intrinsic or foreign function).\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Calling a safe function marked with a target_feature from a function that \"\n\"does not have a target_feature attribute enabling the same features (see \"\n\"attributes.codegen.target_feature.safety-restrictions).\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Implementing an unsafe trait.\"\nmsgstr \"Bir emniyetsiz özelliğin (unsafe trait) gerçekleştirilmesi.\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Declaring an extern block.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Applying an unsafe attribute to an item.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Group exercise\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"You may have a group of learners who are not familiar with each other yet. \"\n\"This is a way for you to gather some data about their confidence levels and \"\n\"the psychological safety that they're feeling.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Part 1: Informal definition\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Use this to gauge the confidence level of the group. If they are uncertain, \"\n\"then tailor the next section to be more directed.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Ask the class: **By raising your hand, indicate if you would feel \"\n\"comfortable defining unsafe?**\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"If anyone's feeling confident, allow them to try to explain.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Part 2: Evidence gathering\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Ask the class to spend 3-5 minutes.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Find a use of the unsafe keyword. What contract/invariant/pre-condition is \"\n\"being established or satisfied?\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Write down terms that need to be defined (unsafe, memory safety, soundness, \"\n\"undefined behavior)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Part 3: Write a working definition\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Part 4: Remarks\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"Mention that we'll be reviewing our definition at the end of the day.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Note: Avoid detailed discussion about precise semantics of memory safety\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"It's possible that the group will slide into a discussion about the precise \"\n\"semantics of what memory safety actually is and how define pointer validity. \"\n\"This isn't a productive line of discussion. It can undermine confidence in \"\n\"less experienced learners.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Perhaps refer people who wish to discuss this to the discussion within the \"\n\"official [documentation for pointer types](https://doc.rust-lang.org/std/ptr/\"\n\"index.html#safety) (excerpt below) as a place for further research.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"\"\n\"Many functions in [this module](https://doc.rust-lang.org/std/ptr/index.\"\n\"html) take raw pointers as arguments and read from or write to them. For \"\n\"this to be safe, these pointers must be _valid_ for the given access.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/what-is-unsafe.md\nmsgid \"The precise rules for validity are not determined yet.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"The unsafe keyword indicates that the programmer is responsible for \"\n\"upholding Rust's safety guarantees.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"The keyword has two roles:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"define pre-conditions that must be satisfied\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"assert to the compiler (= promise) that those defined pre-conditions are \"\n\"satisfied\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"Further references\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"[The unsafe keyword chapter of the Rust Reference](https://doc.rust-lang.org/\"\n\"reference/unsafe-keyword.html)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"Places where pre-conditions can be defined (Role 1)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"[unsafe functions](https://doc.rust-lang.org/reference/unsafe-keyword.\"\n\"html#unsafe-functions-unsafe-fn) (`unsafe fn foo() { ... }`). Example: \"\n\"`get_unchecked` method on slices, which requires callers to verify that the \"\n\"index is in-bounds.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"unsafe traits (`unsafe trait`). Examples: [`Send`](https://doc.rust-lang.org/\"\n\"std/marker/trait.Send.html) and [`Sync`](https://doc.rust-lang.org/std/\"\n\"marker/trait.Sync.html) marker traits in the standard library.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"Places where pre-conditions must be satisfied (Role 2)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"unsafe blocks (`unafe { ... }`)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"implementing unsafe traits (`unsafe impl`)\"\nmsgstr \"\"\n\"emniyetsiz özelliklerin (unsafe traits / `unsafe impl`) gerçekleştirilmesi\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"access external items (`unsafe extern`)\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/when-is-unsafe-used.md\nmsgid \"\"\n\"adding [unsafe attributes](https://doc.rust-lang.org/reference/attributes.\"\n\"html) o an item. Examples: [`export_name`](https://doc.rust-lang.org/\"\n\"reference/abi.html#the-export_name-attribute), [`link_section`](https://doc.\"\n\"rust-lang.org/reference/abi.html#the-link_section-attribute) and \"\n\"[`no_mangle`](https://doc.rust-lang.org/reference/abi.html#the-no_mangle-\"\n\"attribute). Usage: `#[unsafe(no_mangle)]`\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md\nmsgid \"Data structures are safe ...\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md\nmsgid \"Data structures are inert. They cannot do any harm by themselves.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md\nmsgid \"Safe Rust code can create raw pointers:\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md\n#: src/unsafe-deep-dive/foundations/actions-might-not-be.md\nmsgid \"\\\"{safe:p}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/data-structures-are-safe.md\nmsgid \"\"\n\"Consider a raw pointer to an integer, i.e., the value `safe` is the raw \"\n\"pointer type `*const i64`. Raw pointers can be out-of-bounds, misaligned, or \"\n\"be null. But the unsafe keyword is not required when creating them.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/actions-might-not-be.md\nmsgid \"... but actions on them might not be\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/actions-might-not-be.md\nmsgid \"Modify the example to de-reference `safe` without an `unsafe` block.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"The `unsafe` keyword does not allow you to break Rust.\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"b\\\"RUST\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Suggested outline\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Request that someone explains what `std::mem::transmute` does\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Discuss why it doesn't compile\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Fix the code\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Expected compiler output\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Suggested change\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"Notes on less familiar Rust\"\nmsgstr \"\"\n\n#: src/unsafe-deep-dive/foundations/less-powerful.md\nmsgid \"\"\n\"the `b` prefix on a string literal marks it as byte slice (`&[u8]`) rather \"\n\"than a string slice (`&str`)\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"Thank you for reading the speaker notes! We hope they have been useful. If \"\n\"you find pages without notes, please send us a PR and link it to [issue \"\n\"#1083](https://github.com/google/comprehensive-rust/issues/1083). We are \"\n\"also very grateful for fixes and improvements to the existing notes.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/review.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"array:  \\n\"\n\"A fixed-size collection of elements of the same type, stored contiguously in \"\n\"memory. See [Arrays](tuples-and-arrays/arrays.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"associated type:  \\n\"\n\"A type associated with a specific trait. Useful for defining the \"\n\"relationship between types.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](borrowing/shared.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all [borrows](borrowing/\"\n\"borrowck.md) are valid.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit [_blocks_](control-flow-\"\n\"basics/blocks-and-scopes.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time. See [Welcome \"\n\"to Concurrency in Rust](concurrency/welcome.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program. See [const]\"\n\"(user-defined-types/const.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program. See [Control Flow Basics](control-flow-basics.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program. See [panic]\"\n\"(error-handling/panics.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct. See [enum](user-defined-types/enums.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior. \"\n\"See [Error Handling](error-handling.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to [errors](error-handling.md) that \"\n\"occur during program execution.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task. See [Functions]\"\n\"(control-flow-basics/functions.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use. See [Approaches to Memory Management](memory-management/\"\n\"approaches.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types. See [Generics](generics.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation. See [Variables](types-and-values/\"\n\"variables.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system. See [Other Types of Tests](testing/other.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs. \"\n\"See [Modules](modules.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust [macros](control-flow-basics/macros.md) can be recognized by a `!` in \"\n\"the name. Macros are used when normal functions are not enough. A typical \"\n\"example is `format!`, which takes a variable number of arguments, which \"\n\"isn't supported by Rust functions.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the [`main` function](types-and-values/\"\n\"hello-world.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for [pattern matching](pattern-\"\n\"matching.md) on the value of an expression.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage. See [Approaches to \"\n\"Memory Management](memory-management/approaches.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust. See [Methods]\"\n\"(methods-and-traits/methods.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust. See [Modules](modules.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust. \"\n\"See [Move Semantics](memory-management/move.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows [variables](types-and-values/variables.md) to \"\n\"be modified after they have been declared.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value. See [Ownership](memory-\"\n\"management/ownership.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program. See [Panics](error-handling/panics.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust. See [Pattern Matching](pattern-matching.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust [method](methods-and-traits/methods.md) that \"\n\"represents the instance on which the method is called.\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference:  \\n\"\n\"A non-owning pointer to a value that borrows it without transferring \"\n\"ownership. References can be [shared (immutable)](references/shared.md) or \"\n\"[exclusive (mutable)](references/exclusive.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero. See \"\n\"[Rc](smart-pointers/rc.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency. See [What is Rust?](hello-world/what-is-rust.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors. See [Unsafe Rust](unsafe-rust.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"slice:  \\n\"\n\"A dynamically-sized view into a contiguous sequence, such as an array or \"\n\"vector. Unlike arrays, slices have a size determined at runtime. See [Slices]\"\n\"(references/slices.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used. See \"\n\"[Blocks and Scopes](control-flow-basics/blocks-and-scopes.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust. See \"\n\"[Standard Library](std-types/std.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime. See [static](user-defined-types/static.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name. See [Structs](user-defined-types/named-structs.\"\n\"md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A function that tests the correctness of other code. Rust has a built-in \"\n\"test runner. See [Testing](testing.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent \"\n\"execution. See [Threads](concurrency/threads.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment. See [Send and Sync](concurrency/send-sync.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust. See [Traits](methods-and-traits/traits.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest. See [Trait Bounds](generics/trait-bounds.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers. See [Tuples]\"\n\"(tuples-and-arrays/tuples.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust. See [Types and Values](types-and-values.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression. See [Type Inference](types-and-values/inference.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior. See [Unsafe Rust](unsafe-rust.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time. \"\n\"See [Unions](unsafe-rust/unions.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members. See speaker \"\n\"notes on [Functions](control-flow-basics/functions.html).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe-rust/unsafe.md).\"\nmsgstr \"\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_. See \"\n\"[Variables](types-and-values/variables.md).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust API Guidelines](https://rust-lang.github.io/api-guidelines/): \"\n\"recommendations on how to design APIs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): covers Rust from the perspective of developers who \"\n\"write firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-\"\n\"testing/): a self-paced workshop that goes beyond Rust's built-in testing \"\n\"framework. It covers `googletest`, snapshot testing, mocking as well as how \"\n\"to write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/): \"\n\"covers many details on Rust macros with practical examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#~ msgid \"Lifetime Annotations\"\n#~ msgstr \"Ömür için Ek Açıklamalar (Annotations)\"\n\n#~ msgid \"Day 2 Morning (2 hours and 45 minutes, including breaks)\"\n#~ msgstr \"2. Gün Sabah (2 saat 45 dakika, aralar dahil)\"\n\n#~ msgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\n#~ msgstr \"3. Gün Öğleden Sonra (1 saat 55 dakika, aralar dahil)\"\n\n#~ msgid \"Rust has hygienic macros, `println!` is an example of this.\"\n#~ msgstr \"\"\n#~ \"Rust arınmış/pak/izole (hygienic) makrolara sahiptir, `println!` buna bir \"\n#~ \"örnektir.\"\n\n#~ msgid \"\"\n#~ \"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n#~ \"from the scope they are used in. Rust macros are actually only [partially \"\n#~ \"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n#~ \"html).\"\n#~ msgstr \"\"\n#~ \"Makroların 'arınmış/pak' olması, kullanıldıkları kapsamdaki (scope) \"\n#~ \"tanımlayıcıları (identifiers) yanlışlıkla yakalamadıkları anlamına gelir. \"\n#~ \"Rust makroları aslında yalnızca [kısmi paktır (hygienic)](https://veykril.\"\n#~ \"github.io/tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#~ msgid \"`..` can expand as much as it needs to be\"\n#~ msgstr \"`..` gerektiği kadar genişleyebilir\"\n\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n#~ \"minutes. It contains:\"\n#~ msgstr \"\"\n#~ \"Bu oturum 10 dakikalık aralar dahil yaklaşık 1 saat 55 dakika sürmelidir. \"\n#~ \"İçeriği:\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 25 minutes. It \"\n#~ \"contains:\"\n#~ msgstr \"\"\n#~ \"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 45 dakika sürmelidir. \"\n#~ \"İçeriği:\"\n\n#~ msgid \"\"\n#~ \"On Debian/Ubuntu, you can also install Cargo, the Rust source and the \"\n#~ \"[Rust formatter](https://github.com/rust-lang/rustfmt) via `apt`. \"\n#~ \"However, this gets you an outdated Rust version and may lead to \"\n#~ \"unexpected behavior. The command would be:\"\n#~ msgstr \"\"\n#~ \"Debian/Ubuntu'da ayrıca `apt` aracılığıyla Cargo'yu, Rust kaynak kodunu \"\n#~ \"ve [Rust biçimlendiricisini (formatter)](https://github.com/rust-lang/\"\n#~ \"rustfmt) kurabilirsiniz. Ancak bu size eski bir Rust sürümü verir ve \"\n#~ \"beklenmeyen davranışlara yol açabilir. Komut şu şekilde olacaktır:\"\n\n#~ msgid \"\"\n#~ \"Slices are covered on day 3. For now, students only need to know that a \"\n#~ \"value of type `Vec` gives access to all of the documented slice methods, \"\n#~ \"too.\"\n#~ msgstr \"\"\n#~ \"Dilimler (slices) 3. günde ele alınacak. Şimdilik, öğrencilerin sadece \"\n#~ \"`Vec` türündeki bir değerin, belgelenmiş tüm dilim (slice) metotlarına da \"\n#~ \"erişim sağladığını bilmeleri yeterlidir.\"\n\n#~ msgid \"Scopes and Shadowing\"\n#~ msgstr \"Kapsamlar (Scopes) ve Gölgeleme (Shadowing)\"\n\n#~ msgid \"Struct Lifetimes\"\n#~ msgstr \"Yapıların Ömürleri\"\n\n#~ msgid \"`FromIterator`\"\n#~ msgstr \"`FromIterator`\"\n\n#~ msgid \"Test Modules\"\n#~ msgstr \"Test Modülleri\"\n\n#~ msgid \"Calling C with Bindgen\"\n#~ msgstr \"Bindgen ile Rust Tarafından C'yi Kullanma\"\n\n#~ msgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\n#~ msgstr \"2. Gün Öğleden Sonra (3 saat 15 dakika, aralar dahil)\"\n\n#~ msgid \"\"\n#~ \"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n#~ \"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n#~ \"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi]\"\n#~ \"(https://github.com/moaminsharifi), [@hamidrezakp](https://github.com/\"\n#~ \"hamidrezakp) and [@mehrad77](https://github.com/mehrad77).\"\n#~ msgstr \"\"\n#~ \"[Farsça](https://google.github.io/comprehensive-rust/fa/) yazanlar: \"\n#~ \"[@DannyRavi](https://github.com/DannyRavi), [@javad-jafari](https://\"\n#~ \"github.com/javad-jafari), [@Alix1383](https://github.com/alix1383), \"\n#~ \"[@moaminsharifi](https://github.com/moaminsharifi), [@hamidrezakp]\"\n#~ \"(https://github.com/hamidrezakp) ve [@mehrad77](https://github.com/\"\n#~ \"mehrad77).\"\n\n#~ msgid \"Pattern matching: destructuring enums, structs, and arrays.\"\n#~ msgstr \"\"\n#~ \"Desen eşleştirme: numaralandırmaların (enums), yapıların ve dizilerin \"\n#~ \"ayrıştırılması (destructuring).\"\n\n#~ msgid \"\\\"Final x: {x}\\\"\"\n#~ msgstr \"\\\"Son x: {x}\\\"\"\n\n#~ msgid \"\\\"elem: {elem}\\\"\"\n#~ msgstr \"\\\"elem: {elem}\\\"\"\n\n#~ msgid \"\\\"{i}\\\"\"\n#~ msgstr \"\\\"{i}\\\"\"\n\n#~ msgid \"\\\"elements searched: {elements_searched}\\\"\"\n#~ msgstr \"\\\"aranan öğeler: {elements_searched}\\\"\"\n\n#~ msgid \"Blocks\"\n#~ msgstr \"Bloklar\"\n\n#~ msgid \"\\\"y: {y}\\\"\"\n#~ msgstr \"\\\"y: {y}\\\"\"\n\n#~ msgid \"\"\n#~ \"You can shadow variables, both those from outer scopes and variables from \"\n#~ \"the same scope:\"\n#~ msgstr \"\"\n#~ \"Hem dış kapsamlardaki (outer scopes) değişkenleri hem de aynı kapsamdaki \"\n#~ \"değişkenleri gölgeleyebilirsiniz (shadow):\"\n\n#~ msgid \"\\\"before: {a}\\\"\"\n#~ msgstr \"\\\"önce: {a}\\\"\"\n\n#~ msgid \"\\\"inner scope: {a}\\\"\"\n#~ msgstr \"\\\"iç kapsam: {a}\\\"\"\n\n#~ msgid \"\\\"shadowed in inner scope: {a}\\\"\"\n#~ msgstr \"\\\"iç kapsamda gölgelendi: {a}\\\"\"\n\n#~ msgid \"\\\"after: {a}\\\"\"\n#~ msgstr \"\\\"sonra: {a}\\\"\"\n\n#~ msgid \"\"\n#~ \"Show that a variable's scope is limited by adding a `b` in the inner \"\n#~ \"block in the last example, and then trying to access it outside that \"\n#~ \"block.\"\n#~ msgstr \"\"\n#~ \"Son örnekte iç bloğa (inner block) bir `b` ekleyerek ve ardından bu \"\n#~ \"bloğun dışından ona erişmeye çalışarak bir değişkenin kapsamının (scope) \"\n#~ \"sınırlı olduğunu gösterin.\"\n\n#~ msgid \"\"\n#~ \"Shadowing is different from mutation, because after shadowing both \"\n#~ \"variables' memory locations exist at the same time. Both are available \"\n#~ \"under the same name, depending where you use it in the code.\"\n#~ msgstr \"\"\n#~ \"Gölgeleme (shadowing) mutasyondan (mutation) farklıdır çünkü gölgeleme \"\n#~ \"sonrasında her iki değişkenin de bellek konumları aynı anda mevcuttur. \"\n#~ \"Her ikisi de kodda nerede kullandığınıza bağlı olarak aynı ad altında \"\n#~ \"mevcuttur.\"\n\n#~ msgid \"A shadowing variable can have a different type.\"\n#~ msgstr \"Bir gölgeleme (shadowing) değişkeni farklı bir türe sahip olabilir.\"\n\n#~ msgid \"\"\n#~ \"Shadowing looks obscure at first, but is convenient for holding on to \"\n#~ \"values after `.unwrap()`.\"\n#~ msgstr \"\"\n#~ \"Gölgelendirme ilk başta anlaşılmaz görünebilir, ancak `.unwrap()` \"\n#~ \"sonrasındaki değerleri korumak için kullanışlıdır.\"\n\n#~ msgid \"\"\n#~ \"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n#~ \"panic.\"\n#~ msgstr \"\"\n#~ \"`unreachable!()` kodun bir kısmını erişilemez (unreachable) olarak \"\n#~ \"işaretler. Eğer yürütülürse, paniğe neden olur.\"\n\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n#~ \"minutes. It contains:\"\n#~ msgstr \"\"\n#~ \"10 dakikalık aralar, bu oturum yaklaşık 2 saat 35 dakika sürmelidir. \"\n#~ \"İçeriği:\"\n\n#~ msgid \"\"\n#~ \"Try accessing an out-of-bounds array element. Array accesses are checked \"\n#~ \"at runtime. Rust can usually optimize these checks away, and they can be \"\n#~ \"avoided using unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"Sınırların dışında bir dizi öğesine erişmeyi deneyin. Dizi erişimleri \"\n#~ \"çalışma zamanında (runtime) kontrol edilir. Rust genellikle bu \"\n#~ \"kontrolleri optimize edebilir ve emniyetsiz Rust (unsafe Rust) \"\n#~ \"kullanılarak bu kontrollerden kaçınılabilir.\"\n\n#~ msgid \"\"\n#~ \"When working with tuples and other structured values it's common to want \"\n#~ \"to extract the inner values into local variables. This can be done \"\n#~ \"manually by directly accessing the inner values:\"\n#~ msgstr \"\"\n#~ \"Demetler (tuples) ve diğer yapılandırılmış değerlerle (structured values) \"\n#~ \"çalışırken, içteki değerleri yerel (local) değişkenlere çıkarmayı istemek \"\n#~ \"yaygındır. Bu, doğrudan iç değerlere erişilerek elle yapılabilir:\"\n\n#~ msgid \"\\\"left: {left}, right: {right}\\\"\"\n#~ msgstr \"\\\"sol: {left}, sağ: {right}\\\"\"\n\n#~ msgid \"//\\n\"\n#~ msgstr \"//\\n\"\n\n#~ msgid \"\\\"matrix: {:#?}\\\"\"\n#~ msgstr \"\\\"matrix: {:#?}\\\"\"\n\n#~ msgid \"Rust will statically forbid dangling references:\"\n#~ msgstr \"\"\n#~ \"Rust, boşa düşen referansları (dangling references) statik olarak \"\n#~ \"yasaklayacaktır:\"\n\n#~ msgid \"\"\n#~ \"Rust does not automatically create references for you - the `&` is always \"\n#~ \"required.\"\n#~ msgstr \"\"\n#~ \"Rust sizin için otomatik olarak referans oluşturmaz. `&` her zaman \"\n#~ \"gereklidir.\"\n\n#~ msgid \"\"\n#~ \"It isn't super common that one would need a runtime evaluated constant, \"\n#~ \"but it is helpful and safer than using a static.\"\n#~ msgstr \"\"\n#~ \"Çalışma zamanında değerlendirilen (evaluate) bir sabite (constant) \"\n#~ \"ihtiyaç duyulması çok yaygın bir durum değildir, ancak statik \"\n#~ \"kullanmaktan daha yararlı ve daha emniyetlidir.\"\n\n#~ msgid \"while-let\"\n#~ msgstr \"while-let\"\n\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n#~ \"minutes. It contains:\"\n#~ msgstr \"\"\n#~ \"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 15 dakika sürmelidir. \"\n#~ \"İçeriği:\"\n\n#~ msgid \"\\\"{elem}\\\"\"\n#~ msgstr \"\\\"{elem}\\\"\"\n\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n#~ \"minutes. It contains:\"\n#~ msgstr \"\"\n#~ \"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 40 dakika sürmelidir. \"\n#~ \"İçeriği:\"\n\n#~ msgid \"FromIterator\"\n#~ msgstr \"FromIterator\"\n\n#~ msgid \"Slices: `&[T]`\"\n#~ msgstr \"Dilimler: `&[T]`\"\n\n#~ msgid \"`thiserror` and `anyhow`\"\n#~ msgstr \"`thiserror` ve `anyhow`\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Kontrol Akışı\"\n\n#~ msgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Hoş Geldiniz](../welcome-day-1.md) (5 dakika)\"\n\n#~ msgid \"[Hello, World](../hello-world.md) (15 minutes)\"\n#~ msgstr \"[Merhaba, Dünya](../hello-world.md) (15 dakika)\"\n\n#~ msgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\n#~ msgstr \"[Türler ve Değerler](../types-and-values.md) (40 dakika)\"\n\n#~ msgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\n#~ msgstr \"[Kontrol Akışı Temelleri](../control-flow-basics.md) (40 dakika)\"\n\n#~ msgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\n#~ msgstr \"[Demetler ve Diziler](../tuples-and-arrays.md) (35 dakika)\"\n\n#~ msgid \"[References](../references.md) (55 minutes)\"\n#~ msgstr \"[Referanslar](../references.md) (55 dakika)\"\n\n#~ msgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\n#~ msgstr \"[Kullanıcı Tanımlı Türler](../user-defined-types.md) (50 dakika)\"\n\n#~ msgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Hoş Geldiniz](../welcome-day-2.md) (3 dakika)\"\n\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\n#~ msgstr \"[Desen Eşleştirme](../pattern-matching.md) (1 saat)\"\n\n#~ msgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\n#~ msgstr \"[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)\"\n\n#~ msgid \"[Generics](../generics.md) (40 minutes)\"\n#~ msgstr \"[Jenerikler](../generics.md) (40 dakika)\"\n\n#~ msgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\n#~ msgstr \"[Standart Kütüphanedeki Türler](../std-types.md) (1 saat 20 dakika)\"\n\n#~ msgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Standart Kütüphanedeki Özellikler](../std-traits.md) (1 saat 40 dakika)\"\n\n#~ msgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Hoş Geldiniz](../welcome-day-3.md) (3 dakika)\"\n\n#~ msgid \"[Memory Management](../memory-management.md) (1 hour)\"\n#~ msgstr \"[Bellek Yönetimi](../memory-management.md) (1 saat)\"\n\n#~ msgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\n#~ msgstr \"[Akıllı Göstericiler](../smart-pointers.md) (55 dakika)\"\n\n#~ msgid \"[Borrowing](../borrowing.md) (55 minutes)\"\n#~ msgstr \"[Ödünç Alma](../borrowing.md) (55 dakika)\"\n\n#~ msgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\n#~ msgstr \"[Ömürler](../lifetimes.md) (50 dakika)\"\n\n#~ msgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Hoş Geldiniz](../welcome-day-4.md) (3 dakika)\"\n\n#~ msgid \"[Iterators](../iterators.md) (45 minutes)\"\n#~ msgstr \"[Adımlayıcılar](../iterators.md) (45 dakika)\"\n\n#~ msgid \"[Modules](../modules.md) (40 minutes)\"\n#~ msgstr \"[Modüller](../modules.md) (40 dakika)\"\n\n#~ msgid \"[Testing](../testing.md) (45 minutes)\"\n#~ msgstr \"[Test Etme](../testing.md) (45 dakika)\"\n\n#~ msgid \"[Error Handling](../error-handling.md) (55 minutes)\"\n#~ msgstr \"[Hata İşleme](../error-handling.md) (55 dakika)\"\n\n#~ msgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Emniyetsiz Rust](../unsafe-rust.md) (1 saat 5 dakika)\"\n\n#~ msgid \"Arrow-Left\"\n#~ msgstr \"Yön Oku-Sol\"\n\n#~ msgid \"Arrow-Right\"\n#~ msgstr \"Yön Oku-Sağ\"\n\n#~ msgid \"Ctrl + Enter\"\n#~ msgstr \"Ctrl + Enter\"\n\n#~ msgid \"s\"\n#~ msgstr \"s\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"Odak metin kutusundayken kodu yürütmek için \"\n\n#~ msgid \"In this session:\"\n#~ msgstr \"Bu oturumda:\"\n\n#~ msgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Hoş Geldiniz](./welcome-day-1.md) (5 dakika)\"\n\n#~ msgid \"[Hello, World](./hello-world.md) (15 minutes)\"\n#~ msgstr \"[Merhaba, Dünya](./hello-world.md) (15 dakika)\"\n\n#~ msgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\n#~ msgstr \"[Türler ve Değerler](./types-and-values.md) (40 dakika)\"\n\n#~ msgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\n#~ msgstr \"[Kontrol Akışı Temelleri](./control-flow-basics.md) (40 dakika)\"\n\n#~ msgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\n#~ msgstr \"[Rust Nedir?](./hello-world/what-is-rust.md) (10 dakika)\"\n\n#~ msgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\n#~ msgstr \"[Rust'ın Faydaları](./hello-world/benefits.md) (3 dakika)\"\n\n#~ msgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\n#~ msgstr \"[Deneme Alanı](./hello-world/playground.md) (2 dakika)\"\n\n#~ msgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\n#~ msgstr \"[Merhaba, Dünya](./types-and-values/hello-world.md) (5 dakika)\"\n\n#~ msgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\n#~ msgstr \"[Değişkenler](./types-and-values/variables.md) (5 dakika)\"\n\n#~ msgid \"[Values](./types-and-values/values.md) (5 minutes)\"\n#~ msgstr \"[Değerler](./types-and-values/values.md) (5 dakika)\"\n\n#~ msgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\n#~ msgstr \"[Aritmetik](./types-and-values/arithmetic.md) (3 dakika)\"\n\n#~ msgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\n#~ msgstr \"[Tür Çıkarımı](./types-and-values/inference.md) (3 dakika)\"\n\n#~ msgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\n#~ msgstr \"[Alıştırma: Fibonacci](./types-and-values/exercise.md) (15 dakika)\"\n\n#~ msgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\n#~ msgstr \"[if İfadeleri](./control-flow-basics/if.md) (4 dakika)\"\n\n#~ msgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\n#~ msgstr \"[Döngüler](./control-flow-basics/loops.md) (5 dakika)\"\n\n#~ msgid \"\"\n#~ \"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\n#~ msgstr \"\"\n#~ \"[break ve continue](./control-flow-basics/break-continue.md) (4 dakika)\"\n\n#~ msgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\n#~ msgstr \"[Fonksiyonlar](./control-flow-basics/functions.md) (3 dakika)\"\n\n#~ msgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\n#~ msgstr \"[Makrolar](./control-flow-basics/macros.md) (2 dakika)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Alıştırma: Collatz Sekansı](./control-flow-basics/exercise.md) (15 \"\n#~ \"dakika)\"\n\n#~ msgid \"1\"\n#~ msgstr \"1\"\n\n#~ msgid \" greater than zero:\"\n#~ msgstr \" sıfırdan büyük sayısı için:\"\n\n#~ msgid \"If _n\"\n#~ msgstr \"If _n\"\n\n#~ msgid \"i\"\n#~ msgstr \"i\"\n\n#~ msgid \"_.\"\n#~ msgstr \"_.\"\n\n#~ msgid \"_ is even, then _n\"\n#~ msgstr \"_ çifttir, o zaman _n\"\n\n#~ msgid \"i+1\"\n#~ msgstr \"i+1\"\n\n#~ msgid \" = n\"\n#~ msgstr \" = n\"\n\n#~ msgid \" / 2_.\"\n#~ msgstr \" / 2_.\"\n\n#~ msgid \"_ is odd, then _n\"\n#~ msgstr \"_ tektir, o zaman _n\"\n\n#~ msgid \" = 3 * n\"\n#~ msgstr \" = 3 * n\"\n\n#~ msgid \" + 1_.\"\n#~ msgstr \" + 1_.\"\n\n#~ msgid \"_ = 3:\"\n#~ msgstr \"_ = 3:\"\n\n#~ msgid \"3 is odd, so _n\"\n#~ msgstr \"3 tektir, yani _n\"\n\n#~ msgid \"2\"\n#~ msgstr \"2\"\n\n#~ msgid \"_ = 3 * 3 + 1 = 10;\"\n#~ msgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#~ msgid \"10 is even, so _n\"\n#~ msgstr \"10 çifttir, yani _n\"\n\n#~ msgid \"_ = 10 / 2 = 5;\"\n#~ msgstr \"_ = 10 / 2 = 5;\"\n\n#~ msgid \"5 is odd, so _n\"\n#~ msgstr \"5 tektir, yani _n\"\n\n#~ msgid \"_ = 3 * 5 + 1 = 16;\"\n#~ msgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#~ msgid \"16 is even, so _n\"\n#~ msgstr \"16 çifttir, yani _n\"\n\n#~ msgid \"5\"\n#~ msgstr \"5\"\n\n#~ msgid \"_ = 16 / 2 = 8;\"\n#~ msgstr \"_ = 16 / 2 = 8;\"\n\n#~ msgid \"8 is even, so _n\"\n#~ msgstr \"8 çifttir, yani _n\"\n\n#~ msgid \"_ = 8 / 2 = 4;\"\n#~ msgstr \"_ = 8 / 2 = 4;\"\n\n#~ msgid \"4 is even, so _n\"\n#~ msgstr \"4 çifttir, yani _n\"\n\n#~ msgid \"7\"\n#~ msgstr \"7\"\n\n#~ msgid \"_ = 4 / 2 = 2;\"\n#~ msgstr \"_ = 4 / 2 = 2;\"\n\n#~ msgid \"2 is even, so _n\"\n#~ msgstr \"2 çifttir, yani _n\"\n\n#~ msgid \"_ = 1; and\"\n#~ msgstr \"_ = 1; ve\"\n\n#~ msgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\n#~ msgstr \"[Demetler ve Diziler](./tuples-and-arrays.md) (35 dakika)\"\n\n#~ msgid \"[References](./references.md) (55 minutes)\"\n#~ msgstr \"[Referanslar](../references.md) (55 dakika)\"\n\n#~ msgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\n#~ msgstr \"[Kullanıcı Tanımlı Türler](./user-defined-types.md) (50 dakika)\"\n\n#~ msgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\n#~ msgstr \"[Diziler](./tuples-and-arrays/arrays.md) (5 dakika)\"\n\n#~ msgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\n#~ msgstr \"[Demetler](./tuples-and-arrays/tuples.md) (5 dakika)\"\n\n#~ msgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\n#~ msgstr \"[Dizide Dolaşma](./tuples-and-arrays/iteration.md) (3 dakika)\"\n\n#~ msgid \"\"\n#~ \"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Desenler ve Çözümleme](./tuples-and-arrays/destructuring.md) (5 dakika)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[Alıştırma: İç İçe Diziler](./tuples-and-arrays/exercise.md) (15 dakika)\"\n\n#~ msgid \"[Shared References](./references/shared.md) (10 minutes)\"\n#~ msgstr \"[Paylaşılan Referanslar](./references/shared.md) (10 dakika)\"\n\n#~ msgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Dışlayan (Exclusive) Referanslar](./references/exclusive.md) (10 dakika)\"\n\n#~ msgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\n#~ msgstr \"[Dilimler: &\\\\[T\\\\]](../references/slices.md) (10 dakika)\"\n\n#~ msgid \"[Strings](./references/strings.md) (10 minutes)\"\n#~ msgstr \"[Dizgeler](./references/strings.md) (10 dakika)\"\n\n#~ msgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\n#~ msgstr \"[Alıştırma: Geometri](./references/exercise.md) (15 dakika)\"\n\n#~ msgid \"\"\n#~ \"Question: What happens if you modify `a[3]` right before printing `s`?\"\n#~ msgstr \"\"\n#~ \"Soru: `a[3]`'ü `s`'yi yazdırmadan hemen önce değiştirirseniz (modify) ne \"\n#~ \"olur?\"\n\n#~ msgid \"\"\n#~ \"The question about modifying `a[3]` can spark an interesting discussion, \"\n#~ \"but the answer is that for memory safety reasons you cannot do it through \"\n#~ \"`a` at this point in the execution, but you can read the data from both \"\n#~ \"`a` and `s` safely. It works before you created the slice, and again \"\n#~ \"after the `println`, when the slice is no longer used.\"\n#~ msgstr \"\"\n#~ \"`a[3]`'ün değiştirilmesiyle (modify) ilgili soru ilginç bir tartışmayı \"\n#~ \"ateşleyebilir, ancak cevap şu ki, bellek emniyeti nedenleriyle yürütmenin \"\n#~ \"(execution) bu noktasında bunu `a` aracılığıyla yapamazsınız, ancak \"\n#~ \"verileri hem `a`'dan hem de `s`'den emniyetli bir şekilde \"\n#~ \"okuyabilirsiniz. Dilim (slice) oluşturulmadan önce ve dilim \"\n#~ \"kullanılmayacaksa`println`'den sonra `a[3]` değiştirilebilir.\"\n\n#~ msgid \"`String` is an owned, heap-allocated buffer of UTF-8 bytes.\"\n#~ msgstr \"\"\n#~ \"`String`, UTF-8 olarak kodlanmış baytların dinamik bellekten tahsis \"\n#~ \"edildiği (heap-allocated) sahipli (owned) bir arabellektir (buffer)\"\n\n#~ msgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[İsimli Yapılar (Named Structs)](./user-defined-types/named-structs.md) \"\n#~ \"(10 dakika)\"\n\n#~ msgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\n#~ msgstr \"[Demet Yapıları](./user-defined-types/tuple-structs.md) (10 dakika)\"\n\n#~ msgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\n#~ msgstr \"[Enum'lar](./user-defined-types/enums.md) (5 dakika)\"\n\n#~ msgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\n#~ msgstr \"[Static](./user-defined-types/static.md) (5 dakika)\"\n\n#~ msgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\n#~ msgstr \"[Tür Eş İsimleri](./user-defined-types/aliases.md) (2 minutes)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[Alıştırma: Asansör Olayları](./user-Definition-types/exercise.md) (15 \"\n#~ \"dakika)\"\n\n#~ msgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\n#~ msgstr \"[Metotlar ve Özellikler](../methods-and-traits.md) (50 dakika)\"\n\n#~ msgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\n#~ msgstr \"[Özellikler](../methods-and-traits/traits.md) (15 dakika)\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 4 hours\"\n#~ msgstr \"Bu oturum 10 dakikalık aralar dahil yaklaşık 4 saat sürmelidir\"\n\n#~ msgid \"This segment should take about 1 hour and 40 minutes\"\n#~ msgstr \"Bu bölüm yaklaşık 1 saat 40 dakika sürmeli\"\n\n#~ msgid \"Niche Optimization\"\n#~ msgstr \"Niche Optimizasyonu\"\n\n#~ msgid \"[Borrowing](./borrowing.md) (55 minutes)\"\n#~ msgstr \"[Ödünç Alma](../borrowing.md) (55 dakika)\"\n\n#~ msgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\n#~ msgstr \"[Ömürler](./lifetimes.md) (50 dakika)\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ömür için Ek Açıklamalar](./lifetimes/lifetime-annotations.md) (10 \"\n#~ \"dakika)\"\n\n#~ msgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Ömür Atlaması (Elision)](./lifetimes/lifetime-elision.md) (5 dakika)\"\n\n#~ msgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\n#~ msgstr \"[Yapı Ömürleri](./lifetimes/struct-lifetimes.md) (5 dakika)\"\n\n#~ msgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Alıştırma: Protobuf Ayrıştırma](./lifetimes/exercise.md) (30 dakika)\"\n\n#~ msgid \"b\\\"hello\\\"\"\n#~ msgstr \"b\\\"merhaba\\\"\"\n\n#~ msgid \"Luhn Algorithm\"\n#~ msgstr \"Luhn Algrotiması\"\n\n#~ msgid \"_Generated trait_:\"\n#~ msgstr \"_Generated trait_:\"\n\n#~ msgid \"\"\n#~ \"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n#~ \"minutes\"\n#~ msgstr \"\"\n#~ \"Bu oturum 10 dakikalık aralar dahil yaklaşık 2 saat 55 dakika sürmeli\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"\"\n#~ \"Her iki işlevi de 3 × 3 matris üzerinde çalışacak şekilde sabit kodlayın.\"\n\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"// Undefined behavior if abs misbehaves.\\n\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"Static ve Const\"\n\n#~ msgid \"Implmementing Traits\"\n#~ msgstr \"Özelliklerin (Traits) Gerçekleştirilmesi\"\n\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"Dilimler (Slices) ve Ömürler (Lifetimes)\"\n\n#~ msgid \"String References\"\n#~ msgstr \"Dize (String) Referansları\"\n\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"Rust'ın dizeleri (string) temsil (represent) eden iki türü vardır ve \"\n#~ \"bunların her ikisi de daha sonra daha ayrıntılı olarak ele alınacaktır. \"\n#~ \"Her ikisi de _her zaman_ UTF-8 olarak kodlanmış dizeleri saklar.\"\n\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` - a modifiable, owned string.\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"\"\n#~ \"`&str`- salt okunur (read-only) bir dize. Dize değişmezleri (String \"\n#~ \"literals) bu türe sahiptir.\"\n\n#~ msgid \"\\\"Greetings\\\"\"\n#~ msgstr \"\\\"Selamlar\\\"\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"son cümle: {}\\\"\"\n\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"Bu slaytta dizeler(strings) tanıtılmaktadır. Buradaki her şey daha sonra \"\n#~ \"daha derinlemesine ele alınacaktır, ancak bu, sonraki slaytlar ve \"\n#~ \"dizeleri kullanma alıştırmaları için yeterlidir.\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"\"\n#~ \"Bir dizedeki geçersiz UTF-8 UB'dir (Undefined Behavior - Tanımsız \"\n#~ \"Davranış) ve buna emniyetli Rust'ta (safe Rust) izin verilmez.\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String`, bir kurucuya (`::new()`) ve `s.push_str(..)` gibi metotlara \"\n#~ \"sahip, kullanıcı tanımlı bir türdür.\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"`&str` içindeki `&` bunun bir referans olduğunu gösterir. Referansları \"\n#~ \"daha sonra ele alacağız, bu nedenle şimdilik `&str`'yi \\\"bir salt okunur \"\n#~ \"dize\\\" anlamına gelen bir birim olarak düşünün.\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"Yorum yapılan satır, bayt konumuna göre dizeye indeksleniyor. `12..13` \"\n#~ \"karakter sınırında bitmiyor, bu nedenle program paniğe kapılıyor. Hata \"\n#~ \"mesajına bağlı olarak bunu uygun bir aralığa ayarlayın.\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Neden Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Derleme Zamanı Garantileri\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Çalışma Zamanı Garantileri\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Modern Özellikler\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Temel Sözdizimi\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String vs str\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"Rustdoc\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Yükleme (Overloading)\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Diziler ve for Döngüleri\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for İfadeleri\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while İfadeleri\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop İfadeleri\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Varyant Yükler\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Enum Boyutları\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let İfadeleri\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"while let İfadeleri\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Dizileri Ayrıştırma\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Eşleşme Koşulları/Filtreleri\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Stack vs Heap\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Stack Belleği\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Manuel Bellek Yönetimi\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Kapsam Tabanlı Bellek Yönetimi\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Çöp Toplama\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Rust Bellek Yönetimi\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Rust'da Taşınmış Stringler\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"Modern C++'da Double Free'ler (Adresi iki kez serbest bırakma)\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Fonksiyon Çağrılarında Taşımalar\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Kopyalama ve Klonlama\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Paylaşımlı (Shared) ve Eşsiz (Unique) Ödünç Almalar\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Alanlara İlk Değer Verme Kısaltması'nın Sözdizimi (Syntax)\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option ve Result\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Özyinelemeli Veri Türleri\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Adımlayıcılar (Iterators) ve Sahiplik\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Jenerik Metotlar\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Varsayılan Metotlar\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Önemli Özellikler (Traits)\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Operatörler: Add, Mul, ...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"Kapanışlar (Closures): Fn, FnMut, FnOnce\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Noktalar ve Çokgenler\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Yığın Geri Sarımınının Yakalanması\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Yapılandırılmış Hata İşlemesi\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"? ile Hataların Yayılması\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Hata Türlerinin Dönüştürülmesi\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Hata Enumlarının Türetilmesi\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Hatalara Bağlam (Context) Ekleme\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"probe-rs, cargo-embed\"\n#~ msgstr \"probe-rs, cargo-embed\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"spin\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"1. Gün Sabah\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"1. Gün Öğleden Sonra\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"2. Gün Sabah\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"2. Gün Öüleden Sonra\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"3. Gün Sabah\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"3. Gün Öğleden Sonra\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Yalın (Bare) Metal Rust Sabah\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Eşzamanlılık Sabah\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Eşzamanlılık Öğleden Sonra\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"\"\n#~ \"1. Gün: Temel Rust, sözdizimi, kontrol akışı, değer oluşturma ve tüketme.\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"2. Gün: Bellek yönetimi, sahiplik, bileşik veri türleri ve standart \"\n#~ \"kitaplık.\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"3. Gün: Jenerikler, özellikler (traits), hata işleme, testler ve \"\n#~ \"emniyetsiz (unsafe) Rust.\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Kontrol akışı yapıları: `if`, `if let`, `while`, `while let`, `break` ve \"\n#~ \"`continue`.\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"İlk günün amacı, ünlü ödünç alma denetleyicisi hakkında konuşabilecek \"\n#~ \"_kadar_ Rust'ı göstermek. Rust'ın hafızayı işleme şekli önemli bir \"\n#~ \"özellik ve bunu öğrencilere hemen göstermeliyiz.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Eğer bunu sınıfta öğretiyorsanız, burası programın üzerinden geçmek için \"\n#~ \"iyi bir yerdir. Günü iki bölüme ayırmanızı öneririz (slaytları takip \"\n#~ \"ederek):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Sabah: 9:00 - 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Öğleden sonra: 13:00 - 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Elbette bunu gerektiği gibi ayarlayabilirsiniz. Lütfen araları dahil \"\n#~ \"ettiğinizden emin olun, her saat başı bir ara vermenizi öneririz!\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Merhaba 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Rust dilinde küçük bir örnek program:\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Programın giriş noktası\\n\"\n#~ \"    let mut x: i32 = 6;  // Değiştirilebilir değişken bağlama (Mutable \"\n#~ \"variable binding)\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Yazdırma için makro, C dilindeki printf \"\n#~ \"gibi\\n\"\n#~ \"    while x != 1 {       // İfadenin etrafında parantez yok\\n\"\n#~ \"        if x % 2 == 0 {  // Matematik diğer dillerde olduğu gibi\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Bu kod Collatz sanısını içerir: Döngünün her zaman sona ereceğine \"\n#~ \"inanılıyor, ancak bu henüz kanıtlanmadı. Kodu düzenleyin ve farklı \"\n#~ \"girişlerle oynayın.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Tüm değişkenlerin statik olarak türlendiğini (statically typed) \"\n#~ \"açıklayın. Tür çıkarımını (type inference) tetiklemek için `i32`yi \"\n#~ \"kaldırmayı deneyin. Sonra, bunun yerine `i8` ile deneyin ve çalışma \"\n#~ \"zamanı tamsayı taşmasını (runtime integer overflow) tetikleyin.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"\"\n#~ \"`let mut x`i `let x` olarak değiştirin, derleyici hatasını tartışın.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Argümanlar biçim dizesiyle (format string) eşleşmediğinde `print!`in \"\n#~ \"nasıl derleme hatası verdiğini gösterin.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Tek bir değişkenden daha karmaşık bir ifadeyi (expression) yazdırmak \"\n#~ \"istiyorsanız `{}` ifadesini yer tutucu (placeholder) olarak nasıl \"\n#~ \"kullanmanız gerektiğini gösterin.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Öğrencilere standart kütüphaneyi gösterin, onlara küçük biçimlendirme \"\n#~ \"dilinin kurallarını içeren `std::fmt`yi nasıl arayacaklarını gösterin. \"\n#~ \"Öğrencilerin standart kütüphanede arama yapmaya aşina olmaları önemlidir.\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"Komut satırına`rustup doc std::fmt` komutunu girmeniz durumunda yerel \"\n#~ \"std::fmt belgeleri varsayılan tarayıcınızda açılacaktır\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Derleme zamanı bellek emniyeti (memory safety).\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"\"\n#~ \"Tanımlanmamış çalışma zamanı davranışının (undefined runtime behavior) \"\n#~ \"olmaması.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Modern dil özellikleri.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Derleme zamanında statik bellek yönetimi:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Bellek sızıntısı yok (_mostly_, notlara bakın).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"(Emniyetli) Rust'ta bellek sızıntılarının oluşması mümkündür. Bazı \"\n#~ \"örnekler:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Bir göstericiyi sızdırmak için [`Box::leak`](https://doc.rust-lang.org/\"\n#~ \"std/boxed/struct.Box.html#method.leak)'i kullanabilirsiniz. Bunun bir \"\n#~ \"kullanımı, çalışma zamanında ilklendirilecek (runtime-initialized) ve \"\n#~ \"çalışma zamanında boyutlandırılacak (runtime-sized) statik değişkenler \"\n#~ \"elde etmek olabilir\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Derleyicinin bir değeri \\\"unutmasını\\\" sağlamak (sonlandırıcı / \"\n#~ \"destructor fonksiyon asla çalıştırılmaz) için [`std::mem::forget`]\"\n#~ \"(https://doc.rust-lang.org/std/mem/fn.forget.html)'ı kullanabilirsiniz.\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Ayrıca yanlışlıkla `Rc` veya `Arc` ile bir [referans çevrimi](https://doc.\"\n#~ \"rust-lang.org/book/ch15-06-reference-cycles.html) oluşturabilirsiniz.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"Aslında, bazıları bir koleksiyonun sınırsız olarak doldurulmasını bir \"\n#~ \"bellek sızıntısı olarak değerlendirecek ancak Rust bunlardan korumaz.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Bu kursun amacı doğrultusunda, \\\"Bellek sızıntısı yok\\\" ifadesi, \"\n#~ \"\\\"_Yanlışlıkla oluşan_ bellek sızıntısı hemen hemen hiç yok\\\" olarak \"\n#~ \"anlaşılmalıdır.\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"Tamsayı taşması, [`overflow-checks`](https://doc.rust-lang.org/rustc/\"\n#~ \"codegen-options/index.html#overflow-checks) derleme zamanı işareti \"\n#~ \"aracılığıyla tanımlanır. Etkinleştirilirse, program panikleyecektir \"\n#~ \"(panic) (programın kontrollü bir şekilde çökmesi), aksi takdirde wrap-\"\n#~ \"around semantiğini elde edersiniz. Varsayılan olarak, hata ayıklama \"\n#~ \"(debug) modunda (`cargo build`) panik yaşarsınız ve sürüm (release) \"\n#~ \"modunda (`cargo build --release`) wrap-around alırsınız.\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"Sınır kontrolü derleyici bayrağıyla (flag) devre dışı bırakılamaz. Ayrıca \"\n#~ \"`unsafe` anahtar kelimesiyle doğrudan devre dışı bırakılamaz. Ancak \"\n#~ \"`unsafe`, sınır denetimi yapmayan `slice::get_unchecked` gibi işlevleri \"\n#~ \"çağırmanıza olanak tanır.\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust, son yıllarda kazanılan tüm deneyimlerle inşa edilmiştir.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Dil Özellikleri\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` vs `str`\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Fonksiyon Yüklemesi (Overloading)\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"Gün 1: Sabah Alıştırmaları\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Diziler ve `for` döngüleri.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Diziler ve `for` Döngüleri\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"`loop` ifadeleri\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Statik (Static) ve Sabit (Constant) Değişkenler\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"Welcome to RustOS 3.14\\\";\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{BANNER}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"RustOS 3.14'a Hoş Geldiniz\\\";\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{BANNER}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"Gün 1: Öğleden Sonra Alıştırmaları\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Luhn Algortiması,\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Desen eşleştirme üzerine bir alıştırma.\"\n\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Yapılar (struct) ve metotlar.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"Stack vs Heap\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Stack vs Heap Örneği\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Merhaba\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"C Örneği\"\n\n#~ msgid \"C++ Example\"\n#~ msgstr \"C++ Örneği\"\n\n#~ msgid \"Automatic Memory Management\"\n#~ msgstr \"Otomatik Bellek Yönetimi\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Java Örneği\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Rust Dilinde Bellek Yönetimi\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Rust dilinde bellek yönetimi bir karışımdır:\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"Gün 2: Sabah Alıştırmaları\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` ve `Result`\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let five = Box::new(5);\\n\"\n#~ \"    println!(\\\"five: {}\\\", *five);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let five = Box::new(5);\\n\"\n#~ \"    println!(\\\"beş: {}\\\", *five);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` and `RefCell`\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"Gün 2: Öğleden Sonra Alıştırmaları\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Add`, `Mul`, ...\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"Gün 3: Sabah Alıştırmaları\"\n\n#~ msgid \"Drawing A Simple GUI\"\n#~ msgstr \"Basit Bir GUI Çizimi\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Yığın Geri Sarımınının Yakalanması\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"`?` ile Hataların Yayılması\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"\"\n#~ \"Birim testlerini bulmak ve çalıştırmak için `cargo test` komutunu \"\n#~ \"kullanın.\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Harici Kodun Çağrılması\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"Gün 3: Öğleden Sonra Alıştırmaları\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"1. Gün Sabah Alıştırmaları\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"1. Gün Öğleden Sonra Alıştırmaları\"\n\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Desen eşleştirme\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"2. Gün Sabah Alıştırmaları\"\n\n#~ msgid \"([back to exercise](health-statistics.md))\"\n#~ msgstr \"([egzersize geri dön](health-statistics.md))\"\n\n#~ msgid \"Day 2 Afternoon Exercises\"\n#~ msgstr \"2. Gün Öğleden Sonra Alıştırmaları\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"3. Gün Sabah Alıştırmaları\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"3. Gün Öğleden Sonra Alıştırmaları\"\n\n#, fuzzy\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"aarch64-paging\"\n\n#, fuzzy\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"İstisnalar\"\n\n#~ msgid \"An Example in C\"\n#~ msgstr \"C Dilinde Bir Örnek\"\n\n#~ msgid \"concurrency:\"\n#~ msgstr \"eşzamanlılık:\"\n\n#~ msgid \"control flow:\"\n#~ msgstr \"kontrol akışı:\"\n\n#~ msgid \"error handling:\"\n#~ msgstr \"hata işleme:\"\n\n#~ msgid \"garbage collector:\"\n#~ msgstr \"çöp toplama:\"\n\n#~ msgid \"generics:\"\n#~ msgstr \"jenerikler:\"\n\n#~ msgid \"main function:\"\n#~ msgstr \"main fonksiyonu:\"\n\n#~ msgid \"method:\"\n#~ msgstr \"metot:\"\n\n#~ msgid \"module:\"\n#~ msgstr \"modül:\"\n\n#~ msgid \"ownership:\"\n#~ msgstr \"sahiplik:\"\n\n#~ msgid \"panic:\"\n#~ msgstr \"panik:\"\n\n#~ msgid \"receiver:\"\n#~ msgstr \"alıcı:\"\n\n#~ msgid \"standard library:\"\n#~ msgstr \"standart kütüphane:\"\n\n#~ msgid \"struct:\"\n#~ msgstr \"yapı:\"\n\n#~ msgid \"thread:\"\n#~ msgstr \"iş parçacığı:\"\n\n#~ msgid \"trait:\"\n#~ msgstr \"özellik (trait):\"\n\n#~ msgid \"union:\"\n#~ msgstr \"birlik (union):\"\n\n#~ msgid \"unit test:\"\n#~ msgstr \"birim testi:\"\n\n#~ msgid \"variable:\\\\\"\n#~ msgstr \"değişken:\\\\\"\n\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Desen Eşleştirme\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"Karşılaştırma\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Kodu düzenlemek için [VS Code](https://code.visualstudio.com/) \"\n#~ \"kullanmanızı öneririz (ancak LSP uyumlu herhangi bir düzenleyici \"\n#~ \"(editör), Rust-analyzer[3](https://rust-analyzer.github.io/) ile \"\n#~ \"çalışır. )).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Bazıları, kendi analizlerini yapan bununla birlikte kendi ödünleri olan \"\n#~ \"[JetBrains](https://www.jetbrains.com/clion/) IDE ailesini kullanmayı \"\n#~ \"sever. Tercih ederseniz [Rust Eklentisini](https://www.jetbrains.com/\"\n#~ \"rust/) yükleyebilirsiniz. Ocak 2023 itibarıyla hata ayıklamanın yalnızca \"\n#~ \"JetBrains IDEA paketinin CLion sürümünde çalıştığını lütfen unutmayın.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"Extra Work in Modern C++\"\n#~ msgstr \"Modern C++'da Çifte Serbestlik\"\n"
  },
  {
    "path": "po/uk.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-12-06T09:01:41-05:00\\n\"\n\"PO-Revision-Date: 2023-10-18 20:05+0300\\n\"\n\"Last-Translator: Oleksandr Leoshko <sleo170504@gmail.com>\\n\"\n\"Language-Team: \\n\"\n\"Language: uk\\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\"X-Generator: Poedit 3.4\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Ласкаво просимо в Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Проведення курсу\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Структура курсу\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Гарячі клавіші\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Переклади\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Використання Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Екосистема Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Приклади коду\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Локальний запуск Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"День 1: Ранок\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Ласкаво просимо\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hello World!\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Що таке Rust?\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Переваги Rust\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Ігровий майданчик\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Типи та значення\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Змінні\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Значення\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Арифметика\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Виведення типів\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Вправа: Фібоначчі\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Рішення\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Основи потоку керування\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Вирази `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Цикли\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` та `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Мітки\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Блоки та області застосування\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Області видимості та затінення\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Функції\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Макроси\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Вправа: Послідовність Коллатца\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"День 1: Полудень\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Кортежі та масиви\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Масиви\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Кортежі\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Ітерація масиву\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Патерни та деструктуризація\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Вправа: Вкладені масиви\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"Посилання\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Спільні посилання\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Ексклюзивні посилання\"\n\n#: src/SUMMARY.md src/references.md src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"Зрізи\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Рядки\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Вправа: Геометрія\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Типи, які визначаються користувачем\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"Іменовані структури\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Кортежні структури\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Перелічувані типи\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Константи\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"Статика\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Псевдоніми типу\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Вправа: події в ліфті\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"День 2: Ранок\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Зіставлення зразків\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Співставлення значень\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"Деструктурування структур\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"Деструктурування переліків\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Потік контролю Let\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Вправа: обчислення виразу\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Методи та Трейти\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Методи\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Трейти\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"Реалізація трейтів\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Супертрейти\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Асоційовані типи\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Виведення\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Вправа: Загальний логгер\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"День 2: Полудень\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Узагальнені типи\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Узагальнені функції\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Узагальнені типи даних\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Узагальнені трейти\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Обмеження трейту\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/dyn-trait.md\nmsgid \"`dyn Trait`\"\nmsgstr \"`dyn Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Вправа: узагальнена `min`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Типи стандартної бібліотеки\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Стандартна бібліотека\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Документація\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md src/error-handling/result.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Вправа: Лічильник\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Трейти стандартної бібліотеки\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Порівняння\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Оператори\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` та `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Приведення\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` та `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, синтаксис оновлення структури\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Закриття\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Вправа: ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"День 3: Ранок\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Управління пам'яттю\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Огляд пам'яті програми\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Підходи до управління пам'яттю\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Володіння\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Семантика переміщення\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Типи які копіюються\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Вправа: Тип будівельника\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Розумні вказівники\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Owned Trait Objects\"\nmsgstr \"Принадлежні об'єкти трейтів\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Вправа: Бінарне дерево\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"День 3: Полудень\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Запозичення\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Запозичення значення\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Перевірка запозичення\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"Помилки запозичення\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Внутрішня мутабельність\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Вправа: Статистика здоров’я\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Тривалість життя\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Анотації тривалісті життя\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Упущення тривалісті життя\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Тривалість життя структур\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Вправа: Розбір Protobuf\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"День 4: Ранок\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Ітератори\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Ітератор`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Вправа: ланцюжок методів ітератора\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Модулі\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Ієрархія файлової системи\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Видимість\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Вправа: Модулі для бібліотеки графічного інтерфейсу користувача\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Тестування\"\n\n#: src/SUMMARY.md src/testing.md\nmsgid \"Test Modules\"\nmsgstr \"Тестові модулі\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Інші типи тестів\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Лінти компілятора та Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Вправа: Алгоритм Луна\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"День 4: Полудень\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Обробка помилок\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Паніки\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Оператор спроб\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Перетворення спроб\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error` трейт\"\n\n#: src/SUMMARY.md src/error-handling/thiserror.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/SUMMARY.md src/error-handling/anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Вправа: Переписування с `Result`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Небезпечний Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"Unsafe\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Розіменування \\\"сирих\\\" вказівників\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Несталі статичні змінні\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Об'єднання\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Небезпечні функції\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Небезпечні трейти\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Вправа: обгортка FFI\"\n\n#: src/SUMMARY.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Установка\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Правила побудови\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Бінарний файл\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Бібліотека\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Посібник із сервісу Birthday\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Інтерфейс\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"API сервісу\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Сервіс\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Сервер\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Розгортка\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Кліент\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Зміна API\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Оновлення реалізацій\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"AIDL типи\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Примітивні типи\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Типи Масивів\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Надсилання об'єктів\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"Посилкові данні\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Надсилання файлів\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Mocking\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Журналювання\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Інтероперабельність\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"З С\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Виклик С за допомогою Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Виклик Rust з C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"З С++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Модуль Bridge\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust Bridge\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"Згенерований C++\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ Bridge\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Спільні типи\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Спільні переліки\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Обробка помилок в Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Обробка помилок в C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Додаткові типи\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Збірка для Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Збірка для Android: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Збірка для Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"З Java\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Порівняння екосистем Chromium і Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Політика\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Небезпечний код\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Залежнісь Chromium C++ від коду Rust\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Вправа\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Бібліотека `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Правила GN для тестів Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"Макрос `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Взаємодія з C++\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Приклади прив'язок\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Обмеження CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Обробка помилок в CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Обробка помилок: приклад QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Обробка помилок: приклад PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Використання CXX у Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Додавання крейтів третіх сторін\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Налаштування Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Налаштування `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Завантаження крейтів\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Створення правил побудови `gn`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Вирішення проблем\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Скрипти збірки, які генерують код\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"Скрипти збірки, які будують C++ або виконують довільні дії\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Залежнісь від крейта\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Перевірки та аудити\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Реєстрація в Chromium Source Code\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Підтримання крейтів в актуальному стані\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Зібрання усього разом - вправа\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Рішення вправ\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"Залізо: Ранок\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"Мінімальний приклад\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"Мікроконтролери\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"Сирий ввід вивід з відображеної пам'яті (MMIO)\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"Крейти доступу до периферійних пристроїв (PACs)\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"Крейти абстракції обладнання (HAL)\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"Крейти підтримки плат\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"Шаблон стану типу\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` та `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"Налагодження\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"Інші проєкти\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Вправи\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"Компас\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"Рішення\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"Залізо: Полудень\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"Прикладні процесори\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"Підготовка до Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"Вбудована збірка\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"Ввід вивід з відображеної пам'яті (MMIO)\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"Давайте напишемо драйвер UART\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"Більше трейтів\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"Кращий драйвер UART\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Бітові прапорці (крейт bitflags)\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"Кілька регістрів\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"Драйвер\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"Використання\"\n\n#: src/SUMMARY.md src/error-handling/result.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"Виключення\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"Корисні крейти\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Bare-Metal on Android\"\nmsgstr \"Залізо на Android\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"Драйвер годинника реального часу (RTC)\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"Одночасність виконання: Ранок\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"Потоки\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"Звичайні потоки\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"Потоки з областю видимості\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"Канали\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"Відправники та отримувачі\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"Незав'язані канали\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"Зав'язані канали\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` та `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"Маркерні трейти\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"Приклади\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"Спільний стан\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"Приклад\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"Вечеря філософів\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"Перевірка багатопоточних посилань\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"Одночасність виконання: Полудень\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"Основи асинхронізації\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Середовища виконання\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Токіо\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"Завдання\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"Канали та потік управління\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"Асинхронні канали\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"Join\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"Select\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"Підводні камені\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"Блокування Виконавця\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"Асинхронні трейти\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"Скасування\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"Програма широкомовного чату\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"Заключні слова\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"Дякую!\"\n\n#. Please keep { #glossary } untranslated.\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Глосарій\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"Інші ресурси\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"Кредити\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Робочий процес створення](https://img.shields.io/github/actions/workflow/\"\n\"status/google/comprehensive-rust/build.yml?style=flat-square)](https://\"\n\"github.com/google/comprehensive-rust/actions/workflows/build.yml?query=branch\"\n\"%3Amain) [![Учасники GitHub](https://img.shields.io/github/contributors/\"\n\"google/comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![зірки GitHub](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"Це безкоштовний курс Rust, розроблений командою Android у Google. Курс \"\n\"охоплює весь спектр Rust, від базового синтаксиса до складних тем, таких як \"\n\"узагальнення (generics) и обробка помилок.\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"Останню версію курсу можна знайти за адресою <https://google.github.io/\"\n\"comprehensive-rust/>. Якщо ви читаєте десь в іншому місці, перевіряйте там \"\n\"на оновлення.\"\n\n#: src/index.md\nmsgid \"\"\n\"The course is available in other languages. Select your preferred language \"\n\"in the top right corner of the page or check the [Translations](running-the-\"\n\"course/translations.md) page for a list of all available translations.\"\nmsgstr \"\"\n\"Курс доступний на інших мовах. Виберіть потрібну мову у верхньому правому \"\n\"куті сторінки або перегляньте сторінку [Переклади](running-the-course/\"\n\"translations.md), щоб ознайомитися зі списком усіх доступних перекладів.\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"Курс також доступний [у форматі PDF](comprehensive-rust.pdf).\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"Ціль курсу навчити вас мові Rust. Ми припускаємо, що ви нічого не знаєте про \"\n\"Rust та сподіваємося:\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"Дати вам повне уявлення про синтаксис та семантику мови Rust.\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"Навчити працювати з існуючим кодом та писати нові програми на Rust.\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"Показати розповсюджені ідіоми мови Rust.\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"Перші чотири дні курсу ми називаємо Rust Fundamentals.\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\"Спираючись на це, вам пропонується зануритися в одну або кілька \"\n\"спеціалізованих тем:\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md): розрахований на половину дня курс з використання Rust \"\n\"для розробки на платформі Android (AOSP). Сюди входить взаємодія з C, C++ та \"\n\"Java.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md): розрахований на половину дня курс курс із \"\n\"використання Rust у браузерах на основі Chromium. Сюди входить взаємодія з C+\"\n\"+ та як включити крейти сторонніх розробників у Chromium.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Голе залізо](bare-metal.md): одноденне заняття з використання Rust для \"\n\"низькорівневої (embedded) розробки, що охоплює як мікроконтролери, так і \"\n\"звичайні процесори.\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency/welcome.md): a whole-day class on concurrency in \"\n\"Rust. We cover both classical concurrency (preemptively scheduling using \"\n\"threads and mutexes) and async/await concurrency (cooperative multitasking \"\n\"using futures).\"\nmsgstr \"\"\n\"[Concurrency](concurrency/welcome.md): повний день занять з вивчення \"\n\"конкурентності у Rust. Ми розглянемо як класичну конкурентність (витіснююча \"\n\"багатозадачність з використанням потоків і м'ютексів), так і async/await \"\n\"конкурентність (кооперативна багатозадачність з використанням futures).\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"За рамками курсу\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust це об'ємна мова, і ми не зможемо охопити її за кілька днів. Теми, що \"\n\"виходять за межі курсу:\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"Написання макросів, будь ласка подивіться [Розділ 19.5 у The Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) та [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"Припущення\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and C\"\n\"++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"Передбачається, що ви вже можете програмувати. Rust це статично типізована \"\n\"мова, і іноді ми порівнюватимемо і зіставлятимемо її з C та C++, щоб краще \"\n\"пояснити чи підкреслити різницю у підходах до написання коду на Rust.\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"Якщо ви знаєте, як програмувати мовою з динамічною типізацією, наприклад \"\n\"Python або JavaScript, ви зможете також успішно пройти цей курс.\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"Це приклад _нотаток для викладача_. Ми будемо використовувати їх для \"\n\"додавання додаткової інформації до слайдів. Це можуть бути ключові моменти, \"\n\"які викладач повинен висвітлити, а також відповіді на типові питання, що \"\n\"виникають під час проходження курсу.\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Ця сторінка призначена для викладача курсу.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Ось коротка довідкова інформація про те, як ми проводили цей курс всередині \"\n\"Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"Зазвичай ми проводимо заняття з 9:00 до 16:00, з 1-годинною перервою на обід \"\n\"посередині. Це залишає 3 години для ранкового заняття та 3 години для \"\n\"післяобіднього заняття. Обидві сесії містять кілька перерв і час для роботи \"\n\"студентів над вправами.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Перед проведенням курсу бажано:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker Notes\"\n\"\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Ознайомитись з матеріалами курсу. Ми додали нотатки для викладача на деяких \"\n\"сторінках, щоб виділити ключові моменти (будь ласка, допомагайте нам, \"\n\"додаючи свої нотатки для викладачів!). Під час презентації переконайтеся, що \"\n\"відкрили нотатки для викладача у спливаючому вікні (натисніть на посилання з \"\n\"маленькою стрілкою поруч з \\\"Нотатки для викладача\\\"). Таким чином ви \"\n\"матимете чистий екран, який можна представити класу.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Визначитись з датами. Оскільки курс вимагає щонайменше чотири дні, ми \"\n\"рекомендуємо вам запланувати ці дні протягом двох тижнів. Учасники курсу \"\n\"сказали, що вони вважають корисним наявність прогалин у курсі, оскільки це \"\n\"допомагає їм обробити всю інформацію, яку ми їм надаємо.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Знайти приміщення досить просторе для очної участі. Ми рекомендуємо, щоб у \"\n\"класі було 15-20 чоловік. Це досить небагато для того, щоб людям було \"\n\"комфортно ставити запитання --- також достатньо мало, щоб один інструктор \"\n\"мав час відповісти на запитання. Переконайтеся, що в кімнаті є _парти_ для \"\n\"вас і для студентів: ви всі повинні мати можливість сидіти і працювати за \"\n\"своїми ноутбуками. Зокрема, ви будете виконувати багато програмування в \"\n\"реальному часі як інструктор, тому кафедра вам не дуже допоможе.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"У день заняття приходьте в кімнату трохи раніше, щоби все підготувати. Ми \"\n\"рекомендуємо презентувати безпосередньо за допомогою `mdbook serve`, \"\n\"запущеного на вашому ноутбуці (дивиться [installation instructions](https://\"\n\"github.com/google/comprehensive-rust#building)). Це забезпечує оптимальну \"\n\"продуктивність без затримок під час зміни сторінок. Використання ноутбука \"\n\"також дозволить вам виправляти друкарські помилки в міру їх виявлення вами \"\n\"або учасниками курсу.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Дозвольте учасникам вирішувати вправи самостійно або у невеликих групах. \"\n\"Зазвичай ми приділяємо вправам по 30-45 хвилин вранці та у другій половині \"\n\"дня (включаючи час на розбір рішень). Обов'язково запитуйте людей, чи не \"\n\"мають вони труднощів і чи є щось, з чим ви можете допомогти. Коли ви бачите, \"\n\"що у кількох людей одна і та ж проблема, повідомте про цей клас і \"\n\"запропонуйте рішення, наприклад, показавши, де знайти відповідну інформацію \"\n\"у стандартній бібліотеці.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"На цьому все, удачі у проходженні курсу! Ми сподіваємося, що вам буде так \"\n\"само весело, як і нам!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Будь ласка, [залишіть відгук](https://github.com/google/comprehensive-rust/\"\n\"discussions/86), щоб ми могли продовжувати удосконалювати курс. Ми хотіли б \"\n\"почути, що було добре і що можна зробити краще. Ваші студенти також можуть \"\n\"[надіслати нам свої відгуки](https://github.com/google/comprehensive-rust/\"\n\"discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Основи Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Перші чотири дні складають [Основи Rust](../welcome-day-1.md). Дні \"\n\"протікають швидко, і ми багато робимо!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Структура курсу\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"День 1 Ранок (2 години 5 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"Сегмент\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Duration\"\nmsgstr \"Тривалість\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"5 хвилин\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"15 хвилин\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-4.md\nmsgid \"40 minutes\"\nmsgstr \"40 хвилин\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"День 1 Полудень (2 години 35 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"35 хвилин\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md\n#: src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"55 хвилин\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"50 хвилин\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"День 2 Ранок (2 години та 10 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md\n#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"3 хвилини\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\nmsgid \"1 hour\"\nmsgstr \"1 година\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 15 minutes, including breaks)\"\nmsgstr \"День 2 Полудень (3 години та 15 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"45 хвилин\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"1 година та 10 хвилин\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"День 3 Ранок (2 години та 20 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"День 3 Полудень (1 година 55 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"День 4 Ранок (2 години та 40 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 20 minutes, including breaks)\"\nmsgstr \"День 4 Полудень (2 години та 20 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"1 година та 5 хвилин\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Глибоке занурення\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"На додаток до 4-денного курсу з основ Rust, ми розглянемо ще кілька \"\n\"спеціалізованих тем:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust в Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Rust в Android](../android.md) --- це напівденний курс з використання Rust \"\n\"для розробки на Android платформі. Сюди входить взаємодія з C, C++ та Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Вам знадобиться [AOSP](https://source.android.com/docs/setup/download/\"\n\"downloading). Завантажте [репозиторій курсу](https://github.com/google/\"\n\"comprehensive-rust) на той же комп'ютер, що і курс та перемістіть каталог \"\n\"`src/android/` в кореневий каталог вашого AOSP. Це гарантує, що система \"\n\"збирання Android побачить файли `Android.bp` в `src/android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Переконайтеся, що `adb sync` працює з вашим емулятором або реальним \"\n\"пристроєм, та попередньо зберіть усі приклади Android, використовуючи `src/\"\n\"android/build_all.sh`. Прочитайте скрипт, щоб побачити команди, які він \"\n\"запускає, і переконайтеся, що вони працюють, коли ви запускаєте їх вручну.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust в Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"Глибоке занурення [Rust in Chromium](../chromium.md) — це південний курс із \"\n\"використання Rust як частини браузера Chromium. Він включає використання \"\n\"Rust у системі збирання `gn` Chromium, залучення сторонніх бібліотек \"\n\"(\\\"крейтів\\\") і взаємодію з C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Вам потрібно буде мати можливість зібрати Chromium --- налагодженна, \"\n\"компонентна побудова [рекомендується](../chromium/setup.md) для швидкості, \"\n\"але будь-яка збірка буде працювати. Переконайтеся, що ви можете запустити \"\n\"веб-переглядач Chromium, який ви побудували.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Rust на голому залізі\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[Rust на голому залізі](../bare-metal.md): заняття на повний день з \"\n\"використання Rust для низькорівневої (embedded) розробки. Розглядаються як \"\n\"мікроконтролери, так і прикладні процесори.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Щодо частини мікроконтролерів, то вам потрібно буде заздалегідь придбати \"\n\"плату розробки [BBC micro:bit](https://microbit.org/) v2. Усім потрібно \"\n\"встановити кілька пакетів, як описано на [сторінці привітання](../bare-metal.\"\n\"md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Конкурентність в Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency/welcome.md) deep dive is a full day \"\n\"class on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[Конкурентність в Rust](../concurrency/welcome.md) це цілий день занять з \"\n\"класичної, а також `async`/`await` конкурентності.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Вам знадобиться налаштований новий крейт, а також завантажені залежності \"\n\"готові до роботи. Потім ви сможете скопіювати приклади в `src/main.rs`, щоб \"\n\"поекспериментувати з ними:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Ранок (3 години та 20 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"30 хвилин\"\n\n#: src/running-the-course/course-structure.md src/methods-and-traits.md\n#: src/std-types.md src/memory-management.md src/borrowing.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"20 хвилин\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"Send та Sync\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Полудень (3 години та 20 хвилин, включаючи перерви)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Формат\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Курс задуманий дуже інтерактивним, і ми рекомендуємо, щоб питання сприяли \"\n\"вивченню Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"У mdBook є кілька корисних поєднань клавіш:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Left</kbd>: Navigate to the previous page.\"\nmsgstr \"<kbd>Стрілка вліво</kbd>: Перехід на попередню сторінку.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Arrow-Right</kbd>: Navigate to the next page.\"\nmsgstr \"<kbd>Стрілка вправо</kbd>: Перехід до наступної сторінки.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>Ctrl + Enter</kbd>: Execute the code sample that has focus.\"\nmsgstr \"\"\n\"<kbd>Ctrl + Enter</kbd>: Виконати приклад коду, який знаходиться у фокусі.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"<kbd>s</kbd>: Activate the search bar.\"\nmsgstr \"<kbd>s</kbd>: Активувати панель пошуку.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"Курс був перекладений іншими мовами групою чудових волонтерів:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Бразильска Португальська](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) від [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), \"\n\"та [@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, and [@nodmp](https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Китайська (спрощена)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"від [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), @SketchK, та [@nodmp](https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Китайська (традиційна)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"від [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi) , [@hamidrezakp](https://github.com/hamidrezakp) \"\n\"and [@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[Фарсі](https://google.github.io/comprehensive-rust/fa/) від [@Alix1383]\"\n\"(https://github.com/alix1383), [@DannyRavi](https://github.com/DannyRavi), \"\n\"[@hamidrezakp](https://github.com/hamidrezakp), [@javad-jafari](https://\"\n\"github.com/javad-jafari) і [@moaminsharifi](https://github.com/\"\n\"moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) та [@mehrad77]\"\n\"(https://github.com/mehrad77).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) \"\n\"and [@kantasv](https://github.com/kantasv).\"\nmsgstr \"\"\n\"[Японьска](https://google.github.io/comprehensive-rust/ja/) від [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ), [@momotaro1105](https://github.com/\"\n\"momotaro1105), [@HidenoriKobayashi](https://github.com/HidenoriKobayashi) і \"\n\"[@kantasv](https://github.com/kantasv).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Корейска](https://google.github.io/comprehensive-rust/ko/) від [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan) та [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Іспанська](https://google.github.io/comprehensive-rust/es) від [@deavid]\"\n\"(https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Ukrainian](https://google.github.io/comprehensive-rust/uk/) by [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) and [@reta](https://github.com/reta).\"\nmsgstr \"\"\n\"[Українська](https://google.github.io/comprehensive-rust/uk/) від [@git-user-\"\n\"cpp](https://github.com/git-user-cpp), [@yaremam](https://github.com/\"\n\"yaremam) і [@reta](https://github.com/reta).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Farsi](https://google.github.io/comprehensive-rust/fa/) by [@DannyRavi]\"\n\"(https://github.com/DannyRavi), [@javad-jafari](https://github.com/javad-\"\n\"jafari), [@Alix1383](https://github.com/alix1383), [@moaminsharifi](https://\"\n\"github.com/moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) \"\n\"and [@mehrad77](https://github.com/mehrad77).\"\nmsgstr \"\"\n\"[Фарсі](https://google.github.io/comprehensive-rust/fa/) від [@Alix1383]\"\n\"(https://github.com/alix1383), [@DannyRavi](https://github.com/DannyRavi), \"\n\"[@hamidrezakp](https://github.com/hamidrezakp), [@javad-jafari](https://\"\n\"github.com/javad-jafari) і [@moaminsharifi](https://github.com/\"\n\"moaminsharifi), [@hamidrezakp](https://github.com/hamidrezakp) та [@mehrad77]\"\n\"(https://github.com/mehrad77).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Використовуйте кнопку вибору мови у верхньому правому куті для перемикання \"\n\"між мовами.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Незавершені переклади\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Існує велика кількість незавершених перекладів. Ми посилаємося на останні \"\n\"оновлені переклади:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Arabic](https://google.github.io/comprehensive-rust/ar/) by [@younies]\"\n\"(https://github.com/younies)\"\nmsgstr \"\"\n\"[Арабська](https://google.github.io/comprehensive-rust/ar/) від [@younies]\"\n\"(https://github.com/younies).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Бенгальська](https://google.github.io/comprehensive-rust/bn) від \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Французька](https://google.github.io/comprehensive-rust/fr/) від [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) і \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Німецька](https://google.github.io/comprehensive-rust/de/) від [@Throvn]\"\n\"(https://github.com/Throvn) і [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Італійська](https://google.github.io/comprehensive-rust/it/) від \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) і [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The full list of translations with their current status is also available \"\n\"either [as of their last update](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html) or [synced to the latest version of the course]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\nmsgstr \"\"\n\"Повний список перекладів з їхнім поточним статусом також доступний або [на \"\n\"момент останнього оновлення](https://google.github.io/comprehensive-rust/\"\n\"translation-report.html), або [синхронізований з останньою версією курсу]\"\n\"(https://google.github.io/comprehensive-rust/synced-translation-report.html).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Якщо ви хочете допомогти в цьому, будь ласка, ознайомтеся з [нашими \"\n\"інструкціями](https://github.com/google/comprehensive-rust/blob/main/\"\n\"TRANSLATIONS.md) про те, як розпочати роботу. Переклади координуються за \"\n\"допомогою [трекера проблем](https://github.com/google/comprehensive-rust/\"\n\"issues/282).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Коли ви почнете читати про Rust, то незабаром познайомитеся з [Cargo]\"\n\"(https://doc.rust-lang.org/cargo/), стандартним інструментом, що \"\n\"використовується в екосистемі Rust для створення та запуску програм. Тут ми \"\n\"хочемо дати короткий огляд того, що таке Cargo і як він вписується в ширшу \"\n\"екосистему і в цей курс.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Встановлення\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Дотримуйтесь інструкцій на <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Як результат, ви отримаэте інструмент побудови Cargo (`cargo`) та компілятор \"\n\"Rust (`rustc`). Ви також отримаэте `rustup`, утиліту командної стрічки, яку \"\n\"виможете використовувати для встановлення різних версій компілятора.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Після встановлення Rust вам слід налаштувати редактор або IDE для роботи з \"\n\"Rust. Більшість редакторів роблять це, звертаючись до [rust-analyzer]\"\n\"(https://rust-analyzer.github.io/), який забезпечує автозаповнення та \"\n\"функцію переходу до визначення для [VS Code](https://code.visualstudio.\"\n\"com/), [Emacs](https://rust-analyzer.github.io/manual.html#emacs), [Vim/\"\n\"Neovim](https://rust-analyzer.github.io/manual.html#vimneovim), та багато \"\n\"інших. Існує також інша доступна IDE під назвою [RustRover](https://www.\"\n\"jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated Rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"У Debian/Ubuntu ви можете встановити Cargo, вихідний код Rust та [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) за допомогою `apt`. Однак \"\n\"це може призвести до встановлення застарілої версії Rust і неочікуваної \"\n\"поведінки. Використовуйте таку команду: \"\n\n#: src/cargo.md\nmsgid \"\"\n\"On macOS, you can use [Homebrew](https://brew.sh/) to install Rust, but this \"\n\"may provide an outdated version. Therefore, it is recommended to install \"\n\"Rust from the official site.\"\nmsgstr \"\"\n\"На macOS ви можете використовувати [Homebrew](https://brew.sh/) для \"\n\"установки Rust, але він може надати застарілу версію. Тому рекомендується \"\n\"встановлювати Rust з офіційного сайту.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Екосистема Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"Екосистема Rust складається з ряду інструментів, основними з яких є:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: компілятор Rust, який перетворює файли `.rs` на бінарні файли та \"\n\"інші проміжні формати.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: менеджер залежностей Rust та інструмент збірки. Cargo знає, як  \"\n\"завантажити залежності, розміщені на <https://crates.io>, і передати їх \"\n\"`rustc` при збірці вашого проекту. Cargo також поставляється з вбудованим \"\n\"інструментом запуску тестів, який використовується для виконання модульних \"\n\"тестів.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: програма встановлення та оновлення набору інструментів Rust. Цей \"\n\"інструмент використовується для встановлення та оновлення `rustc` і `cargo` \"\n\"при виході нових версій Rust. Окрім того, `rustup` також може завантажувати \"\n\"документацію стандартної бібліотеки. Ви можете встановити кілька версій Rust \"\n\"одночасно і `rustup` дозволить вам перемикатися між ними за необхідності.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Ключові моменти:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"У Rust стрімкий графік релізів: нова версія виходить кожні шість тижнів. \"\n\"Нові версії підтримують зворотну сумісність із старими версіями --- на \"\n\"додаток вони надають нові функціональні можливості.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Існує три канали релізів: \\\"stable\\\", \\\"beta\\\" та \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Нові функції тестуються на \\\"nightly\\\", \\\"beta\\\" це те, що стає \\\"stable\\\" \"\n\"кожні шість тижнів.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Залежності також можна вирішити за допомогою альтернативних [реєстрів]\"\n\"(https://doc.rust-lang.org/cargo/reference/registries.html), git, папок тощо.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust також має \\\\[редакції\\\\]: поточна редакція це Rust 2021. Попередніми \"\n\"редакціями були Rust 2015 та Rust 2018.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"Редакціям дозволено вносити зворотно-несумісні зміни до мови.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Щоб уникнути збоїв коду, редакцію для свого пакета можна явно вказати у \"\n\"файлі `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Щоб уникнути поділу екосистеми, компілятор Rust може змішувати код, \"\n\"написаний для різних редакцій.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Варто нагадати, що використання компілятора безпосередньо, а не через \"\n\"`cargo`, є рідкісним явищем (більшість користувачів ніколи цього не роблять).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Варто зазначити, що Cargo сам по собі є надзвичайно потужним і всеосяжним \"\n\"інструментом. Він має багато додаткових функцій, включаючи, але не \"\n\"обмежуючись:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Структуру проекту/пакета\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[робочі області](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Управління/кешування залежностями для розробки (dev) та часу виконання \"\n\"(runtime)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[сценарії побудови](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[глобальна установка](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Він також розширюється за допомогою плагінів підкоманд (таких як [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"\"\n\"Докладніше читайте в [офіційній Cargo Book](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Приклади коду в цьому курсі\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"У цьому курсі ми в основному вивчатимемо мову Rust на прикладах, які можуть \"\n\"бути виконані у вашому браузері. Це значно спрощує налаштування та \"\n\"забезпечує однаковий досвід для всіх.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Встановлення Cargo, як і раніше, рекомендується: це полегшить виконання \"\n\"вправ. В останній день ми виконаємо більш масштабну вправу, яка покаже вам \"\n\"як працювати із залежностями, і для цього вам знадобиться Cargo.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Блоки коду в цьому курсі є повністю інтерактивними:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Відредагуте мене!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"You can use <kbd>Ctrl + Enter</kbd> to execute the code when focus is in the \"\n\"text box.\"\nmsgstr \"\"\n\"Ви можете використовувати <kbd>Ctrl + Enter</kbd> для виконання коду, коли \"\n\"фокус введення знаходиться в текстовому полі.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Більшість прикладів коду доступні для редагування, як показано вище. Кілька \"\n\"прикладів коду недоступні для редагування з різних причин:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Вбудований у сторінку редактор коду не може запускати модульні тести. \"\n\"Скопіюйте код і відкрийте його в справжньому Playground, щоб \"\n\"продемонструвати модульні тести.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Вбудовані в сторінку редактори коду втрачають свій стан у той момент, коли \"\n\"ви йдете зі сторінки! Саме з цієї причини учні повинні виконувати вправи, \"\n\"використовуючи локальну установку Rust або Rust Playground.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Запуск коду локально за допомогою Cargo\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Якщо ви хочете поекспериментувати з кодом на своїй системі, то вам потрібно \"\n\"буде спочатку встановити Rust. Зробіть це, дотримуючись [інструкцій у The \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). У \"\n\"вашій системі з'являться інструменти `rustc` та `cargo`. На момент написання \"\n\"статті останній стабільний випуск Rust має такі версії:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Ви також можете використовувати будь-яку пізнішу версію, оскільки Rust \"\n\"підтримує зворотну сумісність.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Після цього виконайте такі кроки, щоб зібрати виконуваний файл на основі \"\n\"одного з прикладів у цьому курсі:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"\"\n\"Натисніть кнопку \\\"Copy to clipboard\\\" на прикладі коду, який потрібно \"\n\"скопіювати.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Використовуйте `cargo new exercise`, щоб створити нову директорію `exercise/\"\n\"` для вашого коду:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Перейдіть в директорію `exercise/` і виконайте `cargo run` для побудови та \"\n\"запуску виконуваного файлу:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Замініть шаблонний код у `src/main.rs` на свій код. Наприклад, \"\n\"використовуючи приклад коду з попередньої сторінки, зробіть `src/main.rs` \"\n\"схожим на\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"\"\n\"Використовуйте `cargo run` для побудови та запуску оновленого виконуваного \"\n\"файлу:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Використовуйте `cargo check` для швидкої перевірки проекту на наявність \"\n\"помилок і `cargo build` для  компіляції проекту без його запуску. Ви \"\n\"знайдете результат у директорії `target/debug/` для налагоджувальної збірки. \"\n\"Використовуйте `cargo build --release` для створення оптимізованої фінальної \"\n\"збірки в `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Ви можете додати залежності для вашого проекту, відредагувавши файл `Cargo.\"\n\"toml`. Коли ви запустите команду `cargo`, вона автоматично завантажить і \"\n\"скомпілює відсутні залежності для вас.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Запропонуйте учасникам заняття встановити Cargo та використовувати локальний \"\n\"редактор. Це полегшить їм життя, тому що у них буде відповідне середовище \"\n\"розробки.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Ласкаво просимо до Дня 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Це перший день Rust Fundamentals. Сьогодні ми розглянемо багато питань:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Базовий синтаксис Rust: змінні, скалярні та складені типи, переліки, \"\n\"структури, посилання, функції та методи.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Типи та виведення типів.\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"Конструкції потоку управління: цикли, умовні переходи і так далі.\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"Типи, визначені користувачем: структури та переліки.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"Зіставлення шаблонів: деструктуризація переліків, структур і масивів.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Розклад\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія триватиме приблизно 2 години та 5 \"\n\"хвилин. Вона містить:\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Будь ласка, нагадайте учням, що:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"\"\n\"Вони повинні задавати питання, коли вони їх мають, а не зберігати їх до \"\n\"кінця.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"Клас має на меті бути інтерактивним, тому дискусії дуже заохочуються!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Як інструктор, ви повинні намагатися підтримувати обговорення актуальними, \"\n\"тобто підтримувати обговорення, пов’язані з тим, як Rust щось робить на \"\n\"відміну від іншої мови. Буває важко знайти правильний баланс, але краще \"\n\"дозволити дискусії, оскільки вони залучають людей набагато більше, ніж \"\n\"одностороннє спілкування.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"\"\n\"Запитання, швидше за все, означатимуть, що ми обговорюємо речі, які \"\n\"випереджають слайди.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Це цілком нормально! Повторення є важливою частиною навчання. Пам’ятайте, що \"\n\"слайди є лише підтримкою, і ви можете пропускати їх, якщо забажаєте.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"Ідея першого дня полягає в тому, щоб показати \\\"базові\\\" речі в Rust, які \"\n\"повинні мати безпосередні паралелі в інших мовах. Більш просунуті частини \"\n\"Rust будуть розглянуті в наступні дні.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Якщо ви викладаєте цей курс у класі, це гарний момент, щоб ознайомитися з \"\n\"розкладом. Зверніть увагу, що в кінці кожного сегмента є вправа, після якої \"\n\"слідує перерва. Плануйте розглянути рішення вправи після перерви. Час, \"\n\"вказаний тут, є рекомендацією для того, щоб тримати курс за розкладом. Не \"\n\"соромтеся бути гнучкими і вносити корективи за потреби!\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 15 хвилин. Він містить:\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"Слайд\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"10 хвилин\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"2 хвилини\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust — це нова мова програмування, яка мала [1.0 випуск у 2015 році](https://\"\n\"blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"\"\n\"Rust — це статично скомпільована мова, яка виконує таку саму роль, як C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` використовує LLVM як бекенд.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust підтримує багато [платформ і архітектур](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86, ARM, WebAssembly, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux, Mac, Windows, ...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust використовується для широкого спектру пристроїв:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"прошивки та завантажувачі,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"розумні дисплеї,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"мобільні телефони,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"робочі станції,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"сервери.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust вписується в ту ж саму область, що й C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Висока гнучкість.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Високий рівень контролю.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Може бути зменьшений до дуже обмежених пристроїв, таких як мікроконтролери.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"Не має часу виконання або збирання сміття.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"Зосереджений на надійності та безпеці без шкоди для продуктивності.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Деякі унікальні переваги Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\"_Безпека пам'яті під час компіляції_ - цілі класи помилок пам'яті \"\n\"запобігаються на етапі компіляції\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"Немає неініціалізованих змінних.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"Ніяких подвійних звільнень.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"Немає використання після звільнення.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"Немає вказівників `NULL`.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"Немає забутих заблокованих м'ютексів.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"Немає перегонів даних між потоками.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"Немає недійсності ітератора.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"_Ніякої невизначеної поведінки під час виконання_ - те, що робить оператор \"\n\"Rust, ніколи не залишається невизначеним\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"Доступ до масиву перевірено на межі.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"\"\n\"Поведінка цілочисельного переповнення визначена (паніка або обертання).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\"_Можливості сучасної мови_ - така ж виразна та ергономічна, як і мови вищих \"\n\"рівнів\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"Переліки та зіставлення шаблонів.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"Узагальнені типи.\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"FFI без накладних витрат.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"Абстракції без витрат.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"Чудово деталізовані помилки компілятора.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"Вбудований менеджер залежностей.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"Вбудована підтримка тестування.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"Чудова підтримка протоколу мовного сервера (LSP).\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\"Не витрачайте тут багато часу. Всі ці пункти будуть розглянуті більш \"\n\"детально пізніше.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"Обов’язково запитайте клас, з якими мовами вони мають досвід. Залежно від \"\n\"відповіді ви можете виділити різні особливості Rust:\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"Досвід роботи з C або C++: Rust усуває цілий клас _помилок виконання_ за \"\n\"допомогою засобу перевірки запозичень. Ви отримуєте продуктивність, як у C і \"\n\"C++, але у вас немає проблем із небезпекою пам’яті. Крім того, ви отримуєте \"\n\"сучасну мову з такими конструкціями, як зіставлення шаблонів і вбудоване \"\n\"керування залежностями.\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it).\"\nmsgstr \"\"\n\"Досвід роботи з Java, Go, Python, JavaScript...: Ви отримуєте таку саму \"\n\"безпеку пам’яті, що й у цих мовах, а також подібне відчуття мови високого \"\n\"рівня. Крім того, ви отримуєте швидку та передбачувану продуктивність як C і \"\n\"C++ (без збиральника сміття), а також доступ низького рівня до апаратного \"\n\"забезпечення (якщо воно вам знадобиться)\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) надає простий спосіб \"\n\"виконання коротких Rust-програм і є основою для прикладів і вправ у цьому \"\n\"курсі.  Спробуйте запустити програму \\\"hello-world\\\", з якої він \"\n\"починається. Вона має декілька зручних можливостей:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"У розділі \\\"Інструменти\\\" скористайтеся опцією `rustfmt` для форматування \"\n\"вашого коду у \\\"стандартний\\\" спосіб.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust має два основних \\\"профілі\\\" для генерації коду: Налагодження \"\n\"(додаткові перевірки під час виконання, менше оптимізації) та Випуску (менше \"\n\"перевірок під час виконання, багато оптимізацій). Вони доступні у розділі \"\n\"\\\"Налагодження\\\" у верхній частині вікна.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Якщо вам цікаво, скористайтеся командою \\\"ASM\\\" в \\\"...\\\", щоб переглянути \"\n\"згенерований асемблерний код.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Коли студенти підуть на перерву, заохотьте їх відкрити майданчик і трохи \"\n\"поекспериментувати. Заохочуйте їх залишати вкладку відкритою і пробувати \"\n\"щось протягом решти курсу. Це особливо корисно для досвідчених студентів, \"\n\"які хочуть дізнатися більше про оптимізацію Rust або згенеровану збірку.\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/modules.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 40 хвилин. Він містить:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Перейдемо до найпростішої програми Rust, класичної програми Hello World:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Привіт 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Що ви бачите:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Функції вводяться за допомогою `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Блоки розділені фігурними дужками, як у C і C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Функція `main` є точкою входу в програму.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust має гігієнічні макроси, `println!` є прикладом цього.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Рядки в Rust мають кодування UTF-8 і можуть містити будь-які символи Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Цей слайд спрямований на те, щоб студенти звикли працювати з кодом Rust. \"\n\"Вони побачать масу цього протягом наступних чотирьох днів, тож ми починаємо \"\n\"з чогось малого та знайомого.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust дуже схожий на інші традиціїні мови як C/C++/Java. Це навмисно, і він \"\n\"не намагається винайти щось заново, якщо це не є абсолютно необхідним.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust сучасний із повною підтримкою таких речей, як Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust використовує макроси для ситуацій, коли потрібно мати змінну кількість \"\n\"аргументів (немає [перевантаження](basic-syntax/functions-interlude.md) \"\n\"функцій).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Макроси є «гігієнічними» що означає, що вони випадково не захоплюють \"\n\"ідентифікатори з області, у якій вони використовуються. Макроси Rust \"\n\"насправді лише [частково гігієнічні](https://veykril.github.io/tlborm/decl-\"\n\"macros/minutiae/hygiene .html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust є мультипарадигмою. Наприклад, він має потужні [функції об’єктно-\"\n\"орієнтованого програмування](https://doc.rust-lang.org/book/ch17-00-oop.\"\n\"html), і, хоча це не функціональна мова, він включає діапазон \"\n\"[функціональних понять](https://doc.rust-lang.org/book/ch13-00-functional-\"\n\"features.html).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust забезпечує безпеку типів за допомогою статичної типізації. Прив'язки \"\n\"змінних створюються за допомогою `let`:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Відкоментуйте `x = 20`, щоб продемонструвати, що змінні за замовчуванням є \"\n\"незмінними. Додайте ключове слово `mut`, щоб дозволити зміну.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"Тут `i32` - це тип змінної. Він має бути відомий під час компіляції, але \"\n\"виведення типів (розглядається пізніше) дозволяє програмісту у багатьох \"\n\"випадках не вказувати його.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"Нижче наведено деякі основні вбудовані типи та синтаксис для літеральних \"\n\"значень кожного типу.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Типи\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Літерали\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Цілі числа зі знаком\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Беззнакові цілі числа\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Числа з плаваючою комою\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Скалярні значення Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Логічні значення\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Типи мають наступну ширину:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` і `fN` мають ширину _N_ біт,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` і `usize` – це ширина вказівника,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` має ширину 32 біти,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` має ширину 8 біт.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Є кілька синтаксисів, які не показано вище:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Усі підкреслення у числах можна опускати, вони призначені лише для \"\n\"розбірливості. Отже, `1_000` можна записати як `1000` (або `10_00`), а \"\n\"`123_i64` можна записати як `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"результат: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"Це перший раз, коли ми бачимо функцію, відмінну від `main`, але її значення \"\n\"повинно бути зрозумілим: вона отримує три цілих числа і повертає ціле число. \"\n\"Функції буде розглянуто більш детально пізніше.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"Арифметика дуже схожа на інші мови, зі схожими пріоритетами.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do unknown things at runtime. In Rust, it's \"\n\"defined.\"\nmsgstr \"\"\n\"Як бути з переповненням цілих чисел? У мовах C та C++ переповнення цілих \"\n\"чисел _зі знаком_ фактично не визначено, і може робити невідомі речі під час \"\n\"виконання. У Rust воно визначене.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Замініть `i32` на `i16`, щоб побачити цілочисельне переповнення, яке панікує \"\n\"(перевіряється) у налагоджувальній збірці і загортається у релізній збірці. \"\n\"Існують і інші варіанти, такі як переповнення, перенасичення і перенесення. \"\n\"Доступ до них здійснюється за допомогою синтаксису методу, наприклад, `(a * \"\n\"b).saturating_add(b * c).saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"Насправді, компілятор виявить переповнення константних виразів, тому приклад \"\n\"вимагає окремої функції.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust перевірить, як _використовується_ змінна для визначення типу:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"На цьому слайді показано, як компілятор Rust виводить типи на основі \"\n\"обмежень, заданих оголошеннями змінних та їх використанням.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Дуже важливо підкреслити, що змінні, оголошені таким чином, не належать до \"\n\"якогось динамічного «будь-якого типу», який може містити будь-які дані. \"\n\"Машинний код, згенерований такою декларацією, ідентичний явному оголошенню \"\n\"типу. Компілятор виконує роботу за нас і допомагає нам писати більш стислий \"\n\"код.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Якщо тип цілочисельного літерала не обмежено, Rust за замовчуванням \"\n\"використовує тип `i32`. Іноді у повідомленнях про помилки це позначається як \"\n\"`{integer}`. Подібно до цього, літерали з плаваючою комою за замовчуванням \"\n\"мають тип `f64`.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ПОМИЛКА: немає реалізації для `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"Послідовність Фібоначчі починається з `[0,1]`. Для n>1 n-те число Фібоначчі \"\n\"обчислюється рекурсивно як сума n-1-го та n-2-го чисел Фібоначчі.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"Напишіть функцію `fib(n)`, яка обчислює n-те число Фібоначчі.  Коли ця \"\n\"функція запанікує?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// Базовий випадок.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Реалізуйте це\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// Рекурсивний випадок.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"if Expressions\"\nmsgstr \"Вирази if\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"4 хвилини\"\n\n#: src/control-flow-basics.md\nmsgid \"break and continue\"\nmsgstr \"break та continue\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Вирази `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Ви використовуєте вирази [`if`](https://doc.rust-lang.org/reference/\"\n\"expressions/if-expr.html#if-expressions) так само, як і вирази `if` в інших \"\n\"мовах:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"нуль!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"великий\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"величезний\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Крім того, ви можете використовувати `if` як вираз. Останній вираз кожного \"\n\"блоку стає значенням виразу `if`:\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"маленький\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"великий\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"розмір числа: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Оскільки `if` є виразом і повинен мати певний тип, обидва його блоки \"\n\"розгалужень повинні мати той самий тип. Покажіть, що станеться, якщо додати \"\n\"`;` після `\\\"маленький\\\"` у другому прикладі.\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"An `if` expression should be used in the same way as the other expressions. \"\n\"For example, when it is used in a `let` statement, the statement must be \"\n\"terminated with a `;` as well. Remove the `;` before `println!` to see the \"\n\"compiler error.\"\nmsgstr \"\"\n\"Вираз `if` слід використовувати так само, як і інші вирази. Наприклад, якщо \"\n\"він використовується в операторі `let`, цей оператор також має завершуватися \"\n\"символом `;`. Видаліть `;` перед `println!`, щоб побачити помилку \"\n\"компілятора.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"У Rust є три ключові слова циклу: `while`, `loop` і `for`:\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"Ключове слово [`while`](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) працює так само, як і в інших мовах, виконуючи \"\n\"тіло циклу доти, доки умова виконується.\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"Цикл [`for`](https://doc.rust-lang.org/std/keyword.for.html) виконує \"\n\"ітерації над діапазонами значень або елементами колекції:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"Під капотом циклів `for` використовується концепція, яка називається \"\n\"\\\"ітератори\\\", для обробки ітерацій над різними типами діапазонів/колекцій. \"\n\"Ітератори буде розглянуто більш детально пізніше.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the first `for` loop only iterates to `4`. Show the `1..=5` syntax \"\n\"for an inclusive range.\"\nmsgstr \"\"\n\"Зверніть увагу, що перший цикл `for` виконує ітерацію тільки до `4`. \"\n\"Покажіть синтаксис `1..=5` для включеного діапазону.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"Оператор [`loop`](https://doc.rust-lang.org/std/keyword.loop.html) просто \"\n\"повторюється до нескінченності, поки не трапиться `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Якщо ви хочете негайно почати наступну ітерацію, використовуйте [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). With \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Якщо ви хочете достроково вийти з будь-якого типу циклу, використовуйте \"\n\"[`break`](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#break-expressions). З `loop` це може бути необов'язковий вираз, який \"\n\"стане значенням виразу `loop`.\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which can return a non-\"\n\"trivial value. This is because it's guaranteed to only return at a `break` \"\n\"statement (unlike `while` and `for` loops, which can also return when the \"\n\"condition fails).\"\nmsgstr \"\"\n\"Зверніть увагу, що `loop` - це єдина циклічна конструкція, яка може \"\n\"повертати нетривіальне значення. Це пов'язано з тим, що вона гарантовано \"\n\"повертає значення лише при виконанні оператора `break` (на відміну від \"\n\"циклів `while` і `for`, які також можуть повертати значення при невиконанні \"\n\"умови).\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"І `continue`, і `break` можуть додатково приймати аргумент мітки, який \"\n\"використовується для виходу з вкладених циклів:\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"елементів переглянуто: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"Labeled break also works on arbitrary blocks, e.g.\"\nmsgstr \"Позначене переривання також працює на довільних блоках, наприклад\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"This line gets skipped\\\"\"\nmsgstr \"\\\"Цей рядок пропускається\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Блоки\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Блок у Rust містить послідовність виразів, взятих у фігурні дужки `{}`. \"\n\"Кожен блок має значення і тип, які відповідають значенню і типу останнього \"\n\"виразу в блоці:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Якщо останній вираз закінчується символом `;`, то результуюче значення і тип \"\n\"буде `()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Ви можете показати, як змінюється значення блоку, змінивши останній рядок у \"\n\"блоці. Наприклад, додаванням/видаленням крапки з комою або використанням \"\n\"`return`.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"Область видимості змінної обмежується блоком, що її охоплює.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Ви можете затіняти змінні, як із зовнішніх областей, так і змінні з тієї ж \"\n\"області:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"до: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"привіт\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"внутрішня область видимості: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"затінений у внутрішній області видимості: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"після: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"Покажіть, що область видимості змінної обмежена, додавши `b` у внутрішньому \"\n\"блоці в останньому прикладі, а потім спробувавши отримати доступ до неї за \"\n\"межами цього блоку.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variables' memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Затінення відрізняється від мутації тим, що після затінення обидві ділянки \"\n\"пам'яті змінних існують одночасно. Обидві змінні доступні під одним і тим же \"\n\"ім'ям, залежно від того, де ви їх використовуєте у коді.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"Змінна затінення може мати інший тип.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Затінення спочатку виглядає незрозумілим, але є зручним для збереження \"\n\"значень після `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Параметри оголошення супроводжуються типом (у зворотному порядку порівняно з \"\n\"деякими мовами програмування), а потім типом повернення.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Останній вираз у тілі функції (або будь-якого блоку) стає значенням, що \"\n\"повертається. Просто опустіть `;` в кінці виразу. Ключове слово `return` \"\n\"можна використовувати для дострокового повернення, але форма \\\"голого \"\n\"значення\\\" є ідіоматичною у кінці функції (рефактор `gcd` щоб \"\n\"використовувати `return`).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the return type is omitted.\"\nmsgstr \"\"\n\"Деякі функції не мають значення, що повертається, і повертають 'тип \"\n\"агрегату', `()`. Компілятор визначить це, якщо тип повернення пропущено.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"Перевантаження не підтримується - кожна функція має єдину реалізацію.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Завжди приймає фіксовану кількість параметрів. Аргументи за замовчуванням не \"\n\"підтримуються. Для підтримки варіаційних функцій можна використовувати \"\n\"макроси.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Завжди приймає єдиний набір типів параметрів. Ці типи можуть бути \"\n\"загальними, що буде розглянуто пізніше.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Макроси розгортаються у код Rust під час компіляції і можуть приймати змінну \"\n\"кількість аргументів. Вони відрізняються символом `!` у кінці. До \"\n\"стандартної бібліотеки Rust входить набір корисних макросів.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` виводить рядок у стандартний вивід, застосовуючи \"\n\"форматування, описане у [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.\"\n\"html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` працює так само, як `println!`, але повертає результат \"\n\"у вигляді рядка.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(вираз)` записує значення виразу і повертає його.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` позначає частину коду як таку, що ще не виконана. Якщо цей код \"\n\"буде виконано, він викличе паніку.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` позначає ділянку коду як недосяжну. Якщо цей код буде \"\n\"виконано, він викличе паніку.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"Висновок з цього розділу полягає в тому, що ці загальні зручності існують, і \"\n\"те, як ними користуватися. Чому вони визначені як макроси і на що вони \"\n\"поширюються, не є особливо важливим.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"У цьому курсі не розглядається визначення макросів, але в наступному розділі \"\n\"буде описано використання похідних макросів.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n<sub>1</sub> greater than zero:\"\nmsgstr \"\"\n\"[Послідовність Коллатца](https://en.wikipedia.org/wiki/Collatz_conjecture) \"\n\"визначається наступним чином, для довільного n<sub>1</sub> більшого за нуль:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is 1, then the sequence terminates at _n<sub>i</sub>_.\"\nmsgstr \"\"\n\"Якщо _n<sub>i</sub>_ є 1, то послідовність завершується при _n<sub>i</sub>_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n<sub>i</sub>_ is even, then _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\nmsgstr \"\"\n\"Якщо _n<sub>i</sub>_ є парним, то _n<sub>i+1</sub> = n<sub>i</sub> / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"If _n<sub>i</sub>_ is odd, then _n<sub>i+1</sub> = 3 * n<sub>i</sub> + 1_.\"\nmsgstr \"\"\n\"Якщо _n<sub>i</sub>_ є непарним, то _n<sub>i+1</sub> = 3 * n<sub>i</sub> + \"\n\"1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n<sub>1</sub>_ = 3:\"\nmsgstr \"Наприклад, починаючи з _n<sub>1</sub>_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\nmsgstr \"3 є непарним, таким чином _n<sub>2</sub>_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n<sub>3</sub>_ = 10 / 2 = 5;\"\nmsgstr \"10 є парним, таким чином _n<sub>3</sub>_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\nmsgstr \"5 є непарним, таким чином _n<sub>4</sub>_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n<sub>5</sub>_ = 16 / 2 = 8;\"\nmsgstr \"16 є парним, таким чином _n<sub>5</sub>_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n<sub>6</sub>_ = 8 / 2 = 4;\"\nmsgstr \"8 є парним, таким чином _n<sub>6</sub>_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n<sub>7</sub>_ = 4 / 2 = 2;\"\nmsgstr \"4 є парним, таким чином _n<sub>7</sub>_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n<sub>8</sub>_ = 1; and\"\nmsgstr \"2 є парним, таким чином _n<sub>8</sub>_ = 1; та\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"послідовність завершується.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Напишіть функцію, яка обчислює довжину коллатц-послідовності для заданого \"\n\"початкового `n`.\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Визначте довжину послідовності колатів, яка починається з `n`.\\n\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Довжина: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"Ласкаво просимо назад\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія триватиме приблизно 2 години 35 \"\n\"хвилин. Віна містить:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 35 хвилин. Він містить:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"Значення типу масиву `[T; N]` містить `N` (константа часу компіляції) \"\n\"елементів того самого типу `T`. Зверніть увагу, що довжина масиву є \"\n\"_частиною його типу_, що означає, що `[u8; 3]` і `[u8; 4]` вважаються двома \"\n\"різними типами. Зрізи, розмір яких визначається під час виконання, \"\n\"покриваються пізніше.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"Спробуйте доступ до елементу масиву, що знаходиться за межами масиву. Доступ \"\n\"до масиву перевіряється під час виконання. Зазвичай Rust може оптимізувати \"\n\"ці перевірки, і їх можна уникнути, використовуючи небезпечний Rust.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"Ми можемо використовувати літерали для присвоєння значень масивам.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"Макрос `println!` запитує реалізацію налагодження за допомогою параметра \"\n\"формату `?`: `{}` - виведення за замовчуванням, `{:?}` - виведення \"\n\"налагодження. Такі типи, як цілі числа і рядки, реалізують виведення за \"\n\"замовчуванням, але масиви реалізують лише виведення для налагодження. Це \"\n\"означає, що тут ми повинні використовувати налагоджувальний вивід.\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"Додавання `#`, наприклад `{a:#?}`, викликає формат \\\"гарного друку\\\", який \"\n\"може бути легшим для читання.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"Як і масиви, кортежі мають фіксовану довжину.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"Кортежі групують значення різних типів у складений тип.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\"Доступ до полів кортежу можна отримати після крапки з індексом значення, \"\n\"наприклад. `t.0`, `t.1`.\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\"Порожній кортеж `()` називається \\\" типом одиниці\\\" і означає відсутність \"\n\"значення, що повертається, подібно до `void` в інших мовах.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"Оператор `for` підтримує ітерацію над масивами (але не кортежами).\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\"Ця функціональність використовує трейт `IntoIterator`, але ми ще не \"\n\"розглядали його.\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked, while debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"Макрос `assert_ne!` тут новий. Існують також макроси `assert_eq!` та `assert!\"\n\"`. Вони завжди перевіряються, тоді як варіанти лише для налагодження, такі \"\n\"як `debug_assert!`, не компілюються у релізних збірках.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\"При роботі з кортежами та іншими структурованими значеннями часто виникає \"\n\"потреба витягти внутрішні значення у локальні змінні. Це можна зробити \"\n\"вручну шляхом прямого доступу до внутрішніх значень:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\\\"left: {left}, right: {right}\\\"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\"Однак, Rust також підтримує використання зіставлення шаблонів для розбиття \"\n\"більшого значення на складові частини:\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\"Шаблони, що використовуються тут, є \\\"неспростовними\\\", тобто компілятор \"\n\"може статично перевірити, що значення праворуч від `=` має таку саму \"\n\"структуру, як і шаблон.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\"Ім'я змінної - це неспростовний шаблон, який завжди відповідає будь-якому \"\n\"значенню, тому ми також можемо використовувати `let` для оголошення однієї \"\n\"змінної.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\"Rust також підтримує використання шаблонів в умовних операторах, що дозволяє \"\n\"виконувати порівняння на рівність і деструкцію одночасно. Ця форма \"\n\"порівняння шаблонів буде розглянута більш детально пізніше.\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\"Відредагуйте приклади вище, щоб показати помилку компілятора, коли шаблон не \"\n\"збігається зі значенням, що порівнюється.\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"Масиви можуть містити інші масиви:\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"Який тип цієї змінної?\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"Використовуйте масив, подібний до наведеного вище, для написання функції \"\n\"`transpose`, яка транспонує матрицю (перетворює рядки у стовпці):\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\"Скопіюйте наведений нижче код на <https://play.rust-lang.org/> і реалізуйте \"\n\"функцію. Ця функція працює лише з матрицями 3x3.\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: видаліть це, коли закінчите реалізацію.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- коментар змушує rustfmt додати новий рядок\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"матриця: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"транспонована: {:#?}\\\"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 55 хвилин. Він містить:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking ownership \"\n\"of the value, and is also called \\\"borrowing\\\". Shared references are read-\"\n\"only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"Посилання забезпечує доступ до іншого значення без отримання права власності \"\n\"на нього, і також називається \\\"запозиченням\\\". Спільні посилання доступні \"\n\"лише для читання, і дані, на які вони посилаються, не можуть бути змінені.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"Спільне посилання на тип `T` має тип `&T`. Значення посилання робиться за \"\n\"допомогою оператора `&`. Оператор `*` \\\"розіменовує\\\" посилання, повертаючи \"\n\"його значення.\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust статично забороняє висячі посилання:\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References can never be null in Rust, so null checking is not necessary.\"\nmsgstr \"\"\n\"Посилання ніколи не можуть бути null у Rust, тому перевірка на null не є \"\n\"обов'язковою.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"Кажуть, що посилання \\\"позичає\\\" значення, на яке воно посилається, і це \"\n\"гарна модель для слухачів, які не знайомі з вказівниками: код може \"\n\"використовувати посилання для доступу до значення, але все одно залишається \"\n\"\\\"власністю\\\" вихідної змінної. Більш детально про володіння буде розглянуто \"\n\"на третьому дні курсу.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"Посилання реалізовано як вказівники, і ключовою перевагою є те, що вони \"\n\"можуть бути набагато меншими за об'єкт, на який вони вказують. Слухачі, \"\n\"знайомі з C або C++, розпізнають посилання як вказівники. У наступних \"\n\"частинах курсу буде розглянуто, як Rust запобігає помилкам, пов'язаним з \"\n\"безпекою пам'яті, які виникають при використанні сирих вказівників.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\"Rust не створює посилання автоматично - завжди потрібно використовувати `&`.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in C\"\n\"++.\"\nmsgstr \"\"\n\"У деяких випадках Rust виконує автоматичне розіменування, зокрема під час \"\n\"виклику методів (спробуйте `r.is_ascii()`).  Тут не потрібен оператор `->`, \"\n\"як у C++.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"У цьому прикладі `r` є мутабельним, тому його можна перепризначити (`r = \"\n\"&b`). Зверніть увагу, що це повторно зв'язує `r`, так що він посилається на \"\n\"щось інше. Це відрізняється від C++, де присвоювання посилання змінює \"\n\"значення, на яке воно посилається.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"Спільне посилання не дозволяє змінювати значення, на яке воно посилається, \"\n\"навіть якщо це значення було змінним. Спробуйте `*r = 'X'`.\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust відстежує час життя всіх посилань, щоб переконатися, що вони живуть \"\n\"достатньо довго. У безпечному Rust'і не може бути \\\"висячих\\\" посилань. \"\n\"Функція `x_axis` поверне посилання на `point`, але `point` буде звільнено, \"\n\"коли функція повернеться, тому це не буде скомпільовано.\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"Про запозичення ми поговоримо більше, коли дійдемо до володіння.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"Ексклюзивні посилання, також відомі як мутабельні посилання, дозволяють \"\n\"змінювати значення, на яке вони посилаються. Вони мають тип `&mut T`.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"\\\"Ексклюзивне\\\" означає, що тільки це посилання може бути використане для \"\n\"доступу до значення. Жодні інші посилання (спільні або ексклюзивні) не \"\n\"можуть існувати одночасно, і до значення, на яке посилаються, не можна \"\n\"отримати доступ, поки існує ексклюзивне посилання. Спробуйте створити \"\n\"`&point.0` або змінити `point.0`, поки існує `x_coord`.\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"Обов’язково зверніть увагу на різницю між `let mut x_coord: &i32` і `let \"\n\"x_coord: &mut i32`. Перший представляє спільне посилання, яке можна \"\n\"прив'язати до різних значень, тоді як другий представляє ексклюзивне \"\n\"посилання на значення, що змінюється.\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"Зріз дає змогу поглянути на більшу колекцію:\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"Зрізи запозичують дані зі зрізаного типу.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\"Ми створюємо зріз, запозичуючи `a` та вказуючи початковий і кінцевий індекси \"\n\"в дужках.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Якщо зріз починається з індексу 0, синтаксис діапазону Rust дозволяє нам \"\n\"відкинути початковий індекс, тобто `&a[0..a.len()]` і `&a[..a.len()]` \"\n\"ідентичні.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"Теж саме стосується останнього індексу, тому `&a[2..a.len()]` і `&a[2..]` \"\n\"ідентичні.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\"Щоб легко створити повний зріз масиву, ми можемо використовувати `&a[..]`.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` є посиланням на зріз `i32`. Зверніть увагу, що тип `s` (`&[i32]`) більше \"\n\"не згадує довжину масиву. Це дозволяє нам виконувати обчислення на зрізах \"\n\"різного розміру.\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"Зрізи завжди запозичуються з іншого об'єкта. У цьому прикладі `a` має \"\n\"залишатися 'живим' (в області застосування) принаймні стільки ж, скільки і \"\n\"наш зріз.\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"Тепер ми можемо зрозуміти два типи рядків у Rust:\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"Світ\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Привіт \\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals (`\\\"Hello\"\n\"\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` представляє зріз рядка, який є незмінним посиланням на дані рядка в \"\n\"кодуванні UTF-8, що зберігаються в блоці пам’яті. Рядкові літерали (`\\\"Hello\"\n\"\\\"`) зберігаються у бінарному файлі програми.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Тип `String` в Rust — це оболонка навколо вектора байтів. Як і у випадку з \"\n\"`Vec<T>`, він знаходиться у володінні.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"Як і у багатьох інших типів, `String::from()` створює рядок із рядкового \"\n\"літералу; `String::new()` створює новий порожній рядок, до якого дані рядка \"\n\"можна додати за допомогою методів `push()` і `push_str()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"Макрос `format!()` є зручним способом створення рядка, яким володіють, з \"\n\"динамічних значень. Він приймає таку саму специфікацію формату, як і \"\n\"`println!()`.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"Ви можете запозичувати зрізки `&str` з `String` за допомогою `&` і, за \"\n\"бажанням, вибору діапазону. Якщо ви виберете діапазон байт, який не \"\n\"вирівняно за межами символів, вираз запанікує. Ітератор `chars` перебирає \"\n\"символи, і йому надається перевага перед спробами вирівняти межі символів.\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"Для програмістів на C++: думайте про `&str` як про `std::string_view` з C++, \"\n\"але такий, що завжди вказує на дійсний рядок у пам'яті. Rust `String` є \"\n\"приблизним еквівалентом `std::string` з C++ (головна відмінність: він може \"\n\"містити лише байти у кодуванні UTF-8 і ніколи не використовує оптимізацію \"\n\"малих рядків)..\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\"Літерали байтових рядків дозволяють створювати значення `&[u8]` \"\n\"безпосередньо:\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: `r\\\"\\\\n\"\n\"\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal amount of \"\n\"`#` on either side of the quotes:\"\nmsgstr \"\"\n\"Необроблені рядки дозволяють створювати значення `&str` з відключеним \"\n\"екрануванням: `r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. Ви можете вставити подвійні лапки, \"\n\"використовуючи однакову кількість `#` з обох боків лапок:\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"Ми створимо декілька утиліт для тривимірної геометрії, що представляють \"\n\"точку у вигляді `[f64;3]`. Ви самі визначаєте сигнатури функцій.\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Обчисліть величину вектора шляхом додавання квадратів його координат\\n\"\n\"// і вилучення квадратного кореня. Використовуйте метод `qrt()` для для \"\n\"обчислення квадратного\\n\"\n\"// кореня, наприклад `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Нормалізуйте вектор, обчисливши його величину і поділивши всі його\\n\"\n\"// координати на цю величину.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"Використовуйте наступний `main` для тестування вашої роботи.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Величина одиничного вектора: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Величина {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Величина {v:?} після нормалізації: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Обчисліть величину заданого вектора.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"/// Змініть величину вектора на 1.0, не змінюючи його напрямок.\\n\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 50 хвилин. Він містить:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"Подібно до C і C++, Rust підтримує користувальницькі структури:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} віком {} років\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"Ключові моменти:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"Структури працюють як у C або C++.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\"Як і в C++, і на відміну від C, для визначення типу не потрібен typedef.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"На відміну від C++, між структурами немає успадкування.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\"Це може бути вдалий час, щоб повідомити людям, що існують різні типи \"\n\"структур.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"Структури нульового розміру (наприклад, `struct Foo;`) можуть бути \"\n\"використані при реалізації трейту на якомусь типі, але не мають даних, які \"\n\"ви хочете зберігати у самому значенні.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\"На наступному слайді буде представлено структури кортежу, які \"\n\"використовуються, коли імена полів не важливі.\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\"Якщо у вас уже є змінні з правильними іменами, ви можете створити структуру \"\n\"за допомогою скорочення:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"Синтаксис `..avery` дозволяє нам скопіювати більшість полів зі старої \"\n\"структури без необхідності явного введення всіх полів. Це завжди має бути \"\n\"останнім елементом.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"Якщо імена полів неважливі, ви можете використати структуру кортежу:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\"Це часто використовується для обгорток з одним полем (так званих newtypes):\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Запитайте вченого-ракетника з NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"Newtypes — чудовий спосіб закодувати додаткову інформацію про значення в \"\n\"примітивному типі, наприклад:\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\"Число вимірюється в деяких одиницях: у наведеному вище прикладі `Newtons`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"Значення пройшло певну перевірку під час створення, тому вам більше не \"\n\"потрібно перевіряти його знову при кожному використанні: \"\n\"`PhoneNumber(String)` або `OddNumber(u32)`.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"Продемонструйте, як додати значення `f64` до типу `Newtons`, отримавши \"\n\"доступ до єдиного поля в newtype.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\"Rust зазвичай не любить неявних речей, таких як автоматичне розгортання або, \"\n\"наприклад, використання логічних значень як цілих чисел.\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"Перевантаження операторів обговорюється в день 3 (дженерики).\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"Цей приклад є тонким посиланням на невдачу [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\"Ключове слово `enum` дозволяє створити тип, який має кілька різних варіантів:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Простий варіант\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Варіант кортежу\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Варіант структури\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {player_move:?}\\\"\"\nmsgstr \"\\\"На цьому повороті: {player_move:?}\\\"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"Переліки дозволяють збирати набір значень під одним типом.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"Напрямок - це тип з варіантами. Існує два значення `Direction`: `Direction::\"\n\"Left` та `Direction::Right`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` - це тип з трьома варіантами. На додаток до корисного \"\n\"навантаження, Rust зберігатиме дискримінант, щоб під час виконання знати, \"\n\"який варіант є у значенні `PlayerMove`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"Це може бути гарний час для порівняння структури та переліки:\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"В обох ви можете мати просту версію без полів (структура одиниць) або з \"\n\"різними типами полів (різні варіанти корисного навантаження).\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"Ви навіть можете реалізувати різні варіанти переліку окремими структурами, \"\n\"але тоді вони не будуть одного типу, як якщо б всі вони були визначені в \"\n\"переліку.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\"Rust використовує мінімальний обсяг пам'яті для зберігання дискримінанта.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"Якщо потрібно, він зберігає ціле число найменшого необхідного розміру\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche optimization\"\n\"\\\"). For example, `Option<&u8>` stores either a pointer to an integer or \"\n\"`NULL` for the `None` variant.\"\nmsgstr \"\"\n\"Якщо допустимі значення варіантів не покривають усіх бітових шаблонів, для \"\n\"кодування дискримінанта буде використано неприпустимі бітові шаблони \"\n\"(\\\"нішева оптимізація\\\"). Наприклад, `Option<&u8>` зберігає або вказівник на \"\n\"ціле число, або `NULL` для варіанта `None`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\"За потреби можна керувати дискримінантом (наприклад, для сумісності з C):\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"Без `repr` тип дискримінанта займає 2 байти, оскільки 10001 вміщує 2 байти.\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/memory-management/copy-types.md src/borrowing/shared.md\n#: src/error-handling/result.md src/error-handling/anyhow.md\nmsgid \"More to Explore\"\nmsgstr \"Більше інформації для вивчення\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\"Rust має декілька оптимізацій, які можна застосувати, щоб зменшити розмір \"\n\"переліків.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Оптимізація нульового вказівника: для [деяких типів](https://doc.rust-lang.\"\n\"org/std/option/#representation) Rust гарантує, що `size_of::<T>()` дорівнює \"\n\"`size_of::<Option <T>>()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"Приклад коду, якщо ви хочете показати, як _може_ виглядати  побітове \"\n\"представлення на практиці. Важливо зазначити, що компілятор не надає жодних \"\n\"гарантій щодо цього представлення, тому це абсолютно небезпечно.\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\"Константи обчислюються під час компіляції, а їхні значення вставляються \"\n\"всюди, де вони використовуються:\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"Відповідно до [Книги Rust RFC](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) вони підставляються під час використання.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"Лише функції з позначкою `const` можна викликати під час компіляції для \"\n\"створення значень `const`. Однак функції `const` можна викликати під час \"\n\"виконання.\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"Зауважте, що `const` поводиться семантично подібно до `constexpr` C++.\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"Не так часто виникає потреба у константі, що обчислюється під час виконання, \"\n\"але це корисно та безпечніше, ніж використовувати static.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\"Статичні змінні будуть жити протягом усього часу виконання програми, тому не \"\n\"будуть переміщатися:\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\\\"Ласкаво просимо до RustOS 3.14\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"Як зазначено в [Книзі Rust RFC](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), вони не підставляються під час використання та мають \"\n\"реальну асоційовану ділянку пам'яті. Це корисно для небезпечного та \"\n\"вбудованого коду, і змінна живе протягом усього виконання програми. Якщо \"\n\"значення глобальної області видимості не потребує ідентичності об’єкта, \"\n\"перевага надається `const`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"`static` схожий на мутабельні глобальні змінні в C++.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` забезпечує ідентичність об’єкта: адресу в пам’яті та стан \"\n\"відповідно до типів із внутрішньою змінністю, таких як `Mutex<T>`.\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"Оскільки `static` змінні доступні з будь-якого потоку, вони повинні бути \"\n\"`Sync`. Внутрішня змінність можлива через [`Mutex`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html), atomic або подібні до них.\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\"Локальні дані потоку можна створити за допомогою макросу `std::thread_local`.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\"Псевдонім типу створює ім'я для іншого типу. Ці два типи можна \"\n\"використовувати взаємозамінно.\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// Псевдоніми більш корисні для довгих, складних типів:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"Програмісти на C впізнають це як схоже на `typedef`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"Ми створимо структуру даних для представлення події в системі керування \"\n\"ліфтом. Ви самі визначаєте типи та функції для створення різних подій. \"\n\"Використовуйте `#[derive(Debug)]`, щоб дозволити форматування типів за \"\n\"допомогою `{:?}`.\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"У цій вправі потрібно лише створити і заповнити структури даних так, щоб \"\n\"`main` працював без помилок. Наступна частина курсу буде присвячена \"\n\"отриманню даних з цих структур.\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"/// Подія в ліфтовій системі, на яку повинен реагувати контролер.\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: додайте необхідні варіанти\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// Напрямок руху.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// Кабіна ліфта прибув на вказаний поверх.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// Двері у кабіні ліфта відчинилися.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// Двері у кабіні ліфта зачинилися.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// У ліфтовому холі на даному поверсі була натиснута кнопка виклику в \"\n\"заданому напрямку.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// У кабіні ліфта була натиснута кнопка поверху.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"Пасажир першого поверху натиснув кнопку вгору: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"Кабіна ліфта заїхала на перший поверх: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"Двері у кабіні ліфта відчинилися: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"Пасажир натиснув кнопку 3-го поверху: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"Двері у кабіні ліфта зачинилися: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"Кабіна ліфта заїхала на 3-й поверх: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// Була натиснута кнопка.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// Кабіна ліфта прибула на вказаний поверх.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// Двері кабіни ліфта відчинилися.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// Двері кабіни ліфта зачинилися.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// Поверх задається цілим числом.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// Кнопка, доступна для користувача.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// Кнопка в холі ліфта на даному поверсі.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// Кнопка поверху в кабіни ліфта.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Ласкаво просимо до Дня 2\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Тепер, коли ми побачили достатню кількість Rust, ми зосередимося на системі \"\n\"типів Rust:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"Зіставлення шаблонів: вилучення даних зі структур.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Методи: зв'язування функцій з типами.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Трэйти: поведінка, спільна для кількох типів\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Узагальнення: параметризація типів в інших типах.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Типи та властивості стандартної бібліотеки: екскурсія по багатій стандартній \"\n\"бібліотеці Rust.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія триватиме приблизно 2 години 10 \"\n\"хвилин. Вона містить:\"\n\n#: src/pattern-matching.md src/std-types.md src/memory-management.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 1 години. Він містить:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"Ключове слово `match` дозволяє зіставити значення з одним або декількома \"\n\"_шаблонами_. Порівняння відбуваються зверху вниз, і виграє перший збіг.\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\"Шаблони можуть бути простими значеннями, подібно до `switch` у C та C++:\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Виходжу\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Пересування\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Введення числа\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Нижній регістр: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Щось інше\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"Шаблон `_` - це шаблон підстановки, який відповідає будь-якому значенню. \"\n\"Вирази _повинні_ бути вичерпними, тобто охоплювати всі можливі варіанти, \"\n\"тому `_` часто використовується як остаточний всеохоплюючий випадок.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"Match можна використовувати як вираз. Як і у випадку з `if`, кожна гілка \"\n\"зіставлення повинно мати однаковий тип. Тип - це останній вираз у блоці, \"\n\"якщо такий є. У наведеному вище прикладі тип `()`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\"Змінна у шаблоні (у цьому прикладі - `key`) створить прив'язку, яку можна \"\n\"використовувати у гілці зіставлення.\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\"Запобіжник зіставлення призводить до гілці зіставлення, тільки якщо умова \"\n\"істинна.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"Ви можете вказати, як деякі конкретні символи використовуються в шаблоні\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` як `or`\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` може розширюватися настільки, наскільки це потрібно\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` представляє включний діапазон\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` - символ підстановки\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"Запобіжники зіставлення як окрема функція синтаксису є важливою та \"\n\"необхідною, коли ми хочемо стисло висловити більш складні ідеї, ніж це \"\n\"дозволили б самі шаблони.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"Це не те саме, що окремий вираз `if` всередині гілкі зіставлення. Вираз `if` \"\n\"всередині блоку розгалуження (після `=>`) виникає після вибору гілкі \"\n\"зіставлення. Невиконання умови `if` всередині цього блоку не призведе до \"\n\"розгляду інших частин вихідного виразу `match`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\"Умова, визначена в запобіжнику, застосовується до кожного виразу в шаблоні з \"\n\"`|`.\"\n\n#: src/pattern-matching/match.md\nmsgid \"More To Explore\"\nmsgstr \"Більше інформації для вивчення\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Another piece of pattern syntax you can show students is the `@` syntax \"\n\"which binds a part of a pattern to a variable. For example:\"\nmsgstr \"\"\n\"Ще одним елементом синтаксису шаблону, який ви можете показати учням, є \"\n\"синтаксис `@`, який прив'язує частину шаблону до змінної. Наприклад:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"outer: {outer:?}, inner: {inner}\\\"\"\nmsgstr \"\\\"outer: {outer:?}, inner: {inner}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"In this example `inner` has the value 123 which it pulled from the `Option` \"\n\"via destructuring, `outer` captures the entire `Some(inner)` expression, so \"\n\"it contains the full `Option::Some(123)`. This is rarely used but can be \"\n\"useful in more complex patterns.\"\nmsgstr \"\"\n\"У цьому прикладі `inner` має значення 123, яке він витягнув з `Option` за \"\n\"допомогою деструктуризації, `outer` перехоплює весь вираз `Some(inner)`, \"\n\"тому він містить повний вираз `Option::Some(123)`. Це рідко \"\n\"використовується, але може бути корисним у більш складних шаблонах.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"Структури\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\"Як і кортежі, структури також можуть бути деструктуровані шляхом зіставлення:\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, інші поля були проігноровані\\\"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"Змініть значення літералів у `foo`, відповідно до інших шаблонів.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"Додайте нове поле до `Foo` і внесіть потрібні зміни до шаблону.\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"Різницю між захопленням і постійним виразом може бути важко помітити. \"\n\"Спробуйте змінити `2` у другій гілці на змінну, і побачте, що це непомітно \"\n\"не працює. Змініть ії на `const` і подивіться, що це знову запрацює.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\"Як і кортежі, переліки також можуть бути деструктуровані шляхом зіставлення:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"Шаблони також можна використовувати для прив’язки змінних до частин ваших \"\n\"значень. Таким чином ви перевіряєте структуру ваших типів. Давайте \"\n\"розпочнемо з простого типу `enum`:\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"не можна поділити {n} на дві рівні частини\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} поділена навпіл, це {half}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"вибачте, сталася помилка: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"Тут ми використали гілки для _деструктурування_ значення `Result`. У першій \"\n\"гілці `half` прив'язано до значення всередині варіанту `Ok`. У другій гілці \"\n\"`msg` прив'язано до повідомлення про помилку.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\"Вираз `if`/`else` повертає перелік, який пізніше розпаковується за допомогою \"\n\"`match`.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"Ви можете спробувати додати третій варіант до визначення переліку і \"\n\"відобразити помилки під час виконання коду. Вкажіть місця, де ваш код зараз \"\n\"є невичерпним, і як компілятор намагається дати вам підказки.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"Доступ до значень у варіантах переліку можливий лише після зіставлення з \"\n\"шаблоном.\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"Продемонструйте, що відбувається, коли пошук є невичерпним. Зверніть увагу \"\n\"на перевагу, яку надає компілятор Rust, підтверджуючи що всі випадки \"\n\"оброблено.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\"Rust має кілька конструкцій потоку керування, які відрізняються від інших \"\n\"мов. Вони використовуються для зіставлення шаблонів:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"вирази `if let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"вирази `let else`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"вирази `while let`\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"Вираз [`if let`](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions) дозволяє виконувати інший код залежно від того, чи \"\n\"відповідає значення шаблону :\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {duration:?}\\\"\"\nmsgstr \"\\\"проспав {duration:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"Для загального випадку зіставлення шаблону і повернення з функції \"\n\"використовуйте [`let else`](https://doc.rust-lang.org/rust-by-example/\"\n\"flow_control/let_else.html). Випадок \\\"else\\\" повинен відрізнятися \"\n\"(`return`, `break` або паніка - що завгодно, але не випадання з кінця блоку).\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"не шістнадцяткова цифра\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"отримав порожній рядок\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"отримав None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"результат: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"Подібно до `if let`, існує варіант [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops), який \"\n\"багаторазово перевіряє значення на відповідність шаблону:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"Тут [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) повертає `Some(c)` поки рядок не стане порожнім, \"\n\"після чого поверне `None`. Використання `while let` дозволяє нам \"\n\"продовжувати ітерацію по всіх елементах.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\"На відміну від `match`, `if let` не має охоплювати всі гілки. Це може \"\n\"зробити його більш лаконічним, ніж `match`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\"Загальним використанням є обробка значень `Some` під час роботи з `Option`.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\"На відміну від `match`, `if let` не підтримує захисні вирази для збігу \"\n\"шаблонів.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"`if-let` може накопичуватись, як показано. Конструкція `let-else` підтримує \"\n\"згладжування цього вкладеного коду. Перепишіть незручну версію для \"\n\"студентів, щоб вони могли побачити перетворення.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"Переписана версія така:\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\"Зверніть увагу, що цикл `while let` триватиме, доки значення відповідає \"\n\"шаблону.\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"Ви можете переписати цикл `while let` як нескінченний цикл з оператором if, \"\n\"який переривається, коли для `name.pop()` немає значення для розгортання. \"\n\"Цикл `while let` забезпечує синтаксичний цукор для наведеного вище сценарію.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"Давайте напишемо простий рекурсивний обчислювач арифметичних виразів.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"An example of a small arithmetic expression could be `10 + 20`, which \"\n\"evaluates to `30`. We can represent the expression as a tree:\"\nmsgstr \"\"\n\"Прикладом невеликого арифметичного виразу може бути `10 + 20`, який \"\n\"обчислюється як `30`. Ми можемо представити цей вираз у вигляді дерева:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, \"\n\"which evaluate to `85`. We represent this as a much bigger tree:\"\nmsgstr \"\"\n\"Більшим і складнішим виразом буде `(10 * 9) + ((3 - 4) * 5)`, що \"\n\"обчислюється як `85`. Ми зобразимо його у вигляді набагато більшого дерева:\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"In code, we will represent the tree with two types:\"\nmsgstr \"У коді ми будемо представляти дерево двома типами:\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// Операція для виконання над двома під-виразами.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// Вираз у вигляді дерева.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// Операція над двома підвиразами.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// Літеральне значення\\n\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"Тип `Box` тут є розумним вказівником і буде детально розглянутий пізніше у \"\n\"курсі. Вираз може бути \\\"упаковано\\\" за допомогою `Box::new`, як показано у \"\n\"тестах. Щоб обчислити вираз, використайте оператор розіменування (`*`), щоб \"\n\"\\\"розпакувати\\\" його: `eval(*boxed_expr)`.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"Деякі вирази не можуть бути обчислені і повертають помилку. Стандартний тип \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) - це перелік, який представляє або успішне значення (`Ok(Value)`), або \"\n\"помилку (`Err(String)`). Ми розглянемо цей тип більш детально пізніше.\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"Скопіюйте та вставте код у середовище Rust і почніть реалізацію `eval`. \"\n\"Кінцевий продукт повинен пройти тести. Може бути корисно використати `todo!\"\n\"()` і змусити тести проходити один за одним. Ви також можете тимчасово \"\n\"оминути тест за допомогою `#[ignore]`:\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"ділення на нуль\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {expr:?}\\\"\"\nmsgstr \"\\\"expr: {expr:?}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust дозволяє пов’язувати функції з новими типами. Ви робите це за допомогою \"\n\"блоку `impl`:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// Немає отримувача, статичний метод\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Ексклюзивний запозичений доступ на читання та запис до себе\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Спільний та запозичений доступ тільки на читання до себе\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Записано {} кіл для {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Коло {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self (covered later)\\n\"\nmsgstr \"// Виключне володіння собою (про це пізніше)\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Гонка {} завершена, загальний час проходження кола: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Гран-прі Монако\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"Аргументи `self` визначають \\\"отримувача\\\" - об'єкт, на який діє метод. \"\n\"Існує декілька типових отримувачів для методу:\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`: запозичує об’єкт у викликувача за допомогою спільного та незмінного \"\n\"посилання. Після цього об’єкт можна використовувати знову.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`: запозичує об’єкт у викликувача, використовуючи унікальне та \"\n\"мутабельне посилання. Після цього об’єкт можна використовувати знову.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`: приймає право власності на об'єкт і переміщує його від викликувача. \"\n\"Метод стає власником об'єкта. Об’єкт буде видалено (звільнено), коли метод \"\n\"завершиться, якщо володіння їм не передано явно. Повне володіння не означає \"\n\"автоматичної мутабельності.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`: те саме, що й вище, але метод може змінювати об’єкт.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"Немає отримувача: це стає статичним методом у структурі. Зазвичай \"\n\"використовується для створення конструкторів, які за домовленістю \"\n\"називаються `new`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"Може бути корисно представити методи, порівнюючи їх із функціями.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"Методи викликаються для екземпляра типу (такі як структура або перелік), \"\n\"перший параметр представляє екземпляр як `self`.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"Розробники можуть використовувати методи, щоб скористатися перевагами \"\n\"синтаксису отримувача методів і допомогти їм бути більш організованими. \"\n\"Використовуючи методи, ми можемо зберігати весь код реалізації в одному \"\n\"передбачуваному місці.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\"Зверніть увагу на використання ключового слова `self`, отримувача методу.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\"Покажіть, що це скорочений термін для `self: Self` і, можливо, покажіть, як \"\n\"можна також використовувати назву структури.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\"Поясніть, що `Self` — це псевдонім типу для типу, до якого входить блок \"\n\"`impl`, і його можна використовувати деінде в блоці.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"Зауважте, що `self` використовується, як і інші структури, і крапкова \"\n\"нотація може використовуватися для посилання на окремі поля.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"Це може бути гарний час, щоб продемонструвати, чим `&self` відрізняється від \"\n\"`self`, спробувавши запустити `finish` двічі.\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"Окрім варіантів `self`, існують також [спеціальні типи обгорток](https://doc.\"\n\"rust-lang.org/reference/special-types-and-traits.html), які можуть бути \"\n\"типами отримувачів, наприклад `Box<Self>`.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\"Rust дозволяє абстрагування над типами за допомогою трейтів. Вони схожі на \"\n\"інтерфейси:\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"/// Повертає речення від цього вихованця.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"/// Виводить на термінал рядок привітання цього вихованця.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\"Трейт визначає ряд методів, які повинні мати типи, щоб реалізувати цій трейт.\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\"Далі у розділі \\\"Узагальнення\\\" ми побачимо, як побудувати функціональність, \"\n\"яка є загальною для всіх типів, що реалізують трейт.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Який же ти милий! Як тебе звати? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Гав, мене звуть {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md src/generics/dyn-trait.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Фідо\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\"Щоб реалізувати `Trait` для `Type`, ви використовуєте `impl Trait for Type \"\n\"{ .. }` блок.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\"На відміну від інтерфейсів Go, просто мати відповідні методи недостатньо: \"\n\"тип `Cat` з методом `talk()` не буде автоматично задовольняти `Pet`, якщо \"\n\"він не знаходиться у блоці `impl Pet`.\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"Трейти можуть надавати реалізації за замовчуванням для деяких методів. \"\n\"Реалізації за замовчуванням можуть покладатися на всі методи трейту. У цьому \"\n\"випадку надається `greet`, який покладається на `talk`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\"Трейт може вимагати, щоб типи, які його реалізують, також реалізовували інші \"\n\"трейти, так звані _супертрейти_. У цьому випадку, будь-який тип, що реалізує \"\n\"`Pet`, повинен реалізувати `Animal`.\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Рекс\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} має {} ніг\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\"Іноді це називають \\\"успадкуванням трейтів\\\", але студенти не повинні \"\n\"очікувати, що це буде схоже на успадкування об'єктів OO. Це просто вказує \"\n\"додаткову вимогу до реалізації трейту.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\"Асоціативні типи - це типи-заповнювачі, які надаються реалізацією трейту.\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\"Асоціативні типи іноді також називають \\\"вихідними типами\\\". Ключовим \"\n\"зауваженням є те, що цей тип вибирає реалізатор, а не той, хто його викликає.\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\"Багато стандартних бібліотечних трейтів мають асоційовані типи, включаючи \"\n\"арифметичні оператори та `Iterator`.\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\"Підтримувані трейти можуть бути автоматично застосовані до ваших кастомних \"\n\"типів наступним чином:\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// Трейт Default додає `default` конструктор .\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// Трейт Clone додає `clone` метод.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// Трейт Debug додає підтримку друку з `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{p1:?} vs. {p2:?}\\\"\"\nmsgstr \"\\\"{p1:?} проти {p2:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"Виведення реалізовано за допомогою макросів, і багато крейтів надають \"\n\"корисні макроси виведення для додавання корисної функціональності. \"\n\"Наприклад, `serde` може виводити підтримку серіалізації для структури за \"\n\"допомогою `#[derive(Serialize)]`.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"Вправа: Трейт логгера\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"Давайте розробимо просту утиліту для ведення логів, використовуючи трейт \"\n\"`Logger` з методом `log`. Код, який може реєструвати свій прогрес, може \"\n\"отримати `&impl Logger`. Під час тестування це може призвести до запису \"\n\"повідомлень до тестового лог-файлу, тоді як у виробничій збірці повідомлення \"\n\"надсилатимуться до сервера логів.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StdoutLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"Однак, наведений нижче `StdoutLogger` реєструє всі повідомлення, незалежно \"\n\"від їхньої докладності. Ваше завдання - написати тип `VerbosityFilter`, який \"\n\"ігноруватиме повідомлення з максимальною докладностю.\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"Це поширений патерн: структура, що обгортає реалізацію трейту і реалізує той \"\n\"самий трейт, додаючи поведінку в процесі. Які ще типи обгорток можуть бути \"\n\"корисними у утиліті для ведення логів?\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Запишіть повідомлення із заданим рівнем докладності.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosity={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: Визначте та реалізуйте `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"FYI\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Uhoh\\\"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"/// Записуйте повідомлення лише до заданого рівня докладності.\\n\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 15 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія має тривати близько 3 годин 15 \"\n\"хвилин. Вона містить:\"\n\n#: src/generics.md src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 45 хвилин. Він містить:\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"impl Trait\"\n\n#: src/generics.md\nmsgid \"dyn Trait\"\nmsgstr \"dyn Trait\"\n\n#: src/generics.md\nmsgid \"Exercise: Generic min\"\nmsgstr \"Вправа: Узагальнений min\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust підтримує узагальнені типи, що дозволяє абстрагувати алгоритми або \"\n\"структури даних (наприклад, сортування або бінарне дерево) від типів, що \"\n\"використовуються або зберігаються.\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// Виберіть `even` або `odd` в залежності від значення `n`.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"вибраний номер: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a string: {:?}\\\"\"\nmsgstr \"\\\"вибрав рядок: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"собака\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"кіт\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\"Rust визначає тип для T на основі типів аргументів та значення, що \"\n\"повертається.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"In this example we only use the primitive types `i32` and `&str` for `T`, \"\n\"but we can use any type here, including user-defined types:\"\nmsgstr \"\"\n\"У цьому прикладі ми використовуємо лише примітивні типи `i32` та `&str` для \"\n\"`T`, але ми можемо використовувати будь-який тип, включаючи типи, визначені \"\n\"користувачем:\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"Це схоже на шаблони C++, але Rust частково компілює узагальнену функцію \"\n\"одразу, тому ця функція має бути валідною для всіх типів, що відповідають \"\n\"обмеженням. Наприклад, спробуйте модифікувати `pick` так, щоб вона повертала \"\n\"`even + odd`, якщо `n == 0`. Навіть якщо використовується лише екземпляр \"\n\"`pick` з цілими числами, Rust все одно вважатиме його невірним. C++ \"\n\"дозволить вам зробити це.\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"Узагальнений код перетворюється на не-узагальнений на основі сайтів виклику. \"\n\"Це абстракція з нульовою вартістю: ви отримуєте точно такий же результат, як \"\n\"якщо б ви написали структури даних власноруч без абстракції.\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\"Ви можете використовувати узагальнення для абстрагування від конкретного \"\n\"типу поля:\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} та {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"координати: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"_З:_ Чому `T` вказаний двічі в `impl<T> Point<T> {}`? Хіба це не зайве?\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"Це пояснюється тим, що це частина узагальненої реалізації для узагальненого \"\n\"типу. Вони є узагальненими незалежно один від одного..\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"Це означає, що ці методи визначені для будь-якого `T`.\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"Можна написати `impl Point<u32> { .. }`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` все ще є узагальненим типом, і ви можете використовувати \"\n\"`Point<f64>`, але методи в цьому блоці будуть доступні лише для `Point<u32>`.\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"Спробуйте оголосити нову змінну `let p = Point { x: 5, y: 10.0 };`. Оновіть \"\n\"код, щоб дозволити створювати точки, які мають елементи різних типів, \"\n\"використовуючи дві змінні типу, наприклад, `T` і `U`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\"Трейти також можуть бути загальними, так само як типи та функції. Параметри \"\n\"трейту отримують конкретні типи під час його використання.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\\\"Перетворено з цілого числа: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\\\"Перетворено з булевого значення: {from}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\\\"{from_int:?}, {from_bool:?}\\\"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\"Трейт `From` буде розглянутий пізніше у курсі, але її [визначення у \"\n\"документації `std`](https://doc.rust-lang.org/std/convert/trait.From.html) є \"\n\"простим.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::from(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\"Реалізації трейту не обов'язково повинні охоплювати всі можливі параметри \"\n\"типів. У цьому випадку `Foo::from(\\\"hello\\\")` не буде скомпільовано, \"\n\"оскільки для `Foo` не існує реалізації `From<&str>`.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\"Узагальнені трейти приймають типи як \\\"вхідні\\\", тоді як асоціативні типи є \"\n\"своєрідним \\\"вихідним\\\" типом. Трейт може мати декілька реалізацій для \"\n\"різних вхідних типів.\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\"Ведеться робота над додаванням цієї підтримки, яка називається \"\n\"[спеціалізація](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"При роботі з узагальненнями ви часто потребуєте, щоб типи реалізовували \"\n\"деякий трейт, щоб ви могли викликати методи цього трейту.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait`:\"\nmsgstr \"Ви можете зробити це за допомогою `T: Trait`:\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotCloneable;\\n\"\nmsgstr \"// struct NotCloneable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonCloneable` and passing it to `duplicate`.\"\nmsgstr \"Спробуйте зробити `NonCloneable` і передати його в `duplicate`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\"Якщо потрібно вказати декілька трейтів, використовуйте `+`, щоб об'єднати їх.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\"Покажіть вираз `where`, студенти зустрінуться з ним під час читання коду.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"Це розчищає сигнатуру функції, якщо у вас багато параметрів.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"Він має додаткові функції, що робить його більш потужним.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"Якщо хтось запитає, додаткова можливість полягає в тому, що тип ліворуч від \"\n\"\\\":\\\" може бути довільним, наприклад `Option<T>`.\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"Зауважте, що Rust (поки що) не підтримує спеціалізацію. Наприклад, за \"\n\"наявності оригінального `duplicate` додавання спеціалізованого `duplicate(a: \"\n\"u32)` є некоректним.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\"Подібно до меж трейтів, синтаксис `impl Trait` можна використовувати в \"\n\"аргументах функції та значеннях, що повертаються:\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Синтаксичний цукор для:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\"`impl Trait` дозволяє працювати з типами, які ви не можете назвати. Значення \"\n\"`impl Trait` дещо відрізняється у різних позиціях.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\"У випадку параметра, `impl Trait` - це як анонімний загальний параметрp з \"\n\"обмеженням трейту.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"Для типу, що повертається, це означає, що тип, що повертається, є деяким \"\n\"конкретним типом, який реалізує трейт, без назви типу. Це може бути корисно, \"\n\"коли ви не хочете викривати конкретний тип у публічному API.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"У позиції повернення виведення є складним. Функція, що повертає `impl Foo`, \"\n\"вибирає конкретний тип, який вона повертає, не записуючи його у вихідному \"\n\"коді. Функція, що повертає узагальнений тип, наприклад, `collect<B>() -> B`, \"\n\"може повернути будь-який тип, що задовольняє `B`, і користувачеві може \"\n\"знадобитися вибрати один з них, наприклад, за допомогою `let x: Vec<_> = foo.\"\n\"collect()` або turbofish, `foo.collect::<Vec<_>>()`.\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"Який тип `debuggable`? Спробуйте `let debuggable: () = ..`, щоб побачити \"\n\"повідомлення про помилку.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"In addition to using traits for static dispatch via generics, Rust also \"\n\"supports using them for type-erased, dynamic dispatch via trait objects:\"\nmsgstr \"\"\n\"На додаток до використання трейтів для статичного пересилання за допомогою \"\n\"узагальнень, Rust також підтримує їх використання для динамічного \"\n\"пересилання зі стиранням типу за допомогою об'єктів трейтів:\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Мяу!\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses generics and static dispatch.\\n\"\nmsgstr \"// Використовує узагальнення та статичну диспетчеризацію.\\n\"\n\n#: src/generics/dyn-trait.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Привіт, ви хто? {}\\\"\"\n\n#: src/generics/dyn-trait.md\nmsgid \"// Uses type-erasure and dynamic dispatch.\\n\"\nmsgstr \"// Використовує стирання типів та динамічну диспетчеризацію.\\n\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"Generics, including `impl Trait`, use monomorphization to create a \"\n\"specialized instance of the function for each different type that the \"\n\"generic is instantiated with. This means that calling a trait method from \"\n\"within a generic function still uses static dispatch, as the compiler has \"\n\"full type information and can resolve which type's trait implementation to \"\n\"use.\"\nmsgstr \"\"\n\"Узагальнення, включаючи `impl Trait`, використовують мономорфізацію для \"\n\"створення спеціалізованого екземпляру функції для кожного окремого типу, \"\n\"який є екземпляром узагальнення. Це означає, що виклик методу трейта з \"\n\"узагальненої функції все ще використовує статичну диспетчеризацію, оскільки \"\n\"компілятор має повну інформацію про тип і може вирішити, яку саме реалізацію \"\n\"трейта типу слід використовувати.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, it instead uses dynamic dispatch through a [virtual \"\n\"method table](https://en.wikipedia.org/wiki/Virtual_method_table) (vtable). \"\n\"This means that there's a single version of `fn dynamic` that is used \"\n\"regardless of what type of `Pet` is passed in.\"\nmsgstr \"\"\n\"При використанні `dyn Trait` замість цього використовується динамічна \"\n\"диспетчеризація через [віртуальну таблицю методів](https://en.wikipedia.org/\"\n\"wiki/Virtual_method_table) (vtable). Це означає, що існує єдина версія `fn \"\n\"dynamic`, яка використовується незалежно від того, який тип `Pet` передано.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"When using `dyn Trait`, the trait object needs to be behind some kind of \"\n\"indirection. In this case it's a reference, though smart pointer types like \"\n\"`Box` can also be used (this will be demonstrated on day 3).\"\nmsgstr \"\"\n\"При використанні `dyn Trait` об'єкт трейта повинен знаходитися за якимось \"\n\"посередником. У цьому випадку це буде посилання, хоча також можна \"\n\"використовувати розумні типи вказівників, такі як `Box` (це буде \"\n\"продемонстровано у день 3).\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"At runtime, a `&dyn Pet` is represented as a \\\"fat pointer\\\", i.e. a pair of \"\n\"two pointers: One pointer points to the concrete object that implements \"\n\"`Pet`, and the other points to the vtable for the trait implementation for \"\n\"that type. When calling the `talk` method on `&dyn Pet` the compiler looks \"\n\"up the function pointer for `talk` in the vtable and then invokes the \"\n\"function, passing the pointer to the `Dog` or `Cat` into that function. The \"\n\"compiler doesn't need to know the concrete type of the `Pet` in order to do \"\n\"this.\"\nmsgstr \"\"\n\"Під час виконання `&dyn Pet` представляється як \\\"жирний вказівник\\\", тобто \"\n\"пара з двох вказівників: Один вказівник вказує на конкретний об'єкт, який \"\n\"реалізує `Pet`, а інший вказує на таблицю vtable для реалізації трейту для \"\n\"цього типу. При виклику методу `talk` на `&dyn Pet` компілятор шукає \"\n\"вказівник на функцію `talk` у таблиці vtable, а потім викликає цю функцію, \"\n\"передаючи вказівник на `Dog` або `Cat` у цю функцію. Для цього компілятору \"\n\"не потрібно знати конкретний тип `Pet`.\"\n\n#: src/generics/dyn-trait.md\nmsgid \"\"\n\"A `dyn Trait` is considered to be \\\"type-erased\\\", because we no longer have \"\n\"compile-time knowledge of what the concrete type is.\"\nmsgstr \"\"\n\"`dyn Trait` вважається \\\"стертим типом\\\", оскільки під час компіляції ми \"\n\"більше не знаємо, яким є конкретний тип.\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"У цій короткій вправі ви реалізуєте узагальнену функцію `min`, яка визначає \"\n\"мінімальне з двох значень, використовуючи трейт [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html).\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: реалізуйте функцію `min`, яка використовується в `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"'7'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"'1'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\\\"до побачення\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\\\"кажан\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\\\"броненосець\\\"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"Покажіть учням трейт [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.\"\n\"Ord.html) та перелік [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/\"\n\"enum.Ordering.html).\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types.md src/std-types/result.md src/error-handling.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"Vec\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"HashMap\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Для кожного слайда в цьому розділі витратьте деякий час на перегляд сторінок \"\n\"документації, виділяючи деякі з найбільш поширених методів.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust поставляється зі стандартною бібліотекою, яка допомагає встановити \"\n\"набір загальних типів, які використовуються бібліотекою та програмами Rust. \"\n\"Таким чином, дві бібліотеки можуть безперешкодно працювати разом, оскільки \"\n\"обидві використовують той самий тип `String`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"Насправді Rust містить кілька рівнів стандартної бібліотеки: `core`, `alloc` \"\n\"і `std`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` включає найпростіші типи та функції, які не залежать від `libc`, \"\n\"розподілювача чи навіть наявності операційної системи.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` включає типи, для яких потрібен глобальний розподільник купи, \"\n\"наприклад `Vec`, `Box` і `Arc`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Вбудовані програми Rust часто використовують лише `core`, та іноді `alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust постачається з обширною документацією. Наприклад:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Всі подробиці про [цикли](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"Примітивні типи на зразок [`u8`](https://doc.rust-lang.org/stable/std/\"\n\"primitive.u8.html)\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"Типи стандартної бібліотеки, такі як [`Option`](https://doc.rust-lang.org/\"\n\"stable/std/option/enum.Option.html) або [`BinaryHeap`](https://doc.rust-lang.\"\n\"org/stable/std/collections/struct.BinaryHeap.html).\"\n\n#: src/std-types/docs.md\nmsgid \"Use `rustup doc --std` or <https://std.rs> to view the documentation.\"\nmsgstr \"\"\n\"Використовуйте `rustup doc --std` або <https://std.rs> для перегляду \"\n\"документації.\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"Фактично, ви можете документувати свій власний код:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Визначити, чи ділиться перший аргумент на другий.\\n\"\n\"///\\n\"\n\"/// Якщо другий аргумент дорівнює нулю, результат буде false.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Контент розглядається як Markdown. Усі опубліковані крейти бібліотеки Rust \"\n\"автоматично документуються на [`docs.rs`](https://docs.rs) за допомогою \"\n\"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html). Це \"\n\"ідіоматично документувати всі публічні елементи в API за допомогою цього \"\n\"шаблону.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Щоб задокументувати елемент із середини елемента (наприклад, всередині \"\n\"модуля), використовуйте `//!` або `/*! .. */`, які називаються \\\"внутрішні \"\n\"коментарі до документу\\\":\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Цей модуль містить функціональність, пов'язану з подільністю цілих \"\n\"чисел.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Покажіть студентам згенеровану документацію для крейта `rand` на <https://\"\n\"docs.rs/rand>.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Ми вже бачили деяке використання `Option<T>`. Це зберігає або значення типу \"\n\"`T`, або нічого. Наприклад, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) повертає `Option<usize>`.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"пошук повернув {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Символ не знайдено\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` широко використовуються, і не тільки в стандартній бібліотеці.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` поверне значення в `Option`, або паніку. `expect` працює \"\n\"аналогічно, але повертає повідомлення про помилку.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"Ви можете панікувати на None, але ви не можете \\\"випадково\\\" забути \"\n\"перевірити на None.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"Під час швидкої експерементації зазвичай прийнято використовувати `unwrap`/\"\n\"`expect` повсюди, але у виробничому коді `None` зазвичай обробляється у \"\n\"більш зручному вигляді.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The \\\"niche optimization\\\" means that `Option<T>` often has the same size in \"\n\"memory as `T`, if there is some representation that is not a valid value of \"\n\"T. For example, a reference cannot be NULL, so `Option<&T>` automatically \"\n\"uses NULL to represent the `None` variant, and thus can be stored in the \"\n\"same memory as `&T`.\"\nmsgstr \"\"\n\"\\\"Нішова оптимізація\\\" означає, що `Option<T>` часто має той самий розмір у \"\n\"пам'яті, що й `T`, якщо є деяке представлення, яке не є допустимим значенням \"\n\"T. Наприклад, посилання не може бути NULL, тому `Option<&T>` автоматично \"\n\"використовує NULL для представлення варіанту `None`, і таким чином може \"\n\"зберігатися у тій самій пам'яті, що й `&T`.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different enum variant. It is generic: `Result<T, E>` \"\n\"where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` схожий на `Option`, але вказує на успіх або невдачу операції, кожен \"\n\"з яких має свій варіант переліку. Він має вигляд: `Result<T, E>`, де `T` \"\n\"використовується у варіанті `Ok`, а `E` з'являється у варіанті `Err`.\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Дорогий щоденник: {contents} ({bytes} байтів)\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Не вдалося прочитати вміст файлу\\\"\"\n\n#: src/std-types/result.md src/error-handling/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"Щоденник не вдалося відкрити: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Як і у випадку з `Option`, успішне значення знаходиться всередині `Result`, \"\n\"змушуючи розробника явно витягти його. Це стимулює перевірку помилок. У \"\n\"випадку, коли помилка взагалі не очикуєтся, можна викликати `unwrap()` або \"\n\"`expect()`, і це також є сигналом про наміри розробника.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"Порекомендуйте прочитати `Result` документацію. Не під час курсу, але варто \"\n\"згадати. Вона містить багато зручних методів і функцій, які допомагають \"\n\"програмувати у функціональному стилі.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` — це стандартний тип для реалізації обробки помилок, як ми побачимо \"\n\"у 4-му дні.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) — це \"\n\"розширюваний рядок у кодуванні UTF-8:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Привіт\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, number of chars = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` реалізує [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), що означає, що ви можете \"\n\"викликати усі методи `str` у `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` повертає новий порожній рядок. Використовуйте `String::\"\n\"with_capacity`, якщо ви знаєте, скільки даних ви хочете передати в рядок.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` повертає розмір `String` у байтах (який може відрізнятися від \"\n\"його довжини в символах).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` повертає ітератор поверх фактичних символів. Зауважте, що \"\n\"`char` може відрізнятися від того, що людина вважатиме \\\"символом\\\" через \"\n\"[кластери графем](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"\"\n\"Коли люди посилаються на рядки, вони можуть говорити про `&str` або `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Коли тип реалізує `Deref<Target = T>`, компілятор дозволить вам прозоро \"\n\"викликати методи з `T`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"Ми ще не обговорювали трейт `Deref`, тому на даний момент це здебільшого \"\n\"пояснює структуру бокової панелі у документації.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` реалізує `Deref<Target = str>`, що прозоро надає йому доступ до \"\n\"методів `str`.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"Напишіть і порівняйте `let s3 = s1.deref();` and `let s3 = &*s1;`\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` реалізовано як оболонку навколо вектора байтів, багато операцій, \"\n\"які ви бачите, що підтримуються над векторами, також підтримуються `String`, \"\n\"але з деякими додатковими гарантіями.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"Порівняйте різні способи індексування `String`:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"До символу за допомогою `s3.chars().nth(i).unwrap()`, де `i` є в межі, поза \"\n\"межами.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"До підрядка за допомогою `s3[0..4]`, де цей фрагмент знаходиться на межах \"\n\"символів чи ні.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Багато типів можна перетворити у рядок за допомогою методу [`to_string`]\"\n\"(https://doc.rust-lang.org/std/string/trait.ToString.html#tymethod.\"\n\"to_string). Цей трейт автоматично реалізується для всіх типів, що реалізують \"\n\"`Display`, тому все, що може бути відформатовано, також може бути \"\n\"перетворено у рядок.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) — стандартний \"\n\"буфер із змінним розміром, виділений у купі:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Канонічний макрос для ініціалізації вектора з елементами.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Зберігаємо тільки парні елементи.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Видаляємо дублікати, що йдуть підряд.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` реалізує [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), який означає, що ви можете викликати \"\n\"методи зрізу на `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` — це тип колекції разом із `String` і `HashMap`. Дані, які він \"\n\"містить, зберігаються в купі. Це означає, що кількість даних не потрібно \"\n\"знати під час компіляції. Він може рости або зменшуватися під час виконання.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"Зверніть увагу, що `Vec<T>` також є узагальненим типом, але вам не потрібно \"\n\"вказувати `T` явно. Як завжди з визначенням типу Rust, `T` було встановлено \"\n\"під час першого виклику `push`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` — це канонічний макрос для використання замість `Vec::new()`, \"\n\"який підтримує додавання початкових елементів до вектора.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Щоб індексувати вектор, ви використовуєте `[` `]`, але вони панікують, якщо \"\n\"вийдуть за межі. Крім того, використання `get` поверне `Option`. Функція \"\n\"`pop` видалить останній елемент.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"Зрізи розглядаються на 3-й день. Наразі студентам потрібно лише знати, що \"\n\"значення типу `Vec` дає доступ до всіх задокументованих методів зрізів.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"Стандартна хеш-карта із захистом від HashDoS-атак:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Adventures of Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms' Fairy Tales\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Pride and Prejudice\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"Ми знаємо про {} книги, але не Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice's Adventure in Wonderland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} сторінок\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} невідома.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Використовуйте метод .entry(), щоб вставити значення, якщо нічого не \"\n\"знайдено.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"`HashMap` не визначено в prelude, і ії потрібно включити в область.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Спробуйте наступні рядки коду. У першому рядку буде показано, чи є книга в \"\n\"хеш-мапі, і якщо ні, повернеться альтернативне значення. У другому рядку \"\n\"буде вставлено альтернативне значення в хеш-мапу, якщо книга не знайдена.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"На відміну від `vec!`, на жаль, немає стандартного макросу `hashmap!`.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C\"\n\"%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows us to \"\n\"easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Хоча, починаючи з Rust 1.56, в HashMap реалізовано [`From<[[(K, V); N]>`]\"\n\"(https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), що дозволяє \"\n\"легко ініціалізувати хеш-карту з літерального масиву:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"Крім того, HashMap можна створити з будь-якого `Iterator`, який видає \"\n\"кортежі ключ-значення.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"Цей тип має кілька \\\"специфічних\\\" типів повернення, таких як `std::\"\n\"collections::hash_map::Keys`. Ці типи часто з’являються під час пошуку в \"\n\"документації Rust. Покажіть учням документацію для цього типу та корисне \"\n\"посилання на метод `keys`.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"У цій вправі ви візьмете дуже просту структуру даних і зробите її \"\n\"узагальненою. Вона використовує [`std::collections::HashMap`](https://doc.\"\n\"rust-lang.org/stable/std/collections/struct.HashMap.html) для відстеження \"\n\"того, які значення було переглянуто і скільки разів кожне з них з'являлося.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"Початкова версія `Counter` жорстко налаштована на роботу лише зі значеннями \"\n\"`u32`. Зробіть структуру та її методи узагальненими щодо типу значення, яке \"\n\"відстежується, таким чином `Counter` зможе відстежувати будь-який тип \"\n\"значення.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Якщо ви закінчите раніше, спробуйте використати метод [`entry`](https://doc.\"\n\"rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry), щоб \"\n\"вдвічі зменшити кількість переглядів хешу, необхідних для реалізації методу \"\n\"`count`.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter підраховує кількість разів, коли кожне значення типу T було \"\n\"переглянуто.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Створює новий Counter.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Підраховує входження заданого значення.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Повертає кількість разів, коли було побачено задане значення.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"побачив {} значень рівних {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"яблуко\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"апельсин\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"отримав {} яблук\\\"\"\n\n#: src/std-traits.md src/concurrency/sync-exercises.md\n#: src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 1 години 10 хвилин. Він містить:\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From та Into\"\n\n#: src/std-traits.md\nmsgid \"Read and Write\"\nmsgstr \"Read та Write\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"Default, синтаксис оновлення структури\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Як і у випадку з типами стандартної бібліотеки, витратьте час на \"\n\"ознайомлення з документацією для кожного трейта.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"Цей розділ довгий. Зробіть перерву на півдорозі.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Ці трейти підтримують порівняння між значеннями. Усі трейти можуть бути \"\n\"визначені для типів, що містять поля, які реалізують ці трейти \"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` та `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"PartialEq` - це відношення часткової еквівалентності, з обов'язковим методом \"\n\"`eq` та наданим методом `ne`. Оператори `==` та `!=` викликають ці методи.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` - це відношення повної еквівалентності (рефлексивне, симетричне та \"\n\"транзитивне) і передбачає `PartialEq`. Функції, які вимагають повної \"\n\"еквівалентності, використовуватимуть `Eq` як обмеження трейту.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` та `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` визначає часткове впорядкування за допомогою методу \"\n\"`partial_cmp`. Він використовується для реалізації операторів `<`, `<=`, \"\n\"`>=` та `>`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` - це повне впорядкування, з `cmp` який повертає `Ordering`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` може бути реалізовано між різними типами, але `Eq` не може, тому \"\n\"що є рефлексивним:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"На практиці ці трейти часто виводяться, але рідко реалізуються.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Перевантаження операторів реалізовано за допомогою трейтів у [`std::ops`]\"\n\"(https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\nmsgstr \"\\\"{p1:?} + {p2:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"Пункти обговорення:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Ви можете реалізувати `Add` для `&Point`. У яких ситуаціях це може бути \"\n\"корисно?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Відповідь: `Add:add` споживає `self`. Якщо тип `T`, для якого ви \"\n\"перевантажуєте оператор, не є `Copy`, ви також повинні розглянути можливість \"\n\"перевантаження оператора `&T`. Це дозволяє уникнути непотрібного клонування \"\n\"на сайті виклику.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Чому `Output` є асоційованим типом? Чи можна зробити це параметром типу \"\n\"методу?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Коротка відповідь: параметри типу функції контролюються тим, хто її \"\n\"викликає, а асоційовані типи (як `Output`) контролюються реалізатором трейту.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"Ви можете реалізувати `Add` для двох різних типів, напр. `impl Add<(i32, \"\n\"i32)> for Point` додасть кортеж до `Point`.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"The `Not` trait (`!` operator) is notable because it does not \\\"boolify\\\" \"\n\"like the same operator in C-family languages; instead, for integer types it \"\n\"negates each bit of the number, which arithmetically is equivalent to \"\n\"subtracting it from -1: `!5 == -6`.\"\nmsgstr \"\"\n\"Трейт `Not` (оператор `!`) примітний тим, що він не \\\"буліфікується\\\", як \"\n\"той самий оператор у мовах сімейства C; натомість, для цілих типів він \"\n\"заперечує кожен біт числа, що арифметично еквівалентно відніманню від -1: `!\"\n\"5 == -6`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions. Unlike `as`, these traits correspond to \"\n\"lossless, infallible conversions.\"\nmsgstr \"\"\n\"Типи реалізують [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) і [`Into`](https://doc.rust-lang.org/std /convert/trait.Into.html), \"\n\"щоб полегшити перетворення типів. На відміну від `as`, ці трейти \"\n\"відповідають безпомилковим перетворенням без втрат.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) реалізується \"\n\"автоматично, коли [`From`](https://doc.rust-lang.org/ std/convert/trait.From.\"\n\"html) реалізовано:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Ось чому прийнято реалізовувати лише `From`, оскільки ваш тип також отримає \"\n\"реалізацію `Into`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"При оголошенні вхідного типу аргументу функції типу \\\"все, що можна \"\n\"перетворити на `String`\\\", правило протилежне, ви повинні використовувати \"\n\"`Into`. Ваша функція прийматиме типи, які реалізують `From`, і ті, які \"\n\"_лише_ реалізують `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust не має _неявних_ перетворень типів, але підтримує явні приведення за \"\n\"допомогою `as`. Вони зазвичай відповідають семантиці C, де вони визначені.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"як u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"як i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"як u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"Результати функції `as` _завжди_ визначені у Rust і є стабільними на всіх \"\n\"платформах. Це може не збігатися з вашою інтуїцією щодо зміни знаку або \"\n\"приведення до меншого типу - зверніться до документації та коментарів для \"\n\"уточнення.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"Приведення за допомогою `as` є відносно гнучким інструментом, який легко \"\n\"використовувати неправильно, і може бути джерелом малопомітних помилок, \"\n\"оскільки майбутні роботи супроводження змінюють типи, які використовуються, \"\n\"або діапазони значень у типах. Приведення до типу найкраще використовувати \"\n\"лише тоді, коли потрібно вказати безумовне усічення (наприклад, виділити \"\n\"молодші 32 біти `u64` за допомогою `as u32`, незалежно від того, що було у \"\n\"старших бітах).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"Для безпомилкового приведення (наприклад, `u32` до `u64`) краще \"\n\"використовувати `From` або `Into` замість `as`, щоб переконатися, що \"\n\"приведення дійсно є безпомилковими. Для помилкових приведень доступні \"\n\"`TryFrom` і `TryInto`, якщо ви хочете обробити приведення, які відрізняються \"\n\"від тих, які не підходять.\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"Подумайте про перерву після цього слайда.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"Оператор `as` подібний до статичного приведення у C++. Використання `as` у \"\n\"випадках, коли дані може бути втрачено, зазвичай не рекомендується або, \"\n\"принаймні, заслуговує на пояснювальний коментар.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Це типовий випадок приведення цілих чисел до `usize` для використання у \"\n\"якості індексу.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Використовуючи [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) і \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), ви можете \"\n\"абстрагуватися над джерелами `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"рядків у зрізі: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"рядків у файлі: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Подібним чином, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) \"\n\"дозволяє вам абстрагуватися над `u8` прийомниками:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {buffer:?}\\\"\"\nmsgstr \"\\\"Записано: {buffer:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"Трейт `Default`\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"Трейт [`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n\"створює значення за замовчуванням для типу.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y встановлено!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Це може бути реалізовано безпосередньо або може бути отримано за допомогою \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"Похідна реалізація створить значення, в якому всі поля мають значення за \"\n\"замовчуванням.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"\"\n\"Це означає, що всі типи в структурі також мають реалізовувати `Default`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Стандартні типи Rust часто реалізують `Default` із прийнятними значеннями \"\n\"(наприклад, `0`, `\\\"\\\"` тощо).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"Часткова ініціалізація структур чудово працює за замовчуванням.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Стандартна бібліотека Rust усвідомлює, що типи можуть реалізовувати \"\n\"`Default` і надає зручні методи, які його використовують.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"Синтаксис `..` називається [синтаксис оновлення структури](https://doc.rust-\"\n\"lang.org/book/ch05-01-defining-structs.html#creating-instances-from-other-\"\n\"instances-with-struct-update-syntax).\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"Замикання або лямбда-вирази мають типи, які не можна назвати. Однак вони \"\n\"реалізують спеціальні [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html) і \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) трейти:\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling {func_name}({input}): {}\\\"\"\nmsgstr \"\\\"Викликаємо {func_name}({input}): {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3\\\"\"\nmsgstr \"\\\"add_3\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate\\\"\"\nmsgstr \"\\\"accumulate\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum\\\"\"\nmsgstr \"\\\"multiply_sum\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values. It can \"\n\"be called needing only a shared reference to the closure, which means the \"\n\"closure can be executed repeatedly and even concurrently.\"\nmsgstr \"\"\n\"`Fn` (наприклад, `add_3`) не споживає і не змінює захоплені значення. Вона \"\n\"може бути викликана, потребуючи лише спільного посилання на закриття, що \"\n\"означає, що замикання може бути виконано багаторазово і навіть одночасно.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. The closure \"\n\"object is accessed via exclusive reference, so it can be called repeatedly \"\n\"but not concurrently.\"\nmsgstr \"\"\n\"`FnMut` (наприклад, `accumulate`) може змінити захоплені значення. Доступ до \"\n\"об'єкта замикання здійснюється за ексклюзивним посиланням, тому його можна \"\n\"викликати багаторазово, але не одночасно.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. \"\n\"Doing so consumes the closure and any values captured by move.\"\nmsgstr \"\"\n\"Якщо у вас є `FnOnce` (наприклад, `multiply_sum`), ви можете викликати ії \"\n\"лише один раз. У такому випадку замикання поглинається разом з усіма \"\n\"значеннями, захопленими під час переміщення.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` є підтипом `FnOnce`. `Fn` є підтипом `FnMut` і `FnOnce`. Тобто ви \"\n\"можете використовувати `FnMut` усюди, де викликається `FnOnce`, і ви можете \"\n\"використовувати `Fn` усюди, де викликається `FnMut` або `FnOnce`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"Коли ви визначаєте функцію, яка приймає закриття, вам слід використовувати \"\n\"`FnOnce`, якщо це можливо (тобто ви викликаєте її один раз), або `FnMut` в \"\n\"іншому випадку, і в останню чергу `Fn`. Це забезпечує найбільшу гнучкість \"\n\"для того, хто викликає функцію.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(which can be passed to a consumer of any of the 3 closure traits), then \"\n\"`FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"На противагу цьому, коли у вас є закриття, найбільш гнучким є `Fn` (яка може \"\n\"бути передана споживачеві будь-якої з 3 трейтів замикання), потім `FnMut` і, \"\n\"нарешті, `FnOnce`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures. Function pointers \"\n\"(references to `fn` items) implement `Copy` and `Fn`.\"\nmsgstr \"\"\n\"Компілятор також виводить `Copy` (наприклад, для `add_3`) і `Clone` \"\n\"(наприклад `multiply_sum`), залежно від того, що захоплює замикання. \"\n\"Покажчики функцій (посилання на елементи `fn`) реалізують `Copy` та `Fn`.\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture each variable from an outer scope by the \"\n\"least demanding form of access they can (by shared reference if possible, \"\n\"then exclusive reference, then by move). The `move` keyword forces capture \"\n\"by value.\"\nmsgstr \"\"\n\"За замовчуванням замикання захоплюють кожну змінну із зовнішньої області \"\n\"видимості найменш вибагливою формою доступу (за спільним посиланням, якщо це \"\n\"можливо, потім за ексклюзивним посиланням, потім за переміщенням). Ключове \"\n\"слово `move` змушує захоплювати за значенням.\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Привіт\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\" Грег\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"У цьому прикладі ви будете реалізовувати класичний [\\\"ROT13\\\" шифр](https://\"\n\"en.wikipedia.org/wiki/ROT13). Скопіюйте цей код на ігровий майданчик і \"\n\"додайте біти, яких бракує. Перевертайте лише символи ASCII, щоб результат \"\n\"залишався дійсним UTF-8.\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Реалізуйте трейт `Read` для `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"Що станеться, якщо зімкнути два екземпляри `RotDecoder'а разом, кожен з яких \"\n\"буде обертатися на 13 символів?\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Ласкаво просимо до дня 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"Сьогодні ми розглянемо:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Керування пам'яттю, час існування та перевірка запозичень: як Rust гарантує \"\n\"безпеку пам'яті.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"Розумні вказівники: стандартні бібліотечні типи вказівників.\"\n\n#: src/welcome-day-3.md src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія має тривати близько 2 годин 20 \"\n\"хвилин. Вона містить:\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"Clone\"\n\n#: src/memory-management.md\nmsgid \"Drop\"\nmsgstr \"Drop\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"Програми виділяють пам'ять двома способами:\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"Стек: безперервна область пам'яті для локальних змінних.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"Значення мають фіксовані розміри, відомі під час компіляції.\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"Надзвичайно швидко: просто перемістіть вказівник стека.\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"Легко керувати: слідує за викликами функцій.\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"Чудова локальність пам'яті.\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"Купа: Зберігання значень поза викликами функцій.\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"Значення мають динамічні розміри, визначені під час виконання.\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"Трохи повільніше, ніж стек: потрібн певний облік.\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"Немає гарантії локальності пам'яті.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"Створення `String` поміщає метадані фіксованого розміру в стек, а дані \"\n\"динамічного розміру, фактичний рядок, у купу:\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"Нагадайте, що тип `String` підтримується `Vec`, тому має ємність і довжину \"\n\"та може зростати, якщо мутабельна, через перерозподіл у купі.\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"Якщо студенти запитають про це, ви можете нагадати, що основна пам’ять \"\n\"розподіляється за допомогою [System Allocator](https://doc.rust-lang.org/std/\"\n\"alloc/struct.System.html) і користувальницькі розподільники можуть бути \"\n\"реалізовано за допомогою [Allocator API](https://doc.rust-lang.org/std/alloc/\"\n\"index.html)\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"Ми можемо перевірити розташування пам’яті за допомогою `unsafe` Rust. Однак \"\n\"ви повинні зазначити, що це по праву небезпечно!\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"світ\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// НЕ РОБІТЬ ЦЬОГО ВДОМА! Тільки в навчальних цілях.\\n\"\n\"    // String не надає жодних гарантій щодо своєї розмітки, тому це може \"\n\"призвести до\\n\"\n\"    // невизначеної поведінки.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"Традиційно мови поділяються на дві великі категорії:\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"Повний контроль через ручне управління пам'яттю: C, C++, Pascal, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"Програміст вирішує, коли виділяти або звільняти пам'ять купи.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\"Програміст повинен визначити, чи вказівник все ще вказує на дійсну пам'ять.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"Дослідження показують, що програмісти роблять помилки.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"Повна безпека завдяки автоматичному управлінню пам’яттю під час виконання: \"\n\"Java, Python, Go, Haskell, ...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\"Система виконання гарантує, що пам'ять не звільняється доти, доки до неї не \"\n\"можна буде звертатися.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Typically implemented with reference counting or garbage collection.\"\nmsgstr \"\"\n\"Зазвичай реалізується за допомогою підрахунку посилань або збору сміття.\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust пропонує нову суміш:\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"Повний контроль _та_ безпека завдяки забезпеченню правильного керування \"\n\"пам'яттю під час компіляції.\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Це робиться за допомогою чіткої концепції володіння.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\"Цей слайд має на меті допомогти студентам, які вивчають інші мови, помістити \"\n\"Rust у контекст.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C має керувати купою вручну за допомогою `malloc` та `free`. Типові помилки \"\n\"включають забування виклику `free`, виклик `free` декілька разів для одного \"\n\"і того ж вказівника або розіменування вказівника після того, як пам'ять, на \"\n\"яку він вказує, було звільнено.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"У C++ є такі інструменти, як розумні вказівники (`unique_ptr`, \"\n\"`shared_ptr`), які використовують гарантії мови щодо виклику деструкторів \"\n\"для забезпечення звільнення пам'яті при завершенні функції. Але все одно \"\n\"досить легко неправильно використовувати ці інструменти і створювати \"\n\"помилки, подібні до помилок у мові C.\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"Модель володіння та запозичення Rust у багатьох випадках дозволяє отримати \"\n\"продуктивність C, з операціями alloc та free саме там, де вони потрібні - з \"\n\"нульовими витратами. Він також надає інструменти, подібні до розумних \"\n\"вказівників C++. За необхідності, доступні інші опції, такі як підрахунок \"\n\"посилань, і навіть є сторонні крейти для підтримки збирання сміття під час \"\n\"виконання (не розглядаються у цьому класі).\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\"Усі прив’язки змінних мають _область_, де вони дійсні, і використання \"\n\"змінної поза її областю є помилкою:\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\"Ми говоримо, що змінна _володіє_ значенням. Кожне значення у Rust завжди має \"\n\"лише одного власника.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\"В кінці області видимості змінна _знищується_ і дані звільняються. Тут може \"\n\"бути запущено деструктор, щоб звільнити ресурси.\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"Студенти, знайомі з реалізаціями збирачів сміття, знають, що збирач сміття \"\n\"починає роботу з набору \\\"коренів\\\", щоб виявити всю доступну пам'ять. \"\n\"Принцип \\\"єдиного власника\\\" у Rust має схожу ідею.\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"Присвоєння переміщує _володіння_ між змінними:\"\n\n#: src/memory-management/move.md src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Привіт!\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"Присвоєння `s1` до `s2` переміщує володіння.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\"Коли `s1` виходить за межі області видимості, нічого не відбувається: вона \"\n\"нічим не володіє.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"Коли `s2` виходить за межі, дані рядка звільняються.\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"Перед переміщенням до `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"Після переміщення до `s2`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Стек                              Купа\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\"Коли ви передаєте значення функції, це значення присвоюється параметру \"\n\"функції. Це переміщує володіння:\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Привіт {name}\\\"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/aidl/types/parcelables.md src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"Зауважте, що це протилежність поведінки за замовчуванням у C++, яка копіює \"\n\"за значенням, якщо ви не використовуєте `std::move` (і конструктор \"\n\"переміщення визначено!).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"Переміщується лише володіння. Чи генерується машинний код для маніпулювання \"\n\"самими даними - це питання оптимізації, і такі копії агресивно оптимізуються.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\"Прості значення (наприклад, цілі числа) можна позначити `Copy` (див. \"\n\"наступні слайди).\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"У Rust клони є явними (за допомогою `clone`).\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"У прикладі `say_hello`:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"З першим викликом `say_hello` `main` втрачає володіння `name`. Після цього \"\n\"`name` більше не можна використовувати в `main`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\"Пам’ять купи, виділена для `name`, буде звільнено в кінці функції \"\n\"`say_hello`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"`main` може зберігти володіння, якщо передасть `name` як посилання (`&name`) \"\n\"і якщо `say_hello` приймає посилання як параметр.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\"Крім того, `main` може передати клон `name` під час першого виклику (`name.\"\n\"clone()`).\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"Rust ускладнює ненавмисне створення копій, на відмінну від C++, роблячи \"\n\"семантику переміщення за замовчуванням і змушуючи програмістів робити клони \"\n\"явними.\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"Захисні копії в сучасному C++\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"Сучасний C++ вирішує це інакше:\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Дублювання даних в s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"Дані купи з `s1` дублюються, а `s2` отримує власну незалежну копію.\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\"Коли `s1` і `s2` виходять за межі видимості, кожен з них звільняє власну \"\n\"пам'ять.\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"Перед копіюванням:\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"Після копіювання:\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++ зробив дещо інший вибір, ніж Rust. Оскільки `=` копіює дані, дані рядка \"\n\"потрібно клонувати. Інакше ми отримаємо подвійне звільнення, коли будь-який \"\n\"рядок виходить за межі видимості.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ також має [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"який використовується щоб вказати коли значення можна перемістити. Якби \"\n\"приклад був `s2 = std::move(s1)`, розподілу купи не відбулося б. Після \"\n\"переміщення `s1` буде в діючому, але не визначеному стані. На відміну від \"\n\"Rust, програмісту дозволено використовувати `s1`.\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"На відміну від Rust, `=` у C++ може виконувати довільний код, який \"\n\"визначається типом, який копіюється або переміщується.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\"Іноді вам _необхідно_ зробити копію значення. Для цього призначений крейт \"\n\"`Clone`.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\"Ідея `Clone` полягає у тому, щоб полегшити виявлення місць, де відбувається \"\n\"виділення пам'яті у купі. Шукайте `.clone()` та деякі інші, такі як `vec!` \"\n\"або `Box::new`.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"Зазвичай, ви \\\"клонуєте свій вихід\\\" з проблем з перевіркою позик, а потім \"\n\"повертаєтесь пізніше, щоб спробувати оптимізувати ці клони.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\"`clone` зазвичай виконує глибоку копію значення, тобто якщо ви, наприклад, \"\n\"клонуєте масив, то всі елементи масиву також будуть клоновані.\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\"Поведінка функції `clone` визначається користувачем, тому вона може \"\n\"виконувати власну логіку клонування, якщо це необхідно.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\"Хоча семантика переміщення використовується за замовчуванням, певні типи \"\n\"копіюються за замовчуванням:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"Ці типи реалізують трейт `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"Ви можете вибрати власні типи для використання семантики копіювання:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"Після присвоєння обидва `p1` і `p2` володіють власними даними.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\"Ми також можемо використовувати `p1.clone()` для явного копіювання даних.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"Копіювання та клонування – це не одне й те саме:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\"Копіювання стосується побітових копій областей пам’яті та не працює з \"\n\"довільними об’єктами.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\"Копіювання не допускає створювати власну логіку (на відміну від \"\n\"конструкторів копіювання в C++).\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\"Клонування — це більш загальна операція, яка також допускає нестандартну \"\n\"поведінку шляхом реалізації трейта `Clone`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"Копіювання не працює з типами, які реалізують трейт `Drop`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"У наведеному вище прикладі спробуйте наступне:\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"Додайте поле `String` до `struct Point`. Це не скомпілюється, оскільки \"\n\"`String` не є типом `Copy`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"Видаліть `Copy` з атрибута `derive`. Помилка компілятора тепер у `println!` \"\n\"для `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"Покажіть, що це працює, якщо замість цього клонувати `p1`.\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Shared references are `Copy`/`Clone`, mutable references are not. This is \"\n\"because Rust requires that mutable references be exclusive, so while it's \"\n\"valid to make a copy of a shared reference, creating a copy of a mutable \"\n\"reference would violate Rust's borrowing rules.\"\nmsgstr \"\"\n\"Спільні посилання є `Copy`/`Clone`, змінні посилання - ні. Це пов'язано з \"\n\"тим, що Rust вимагає, щоб змінювані посилання були ексклюзивними, тому, хоча \"\n\"створення копії спільного посилання є допустимим, створення копії \"\n\"змінюваного посилання порушуватиме правила запозичення Rust.\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"Трейт `Drop`\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"Значення, які реалізують [`Drop`](https://doc.rust-lang.org/std/ops/trait.\"\n\"Drop.html), можуть вказувати код, який запускатиметься, коли вони виходять \"\n\"за межі області видимості:\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Відкидаємо {}\\\"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Виходимо з блоку B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Виходимо з блоку A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Виходимо з main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\"Зверніть увагу, що `std::mem::drop` не те саме, що `std::ops::Drop::drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\"Значення автоматично відкидаються, коли вони виходять за межі області \"\n\"видимості.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"Коли значення відкидається, якщо воно реалізує `std::ops::Drop`, то буде \"\n\"викликано його реалізацію `Drop::drop`.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\"Всі його поля також будуть видалені, незалежно від того, чи реалізовано в \"\n\"ньому `Drop` чи ні.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` - це просто порожня функція, яка приймає будь-яке значення. \"\n\"Важливо те, що вона отримує володіння значенням, тому в кінці своєї області \"\n\"видимості вона його відкидає. Це робить її зручним способом явного \"\n\"відкидання значень раніше, ніж вони вийдуть за межі області видимості.\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"Це може бути корисно для об'єктів, які виконують деяку роботу на `drop`: \"\n\"зняття блокування, закриття файлів тощо.\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"Чому `Drop::drop` не приймає `self`?\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"Коротка відповідь: якби це було так, `std::mem::drop` викликався б у кінці \"\n\"блоку, що призвело б до ще одного виклику `Drop::drop` і переповнення стеку!\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"Спробуйте замінити `drop(a)` на `a.drop()`.\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"У цьому прикладі ми реалізуємо складний тип даних, який володіє всіма своїми \"\n\"даними. Ми використаємо патерн \\\"конструктор\\\" для підтримки побудови нового \"\n\"значення по частинах за допомогою зручних функцій.\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"Заповніть пропущені частини.\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// Представлення програмного пакету.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Повертає представлення цього пакунка у вигляді залежності для \"\n\"використання у\\n\"\n\"    /// збірці інших пакетів.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// Конструктор для Package. Використовуйте `build()` для створення самого \"\n\"`Package`.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Задає версію пакета.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Задає автора пакета.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Додає додаткову залежність.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\"/// Задає мову. Якщо не вказано, за замовчуванням буде встановлено значення \"\n\"None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"Box<T>\"\nmsgstr \"Box<T>\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"Rc\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) — це вказівник \"\n\"на дані в купі:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` реалізує `Deref<Target = T>`, що означає, що ви можете [викликати \"\n\"методи з `T` безпосередньо на `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes cannot be stored \"\n\"inline without a pointer indirection. `Box` accomplishes that indirection:\"\nmsgstr \"\"\n\"Рекурсивні типи даних або типи даних з динамічним розміром не можуть \"\n\"зберігатися вбудованими без перенаправлення вказівника. `Box` здійснює цю \"\n\"опосередкованість:\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// Непорожній список: перший елемент та решта списку.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// Порожній список.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Стек                            Купа\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` схожий на `std::unique_ptr` у C++, за винятком того, що він \"\n\"гарантовано не буде null.\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"`Box` може бути корисним, коли ви:\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size can't be known at compile time, but the Rust compiler \"\n\"wants to know an exact size.\"\nmsgstr \"\"\n\"маєте тип, розмір якого не може бути відомий під час компіляції, але \"\n\"компілятор Rust хоче знати точний розмір.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"хочете передати володіння на великий обсяг даних. Щоб уникнути копіювання \"\n\"великих обсягів даних у стеку, натомість зберігайте дані в купі в `Box`, щоб \"\n\"переміщувався лише вказівник.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"Якщо би `Box` не використовувався, і ми намагалися вставити `List` \"\n\"безпосередньо в `List`, компілятор не зміг би обчислити фіксований розмір \"\n\"структури в пам’яті (`List` мав би нескінченний розмір).\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` вирішує цю проблему, оскільки має той самий розмір, що й звичайний \"\n\"вказівник, і лише вказує на наступний елемент `List` у купі.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"Видаліть `Box` у визначенні списку та відобразіть помилку компілятора. Ми \"\n\"отримаємо повідомлення \\\"recursive without indirection\\\", тому що для \"\n\"рекурсії даних ми повинні використовувати посередництво, `Box` або якесь \"\n\"посилання, замість того, щоб зберігати значення безпосередньо.\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums (the \\\"niche optimization\\\").\"\nmsgstr \"\"\n\"Хоча `Box` виглядає як `std::unique_ptr` у C++, він не може бути порожнім/\"\n\"нульовим. Це робить `Box` одним з типів, які дозволяють компілятору \"\n\"оптимізувати зберігання деяких переліків (\\\"нішова оптимізація\\\").\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) — це спільний \"\n\"вказівник із підрахунком посилань. Використовуйте це, коли вам потрібно \"\n\"звернутися до тих самих даних з кількох місць:\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared-state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"Дивіться [`Arc`](../concurrency/shared-state/arc.md) та [`Mutex`](https://\"\n\"doc.rust-lang.org/std/sync/struct.Mutex.html), якщо ви працюєте у \"\n\"багатопотоковому контексті.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"Ви можете _понизити_ спільний вказівник на [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) вказівник, щоб створити цикли, які буде \"\n\"відкинуті.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\"Рахунок `Rc` гарантує, що значення, яке міститься в ньому, буде дійсним до \"\n\"тих пір, поки існують посилання.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"`Rc` у Rust схожий на `std::shared_ptr` у C++.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` дешевий: він створює вказівник на той самий розділ пам’яті і \"\n\"збільшує кількість посилань. Він не робить глибокого клонування, і, як \"\n\"правило, його можна ігнорувати, шукаючи проблеми з продуктивністю в коді.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` насправді клонує внутрішнє значення, якщо необхідно (\\\"clone-on-\"\n\"write\\\") і повертає мутабельне посилання.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"Використовуйте `Rc::strong_count`, щоб перевірити кількість посилань.\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` дає вам _слабкий об'єкт з підрахунком посилань_ для \"\n\"створення циклів, які будуть відкинуті належним чином (ймовірно, у поєднанні \"\n\"з `RefCell`).\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"We previously saw how trait objects can be used with references, e.g `&dyn \"\n\"Pet`. However, we can also use trait objects with smart pointers like `Box` \"\n\"to create an owned trait object: `Box<dyn Pet>`.\"\nmsgstr \"\"\n\"Раніше ми бачили, як об'єкти трейтів можна використовувати з посиланнями, \"\n\"наприклад, `&dyn Pet`. Однак, ми також можемо використовувати об'єкти \"\n\"трейтів з розумними вказівниками, такими як `Box`, щоб створити власний \"\n\"об'єкт трейту: `Box<dyn Pet>`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"Розташування пам’яті після виділення `pets`:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\\\"Dog\"\n\"\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::talk\"\n\"\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::talk\"\n\"\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Стек                              Купа\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\\\"Dog\"\n\"\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::talk\"\n\"\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::talk\"\n\"\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"Типи, що реалізують певний трейт, можуть бути різних розмірів. Це \"\n\"унеможливлює створення таких типів, як `Vec<dyn Pet>` у наведеному вище \"\n\"прикладі.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\"`dyn Pet` — це спосіб повідомити компілятору про тип динамічного розміру, \"\n\"який реалізує `Pet`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"У прикладі `pets` розміщується у стеку, а векторні дані - у купі. Два \"\n\"векторні елементи є _жирними вказівниками_:\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"Жирний вказівник - це вказівник подвійної ширини. Він складається з двох \"\n\"компонентів: вказівника на власне об'єкт і вказівника на [таблицю \"\n\"віртуальних методів](https://en.wikipedia.org/wiki/Virtual_method_table) \"\n\"(vtable) для реалізації `Pet` цього конкретного об'єкта.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"Дані для `Dog` на ім'я Фідо - це поля `name` та `age`. Для `Cat` є поле \"\n\"`lives`.\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"Порівняйте ці результати в наведеному вище прикладі:\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"Бінарне дерево - це структура даних деревовидного типу, де кожен вузол має \"\n\"двох нащадків (лівого і правого). Ми створимо дерево, у якому кожна вершина \"\n\"зберігає значення. Для заданого вузла N всі вузли лівого піддерева N містять \"\n\"менші значення, а всі вузли правого піддерева N будуть містити більші \"\n\"значення.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"Реалізуйте наступні типи так, щоб задані тести пройшли.\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\"Додаткове завдання: реалізувати ітератор над бінарним деревом, який повертає \"\n\"значення відповідно до порядку.\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// Вузол у бінарному дереві.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// Можливо-порожнє піддерево.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// Контейнер, що зберігає набір значень, використовуючи бінарне дерево.\\n\"\n\"///\\n\"\n\"/// Якщо одне й те саме значення додається кілька разів, воно зберігається \"\n\"лише один раз.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"// Реалізуйте `new`, `insert`, `len` та `has` для `Subtree`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// не унікальний елемент\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, цея сесія має тривати близько 1 годин 55 \"\n\"хвилин. Вона містить:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\"Як ми бачили раніше, замість того, щоб передавати право власності при \"\n\"виклику функції, ви можете дозволити функції _позичити_ значення:\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"Функція `add` _позичає_ дві точки та повертає нову точку.\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"Викликач зберігає право власності на вхідні дані.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"Цей слайд є оглядом матеріалу про посилання з першого дня, дещо розширеного \"\n\"за рахунок включення аргументів функцій та значень, що повертаються.\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"Примітки щодо повернення стеку та вбудовування:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"Продемонструйте, що повернення з `add` є дешевим, оскільки компілятор може \"\n\"виключити операцію копіювання, вбудовуючи виклик додавання в main. Змініть \"\n\"наведений вище код так, щоб він виводив адреси стеку, і запустіть його на \"\n\"[Playground](https://play.rust-lang.org/) або перегляньте збірку в [Godbolt]\"\n\"(https://rust.godbolt.org/). На рівні оптимізації \\\"DEBUG\\\" адреси мають \"\n\"змінитися, але вони залишаються незмінними під час переходу до налаштування \"\n\"\\\"RELEASE\\\":\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\"Компілятор Rust може виконувати автоматичне вбудовування, яке можна вимкнути \"\n\"на рівні функції за допомогою `#[inline(never)]`.\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\"Якщо вимкнено, друкована адреса зміниться на всіх рівнях оптимізації. \"\n\"Дивлячись на Godbolt або Playground, можна побачити, що в цьому випадку \"\n\"повернення значення залежить від ABI, наприклад, на amd64 два i32, що \"\n\"складають точку, будуть повернуті у 2х регістрах (eax і edx).\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\"Перевірка запозичень у Rust'і накладає обмеження на способи, якими ви можете \"\n\"запозичувати значення. Для певного значення, у будь-який час:\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"Ви можете мати одне або декілька спільних посилань на значення, _або_\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"Ви можете мати лише одне ексклюзивне посилання на значення.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"Зверніть увагу, що вимога полягає в тому, що конфліктуючі посилання не \"\n\"повинні _існувати_ в тій самій момент часу. Не має значення, де посилання \"\n\"буде розіменовано.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"Наведений вище код не компілюється, оскільки `a` запозичено як мутабельну \"\n\"змінну (через `c`) і як немутабельну (через `b`) одночасно.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"Перемістіть інструкцію `println!` для `b` перед областю видимості, яка \"\n\"вводить `c`, щоб забезпечити компіляцію коду.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"Після цієї зміни компілятор розуміє, що `b` використовується тільки перед \"\n\"новим мутабельним запозиченням `a` через `c`. Це функція перевірки \"\n\"запозичень під назвою \\\"нелексичні терміни життя\\\".\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"Обмеження ексклюзивного посилання є досить сильним. Rust використовує його \"\n\"для запобігання гонці даних. Rust також _покладається_ на це обмеження для \"\n\"оптимізації коду. Наприклад, значення за спільним посиланням можна безпечно \"\n\"кешувати у регістрі на весь час існування цього посилання.\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"Перевірку запозичень розроблено з урахуванням багатьох поширених шаблонів, \"\n\"таких як одночасне отримання ексклюзивних посилань на різні поля у \"\n\"структурі. Але бувають ситуації, коли вона не зовсім \\\"розуміє що \"\n\"відбувається\\\", і це часто призводить до \\\"боротьби з перевіряльником \"\n\"запозичень\\\".\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\"Як конкретний приклад того, як ці правила запозичення запобігають помилкам \"\n\"пам'яті, розглянемо випадок модифікації колекції, коли на її елементи є \"\n\"посилання:\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"{elem}\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"Аналогічно, розглянемо випадок оголошення ітератора недійсним:\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\"В обох випадках модифікація колекції шляхом додавання до неї нових елементів \"\n\"може потенційно зробити недійсними наявні посилання на елементи колекції, \"\n\"якщо колекція буде перерозподілена.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"У деяких ситуаціях необхідно модифікувати дані за спільним (доступним лише \"\n\"для читання) посиланням. Наприклад, структура даних зі спільним доступом \"\n\"може мати внутрішній кеш, і ви хочете оновити цей кеш методами, доступними \"\n\"лише для читання.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"Паттерн \\\"внутрішня мутабельність\\\" дозволяє ексклюзивний (мутабельний) \"\n\"доступ за спільним посиланням. Стандартна бібліотека надає декілька способів \"\n\"зробити це, забезпечуючи при цьому безпеку, як правило, шляхом виконання \"\n\"перевірки під час виконання.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value using only a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the inner value. Since there are no references, borrowing rules cannot be \"\n\"broken.\"\nmsgstr \"\"\n\"`Cell` обгортає значення і дозволяє отримати або встановити значення, \"\n\"використовуючи лише спільне посилання на `Cell`. Однак, вона не дозволяє \"\n\"жодних посилань на внутрішнє значення. Оскільки посилань немає, правила \"\n\"запозичення не можуть бути порушені.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"// Зауважте, що `cell` НЕ оголошено як мутабельну.\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` allows accessing and mutating a wrapped value by providing \"\n\"alternative types `Ref` and `RefMut` that emulate `&T`/`&mut T` without \"\n\"actually being Rust references.\"\nmsgstr \"\"\n\"`RefCell` дозволяє отримувати доступ до обгорнутого значення та змінювати \"\n\"його, надаючи альтернативні типи `Ref` та `RefMut`, які імітують `&T`/`&mut \"\n\"T`, не будучи насправді Rust посиланнями.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"These types perform dynamic checks using a counter in the `RefCell` to \"\n\"prevent existence of a `RefMut` alongside another `Ref`/`RefMut`.\"\nmsgstr \"\"\n\"Ці типи виконують динамічні перевірки за допомогою лічильника в `RefCell`, \"\n\"щоб запобігти існуванню `RefMut` поряд з іншим `Ref`/`RefMut`.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"By implementing `Deref` (and `DerefMut` for `RefMut`), these types allow \"\n\"calling methods on the inner value without allowing references to escape.\"\nmsgstr \"\"\n\"Завдяки реалізації `Deref` (і `DerefMut` для `RefMut`), ці типи дозволяють \"\n\"викликати методи за внутрішнім значенням, не дозволяючи посиланням втекти.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\"// Це спричиняє помилку під час виконання.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\\\"{cell:?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"Основне, що можна винести з цього слайду, це те, що Rust надає _безпечні_ \"\n\"способи модифікації даних за спільним посиланням. Існує безліч способів \"\n\"забезпечити цю захищеність, і `RefCell` та `Cell` - два з них.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell`застосовує звичайні правила запозичень Rust (або декілька спільних \"\n\"посилань, або одне ексклюзивне посилання) з перевіркою під час виконання. У \"\n\"цьому випадку всі запозичення дуже короткі і ніколи не перетинаються, тому \"\n\"перевірки завжди проходять успішно.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\"Додатковий блок у прикладі `RefCell` призначений для завершення запозичення, \"\n\"створеного викликом `borrow_mut`, до того, як ми надрукуємо комірку. Спроба \"\n\"надрукувати запозичену комірку `RefCell` просто покаже повідомлення `\"\n\"\\\"{borrowed}\\\"`.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"`Cell` є найпростішим засобом гарантування безпеки: він має метод `set`, \"\n\"який приймає значення `&self`. Це не потребує перевірки під час виконання, \"\n\"але вимагає переміщення значень, що може мати свою ціну.\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"Both `RefCell` and `Cell` are `!Sync`, which means `&RefCell` and `&Cell` \"\n\"can't be passed between threads. This prevents two threads trying to access \"\n\"the cell at once.\"\nmsgstr \"\"\n\"І `RefCell`, і `Cell` є `!Sync`, що означає, що `&RefCell` і `&Cell` не \"\n\"можна передавати між потоками. Це запобігає спробам двох потоків одночасно \"\n\"отримати доступ до комірки.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"Ви працюєте над впровадженням системи моніторингу здоров’я. У рамках цього \"\n\"вам потрібно відстежувати статистику здоров’я користувачів.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"Ви почнете із заглушки функції у блоці `impl`, а також з визначення \"\n\"структури `User`. Ваша мета — рреалізувати заглушений метод в структурі \"\n\"`User`, визначений у блоці `impl`.\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\"Скопіюйте код нижче в <https://play.rust-lang.org/> та заповніть відсутній \"\n\"метод:\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the doctor\"\n\"\\\"\"\nmsgstr \"\"\n\"\\\" Оновити статистику користувача на основі вимірювань під час візиту до \"\n\"лікаря\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"Мене звуть {}, а мій вік - {}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"Посилання має _тривалість життя_, яка не повинна \\\"пережити\\\" значення, на \"\n\"яке воно посилається. Це перевіряється чекером запозичень.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"Тривалість життя може бути неявною - це те, що ми бачили досі. Часи життя \"\n\"також можуть бути явними: `&'a Point'', `&'document str''. Тривалість життя \"\n\"починається з `'`, а `'a` є типовим іменем за замовчуванням. Читати `&'a \"\n\"Point` як \\\"запозичений `Point`, який є дійсним принаймні протягом \"\n\"тривалості життя `a`\\\".\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\"Тривалість життя завжди визначається компілятором: ви не можете призначити \"\n\"час життя самостійно. Явні анотації часу життя створюють обмеження там, де \"\n\"існує неоднозначність; компілятор перевіряє, чи існує правильний розв'язок.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\"Часи життя ускладнюються, якщо врахувати передачу значень у функції та \"\n\"повернення значень з них.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// Яка тривалість життя p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"У цьому прикладі компілятор не знає, яку тривалість життя виводити для `p3`. \"\n\"Якщо зазирнути у тіло функції, то можна з упевненістю припустити, що час \"\n\"життя `p3` є меншим з двох: `p1` та `p2`. Але так само, як і типи, Rust \"\n\"вимагає явних анотацій тривалості життя для аргументів функції та значень, \"\n\"що повертаються.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"Додає `'a` відповідним чином до `left_most`:\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"Це говорить, що \\\"за умови, що p1 і p2 живуть довше за `'a`, значення, що \"\n\"повертається, живе принаймні `'a`.\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\"У поширених випадках час життя можна опустити, як описано на наступному \"\n\"слайді.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"Тривалість життя у викликах функцій\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"Тривалість життя аргументів функції та значень, що повертаються, має бути \"\n\"повністю вказана, але Rust дозволяє у більшості випадків не вказувати \"\n\"тривалість життя за допомогою [кількох простих правил](https://doc.rust-lang.\"\n\"org/nomicon/lifetime-elision.html). Це не виведення - це просто синтаксичне \"\n\"скорочення.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\"Кожному аргументу, який не має анотації тривалості життя, присвоюється одна.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\"Якщо існує лише одна тривалість життя аргументу, то вона надається всім \"\n\"неанотованим значенням, що повертаються.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"Якщо існує декілька тривалостей життя аргументів, але перша з них призначена \"\n\"для `self`, ця тривалість надається усім неанотованим значенням повернення.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"У цьому прикладі `cab_distance` тривіально вилучено.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"Функція `nearest` є ще одним прикладом функції з декількома посиланнями в \"\n\"аргументах, яка потребує явної анотації.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\"Спробуйте налаштувати сигнатуру на \\\"брехню\\\" про повернуту тривалість життя:\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"Це не скомпілюється, демонструючи, що компілятор перевіряє анотації на \"\n\"валідність. Зауважте, що це не стосується сирих вказівників (небезпечних), і \"\n\"це є поширеним джерелом помилок у небезпечному Rust.\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"Учні можуть запитати, коли слід використовувати тривалість життя. Rust \"\n\"запозичення _завжди_ мають тривалість життя. Здебільшого, опускання та \"\n\"виведення типу означають, що їх не потрібно прописувати. У більш складних \"\n\"випадках, анотації тривалості життя можуть допомогти вирішити \"\n\"неоднозначність. Часто, особливо при створенні прототипів, простіше просто \"\n\"працювати з данними якими володіють, клонуючи значення там, де це необхідно.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"Тривалість життя в структурах даних\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\"Якщо тип даних зберігає запозичені дані, він повинен мати анотацію із \"\n\"зазначенням тривалості життя:\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Bye {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"У наведеному вище прикладі анотація до `Highlight` гарантує, що дані, які \"\n\"лежать в основі `&str`, існують принаймні стільки, скільки існує будь-який \"\n\"екземпляр `Highlight`, який використовує ці дані.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"Якщо `text` буде спожито до закінчення життя `fox` (або `dog`), перевірка \"\n\"запозичень видасть помилку.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"Типи з запозиченими даними змушують користувачів зберігати оригінальні дані. \"\n\"Це може бути корисно для створення полегшених представлень, але загалом \"\n\"робить їх дещо складнішими у використанні.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\"Якщо це можливо, зробіть так, щоб структури даних безпосередньо володіли \"\n\"своїми даними.\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"Деякі структури з декількома посиланнями всередині можуть мати більше ніж \"\n\"одну анотацію про тривалість життя. Це може знадобитися, якщо потрібно \"\n\"описати зв'язки між самими посиланнями впродовж тривалості життя, на додачу \"\n\"до тривалості життя самої структури. Це дуже просунуті випадки використання.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"У цій вправі ви створите синтаксичний аналізатор для [бінарного кодування \"\n\"protobuf](https://protobuf.dev/programming-guides/encoding/). Не хвилюйтеся, \"\n\"це простіше, ніж здається! Це ілюструє загальну схему синтаксичного аналізу, \"\n\"передаючи зрізи даних. Самі дані ніколи не копіюються.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"Повноцінний розбір повідомлення protobuf вимагає знання типів полів, \"\n\"проіндексованих за номерами полів. Зазвичай ця інформація міститься у файлі \"\n\"`proto`. У цій вправі ми закодуємо цю інформацію у оператори `match` у \"\n\"функціях, які викликаються для кожного поля.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"Ми використаємо наступний proto:\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"Повідомлення  proto кодується як серія полів, що йдуть одне за одним. Кожне \"\n\"з них реалізовано у вигляді \\\"тегу\\\", за яким слідує значення. Тег містить \"\n\"номер поля (наприклад, `2` для поля `id` у повідомленні `Person`) і тип \"\n\"передачі, який визначає спосіб визначення корисного навантаження з потоку \"\n\"байт.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"Цілі числа, включаючи тег, подаються у кодуванні змінної довжини, яке \"\n\"називається VARINT. На щастя, нижче визначено `parse_varint` для вас. \"\n\"Наведений код також визначає виклики для обробки полів `Person` і \"\n\"`PhoneNumber`, а також для розбору повідомлення на серію викликів цих \"\n\"зворотних викликів.\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"Вам залишається реалізувати функцію `parse_field` та трейт `ProtoMessage` \"\n\"для `Person` та `PhoneNumber`.\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// wire type як він приходить по дроту.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// Varint WireType вказує на те, що значення є одним VARINT.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I64 WireType indicates that the value is precisely 8 bytes in\\n\"\n\"    /// little-endian order containing a 64-bit signed integer or double \"\n\"type.\\n\"\n\"    //I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"/// I64 WireType вказує на те, що значення має точно 8 байт у little-endian\\n\"\n\"    /// порядку та містить 64-бітне ціле зі знаком або тип з плаваючою комою \"\n\"подвійної точності.\\n\"\n\"//I64,  -- не потрібно для цієї вправи\\n\"\n\"    /// Len WireType вказує на те, що значення є довжиною, представленою у \"\n\"вигляді \\n\"\n\"    /// VARINT за яким слідує рівно стільки байт.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    // little-endian order containing a 32-bit signed integer or float \"\n\"type.\\n\"\n\"    //I32,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\"// Тип WireType I32 вказує на те, що значення - це рівно 4 байти в\\n\"\n\"    // little-endian порядку, що містять 32-бітне ціле число зі знаком або \"\n\"тип з плаваючою комою.\\n\"\n\"    //I32,  -- не потрібно для цієї вправи\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// Значення поля, введене на основі wire type.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- не потрібно для цієї вправи\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I32(i32),  -- not needed for this exercise\\n\"\nmsgstr \"//I32(i32),  -- не потрібно для цієї вправи\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// Поле, що містить номер поля та його значення.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64,  -- не потрібно для цієї вправи\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//5 => WireType::I32,  -- not needed for this exercise\\n\"\nmsgstr \"//5 => WireType::I32,  -- не потрібно для цієї вправи\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire type: {value}\\\"\"\nmsgstr \"\\\"Неправильний wire type: {value}\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected string to be a `Len` field\\\"\"\nmsgstr \"\\\"Очікуваний рядок має бути полем `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string\\\"\"\nmsgstr \"\\\"Неправильний рядок\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected bytes to be a `Len` field\\\"\"\nmsgstr \"\\\"Очікувані байти мають бути полем `Len`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Expected `u64` to be a `Varint` field\\\"\"\nmsgstr \"\\\"Очікувалося, що `u64` буде полем `Varint`\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Розбір VARINT з поверненням розібраного значення та решти байтів.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Not enough bytes for varint\\\"\"\nmsgstr \"\\\"Недостатньо байт для varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// Це останній байт VARINT, тому перетворюємо його\\n\"\n\"            // в u64 і повертаємо.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// Більше 7 байт є неприпустимим.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Too many bytes for varint\\\"\"\nmsgstr \"\\\"Забагато байт для varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Перетворити тег у номер поля та WireType.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Розбір поля з поверненням залишку байтів\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"На основі wire type побудуйте Field, використовуючи стільки байт, скільки \"\n\"потрібно.\\\"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"Повернути поле та всі невикористані байти.\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Розбір повідомлення за заданими даними, викликаючи `T::add_field` для \"\n\"кожного поля в\\n\"\n\"/// повідомленні.\\n\"\n\"///\\n\"\n\"/// Споживаються всі вхідні дані.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Реалізувати ProtoMessage для Person та PhoneNumber.\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise there are various cases where protobuf parsing might fail, \"\n\"e.g. if you try to parse an `i32` when there are fewer than 4 bytes left in \"\n\"the data buffer. In normal Rust code we'd handle this with the `Result` \"\n\"enum, but for simplicity in this exercise we panic if any errors are \"\n\"encountered. On day 4 we'll cover error handling in Rust in more detail.\"\nmsgstr \"\"\n\"У цій вправі існують різні випадки, коли розбір protobuf може не спрацювати, \"\n\"наприклад, якщо ви спробуєте розібрати `i32`, коли у буфері даних залишилося \"\n\"менше 4 байт. У звичайному Rust-коді ми б впоралися з цим за допомогою \"\n\"переліку `Result`, але для простоти у цій вправі ми панікуємо, якщо \"\n\"виникають помилки. На четвертий день ми розглянемо обробку помилок у Rust \"\n\"більш детально.\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"len not a valid `usize`\\\"\"\nmsgstr \"\\\"len не є допустимим `usize`\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"Несподіваний EOF\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// пропустити все інше\\n\"\n\n#: src/lifetimes/solution.md src/modules/exercise.md src/modules/solution.md\n#: src/testing/unit-tests.md src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"beautiful name\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"Evan\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"+1234-777-9090\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"\\\"home\\\"\"\nmsgstr \"\\\"home\\\"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"Ласкаво просимо до Дня 4\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\"Сьогодні ми розглянемо теми, що стосуються створення великомасштабного \"\n\"програмного забезпечення на Rust:\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"Ітератори: глибоке занурення в трейт `Iterator`.\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"Модулі та видимість.\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"Тестування\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"Обробка помилок: паніка, `Result` і оператор спроби `?`.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\"Небезпечний Rust: рятувальний отвір, коли ви не можете виразити себе в \"\n\"безпечному Rust.\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія має тривати близько 2 годин 40 \"\n\"хвилин. Вона містить:\"\n\n#: src/iterators.md\nmsgid \"Iterator\"\nmsgstr \"Ітератор\"\n\n#: src/iterators.md\nmsgid \"IntoIterator\"\nmsgstr \"IntoIterator\"\n\n#: src/iterators.md src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"Трейт [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"підтримує ітерацію над значеннями у колекції. Він вимагає наявності методу \"\n\"`next` і надає багато методів. Багато стандартних бібліотечних типів \"\n\"реалізують `Iterator`, і ви також можете реалізувати його самостійно:\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"Трейт `Iterator` реалізує багато поширених функціональних операцій \"\n\"програмування над колекціями (наприклад, `map`, `filter`, `reduce` і т.д.). \"\n\"Це цій трейт, де ви можете знайти всю документацію про них. У Rust ці \"\n\"функції мають створювати код, який є настільки ж ефективним, як і \"\n\"еквівалентні імперативні реалізації.\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` — це трейт, яка забезпечує роботу циклів for. Він \"\n\"реалізований такими типами колекцій, як `Vec<T>`, і посиланнями на них, \"\n\"наприклад `&Vec<T>` і `&[T]`. Діапазони також реалізують його. Ось чому ви \"\n\"можете перебирати вектор з `for i in some_vec { .. }`, але `some_vec.next()` \"\n\"не існує.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"Трейт `Iterator` описує, як виконувати _ітерацію_ після того, як ви створили \"\n\"ітератор. Пов'язаний з нею трейт [`IntoIterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.IntoIterator.html) визначає, як створити ітератор для типу. \"\n\"Він автоматично використовується циклом `for`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"точка = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\"Перейдіть до документації по `IntoIterator`. Кожна реалізація `IntoIterator` \"\n\"повинна декларувати два типи:\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`: тип для ітерації, наприклад, `i8`,\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`: тип `Iterator`, що повертається методом `into_iter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"Зауважте, що `IntoIter` і `Item` пов’язані: ітератор повинен мати той самий \"\n\"тип `Item`, що означає, що він повертає `Option<Item>`\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"У прикладі перебираються всі комбінації координат x та y.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"Спробуйте виконати ітерацію над сіткою двічі в `main`. Чому це не \"\n\"спрацьовує? Зверніть увагу, що `IntoIterator::into_iter` отримує право \"\n\"власності на `self`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"Виправте цю проблему, реалізувавши `IntoIterator` для `&Grid` і зберігаючи \"\n\"посилання на `Grid` у `GridIter`.\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"Така сама проблема може виникнути для стандартних бібліотечних типів: `for e \"\n\"in some_vector` отримає право власності на `some_vector` і буде перебирати \"\n\"елементи з цього вектора, які йому належать. Натомість використовуйте `for e \"\n\"in &some_vector` для перебору посилань на елементи `some_vector`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"дозволяє створювати колекцію з [`Iterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.Iterator.html).\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator` реалізує\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"Існує два способи вказати `B` для цього методу:\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"З \\\" turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, як показано. \"\n\"Скорочення `_`, використане тут, дозволяє Rust визначити тип елементів `Vec`.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"З виведенням типу: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Перепишіть приклад так, щоб він мав такий вигляд.\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"Існують базові реалізації `FromIterator` для `Vec`, `HashMap` тощо. Існують \"\n\"також більш спеціалізовані реалізації, які дозволяють робити цікаві речі, \"\n\"наприклад, перетворювати `Iterator<Item = Result<V, E>>` у `Result<Vec<V>, \"\n\"E>`.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"У цій вправі вам потрібно буде знайти і використати деякі з методів, наданих \"\n\"у трейті [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html), для реалізації складних обчислень.\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"Скопіюйте наступний код до <https://play.rust-lang.org/> і запустіть тести. \"\n\"Для побудови значення, що повертається, використовуйте вираз ітератору та \"\n\"`collect` результат.\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Обчислює різницю між елементами `values`, зміщеними на  `offset`,\\n\"\n\"/// обгортаючи навколо від кінця `values` до початку.\\n\"\n\"///\\n\"\n\"/// Елемент `n` результату має вигляд `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use, super, self\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\"Ми бачили, як блоки `impl` дозволяють нам співвідносити функції з типом.\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"Аналогічно, `mod` надає нам можливості співвідносити типи та функції:\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"У модулі foo\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"У модулі bar\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"Пакети забезпечують функціональність і включають файл `Cargo.toml`, який \"\n\"описує, як створити пакет із 1+ крейтів.\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Крейти — це дерево модулів, у якому бінарний крейт створює виконуваний файл, \"\n\"а бібліотечний крейт компілюється в бібліотеку.\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"Модулі визначають організацію, обсяг і є темою цього розділу.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\"Пропущення вмісту модуля призведе до того, що Rust шукатиме його в іншому \"\n\"файлі:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells Rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"Це повідомляє Rust, що вміст модуля `garden` знаходиться в `src/garden.rs`. \"\n\"Так само модуль `garden::vegetables` можна знайти на `src/garden/vegetables.\"\n\"rs`.\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"Корінь `crate` знаходиться в:\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (для крейта бібліотеки)\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (для крейта виконуваного файлу)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc comments\"\n\"\\\". These document the item that contains them -- in this case, a module.\"\nmsgstr \"\"\n\"Модулі, визначені у файлах, також можна документувати за допомогою \"\n\"\\\"внутрішніх коментарів документа\\\". Вони документують елемент, який їх \"\n\"містить – у цьому випадку це модуль.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! Цей модуль реалізує сад, включаючи високоефективну реалізацію\\n\"\n\"//! пророщування.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Ре-експорт типів з цього модуля.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Посіяти задані пакети насіння.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Збір врожаю в саду, який вже готовий.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"До Rust 2018 модулі мали розташовуватися в `module/mod.rs` замість `module.\"\n\"rs`, і це все ще робоча альтернатива для випусків після 2018 року.\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"Основною причиною введення `filename.rs` як альтернативи `filename/mod.rs` \"\n\"було те, що багато файлів з назвами `mod.rs` важко розрізнити в IDE.\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\"Більш глибоке вкладення може використовувати папки, навіть якщо основним \"\n\"модулем є файл:\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\"Місце, де Rust шукатиме модулі, можна змінити за допомогою директиви \"\n\"компілятора:\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"Це корисно, наприклад, якщо ви хочете розмістити тести для модуля у файлі з \"\n\"іменем `some_module_test.rs`, подібно до конвенції у Go.\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"Модулі є межею конфіденційності:\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\"Елементи модуля є приватними за замовчуванням (приховує деталі реалізації).\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"Батьківські та споріднені елементи завжди видно.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"Іншими словами, якщо елемент видимий у модулі `foo`, він видимий у всіх \"\n\"нащадках `foo`.\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\"Використовуйте ключове слово `pub`, щоб зробити модулі загальнодоступними.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\"Крім того, існують розширені специфікатори `pub(...)` для обмеження обсягу \"\n\"публічної видимості.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"Перегляньте [довідник Rust](https://doc.rust-lang.org/reference/visibility-\"\n\"and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"Налаштування видимості `pub(crate)` є типовим шаблоном.\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"Рідше ви можете надати видимість певному шляху.\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\"У будь-якому випадку видимість повинна бути надана модулю-предпопереднику (і \"\n\"всім його нащадкам).\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"Модуль може залучати символи з іншого модуля до області видимості за \"\n\"допомогою `use`. Зазвичай ви бачите щось подібне у верхній частині кожного \"\n\"модуля:\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"Шляхи\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"Шляхи вирішуються таким чином:\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"Як відносний шлях:\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` або `self::foo` посилається на `foo` в поточному модулі,\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` посилається на `foo` у батьківському модулі.\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"Як абсолютний шлях:\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` посилається на `foo` в корені поточного крейту,\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` посилається на `foo` в крейті `bar`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"Зазвичай символи \\\"реекспортуються\\\" коротшим шляхом. Наприклад, файл `lib.\"\n\"rs` верхнього рівня у крейті може мати\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"зробити `DiskStorage` і `NetworkStorage` доступними для інших крейтів \"\n\"зручним і коротким шляхом.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"Здебільшого використовувати `use` потрібно лише з тими елементами, які \"\n\"з'являються в модулі. Однак, щоб викликати будь-які методи, трейт повинен \"\n\"бути в області видимості, навіть якщо тип, що реалізує цей трейт, вже \"\n\"знаходиться в області видимості. Наприклад, для використання методу \"\n\"`read_to_string` на типі, що реалізує трейт`Read`, вам потрібно `use std::\"\n\"io::Read`.\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"Оператор `use` може мати символ підстановки: `use std::io::*`. Це не \"\n\"рекомендується, оскільки незрозуміло, які саме елементи імпортуються, а вони \"\n\"можуть змінюватися з часом.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"У цій вправі ви реорганізуєте невелику реалізацію бібліотеки графічного \"\n\"інтерфейсу. У цій бібліотеці визначено трейт `Widget` та декілька реалізацій \"\n\"цього трейту, а також функцію `main`.\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"Зазвичай кожен тип або групу тісно пов'язаних між собою типів розміщують у \"\n\"власному модулі, тому кожен тип віджету має отримати свій власний модуль.\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"Установка Cargo\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"Ігрове середовище Rust підтримує лише один файл, тому вам потрібно створити \"\n\"проект Cargo у вашій локальній файловій системі:\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"Відредагуйте отриманий файл `src/main.rs`, додавши оператори `mod`, та \"\n\"додайте додаткові файли до каталогу `src`.\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"Джерело\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"Ось одномодульна реалізація бібліотеки графічного інтерфейсу:\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Натуральна ширина `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Малює віджету у буфер.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Малює віджет на стандартному виводі.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Додати 4 відступи для країв\\n\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Змініть draw_into на return Result<(), std::fmt::Error>. Тоді \"\n\"використовуйте \\n\"\n\"        // ?-оператор тут замість .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// додати трохи відступів\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"Це невелика текстова демонстрація графічного інтерфейсу.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Клацни на мене!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"Заохочуйте студентів розділити код так, як вони вважають за потрібне, і \"\n\"звикнути до необхідних декларацій `mod`, `use` і `pub`. Після цього \"\n\"обговоріть, які організації є найбільш ідіоматичними.\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: після вивчення обробки помилок можна змінити\\n\"\n\"        // draw_into щоб повертати Result<(), std::fmt::Error>. Тоді \\n\"\n\"        // використовуйте тут оператор ? замість .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"Модульні тести\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\"Rust і Cargo постачаються з простим фреймворком для модульного тестування:\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"Модульні тести підтримуються у всьому коді.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"Тести інтеграції підтримуються через каталог `tests/`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"Тести позначаються `#[test]`. Модульні тести часто розміщують у вкладеному \"\n\"модулі `tests`, використовуючи `#[cfg(test)]` для їх умовної компіляції лише \"\n\"під час збирання тестів.\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\\\"Привіт, світ!\\\"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"Це дозволяє тестувати приватних помічників.\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\"Атрибут `#[cfg(test)]` активний лише тоді, коли ви запускаєте `cargo test`.\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"Запустіть тести на майданчику, щоб показати їхні результати.\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"Інтеграційні тести\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\"Якщо ви хочете перевірити свою бібліотеку як клієнт, скористайтеся \"\n\"інтеграційним тестом.\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"Створіть файл `.rs` у `tests/`:\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"Ці тести мають доступ лише до публічного API вашого ящика.\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"Тести документації\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust має вбудовану підтримку для тестування документації:\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// Скорочує рядок до заданої довжини.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Привіт, світ\\\", 5), \\\"Привіт\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Привіт, світ\\\", 20), \\\"Привіт, світ\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"Блоки коду в коментарях `///` автоматично сприймаються як код Rust.\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"Код буде скомпільовано та виконано як частину `cargo test`.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\"Додавання `#` до коду приховає його з документації, але все одно скомпілює/\"\n\"запустить.\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"Перевірте наведений вище код на [Rust Playground](https://play.rust-lang.\"\n\"org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"Компілятор Rust видає фантастичні повідомлення про помилки, а також корисні \"\n\"вбудовані лінти. [Clippy](https://doc.rust-lang.org/clippy/) надає ще більше \"\n\"лінтів, організованих у групи, які можна вмикати для кожного проекту.\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X, напевно, поміститься в u16, так? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"Запустіть приклад коду і вивчіть повідомлення про помилку. Тут також видно \"\n\"лінти, але вони не будуть показані після компіляції коду. Перейдіть на сайт \"\n\"майданчика, щоб показати ці лінти.\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"Після усунення лінтів запустіть `clippy` на сайті майданчика, щоб показати \"\n\"попередження clippy. Clippy має вичерпну документацію щодо своїх лінтів і \"\n\"постійно додає нові лінти (включно з лінтами, які заборонено за \"\n\"замовчуванням).\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"Зауважте, що помилки або попередження з `help: ...` можна виправити за \"\n\"допомогою `cargo fix` або за допомогою вашого редактора.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[Алгоритм Луна](https://en.wikipedia.org/wiki/Luhn_algorithm) \"\n\"використовується для перевірки номерів кредитних карток. Алгоритм приймає \"\n\"рядок як вхідні дані та виконує наступне, щоб перевірити номер кредитної \"\n\"картки:\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject numbers with fewer than two digits.\"\nmsgstr \"Ігноруємо всі пробіли. Відхиляємо числа із менш ніж двома цифрами.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"Рухаючись **справа наліво**, подвоює кожну другу цифру: для числа `1234` ми \"\n\"подвоюємо `3` і `1`. Для числа `98765` ми подвоюємо `6` і `8`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"Після подвоєння цифри підсумовує цифри, якщо результат більший за 9. Таким \"\n\"чином, подвоєння `7` перетворюється на `14`, яке стає `1 + 4 = 5`.\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"Підсумовує всі неподвоєні та подвоєні цифри.\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"Номер кредитної картки дійсний, якщо сума закінчується на `0`.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most of the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"Наданий код містить реалізацію алгоритму Луна з помилками, разом з двома \"\n\"базовими модульними тестами, які підтверджують, що більша частина алгоритму \"\n\"реалізована коректно.\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"Скопіюйте наведений нижче код на <https://play.rust-lang.org/> і напишіть \"\n\"додаткові тести для виявлення помилок у наданій реалізації, виправивши всі \"\n\"знайдені помилки.\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// Це версія з помилками, яка з'являється у проблемі.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// Це рішення, яке проходить усі наведені нижче тести.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// New: accept whitespace.\\n\"\nmsgstr \"// Нове: прийняти пробіли.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// New: reject all other characters.\\n\"\nmsgstr \"// Нове: відкинути всі інші символи.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// New: check that we have at least two digits\\n\"\nmsgstr \"// Нове: перевіряємо, чи є хоча б дві цифри\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Чи є {cc_number} дійсним номером кредитної картки? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"так\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"ні\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/error-handling.md src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 1 години 5 хвилин. Він містить:\"\n\n#: src/error-handling.md\nmsgid \"Error Trait\"\nmsgstr \"Error трейт\"\n\n#: src/error-handling.md\nmsgid \"thiserror\"\nmsgstr \"thiserror\"\n\n#: src/error-handling.md\nmsgid \"anyhow\"\nmsgstr \"anyhow\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"Вправа: Переписування з Result\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust обробляє фатальні помилки з \\\"panic\\\".\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\"Rust викличе паніку, якщо під час виконання станеться фатальна помилка:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Паніки – це невиправні та несподівані помилки.\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Паніки є ознакою помилок у програмі.\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\"Збої у виконанні, такі як невдалі перевірки меж, можуть викликати паніку\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"Твердження (наприклад, `assert!`) панікують у разі невдачі\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"Для спеціальних панік можна використовувати макрос `panic!`.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\"Паніка \\\"розмотує\\\" стек, відкидаючи значення так, як якщо б функції \"\n\"повернулися.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\"Використовуйте API, що не викликають паніки (такі як `Vec::get`), якщо збій \"\n\"неприйнятний.\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\"За замовчуванням паніка призведе до розмотування стека. Розмотування можна \"\n\"зловити:\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"Ніяких проблем!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"о, ні!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\"Перехоплення є незвичайним; не намагайтеся реалізувати виключення за \"\n\"допомогою `catch_unwind`!\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"Це може бути корисним на серверах, які повинні продовжувати працювати навіть \"\n\"у разі збою одного запиту.\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\"Це не працює, якщо у вашому `Cargo.toml` встановлено `panic = 'abort'`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Our primary mechanism for error handling in Rust is the [`Result`](https://\"\n\"doc.rust-lang.org/stable/std/result/enum.Result.html) enum, which we briefly \"\n\"saw when discussing standard library types.\"\nmsgstr \"\"\n\"Основним механізмом обробки помилок у Rust є перелік [`Result`](https://doc.\"\n\"rust-lang.org/stable/std/result/enum.Result.html), який ми коротко \"\n\"розглядали під час обговорення стандартних бібліотечних типів.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"`Result` has two variants: `Ok` which contains the success value, and `Err` \"\n\"which contains an error value of some kind.\"\nmsgstr \"\"\n\"`Result` має два варіанти: `Ok`, який містить значення успіху, і `Err`, який \"\n\"містить деяке значення помилки.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Whether or not a function can produce an error is encoded in the function's \"\n\"type signature by having the function return a `Result` value.\"\nmsgstr \"\"\n\"Чи може функція спричинити помилку, кодується у сигнатурі типу функції, яка \"\n\"повертає значення `Result`.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Like with `Option`, there is no way to forget to handle an error: You cannot \"\n\"access either the success value or the error value without first pattern \"\n\"matching on the `Result` to check which variant you have. Methods like \"\n\"`unwrap` make it easier to write quick-and-dirty code that doesn't do robust \"\n\"error handling, but means that you can always see in your source code where \"\n\"proper error handling is being skipped.\"\nmsgstr \"\"\n\"Як і у випадку з `Option`, ви не можете забути обробити помилку: Ви не \"\n\"можете отримати доступ ні до значення успіху, ні до значення помилки без \"\n\"попередньої обробки шаблону на `Result`, щоб перевірити, який саме варіант \"\n\"ви отримали. Методи на кшталт `unwrap` полегшують написання швидкого і \"\n\"брудного коду, який не забезпечує надійну обробку помилок, але означає, що \"\n\"ви завжди можете побачити у вихідному коді, де було пропущено належну \"\n\"обробку помилок.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"It may be helpful to compare error handling in Rust to error handling \"\n\"conventions that students may be familiar with from other programming \"\n\"languages.\"\nmsgstr \"\"\n\"Може бути корисно порівняти обробку помилок у Rust зі стандартами обробки \"\n\"помилок, з якими студенти можуть бути знайомі з інших мов програмування.\"\n\n#: src/error-handling/result.md\nmsgid \"Many languages use exceptions, e.g. C++, Java, Python.\"\nmsgstr \"Багато мов використовують виключення, наприклад, C++, Java, Python.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"In most languages with exceptions, whether or not a function can throw an \"\n\"exception is not visible as part of its type signature. This generally means \"\n\"that you can't tell when calling a function if it may throw an exception or \"\n\"not.\"\nmsgstr \"\"\n\"У більшості мов з виключеннями інформація про те, чи може функція \"\n\"згенерувати виключення, не відображається у сигнатурі її типу. Це зазвичай \"\n\"означає, що при виклику функції ви не можете визначити, чи може вона \"\n\"згенерувати виключення.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Exceptions generally unwind the call stack, propagating upward until a `try` \"\n\"block is reached. An error originating deep in the call stack may impact an \"\n\"unrelated function further up.\"\nmsgstr \"\"\n\"Виключення, як правило, розмотують стек викликів, поширюючись вгору, поки не \"\n\"буде досягнуто блоку `try`. Помилка, що виникла глибоко у стеку викликів, \"\n\"може вплинути на не пов'язану з нею функцію, розташовану вище.\"\n\n#: src/error-handling/result.md\nmsgid \"Error Numbers\"\nmsgstr \"Коди помилок\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Some languages have functions return an error number (or some other error \"\n\"value) separately from the successful return value of the function. Examples \"\n\"include C and Go.\"\nmsgstr \"\"\n\"У деяких мовах функції повертають код помилки (або інше значення помилки) \"\n\"окремо від успішного значення, яке повертає функція. Приклади включають C та \"\n\"Go.\"\n\n#: src/error-handling/result.md\nmsgid \"\"\n\"Depending on the language it may be possible to forget to check the error \"\n\"value, in which case you may be accessing an uninitialized or otherwise \"\n\"invalid success value.\"\nmsgstr \"\"\n\"Залежно від мови можна забути перевірити значення помилки, і в цьому випадку \"\n\"ви можете отримати доступ до неініціалізованого або іншим чином недійсного \"\n\"значення успішного завершення.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"Помилки виконання, такі як відмова у з'єднанні або не знайдено файл, \"\n\"обробляються за допомогою типу `Result`, але зіставлення цього типу для \"\n\"кожного виклику може бути громіздким. Оператор спроби `?` використовується \"\n\"для повернення помилок користувачеві. Він дозволяє перетворити звичайний \"\n\"оператор\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"у набагато простіше\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"Ми можемо використовувати це, щоб спростити наш код обробки помилок:\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"ім'я користувача або помилка: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"Спростіть функцію `read_username` до використання `?`.\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"Змінна `username` може мати значення `Ok(string)` або `Err(error)`.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"Використовуйте виклик `fs::write`, щоб перевірити різні сценарії: \"\n\"відсутність файлу, порожній файл, файл з іменем користувача.\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"Зверніть увагу, що `main` може повертати `Result<(), E>`, якщо вона реалізує \"\n\"`std::process:Termination`. На практиці це означає, що `E` реалізує `Debug`. \"\n\"Виконуваний файл виведе варіант `Err` і поверне ненульовий статус виходу у \"\n\"разі помилки.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\"Ефективне розширення `?` є трохи складнішим, ніж було зазначено раніше:\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"працює так само, як\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"Виклик `From::from` тут означає, що ми намагаємося перетворити тип помилки \"\n\"на тип, який повертає функція. Це дозволяє легко інкапсулювати помилки у \"\n\"помилки вищого рівня.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"I/O error: {e}\\\"\"\nmsgstr \"\\\"I/O помилка: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Не знайдено імені користувача в {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"Оператор `?` повинен повертати значення, сумісне з типом повернення функції. \"\n\"Для `Result` це означає, що типи помилок мають бути сумісними. Функція, яка \"\n\"повертає `Result<T, ErrorOuter>`, може використовувати `?` на значенні типу \"\n\"`Result<U, ErrorInner>` тільки якщо `ErrorOuter` і `ErrorInner` мають \"\n\"однаковий тип або якщо `ErrorOuter` реалізує `From<ErrorInner>`.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"Поширеною альтернативою реалізації `From` є `Result::map_err`, особливо коли \"\n\"перетворення відбувається лише в одному місці.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"Для `Option` немає вимог щодо сумісності. Функція, що повертає `Option<T>`, \"\n\"може використовувати оператор `?` на `Option<U>` для довільних типів `T` та \"\n\"`U`.\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"Функція, яка повертає `Result`, не може використовувати `?` в `Option` і \"\n\"навпаки. Однак, `Option::ok_or` перетворює `Option` в `Result`, тоді як \"\n\"`Result::ok` перетворює `Result` в `Option`.\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"Динамічні типи помилок\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"Іноді ми хочемо дозволити повертати будь-який тип помилки без написання \"\n\"власного переліку, що охоплює всі різні можливості. Трейт `std::error::\"\n\"Error` дозволяє легко створити об'єкт трейту, який може містити будь-яку \"\n\"помилку.\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Підрахунок: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Помилка: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"Функція `read_count` може повернути `std::io::Error` (з файлових операцій) \"\n\"або `std::num::ParseIntError` (з `String::parse`).\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"Пакування помилок економить код, але позбавляє можливості чисто обробляти \"\n\"різні випадки помилок по-різному у програмі. Загалом, це не дуже гарна ідея \"\n\"використовувати `Box<dyn Error>` у публічному API бібліотеки, але це може \"\n\"бути гарним варіантом у програмі, де ви просто хочете десь вивести \"\n\"повідомлення про помилку.\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed.\"\nmsgstr \"\"\n\"Переконайтеся, що ви використовуєте трейт`std::error::Error` під час \"\n\"визначення користувацького типу помилки, щоб її можна було упакувати.\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) crate provides macros to help \"\n\"avoid boilerplate when defining error types. It provides derive macros that \"\n\"assist in implementing `From<T>`, `Display`, and the `Error` trait.\"\nmsgstr \"\"\n\"Крейт [`thiserror`](https://docs.rs/thiserror/) містить макроси, які \"\n\"допомагають уникнути повторювань при визначенні типів помилок. Він містить \"\n\"похідні макроси, які допомагають реалізувати `From<T>`, `Display` та \"\n\"трейт`Error`.\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\\\"I/O error: {0}\\\"\"\nmsgstr \"\\\"I/O помилка: {e}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Не знайдено імені користувача в {0}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Ім'я користувача: {username}\\\"\"\n\n#: src/error-handling/thiserror.md src/error-handling/anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Помилка: {err:?}\\\"\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"Похідний макрос `Error` надається `thiserror` і має багато корисних \"\n\"атрибутів для компактного визначення типів помилок.\"\n\n#: src/error-handling/thiserror.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\"Повідомлення з `#[error]` використовується для отримання трейту `Display`.\"\n\n#: src/error-handling/thiserror.md\nmsgid \"\"\n\"Note that the (`thiserror::`)`Error` derive macro, while it has the effect \"\n\"of implementing the (`std::error::`)`Error` trait, is not the same this; \"\n\"traits and macros do not share a namespace.\"\nmsgstr \"\"\n\"Зауважте, що похідний макрос (`thiserror::`)`Error`, хоча і має ефект \"\n\"реалізації трейту (`std::error::`)`Error`, не є тим самим; трейти та макроси \"\n\"не мають спільного простору імен.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"The [`anyhow`](https://docs.rs/anyhow/) crate provides a rich error type \"\n\"with support for carrying additional contextual information, which can be \"\n\"used to provide a semantic trace of what the program was doing leading up to \"\n\"the error.\"\nmsgstr \"\"\n\"Крейт [`anyhow`](https://docs.rs/anyhow/) надає багатий тип помилок з \"\n\"підтримкою передачі додаткової контекстної інформації, яка може бути \"\n\"використана для семантичного відстеження дій програми, що призвели до \"\n\"виникнення помилки.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"This can be combined with the convenience macros from [`thiserror`](https://\"\n\"docs.rs/thiserror/) to avoid writing out trait impls explicitly for custom \"\n\"error types.\"\nmsgstr \"\"\n\"Це можна поєднати зі зручними макросами з [`thiserror`](https://docs.rs/\"\n\"thiserror/), щоб уникнути написання реалізацій трейтів явно для \"\n\"користувацьких типів помилок.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Не вдалося відкрити {path}\\\"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Не вдалося прочитати\\\"\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` по суті є обгорткою навколо `Box<dyn Error>`. Таким чином, \"\n\"це знову ж таки, як правило, не є хорошим вибором для загальнодоступного API \"\n\"бібліотеки, але широко використовується в програмах.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\"`anyhow::Result<V>` — це псевдонім типу для `Result<V, anyhow::Error>`.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Error` may be familiar to Go developers, \"\n\"as it provides similar behavior to the Go `error` type and `Result<T, \"\n\"anyhow::Error>` is much like a Go `(T, error)` (with the convention that \"\n\"only one element of the pair is meaningful).\"\nmsgstr \"\"\n\"Функціональність, яку надає `anyhow::Error`, може бути знайома розробникам \"\n\"Go, оскільки вона забезпечує поведінку, подібну до типу Go `error`, а \"\n\"`Result<T, anyhow::Error>` дуже схожа на Go `(T, error)` (з умовою, що \"\n\"тільки один елемент пари є значущим).\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` - це трейт, реалізований для стандартних типів `Result` та \"\n\"`Option`. Використання `anyhow::Context` необхідне для того, щоб дозволити \"\n\"використання `.context()` та `.with_context()` для цих типів.\"\n\n#: src/error-handling/anyhow.md\nmsgid \"\"\n\"`anyhow::Error` has support for downcasting, much like `std::any::Any`; the \"\n\"specific error type stored inside can be extracted for examination if \"\n\"desired with [`Error::downcast`](https://docs.rs/anyhow/latest/anyhow/struct.\"\n\"Error.html#method.downcast).\"\nmsgstr \"\"\n\"`anyhow::Error` має підтримку даункастингу, подібно до `std::any::Any`; \"\n\"конкретний тип помилки, що зберігається всередині, може бути витягнутий для \"\n\"вивчення за допомогою [`Error::downcast`](https://docs.rs/anyhow/latest/\"\n\"anyhow/struct.Error.html#method.downcast).\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use [`thiserror`](https://docs.rs/thiserror) and [`anyhow`](https://docs.rs/\"\n\"anyhow).\"\nmsgstr \"\"\n\"Нижче реалізовано дуже простий синтаксичний аналізатор для мови виразів. \"\n\"Однак, він обробляє помилки панічно. Перепишіть його так, щоб він \"\n\"використовував ідіоматичну обробку помилок і поширював помилки на повернення \"\n\"з `main`. Сміливо використовуйте [`thiserror`](https://docs.rs/thiserror) і \"\n\"[`anyhow`](https://docs.rs/anyhow).\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"**Hint:** start by fixing error handling in the `parse` function. Once that \"\n\"is working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"**Підказка:** почніть з виправлення обробки помилок у функції `parse`. Після \"\n\"того, як вона буде працювати коректно, оновіть `Tokenizer` для реалізації \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` і обробіть це у парсері.\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// Арифметичний оператор.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// Токен у мові виразів.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// Вираз у мові виразів.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// Посилання на змінну.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// Буквальне число.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// Бінарна операція.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Неочікуваний символ {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Неочікуваний кінець вводу\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer\\\"\"\nmsgstr \"\\\"Неправильне 32-бітне ціле число\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Неочікуваний токен {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\"// Заглянути наперед, щоб розібрати бінарну операцію, якщо вона присутня.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Неочікуваний символ '{0}' у вхідних даних\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Помилка токенізатора: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Неочікуваний токен {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Неправильне число\\\"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Мова Rust складається з двох частин:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"**Safe Rust:** безпека пам’яті, невизначена поведінка неможлива.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\"**Небезпечний Rust:** може викликати невизначену поведінку, якщо порушуються \"\n\"попередні умови.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"У цьому курсі ми розглянули переважно безпечний Rust, але важливо знати, що \"\n\"таке небезпечний Rust.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"Небезпечний код зазвичай невеликий та ізольований, і його правильність слід \"\n\"ретельно задокументувати. Зазвичай він загорнутий у безпечний рівень \"\n\"абстракції.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"Небезпечний Rust дає вам доступ до п’яти нових можливостей:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"Розіменування необроблених вказівників.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"Доступ або зміна мутабельних статичних змінних.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"Доступ до полів `union`.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"Викликати `unsafe` функції, включаючи `extern` функції.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"Реалізація `unsafe` трейтів.\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"Далі ми коротко розглянемо небезпечні можливості. Щоб отримати повну \"\n\"інформацію, перегляньте [розділ 19.1 у книзі Rust](https://doc.rust-lang.org/\"\n\"book/ch19-01-unsafe-rust.html) та [Rustonomicon](https://doc .rust-lang.org/\"\n\"nomicon/).\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Небезпечний Rust не означає, що код неправильний. Це означає, що розробники \"\n\"вимкнули деякі функції безпеки компілятора і змушені писати коректний код \"\n\"самостійно. Це означає, що компілятор більше не забезпечує дотримання правил \"\n\"безпеки пам'яті Rust.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\"Створення вказівників є безпечним, але для їх розіменування потрібно \"\n\"`unsafe`:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"обережно!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: r1 та r2 були отримані з посилань і тому\\n\"\n\"    // гарантовано є ненульовими та правильно вирівняними, об'єкти, що \"\n\"лежать в основі\\n\"\n\"    // посилань, з яких вони були отримані, є дійсними на протязі\\n\"\n\"    // всього небезпечного блоку, і до них немає доступу ні через\\n\"\n\"    // посилання, ні одночасно через будь-які інші покажчики.\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 є: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"ууухооох\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 є: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// НЕБЕЗПЕЧНО. НЕ РОБІТЬ ЦЬОГО.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"Хорошою практикою є (і вимагається посібником зі стилю Android Rust) писати \"\n\"коментар до кожного `unsafe` блоку, пояснюючи, наскільки код у ньому \"\n\"відповідає вимогам безпеки небезпечних операцій, які він виконує.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"У випадку розіменувань покажчиків це означає, що покажчики мають бути \"\n\"[_дійсними_](https://doc.rust-lang.org/std/ptr/index.html#safety), тобто:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"Покажчик має бути ненульовим.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"Покажчик має бути _розіменоваючим_ (у межах одного виділеного об’єкта).\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"Об’єкт не повинен бути звільнений.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"Не повинно бути одночасних доступів до того самого розташування.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"Якщо вказівник було отримано шляхом приведення посилання, базовий об’єкт має \"\n\"бути дійсним, і жодне посилання не може використовуватися для доступу до \"\n\"пам’яті.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"У більшості випадків вказівник також має бути правильно вирівняний.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"У розділі \\\"НЕ БЕЗПЕЧНО\\\" наведено приклад поширеної помилки UB: `*r1` має \"\n\"`'static` час життя, тому `r3` має тип `&'static String`, і таким чином \"\n\"переживає `s`. Створення посилання з покажчика вимагає _великої обережності_.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"Читати незмінну статичну змінну безпечно:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\\\"Привіт, світ!\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\"Однак, оскільки можуть відбуватися перегони даних, небезпечно читати і \"\n\"записувати статичні змінні, що мутуються:\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: Немає інших потоків, які могли б отримати доступ до `COUNTER`.\\n\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"Програма тут безпечна, оскільки вона однопотокова. Однак компілятор Rust є \"\n\"консервативним і припускає найгірше. Спробуйте видалити `unsafe` і \"\n\"подивіться, як компілятор пояснює, що мутація статики з кількох потоків є \"\n\"невизначеною поведінкою.\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Використання мутабельної статики, як правило, погана ідея, але є деякі \"\n\"випадки, коли це може мати сенс у низькорівневому коді `no_std`, наприклад \"\n\"реалізація розподілювача купи або робота з деякими API C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\"Об’єднання подібні до переліків, але вам потрібно самостійно відстежувати \"\n\"активне поле:\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"// Невизначена поведінка!\\n\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Об’єднання дуже рідко потрібні в Rust, оскільки зазвичай можна \"\n\"використовувати перелік. Іноді вони потрібні для взаємодії з API бібліотек C.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"Якщо ви просто хочете по-новому інтерпретувати байти як інший тип, вам, \"\n\"мабуть, знадобиться [`std::mem::transmute`](https://doc.rust-lang.org/stable/\"\n\"std/mem/fn.transmute.html ) або безпечна оболонка, як-от крейт [`zerocopy`]\"\n\"(https://crates.io/crates/zerocopy).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"Виклик небезпечних функцій\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"Функцію або метод можна позначити як `unsafe`, якщо вони мають додаткові \"\n\"передумови, які ви повинні підтримувати, щоб уникнути невизначеної поведінки:\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: Індекси розташовані в правильному порядку в межах \\n\"\n\"    // фрагмента рядка та лежать на межах послідовності UTF-8.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"смайлик: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"кількість символів: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `abs` не працює з покажчиками і не має жодних вимог до\\n\"\n\"    // безпеки.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Абсолютне значення -3 згідно з C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Недотримання вимог кодування UTF-8 порушує безпеку пам’яті!\\n\"\n\"    // println!(\\\"смайлик: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"кількість символів: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"Написання небезпечних функцій\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Ви можете позначити власні функції як `unsafe`, якщо вони вимагають певних \"\n\"умов, щоб уникнути невизначеної поведінки.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Міняє місцями значення, на які вказують задані покажчики.\\n\"\n\"///\\n\"\n\"/// # Безпека\\n\"\n\"///\\n\"\n\"/// Покажчики повинні бути дійсними і правильно вирівняними.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"// БЕЗПЕКА: ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is unsafe for a different reason: \"\n\"it is an external function (FFI). Calling external functions is usually only \"\n\"a problem when those functions do things with pointers which might violate \"\n\"Rust's memory model, but in general any C function might have undefined \"\n\"behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"`get_unchecked`, як і більшість функцій `_unchecked`, небезпечна, оскільки \"\n\"може створити UB, якщо діапазон невірний. Функція `abs` небезпечна з іншої \"\n\"причини: вона є зовнішньою функцією (FFI). Виклик зовнішніх функцій зазвичай \"\n\"є проблемою лише тоді, коли ці функції роблять щось із вказівниками, що може \"\n\"порушити модель пам'яті Rust, але загалом будь-яка функція C може мати \"\n\"невизначену поведінку за довільних обставин.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"У цьому прикладі `\\\"C\\\"` - це ABI; [інші ABI також доступні](https://doc.\"\n\"rust-lang.org/reference/items/external-blocks.html).\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"Насправді ми не будемо використовувати вказівники для функції `swap` - це \"\n\"можна безпечно зробити за допомогою посилань.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Зверніть увагу, що небезпечний код дозволяється всередині небезпечної \"\n\"функції без блоку `unsafe`. Ми можемо заборонити це за допомогою \"\n\"`#[deny(unsafe_op_in_unsafe_fn)]`. Спробуйте додати його і подивіться, що \"\n\"станеться. Ймовірно, це буде змінено у майбутньому виданні Rust..\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"Реалізація небезпечних трейтів\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"Як і у випадку з функціями, ви можете позначити трейт `unsafe`, якщо \"\n\"реалізація повинна гарантувати певні умови, щоб уникнути невизначеної \"\n\"поведінки.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):\"\nmsgstr \"\"\n\"Наприклад, крейт `zerocopy` має небезпечний трейт, який виглядає [приблизно \"\n\"так](https://docs.rs/zerocopy/latest/zerocopy/trait.IntoBytes.html):\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Безпека\\n\"\n\"/// Тип повинен мати визначене представлення і не мати заповнень.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"// БЕЗПЕКА: `u32` має визначене представлення і не має заповнення.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"У Rustdoc має бути розділ `# Safety` для трейту, що пояснює вимоги до \"\n\"безпечної реалізації функції.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `IntoBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"Фактичний розділ безпеки для `IntoBytes` довший і складніший.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"Вбудовані `Send` та `Sync` трейти є небезпечними.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"Безпечна обгортка інтерфейсу зовнішньої функції (FFI)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust має чудову підтримку виклику функцій через _інтерфейс зовнішніх \"\n\"функцій_ (FFI). Ми скористаємося цим, щоб створити безпечну оболонку для \"\n\"функцій `libc`, які ви використовуєте у C для читання імен файлів у \"\n\"директорії.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"Ви захочете переглянути сторінки посібника:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"Ви також захочете переглянути модуль [`std::ffi`](https://doc.rust-lang.org/\"\n\"std/ffi/). Там ви знайдете ряд типів рядків, які вам знадобляться для вправи:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"Кодування\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"Використання\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) і [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"Обробка тексту в Rust\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) і [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"NUL-термінований\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"Спілкування з функціями C\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) і [`OsString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"Специфічні для ОС\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"Спілкування з ОС\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"Ви будете конвертувати між усіма цими типами:\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`&str` до `CString`: вам потрібно виділити місце для кінцевого символу `\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"`CString` до `*const i8`: вам потрібен покажчик для виклику функцій C,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"`*const i8` до `&CStr`: вам потрібно щось, що може знайти кінцевий символ `\"\n\"\\\\0`,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"`&CStr` до `&[u8]`: зріз байт є універсальним інтерфейсом для \\\"деяких \"\n\"невідомих даних\\\",\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"`&[u8]` до `&OsStr`: `&OsStr` є кроком до `OsString`, використовуйте \"\n\"[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html), \"\n\"щоб створити його,\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr` до `OsString`: вам потрібно клонувати дані в `&OsStr`, щоб мати \"\n\"можливість повернути їх і знову викликати `readdir`.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"У [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) також є дуже \"\n\"корисний розділ про FFI.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"Скопіюйте код нижче на <https://play.rust-lang.org/> і заповніть відсутні \"\n\"функції та методи:\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"//Прозорий тип. Дивіться https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Розміщення відповідно до man-сторінки Linux для readdir(3), де ino_t та\\n\"\n\"    // off_t розгорнуто відповідно до визначень у\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Розміщення відповідно до man-сторінки macOS для dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// Дивіться https://github.com/rust-lang/libc/issues/414 та розділ про\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE у man-сторінці macOS про stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Платформи, які існували до виходу цих оновлень\\\" відносяться\\n\"\n\"        // до macOS (на відміну від iOS / wearOS / тощо) на Intel і \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Викликати opendir і повернути значення Ok, якщо це спрацювало,\\n\"\n\"        // інакше повернути Err з повідомленням.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\"// Продовжуємо викликати readdir до тих пір, поки не отримаємо назад \"\n\"вказівник NULL.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Викликати closedir за необхідністю.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"файли: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Неправильний путь: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// БЕЗПЕКА: path.as_ptr() не може бути NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {path:?}\\\"\"\nmsgstr \"\\\"Не вдалося відкрити {path:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Продовжуємо викликати readdir, доки не отримаємо назад вказівник NULL.\\n\"\n\"        // БЕЗПЕКА: self.dir ніколи не є NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// Ми досягли кінця директорії.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: dirent не є NULL і dirent.d_name є NULL\\n\"\n\"        // завершено.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call closedir as needed.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Викликаємо closedir за потреби.\\n\"\n\"        // БЕЗПЕКА: self.dir ніколи не є NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Не вдалося закрити {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Не UTF-8 символ у путі\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"Ласкаво просимо до Rust в Android\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust підтримується для системного програмного забезпечення на Android. Це \"\n\"означає, що ви можете писати нові сервіси, бібліотеки, драйвери або навіть \"\n\"прошивки на Rust (або покращувати існуючий код за потреби).\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\"Доповідач може згадати будь-яку з наступних тем, враховуючи зростаюче \"\n\"використання Rust в Android:\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html).\"\nmsgstr \"\"\n\"Приклад сервісу: [DNS через HTTP](https://security.googleblog.com/2022/07/\"\n\"dns-over-http3-in-android.html).\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html).\"\nmsgstr \"\"\n\"Бібліотеки: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html).\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/).\"\nmsgstr \"\"\n\"Драйвери ядра: [Binder](https://lore.kernel.org/rust-for-linux/20231101-rust-\"\n\"binder-v1-0-08ba9197f637@google.com/).\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html).\"\nmsgstr \"\"\n\"Прошивка: [прошивка pKVM](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html).\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"Для тестування нашого коду ми будемо використовувати Cuttlefish Android \"\n\"Virtual Device. Переконайтеся, що у вас є доступ до нього або створіть новий:\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"Докладнішу інформацію можна знайти в [Android Developer Codelab](https://\"\n\"source.android.com/docs/setup/start).\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The code on the following pages can be found in the [`src/android/` \"\n\"directory](https://github.com/google/comprehensive-rust/tree/main/src/\"\n\"android) of the course material. Please `git clone` the repository to follow \"\n\"along.\"\nmsgstr \"\"\n\"Код на наступних сторінках можна знайти в [`src/android/` директорії]\"\n\"(https://github.com/google/comprehensive-rust/tree/main/src/android) \"\n\"матеріалів курсу. Будь ласка, `git clone` репозиторій, щоб продовжити роботу.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish - це еталонний пристрій Android, призначений для роботи на \"\n\"типових робочих столах Linux. Також планується підтримка MacOS.\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"Образ системи Cuttlefish зберігає високу точність до реальних пристроїв і є \"\n\"ідеальним емулятором для запуску багатьох сценаріїв використання Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\"Система збірки Android (Soong) підтримує Rust за допомогою кількох модулів:\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"Тип модуля\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"Опис\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"Створює бінарний файл Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"Створює бібліотеку Rust і надає варіанти `rlib` та `dylib`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\"Створює бібліотеку Rust C, яку використовують модулі `cc`, і надає як \"\n\"статичні, так і спільні варіанти.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\"Створює бібліотеку `proc-macro` Rust. Вони аналогічні плагінам компілятора.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\"Створює бінарний файл тесту Rust, який використовує стандартну систему \"\n\"тестування Rust.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"Створює бінарний файл Rust fuzz, використовуючи `libfuzzer`.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\"Генерує вихідний код і створює бібліотеку Rust, яка надає інтерфейс для \"\n\"певного protobuf.\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\"Генерує вихідний код і створює бібліотеку Rust, яка містить прив’язки Rust \"\n\"до бібліотек C.\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"Далі ми розглянемо `rust_binary` і `rust_library`.\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"Спікер може згадати додаткові деталі:\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo не оптимізований для багатомовних репозиторіїв, а також завантажує \"\n\"пакети з інтернету.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"Для сумісності та продуктивності, Android повинен мати крейти в межах \"\n\"дерева. Він також повинен взаємодіяти з кодом C/C++/Java. Soong заповнює цю \"\n\"прогалину.\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to [Bazel](https://bazel.build/), which is the \"\n\"open-source variant of Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong має багато спільного з [Bazel](https://bazel.build/), який є варіантом \"\n\"Blaze з відкритим вихідним кодом (використовується в google3).\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"Цікавий факт: Дані із \\\"Зоряного шляху\\\" - це Android типу Soong\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Бінарні файли Rust\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"Почнемо з простої програми. У корені AOSP-каси створіть наступні файли:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Демонстрація Rust.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Виводить привітання у стандартний вивід.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Привіт від Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"Тепер ви можете створювати, завантажувати та запускати бінарний файл:\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Бібліотеки Rust\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\"Ви використовуєте `rust_library`, щоб створити нову бібліотеку Rust для \"\n\"Android.\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"Тут ми оголошуємо залежність від двох бібліотек:\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, який ми визначаємо нижче,\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, який є крейтом, який уже поставляється в [`external/rust/\"\n\"crates/`](https://cs.android.com/android/platform/superproject/+/master:\"\n\"external/rust/crates/).\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Це потрібно, щоб уникнути помилки динамічного лінкування.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"привіт\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Бібліотека привітання.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Привітати `name`.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Привіт, {name}, дуже приємно познайомитися з вами!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"Ви створюєте, завантажуєте та запускаєте бінарний файл, як і раніше:\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"[Android Interface Definition Language (AIDL)](https://developer.android.com/\"\n\"guide/components/aidl) підтримується в Rust:\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Код Rust може викликати існуючі сервери AIDL,\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"Ви можете створювати нові сервери AIDL у Rust.\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\"Щоб проілюструвати, як використовувати Rust з Binder, ми розглянемо процес \"\n\"створення інтерфейсу Binder. Потім ми реалізуємо описаний сервіс і напишемо \"\n\"клієнтський код, який взаємодіє з цим сервісом.\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"Інтерфейси AIDL\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"Ви оголошуєте API свого сервісу за допомогою інтерфейсу AIDL:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Інтерфейс сервісу Birthday. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Генерує привітання з днем народження. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust не увімкнено за замовчуванням\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\"Зверніть увагу, що структура каталогів у каталозі `aidl/` має відповідати \"\n\"назві пакета, що використовується у файлі AIDL, тобто пакетом є `com.example.\"\n\"birthdayservice`, а файл знаходиться за адресою `aidl/com/example/\"\n\"IBirthdayService.aidl`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"Згенерований API сервісу\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\"Binder генерує трейт, що відповідає визначенню інтерфейсу. Трейт для зв'язку \"\n\"з сервісом.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"_Згенерований трейт_:\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\"Ваш сервіс повинен реалізувати цей трейт, а ваш клієнт використовуватиме цей \"\n\"трейт для спілкування зі сервісом.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\"Згенеровані прив'язки можна знайти за адресою `out/soong/.intermediates/\"\n\"<path to module>/`.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\"Вкажіть, як сигнатура згенерованої функції, зокрема, типи аргументів та \"\n\"повернення, відповідають визначенню інтерфейсу.\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\"`String` як аргумент призводить до іншого типу Rust, ніж `String` як тип \"\n\"повернення.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"Реалізація сервісу\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"Тепер ми можемо реалізувати сервіс AIDL:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// Реалізація  `IBirthdayService`.\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"З днем народження {name}, вітаємо з {years} роками!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\"Вкажіть шлях до створеного трейту `IBirthdayService` і поясніть, навіщо \"\n\"потрібен кожен з сегментів.\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\"TODO: Що робить трейт `binder::Interface`? Чи є методи для перевизначення? \"\n\"Де знаходиться вхідний код?\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"Сервер AIDL\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"Нарешті, ми можемо створити сервер, який надаватиме сервіс:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Сервіс привітання з днем народження.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Точка входу для сервісу дня народження.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Не вдалося зареєструвати сервіс\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// Щоб уникнути помилки динамічного лінкування.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\"Процес створення користувацької реалізації сервісу (у цьому випадку типу \"\n\"`BirthdayService`, який реалізує `IBirthdayService`) і запуску його як \"\n\"сервісу Binder складається з кількох кроків і може здатися складнішим, ніж \"\n\"ті, хто звик до Binder з C++ або іншої мови. Поясніть учням, чому кожен крок \"\n\"є необхідним.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"Створіть екземпляр вашого типу сервісу (`BirthdayService`).\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\"Оберніть об'єкт сервісу у відповідний тип `Bn*` (у цьому випадку \"\n\"`BnBirthdayService`). Цей тип генерується Binder і надає загальну \"\n\"функціональність Binder, яку надавав би базовий клас `BnBinder` у C++. У \"\n\"Rust немає успадкування, тому замість нього ми використаємо композицію, \"\n\"помістивши наш `BirthdayService` всередину згенерованого `BnBinderService`.\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\"Викликаемо `add_service`, передавши йому ідентифікатор сервісу і ваш об'єкт \"\n\"сервісу (у прикладі - об'єкт `BnBirthdayService`).\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\"Викликаемо `join_thread_pool` щоб додати поточний потік до пулу потоків \"\n\"Binder'а і починаємо чекати на з'єднання.\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"Тепер ми можемо створювати, надсилати та запускати службу:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"В іншому терміналі перевірте, чи працює сервіс:\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"Ви також можете викликати сервіс за допомогою `service call`:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"Клієнт AIDL\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"Нарешті ми можемо створити клієнт Rust для нашого нового сервісу.\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Виклик сервісу привітання з днем народження.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Не вдалося підключитися до BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"// Викликаемо сервіс.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"Зауважте, що клієнт не залежить від `libbirthdayservice`.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"Створіть, завантажте та запустіть клієнт на своєму пристрої:\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\"`Strong<dyn IBirthdayService>` - це об'єкт трейту, що представляє сервіс, до \"\n\"якого підключився клієнт.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\"`Strong` - це спеціальний тип розумного вказівника для Binder. Він обробляє \"\n\"як внутрішньопроцесний лічильник посилань на об'єкт сервісного трейту, так і \"\n\"глобальний лічильник посилань Binder, який відстежує, скільки процесів мають \"\n\"посилання на об'єкт.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\"Зверніть увагу, що об'єкт трейта, який клієнт використовує для спілкування з \"\n\"сервісом, використовує той самий трейт, що реалізований на сервері. Для \"\n\"певного інтерфейсу Binder генерується єдиний трейт Rust, який \"\n\"використовується як клієнтом, так і сервером.\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\"Використовуйте той самий ідентифікатор сервісу, який використовувався при \"\n\"реєстрації сервісу. В ідеалі він має бути визначений у спільному крейті, на \"\n\"який можуть покладатися як клієнт, так і сервер.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\"Давайте розширимо API, додавши більше функціональних можливостей: ми хочемо \"\n\"дозволити клієнтам вказувати список рядків для листівки з днем ​​народження:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"У результаті буде оновлено визначення трейту для `IBirthdayService`:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\"Зверніть увагу, що `String[]` у визначенні AIDL перекладається як \"\n\"`&[String]` у Rust, тобто ідіоматичні типи Rust використовуються у \"\n\"згенерованих зв'язках скрізь, де це можливо:\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"Аргументи масиву `in` переводяться у зрізи.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"Аргументи `out` та `inout` транслюються у `&mut Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"Значення, що повертаються, перетворюються на `Vec<T>`.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"Оновлення клієнта та сервісу\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"Оновіть клієнтський та серверний код, щоб врахувати новий API.\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\\\"Habby birfday to yuuuuu\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\\\"А також: багато іншого\\\"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\"TODO: Перемістити фрагменти коду у файли проекту, де вони будуть зібрані?\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"Робота з типами AIDL\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"Типи AIDL транслюються у відповідний ідіоматичний тип Rust:\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"Примітивні типи здебільшого відображаються на ідіоматичні типи Rust.\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"Підтримуються такі типи колекцій, як зрізи, `Vec` та рядкові типи.\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\"Посилання на об'єкти AIDL та дескриптори файлів можуть передаватися між \"\n\"клієнтами та сервісами.\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"Повністю підтримуються дескриптори файлів та посилкові дані.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"Примітивні типи відображаються (здебільшого) ідіоматично:\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"Тип AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Тип Rust\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"Примітка\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"`boolean`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"`i8`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"Зверніть увагу, що байти є знаковими.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"Зверніть увагу на використання `u16`, а не `u32`.\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"`i32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"`long`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"`i64\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"`double\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\"Типи масивів (`T[]`, `byte[]` та `List<T>`) буде переведено до відповідного \"\n\"типу масиву Rust залежно від того, як вони використовуються у сигнатурі \"\n\"функції:\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"Позиція\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"`in` аргумент\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"`out`/`inout` аргумент\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"Повернення\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"`int[3][4]`). In the Java backend, fixed-size arrays are represented as \"\n\"array types.\"\nmsgstr \"\"\n\"В Android 13 і вище підтримуються масиви фіксованого розміру, тобто `T[N]` \"\n\"стає `[T; N]`. Масиви фіксованого розміру можуть мати декілька вимірів \"\n\"(наприклад, `int[3][4]`). У бекенді Java масиви фіксованого розміру \"\n\"представлені як типи масивів.\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"Масиви у посилкових полях завжди перетворюються на `Vec<T>`.\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\"AIDL-об'єкти можна надсилати або як конкретний тип AIDL, або як інтерфейс \"\n\"`IBinder` зі стертим типом:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl_:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"/** Те саме, але з використанням об'єкта-зв'язки. */\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"/** Те саме, але з використанням `IBinder`. */\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\"/// Rust структурна структура, що реалізує інтерфейс \"\n\"`IBirthdayInfoProvider`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\"// Створюємо об'єкт-зв'язувач для інтерфейсу `IBirthdayInfoProvider`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"// Надсилаємо об'єкт-зв'язку до сервісу.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\"// Виконуємо ту саму операцію, але передаємо провайдера як `SpIBinder`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\"Зверніть увагу на використання `BnBirthdayInfoProvider`. Він слугує тій \"\n\"самій меті, що й `BnBirthdayService`, який ми бачили раніше.\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"Binder для Rust підтримує пряме надсилання посилкових данних:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:\"\nmsgstr \"_birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"/** Те саме, але з посилковими даними. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\"Файли можна надсилати між клієнтами/серверами Binder, використовуючи тип \"\n\"`ParcelFileDescriptor`:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"/** Те саме, але завантажує інформацію з файлу. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\"// Відкриваємо файл і записуємо до нього інформацію про день народження.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\\\"/data/local/tmp/birthday.info\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"{name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\\\"{years}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"// Створюємо `ParcelFileDescriptor` з файлу та надсилаємо його.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\"// Перетворюємо дескриптор файлу в `File`. `ParcelFileDescriptor` обертає \\n\"\n\"        // `OwnedFd`, який може бути клонований і потім використаний для \"\n\"створення об'єкту\\n\"\n\"        // `File`.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Неправильний дескриптор файлу\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\"Дескриптор `ParcelFileDescriptor` обгортає `OwnedFd`, тому може бути \"\n\"створений з `File` (або будь-якого іншого типу, який обгортає `OwnedFd`), і \"\n\"може бути використаний для створення нового дескриптора `File` на іншій \"\n\"стороні.\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\"Інші типи дескрипторів файлів можуть бути загорнуті та надіслані, наприклад, \"\n\"TCP, UDP та UNIX-сокети.\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"Тестування  в Android\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\"Спираючись на [Тестування](../testing.md), ми розглянемо, як працюють юніт-\"\n\"тести в AOSP. Використовуйте модуль `rust_test` для ваших модульних тестів:\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libleftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\\\"leftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libleftpad_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\\\"leftpad_test\\\"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_testing/src/lib.rs_:\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Бібліотека лівих відступів.\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Додати `s` зліва до `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"  foo\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foobar\\\"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"Тепер ви можете запустити тест за допомогою\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"Результат має такий вигляд:\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\"Зверніть увагу, що ви згадуєте лише корінь крейта бібліотеки. Тести \"\n\"знаходяться рекурсивно у вкладених модулях.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"Крейт [GoogleTest](https://docs.rs/googletest/) дозволяє створювати гнучкі \"\n\"тестові твердження за допомогою _зрівнювачів_.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"Якщо ми змінимо останній елемент на `\\\"!\\\"`, тест завершиться невдачею зі \"\n\"структурованим повідомленням про помилку, яке точно вказує на помилку:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest не є частиною Rust Playground, тому вам потрібно запустити цей \"\n\"приклад у локальному середовищі. Скористайтеся `cargo add googletest`, щоб \"\n\"швидко додати його до існуючого проекту Cargo.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"У стрічці `use googletest::prelude::*;` імпортується низка [загальновживаних \"\n\"макросів і типів](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust applications\"\n\"\\\"](https://rust-exercises.com/advanced-testing/), a self-guided Rust \"\n\"course: it provides a guided introduction to the library, with exercises to \"\n\"help you get comfortable with `googletest` macros, its matchers and its \"\n\"overall philosophy.\"\nmsgstr \"\"\n\"Це лише поверхневий огляд, є багато вбудованих зрівнювачів. Подумайте про \"\n\"те, щоб прочитати перший розділ [\\\"Поглиблене тестування для прикладних \"\n\"програм на Rust\\\"](https://rust-exercises.com/advanced-testing/), \"\n\"самовчитель з Rust: він надає керований вступ до бібліотеки з вправами, які \"\n\"допоможуть вам освоїтися з макросами `googletest` , його зрівнювачами і його \"\n\"загальною філософією.\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"Особливо приємною особливістю є те, що розбіжності в багаторядкових рядках \"\n\"відображаються у вигляді diff:\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"показує кольорову різницю (кольори тут не показано):\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"Цей крейт - Rust-порт [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"Для імітації широко використовується бібліотека [Mockall](https://docs.rs/\"\n\"mockall/). Вам потрібно рефакторити свій код, щоб використовувати трейти, \"\n\"які потім можна швидко імітувати:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"Mockall - рекомендована бібліотека для створення імітацій в Android (AOSP). \"\n\"На crates.io доступні й інші [бібліотеки для імітації](https://crates.io/\"\n\"keywords/mock), зокрема для імітації HTTP-сервісів. Інші бібліотеки імітацій \"\n\"працюють подібно до Mockall, тобто вони дозволяють легко отримати імітаційну \"\n\"реалізацію заданого трейту.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"Зауважте, що імітація дещо _суперечлива_: імітації дозволяють повністю \"\n\"ізолювати тест від його залежностей. Безпосереднім результатом є швидше і \"\n\"стабільніше виконання тесту. З іншого боку, імітатори можуть бути \"\n\"налаштовані неправильно і повертати результат, відмінний від того, який \"\n\"виводили б реальні залежності.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"Якщо це можливо, рекомендується використовувати реальні залежності. \"\n\"Наприклад, багато баз даних дозволяють налаштовувати бекенд в пам'яті. Це \"\n\"означає, що ви отримаєте правильну поведінку у ваших тестах, до того ж вони \"\n\"швидкі і автоматично прибиратимуть за собою.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"Аналогічно, багато веб-фреймворків дозволяють запускати сервер у процесі \"\n\"роботи, який прив'язується до випадкового порту на `localhost`. Завжди \"\n\"віддавайте перевагу цьому, а не імітаційному фреймворку, оскільки це \"\n\"допоможе вам протестувати ваш код у реальному середовищі.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall не є частиною Rust Playground, тому вам потрібно запустити цей \"\n\"приклад у локальному середовищі. Використовуйте `cargo add mockall` для \"\n\"швидкого додавання Mockall до існуючого проекту Cargo.\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall має набагато більше функціональних можливостей. Зокрема, ви можете \"\n\"встановлювати очікування, які залежать від переданих аргументів. Тут ми \"\n\"використовуємо це, щоб імітувати кота, який зголоднів через 3 години після \"\n\"того, як його востаннє годували:\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"Ви можете використати `.times(n)`, щоб обмежити кількість викликів \"\n\"імітаційного методу до `n` --- імітація автоматично панікує при звільненні, \"\n\"якщо ця умова не виконується.\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"Ви повинні використовувати крейт `log` для автоматичної реєстрації в \"\n\"`logcat` (на пристрої) або `stdout` (на хості):\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Демонстрація журналу Rust.\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Реєструє привітання.\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Запуск програми.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Справи йдуть добре.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Щось пішло не так!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"Створіть, завантажте і запустіть бінарний файл на своєму пристрої:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"Журнали відображаються в `adb logcat`:\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"The logger implementation in `liblogger` is only needed in the final binary, \"\n\"if you're logging from a library you only need the `log` facade crate.\"\nmsgstr \"\"\n\"Реалізація логгера у `liblogger` потрібна лише у фінальній версії, якщо ви \"\n\"логіруєте з бібліотеки, вам знадобиться лише фасадний крейт`log`.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\"Rust чудово підтримує взаємодію з іншими мовами. Це означає, що ви можете:\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"Викликати функції Rust з інших мов.\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"Функції виклику, написані іншими мовами з Rust.\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"Коли ви викликаєте функції з іншої мови, ми говоримо, що ви використовуєте \"\n\"_foreign function interface_, також відомий як FFI.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"Взаємодія з C\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust має повну підтримку зв’язування об’єктних файлів за допомогою угоди про \"\n\"виклики C. Так само ви можете експортувати функції Rust і викликати їх із C.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"Ви можете зробити це вручну, якщо хочете:\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../unsafe-rust/\"\n\"exercise.md).\"\nmsgstr \"\"\n\"Ми вже бачили це у [вправі Safe FFI Wrapper](../../unsafe-rust/exercise.md).\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\"Це передбачає повне знання цільової платформи. Не рекомендується для \"\n\"використання.\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"Далі ми розглянемо кращі варіанти.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"Використання Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"Інструмент [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.\"\n\"html) може автоматично генерувати прив’язки з файлу заголовка C.\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"Спочатку створіть невелику бібліотеку C:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| З днем народженняy %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Вітаємо з %i роками!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"Додайте це до свого файлу `Android.bp`:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\"Створіть файл заголовка оболонки для бібліотеки (у цьому прикладі це не \"\n\"обов’язково):\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"Тепер ви можете автоматично генерувати прив’язки:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"прив'язки\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"Нарешті, ми можемо використовувати прив’язки в нашій програмі Rust:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Демонстрація Bindgen.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: Вказівник, який ми передаємо, є дійсним, оскільки він прийшов з\\n\"\n\"    // Rust посилання, а `name`, яке воно містить, посилається на `name`\\n\"\n\"    // вище, яке також залишається дійсним. `print_card` не зберігає жодного \"\n\"з вказівників, щоб використати\\n\"\n\"    // їх пізніше після повернення.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\"Нарешті, ми можемо запустити автоматично згенеровані тести, щоб \"\n\"переконатися, що прив’язки працюють:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Згенерований файл, пропустити лінтування\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"Виклик Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"Експортувати функції та типи Rust на C легко:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Демонстрація Rust FFI.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"/// Analyze the numbers.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\"/// Аналізуємо цифри.\\n\"\n\"// БЕЗПЕКА: Іншої глобальної функції з таким ім'ям не існує.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) є найменшим!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) ймовірно більше, ніж x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"Тепер ми можемо викликати це з бінарного файлу C:\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[unsafe(no_mangle)]` disables Rust's usual name mangling, so the exported \"\n\"symbol will just be the name of the function. You can also use \"\n\"`#[unsafe(export_name = \\\"some_name\\\")]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[unsafe(no_mangle)]` вимикає звичайне перетворення назв Rust, тому \"\n\"експортований символ буде просто назвою функції. Ви також можете \"\n\"використовувати `#[unsafe(export_name = \\\"some_name\\\")]`, щоб вказати будь-\"\n\"яке ім’я.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"[Крейт CXX](https://cxx.rs/) дає змогу безпечно взаємодіяти між Rust і C++.\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"Загальний підхід виглядає так:\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX покладається на опис сигнатур функцій, які будуть передаватися з однієї \"\n\"мови до іншої. Ви надаєте цей опис за допомогою блоків extern у модулі Rust, \"\n\"анотованому макросом з атрибутом `#[cxx::bridge]`.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Спільні структури з полями, видимими для обох мов.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Типи та сигнатури Rust, що доступні у C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// Типи та сигнатури C++, доступні у Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"Міст зазвичай оголошується у модулі `ffi` у вашому крейті.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"На основі оголошень, зроблених у модулі-містку, CXX згенерує відповідні \"\n\"визначення типів/функцій Rust та C++, щоб зробити ці елементи доступними для \"\n\"обох мов.\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"Щоб переглянути згенерований код Rust, скористайтеся [cargo-expand](https://\"\n\"github.com/dtolnay/cargo-expand) для перегляду розширеного макросу proc. У \"\n\"більшості прикладів ви можете використовувати `cargo expand ::ffi` для \"\n\"розгортання лише модуля `ffi` (хоча це не стосується проектів для Android).\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"Щоб переглянути згенерований C++ код, подивіться у `target/cxxbridge`.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Декларації мосту на мові Rust\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Непрозорий тип\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Метод на `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"// Вільна функція\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\"Елементи, оголошені у посиланнях `extern \\\"Rust\\\"`, які знаходяться в \"\n\"області видимості батьківського модуля.\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"Генератор коду CXX використовує вашу секцію (секції) `extern \\\"Rust\\\"` для \"\n\"створення заголовного файлу C++, що містить відповідні оголошення C++. \"\n\"Створений заголовок має той самий шлях, що і вихідний файл Rust, який \"\n\"містить міст, за винятком розширення файлу .rs.h.\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"В результаті маємо (приблизно) наступний код на C++:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"Декларації мосту на мові C++\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"В результаті отримуємо (приблизно) такий Rust:\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"Програмісту не потрібно обіцяти, що введені ним сигнатури є точними. CXX \"\n\"виконує статичні перевірки того, що сигнатури точно відповідають тому, що \"\n\"оголошено у C++.\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\"Блоки `unsafe extern` дозволяють вам оголошувати функції C++, які безпечно \"\n\"викликати з Rust.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"Підтримуються тільки C-подібні (одиничні) переліки.\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"Для `#[derive()]` на спільних типах підтримується обмежена кількість \"\n\"трейтів. Відповідна функціональність також генерується для C++ коду, \"\n\"наприклад, якщо ви виводите `Hash`, також генерується реалізація `std::hash` \"\n\"для відповідного типу C++.\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"Згенерований Rust\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"Згенерований C++:\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"З боку Rust, код, що генерується для спільних переліків, насправді є \"\n\"структурою, що обгортає числове значення. Це пов'язано з тим, що у C++ це не \"\n\"є UB для класу переліку зберігати значення, відмінне від усіх перелічених \"\n\"варіантів, і наше представлення у Rust повинно мати таку саму поведінку.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 вимагає глибини > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Успіх!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\"Функції Rust, які повертають `Result`, транслюються у виняткові ситуації на \"\n\"стороні C++.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"Виняткова ситуація, яку буде згенеровано, завжди матиме тип `rust::Error`, \"\n\"який, насамперед, надає можливість отримати рядок з повідомленням про \"\n\"помилку. Повідомлення про помилку буде отримано з імплементації `Display` \"\n\"для типу помилки.\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\"Паніка при переході з Rust на C++ завжди призведе до негайного завершення \"\n\"процесу.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Помилка: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"Функції C++, оголошені як такі, що повертають `Result`, перехоплять будь-яке \"\n\"згенероване виключення на стороні C++ і повернуть його у вигляді значення \"\n\"`Err` до викликаючої функції Rust.\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"Якщо виключна ситуація виникає з функції extern \\\"C++\\\", яка не оголошена \"\n\"мостом CXX і повертає `Result`, програма викликає `std::terminate` у C++. \"\n\"Поведінка еквівалентна тій самій виключній ситуації, яка виникає через \"\n\"функцію C++ `noexcept`.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"Тип C++\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\"Ці типи можна використовувати в полях спільних структур, а також в \"\n\"аргументах і поверненнях зовнішніх функцій.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"Зверніть увагу, що `String` у Rust не відображається безпосередньо у `std::\"\n\"string`. На це є декілька причин:\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` не підтримує інваріант UTF-8, якого вимагає `String`.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\"Ці два типи мають різне розташування в пам'яті, тому їх не можна передавати \"\n\"безпосередньо між мовами.\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` вимагає конструктора переміщення, який не відповідає семантиці \"\n\"переміщення Rust, тому `std::string` не може бути переданий за значенням до \"\n\"Rust\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"Збірка в Android\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"Створіть `cc_library_static`, щоб зібрати бібліотеку C++, включаючи \"\n\"згенерований CXX заголовок і вихідний файл.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"Зверніть увагу, що `libcxx_test_bridge_header` і `libcxx_test_bridge_code` є \"\n\"залежностями для CXX-згенерованих зв'язок C++. Ми покажемо, як їх \"\n\"налаштовувати, на наступному слайді.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"Зауважте, що вам також потрібно залежати від бібліотеки `cxx-bridge-header`, \"\n\"щоб отримати загальні визначення CXX.\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"Повну документацію щодо використання CXX в Android можна знайти в \"\n\"[документації для Android](https://source.android.com/docs/setup/build/rust/\"\n\"building-rust-modules/android-rust-patterns#rust-cpp-interop-using-cxx). Ви \"\n\"можете поділитися цим посиланням з класом, щоб студенти знали, де вони \"\n\"можуть знайти ці інструкції у майбутньому.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"Створіть два правила генерування: Одне для створення заголовка CXX, а інше \"\n\"для створення вихідного файлу CXX. Потім їх буде використано як вхідні дані \"\n\"для `cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Згенерує C++ заголовок, що містить C++ прив'язки до\\n\"\n\"// експортованих функцій Rust у lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Згенерує C++ код, до якого звертається Rust.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"Інструмент `cxxbridge` - це окремий інструмент, який генерує C++ частину \"\n\"модуля моста. Він входить до складу Android і доступний як інструмент Soong.\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"За домовленістю, якщо ваш вихідний файл Rust має ім'я `lib.rs`, ваш \"\n\"заголовний файл буде називатися `lib.rs.h`, а вихідний файл буде називатися \"\n\"`lib.rs.cc`. Втім, цей порядок іменування не є обов'язковим.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\"Створіть `rust_binary`, який залежить від `libcxx` і вашої \"\n\"`cc_library_static`.\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"Взаємодія з Java\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java може завантажувати спільні об’єкти через [Java Native Interface (JNI)]\"\n\"(https://en.wikipedia.org/wiki/Java_Native_Interface). Крейт [`jni`](https://\"\n\"docs.rs/jni/) дозволяє створити сумісну бібліотеку.\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"Спочатку ми створюємо функцію Rust для експорту в Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI демонстрація.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"/// HelloWorld::hello method implementation.\\n\"\n\"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"\"\n\"/// Реалізація методу HelloWorld::hello.\\n\"\n\"// БЕЗПЕКА: Не існує іншої глобальної функції з таким іменем.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Привіт, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"Потім ми можемо викликати цю функцію з Java:\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\"Нарешті, ви можете створити, синхронізувати та запустити бінарний файл:\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"Ласкаво просимо до Rust в Chromium\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Rust підтримується для бібліотек сторонніх розробників у Chromium, а також \"\n\"стороннім кодом для з'єднання між Rust та існуючим кодом Chromium C++.\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"Сьогодні ми будемо викликати Rust, щоб зробити дещо безглузде з рядками. \"\n\"Якщо у вас є ділянка коду, де ви показуєте користувачеві рядок у кодуванні \"\n\"UTF8, сміливо використовуйте цей рецепт у вашій частині коду, замість тієї \"\n\"частини, про яку ми говоримо.\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"Переконайтеся, що ви можете зібрати та запустити Chromium. Підійде будь-яка \"\n\"платформа і набір флажків збірки, якщо ваш код відносно свіжий (позиція \"\n\"коміту 1223636 і далі, що відповідає листопаду 2023 року):\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\"(Рекомендується використовувати налагоджувальну збірку компонента для \"\n\"скорочення часу ітерацій. Це збірка за замовчуванням!)\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"Дивіться [Як зібрати Chromium](https://www.chromium.org/developers/how-tos/\"\n\"get-the-code/), якщо ви ще не зробили цього. Зауважте: підготовка до збірки \"\n\"Chromium потребує часу.\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"Також рекомендується, щоб у вас був встановлений код Visual Studio.\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"Про вправи\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"Ця частина курсу складається з серії вправ, які будуються одна на одній. Ми \"\n\"будемо виконувати їх протягом усього курсу, а не лише наприкінці. Якщо ви не \"\n\"встигнете виконати певну частину, не хвилюйтеся: ви зможете надолужити \"\n\"згаяне на наступному занятті.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"Спільнота Rust зазвичай використовує `cargo` та бібліотеки з [crates.io]\"\n\"(https://crates.io/). Chromium збирається за допомогою `gn` і `ninja` та \"\n\"курованого набору залежностей.\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"Коли ви пишете код на Rust, у вас є вибір:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"Використовувати `gn` і `ninja` за допомогою шаблонів з `//build/rust/*.gni` \"\n\"(наприклад, `rust_static_library`, з яким ми познайомимося пізніше). Для \"\n\"цього використовується перевірений інструментарій та крейти Chromium.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"Використовувати `cargo`, але [обмежитися перевіреним інструментарієм та \"\n\"крейтами Chromium](https://chromium.googlesource.com/chromium/src/+/refs/\"\n\"heads/main/docs/rust.md#Using-cargo)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"Використовувати `cargo`, довіряючи [інструментарію](https://rustup.rs/) та/\"\n\"або [крейтам, завантаженим з Інтернету](https://crates.io/).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"Відтепер ми зосередимося на `gn` та `ninja`, тому що саме так код Rust можна \"\n\"вбудувати в браузер Chromium. У той же час, Cargo є важливою частиною \"\n\"екосистеми Rust, і ви повинні мати його у своєму арсеналі інструментів.\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"Міні вправа\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"Розділіться на невеликі групи та:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\"Проведіть мозковий штурм сценаріїв, де `cargo` може дати перевагу, і оцініть \"\n\"профіль ризику цих сценаріїв.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"Обговоріть, яким інструментам, бібліотекам і групам людей варто довіряти при \"\n\"використанні `gn` і `ninja`, офлайнового `cargo` тощо.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"Попросіть студентів не підглядати в нотатки доповідача до завершення вправи. \"\n\"Припускаючи, що учасники курсу фізично знаходяться разом, попросіть їх \"\n\"обговорити питання в малих групах по 3-4 особи.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\"Зауваження/підказки, пов'язані з першою частиною вправи (\\\"сценарії, в яких \"\n\"Cargo може мати перевагу\\\"):\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"Це фантастично, що при написанні інструменту або прототипуванні частини \"\n\"Chromium, ви маєте доступ до багатої екосистеми бібліотек crates.io. Майже \"\n\"для будь-чого є своя бібліотека, і вони, як правило, досить приємні у \"\n\"використанні. (`clap` для розбору командного рядка, `serde` для серіалізації/\"\n\"десеріалізації у/з різні формати, `itertools` для роботи з ітераторами тощо).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"`cargo` дозволяє легко спробувати бібліотеку (просто додайте один рядок до \"\n\"`Cargo.toml` і починайте писати код)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"Можливо, варто порівняти, як CPAN допоміг зробити `perl` популярним вибором. \"\n\"Або порівняти з `python` + `pip`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"Процес розробки полегшують не лише основні інструменти Rust (наприклад, \"\n\"використання `rustup` для перемикання на іншу версію `rustc` при тестуванні \"\n\"крейту, який має працювати на нічних, поточних стабільних та старих \"\n\"стабільних версіях), але й екосистема сторонніх інструментів (наприклад, \"\n\"Mozilla надає `cargo vet` для впорядкування та спільного використання \"\n\"аудитів безпеки; крейт `criterion` надає спрощений спосіб запуску \"\n\"бенчмарків).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"`cargo` спрощує додавання інструмента за допомогою `cargo install --locked \"\n\"cargo-vet`.\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"Можливо, варто порівняти з розширеннями Chrome або VScode.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\"Широкі, загальні приклади проектів, де `cargo` може бути правильним вибором:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"Можливо, це дивно, але Rust стає все більш популярним в індустрії написання \"\n\"інструментів командного інтерфейсу. Широта та ергономічність бібліотек \"\n\"порівнянна з Python, при цьому вона більш надійна (завдяки багатій системі \"\n\"типів) і працює швидше (як скомпільована, а не інтерпретована мова).\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"Для участі в екосистемі Rust потрібно використовувати стандартні інструменти \"\n\"Rust, такі як Cargo. Бібліотекам, які хочуть отримати зовнішні надходження і \"\n\"використовувати їх поза межами Chromium (наприклад, у середовищах збірки \"\n\"Bazel або Android/Soong), ймовірно, варто використовувати Cargo.\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"Приклади проектів, пов'язаних з Chromium, які базуються на `cargo`:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient` ( з ним експериментували в інших частинах Google, що \"\n\"призвело до PRs з покращенням продуктивності)\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"Бібліотеки шрифтів на кшталт `font-types`\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"Інструмент `gnrt` (ми познайомимося з ним пізніше у курсі), який залежить \"\n\"від `clap` для розбору командного рядка і від `toml` для конфігураційних \"\n\"файлів.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"Застереження: єдиною причиною використання `cargo` була недоступність `gn` \"\n\"при збиранні та завантаженні стандартної бібліотеки Rust під час побудови \"\n\"інструментарію Rust.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"У `run_gnrt.py` використовується копія `cargo` та `rustc` у Chromium. `gnrt` \"\n\"залежить від сторонніх бібліотек, завантажених з інтернету, тому `run_gnrt.\"\n\"py` запитує `cargo` про те, що лише `--locked` контент дозволено через \"\n\"`Cargo.lock`.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\"Студенти можуть визначити наступні пункти як такі, що викликають у них явну \"\n\"чи неявну довіру:\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (компілятор Rust), який, у свою чергу, залежить від бібліотек LLVM, \"\n\"компілятор Clang, вихідні коди `rustc` (отримані з GitHub, переглянуті \"\n\"командою компілятора Rust), бінарний компілятор Rust, завантажений для \"\n\"початкової обробки\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup` (варто зазначити, що `rustup` розробляється під егідою організації \"\n\"https://github.com/rust-lang/ - так само, як і `rustc`)\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`, `rustfmt` тощо.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"Різноманітна внутрішня інфраструктура (боти, що збирають `rustc`, система \"\n\"розповсюдження готового інструментарію серед інженерів Chromium тощо).\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"Інструменти Cargo, такі як `cargo audit`, `cargo vet`тощо.\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"Бібліотеки Rust, що постачаються у `//third_party/rust` (перевірено \"\n\"security@chromium.org)\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\"Інші бібліотеки Rust (деякі нішеві, деякі досить популярні та часто \"\n\"застосовуються)\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Політика Chromium щодо Rust\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium поки що не дозволяє сторонній Rust, за винятком рідкісних випадків, \"\n\"схвалених Chromium [Area Tech Leads](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:ATL_OWNERS).\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"Політика Chromium щодо сторонніх бібліотек описана [тут](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#rust) - \"\n\"Rust дозволяється для сторонніх бібліотек за різних обставин, зокрема, якщо \"\n\"вони є найкращим варіантом для продуктивності або безпеки.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"Дуже мало бібліотек Rust безпосередньо надають C/C++ API, а це означає, що \"\n\"майже всі такі бібліотеки потребують невеликої кількості стороннього коду \"\n\"для склеювання.\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Існуючий Chromium :           :  Chromium Rust              Існуючий \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"обгортка\\\"                 \"\n\"крейт           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Межі      : |                | Крейт    |             \"\n\"| :\\n\"\n\": +---------------+ : мови      : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"Код склейки Rust від сторонніх розробників для конкретного стороннього \"\n\"скрипта зазвичай слід зберігати у `third_party/rust/<crate>/<version>/\"\n\"wrapper`.\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"Через це сьогоднішній курс буде значною мірою сфокусований на:\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"Залучення сторонніх бібліотек Rust (\\\"крейтів\\\")\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"Написання коду для використання цих крейтів з Chromium C++.\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\"Якщо ця політика з часом зміниться, курс буде розвиватися, щоб не відставати \"\n\"від неї.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"Правила побудови\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"Код Rust зазвичай збирається за допомогою `cargo`. Chromium збирає за \"\n\"допомогою `gn` та `ninja` для ефективності --- його статичні правила \"\n\"дозволяють максимальний паралелізм. Rust не є винятком.\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"Додавання коду Rust до Chromium\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\"У деякому існуючому файлі Chromium `BUILD.gn` оголосіть \"\n\"`rust_static_library`:\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"Ви також можете додати `deps` на інших цілях Rust. Пізніше ми будемо \"\n\"використовувати це для залежності від стороннього коду.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"Ви маєте вказати _одночасно_ і корінь крейту, _і_ повний список вхідних \"\n\"кодів. `crate_root` - це файл, який передається компілятору Rust, що \"\n\"представляє собою кореневий файл блоку компіляції --- зазвичай це `lib.rs`.  \"\n\"`sources` - це повний список усіх вхідних файлів, який потрібен `ninja` для \"\n\"того, щоб визначити, коли потрібна перезбірка.\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(У Rust не існує такого поняття, як `source_set`, оскільки у Rust одиницею \"\n\"компіляції є цілий крейт. Найменшою одиницею є `static_library`).\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"Студентам може бути цікаво, навіщо нам потрібен шаблон gn, а не використання \"\n\"[вбудованої підтримки статичних бібліотек Rust у gn](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). Відповідь полягає у \"\n\"тому, що цей шаблон надає підтримку взаємодії CXX, функцій Rust та модульних \"\n\"тестів, деякі з яких ми використаємо пізніше.\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"Включаючи `unsafe` код Rust\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"Небезпечний Rust-код заборонено у `rust_static_library` за замовчуванням --- \"\n\"він не буде скомпільований. Якщо вам потрібен небезпечний Rust-код, додайте \"\n\"`allow_unsafe = true` до цілі gn. (Пізніше у курсі ми побачимо обставини, за \"\n\"яких це необхідно).\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"Просто додайте наведену вище ціль до `deps` деякої цілі Chromium C++.\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Типи в Rust коді усуваються, що робить хорошу IDE ще більш корисною, ніж для \"\n\"C++. Код Visual Studio добре працює для Rust у Chromium. Щоб скористатися \"\n\"ним,\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"Переконайтеся, що ваш VSCode має розширення `rust-analyzer`, а не більш \"\n\"ранні форми підтримки Rust\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\"`gn gen out/Debug --export-rust-project` (або еквівалент для вашого \"\n\"вихідного каталогу)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"Демонстрація деяких можливостей rust-analyzer з анотування та дослідження \"\n\"коду може бути корисною, якщо аудиторія скептично ставиться до IDE.\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"Наступні кроки можуть допомогти з демонстрацією (але не соромтеся \"\n\"використовувати частину Rust, пов'язану з Chromium, з якою ви найбільш \"\n\"знайомі):\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"Відкрийте `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"Наведіть курсор на виклик `QrCode::new` (біля рядка 26) у \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"Продемонструйте **show documentation** (типові прив'язки: vscode = ctrl k i; \"\n\"vim/CoC = K).\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"Продемонструйте **go to definition** (типові прив'язки: vscode = F12; vim/\"\n\"CoC = g d). (Звідси ви потрапите на `//third_party/rust/.../qr_code-.../src/\"\n\"lib.rs`.)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"Продемонструйте **outline** і перейдіть до методу `QrCode::with_bits` (біля \"\n\"рядка 164; контур знаходиться на панелі провідника файлів у vscode; типові \"\n\"прив'язки vim/CoC = space o)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quite a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"Продемонструйте **type annotations** (у методі `QrCode::with_bits` наведено \"\n\"декілька гарних прикладів)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"Варто зазначити, що команду `gn gen ... --export-rust-project` потрібно буде \"\n\"виконати повторно після редагування файлів `BUILD.gn` (що ми будемо робити \"\n\"кілька разів під час виконання вправ у цій сесії).\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"Вправа правил побудови\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"У вашій збірці Chromium додайте нову ціль Rust до файлу `//ui/base/BUILD.\"\n\"gn`, що містить:\"\n\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// SAFETY: There is no other global function of this name.\\n\"\nmsgstr \"// БЕЗПЕКА: Не існує іншої глобальної функції з таким іменем.\\n\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**Важливо**: зауважте, що `no_mangle` тут розглядається компілятором Rust як \"\n\"тип небезпеки, тому вам потрібно буде дозволити небезпечний код у вашій цілі \"\n\"`gn`.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"Додайте цю нову ціль Rust як залежність від `//ui/base:base`. Оголосіть цю \"\n\"функцію у верхній частині файлу `ui/base/resource/resource_bundle.cc` \"\n\"(пізніше ми побачимо, як це можна автоматизувати за допомогою інструментів \"\n\"генерації прив'язок):\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"Викличте цю функцію звідкись з `ui/base/resource/resource_bundle.cc` - \"\n\"радимо зверху `ResourceBundle::MaybeMangleLocalizedString`. Зберіть і \"\n\"запустіть Chromium, і переконайтеся, що \\\"Hello from Rust!\\\" виводиться \"\n\"багато разів.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"Якщо ви використовуєте VSCode, налаштуйте Rust для роботи у VSCode. Це стане \"\n\"у нагоді у наступних вправах. Якщо вам це вдалося, ви зможете скористатися \"\n\"командою \\\"Go to definition\\\" правою кнопкою миші на `println!`.\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"Де знайти допомогу\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"Опції, доступні для [`rust_static_library`шаблону gn](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/rust_static_library.gni;\"\n\"l=16)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/\"\n\"reference/abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"Інформація про [`#[unsafe(no_mangle)]`](https://doc.rust-lang.org/beta/\"\n\"reference/abi.html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"Інформація про [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.extern.\"\n\"html)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"Інформація про перемикач [`--export-rust-project`](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#compilation-database) gn\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[Як встановити rust-analyzer у VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"Цей приклад є незвичайним, тому що він зводиться до мови взаємодії з \"\n\"найменшим спільним знаменником - C. І C++, і Rust можуть оголошувати та \"\n\"викликати функції C ABI на мові C. Пізніше у курсі ми підключимо C++ \"\n\"безпосередньо до Rust.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[unsafe(no_mangle)]` might \"\n\"allow Rust to generate two functions with the same name, and Rust can no \"\n\"longer guarantee that the right one is called.\"\nmsgstr \"\"\n\"Тут потрібен `allow_unsafe = true`, оскільки `#[unsafe(no_mangle)]` може \"\n\"дозволити Rust згенерувати дві функції з однаковими іменами, і Rust більше \"\n\"не зможе гарантувати, що буде викликано правильну функцію.\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"Якщо вам потрібен чистий виконуваний файл Rust, ви також можете зробити це \"\n\"за допомогою шаблону gn `rust_executable`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"Учасники спільноти Rust зазвичай пишуть модульні тести у модулі, розміщеному \"\n\"у тому самому вхідному файлі, що й код, який тестується. Це було розглянуто \"\n\"[раніше](../testing.md) у курсі і має такий вигляд:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"У Chromium ми розміщуємо модульні тести в окремому вхідному файлі і \"\n\"продовжуємо дотримуватися цієї практики для Rust --- це робить тести \"\n\"стабільно доступними для виявлення і допомагає уникнути повторної збірки `.\"\n\"rs`-файлів (у конфігурації `test`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"Це призводить до наступних варіантів тестування Rust-коду в Chromium:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"Нативні тести Rust (тобто `#[test]`). Не рекомендується використовувати поза \"\n\"`//third_party/rust`.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"Тести `gtest`, написані на C++, які виконують Rust за допомогою викликів \"\n\"FFI. Достатньо, коли код Rust є лише тонким прошарком FFI, а наявні модульні \"\n\"тести забезпечують достатнє покриття для функції.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"Тести `gtest`, написані на Rust, що використовують крейт який тестується \"\n\"через його публічний API (з використанням `pub mod for_testing { ... }`, \"\n\"якщо потрібно). Це тема наступних кількох слайдів.\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"Зауважте, що нативне Rust-тестування сторонніх крейтів має зрештою \"\n\"здійснюватися ботами Chromium. (Таке тестування потрібне рідко --- лише \"\n\"після додавання або оновлення сторонніх крейтів).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\"Деякі приклади можуть допомогти проілюструвати, коли слід використовувати C+\"\n\"+ `gtest` проти Rust `gtest`:\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR має дуже мало функціональності у сторонньому прошарку Rust (це просто \"\n\"тонкий FFI клей) і тому використовує існуючі модульні тести C++ для \"\n\"тестування як C++, так і Rust-реалізації (параметризуючи тести так, щоб вони \"\n\"вмикали або вимикали Rust за допомогою `ScopedFeatureList`).\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"Гіпотетична/WIP інтеграція з PNG може потребувати безпечної реалізації \"\n\"перетворень пікселів, які надаються `libpng`, але відсутні у крейті `png` - \"\n\"наприклад, RGBA => BGRA, або гамма-корекція. Така функціональність може \"\n\"отримати вигоду від окремих тестів, написаних у Rust.\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"Бібліотека [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/\"\n\"src/+/main/testing/rust_gtest_interop/README.md) надає можливість для:\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\"Використовувати функцію Rust як тестовий приклад `gtest` (використовуючи \"\n\"атрибут `#[gtest(...)]`)\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"Використовувати `expect_eq!` та подібні макроси (подібні до `assert_eq!`, \"\n\"але не панікувати і не завершувати тест, коли твердження не спрацьовує).\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"Приклад:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"Найпростіший спосіб створити тести Rust `gtest` - це додати їх до існуючого \"\n\"тестового бінарного файлу, який вже містить тести, написані на C++. \"\n\"Наприклад:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"Створення тестів Rust в окремій `static_library` також працює, але вимагає \"\n\"ручного оголошення залежності від допоміжних бібліотек:\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"Після додавання `:my_rust_lib` до GN `deps` нам все ще потрібно навчитися \"\n\"імпортувати та використовувати `my_rust_lib` з `my_rust_lib_unittest.rs`. Ми \"\n\"не надали явного `crate_name` для `my_rust_lib`, тому його ім'я буде \"\n\"обчислено на основі повного шляху та імені. На щастя, ми можемо уникнути \"\n\"роботи з такою громіздкою назвою за допомогою макросу `chromium::import!` з \"\n\"автоматично імпортованого крейту `chromium`:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"Під ковдрою макрос розширюється до чогось схожого на це:\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"Додаткову інформацію можна знайти у [коментарі документації](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) макросу `chromium::import`.\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"Бібліотека `rust_static_library` підтримує вказівку явної назви через \"\n\"властивість `crate_name`, але робити це не рекомендується. Не \"\n\"рекомендується, тому що ім'я крейту має бути глобально унікальним. crates.io \"\n\"гарантує унікальність імен своїх крейтів, тому GN цілі `cargo_crate` \"\n\"(створені за допомогою інструменту `gnrt`, описаного в наступному розділі) \"\n\"використовують короткі імена крейтів.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"Тестова вправа\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"Час для наступної вправи!\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"У вашій збірці Chromium:\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"Додайте тестову функцію поруч з `hello_from_rust`. Деякі пропозиції: \"\n\"додавання двох цілих чисел, отриманих як аргументи, обчислення n-го числа \"\n\"Фібоначчі, підсумовування цілих чисел у зрізі тощо.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"Додайте окремий файл `..._unittest.rs` з тестом для нової функції.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"Додайте нові тести до `BUILD.gn`.\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"Побудуйте тести, запустіть їх і перевірте, чи працює новий тест.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"Спільнота Rust пропонує кілька варіантів взаємодії C++/Rust, при цьому \"\n\"постійно розробляються нові інструменти. Наразі у Chromium використовується \"\n\"інструмент під назвою CXX.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"Ви описуєте всю вашу мовну границю мовою визначення інтерфейсів (яка дуже \"\n\"схожа на Rust), а потім інструменти CXX генерують оголошення для функцій і \"\n\"типів як на Rust, так і на C++.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"Перегляньте [підручник з CXX](https://cxx.rs/tutorial.html), щоб отримати \"\n\"повний приклад використання цього.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"Поговоріть про схему. Поясніть, що за лаштунками відбувається те саме, що ви \"\n\"робили раніше. Зазначте, що автоматизація процесу має такі переваги:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"Інструмент гарантує, що сторони C++ та Rust збігаються (наприклад, ви \"\n\"отримаєте помилки компіляції, якщо `#[cxx::bridge]` не збігається з \"\n\"фактичними визначеннями C++ або Rust, а з несинхронізованими ручними \"\n\"прив'язками ви отримаєте Undefined Behavior).\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"Інструмент автоматизує генерацію заглушок FFI (невеликих, C-ABI-сумісних, \"\n\"вільних функцій) для не-C функціоналу (наприклад, увімкнення викликів FFI в \"\n\"методи Rust або C++; ручне прив'язування вимагало б написання таких вільних \"\n\"функцій верхнього рівня вручну).\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\"Інструмент і бібліотека можуть працювати з набором основних типів, наприклад:\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` можна передавати через межу FFI, навіть якщо це не гарантує певного \"\n\"ABI або розміщення пам'яті. При ручному зв'язуванні `std::span<T>` / `&[T]` \"\n\"потрібно вручну деструктурувати і відновити з вказівника і довжини - це може \"\n\"призвести до помилок, оскільки кожна мова представляє порожні зрізи дещо по-\"\n\"різному\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"Розумні вказівники типу `std::unique_ptr<T>`, `std::shared_ptr<T>` та/або \"\n\"`Box` підтримуються за замовчуванням. При ручному прив'язуванні потрібно \"\n\"було б передавати C-ABI-сумісні необроблені вказівники, що збільшило б \"\n\"ризики для тривалості життя та безпеки пам'яті.\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"Типи `rust::String` і `CxxString` розуміють і підтримують відмінності у \"\n\"представленні рядків у різних мовах (наприклад, `rust::String::lossy` може \"\n\"створити рядок Rust із вхідних даних не у форматі UTF8, а `rust::String::\"\n\"c_str` може завершити рядок NUL).\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"CXX вимагає, щоб вся межа C++/Rust була оголошена в модулях `cxx::bridge` у \"\n\"вхідному коді `.rs`.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// Визначення типів та функцій Rust можна знайти тут\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"Вкажіть:\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"Хоча це виглядає як звичайний `mod` у Rust, процедурний макрос `#[cxx::\"\n\"bridge]` робить з ним складні речі. Згенерований код є дещо складнішим - \"\n\"хоча це все одно призведе до появи у вашому коді `mod` з назвою `ffi`.\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Вбудована підтримка `std::unique_ptr` з C++ у Rust\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"Вбудована підтримка зрізів Rust у C++\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"Виклики з C++ на Rust та типи Rust (у верхній частині)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"Виклики з Rust на C++ та типи C++ (у нижній частині)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**Поширена помилка**: _Виглядає_ так, ніби заголовок C++ розбирається \"\n\"Rust'ом, але це оманлива думка. Цей заголовок ніколи не інтерпретується \"\n\"Rust'ом, а просто `#include`d у згенерований C++ код на користь компіляторів \"\n\"C++.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\"Безумовно, найбільш корисною сторінкою при використанні CXX є [довідник \"\n\"типів](https://cxx.rs/bindings.html).\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX принципово підходить для випадків, коли:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\"Ваш інтерфейс Rust-C++ достатньо простий, щоб ви могли оголосити все це.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"Ви використовуєте лише типи, які вже підтримуються CXX, наприклад, `std::\"\n\"unique_ptr`, `std::string`, `&[u8]` тощо.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\"Це має багато обмежень --- наприклад, відсутність підтримки типу `Option` у \"\n\"Rust.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"Ці обмеження обмежують нас у використанні Rust у Chromium лише для добре \"\n\"ізольованих \\\"листових вузлів\\\", а не для довільної взаємодії Rust-C++. \"\n\"Розглядаючи варіанти використання Rust у Chromium, гарною відправною точкою \"\n\"є складання проекту прив'язки CXX для мовної межі, щоб побачити, чи виглядає \"\n\"він достатньо простим.\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\"Ви також повинні обговорити деякі інші проблемні моменти з CXX, наприклад:\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\"Обробка помилок базується на винятках C++ (наведені на наступному слайді)\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"Функціональні покажчики незручні у використанні.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"У CXX [підтримка `Result<T,E>`](https://cxx.rs/binding/result.html) \"\n\"покладається на винятки C++, тому ми не можемо використовувати її у \"\n\"Chromium. Альтернативи:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"Частина `T` у `Result<T, E>` може бути:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"Повернута через вихідні параметри (наприклад, через `&mut T`). Для цього \"\n\"потрібно, щоб `T` можна було передати через межу FFI - наприклад, `T` має \"\n\"бути:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"Примітивний тип (наприклад, `u32` або `usize`)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"Тип, що підтримується `cxx` (наприклад, `UniquePtr<T>`), який має відповідне \"\n\"значення за замовчуванням для використання у випадку невдачі (_на відміну_ \"\n\"від `Box<T>`).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"Збережена на стороні Rust та доступна за посиланням. Це може знадобитися, \"\n\"коли `T` є типом Rust, який не може бути переданий через межу FFI і не може \"\n\"бути збережений у `UniquePtr<T>`.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"Частина `E` у `Result<T, E>` може бути:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\"Повернута як булеве значення (наприклад, `true` означає успіх, а `false` - \"\n\"невдачу)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\"Збереження деталей помилок теоретично можливе, але поки що на практиці воно \"\n\"не було потрібне.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"Обробка помилок CXX: Приклад з QR\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Генератор QR-кодів - це [приклад](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca), де булеве значення \"\n\"використовується для передачі інформації про успіх чи невдачу, і де успішний \"\n\"результат може бути переданий через межу FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"Студентам може бути цікаво дізнатися про семантику виведення `out_qr_size`. \"\n\"Це не розмір вектора, а розмір QR-коду (і слід визнати, що це трохи зайве - \"\n\"це квадратний корінь з розміру вектора).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"Варто звернути увагу на важливість ініціалізації `out_qr_size` перед \"\n\"викликом функції Rust. Створення посилання у Rust, яке вказує на \"\n\"неініціалізовану пам'ять, призводить до Undefined Behavior (на відміну від C+\"\n\"+, де лише акт розіменування такої пам'яті призводить до UB).\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Якщо студенти запитають про `Pin`, поясніть, навіщо він потрібен CXX для \"\n\"змінних посилань на дані C++: відповідь полягає в тому, що дані C++ не можна \"\n\"переміщати, як дані Rust, оскільки вони можуть містити самопосилальні \"\n\"вказівники.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"Обробка помилок CXX: Приклад PNG\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"Прототип декодера PNG ілюструє, що можна зробити, коли успішний результат не \"\n\"може бути переданий через межу FFI:\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\"/// Повертає дружній до FFI еквівалент `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// Зв'язування C++ для типу `crate::png::ResultOfPngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// Зв'язування C++ для типу `crate::png::PngReader`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` та `ResultOfPngReader` є типами Rust --- об'єкти цих типів не \"\n\"можуть перетинати межу FFI без опосередкування `Box<T>`. Ми не можемо мати \"\n\"`out_parameter: &mut PngReader`, оскільки CXX не дозволяє C++ зберігати \"\n\"об'єкти Rust за значенням.\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"Цей приклад ілюструє, що навіть якщо CXX не підтримує довільні узагальнення \"\n\"або шаблони, ми все одно можемо передати їх через межу FFI, вручну \"\n\"спеціалізувавши / мономорфізувавши їх до не узагальненого типу. У прикладі \"\n\"`ResultOfPngReader` є не узагальненим типом, який передається у відповідні \"\n\"методи `Result<T, E>` (наприклад, у `is_err`, `unwrap` та/або `as_mut`).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"Використання cxx у Chromium\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"У Chromium ми визначаємо незалежний `#[cxx::bridge] mod` для кожного \"\n\"листового вузла, де ми хочемо використовувати Rust. Зазвичай у вас буде по \"\n\"одному модулю для кожної `rust_static_library`. Просто додайте\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # список файлів, що містять #[cxx::bridge], не всі вхідні файли\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"до вашої існуючої цілі `rust_static_ibrary` разом з `crate_root` та \"\n\"`sources`.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\"C++ заголовки будуть згенеровані в доцільному місці, тому ви можете просто\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"У `//base` ви знайдете деякі утиліти для перетворення типів Chromium C++ у \"\n\"типи CXX Rust --- наприклад [`SpanToRustSlice`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:base/containers/span_rust.h;l=21).\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\"Студенти можуть запитати --- навіщо нам все ще потрібно `allow_unsafe = \"\n\"true`?\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"Загальна відповідь полягає у тому, що жоден C/C++ код не є \\\"безпечним\\\" за \"\n\"звичайними стандартами Rust. Виклик C/C++ з Rust може призвести до довільних \"\n\"дій з пам'яттю та поставити під загрозу безпеку власних структур даних Rust. \"\n\"Наявність _занадто_ `unsafe` ключових слів у взаємодії C/C++ може погіршити \"\n\"співвідношення сигнал/шум такого ключового слова, що є [суперечливим]\"\n\"(https://steveklabnik.com/writing/the-cxx-debate), але строго кажучи, \"\n\"внесення будь-якого стороннього коду у бінарний файл Rust може спричинити \"\n\"неочікувану поведінку з точки зору Rust'у.\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"Вузька відповідь міститься на діаграмі у верхній частині [цієї сторінки](../\"\n\"interoperability-with-cpp.md) --- за завісою CXX генерує `unsafe` та `extern \"\n\"\\\"C\\\"` функції Rust так само, як ми робили це вручну у попередньому розділі.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"Вправа: Інтероперабельність з C++\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"Частина перша\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"У створений раніше файл Rust додайте `#[cxx::bridge]`, який визначає єдину \"\n\"функцію для виклику з C++ під назвою `hello_from_rust`, яка не отримує \"\n\"параметрів і не повертає жодного значення.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[unsafe(no_mangle)]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"Змініть вашу попередню функцію `hello_from_rust`, видаливши `extern \\\"C\\\"` і \"\n\"`#[unsafe(no_mangle)]`. Тепер це просто стандартна функція Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"Змініть вашу ціль `gn`, щоб створити ці прив'язки.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"У вашому C++ коді видаліть форвардне оголошення `hello_from_rust`. Замість \"\n\"цього додайте згенерований заголовний файл.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"Будуємо і запускаємо!\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"Частина друга\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"Це гарна ідея - трохи погратися з CXX. Це допоможе вам зрозуміти, наскільки \"\n\"гнучким є Rust у Chromium.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"Декілька речей, які варто спробувати:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"Зворотний виклик у C++ з Rust. Вам знадобиться:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"Додатковий заголовний файл, який ви можете `include!` до вашого `cxx::\"\n\"bridge`. Вам потрібно буде оголосити вашу функцію C++ у цьому новому \"\n\"заголовному файлі.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"`unsafe` блок для виклику такої функції, або вкажіть ключове слово `unsafe` \"\n\"у вашому `#[cxx::bridge]` [як описано тут](https://cxx.rs/extern-c++.\"\n\"html#functions-and-member-functions).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.h\"\n\"\\\"`\"\nmsgstr \"\"\n\"Вам також може знадобитися `#include \\\"third_party/rust/cxx/v1/crate/include/\"\n\"cxx.h\\\"`\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"Передати рядок C++ з C++ у Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"Передати в Rust посилання на об'єкт C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Навмисно зробити так, щоб сигнатури функцій Rust не співпадали з `#[cxx::\"\n\"bridge]`, і звикати до помилок, які ви побачите.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"Навмисно зробити так, щоб сигнатури функцій C++ не співпадали з `#[cxx::\"\n\"bridge]`, і звикати до помилок, які ви побачите.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"Передати `std::unique_ptr` деякого типу з C++ у Rust, щоб Rust міг володіти \"\n\"деяким об'єктом C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"Створити об'єкт Rust і передати його в C++ так, щоб C++ володів ним. \"\n\"(Підказка: вам потрібен `Box`).\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"Оголосити деякі методи на типі C++. Викликати їх з Rust.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"Оголосити декілька методів на типі Rust. Викликати їх з C++.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"Частина третя\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"Тепер, коли ви розумієте сильні та слабкі сторони взаємодії CXX, подумайте \"\n\"про пару варіантів використання Rust у Chromium, де інтерфейс був би \"\n\"достатньо простим. Накидайте ескіз того, як ви могли б визначити цей \"\n\"інтерфейс.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"[Довідник `cxx` зв'язувань](https://cxx.rs/bindings.html)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` шаблон gn](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"Ви можете зіткнутися з деякими питаннями:\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"Я бачу проблему з ініціалізацією змінної типу X типом Y, де X і Y є типами \"\n\"функцій. Це пов'язано з тим, що ваша функція C++ не зовсім відповідає \"\n\"оголошенню у вашому `cxx::bridge`.\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"Здається, я можу вільно конвертувати посилання на C++ у посилання на Rust. \"\n\"Чи не загрожує це UB? Для _непрозорих_ типів CXX - ні, тому що вони мають \"\n\"нульовий розмір. Для тривіальних типів CXX так, це _можливо_ спричинити UB, \"\n\"хоча дизайн CXX робить досить складним створення такого прикладу.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Бібліотеки Rust називаються \\\"крейтами\\\" і знаходяться на [crates.io]\"\n\"(https://crates.io). Для крейтів Rust дуже легко залежати один від одного. \"\n\"Так вони і роблять!\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"Власивість\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"Бібліотека C++\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"Крейт Rust\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"Система збірки\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"Багато\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"Послідовна: `Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"Типовий розмір бібліотеки\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"Великий\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"Маленький\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"Транзитивні залежності\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"Небагато\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"Для інженера Chromium це має плюси та мінуси:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"Всі крейти використовують спільну систему збірки, тому ми можемо \"\n\"автоматизувати їхнє включення до Chromium ...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\"... але, як правило, крейти мають транзитивні залежності, тому вам, \"\n\"ймовірно, доведеться залучити декілька бібліотек.\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"Ми обговоримо:\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"Як розмістити крейт у дереві вхідного коду Chromium\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"Як зробити так, щоб `gn` будував правила для нього\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"Як провести аудит його вхідного коду на предмет достатньої безпеки.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"Налаштування файлу `Cargo.toml` для додавання крейтів\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium має єдиний набір централізовано керованих прямих залежностей \"\n\"крейтів. Вони управляються через єдиний [`Cargo.toml`](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/Cargo.toml):\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"Як і для будь-якого іншого `Cargo.toml`, ви можете вказати [більш детальну \"\n\"інформацію про залежності](https://doc.rust-lang.org/cargo/reference/\"\n\"specifying-dependencies.html) --- найчастіше, вам потрібно вказати \"\n\"`features`, які ви хочете увімкнути в крейті.\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"При додаванні крейту до Chromium вам часто потрібно надати додаткову \"\n\"інформацію у додатковому файлі `gnrt_config.tml`, з яким ми познайомимося \"\n\"далі.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"Поряд з `Cargo.toml` знаходиться [`gnrt_config.toml`](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/gnrt_config.toml). Він містить специфічні для Chromium \"\n\"розширення для роботи з крейтами.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\"Якщо ви додаєте новий крейт, ви повинні вказати принаймні `group`. Це одна з \"\n\"них:\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"Наприклад,\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"Залежно від компонування вхідного коду крейту, вам також може знадобитися \"\n\"використовувати цей файл, щоб вказати, де можна знайти його файл(и) \"\n\"`LICENSE`.\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\"Пізніше ми розглянемо деякі інші речі, які вам потрібно буде налаштувати в \"\n\"цьому файлі для вирішення проблем.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"Інструмент під назвою `gnrt` знає, як завантажувати крейти і як генерувати \"\n\"правила `BUILD.gn`.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"Для початку завантажте потрібний вам крейт ось так:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"Хоча інструмент `gnrt` є частиною вхідного коду Chromium, виконуючи цю \"\n\"команду, ви завантажите і запустите його залежності з `crates.io`. Дивіться \"\n\"[попередній розділ](../cargo.md), де описано це рішення з безпеки.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"Ця команда `vendor` може завантажити:\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"Ваш крейт\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"Прямі та транзитивні залежності\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"Нові версії інших крейтів, які вимагаються `cargo` для встановлення повного \"\n\"набору крейтів, необхідних для Chromium.\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium підтримує патчі для деяких крейтів, які зберігаються у `//\"\n\"third_party/rust/chromium_crates_io/patches`. Їх буде повторно застосовано \"\n\"автоматично, але якщо виправлення не вдасться, вам може знадобитися вжити \"\n\"заходів вручну.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\"Після того, як ви завантажили крейт, згенеруйте файли `BUILD.gn`, як \"\n\"показано нижче:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"Тепер запустіть `git status`. Ви повинні знайти:\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"Щонайменше один новий вхідний код скриньки у `third_party/rust/\"\n\"chromium_crates_io/vendor`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"Щонайменше один новий `BUILD.gn` у `third_party/rust/<crate name>/v<major \"\n\"semver version>`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"Відповідний `README.chromium`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"Тут \\\"major semver version\\\" - це [номер версії \\\"semver\\\" Rust ](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\"Уважно подивіться, особливо на те, що генерується в `third_party/rust`.\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"Поговоримо трохи про семантичну версифікацію (semver) --- і, зокрема, про \"\n\"те, як у Chromium вона дозволяє створювати кілька несумісних версій крейту, \"\n\"що не рекомендується, але іноді необхідно в екосистемі Cargo.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"Якщо ваша збірка не вдається, це може бути пов'язано з `build.rs`: \"\n\"програмами, які виконують довільні дії під час збирання. Це принципово \"\n\"суперечить принципам роботи `gn` та `ninja`, які передбачають статичні, \"\n\"детерміновані правила збирання для максимізації паралелізму та \"\n\"повторюваності збірок.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\"Деякі дії `build.rs` підтримуються автоматично, інші потребують втручання:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"ефект скрипту збірки\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"Підтримується нашими шаблонами gn\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"Робота, яка потрібна від вас\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"Перевірка версії rustc для ввімкнення та вимкнення можливостей\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"Так\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"Нічого\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\"Перевірка платформи або процесора для ввімкнення та вимкнення можливостей\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"Генерація коду\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"Так - вкажіть у файлі `gnrt_config.toml`\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"Збірка C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"Немає\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"Залатати навколо\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"Довільні інші дії\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"На щастя, більшість крейтів не містять скриптів збірки, і, на щастя, \"\n\"більшість скриптів збірки виконують лише перші дві дії.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"Якщо `ninja` скаржиться на відсутність файлів, перевірте `build.rs`, чи пише \"\n\"він файли вхідного коду.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"Якщо так, змініть [`gnrt_config.toml`](../configuring-gnrt-config-toml.md), \"\n\"щоб додати `build-script-outputs` до сховища. Якщо це транзитивна \"\n\"залежність, тобто така, від якої код Chromium не повинен безпосередньо \"\n\"залежати, також додайте `allow-first-party-usage=false`. У цьому файлі вже є \"\n\"кілька прикладів:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"Тепер повторно запустіть [`gnrt.py -- gen`](../generating-gn-build-rules.md) \"\n\"для регенерації файлів `BUILD.gn`, щоб повідомити ninja , що саме цей \"\n\"вихідний файл буде використано на наступних кроках збірки.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"Деякі крейти використовують крейт [`cc`](https://crates.io/crates/cc) для \"\n\"збірки та компонування бібліотек C/C++. Інші крейти розбирають C/C++ за \"\n\"допомогою [`bindgen`](https://crates.io/crates/bindgen) у своїх скриптах \"\n\"збірки. Ці дії не підтримуються у контексті Chromium --- наша система збірки \"\n\"gn, ninja та LLVM дуже специфічна у вираженні взаємозв'язків між діями \"\n\"збірки.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"Отже, у вас є наступні варіанти:\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"Уникайте цих крейтів\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"Накладіть патч на крейт.\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"Патчі слід зберігати у `third_party/rust/chromium_crates_io/patches/<crate>` \"\n\"- дивіться, наприклад, [патчі на крейти`cxx`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/patches/\"\n\"cxx/) - і вони будуть автоматично застосовуватися `gnrt` під час кожного \"\n\"оновлення крейту.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"Після того, як ви додали сторонній крейт і згенерували правила збірки, \"\n\"залежність від крейту є простою. Знайдіть ціль `rust_static_library` і \"\n\"додайте `dep` до цілі `:lib` у вашій збірці.\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"А саме,\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":lib\"\n\"\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"Аудит сторонніх крейтів\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"Додавання нових бібліотек підпорядковується стандартним [політикам Chromium]\"\n\"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), але, звісно, також підлягає перевірці безпеки. \"\n\"Оскільки ви можете додати не лише один крейт, але й транзитивні залежності, \"\n\"то може бути багато коду для перевірки. З іншого боку, безпечний код Rust \"\n\"може мати обмежені негативні побічні ефекти. Як ви повинні його перевіряти?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"З часом Chromium планує перейти на процес, заснований навколо [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"Тим часом, для кожного нового доданого крейту ми перевіряємо наступне:\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"Зрозуміти, для чого використовується кожен крейт. Який взаємозв'язок між \"\n\"крейтами? Якщо система збірки для кожного крейту містить `build.rs` або \"\n\"процедурні макроси, з'ясуйвати, для чого вони призначені. Чи сумісні вони зі \"\n\"звичайним способом збирання Chromium?\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"Перевірити, щоб кожен крейт був достатньо добре доглянутий\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"За допомогою `cd third-party/rust/chromium_crates_io; cargo audit` \"\n\"перевірити наявність відомих уразливостей (спочатку потрібно `cargo install \"\n\"cargo-audit`, що за іронією долі передбачає завантаження великої кількості \"\n\"залежностей з інтернету[2](../cargo.md)).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"Переконатися, що будь-який `unsafe` код достатньо підходить для [Правила \"\n\"двох](https://chromium.googlesource.com/chromium/src/+/main/docs/security/\"\n\"rule-of-2.md#unsafe-code-in-safe-languages).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"Перевірити, чи не використовуються API `fs` або `net`\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"Прочитати весь код на достатньому рівні, щоб знайти все, що могло бути \"\n\"вставлено зловмисниками. (Ви не можете реально прагнути до 100% досконалості \"\n\"тут: часто коду просто занадто багато).\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"Це лише рекомендації - попрацюйте з рецензентами з `security@chromium.org`, \"\n\"щоб виробити правильний спосіб отримати впевненість в крейті.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"Включення крейтів у вхідний код Chromium\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` повинен показати:\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"Код крейту в `//third_party/rust/chromium_crates_io`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"Метадані (`BUILD.gn` та `README.chromium`) у `//third_party/rust/<crate>/\"\n\"<version>`\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"Будь ласка, додайте також файл `OWNERS` в останнє місце.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"Все це, разом зі змінами в файлах `Cargo.toml` і `gnrt_config.toml`, слід \"\n\"завантажити в репозиторій Chromium.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**Важливо**: ви повинні використовувати `git add -f`, оскільки інакше файли \"\n\"`.gitignore` можуть бути пропущені.\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"У процесі цього ви можете виявити, що перевірка перед відправкою не \"\n\"спрацьовує через неінклюзивну термінологію. Це пов'язано з тим, що дані \"\n\"крейту Rust, як правило, містять назви гілок git'а, а у багатьох проектах \"\n\"все ще використовується неінклюзивна термінологія. Тож, можливо, вам \"\n\"доведеться запустити:\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"Як ВЛАСНИК будь-якої сторонньої залежності від Chromium, ви [маєте \"\n\"підтримувати її в актуальному стані з будь-якими виправленнями безпеки]\"\n\"(https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#add-owners). Сподіваємося, що незабаром ми \"\n\"автоматизуємо цю процедуру для крейтів Rust, але наразі ви все ще несете \"\n\"відповідальність за це, як і за будь-яку іншу сторонню залежність.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"Додайте [uwuify](https://crates.io/crates/uwuify) до Chromium, вимкнувши \"\n\"[можливості за замовчуванням](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Передбачається, що крейт буде \"\n\"використовуватися при постачанні Chromium, але не буде використовуватися для \"\n\"обробки ненадійних вхідних даних.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(У наступній вправі ми будемо використовувати uwuify з Chromium, але ви \"\n\"можете зробити це прямо зараз, якщо хочете. Або ви можете створити нову ціль \"\n\"[`rust_executable`](https://source.chromium.org/chromium/chromium/src/+/main:\"\n\"build/rust/rust_executable.gni), яка використовує `uwuify`).\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"Студентам потрібно буде завантажити багато транзитивних залежностей.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"Загальна кількість необхідних крейтів:\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"`instant`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`,\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`, та\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"uwuify`.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"Якщо студенти завантажують ще більше, то, ймовірно, вони забули вимкнути \"\n\"можливості за замовчуванням.\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"Дякуємо [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) за цей крейт!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"Збираємо все докупи --- Вправа\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\"У цій вправі ви спробуєте додати абсолютно нову функцію Chromium, об'єднавши \"\n\"все, що ви вже вивчили.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"Коротка доповідь від продуктового менеджменту\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"У віддаленому тропічному лісі виявили спільноту ельфів, які живуть там. \"\n\"Важливо, щоб ми доставили їм Chromium for Pixies якнайшвидше.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\"Вимога полягає в тому, щоб перекласти всі рядки інтерфейсу користувача \"\n\"Chromium на мову ельфів.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"Немає часу чекати на нормальний переклад, але, на щастя, мова ельфів дуже \"\n\"близька до англійської, і, виявляється, є крейт Rust, яка робить переклад.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"Насправді, ви вже [імпортували цей крейт у попередній вправі](https://crates.\"\n\"io/crates/uwuify).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"(Очевидно, що справжні переклади для Chrome вимагають неймовірної \"\n\"ретельності та старанності. Не публікуйте це!)\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"Кроки\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"Змініть `ResourceBundle::MaybeMangleLocalizedString` так, щоб він \"\n\"використовував uwuify для усіх рядків перед відображенням. У цій спеціальній \"\n\"збірці Chromium він має робити це завжди, незалежно від значення параметра \"\n\"`mangle_localized_strings_`.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"Якщо ви зробили все правильно у всіх цих вправах, вітаємо, вам варто було \"\n\"створити Chrome для ельфів!\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 vs UTF8. Студенти повинні знати, що рядки Rust завжди мають кодування \"\n\"UTF8, і, ймовірно, вирішать, що краще зробити перетворення на стороні C++ за \"\n\"допомогою `base::UTF16ToUTF8` і навпаки.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"Якщо студенти вирішать виконати перетворення на стороні Rust, їм потрібно \"\n\"буде розглянути [`String::from_utf16`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#method.from_utf16), обміркувати обробку помилок і \"\n\"визначити, які [CXX-підтримувані типи можуть передавати багато u16s](https://\"\n\"cxx.rs/binding/slice.html).\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"Студенти можуть створити межу між C++ і Rust кількома різними способами, \"\n\"наприклад, приймати і повертати рядки за значенням, або приймати мутабельне \"\n\"посилання на рядок. Якщо використовується мутабільне посилання, CXX, \"\n\"ймовірно, скаже студенту, що потрібно використовувати [`Pin`](https://doc.\"\n\"rust-lang.org/std/pin/). Можливо, вам доведеться пояснити, що робить `Pin`, \"\n\"а потім пояснити, навіщо він потрібен CXX для мутабельних посилань на дані C+\"\n\"+: відповідь полягає у тому, що дані C++ не можна переміщувати, як дані \"\n\"Rust, оскільки вони можуть містити самопосилальні вказівники.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"Ціль C++, що містить `ResourceBundle::MaybeMangleLocalizedString`, повинна \"\n\"залежати від цілі `rust_static_biblioteka`. Студенти, ймовірно, вже зробили \"\n\"це.\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"Ціль `rust_static_library` має залежати від `//third_party/rust/uwuify/v0_2:\"\n\"lib`.\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"Рішення вправ з Chromium можна знайти в [цій серії CLs](https://chromium-\"\n\"review.googlesource.com/c/chromium/src/+/5096560).\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"Ласкаво просимо до Rust на голому залізі\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"Це окремий одноденний курс про Rust на голому залізі, призначений для людей, \"\n\"які знайомі з основами Rust (можливо, після завершення комплексного курсу \"\n\"Rust), а в ідеалі також мають певний досвід програмування на голому залізі \"\n\"якоюсь іншою мовою, такою як C.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"Сьогодні ми поговоримо про Rust на 'голому залізі': запуск коду Rust без \"\n\"операційної системи під нами. Цей розділ буде розділено на кілька частин:\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"Що таке `no_std` Rust?\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"Написання мікропрограм для мікроконтролерів.\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"Написання коду завантажувача/ядра для прикладних процесорів.\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"Кілька корисних крейтів для розробки Rust на голому залізі.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF52833 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"Для частини курсу, присвяченої мікроконтролеру, ми використаємо [BBC micro:\"\n\"bit](https://microbit.org/) v2 як приклад. Це [плата розробки](https://tech.\"\n\"microbit.org/hardware/) на основі мікроконтролера Nordic nRF52833 із деякими \"\n\"світлодіодами та кнопками, акселерометром і компасом, підключеними до I2C, і \"\n\"вбудованим налагоджувачем SWD.\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\"Для початку встановіть деякі інструменти, які нам знадобляться пізніше. У \"\n\"gLinux або Debian:\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\"І надайте користувачам у групі `plugdev` доступ до програматора micro:bit:\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"У MacOS:\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Зрізи, `&str`, `CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`, `Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`, `Debug`, `write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`, `assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` і всі звичайні функції, пов’язані з покажчиками\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` та `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`, `Cow`, `Arc`, `Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`, `CString`, `format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` та решта `fs`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` та решта `io`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`, `OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`, `Child`, `ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`, `sleep` та решта `thread`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`, `Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` залежить від RNG.\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` повторно експортує вміст як `core`, так і `alloc`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"Мінімальна програма `no_std`\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"Це буде скомпільовано в порожній бінарний файл.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\"`std` надає обробник паніки; без нього ми повинні створити свій власний.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"Це також може бути забезпечено іншим крейтом, таким як `panic-halt`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"Залежно від цілі, вам може знадобитися скомпілювати за допомогою `panic = \"\n\"\\\"abort\\\"`, щоб уникнути помилки щодо `eh_personality`.\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"Зверніть увагу, що не існує  `main` або будь-якої іншої точки входу; ви самі \"\n\"визначаєте свою точку входу. Зазвичай це може бути скрипт компонувальника та \"\n\"деякий код збірки, щоб підготувати все до запуску коду Rust.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"Щоб використовувати `alloc`, ви повинні реалізувати [глобальний розподільник \"\n\"(кучі)](https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `HEAP` використовується тільки тут і `entry` викликається тільки \"\n\"один раз.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Дати розподільнику трохи пам'яті для виділення.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Тепер ми можемо робити речі, які вимагають виділення кучі.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\\\"Рядок\\\"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` — це сторонній крейт, який реалізує базовий \"\n\"системний розподільник між друзями. Доступні інші крейти, або ви можете \"\n\"написати свій власний або підключити до наявного розподільника.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"Параметр const у `LockedHeap` - це максимальний порядок розподільника, тобто \"\n\"у цьому випадку він може виділяти області розміром до 2\\\\*\\\\*32 байт.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"Якщо будь-який крейт у вашому дереві залежностей залежить від `alloc`, тоді \"\n\"ви повинні мати точно один глобальний розподільник, визначений у вашому \"\n\"бінарному файлі. Зазвичай це робиться у бінарному крейті верхнього рівня.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"`extern crate panic_halt as _` необхідний для того, щоб переконатися, що \"\n\"буде зв'язано крейт `panic_halt` і ми отримаємо його обробник паніки.\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\"Цей приклад збиратиметься, але не запускатиметься, оскільки він не має точки \"\n\"входу.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"Крейт `cortex_m_rt` містить (серед іншого) обробник скидання для \"\n\"мікроконтролерів Cortex M.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\"Далі ми розглянемо, як отримати доступ до периферійних пристроїв із \"\n\"підвищенням рівня абстракції.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"Макрос `cortex_m_rt::entry` вимагає, щоб функція мала тип `fn() -> !`, \"\n\"оскільки повернення до обробника скидання не має сенсу.\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"Запустіть приклад із `cargo embed --bin minimal`\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"Більшість мікроконтролерів отримують доступ до периферійних пристроїв через \"\n\"відображений в пам’ять IO. Давайте спробуємо включити світлодіод на нашому \"\n\"micro:bit:\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// Периферійна адреса порту GPIO 0\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// Зміщення периферії GPIO\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// Поля PIN_CNF\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Налаштуйте виводи GPIO 0 21 та 28 як push-pull виводи.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: вказівники вказують на дійсні периферійні регістри \\n\"\n\"    // керування, і ніяких псевдонімів не існує.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\"// Встановіть низький рівень на виводі 28 і високий на виводі 21, щоб \"\n\"увімкнути світлодіод.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\"Вивід 21 GPIO 0 підключений до першого стовпчика світлодіодної матриці, а \"\n\"вивід 28 – до першого рядка.\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"Запустіть приклад за допомогою:\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"Крейти периферійного доступу\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) створює здебільшого безпечні \"\n\"оболонки Rust для периферійних пристроїв із відображенням пам’яті з [CMSIS-\"\n\"SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) файлів.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"Файли SVD (System View Description) — це XML-файли, які зазвичай надають \"\n\"постачальники кремнію, які описують карту пам’яті пристрою.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"Вони організовані за периферією, регістром, полем і значенням, з назвами, \"\n\"описами, адресами тощо.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"Файли SVD часто є помилковими та неповними, тому існують різні проекти, які \"\n\"виправляють помилки, додають відсутні деталі та публікують згенеровані \"\n\"крейти.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` надає векторну таблицю, серед іншого.\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"Якщо ви `cargo install cargo-binutils`, ви можете запустити `cargo objdump --\"\n\"bin pac -- -d --no-show-raw-insn`, щоб побачити результуючий бінарний файл.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"Крейти HAL\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"[Крейти HAL](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) для багатьох мікроконтролерів забезпечують оболонки \"\n\"для різних периферійних пристроїв. Зазвичай вони реалізують трейти з \"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal).\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Створити HAL-обгортку для порту GPIO 0\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"`set_low` і `set_high` — це методи трейту `embedded_hal` `OutputPin`.\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"Існують крейти HAL для багатьох пристроїв Cortex-M і RISC-V, включаючи різні \"\n\"мікроконтролери STM32, GD32, nRF, NXP, MSP430, AVR і PIC.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"Крейти для підтримки плат\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\"Крейти для підтримки плат забезпечують додатковий рівень обгортання для \"\n\"конкретної дошки для зручності.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\"У цьому випадку крейти для підтримки плати просто надає корисніші назви та \"\n\"трохи ініціалізації.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\"Крейт також може містити драйвери для деяких вбудованих пристроїв за межами \"\n\"самого мікроконтролера.\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` містить простий драйвер для світлодіодної матриці.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"Шаблон стану типу\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Помилка, переміщено.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Помилка, переміщено.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"Піни не реалізують `Copy` або `Clone`, тому може існувати лише один \"\n\"екземпляр кожного з них. Після того, як пін буде переміщено зі структури \"\n\"порту, ніхто інший не зможе його взяти.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\"Зміна конфігурації піна поглинає старий екземпляр піна, тому ви не можете \"\n\"продовжувати використовувати старий екземпляр після цього.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"Тип значення вказує на стан, у якому воно перебуває: наприклад, у цьому \"\n\"випадку це стан конфігурації піна GPIO. Це кодує машину станів у систему \"\n\"типів і гарантує, що ви не спробуєте використати пін певним чином, не \"\n\"налаштувавши його належним чином. Незаконні переходи станів перехоплюються \"\n\"під час компіляції.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"Ви можете викликати `is_high` на вхідному піні та `set_high` на вихідному \"\n\"піні, але не навпаки.\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"Багато крейтів HAL дотримуються цієї моделі.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\"Крейт [`embedded-hal`](https://crates.io/crates/embedded-hal) надає низку \"\n\"трейтів, що охоплюють поширені периферійні пристрої мікроконтролерів:\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"PWM\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"Таймери затримки\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"Шини та пристрої I2C і SPI\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\"Аналогічні трейти для байтових потоків (наприклад, UART), CAN-шини та ГВЧ \"\n\"(RNGs) і розбиті на [`embedded-io`](https://crates.io/crates/embedded-io), \"\n\"[`embedded-can`](https://crates.io/crates/embedded-can) та [`rand_core`]\"\n\"(https://crates.io/crates/rand_core), відповідно.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\"Інші крейти потім реалізують [драйвери](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) у термінах цих трейтів, наприклад \"\n\"драйверу акселерометра може знадобитися кземпляр пристрою I2C або SPI.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\"Трейти охоплюють використання периферійних пристроїв, але не їх \"\n\"ініціалізацію чи конфігурацію, оскільки ініціалізація та конфігурація, як \"\n\"правило, сильно залежить від платформи.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"Існують реалізації для багатьох мікроконтролерів, а також інших платформ, \"\n\"таких як Linux на Raspberry Pi.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\"Крейт [`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) \"\n\"надає асинхронні версії трейтів.\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\"Крейт [`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) надає \"\n\"інший підхід до неблокуючого вводу/виводу, заснований на крейті [`nb`]\"\n\"(https://crates.io/crates/nb).\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) — це зручний набір інструментів для \"\n\"вбудованого налагодження, як OpenOCD, але краще інтегрований.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"SWD (Serial Wire Debug) і JTAG через CMSIS-DAP, ST-Link і J-Link зонди\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB заглушка та сервер Microsoft DAP (Debug Adapter Protocol)\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Інтеграція Cargo\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed` - це підкоманда cargo для збирання та прошивання двійкових \"\n\"файлів, ведення журналу RTT (Real Time Transfers) та підключення GDB. Вона \"\n\"налаштовується за допомогою файлу `Embed.toml` у каталозі вашого проекту.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) - це \"\n\"стандартний протокол Arm через USB для внутрішньосхемного налагоджувача для \"\n\"доступу до порту CoreSight Debug Access Port різних процесорів Arm Cortex. \"\n\"Це те, що використовує вбудований відладчик на BBC micro:bit.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link — це ряд внутрішньосхемних налагоджувачів від ST Microelectronics, J-\"\n\"Link — це ряд від SEGGER.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\"Порт доступу для налагодження зазвичай являє собою або 5-контактний \"\n\"інтерфейс JTAG, або 2-контактний Serial Wire Debug.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\"probe-rs — це бібліотека, яку ви можете інтегрувати у власні інструменти, \"\n\"якщо хочете.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[Протокол адаптера налагодження Microsoft](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) дозволяє VSCode та іншим IDE налагоджувати код, запущений \"\n\"на будь-якому підтримуваному мікроконтролері.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\"cargo-embed — бінарний файл, створений за допомогою бібліотеки probe-rs.\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (Real Time Transfers) — це механізм передачі даних між хостом \"\n\"налагодження та налагоджуваною цільовою системою через кілька кільцевих \"\n\"буферів.\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"В одному терміналі в `src/bare-metal/microcontrollers/examples/`:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"В іншому терміналі в тому ж каталозі:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"На gLinux або Debian:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"У GDB спробуйте запустити:\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"Інші проекти\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\".\"\nmsgstr \"\\\"Одночасність виконання, керована перериванням у реальному часі\\\".\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue.\"\nmsgstr \"\"\n\"Управління спільними ресурсами, передача повідомлень, планування завдань, \"\n\"черга таймера.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB.\"\nmsgstr \"`async` виконавці з пріоритетами, таймерами, мережею, USB.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support.\"\nmsgstr \"\"\n\"Орієнтована на безпеку RTOS з випереджальним плануванням і підтримкою модуля \"\n\"захисту пам’яті.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC.\"\nmsgstr \"\"\n\"Мікроядерна RTOS від Oxide Computer Company із захистом пам'яті, \"\n\"непривілейованими драйверами, IPC.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust).\"\nmsgstr \"[Прив’язки для FreeRTOS](https://github.com/lobaro/FreeRTOS-rust).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"Деякі платформи мають реалізацію `std`, наприклад [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC можна вважати або RTOS, або фреймворком паралельного виконання.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"Він не містить HAL.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"Він використовує Cortex-M NVIC (вкладений віртуальний контролер переривань) \"\n\"для планування, а не належне ядро.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"Тільки Cortex-M.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\"Google використовує TockOS на мікроконтролері Haven для ключів безпеки Titan.\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\"FreeRTOS здебільшого написаний на C, але є прив’язки Rust для написання \"\n\"програм.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\"Ми прочитаємо напрямок із компаса I2C і запишемо показання до послідовного \"\n\"порту.\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\"Переглянувши вправи, ви можете переглянути надані [рішення](solutions-\"\n\"morning.md).\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"Ми прочитаємо напрямок із компаса I2C і запишемо показання до послідовного \"\n\"порту. Якщо у вас є час, спробуйте ще якось відобразити його на світлодіодах \"\n\"або якось кнопками.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"Підказки:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"Перегляньте документацію для [`lsm303agr`](https://docs.rs/lsm303agr/latest/\"\n\"lsm303agr/) і [`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit /) \"\n\"крейтів, а також [micro:bit hardware](https://tech.microbit.org/hardware/).\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\"Інерційний вимірювальний блок LSM303AGR підключено до внутрішньої шини I2C.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\"TWI — це інша назва I2C, тому головний периферійний пристрій I2C називається \"\n\"TWIM.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::i2c::\"\n\"I2c` trait. The [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"Драйверу LSM303AGR потрібно щось, що реалізує трейт `embedded_hal::i2c::\"\n\"I2c`. Структура [`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) реалізує це.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"У вас є структура [`microbit::Board`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/struct.Board.html) з полями для різних контактів і периферійних \"\n\"пристроїв.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"Ви також можете переглянути [технічну таблицю nRF52833](https://infocenter.\"\n\"nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf), якщо хочете, але це не обов’язково \"\n\"для цієї вправи.\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"Завантажте [шаблон вправи](../../comprehensive-rust-exercises.zip) і \"\n\"знайдіть у каталозі `compass` наступні файли.\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_ (це не потрібно змінювати):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_ (це не потрібно змінювати):\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"_.cargo/config.toml_ (це не потрібно змінювати):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"Перегляньте послідовний вивід у Linux за допомогою:\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"Або в Mac OS щось на зразок (назва пристрою може трохи відрізнятися):\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"Використовуйте Ctrl+A Ctrl+Q, щоб вийти з picocom.\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Ранкова зарядка Bare Metal Rust\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([назад до вправи](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Налаштувати послідовний порт.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Використовувати системний таймер як джерело затримки.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Налаштувати контролер I2C та блок інерційних вимірювань.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Налаштування IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Налаштувати дисплей і таймер.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Готовий.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Зчитати дані компаса і записати їх у послідовний порт.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// Якщо натиснута кнопка A, перейти в наступний режим і короткочасно\\n\"\n\"        // увімкнути всі світлодіоди.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"Прикладні процесори\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"Досі ми говорили про мікроконтролери, такі як серія Arm Cortex-M. Тепер \"\n\"давайте спробуємо написати щось для Cortex-A. Для простоти ми просто \"\n\"працюватимемо з платою QEMU aarch64 ['virt'](https://qemu-project.gitlab.io/\"\n\"qemu/system/arm/virt.html).\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"Загалом кажучи, мікроконтролери не мають MMU або кількох рівнів привілеїв \"\n\"(рівні виключень на центральних процесорах Arm, кільця на x86), тоді як \"\n\"процесори прикладних програм мають.\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU підтримує емуляцію різних машин або моделей плат для кожної \"\n\"архітектури. Плата 'virt' не відповідає жодному конкретному реальному \"\n\"апаратному забезпеченню, а розроблена виключно для віртуальних машин.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\"Перш ніж ми зможемо запускати код Rust, нам потрібно виконати деяку \"\n\"ініціалізацію.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to\\n\"\n\"     * enable MMU and caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then\\n\"\n\"     * invalidate any potentially stale local TLB entries before they\\n\"\n\"     * start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed\\n\"\n\"     * until this has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Завантаження та застосування конфігурації керування пам'яттю, \"\n\"готової\\n\"\n\"     * до ввімкнення MMU та\\n\"\n\"     * кешів.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Скопіювати підтримуваний діапазон PA у TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Перевірити все до завершення цього пункту, а потім зробити недійсними \"\n\"всі\\n\"\n\"     * потенційно застарілі локальні записи TLB до того, як вони почнуть \"\n\"використовуватися.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Налаштувати sctlr_el1 на ввімкнення MMU та кешу і не продовжувати,  \"\n\"доки це\\n\"\n\"     * не буде зроблено.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Вимкнути перехоплення доступу з плаваючою комою в EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Обнуліть секцію bss. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Підготувати стек. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Налаштування вектора виключень. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Виклик коду Rust. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Постійно циклічно чекаємо на переривання. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"Це те саме, що було б для C: ініціалізація стану процесора, обнулення BSS і \"\n\"налаштування покажчика стека.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"BSS (символ початку блоку, з історичних причин) — це частина об’єктного \"\n\"файлу, яка містить статично виділені змінні, які ініціалізуються нулем. Вони \"\n\"пропущені на зображенні, щоб не витрачати місце на зайві нулі. Компілятор \"\n\"припускає, що завантажувач подбає про їх обнулення.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"BSS може бути вже обнулено, залежно від того, як ініціалізовано пам’ять і \"\n\"завантажено зображення, але ми обнуляємо його, щоб бути впевненими.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\"Нам потрібно ввімкнути MMU та кеш перед читанням або записом пам’яті. Якщо \"\n\"ми цього не зробимо:\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"Невирівняні доступи призведуть до помилки. Ми створюємо код Rust для цілі \"\n\"`aarch64-unknown-none`, яка встановлює `+strict-align`, щоб запобігти \"\n\"створенню компілятором невирівняних доступів, тому в цьому випадку це має \"\n\"бути гаразд, але це не обов’язково так загалом.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"Якщо це було запущено у віртуальній машині, це може призвести до проблеми з \"\n\"узгодженістю кешу. Проблема полягає в тому, що віртуальна машина звертається \"\n\"до пам'яті безпосередньо з вимкненим кешем, в той час як хост має кешовані \"\n\"псевдоніми до тієї ж пам'яті. Навіть якщо хост не має явного доступу до \"\n\"пам’яті, спекулятивні доступи можуть призвести до заповнення кешу, а потім \"\n\"зміни з того чи іншого будуть втрачені, коли кеш буде очищено або віртуальна \"\n\"машина ввімкне кеш. (Кеш використовується за фізичною адресою, а не VA чи \"\n\"IPA.)\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"Для спрощення ми просто використовуємо жорстко закодовану таблицю сторінок \"\n\"(дивиться `idmap.S`), яка ідентифікує перший 1 ГіБ адресного простору для \"\n\"пристроїв, наступний 1 ГіБ для DRAM і ще 1 ГіБ вище для інших пристроїв. Це \"\n\"відповідає розміщенню пам'яті, яке використовує QEMU.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\"Ми також встановили вектор виключень (`vbar_el1`), про який ми розповімо \"\n\"більше пізніше.\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"Усі приклади цього дня припускають, що ми будемо працювати на рівні \"\n\"виключення 1 (EL1). Якщо вам потрібно запустити на іншому рівні виключення, \"\n\"вам потрібно буде відповідно змінити `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"Вбудований асемблер\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"Іноді нам потрібно використовувати асемблер для того, щоб робити речі, які \"\n\"неможливо зробити за допомогою коду на Rust. Наприклад, зробити HVC (виклик \"\n\"гіпервізора), щоб сказати прошивці вимкнути систему:\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: тут використовуються тільки оголошені регістри\\n\"\n\"    // і нічого не робиться з пам'яттю.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(Якщо ви справді хочете це зробити, скористайтеся крейтом [`smccc`](https://\"\n\"crates.io/crates/smccc), у якому є оболонки для всіх цих функцій.)\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI — це Arm Power State Coordination Interface, стандартний набір функцій \"\n\"для керування станами живлення системи та CPU, серед іншого. Він \"\n\"реалізований прошивкою EL3 і гіпервізорами на багатьох системах.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"Синтаксис `0 => _` означає ініціалізацію реєстру до 0 перед виконанням \"\n\"вбудованого асемблеру та ігнорування його вмісту після цього. Нам потрібно \"\n\"використовувати `inout`, а не `in`, оскільки виклик потенційно може знищити \"\n\"вміст реєстрів.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[unsafe(no_mangle)]` and `extern \\\"C\\\"` \"\n\"because it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"Ця `main` функція має бути `#[unsafe(no_mangle)]` і `extern \\\"C\\\"`, оскільки \"\n\"вона викликається з нашої точки входу в `entry.S`.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` – це значення регістрів `x0`–`x3`, які традиційно \"\n\"використовуються завантажувачем для передачі таких речей, як покажчик на \"\n\"дерево пристроїв. Відповідно до стандартної угоди про виклики aarch64 (це \"\n\"те, що вказує `extern \\\"C\\\"`), регістри `x0`–`x7` використовуються для \"\n\"перших 8 аргументів, що передаються до функції, тому `entry.S` не потрібно \"\n\"робити нічого особливого, окрім як переконатися, що він не змінює ці \"\n\"регістри.\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Запустіть приклад у QEMU за допомогою `make qemu_psci` в `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"Здійснення непостійного доступу до пам'яті для MMIO\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use [`pointer::read_volatile`](https://doc.rust-lang.org/stable/core/\"\n\"primitive.pointer.html#method.read_volatile) and [`pointer::write_volatile`]\"\n\"(https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.\"\n\"write_volatile).\"\nmsgstr \"\"\n\"Використовуйте [`pointer::read_volatile`](https://doc.rust-lang.org/stable/\"\n\"core/primitive.pointer.html#method.read_volatile) та [`pointer::\"\n\"write_volatile`](https://doc.rust-lang.org/stable/core/primitive.pointer.\"\n\"html#method.write_volatile).\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"Ніколи не тримайте посилання.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use `&raw` to get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\"Використовуйте `&raw` для отримання полів структур без створення проміжного \"\n\"посилання.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"Непостійний доступ: операції читання або запису можуть мати побічні ефекти, \"\n\"тому не дозволяйте компілятору чи апаратному забезпеченню їх \"\n\"перевпорядковувати, дублювати чи видаляти.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"Зазвичай, якщо ви пишете, а потім читаєте, напр. через змінне посилання, \"\n\"компілятор може припустити, що прочитане значення є таким самим, як щойно \"\n\"записане значення, і не турбуватися про фактичне читання пам’яті.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"Деякі існуючі крейти для непостійного доступу до апаратного забезпечення \"\n\"містять посилання, але це нерозумно. Кожного разу, коли існує посилання, \"\n\"компілятор може вирішити розіменувати його.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `&raw` to get struct field pointers from a pointer to the struct.\"\nmsgstr \"\"\n\"Використовуйте `&raw`, щоб отримати покажчики полів структури від покажчика \"\n\"на структуру.\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"For compatibility with old versions of Rust you can use the [`addr_of!`]\"\n\"(https://doc.rust-lang.org/stable/core/ptr/macro.addr_of.html) macro instead.\"\nmsgstr \"\"\n\"Для сумісності зі старими версіями Rust ви можете скористатися замість цього \"\n\"макросом [`addr_of!`](https://doc.rust-lang.org/stable/core/ptr/macro.\"\n\"addr_of.html).\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"Давайте напишемо драйвер UART\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"Машина QEMU 'virt' має [PL011](https://developer.arm.com/documentation/\"\n\"ddi0183/g) UART, тож давайте напишемо для нього драйвер.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Мінімальний драйвер для PL011 UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Створює новий екземпляр драйвера UART для пристрою PL011\\n\"\n\"    /// за заданою базовою адресою.\\n\"\n\"    ///\\n\"\n\"    /// # Безпека\\n\"\n\"    ///\\n\"\n\"    /// Задана базова адреса повинна вказувати на 8 керуючих регістрів MMIO \"\n\"пристрою \\n\"\n\"    /// PL011, які повинні бути відображені в адресному просторі процесу\\n\"\n\"    /// як пам'ять пристрою і не мати ніяких інших псевдонімів.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Записує один байт до UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Чекаємо, поки не звільниться місце в буфері TX.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: ми знаємо, що базова адреса вказує на регістри\\n\"\n\"        // керування пристрою PL011, які відповідним чином відображені.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Записуємо в буфер TX.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Чекаємо, поки UART більше не буде зайнято.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"Зауважте, що `Uart::new` є небезпечним, тоді як інші методи є безпечними. Це \"\n\"пов'язано з тим, що доки викликач `Uart::new` гарантує, що його вимоги \"\n\"безпеки дотримано (тобто, що існує лише один екземпляр драйвера для даного \"\n\"UART, і ніщо інше не змінює його адресний простір), доти безпечно викликати \"\n\"`write_byte` пізніше, оскільки ми можемо припустити, що виконано необхідні \"\n\"передумови.\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"Ми могли б зробити це навпаки (зробити `new` безпечним, але `write_byte` \"\n\"небезпечним), але це було б набагато менш зручно використовувати, оскільки \"\n\"кожне місце, яке викликає `write_byte`, мало б міркувати про безпеку\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"Це загальний шаблон для написання безпечних оболонок небезпечного коду: \"\n\"перенесення тягаря доведення правильності з великої кількості місць на меншу \"\n\"кількість місць.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"Більше трейтів\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\"Ми вивели трейт `Debug`. Також було б корисно реалізувати ще кілька трейтів.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `Uart` містить лише покажчик на пам'ять пристрою, до якого\\n\"\n\"// можна отримати доступ з будь-якого контексту.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"Реалізація `Write` дозволяє використовувати макроси `write!` і `writeln!` з \"\n\"нашим типом `Uart`.\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Запустіть приклад у QEMU за допомогою `make qemu_minimal` у `src/bare-metal/\"\n\"aps/examples`.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"Кращий драйвер UART\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"PL011 насправді має [набагато більше регістрів](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), і додавання \"\n\"зміщень до вказівників для конструювання доступу до них може призвести до \"\n\"помилок, і читається важко. Крім того, деякі з них є бітовими полями, до \"\n\"яких було б добре мати структурований доступ.\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"Зміщення\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"Ім'я регістру\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"Ширина\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"Є також деякі ID регістри, які були пропущені для стислості.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"Крейт [`bitflags`](https://crates.io/crates/bitflags) корисний для роботи з \"\n\"бітовими флагами.\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Прапорці з регістру прапорів UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Очистити для відправки.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Набір даних готовий.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Визначення носія даних.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART зайнятий передачею даних.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// FIFO отримання порожній.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// FIFO передачі заповнено.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// FIFO отримання заповнено.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// FIFO передачі порожній.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Індикатор кільця.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"Макрос `bitflags!` створює новий тип, щось на кшталт `Flags(u16)` разом із \"\n\"купою реалізацій методів для отримання та встановлення прапорів.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"Кілька регістрів\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\"Ми можемо використовувати структуру для представлення розташування пам’яті \"\n\"регістрів UART.\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) каже компілятору розмістити поля структури в потрібному \"\n\"порядку, дотримуючись тих самих правил, що й C. Це необхідно для того, щоб \"\n\"наша структура мала передбачуваний порядок розміщення, оскільки \"\n\"представлення Rust за замовчуванням дозволяє компілятору (між іншим) \"\n\"змінювати порядок полів, як він вважає за потрібне.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\"Тепер давайте використаємо нову структуру `Registers` у нашому драйвері.\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Драйвер для PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: ми знаємо, що self.registers вказує на керуючі\\n\"\n\"        // регістри пристрою PL011, який відповідним чином відображено.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Читає і повертає байт очікування, або `None`, якщо нічого не було\\n\"\n\"    /// отримано.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: ми знаємо, що self.registers вказує на керуючі\\n\"\n\"        // регістри пристрою PL011, який відповідним чином відображено.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Перевірити на наявність помилок у бітах 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `&raw const` / `&raw mut` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"Зверніть увагу на використання `&raw const` / `&raw mut` для отримання \"\n\"вказівників на окремі поля без створення проміжного посилання, що було б \"\n\"нерозумним.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"Використання\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\"Давайте напишемо невелику програму, використовуючи наш драйвер для запису в \"\n\"послідовну консоль і відлуння вхідних байтів.\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Базова адреса основного PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `PL011_BASE_ADDRESS` є базовою адресою пристрою PL011,\\n\"\n\"    // і ніщо інше не має доступу до цього діапазону адресації.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"\\\\n\\\\nBye!\\\"\"\nmsgstr \"\\\"\\\\n\\\\nБувайте!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"Як і у прикладі [вбудована збірка](../inline-assembly.md), ця функція `main` \"\n\"викликається з нашого коду точки входу в `entry.S`. Докладніше дивиться у \"\n\"примітках доповідача.\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"Запустіть приклад у QEMU за допомогою `make qemu` у `src/bare-metal/aps/\"\n\"examples`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"Було б чудово мати можливість використовувати макроси журналювання з крейту \"\n\"[`log`](https://crates.io/crates/log). Ми можемо зробити це, реалізувавши \"\n\"трейт `Log`.\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Ініціалізує логгер UART.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"Розгортання в `log` є безпечним, оскільки ми ініціалізуємо `LOGGER` перед \"\n\"викликом `set_logger`.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"Нам потрібно ініціалізувати логгер перед його використанням.\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\"Зверніть увагу, що наш обробник паніки тепер може реєструвати деталі паніки.\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"Запустіть приклад у QEMU за допомогою `make qemu_logger` у `src/bare-metal/\"\n\"aps/examples`.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 визначає векторну таблицю винятків із 16 записами для 4 типів \"\n\"винятків (синхронний, IRQ, FIQ, SError) із 4 станів (поточний EL із SP0, \"\n\"поточний EL із SPx, нижчий EL із використанням AArch64, нижчий EL із \"\n\"застосуванням AArch32). Ми реалізуємо це в асемблері, щоб зберегти \"\n\"непостійні регістри в стеку перед викликом коду Rust:\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"EL - це рівень винятків; усі наші приклади сьогодні працюють на EL1.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"Для простоти ми не розрізняємо SP0 і SPx для поточних винятків EL або між \"\n\"AArch32 і AArch64 для нижчих винятків EL.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"У цьому прикладі ми просто реєструємо виняток і вимикаємо живлення, оскільки \"\n\"ми не очікуємо, що будь-що з цього станеться.\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"Ми можемо розглядати обробники винятків і наш основний контекст виконання \"\n\"більш-менш як різні потоки. [`Send` і `Sync`](../../concurrency/send-sync.\"\n\"md) керуватимуть тим, чим ми можемо обмінюватися між ними, як і з потоками. \"\n\"Наприклад, якщо ми хочемо поділитися деяким значенням між обробниками \"\n\"винятків та рештою програми, і це `Send`, але не `Sync`, тоді нам потрібно \"\n\"буде загорнути його в щось на зразок `Mutex` і помістити у статику.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\".\"\nmsgstr \"\\\"coreboot без C\\\".\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"Підтримує x86, aarch64 і RISC-V.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\"Покладається на LinuxBoot, замість того, щоб самому мати багато драйверів.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Навчальний посібник Rust з ОС RaspberryPi](https://github.com/rust-embedded/\"\n\"rust-raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables.\"\nmsgstr \"\"\n\"Ініціалізація, драйвер UART, простий завантажувач, JTAG, рівні винятків, \"\n\"обробка винятків, таблиці сторінок.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"Деякі хитрощі щодо обслуговування кешу та ініціалізації в Rust, не \"\n\"обов’язково хороший приклад для копіювання для виробничого коду.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"Статичний аналіз для визначення максимального використання стека.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"Підручник з ОС RaspberryPi запускає код Rust до ввімкнення MMU та кешу. Це \"\n\"дозволить читати та записувати пам’ять (наприклад, стек). Однак:\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"Без MMU та кешу невирівняні доступи призведуть до помилки. Код створюється \"\n\"за допомогою `aarch64-unknown-none`, який встановлює `+strict-align`, щоб \"\n\"запобігти генерації компілятором невирівняних доступів, тому це має бути \"\n\"гаразд, але це не обов’язково так загалом.\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"Якщо код працював у віртуальній машині, це може призвести до проблем \"\n\"узгодженості кешу. Проблема полягає в тому, що віртуальна машина звертається \"\n\"до пам’яті безпосередньо з вимкненою кеш-пам’яттю, тоді як хост має кешовані \"\n\"псевдоніми для тієї самої пам’яті. Навіть якщо хост явно не звертається до \"\n\"пам’яті, спекулятивні доступи можуть призвести до заповнення кешу, і тоді \"\n\"зміни з одного або іншого боку будуть втрачені. Знову ж таки, це нормально в \"\n\"цьому конкретному випадку (працює безпосередньо на апаратному забезпеченні \"\n\"без гіпервізора), але це не дуже гарний шаблон загалом.\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"Корисні крейти\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\"Ми розглянемо кілька крейтів, які вирішують деякі поширені проблеми \"\n\"програмування на голому залізі.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"Крейт [`zerocopy`](https://docs.rs/zerocopy/) (від Fuchsia) надає трейти та \"\n\"макроси для безпечного перетворення між послідовностями байтів та іншими \"\n\"типами.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"Це не підходить для MMIO (оскільки він не використовує непостійні читання та \"\n\"записи), але може бути корисним для роботи зі структурами, спільними з \"\n\"обладнанням, наприклад, з прямим доступом до пам'яті (DMA), або переданими \"\n\"через зовнішній інтерфейс.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` можна реалізувати для типів, для яких дійсний будь-який шаблон \"\n\"байтів, і тому його можна безпечно перетворити з ненадійної послідовності \"\n\"байтів.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"Спроба отримати `FromBytes` для цих типів не вдасться, оскільки \"\n\"`RequestType` не використовує всі можливі значення u32 як дискримінанти, \"\n\"тому не всі шаблони байтів є дійсними.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\"`zerocopy::byteorder` має типи для числових примітивів з урахуванням порядку \"\n\"байтів.\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Запустіть приклад із `cargo run` у `src/bare-metal/useful-crates/zerocopy-\"\n\"example/`. (Він не працюватиме на Rust Playground через залежність від \"\n\"крейту.)\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"Крейт [`aarch64-paging`](https://crates.io/crates/aarch64-paging) дозволяє \"\n\"створювати таблиці сторінок відповідно до архітектури системи віртуальної \"\n\"пам’яті AArch64.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Створити нову таблицю сторінок з відображенням ідентичності.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\"// Відобразити область пам'яті розміром 2 MiB як доступну тільки для \"\n\"читання.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Встановити `TTBR0_EL1` для активації таблиці сторінок.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\"Наразі він підтримує лише EL1, але підтримка інших рівнів винятків має бути \"\n\"легко додана.\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"Це використовується в Android для [прошивки захищеної віртуальної машини]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:packages/\"\n\"modules/Virtualization/pvmfw/).\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"Немає простого способу запустити цей приклад, оскільки він повинен працювати \"\n\"на реальному обладнанні або під керуванням QEMU.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"— це сторонній крейт, який реалізує базовий системний розподільник між \"\n\"друзями. Його можна використовувати як для [`LockedHeap`](https://docs.rs/\"\n\"buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.html), \"\n\"так і для реалізації [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/\"\n\"trait.GlobalAlloc.html), щоб ви могли використовувати стандартний крейт \"\n\"`alloc` (як ми бачили [раніше](../alloc.md)), або для виділення іншого \"\n\"адресного простору. Наприклад, ми можемо захотіти виділити простір MMIO для \"\n\"шин PCI:\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"Шини PCI завжди мають вирівнювання відповідно до їх розміру.\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"Запустіть приклад із `cargo run` у `src/bare-metal/useful-crates/allocator-\"\n\"example/`. (Він не працюватиме на Rust Playground через залежність від \"\n\"крейту.)\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"Іноді вам потрібне щось, розмір якого можна змінити, наприклад `Vec`, але \"\n\"без виділення купи. [`tinyvec`](https://crates.io/crates/tinyvec) надає це: \"\n\"вектор, підкріплений масивом або зрізом, який може бути статично розміщений \"\n\"або в стеку, який відстежує, скільки елементів використовується та впадає в \"\n\"паніку, якщо ви намагаєтеся використати більше, ніж виділено.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\"`tinyvec` вимагає, щоб тип елемента реалізував `Default` для ініціалізації.\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playground містить `tinyvec`, тож цей приклад добре працюватиме \"\n\"вбудовано.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` та інші примітиви синхронізації з `std::sync` недоступні \"\n\"в `core` або `alloc`. Як ми можемо керувати синхронізацією або внутрішньою \"\n\"мутабельністю, наприклад, для обміну станом між різними CPU?\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"Крейт [`spin`](https://crates.io/crates/spin) надає еквіваленти багатьох із \"\n\"цих примітивів на основі спін-блокування.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\"Будьте обережні, щоб уникнути взаємоблокувань, якщо ви використовуєте \"\n\"блокування в обробниках переривань.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` також має реалізацію квиткового м'ютексу блокування; еквіваленти \"\n\"`RwLock`, `Barrier` і `Once` з `std::sync`; і `Lazy` для ледачої \"\n\"ініціалізації.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"Крейт [`once_cell`](https://crates.io/crates/once_cell) також має кілька \"\n\"корисних типів для пізньої ініціалізації з дещо іншим підходом до `spin::\"\n\"once::Once`.\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\"Rust Playground містить `spin`, тож цей приклад добре працюватиме вбудовано.\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"Щоб зібрати бінарник Rust в AOSP для голого заліза, вам потрібно використати \"\n\"правило `rust_ffi_static` Soong для створення коду Rust, потім `cc_binary` \"\n\"зі сценарієм компонування, щоб створити сам бінарний файл, а потім \"\n\"`raw_binary` для перетворення ELF у необроблений бінарний файл, готовий до \"\n\"запуску.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main/\"\n\"libs/libvmbase/) library provides a linker script and useful defaults for \"\n\"the build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"Для віртуальних машин, що працюють під керуванням crosvm на aarch64, \"\n\"бібліотека [vmbase](googlesource.com/platform/packages/modules/\"\n\"Virtualization/+/refs/heads/main/libs/libvmbase/) надає сценарій \"\n\"компонування та корисні параметри за замовчуванням для правил збірки разом \"\n\"із точкою входу, журналювання консолі UART тощо.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\"Макрос `main!` позначає вашу основну функцію, яку потрібно викликати з точки \"\n\"входу `vmbase`.\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"Точка входу `vmbase` обробляє ініціалізацію консолі та видає PSCI_SYSTEM_OFF \"\n\"для завершення роботи віртуальної машини, якщо основна функція повертається.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"Напишемо драйвер для пристрою годин реального часу PL031.\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\"Переглянувши вправи, ви можете переглянути надані [рішення](solutions-\"\n\"afternoon.md).\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"RTC драйвер\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"Віртуальна машина QEMU aarch64 має [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) годинник реального часу за адресою 0x9010000. Для \"\n\"цієї вправи ви повинні написати для неї драйвер.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"Використовуйте його для друку поточного часу на послідовній консолі. Ви \"\n\"можете використовувати крейт [`chrono`](https://crates.io/crates/chrono) для \"\n\"форматування дати/часу.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"Використовуйте регістр збігу та необроблений стан переривання для очікування \"\n\"зайнятості до заданого часу, наприклад 3 секунди в майбутньому. (Викличте \"\n\"[`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/fn.spin_loop.\"\n\"html) усередині циклу.)\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"_Розширення, якщо у вас є час:_ Увімкніть і обробіть переривання, створене \"\n\"збігом RTC. Ви можете використовувати драйвер, наданий у крейті [`arm-gic`]\"\n\"(https://docs.rs/arm-gic/), щоб налаштувати загальний контролер переривань \"\n\"Arm.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\"Використовуйте переривання RTC, яке підключено до GIC як `IntId::spi(2)`.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"Коли переривання ввімкнено, ви можете перевести ядро ​​в режим сну за \"\n\"допомогою `arm_gic::wfi()`, що призведе до того, що ядро ​​буде спати, доки \"\n\"воно не отримає переривання.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"Завантажте [шаблон вправи](../../comprehensive-rust-exercises.zip) і \"\n\"знайдіть у каталозі `rtc` наступні файли.\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\"`src/exceptions.rs` (вам потрібно буде змінити його лише для 3-ї частини \"\n\"вправи):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/logger.rs_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_  (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_ (вам не потрібно це змінювати):\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"Запустіть код у QEMU за допомогою `make qemu`.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rust на голому залізі. Полудень.\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([назад до вправи](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Базові адреси GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Базова адреса PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// IRQ, що використовується PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `GICD_BASE_ADDRESS` і `GICR_BASE_ADDRESS` є базовими\\n\"\n\"    // адресами дистриб'ютора і редистриб'ютора GICv3 відповідно, і ніщо\\n\"\n\"    // інше не має доступу до цих адресних діапазонів.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `PL031_BASE_ADDRESS` є базовою адресою пристрою PL031,\\n\"\n\"    // і ніщо інше не має доступу до цього діапазону адресації.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Чекаємо 3 секунди, без переривань.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Чекаємо на {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Дочекалися\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Чекаємо ще 3 секунди на переривання.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Регістр даних\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Регістр збігів\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Регістр завантаження\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Регістр управління\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Регістр установки або очищення маски переривання\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Необроблений стан переривання\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Маскований статус переривання\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Регістр очищення переривання\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Драйвер для годинника реального часу PL031.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Створює новий екземпляр драйвера RTC для пристрою PL031 за заданою\\n\"\n\"    /// базовою адресою.\\n\"\n\"    ///\\n\"\n\"    /// # Безпека\\n\"\n\"    ///\\n\"\n\"    /// Вказана базова адреса має вказувати на регістри керування MMIO\\n\"\n\"    /// пристрою PL031, які мають бути відображені у адресному просторі \"\n\"процесу\\n\"\n\"    /// як пам'ять пристрою і не мати інших псевдонімів.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Зчитує поточне значення RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: ми знаємо, що self.registers вказує на керуючі\\n\"\n\"        // регістри пристрою PL031, який відповідним чином відображено.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Записує значення збігу. Коли значення RTC збігається з цим, буде\\n\"\n\"    /// згенеровано переривання (якщо його увімкнено).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Повертає, чи відповідає регістр збігу значенню RTC, незалежно від того,\\n\"\n\"    /// увімкнено переривання чи ні.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Повертає, чи є переривання в очікуванні.\\n\"\n\"    ///\\n\"\n\"    /// Це значення має бути істинним тоді і тільки тоді, коли `matched`\\n\"\n\"    /// повертає істину і переривання замасковане.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Встановлює або очищує маску переривання.\\n\"\n\"    ///\\n\"\n\"    /// Якщо маска дорівнює істині, переривання увімкнено; якщо ні - \\n\"\n\"    /// переривання вимкнено.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Очищає очікуване переривання, якщо таке є.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// БЕЗПЕКА: `Rtc` просто містить вказівник на пам'ять пристрою, до якого\\n\"\n\"// можна отримати доступ з будь-якого контексту.\\n\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"Ласкаво просимо до одночасних обчислень у Rust\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\"Rust має повну підтримку паралелізму та одночасних обчислень за допомогою \"\n\"потоків ОС із м’ютексами та каналами.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Система типів у Rust відіграє важливу роль у тому, що дозволяє зробити \"\n\"багато помилок з одночасним виконанням помилками часу компіляції. Це часто \"\n\"називають _безстрашним одночасним виконанням_, оскільки ви можете покластися \"\n\"на компілятор для забезпечення коректності під час виконання.\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Враховуючи 10-хвилинні перерви, ця сесія має тривати близько 3 годин та 20 \"\n\"хвилин. Вона містить:\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\"Rust дозволяє нам отримати доступ до інструментарію одночасності виконнання \"\n\"ОС: потоків, примітивів синхронізації тощо.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\"Система типів дає нам безпеку для одночасного виконання без будь-яких \"\n\"спеціальних функцій.\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\"Ті самі інструменти, які допомагають з \\\"одночасним\\\" доступом в одному \"\n\"потоці (наприклад, викликана функція, яка може змінювати аргумент або \"\n\"зберігати посилання на нього, щоб прочитати пізніше), позбавляють нас від \"\n\"проблем багатопотоковості.\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 30 хвилин. Він містить:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Потоки Rust працюють так само, як і в інших мовах:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Підрахунок в потоці: {i}!\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Головний потік: {i}\\\"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Spawning new threads does not automatically delay program termination at the \"\n\"end of `main`.\"\nmsgstr \"\"\n\"Породження нових потоків не призводить до автоматичної затримки завершення \"\n\"програми в кінці `main`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"Паніка потоків не залежить одна від одної.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Panics can carry a payload, which can be unpacked with [`Any::downcast_ref`]\"\n\"(https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref).\"\nmsgstr \"\"\n\"Паніки можуть нести корисне навантаження, яке можна розпакувати за допомогою \"\n\"[`Any::downcast_ref`](https://doc.rust-lang.org/std/any/trait.Any.\"\n\"html#method.downcast_ref).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"Запустіть приклад.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\"Таймінг 5 мс є достатньо вільним, щоб головний і породжений потоки \"\n\"залишалися переважно в одному ритмі.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\"Зверніть увагу, що програма завершується до того, як породжений потік \"\n\"досягне 10!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because `main` ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\"Це тому, що `main` завершує програму, а породжені потоки не змушують її \"\n\"продовжувати.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to `pthreads`/C++ `std::thread`/`boost::thread` if desired.\"\nmsgstr \"\"\n\"За бажанням можна порівняти з `pthreads`/C++ `std::thread`/`boost::thread`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"Як нам дочекатися завершення породженого потоку?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"повертає `JoinHandle`. Перегляньте документацію.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\"У `JoinHandle` є метод [`.join()`](https://doc.rust-lang.org/std/thread/\"\n\"struct.JoinHandle.html#method.join), який блокує.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"Використовуйте `let handle = thread::spawn(...)`, а потім `handle.join()`, \"\n\"щоб дочекатися завершення потоку і змусити програму дорахувати до 10..\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"А що, якщо ми хочемо повернути значення?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"Перегляньте документацію ще раз:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"Закриття [`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.\"\n\"html) повертає `T`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) повертає `thread::Result<T>`\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"Використовуйте значення `Result`, що повертається з `handle.join()`, щоб \"\n\"отримати доступ до значення, що повертається.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"Гаразд, а як щодо іншого випадку?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"Викликає паніку в потоці. Зауважте, що це не впливає на `main`.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"Дає доступ до корисного навантаження паніки. Це гарний час, щоб поговорити \"\n\"про [`Any`](https://doc.rust-lang.org/std/any/index.html).\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\"Тепер ми можемо повертати значення з потоків! А як щодо отримання вхідних \"\n\"даних?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"Захоплюємо щось за посиланням у закритті потоку.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"Повідомлення про помилку вказує на те, що ми повинні його перемістити.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\"Переміщуємо його, бачимо, що можемо обчислити, а потім повертаємо похідне \"\n\"значення.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"Якщо ми хочемо позичити?\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\"Main вбиває дочірні потоки, коли повертається, але інша функція просто \"\n\"повернеться і залишить їх працювати.\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\"Це буде використання стеку після повернення, що порушує безпеку пам'яті!\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? See next slide.\"\nmsgstr \"Як цього уникнути? Дивіться наступний слайд.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"Звичайні потоки не можуть запозичувати зі свого середовища:\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"Однак для цього можна використовувати [потік із обмеженою областю](https://\"\n\"doc.rust-lang.org/std/thread/fn.scope.html):\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"Причина цього полягає в тому, що коли функція `thread::scope` завершується, \"\n\"усі потоки гарантовано об’єднуються, тому вони можуть повертати запозичені \"\n\"дані.\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"Застосовуються звичайні правила запозичення Rust: ви можете запозичувати або \"\n\"мутабельно одним потоком, або іммутабельно будь-якою кількістю потоків.\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"Цей сегмент повинен зайняти близько 20 хвилин. Він містить:\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a [`Sender<T>`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.Sender.html) and a [`Receiver<T>`](https://doc.rust-lang.\"\n\"org/std/sync/mpsc/struct.Receiver.html). The two parts are connected via the \"\n\"channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Канали Rust мають дві частини: [`Sender<T>`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.Sender.html) і [`Receiver<T>`](https://doc.rust-lang.org/\"\n\"std/sync/mpsc/struct.Receiver.html). Дві частини з’єднані через канал, але \"\n\"ви бачите лише кінцеві точки.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Прийнято: {:?}\\\"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) stands for \"\n\"Multi-Producer, Single-Consumer. `Sender` and `SyncSender` implement `Clone` \"\n\"(so you can make multiple producers) but `Receiver` does not.\"\nmsgstr \"\"\n\"[`mpsc`](https://doc.rust-lang.org/std/sync/mpsc/index.html) означає багато \"\n\"виробників, один споживач (Multi-Producer, Single-Consumer). `Sender` і \"\n\"`SyncSender` реалізують `Clone` (тобто ви можете створити кілька \"\n\"виробників), а `Receiver` — ні.\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.\"\n\"send) and [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv) return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"[`send()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#method.\"\n\"send) і [`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv) повертають `Result`. Якщо вони повертають `Err`, це \"\n\"означає, що відповідний `Sender` або `Receiver` видалено, а канал закрито.\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"\"\n\"You get an unbounded and asynchronous channel with [`mpsc::channel()`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):\"\nmsgstr \"\"\n\"Ви отримуєте необмежений і асинхронний канал за допомогою [`mpsc::channel()`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html):\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Повідомлення {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: надіслано Повідомлення {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: виконано\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Головний: отримав  {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, [`send()`](https://doc.rust-lang.org/\"\n\"std/sync/mpsc/struct.SyncSender.html#method.send) can block the current \"\n\"thread:\"\nmsgstr \"\"\n\"З обмеженими (синхронними) каналами [`send`](https://doc.rust-lang.org/std/\"\n\"sync/mpsc/struct.SyncSender.html#method.send) може блокувати поточний потік:\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send()` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"Виклик `send()` заблокує поточний потік, доки в каналі не залишиться місця \"\n\"для нового повідомлення. Потік може бути заблокований на невизначений \"\n\"термін, якщо ніхто не читає з каналу.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send()` will abort with an error (that is why it returns \"\n\"`Result`) if the channel is closed. A channel is closed when the receiver is \"\n\"dropped.\"\nmsgstr \"\"\n\"Виклик `send()` буде перервано з помилкою (ось чому він повертає `Result`), \"\n\"якщо канал закрито. Канал закривається, коли отримувача видалено.\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls \"\n\"[`recv()`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.\"\n\"html#method.recv).\"\nmsgstr \"\"\n\"Обмежений канал з нульовим розміром називається \\\"каналом зустрічі\\\". Кожне \"\n\"надсилання блокуватиме поточний потік, доки інший потік не викличе [`recv`]\"\n\"(https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv).\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"Send\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"Sync\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\"Як Rust знає, що потрібно заборонити спільний доступ до потоків? Відповідь \"\n\"полягає у двох трейтах:\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): тип `T` є \"\n\"`Send`, якщо безпечно переміщувати `T` через межу потоку.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): тип `T` є \"\n\"`Sync`, якщо безпечно переміщувати `&T` через межу потоку.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\"`Send` та `Sync` є [небезпечними трейтами](../unsafe/unsafe-traits.md). \"\n\"Компілятор автоматично виведе їх для ваших типів, якщо вони містять лише \"\n\"типи `Send` і `Sync`. Ви також можете реалізувати їх вручну, якщо знаєте, що \"\n\"це допустимо.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\"Ці трейти можна розглядати як маркери того, що тип має певні властивості \"\n\"безпеки потоків.\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"Їх можна використовувати в загальних обмеженнях як звичайні трейти.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"Тип `T` є [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html), \"\n\"якщо безпечно переміщати значення `T` в інший потік.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"Наслідком перенесення права власності на інший потік є те, що _деструктори_ \"\n\"будуть виконани в цьому потоці. Отже, питання полягає в тому, коли ви можете \"\n\"виділити значення в одному потоці та звільнити його в іншому.\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\"Як приклад, підключення до бібліотеки SQLite має бути доступне лише з одного \"\n\"потоку.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"Тип `T` є [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html), \"\n\"якщо безпечно отримувати доступ до значення `T` з кількох потоків водночас.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"Точніше, визначення таке:\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`T` є `Sync` тоді і тільки тоді коли `&T` є `Send`\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"Це твердження, по суті, є скороченим способом сказати, що якщо тип є \"\n\"потокобезпечним для спільного використання, також потоково безпечно \"\n\"передавати посилання на нього між потоками.\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"Це пояснюється тим, що якщо тип є Sync, це означає, що він може \"\n\"використовуватися кількома потоками без ризику перегонів даних або інших \"\n\"проблем із синхронізацією, тому його безпечно перемістити в інший потік. \"\n\"Посилання на тип також безпечно перемістити в інший потік, оскільки дані, на \"\n\"які воно посилається, можуть бути безпечно доступні з будь-якого потоку.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"Більшість типів, які ви зустрічаєте, це `Send + Sync`:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"`Arc<T>`: явно потокобезпечний через кількість атомарних посилань.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`: явно потокобезпечний через внутрішнє блокування.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`: Починаючи з 1.72.0.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\"`AtomicBool`, `AtomicU8`, ...: використовує спеціальні атомарні інструкції.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\"Загальні типи, як правило, є `Send + Sync, коли параметри типу є також `Send \"\n\"+ Sync.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"Ці типи можна переміщувати в інші потоки, але вони не є потокобезпечними. \"\n\"Зазвичай через внутрішню мутабільність:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are safe to access (via shared references) from multiple \"\n\"threads, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\"До цих типів можна безпечно отримати доступ (через спільні посилання) з \"\n\"декількох потоків, але їх не можна перемістити в інший потік:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them. However, an already-locked mutex can have its \"\n\"guarded variable read by any thread with which the guard is shared.\"\nmsgstr \"\"\n\"`MutexGuard<T: Sync>`: Використовує примітиви рівня ОС, які мають бути \"\n\"звільнені у потоці, що їх створив. Проте, вже заблокований м'ютекс може мати \"\n\"захищену змінну, яку може читати будь-який потік, з яким розділяється захист.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\"Ці типи є потоконебезпечними і не можуть бути переміщені в інші потоки:\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`: кожен `Rc<T>` має посилання на `RcBox<T>`,  який містить \"\n\"неатомарний лічильник посилань.\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`, `*mut T`: Rust припускає, що необроблені покажчики можуть мати \"\n\"особливі міркування щодо одночасного використання.\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"Arc\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"Mutex\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) дозволяє \"\n\"спільний доступ лише для читання через `Arc::clone`:\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` означає \\\"Atomic Reference Counted\\\", потокобезпечну версію `Rc`, яка \"\n\"використовує атомарні операції.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` реалізує `Clone` незалежно від того, чи `T` реалізує це. Він \"\n\"реалізує `Send` і `Sync` тоді і тільки тоді коли `T` реалізує їх обидва.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` має вартість атомарних операцій, які виконуються, але після \"\n\"цього використання `T` є безкоштовним.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\"Остерігайтеся циклів посилань, `Arc` не використовує збирач сміття для їх \"\n\"виявлення.\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` може допомогти.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability.md)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) \"\n\"забезпечує взаємовиключення _та_ дозволяє мутабельний доступ до `T` за \"\n\"інтерфейсом лише для читання (інша форма [внутрішньої мутабельності](../../\"\n\"borrowing/interior-mutability.md)):\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"Зверніть увагу, що ми маємо [`impl<T: Send> Sync for Mutex<T>`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) \"\n\"загальну реалізацію.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"`Mutex` у Rust виглядає як колекція лише з одним елементом --- захищеними \"\n\"даними.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"Неможливо забути отримати м'ютекс перед доступом до захищених даних.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"Ви можете отримати `&mut T` від `&Mutex<T>`, взявши блокування. `MutexGuard` \"\n\"гарантує, що `&mut T` не переживе утримуване блокування.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` if and only if `T` implements \"\n\"`Send`.\"\nmsgstr \"\"\n\"`Mutex<T>` реалізує як `Send`, так і `Sync` тоді і тільки тоді коли `T` \"\n\"реалізує `Send`.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"Аналог блокування читання-запису: `RwLock`.\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"Чому `lock()` повертає `Result`?\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \\\"poisoned\"\n\"\\\" to signal that the data it protected might be in an inconsistent state. \"\n\"Calling `lock()` on a poisoned mutex fails with a [`PoisonError`](https://\"\n\"doc.rust-lang.org/std/sync/struct.PoisonError.html). You can call \"\n\"`into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"Якщо потік, який утримував `Mutex`, запанікував, `Mutex` стає \\\"отруєним\\\", \"\n\"сигналізуючи про те, що дані, які він захищає, можуть перебувати в \"\n\"неузгодженому стані. Виклик `lock()` для отруєнного м’ютексу зазнає невдачі \"\n\"з [`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.\"\n\"html). Ви можете викликати `into_inner()` для помилки, щоб відновити дані \"\n\"незалежно від цього.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"Давайте подивимося на `Arc` і `Mutex` в дії:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"Можливе рішення:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"Визначні частини:\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\"`v` обертається як в `Arc`, так і в `Mutex`, тому що їхні інтереси \"\n\"ортогональні.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\"Обгортання `Mutex` в `Arc` є загальним шаблоном для обміну змінним станом \"\n\"між потоками.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` потрібно клонувати як `v2`, перш ніж це можна буде перемістити в \"\n\"інший потік. Зверніть увагу, що до сигнатури лямбда було додано `move`.\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\"Блоки вводяться для того, щоб максимально звузити область використання \"\n\"`LockGuard`.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\"Проблема вечері філософів - це класична проблема одночасного виконання:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"П'ятеро філософів вечеряють разом за одним столом. У кожного філософа своє \"\n\"місце за столом. Між кожною тарілкою є виделка. Страва, що подається, являє \"\n\"собою різновид спагетті, яке потрібно їсти двома виделками. Кожен філософ \"\n\"може лише поперемінно мислити і їсти. Крім того, філософ може їсти свої \"\n\"спагетті лише тоді, коли у нього є і ліва, і права виделка. Таким чином, дві \"\n\"виделки будуть доступні лише тоді, коли його найближчі сусіди думають, а не \"\n\"їдять. Після того, як окремий філософ закінчує їсти, він кладе обидві \"\n\"виделки.\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Для цієї вправи вам знадобиться локальний [встановленний Cargo](../../cargo/\"\n\"running-locally.md). Скопіюйте наведений нижче код у файл під назвою `src/\"\n\"main.rs`, заповніть порожні поля та перевірте, чи `cargo run` не блокує:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Еврика! {} має нову ідею!\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Беремо виделки...\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} їсть...\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Сократ\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Гіпатія\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Платоне\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Аристотель\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Піфагор\\\"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Створюємо виделки\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Створюємо філософів\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// Змусимо кожного з них подумати і з'їсти 100 разів\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Вивести свої думки\\n\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"Ви можете використовувати наступний `Cargo.toml`:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"Давайте використаємо наші нові знання, щоб створити багатопотоковий засіб \"\n\"перевірки лінків. Він має початися з веб-сторінки та перевірити, чи лінкі на \"\n\"сторінці дійсні. Він повинен рекурсивно перевіряти інші сторінки в тому \"\n\"самому домені та продовжувати робити це, доки всі сторінки не будуть \"\n\"перевірені.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\"Для цього вам знадобиться HTTP-клієнт, наприклад, [`reqwest`](https://docs.\"\n\"rs/reqwest/). Вам також знадобиться спосіб пошуку лінків, ми можемо \"\n\"використати [`scraper`](https://docs.rs/scraper/). Нарешті, нам знадобиться \"\n\"спосіб обробки помилок, ми скористаємося [`thiserror`](https://docs.rs/\"\n\"thiserror/).\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"Створіть новий проект Cargo та додайте `reqwest` як залежность з:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"Якщо `cargo add` завершується помилкою `error: no such subcommand`, будь \"\n\"ласка, відредагуйте файл `Cargo.toml` вручну. Додайте перелічені нижче \"\n\"залежності.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"Виклики `cargo add` оновлять файл `Cargo.toml` таким чином:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-tls\"\n\"\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-tls\"\n\"\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"Тепер ви можете завантажити стартову сторінку. Спробуйте з невеликим сайтом, \"\n\"наприклад `https://www.google.org/`.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"Ваш файл `src/main.rs` має виглядати приблизно так:\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"помилка запиту: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"погана http відповідь: {0}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Перевіряємо {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"На  {base_url:#}: проігноровано нерозбірливий {href:?}: {err}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Лінкі: {links:#?}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Не вдалося витягти лінки: {err:#}\\\"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"Запустіть код у `src/main.rs` за допомогою\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"Використовуйте потоки для паралельної перевірки лінків: надішліть URL-адреси \"\n\"для перевірки на канал і дозвольте кільком потокам перевіряти URL-адреси \"\n\"паралельно.\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"Розширте це, щоб рекурсивно отримувати лінкі з усіх сторінок домену `www.\"\n\"google.org`. Встановіть верхню межу приблизно в 100 сторінок, щоб вас не \"\n\"заблокував сайт.\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} намагається їсти\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// Щоб уникнути глухого кута, ми повинні порушити симетрію\\n\"\n\"        // десь. Це дозволить поміняти місцями виделки без деініціалізації\\n\"\n\"        // жодної з них.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"Перевірка лінків\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"/// Визначаємо, чи потрібно витягувати лінки на даній сторінці.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Відмітимо дану сторінку як відвідану, повернувши false, якщо вона вже\\n\"\n\"    /// була відвідана.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// Відправника було видалено. Більше команд не надходить.\\n\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Виникла помилка при скануванні: {:#}\\\"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"Неправильні URL-адреси: {:#?}\\\"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"\\\"Async\\\" — це модель одночасного виконання декількох завдань, при якій \"\n\"кожне завдання виконується одночасно доти, доки воно не заблокується, а \"\n\"потім перемикається на інше завдання, яке готове до виконання. Модель \"\n\"дозволяє виконувати більшу кількість завдань на обмеженій кількості потоків. \"\n\"Це пов'язано з тим, що накладні витрати на кожну задачу зазвичай дуже \"\n\"низькі, а операційні системи надають примітиви для ефективного визначення \"\n\"вводу/виводу, який може продовжувати роботу.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"Асинхронна робота Rust базується на \\\"ф'ючерсах\\\", які представляють роботу, \"\n\"яка може бути завершена в майбутньому. Ф'ючерси \\\"опитуються\\\", доки вони не \"\n\"сигналізують, що вони завершені.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\"Ф’ючерси опитуються асинхронним середовищем виконання, і доступно кілька \"\n\"різних середовищ виконання.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python має подібну модель у своєму `asyncio`. Однак його тип `Future` \"\n\"базується на зворотному виклику, а не опитується. Програми на асинхронному \"\n\"Python вимагають \\\"циклу\\\", подібного до середовища виконання в Rust.\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"Тип `Promise` JavaScript подібний, але знову ж таки на основі зворотного \"\n\"виклику. Середовище виконання мови реалізує цикл подій, тому багато деталей \"\n\"вирішення `Promise` приховані.\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"async/await\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"На високому рівні асинхронний код Rust дуже схожий на \\\"звичайний\\\" \"\n\"послідовний код:\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Підрахунок: {i}!\\\"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"Зауважте, що це спрощений приклад для демонстрації синтаксису. У ньому немає \"\n\"тривалої операції чи реального одночасного виконання!\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"Ключове слово \\\"async\\\" - це синтаксичний цукор. Компілятор замінює тип \"\n\"повернення на ф'ючерс.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"Ви не можете зробити `main` асинхронним без додаткових інструкцій для \"\n\"компілятора щодо використання повернутого ф'ючерса.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"Вам потрібен виконавець для запуску асинхронного коду. `block_on` блокує \"\n\"поточний потік, доки наданий ф'ючерс не завершиться.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` асинхронно очікує на завершення іншої операції. На відміну від \"\n\"`block_on`, `.await` не блокує поточний потік.\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\"`.await` можна використовувати тільки всередині функції `async` (або блоку; \"\n\"вони будуть представлені пізніше).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) — це \"\n\"трейт, реалізований об’єктами, які представляють операцію, яка може бути ще \"\n\"не завершеною.  Ф'ючерс можна опитувати, і `poll` повертає [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"Асинхронна функція повертає `impl Future`. Також можливо (але рідко) \"\n\"реалізувати `Future` для ваших власних типів. Наприклад, `JoinHandle`, \"\n\"отриманий від `tokio::spawn`, реалізує `Future`, щоб дозволити приєднання до \"\n\"нього.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"Ключове слово `.await`, застосоване до `Future`, змушує поточну асинхронну \"\n\"функцію призупинятися, доки це `Future` не буде готове, а потім обчислює її \"\n\"вихідні дані.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"Типи `Future` та `Poll` реалізовано саме так, як показано на малюнку; \"\n\"натисніть на лінки, щоб переглянути реалізацію в документації.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"Ми не будемо переходити до `Pin` і `Context`, оскільки ми зосередимося на \"\n\"написанні асинхронного коду, а не на створенні нових асинхронних примітивів. \"\n\"Коротко:\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\"`Context` дозволяє Future запланувати повторне опитування, при настанні \"\n\"певної події.\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` гарантує, що Future не буде переміщено в пам'яті, тому покажчики на \"\n\"цей ф'ючерс залишатимуться дійсними. Це потрібно, щоб дозволити посиланням \"\n\"залишатися дійсними після `.await`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"_Середовище виконанняe_ забезпечує підтримку асинхронного виконання операцій \"\n\"(_реактор_) і відповідає за виконання ф’ючерсів (_виконавець_). Rust не має \"\n\"\\\"вбудованого\\\" середовища виконання, але доступні кілька варіантів:\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/): ефективний, із добре розвиненою екосистемою \"\n\"функціональності, наприклад [Hyper](https://hyper.rs/) для HTTP або [Tonic]\"\n\"(https://github.com/hyperium/tonic) для gRPC.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/): прагне бути \\\"std for async\\\" та включає \"\n\"базове середовище виконання в `async::task`.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/): простий і легкий\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"Кілька великих програм мають власний час виконання. Наприклад, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) вже має один.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"Зверніть увагу, що з перелічених середовищ виконання лише Tokio \"\n\"підтримується на ігровому майданчику Rust. Ігровий майданчик також не \"\n\"дозволяє будь-який ввід-вивід, тому більшість цікавих асинхронних речей не \"\n\"можуть працювати на ігровому майданчику.\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"Ф'ючерси \\\"інертні\\\" в тому, що вони нічого не роблять (навіть не починають \"\n\"операцію вводу-виводу), якщо немає виконавця, який їх опитує. Це \"\n\"відрізняється від, наприклад, JS Promises, які виконуватимуться до кінця, \"\n\"навіть якщо їх ніколи не використовувати.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio надає:\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"Багатопотокове середовище виконання для виконання асинхронного коду.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"Асинхронну версію стандартної бібліотеки.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"Велику екосистему бібліотек.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Підрахунок у завданні: {i}!\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Основне завдання: {i}\\\"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\"За допомогою макросу `tokio::main` ми тепер можемо зробити `main` \"\n\"асинхронною.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"Функція `spawn` створює нове, одночасне \\\"завдання\\\".\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"Примітка: `spawn` приймає `Future`, ви не викликаєте `.await` на `count_to`.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**Подальше дослідження:**\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"Чому `count_to` (зазвичай) не досягає 10? Це приклад асинхронного \"\n\"скасування. `tokio::spawn` повертає дескриптор, який можна чекати, поки він \"\n\"не завершиться.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"Спробуйте `count_to(10).await` замість породження.\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"Спробуйте дочекатися завдання, повернутого з `tokio::spawn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\"У Rust є система завдань, яка є формою полегшеного потокового програмування.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"Завдання має єдиний ф'ючерс верхнього рівня, яке виконавець опитує для \"\n\"прогресу. Цей ф'ючерс може мати один або декілька вкладених ф’ючерсів, які \"\n\"опитує його метод `poll`, що приблизно відповідає стеку викликів. \"\n\"Одночасність виконання у межах завдання можлива за допомогою опитування \"\n\"кількох дочірніх ф’ючерсів, таких як перегони таймера та операції введення/\"\n\"виведення.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"слухаємо на порту {}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"з'єднання з {addr:?}\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Хто ви?\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"помилка сокета\\\"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Дякуємо за дзвінок, {name}!\\\\n\\\"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\"Скопіюйте цей приклад у ваш підготовлений `src/main.rs` і запустіть його \"\n\"звідти.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"Спробуйте підключитися до нього за допомогою TCP-з'єднання, наприклад, [nc]\"\n\"(https://www.unix.com/man-page/linux/1/nc/) або [telnet](https://www.unix.\"\n\"com/man-page/linux/1/telnet/).\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"Попросіть студентів візуалізувати стан сервера прикладу з кількома \"\n\"підключеними клієнтами. Які існують завдання? Які їхні Futures?\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"Це перший раз, коли ми бачимо блок `async`. Це схоже на закриття, але не \"\n\"приймає жодних аргументів.  Він повертає значення Future, подібно до `async \"\n\"fn`.\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\"Перетворіть асинхронний блок у функцію та  покращіть обробку помилок за \"\n\"допомогою `?`.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"Кілька крейтів підтримують асинхронні канали. Наприклад `tokio`:\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Отримано {count} пінгів до цього часу.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler завершено\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Не вдалося надіслати пінг.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Поки що надіслано {} пінгів.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Щось пішло не так у завданні обробника пінгу.\\\"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"Змініть розмір каналу на `3` і подивіться, як це вплине на виконання.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](../channels.md).\"\nmsgstr \"\"\n\"Загалом, інтерфейс подібний до каналів `sync`, які ми бачили в [ранковому \"\n\"класі](../channels.md).\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"Спробуйте видалити виклик `std::mem::drop`. Що сталося? Чому?\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"Крейт [Flume](https://docs.rs/flume/latest/flume/) має канали, які \"\n\"реалізують як `sync`, так і `async` `send` і `recv`. Це може бути зручно для \"\n\"складних програм, що використовують як ввід-вивід, так і важкі процесорні \"\n\"завдання.\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"Що робить роботу з `async` каналами більш кращою, так це можливість \"\n\"комбінувати їх з іншими `future`, щоб об'єднувати їх і створювати складні \"\n\"потоки управління.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"Операція об’єднання очікує, поки весь набір ф’ючерсів буде готовий, і \"\n\"повертає колекцію їхніх результатів. Це схоже на `Promise.all` у JavaScript \"\n\"або `asyncio.gather` у Python.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{page_sizes_dict:?}\\\"\"\nmsgstr \"\\\"{page_sizes_dict:?}\\\"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"Для кількох ф’ючерсів непересічних типів ви можете використовувати `std::\"\n\"future::join!`, але ви повинні знати, скільки ф’ючерсів у вас буде під час \"\n\"компіляції. Наразі це в коейті `futures`, незабаром буде стабілізовано в \"\n\"`std::future`.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"Ризик `join` полягає в тому, що один із ф'ючерсів може ніколи не вирішитися, \"\n\"це призведе до зависання вашої програми.\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"Ви також можете поєднати `join_all` з `join!`, наприклад, щоб об’єднати всі \"\n\"запити до служби http, а також запит до бази даних. Спробуйте додати `tokio::\"\n\"time::sleep` до ф'ючерсу, використовуючи `futures::join!`. Це не тайм-аут \"\n\"(який вимагає `select!`, пояснюється в наступному розділі), але демонструє \"\n\"`join!`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"Операція select очікує, поки будь-який із набору ф’ючерсів буде готовий, і \"\n\"відповідає на результат цього ф’ючерсу. У JavaScript це схоже на `Promise.\"\n\"race`. У Python це порівнюється з `asyncio.wait(task_set, \"\n\"return_when=asyncio.FIRST_COMPLETED)`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"Подібно до оператора порівняння, тіло `select!` має кілька гілок, кожен з \"\n\"яких має вигляд `pattern = future => statement`. Коли `future` готовий, його \"\n\"значення, що повертається, деструктурується за допомогою `pattern`. Потім \"\n\"виконується `statement` з отриманими змінними. Результат `statement` стає \"\n\"результатом макросу `select!`.\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"got: {msg}\\\"\"\nmsgstr \"\\\"отримав: {msg}\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"timeout\\\"\"\nmsgstr \"\\\"тайм-аут\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send greeting\\\"\"\nmsgstr \"\\\"Не вдалося надіслати привітання.\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Listener failed\\\"\"\nmsgstr \"\\\"Listener зазнав невдачі\\\"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"The `listener` async block here is a common form: wait for some async event, \"\n\"or for a timeout. Change the `sleep` to sleep longer to see it fail. Why \"\n\"does the `send` also fail in this situation?\"\nmsgstr \"\"\n\"Блок асинхронізації `listener` тут є звичайною формою: очікування деякої \"\n\"асинхронної події або таймауту. Змініть `sleep` на довший час, щоб побачити, \"\n\"що він не спрацює. Чому в цій ситуації також не спрацьовує `send`?\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"`select!` is also often used in a loop in \\\"actor\\\" architectures, where a \"\n\"task reacts to events in a loop. That has some pitfalls, which will be \"\n\"discussed in the next segment.\"\nmsgstr \"\"\n\"Команда `select!` також часто використовується у циклі в \\\"actor\\\" \"\n\"архітектурах, де завдання реагує на події у циклі. Це має деякі підводні \"\n\"камені, які буде обговорено у наступному розділі.\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\"Async / await забезпечує зручну та ефективну абстракцію для асинхронного \"\n\"програмування з одночасним виконанням. Однак, модель async/await у Rust \"\n\"також має свої підводні камені та пастки. Ми проілюструємо деякі з них у \"\n\"цьому розділі.\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"Pin\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"Блокування виконавця\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"Більшість асинхронних середовищ виконання дозволяють лише одночасний запуск \"\n\"завдань вводу/виводу. Це означає, що завдання, що блокують процесор, \"\n\"блокуватимуть виконавця та запобігатимуть виконанню інших завдань. Простим \"\n\"обхідним шляхом є використання еквівалентних асинхронних методів, де це \"\n\"можливо.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"ф'ючерс {id} спав протягом {duration_ms}ms, закінчив після {}ms\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\"Запустіть код і подивіться, що засинання відбуваються послідовно, а не \"\n\"одночасно.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"Варіант `\\\"current_thread\\\"` поміщає всі завдання в один потік. Це робить \"\n\"ефект більш очевидним, але помилка все ще присутня в багатопоточному \"\n\"варіанті.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\"Переключіть `std::thread::sleep` на `tokio::time::sleep` і дочекайтеся \"\n\"результату.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"Іншим виправленням було б `tokio::task::spawn_blocking`, який породжує \"\n\"фактичний потік і перетворює його дескриптор у ф'ючерс, не блокуючи \"\n\"виконавця.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"Ви не повинні думати про завдання як про потоки ОС. Вони не відображаються 1 \"\n\"до 1, і більшість виконавців дозволять виконувати багато завдань в одному \"\n\"потоці ОС. Це особливо проблематично під час взаємодії з іншими бібліотеками \"\n\"через FFI, де ця бібліотека може залежати від локального сховища потоку або \"\n\"зіставлятися з певними потоками ОС (наприклад, CUDA). У таких ситуаціях \"\n\"віддайте перевагу `tokio::task::spawn_blocking`.\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"Обережно використовуйте м’ютекси синхронізації. Утримування м'ютексу над `.\"\n\"await` може призвести до блокування іншого завдання, яке може виконуватися в \"\n\"тому самому потоці.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"Асинхронні блоки та функції повертають типи, що реалізують трейт `Future`. \"\n\"Тип, що повертається, є результатом трансформації компілятора, який \"\n\"перетворює локальні змінні на дані, що зберігаються у ф'ючерсі.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"Деякі з цих змінних можуть містити вказівники на інші локальні змінні. Через \"\n\"це ф'ючерс ніколи не слід переміщувати в іншу комірку пам'яті, оскільки це \"\n\"зробить ці вказівники недійсними.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"Щоб запобігти переміщенню ф'ючерсного типу у пам'яті, його можна опитувати \"\n\"лише через закріплений вказівник. Закріплення - це обгортка навколо \"\n\"посилання, яка забороняє всі операції, що можуть перемістити екземпляр, на \"\n\"який воно вказує, в іншу ділянку пам'яті.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// Робочий елемент. У цьому випадку просто заснути на заданий час і\\n\"\n\"// відповісти повідомленням на каналі `respond_on`.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// Робочий, який чекає на роботу у черзі та виконує її.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Вдається, що працює.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"не вдалося надіслати відповідь\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: виводити кількість ітерацій кожні 100 мс\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\"// Запитувач, який надсилає запит на виконання роботи і чекає на її \"\n\"завершення.\\n\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"не вдалося відправити в робочу чергу\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"не вдалося дочекатися відповіді\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"результат роботи для ітерації {i}: {resp}\\\"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\"Ви можете розпізнати це як приклад шаблону актора. Актори зазвичай \"\n\"викликають `select!` у циклі.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"Це є підсумком кількох попередніх уроків, тож не поспішайте з цим.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"Наївно додайте `_ = sleep(Duration::from_millis(100)) => { println!(..) }` \"\n\"до `select!`. Це ніколи не буде виконано. Чому?\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\"Замість цього додайте `timeout_fut`, що містить цей ф'юсчерс за межами \"\n\"`loop`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"Це все ще не працює. Слідкуйте за помилками компілятора, додавши `&mut` до \"\n\"`timeout_fut` у `select!`, щоб обійти переміщення, а потім використовуючи \"\n\"`Box::pin`:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires:\"\nmsgstr \"\"\n\"Це компілюється, але після закінчення часу очікування на кожній ітерації \"\n\"відображається `Poll::Ready` (злитий ф'ючерс міг би допомогти в цьому). \"\n\"Оновіть, щоб скидати `timeout_fut` кожного разу, коли він спливає:\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box виділяє у купі. У деяких випадках, `std::pin::pin!` (лише нещодавно \"\n\"стабілізовано, у старому коді часто використовується `tokio::pin!`) також є \"\n\"варіантом, але його важко використовувати для фьючерсів, які перепризначено.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"Інша альтернатива — взагалі не використовувати `pin`, а створювати інше \"\n\"завдання, яке буде надсилати на канал `oneshot` кожні 100 мс.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"Дані, які містять вказівники на себе, називаються самопосилальними. \"\n\"Зазвичай, перевірка запозичень у Rust запобігає переміщенню самопосилань, \"\n\"оскільки посилання не можуть пережити дані, на які вони вказують. Однак, \"\n\"перетворення коду для асинхронних блоків і функцій не перевіряється \"\n\"перевіркою запозичень.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` - це обгортка навколо вказівника. Об'єкт не можна перемістити з його \"\n\"місця за допомогою закріпленого вказівника. Однак, його можна переміщати за \"\n\"допомогою незакріпленого вказівника.\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"Метод `poll` трейту `Future` використовує `Pin<&mut Self>` замість `&mut \"\n\"Self` для посилання на екземпляр. Тому його можна викликати лише на \"\n\"закріпленому покажчику.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized in the 1.75 release. This \"\n\"required support for using return-position `impl Trait` in traits, as the \"\n\"desugaring for `async fn` includes `-> impl Future<Output = ...>`.\"\nmsgstr \"\"\n\"Асинхронні методи у трейтах було стабілізовано у випуску 1.75. Це вимагало \"\n\"підтримки використання `impl Trait` з позицією повернення у трейтах, \"\n\"оскільки десигнування для `async fn` включає `-> impl Future<Output = ...>`.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support, there are some pitfalls around `async \"\n\"fn`:\"\nmsgstr \"\"\n\"Однак, навіть з нативною підтримкою, існують деякі підводні камені навколо \"\n\"`async fn`:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position `impl Trait` captures all in-scope lifetimes (so some \"\n\"patterns of borrowing cannot be expressed).\"\nmsgstr \"\"\n\"Позиція повернення `impl Trait` фіксує всі терміни життя в межах області \"\n\"застосування (тому деякі моделі запозичення не можуть бути виражені).\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async traits cannot be used with [trait objects](../../smart-pointers/trait-\"\n\"objects.md) (`dyn Trait` support).\"\nmsgstr \"\"\n\"Асинхронні трейти не можна використовувати з [об'єктами трейтів](../../smart-\"\n\"pointers/trait-objects.md) (підтримка `dyn Trait`).\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The [async_trait](https://docs.rs/async-trait/) crate provides a workaround \"\n\"for `dyn` support through a macro, with some caveats:\"\nmsgstr \"\"\n\"Крейт [async_trait](https://docs.rs/async-trait/latest/async_trait/) надає \"\n\"обхідний шлях за допомогою макросу, з деякими застереженнями:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Running all sleepers...\\\"\"\nmsgstr \"\\\"Запуск всіх сплячих..\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"Slept for {} ms\\\"\"\nmsgstr \"\\\"Проспав {}мс\\\"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` простий у використанні, але зауважте, що для цього він \"\n\"використовує виділення в купі. Цей розподіл купи має накладні витрати на \"\n\"продуктивність.\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are too deep to \"\n\"describe in-depth in this class. See [this blog post](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/) by Niko Matsakis if you are interested in digging deeper. See also \"\n\"these keywords:\"\nmsgstr \"\"\n\"Проблеми мовної підтримки `async trait` є надто глибокими, щоб детально \"\n\"описати їх у цьому уроці. Якщо ви зацікавлені у глибшому вивченні, \"\n\"перегляньте [цей запис у блозі](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) Ніко Мацакіса. Дивіться також \"\n\"ці ключові слова:\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-\"\n\"return-types): short for [return-position `impl Trait`](../../generics/impl-\"\n\"trait.md).\"\nmsgstr \"\"\n\"[RPIT](https://doc.rust-lang.org/reference/types/impl-trait.html#abstract-\"\n\"return-types): скорочення від [return-position `impl Trait`](../../generics/\"\n\"impl-trait.md).\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.\"\n\"html): short for return-position `impl Trait` in trait (RPIT in trait).\"\nmsgstr \"\"\n\"[RPITIT](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.\"\n\"html): скорочення від return-position `impl Trait` у трейті (RPIT у трейті).\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the `Vec`.\"\nmsgstr \"\"\n\"Спробуйте створити нову сплячу структуру, яка буде спати протягом \"\n\"випадкового періоду часу, і додайте її до `Vec`.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"Видалення ф'ючерсу означає, що він більше ніколи не може бути опитаний. Це \"\n\"називається _скасуванням_, і воно може відбутися в будь-який `await` момент. \"\n\"Потрібно бути обережним, щоб система працювала правильно, навіть якщо \"\n\"ф'ючерс скасовано. Наприклад, вона не повинна зайти в глухий кут або \"\n\"втратити дані.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\\\"не UTF-8\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"всім\\\\привіт\\\\n\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"тік!\\\"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"Компілятор не допомагає з безпекою скасування. Вам потрібно прочитати \"\n\"документацію до API і звернути увагу на те, який стан містить ваша `async \"\n\"fn`.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\"На відміну від `panic` і `?`, скасування є частиною звичайного потоку \"\n\"керування (на відміну від обробки помилок).\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"Приклад втрачає частини рядка.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\"Щоразу, коли гілка `tick()` завершується першою, `next()` і його `buf` \"\n\"відкидаються.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\"`LinesReader` можна зробити безпечним для скасування, зробивши `buf` \"\n\"частиною структури:\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// префікс buf та байти з self.\\n\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) є безпечним для скасування, оскільки він відстежує, чи був \"\n\"тік 'доставлений'.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) є безпечним для скасування, оскільки він \"\n\"повертає або не читає дані.\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) схожий на приклад і _не є_ безпечним \"\n\"для скасування. Подробиці та альтернативи дивится у його документації.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"Вечеря філософів --- Async\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](../sync-exercises/dining-philosophers.md) for a \"\n\"description of the problem.\"\nmsgstr \"\"\n\"Перегляньте [вечерю філософів](../sync-exercises/dining-philosophers.md) для \"\n\"опису проблеми.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"Як і раніше, для виконання цієї вправи вам знадобиться локальний \"\n\"[встановленний Cargo](../../cargo/running-locally.md). Скопіюйте наведений \"\n\"нижче код у файл під назвою `src/main.rs`, заповніть порожні поля та \"\n\"перевірте, чи `cargo run` не блокує:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"// Продовжуємо пробувати, поки не знайдемо обидві виделки\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Змусимо їх думати і їсти\\n\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"Оскільки цього разу ви використовуєте Async Rust, вам знадобиться залежність \"\n\"`tokio`. Ви можете використовувати наступний `Cargo.toml`:\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\"Також зауважте, що цього разу вам доведеться використовувати `Mutex` і \"\n\"модуль `mpsc` з крейту `tokio`.\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"Чи можете ви зробити вашу реалізацію однопотоковою?\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"У цій вправі ми хочемо використати наші нові знання для реалізації програми \"\n\"чату. У нас є чат-сервер, до якого підключаються клієнти і публікують свої \"\n\"повідомлення. Клієнт читає повідомлення користувача зі стандартного вводу і \"\n\"надсилає їх на сервер. Сервер чату транслює кожне повідомлення, яке він \"\n\"отримує, усім клієнтам.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"Для цього ми використовуємо [трансляційний канал](https://docs.rs/tokio/\"\n\"latest/tokio/sync/broadcast/fn.channel.html) на сервері та \"\n\"[`tokio_websockets`](https://docs.rs/tokio_websockets/) для зв’язку між \"\n\"клієнтом і сервером.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"Створіть новий проект Cargo та додайте такі залежності:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"_Cargo.toml_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.31\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.41.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.10.1\\\", features = [\\\"client\\\", \\\"fastrand\"\n\"\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"Необхідні API\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"Вам знадобляться такі функції з `tokio` і [`tokio_websockets`](https://docs.\"\n\"rs/tokio-websockets/tokio-websockets/). Витратьте кілька хвилин на \"\n\"ознайомлення з API.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next), реалізований `WebsocketStream`: для \"\n\"асинхронного читання повідомлень з потоку Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send), реалізований `WebsocketStream`: для \"\n\"асинхронного надсилання повідомлень у потоці Websocket.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): для асинхронного читання повідомлень користувача зі \"\n\"стандартного вводу.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): для підписки на канал трансляції.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"Два бінарні файли\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"Зазвичай у проекті Cargo можна мати лише один бінарний файл і один файл `rc/\"\n\"main.rs`. У цьому проекті нам потрібні два бінарних файли. Один для клієнта \"\n\"і один для сервера. Потенційно ви могли б зробити їх двома окремими \"\n\"проектами Cargo, але ми збираємося помістити їх в один проект Cargo з двома \"\n\"бінарними файлами. Для того, щоб це працювало, клієнтський і серверний код \"\n\"має знаходитися у каталозі `src/bin` (дивиться [документацію](https://doc.\"\n\"rust-lang.org/cargo/reference/cargo-targets.html#binaries)).\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"Скопіюйте наступний серверний та клієнтський код у файли `src/bin/server.rs` \"\n\"та `src/bin/client.rs` відповідно. Ваше завдання - доповнити ці файли, як \"\n\"описано нижче.\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"_src/bin/server.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"// TODO: Підказку дивіться в описі завдання нижче.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"слухаємо на порту 2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"Нове з'єднання з {addr:?}\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Обернути необроблений TCP потік у веб-сокет.\\n\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"_src/bin/client.rs_:\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"Запуск бінарних файлів\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"Запустіть сервер за допомогою:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"і клієнт за допомогою:\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"Реалізуйте функцію `handle_connection` у `src/bin/server.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"Підказка: використовуйте `tokio::select!` для одночасного виконання двох \"\n\"завдань у безперервному циклі. Одне завдання отримує повідомлення від \"\n\"клієнта і транслює їх. Інше надсилає повідомлення, отримані сервером, \"\n\"клієнту.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"Завершіть основну функцію в `src/bin/client.rs`.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"Підказка: як і раніше, використовуйте `tokio::select!` у безперервному циклі \"\n\"для одночасного виконання двох завдань: (1) читання повідомлень користувача \"\n\"зі стандартного вводу та надсилання їх на сервер, і (2) отримання \"\n\"повідомлень від сервера, і відображення їх для користувача.\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"Необов’язково: коли ви закінчите, змініть код, щоб транслювати повідомлення \"\n\"всім клієнтам, крім відправника повідомлення.\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// Keep trying until we have both forks\\n\"\n\"        // Pick up forks...\\n\"\nmsgstr \"\"\n\"// Продовжуємо пробувати, поки не знайдемо обидві виделки\\n\"\n\"        // Беремо виделки...\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// Тут скидаються блокування\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\"// tx відкидається тут, тому нам не потрібно явно відкидати його пізніше\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Є така думка: {thought}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Ласкаво просимо до чату! Введіть повідомлення\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// Безперервний цикл для одночасного виконання двох задач: (1) отримання\\n\"\n\"    // повідомлень з `ws_stream` та їх трансляції, та (2) отримання\\n\"\n\"    // повідомлень на `bcast_rx` і відправлення їх клієнту.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"Від клієнта {addr:?} {text:?}\\\"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\"// Безперервний цикл для одночасної відправки та отримання повідомлень.\\n\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"З сервера: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and that \"\n\"it was useful.\"\nmsgstr \"\"\n\"_Дякуємо, що прослухали курс Comprehensive Rust 🦀!_ Сподіваємося, вам \"\n\"сподобалось і було корисно.\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"Нам було дуже весело створювати курс. Курс не ідеальний, тож якщо ви \"\n\"помітили будь-які помилки або маєте ідеї щодо покращення, [зв’яжіться з нами \"\n\"на GitHub](https://github.com/google/comprehensive-rust/discussions). Ми \"\n\"будемо раді почути від вас.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"Нижче наведено глосарій, який має на меті дати коротке визначення багатьох \"\n\"термінів Rust. У перекладах він також допомагає пов'язати термін з \"\n\"англійським оригіналом.\"\n\n#. Please add the English term in italic after your translated term. Also, please keep the hard line breaks to ensure a nice formatting.\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/review.md).\"\nmsgstr \"\"\n\"виділяти:  \\n\"\n\"Динамічний розподіл пам'яті на [купі](memory-management/review.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"аргумент:  \\n\"\n\"Інформація, яка передається у функцію або метод.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"associated type:  \\n\"\n\"A type associated with a specific trait. Useful for defining the \"\n\"relationship between types.\"\nmsgstr \"\"\n\"асоційований тип:  \\n\"\n\"Тип, пов'язаний з певним трейтом. Корисний для визначення взаємозв'язку між \"\n\"типами.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Rust на голому залізі:  \\n\"\n\"Низькорівнева розробка Rust, часто розгорнута на системі без операційної \"\n\"системи. See [Bare-metal Rust](bare-metal.md). Дивіться [Rust на голому \"\n\"залізі](bare-metal.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow-basics/blocks-and-scopes.md) and _scope_.\"\nmsgstr \"\"\n\"блок:  \\n\"\n\"Дивіться [Блоки](control-flow-basics/blocks-and-scopes.md) та _область \"\n\"видимості_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](borrowing/shared.md).\"\nmsgstr \"\"\n\"позичати:  \\n\"\n\"Дивіться [Запозичення](borrowing/shared.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"перевірка запозичень:  \\n\"\n\"Частина компілятора Rust, яка перевіряє допустимість усіх запозичень.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"дужка:  \\n\"\n\"`{` та `}`. Також називаються _фігурними дужками_, вони розмежовують _блоки_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"збірка:  \\n\"\n\"Процес перетворення вихідного коду у виконуваний код або придатну для \"\n\"використання програму.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"виклик:  \\n\"\n\"Виклик або виконання функції або методу.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"канал:  \\n\"\n\"Використовується для безпечної передачі повідомлень [між потоками]\"\n\"(concurrency/channels.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"Ці курси мають спільну назву Comprehensive Rust 🦀.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"одночасність виконання:  \\n\"\n\"Виконання декількох завдань або процесів одночасно.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency/welcome.md).\"\nmsgstr \"\"\n\"Одночасність виконання у Rust:  \\n\"\n\"Дивіться [Одночасність виконання у Rust](concurrency/welcome.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"константа:  \\n\"\n\"Значення, яке не змінюється під час виконання програми.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"потік керування:  \\n\"\n\"Порядок, у якому виконуються окремі оператори або інструкції у програмі.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"крах:  \\n\"\n\"Неочікуваний і некерований збій або завершення роботи програми.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"перелік:  \\n\"\n\"Тип даних, який містить одну з декількох іменованих констант, можливо, з \"\n\"асоційованим кортежем або структурою.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"помилка:  \\n\"\n\"Неочікувана умова або результат, що відхиляється від очікуваної поведінки.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"обробка помилок:  \\n\"\n\"Процес управління та реагування на помилки, що виникають під час виконання \"\n\"програми.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"вправа:  \\n\"\n\"Завдання або проблема, призначена для практики та перевірки навичок \"\n\"програмування.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"функція:  \\n\"\n\"Багаторазово використовуваний блок коду, який виконує певне завдання.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"збирач сміття:  \\n\"\n\"Механізм, який автоматично звільняє пам'ять, зайняту об'єктами, які більше \"\n\"не використовуються.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"узагальнення:  \\n\"\n\"Це можливість написання коду із заповнювачами для типів, що дозволяє \"\n\"повторно використовувати код з різними типами даних.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"незмінний:  \\n\"\n\"Неможливо змінити після створення.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"інтеграційний тест:  \\n\"\n\"Тип тесту, який перевіряє взаємодію між різними частинами або компонентами \"\n\"системи.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"ключове слово:  \\n\"\n\"Зарезервоване слово в мові програмування, яке має певне значення і не може \"\n\"використовуватися як ідентифікатор.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"бібліотека:  \\n\"\n\"Колекція попередньо скомпільованих процедур або коду, які можуть бути \"\n\"використані програмами.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"макрос:  \\n\"\n\"Макроси використовуються, коли звичайних функцій недостатньо. Типовим \"\n\"прикладом є `format!`, який приймає змінну кількість аргументів, що не \"\n\"підтримується функціями Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` функція:  \\n\"\n\"Rust-програми починають виконуватися з функції `main`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"match:  \\n\"\n\"Конструкція потоку керування у Rust, яка дозволяє виконувати шаблонний пошук \"\n\"за значенням виразу.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"витік пам'яті:  \\n\"\n\"Ситуація, коли програма не звільнює пам'ять, яка більше не потрібна, що \"\n\"призводить до поступового збільшення використання пам'яті.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"метод:  \\n\"\n\"Функція, пов'язана з об'єктом або типом у Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"модуль:  \\n\"\n\"Простір імен, який містить визначення, такі як функції, типи або трейти, для \"\n\"організації коду в Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"move:  \\n\"\n\"Передача права власності на значення від однієї змінної до іншої у Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"мутабельний:  \\n\"\n\"Це властивість у Rust, яка дозволяє змінювати змінні після того, як їх було \"\n\"оголошено.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"володіння:  \\n\"\n\"Концепція в Rust, яка визначає, яка частина коду відповідає за управління \"\n\"пам'яттю, пов'язаною зі значенням.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"паніка:  \\n\"\n\"Невиправна помилка у Rust, яка призводить до завершення роботи програми.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"параметр:  \\n\"\n\"Значення, яке передається у функцію або метод при її виклику.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"шаблон:  \\n\"\n\"Комбінація значень, літералів або структур, які можна зіставити з виразом у \"\n\"Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"корисне навантаження:  \\n\"\n\"Дані або інформація, яку несе повідомлення, подія або структура даних.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"програма:  \\n\"\n\"Набір інструкцій, які комп'ютер може виконати, щоб виконати певне завдання \"\n\"або вирішити певну проблему.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"мова програмування:  \\n\"\n\"Формальна система, що використовується для передачі інструкцій комп'ютеру, \"\n\"наприклад, Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"приймач:  \\n\"\n\"Перший параметр у методі Rust, який представляє екземпляр, на якому \"\n\"викликається метод.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"підрахунок посилань:  \\n\"\n\"Метод керування пам'яттю, в якому відстежується кількість посилань на \"\n\"об'єкт, і об'єкт звільняється, коли цей показник досягає нуля.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"return:  \\n\"\n\"Ключове слово у Rust, яке використовується для позначення значення, що \"\n\"повертається з функції.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"Мова системного програмування, яка фокусується на безпеці, продуктивності та \"\n\"одночасності виконання.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Основи Rust:  \\n\"\n\"Дні з 1 по 4 цього курсу.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust в Android:  \\n\"\n\"Дивіться [Rust в Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Rust в Chromium:  \\n\"\n\"Дивіться [Rust в Chromium](chromium.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"безпечний:  \\n\"\n\"Відноситься до коду, який дотримується правил власності та запозичень Rust, \"\n\"запобігаючи помилкам, пов'язаним з пам'яттю.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"область видимості:  \\n\"\n\"Область програми, де змінна є дійсною і може бути використана.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"стандартна бібліотека:  \\n\"\n\"Колекція модулів, що забезпечують необхідну функціональність у Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static:  \\n\"\n\"Ключове слово у Rust, що використовується для визначення статичних змінних \"\n\"або елементів зі `'static` часом життя.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [Strings](references/strings.html) for \"\n\"more.\"\nmsgstr \"\"\n\"string:  \\n\"\n\"Тип даних, що зберігає текстові дані. Дивіться [Strings](references/strings.\"\n\"html) для отримання додаткової інформації.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"struct:  \\n\"\n\"Комбінований тип даних у Rust, який об'єднує змінні різних типів під одним \"\n\"іменем.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"test:  \\n\"\n\"Модуль Rust, що містить функції, які перевіряють коректність інших функцій.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"потік:  \\n\"\n\"Окрема послідовність виконання в програмі, що дозволяє одночасне виконання.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"безпека потоків:  \\n\"\n\"Властивість програми, яка забезпечує коректну поведінку в багатопотоковому \"\n\"середовищ.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"трейт:  \\n\"\n\"Набір методів, визначених для невідомого типу, що забезпечує можливість \"\n\"досягнення поліморфізму у Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"обмеження трейту:  \\n\"\n\"Абстракція, в якій ви можете вимагати, щоб типи реалізовували певні трейти, \"\n\"які вас цікавлять.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"кортеж:  \\n\"\n\"Комбінований тип даних, який містить змінні різних типів. Поля кортежу не \"\n\"мають імен, доступ до них здійснюється за їхніми порядковими номерами.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"тип:  \\n\"\n\"Класифікація, яка визначає, які операції можна виконувати над значеннями \"\n\"певного типу в Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"виведення типу:  \\n\"\n\"Здатність компілятора Rust виводити тип змінної або виразу.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"невизначена поведінка:  \\n\"\n\"Дії або умови в Rust, які не мають визначеного результату, що часто \"\n\"призводить до непередбачуваної поведінки програми.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"об'єднання:  \\n\"\n\"Тип даних, який може містити значення різних типів, але лише по одному за \"\n\"раз.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"модульній тест:  \\n\"\n\"Rust має вбудовану підтримку для запуску невеликих модульних тестів і \"\n\"великих інтеграційних тестів. Дивіться [Модульні тести](testing/unit-tests.\"\n\"html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"тип одиниці:  \\n\"\n\"Тип, що не містить даних, записаний як кортеж без членів.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe-rust/unsafe.md).\"\nmsgstr \"\"\n\"unsafe:  \\n\"\n\"Підмножина Rust, яка дозволяє викликати _невизначену поведінку_. Дивіться \"\n\"[Небезпечний Rust](unsafe-rust/unsafe.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"змінна:  \\n\"\n\"Ділянка пам'яті, в якій зберігаються дані. Змінні дійсні в межах _області \"\n\"видимості_.\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"Інші ресурси Rust\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\"Спільнота Rust створила безліч високоякісних і безкоштовних ресурсів онлайн.\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"Офіційна документація\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Проект Rust містить багато ресурсів. Вони охоплюють Rust загалом:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[Мова програмування Rust](https://doc.rust-lang.org/book/): канонічна \"\n\"безкоштовна книга про Rust. Детально охоплює мову та містить кілька проектів \"\n\"для створення.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust за прикладом](https://doc.rust-lang.org/rust-by-example/): описує \"\n\"синтаксис Rust за допомогою серії прикладів, які демонструють різні \"\n\"конструкції. Іноді включає невеликі вправи, де вас просять розширити код у \"\n\"прикладах.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Стандартна бібліотека Rust](https://doc.rust-lang.org/std/): повна \"\n\"документація стандартної бібліотеки для Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[Довідник Rust](https://doc.rust-lang.org/reference/): неповна книга, яка \"\n\"описує граматику та модель пам’яті Rust.\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Більш спеціалізовані посібники розміщені на офіційному сайті Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): охоплює небезпечний \"\n\"Rust, зокрема роботу з необробленими покажчиками та взаємодію з іншими \"\n\"мовами (FFI).\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Асинхронне програмування в Rust](https://rust-lang.github.io/async-book/): \"\n\"охоплює нову модель асинхронного програмування, яка була представлена ​​після \"\n\"написання книги Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"ознайомлення з використанням Rust на вбудованих пристроях без операційної \"\n\"системи.\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"Неофіційний навчальний матеріал\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"Невелика добірка інших посібників і підручників для Rust:\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Вивчіть Rust небезпечним способом](http://cliffle.com/p/dangerust/): \"\n\"розповідається про Rust з точки зору програмістів на C низького рівня.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): covers Rust from the perspective of developers who \"\n\"write firmware in C.\"\nmsgstr \"\"\n\"[Rust для Embedded C програмістів](https://opentitan.org/book/doc/\"\n\"rust_for_c_devs.html): розповідається про Rust з точки зору розробників, які \"\n\"пишуть вбудоване програмне забезпечення на C.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust для професіоналів](https://overexact.com/rust-for-professionals/): \"\n\"висвітлює синтаксис Rust, використовуючи порівняння з іншими мовами, такими \"\n\"як C, C++, Java, JavaScript та Python.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): понад 100 вправ, які \"\n\"допоможуть вам вивчити Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Навчальний матеріал Ferrous](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): серія невеликих презентацій, що охоплюють базову та \"\n\"розширену частину мови Rust. Також розглядаються інші теми, такі як \"\n\"WebAssembly та async/await.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://rust-exercises.com/advanced-\"\n\"testing/): a self-paced workshop that goes beyond Rust's built-in testing \"\n\"framework. It covers `googletest`, snapshot testing, mocking as well as how \"\n\"to write your own custom test harness.\"\nmsgstr \"\"\n\"[Розширене тестування для прикладних програм Rust](https://rust-exercises.\"\n\"com/advanced-testing/): воркшоп для самостійної роботи, який виходить за \"\n\"рамки вбудованого тестового фреймворку Rust. Він охоплює `googletest`, \"\n\"тестування знімками, імітацію, а також те, як написати свій власний тестовий \"\n\"інструментарій.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[Серія для початківців до Rust](https://docs.microsoft.com/en-us/shows/\"\n\"beginners-series-to-rust/) і [Зробіть перші кроки з Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): два посібники з Rust, \"\n\"призначені для нових розробників. Перший — це набір із 35 відео, а другий — \"\n\"набір із 11 модулів, які охоплюють синтаксис і базові конструкції Rust.\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Вивчіть Rust із надто великою кількістю пов’язаних списків](https://rust-\"\n\"unofficial.github.io/too-many-lists/): поглиблене вивчення правил керування \"\n\"пам’яттю Rust за допомогою реалізації кількох різних типів структур списків .\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"Будь ласка, перегляньте [Маленьку книгу Rust книжок](https://lborb.github.io/\"\n\"book/), щоб отримати ще більше книг Rust.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"Цей матеріал базується на багатьох чудових джерелах документації Rust. \"\n\"Перегляньте сторінку [інші ресурси](other-resources.md), щоб отримати повний \"\n\"список корисних ресурсів.\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Матеріали Comprehensive Rust надаються згідно з умовами ліцензії Apache 2.0, \"\n\"будь ласка, дивіться [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) для отримання детальної інформації.\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust на прикладі\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"Деякі приклади та вправи скопійовано та адаптовано з [Rust на прикладі]\"\n\"(https://doc.rust-lang.org/rust-by-example/). Будь ласка, перегляньте \"\n\"каталог `third_party/rust-by-example/` для отримання детальної інформації, \"\n\"включно з умовами ліцензії.\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"Деякі вправи скопійовано та адаптовано з [Rust on Exercism](https://exercism.\"\n\"org/tracks/rust). Будь ласка, перегляньте каталог `third_party/rust-on-\"\n\"exercism/`, щоб отримати докладніші відомості, включно з умовами ліцензії.\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"У розділі [Взаємодія з C++](android/interoperability/cpp.md) \"\n\"використовується зображення з [CXX](https://cxx.rs/). Будь ласка, дивіться \"\n\"каталог `third_party/cxx/` для отримання детальної інформації, включно з \"\n\"умовами ліцензії.\"\n\n#~ msgid \"{{%course outline Fundamentals}}\"\n#~ msgstr \"Основи Rust\"\n\n#~ msgid \"{{%course outline Concurrency}}\"\n#~ msgstr \"{{%course outline Concurrency}}\"\n\n#~ msgid \"\"\n#~ \"minutes: 5 course: Fundamentals session: Day 1 Morning target_minutes: 180\"\n#~ msgstr \"\"\n#~ \"minutes: 5 course: Fundamentals session: Day 1 Morning target_minutes: 180\"\n\n#~ msgid \"{{%segment outline}}\"\n#~ msgstr \"{{%segment outline}}\"\n\n#~ msgid \"minutes: 10\"\n#~ msgstr \"хвилин: 10\"\n\n#~ msgid \"minutes: 2\"\n#~ msgstr \"хвилин: 2\"\n\n#~ msgid \"minutes: 5\"\n#~ msgstr \"хвилин: 5\"\n\n#~ msgid \"minutes: 15\"\n#~ msgstr \"хвилин: 15\"\n\n#~ msgid \"minutes: 4\"\n#~ msgstr \"хвилин: 4\"\n\n#~ msgid \"session: Day 1 Afternoon target_minutes: 180\"\n#~ msgstr \"session: Day 1 Afternoon target_minutes: 180\"\n\n#~ msgid \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 2 Morning target_minutes: 180\"\n#~ msgstr \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 2 Morning target_minutes: 180\"\n\n#~ msgid \"minutes: 30\"\n#~ msgstr \"хвилин: 30\"\n\n#~ msgid \"minutes: 8\"\n#~ msgstr \"хвилин: 8\"\n\n#~ msgid \"Minutes: 5\"\n#~ msgstr \"Хвилин: 5\"\n\n#~ msgid \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 3 Morning target_minutes: 180\"\n#~ msgstr \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 3 Morning target_minutes: 180\"\n\n#~ msgid \"session: Day 3 Afternoon target_minutes: 180\"\n#~ msgstr \"session: Day 3 Afternoon target_minutes: 180\"\n\n#~ msgid \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 4 Morning target_minutes: 180\"\n#~ msgstr \"\"\n#~ \"minutes: 3 course: Fundamentals session: Day 4 Morning target_minutes: 180\"\n\n#~ msgid \"course: Android session: Android\"\n#~ msgstr \"course: Android session: Android\"\n\n#~ msgid \"course: Bare Metal session: Morning\"\n#~ msgstr \"course: Bare Metal session: Morning\"\n\n#~ msgid \"session: Afternoon\"\n#~ msgstr \"session: Afternoon\"\n\n#~ msgid \"course: Concurrency session: Morning target_minutes: 180\"\n#~ msgstr \"course: Concurrency session: Morning target_minutes: 180\"\n\n#~ msgid \"minutes: 13\"\n#~ msgstr \"хвилин: 13\"\n\n#~ msgid \"minutes: 9\"\n#~ msgstr \"хвилин: 9\"\n\n#~ msgid \"minutes: 6\"\n#~ msgstr \"хвилин: 6\"\n\n#~ msgid \"minutes: 14\"\n#~ msgstr \"хвилин: 14\"\n\n#~ msgid \"session: Afternoon target_minutes: 180\"\n#~ msgstr \"session: Afternoon target_minutes: 180\"\n\n#~ msgid \"course: none\"\n#~ msgstr \"course: none\"\n\n#~ msgid \"\"\n#~ \"If you finish early, try writing a test that results in division by zero \"\n#~ \"or integer overflow. How could you handle this with `Result` instead of a \"\n#~ \"panic?\"\n#~ msgstr \"\"\n#~ \"Якщо ви закінчили раніше, спробуйте написати тест, який призводить до \"\n#~ \"ділення на нуль або цілочисельного переповнення. Як ви могли б впоратися \"\n#~ \"з цим за допомогою `Result` замість того, щоб панікувати?\"\n\n#~ msgid \"\"\n#~ \"The niche optimization means that `Option<T>` often has the same size in \"\n#~ \"memory as `T`.\"\n#~ msgstr \"\"\n#~ \"Нішева оптимізація означає, що `Option<T>` часто має той самий розмір у \"\n#~ \"пам'яті, що й `T`.\"\n\n#~ msgid \"Niche Optimization\"\n#~ msgstr \"Нішева оптимізація\"\n\n#~ msgid \"\"\n#~ \"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, \"\n#~ \"because compiler uses NULL-value to discriminate variants instead of \"\n#~ \"using explicit tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.\"\n#~ \"org/std/option/#representation)):\"\n#~ msgstr \"\"\n#~ \"Наприклад, `Option<Box<T>>` має такий самий розмір, як і просто `Box<T>`, \"\n#~ \"оскільки компілятор використовує NULL-значення для розрізнення варіантів \"\n#~ \"замість використання явного тегу ([\\\"Оптимізація нульового вказівника\\\"]\"\n#~ \"(https://doc.rust-lang.org/std/option/#representation)):\"\n\n#~ msgid \"\\\"Just box\\\"\"\n#~ msgstr \"\\\"Just box\\\"\"\n\n#~ msgid \"\\\"Optional box\\\"\"\n#~ msgstr \"\\\"Optional box\\\"\"\n\n#~ msgid \"\\\"Size of just_box: {}\\\"\"\n#~ msgstr \"\\\"Розмір just_box: {}\\\"\"\n\n#~ msgid \"\\\"Size of optional_box: {}\\\"\"\n#~ msgstr \"\\\"Розмір optional_box: {}\\\"\"\n\n#~ msgid \"\\\"Size of none: {}\\\"\"\n#~ msgstr \"\\\"Розмір none: {}\\\"\"\n\n#~ msgid \"Luhn Algorithm\"\n#~ msgstr \"Алгоритм Луна\"\n\n#~ msgid \"// SAFETY: self.dir is not NULL.\\n\"\n#~ msgstr \"// БЕЗПЕКА: self.dir не є NULL.\\n\"\n\n#~ msgid \"\"\n#~ \"We will attempt to call Rust from one of your own projects today. So try \"\n#~ \"to find a little corner of your code base where we can move some lines of \"\n#~ \"code to Rust. The fewer dependencies and \\\"exotic\\\" types the better. \"\n#~ \"Something that parses some raw bytes would be ideal.\"\n#~ msgstr \"\"\n#~ \"Сьогодні ми спробуємо викликати Rust з одного з ваших проектів. Тож \"\n#~ \"спробуйте знайти маленький куточок вашої кодової бази, куди ми можемо \"\n#~ \"перенести кілька рядків коду в Rust. Чим менше залежностей і \\\"екзотичних\"\n#~ \"\\\" типів, тим краще. Щось, що аналізує деякі необроблені байти, було б \"\n#~ \"ідеальним.\"\n\n#~ msgid \"\"\n#~ \"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.\"\n#~ \"aidl**:\"\n#~ msgstr \"\"\n#~ \"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.\"\n#~ \"aidl**:\"\n\n#~ msgid \"**birthday_service/src/client.rs**:\"\n#~ msgstr \"**birthday_service/src/client.rs**:\"\n\n#~ msgid \"**birthday_service/src/lib.rs**:\"\n#~ msgstr \"**birthday_service/src/lib.rs**:\"\n\n#~ msgid \"/// Analyze the numbers.\\n\"\n#~ msgstr \"/// Проаналізувати числа.\\n\"\n\n#~ msgid \"\"\n#~ \"This is a group exercise: We will look at one of the projects you work \"\n#~ \"with and try to integrate some Rust into it. Some suggestions:\"\n#~ msgstr \"\"\n#~ \"Це групова вправа: ми розглянемо один із проектів, з яким ви працюєте, і \"\n#~ \"спробуємо інтегрувати в нього трохи Rust. Деякі пропозиції:\"\n\n#~ msgid \"Call your AIDL service with a client written in Rust.\"\n#~ msgstr \"Викличте свій сервіс AIDL з клієнтом, написаним на Rust.\"\n\n#~ msgid \"Move a function from your project to Rust and call it.\"\n#~ msgstr \"Перемістіть функцію зі свого проекту в Rust і викличте її.\"\n\n#~ msgid \"\"\n#~ \"No solution is provided here since this is open-ended: it relies on \"\n#~ \"someone in the class having a piece of code which you can turn in to Rust \"\n#~ \"on the fly.\"\n#~ msgstr \"\"\n#~ \"Тут не надано жодного рішення, оскільки воно є відкритим: воно \"\n#~ \"покладається на те, що хтось у класі має фрагмент коду, який ви можете \"\n#~ \"передати Rust на льоту.\"\n\n#~ msgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\n#~ msgstr \"\"\n#~ \"Використовуйте `pointer::read_volatile` і `pointer::write_volatile`.\"\n\n#~ msgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\n#~ msgstr \"\"\n#~ \"API потоків Rust зовні не надто відрізняються від API, наприклад, C++.\"\n\n#~ msgid \"What is the return type of an async call?\"\n#~ msgstr \"Який тип повернення асинхронного виклику?\"\n\n#~ msgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\n#~ msgstr \"\"\n#~ \"Використовуйте `let future: () = async_main(10);` в `main`, щоб побачити \"\n#~ \"тип.\"\n\n#~ msgid \"\"\n#~ \"Traits whose methods use return-position `impl trait` or `async` are not \"\n#~ \"`dyn` compatible.\"\n#~ msgstr \"\"\n#~ \"Трейти, методи яких використовують позицію повернення `impl trait` або \"\n#~ \"`async`, не сумісні з `dyn`.\"\n\n#~ msgid \"Slices: `&[T]`\"\n#~ msgstr \"Зрізи: `&[T]`\"\n\n#~ msgid \"`thiserror` and `anyhow`\"\n#~ msgstr \"`thiserror` та `anyhow`\"\n\n#~ msgid \"\"\n#~ \"Question: What happens if you modify `a[3]` right before printing `s`?\"\n#~ msgstr \"\"\n#~ \"Запитання: що станеться, якщо змінити `a[3]` безпосередньо перед друком \"\n#~ \"`s`?\"\n\n#~ msgid \"\"\n#~ \"The question about modifying `a[3]` can spark an interesting discussion, \"\n#~ \"but the answer is that for memory safety reasons you cannot do it through \"\n#~ \"`a` at this point in the execution, but you can read the data from both \"\n#~ \"`a` and `s` safely. It works before you created the slice, and again \"\n#~ \"after the `println`, when the slice is no longer used.\"\n#~ msgstr \"\"\n#~ \"Питання про модифікацію `a[3]` може викликати цікаву дискусію, але \"\n#~ \"відповідь полягає в тому, що з міркувань безпеки пам’яті ви не можете \"\n#~ \"зробити це через `a` на цьому етапі виконання, але ви можете читати дані \"\n#~ \"з обох `a ` і `s` безпечно. Це спрацьовує до того, як ви створили зріз, і \"\n#~ \"знову після `println`, коли зріз більше не використовується.\"\n\n#~ msgid \"\"\n#~ \"Save the result of `divide_in_two` in the `result` variable and `match` \"\n#~ \"it in a loop. That won't compile because `msg` is consumed when matched. \"\n#~ \"To fix it, match `&result` instead of `result`. That will make `msg` a \"\n#~ \"reference so it won't be consumed. This [\\\"match ergonomics\\\"](https://\"\n#~ \"rust-lang.github.io/rfcs/2005-match-ergonomics.html) appeared in Rust \"\n#~ \"2018. If you want to support older Rust, replace `msg` with `ref msg` in \"\n#~ \"the pattern.\"\n#~ msgstr \"\"\n#~ \"Збережіть результат `divide_in_two` у змінній `result` і `match` його у \"\n#~ \"циклі. Це не буде скомпільовано, оскільки при порівнянні споживається \"\n#~ \"`msg`. Щоб виправити це, порівняйте `&result` замість `result`. Це \"\n#~ \"зробить `msg` посиланням, тому його не буде використано. Ця [\\\"ергономіка \"\n#~ \"співставлення\\\"](https://rust-lang.github.io/rfcs/2005-match-ergonomics.\"\n#~ \"html) з'явилася у Rust 2018. Якщо ви хочете підтримувати попередні версії \"\n#~ \"Rust, замініть `msg` на `ref msg` у шаблоні.\"\n\n#~ msgid \"\"\n#~ \"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to \"\n#~ \"make examples easier. Using references in collections can, of course, be \"\n#~ \"done, but it can lead into complications with the borrow checker.\"\n#~ msgstr \"\"\n#~ \"Ми показуємо `HashMap<String, i32>` і уникаємо використання `&str` як \"\n#~ \"ключа, щоб полегшити приклади. Використання посилань у колекціях, \"\n#~ \"звичайно, можливо, але це може призвести до ускладнень із перевіркою \"\n#~ \"запозичень.\"\n\n#~ msgid \"\"\n#~ \"Try removing `to_string()` from the example above and see if it still \"\n#~ \"compiles. Where do you think we might run into issues?\"\n#~ msgstr \"\"\n#~ \"Спробуйте видалити `to_string()` із прикладу вище та подивіться, чи він \"\n#~ \"усе ще компілюється. Як ви думаєте, де ми можемо зіткнутися з проблемами?\"\n\n#~ msgid \"\"\n#~ \"By default, closures will capture by reference if they can. The `move` \"\n#~ \"keyword makes them capture by value.\"\n#~ msgstr \"\"\n#~ \"За замовчуванням закриття захоплюють за посиланням, якщо це можливо. \"\n#~ \"Ключове слово `move` змушує їх захоплювати за значенням.\"\n\n#~ msgid \"\\\"Expected `i32` to be an `I32` field\\\"\"\n#~ msgstr \"\\\"Очікувалося, що `i32` буде полем `I32`\\\"\"\n\n#~ msgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\n#~ msgstr \"\"\n#~ \"// Помилка розгортання, оскільки `value` точно має довжину 4 байти.\\n\"\n\n#~ msgid \"\"\n#~ \"Make sure to implement the `std::error::Error` trait when defining a \"\n#~ \"custom error type so it can be boxed. But if you need to support the \"\n#~ \"`no_std` attribute, keep in mind that the `std::error::Error` trait is \"\n#~ \"currently compatible with `no_std` in [nightly](https://github.com/rust-\"\n#~ \"lang/rust/issues/103765) only.\"\n#~ msgstr \"\"\n#~ \"Переконайтеся, що ви використовуєте ознаку `std::error::Error`, коли \"\n#~ \"визначаєте користувацький тип помилки, щоб її можна було упакувати. Але \"\n#~ \"якщо вам потрібно підтримувати атрибут `no_std`, майте на увазі, що \"\n#~ \"ознака `std::error::Error` наразі сумісна з `no_std` лише у [nightly]\"\n#~ \"(https://github.com/rust-lang/rust/issues/103765).\"\n\n#~ msgid \"\"\n#~ \"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.\"\n#~ \"rs/anyhow/) crates are widely used to simplify error handling.\"\n#~ msgstr \"\"\n#~ \"Крейти [thiserror](https://docs.rs/thiserror/) та [`anyhow`](https://docs.\"\n#~ \"rs/anyhow/) широко використовуються для спрощення обробки помилок.\"\n\n#~ msgid \"\"\n#~ \"`thiserror` is often used in libraries to create custom error types that \"\n#~ \"implement `From<T>`.\"\n#~ msgstr \"\"\n#~ \"`thiserror` часто використовується у бібліотеках для створення \"\n#~ \"користувацьких типів помилок, які реалізують `From<T>`.\"\n\n#~ msgid \"\"\n#~ \"`anyhow` is often used by applications to help with error handling in \"\n#~ \"functions, including adding contextual information to your errors.\"\n#~ msgstr \"\"\n#~ \"`anyhow` часто використовується програмами для полегшення обробки помилок \"\n#~ \"у функціях, зокрема для додавання контекстної інформації до ваших помилок.\"\n\n#~ msgid \"The `std::error::Error` trait is derived automatically.\"\n#~ msgstr \"Трейт `std::error::Error` виводиться автоматично.\"\n\n#~ msgid \"\"\n#~ \"Actual error type inside of it can be extracted for examination if \"\n#~ \"necessary.\"\n#~ msgstr \"\"\n#~ \"Фактичний тип помилки всередині нього можна вилучити для перевірки, якщо \"\n#~ \"це необхідно.\"\n\n#~ msgid \"\"\n#~ \"There is a plan to transition [Android](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n#~ \"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/\"\n#~ \"setup/build/bazel/introduction) to Bazel.\"\n#~ msgstr \"\"\n#~ \"Існує план переходу [Android](https://source.android.com/docs/setup/build/\"\n#~ \"bazel/introduction), [ChromeOS](https://chromium.googlesource.com/\"\n#~ \"chromiumos/bazel/) та [Fuchsia](https://source.android.com/docs/setup/\"\n#~ \"build/bazel/introduction) на Bazel.\"\n\n#~ msgid \"\"\n#~ \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\n#~ msgstr \"\"\n#~ \"Вивчення Bazel-подібних правил збірки корисно для всіх розробників Rust \"\n#~ \"OS.\"\n\n#~ msgid \"\"\n#~ \"Threads are all daemon threads, the main thread does not wait for them.\"\n#~ msgstr \"Усі потоки є потоками-демонами, головний потік не чекає на них.\"\n\n#~ msgid \"\\\"Felix\\\"\"\n#~ msgstr \"\\\"Фелікс\\\"\"\n\n#~ msgid \"\\\"Failed to send cat.\\\"\"\n#~ msgstr \"\\\"Не вдалося відправити кота.\\\"\"\n\n#~ msgid \"\\\"Failed to send dog.\\\"\"\n#~ msgstr \"\\\"Не вдалося відправити собаку.\\\"\"\n\n#~ msgid \"\\\"Failed to receive winner\\\"\"\n#~ msgstr \"\\\"Не вдалося отримати переможця\\\"\"\n\n#~ msgid \"\\\"Winner is {winner:?}\\\"\"\n#~ msgstr \"\\\"Переможцем стає {winner:?}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this example, we have a race between a cat and a dog. \"\n#~ \"`first_animal_to_finish_race` listens to both channels and will pick \"\n#~ \"whichever arrives first. Since the dog takes 50ms, it wins against the \"\n#~ \"cat that take 500ms.\"\n#~ msgstr \"\"\n#~ \"У цьому прикладі ми маємо перегони між котом і собакою. \"\n#~ \"`first_animal_to_finish_race` слухає обидва канали та вибере того, який \"\n#~ \"прибуде першим. Оскільки собаці потрібно 50 мс, вона виграє у кота, якому \"\n#~ \"потрібно 500 мс.\"\n\n#~ msgid \"\"\n#~ \"You can use `oneshot` channels in this example as the channels are \"\n#~ \"supposed to receive only one `send`.\"\n#~ msgstr \"\"\n#~ \"У цьому прикладі ви можете використовувати канали `oneshot`, оскільки \"\n#~ \"канали мають отримувати лише один `send`.\"\n\n#~ msgid \"\"\n#~ \"Try adding a deadline to the race, demonstrating selecting different \"\n#~ \"sorts of futures.\"\n#~ msgstr \"\"\n#~ \"Спробуйте додати дедлайн до перегонів, продемонструвавши вибір різних \"\n#~ \"видів ф’ючерсів.\"\n\n#~ msgid \"\"\n#~ \"Note that `select!` drops unmatched branches, which cancels their \"\n#~ \"futures. It is easiest to use when every execution of `select!` creates \"\n#~ \"new futures.\"\n#~ msgstr \"\"\n#~ \"Зауважте, що `select!` відкидає непорівнянні гілки, що скасовує їхні \"\n#~ \"ф’ючерси. Його найлегше використовувати, коли кожне виконання команди \"\n#~ \"`select!` створює нові ф’ючерси.\"\n\n#~ msgid \"\"\n#~ \"An alternative is to pass `&mut future` instead of the future itself, but \"\n#~ \"this can lead to issues, further discussed in the pinning slide.\"\n#~ msgstr \"\"\n#~ \"Альтернативою є передача `&mut future` замість самого ф’ючерса, але це \"\n#~ \"може призвести до проблем, які далі обговорюються на слайді про \"\n#~ \"закріплення.\"\n\n#~ msgid \"\"\n#~ \"// If we didn't get the left fork, drop the right fork if we\\n\"\n#~ \"                // have it and let other tasks make progress.\\n\"\n#~ msgstr \"\"\n#~ \"// Якщо ми не отримали ліву виделку, кидаємо праву, якщо вона у нас є,\\n\"\n#~ \"                // і даємо можливість іншим завданням просуватися \"\n#~ \"вперед.\\n\"\n\n#~ msgid \"\"\n#~ \"// If we didn't get the right fork, drop the left fork and let\\n\"\n#~ \"                // other tasks make progress.\\n\"\n#~ msgstr \"\"\n#~ \"// Якщо ми не отримали правої виделки, кидаємо ліву і даємо можливість \\n\"\n#~ \"                // іншим завданням просуватися вперед.\\n\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"Умовні слова\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"Static та Const\"\n\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"Зрізи та тривалість життя\"\n\n#~ msgid \"String References\"\n#~ msgstr \"Рядкові посилання\"\n\n#~ msgid \"Control Flow\"\n#~ msgstr \"Потік контролю\"\n\n#~ msgid \"Day 1 Morning (3 hours, including breaks)\"\n#~ msgstr \"День 1 Ранок (3 години, включаючи перерви)\"\n\n#~ msgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Ласкаво просимо](../welcome-day-1.md) (5 хвилин)\"\n\n#~ msgid \"[Hello, World](../hello-world.md) (20 minutes)\"\n#~ msgstr \"[Hello, World] (../hello-world.md) (20 хвилин)\"\n\n#~ msgid \"[Types and Values](../types-and-values.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Типи та значення] (../types-and-values.md) (1 година 5 хвилин)\"\n\n#~ msgid \"[Control Flow Basics](../control-flow-basics.md) (1 hour)\"\n#~ msgstr \"[Основи потоку управління](../control-flow-basics.md) (1 година)\"\n\n#~ msgid \"[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)\"\n#~ msgstr \"[Кортежі та масиви](../tuples-and-arrays.md) (1 година)\"\n\n#~ msgid \"[References](../references.md) (50 minutes)\"\n#~ msgstr \"[Посилання](../references.md) (50 хвилин)\"\n\n#~ msgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\n#~ msgstr \"\"\n#~ \"[Типи, визначені користувачем](../user-defined-types.md) (50 хвилин)\"\n\n#~ msgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](../welcome-day-2.md) (3 хвилини)\"\n\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[Зіставлення шаблонів](../pattern-matching.md) (50 хвилин).\"\n\n#~ msgid \"[Methods and Traits](../methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[Методи та трейти] (../methods-and-traits.md) (55 хвилин)\"\n\n#~ msgid \"[Generics](../generics.md) (45 minutes)\"\n#~ msgstr \"[Узагальнення](../generics.md) (45 хвилин)\"\n\n#~ msgid \"Day 2 Afternoon (3 hours, including breaks)\"\n#~ msgstr \"День 2 Полудень (3 години, включаючи перерви)\"\n\n#~ msgid \"[Standard Library Types](../std-types.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[Типи стандартної бібліотеки](../std-types.md) (1 година 10 хвилин)\"\n\n#~ msgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Трейти стандартної бібліотек](../std-traits.md) (1 година 40 хвилин)\"\n\n#~ msgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](../welcome-day-3.md) (3 хвилини)\"\n\n#~ msgid \"[Memory Management](../memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[Управління пам'яттю](../memory-management.md) (1 година 10 хвилин)\"\n\n#~ msgid \"[Smart Pointers](../smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[Розумні вказівники](../smart-pointers.md) (45 хвилин)\"\n\n#~ msgid \"[Borrowing](../borrowing.md) (1 hour)\"\n#~ msgstr \"[Запозичення](../borrowing.md) (1 година)\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Зрізи та тривалість життя] (../slices-and-lifetimes.md) (1 година 10 \"\n#~ \"хвилин)\"\n\n#~ msgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](../welcome-day-4.md) (3 хвилини)\"\n\n#~ msgid \"[Iterators](../iterators.md) (45 minutes)\"\n#~ msgstr \"[Ітератори](../iterators.md) (45 хвилин)\"\n\n#~ msgid \"[Modules](../modules.md) (40 minutes)\"\n#~ msgstr \"[Модулі](../modules.md) (40 хвилин)\"\n\n#~ msgid \"[Testing](../testing.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Тестування](../testing.md) (1 година 5 хвилин)\"\n\n#~ msgid \"Day 4 Afternoon (2 hours, including breaks)\"\n#~ msgstr \"День 4 Полудень (2 години, включаючи перерви)\"\n\n#~ msgid \"[Error Handling](../error-handling.md) (45 minutes)\"\n#~ msgstr \"[Обробка помилок](../error-handling.md) (45 хвилин)\"\n\n#~ msgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Небезпечний Rust](../unsafe-rust.md) (1 година 5 хвилин)\"\n\n#~ msgid \"Arrow-Left\"\n#~ msgstr \"Стрілка вліво\"\n\n#~ msgid \"Arrow-Right\"\n#~ msgstr \"Стрілка вправо\"\n\n#~ msgid \"Ctrl + Enter\"\n#~ msgstr \"Ctrl + Enter\"\n\n#~ msgid \"s\"\n#~ msgstr \"s\"\n\n#~ msgid \"You can use \"\n#~ msgstr \"Ви можете використовувати \"\n\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"Rust має два типи для представлення рядків, обидва з яких будуть \"\n#~ \"розглянуті більш детально пізніше.  Обидва типи _завжди_ зберігають рядки \"\n#~ \"у кодуванні UTF-8.\"\n\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` - змінюваний рядок, що належить власнику.\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"\"\n#~ \"`&str` - рядок, доступний тільки для читання. Цей тип мають рядкові \"\n#~ \"літерали.\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"останнє речення: {}\\\"\"\n\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"Цей слайд знайомить зі рядками. Пізніше ми розглянемо все більш детально, \"\n#~ \"але цього достатньо для наступних слайдів і вправ з використанням рядків.\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"\"\n#~ \"Неправильний UTF-8 у рядку є невизначена поведінка, а це заборонено у \"\n#~ \"безпечному Rust.\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String` - це визначений користувачем тип з конструктором (`::new()`) і \"\n#~ \"методами на зразок `s.push_str(..)`.\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"Символ `&` в `&str` вказує на те, що це посилання. Ми розглянемо \"\n#~ \"посилання пізніше, а поки що вважайте `&str` одиницею, яка означає \"\n#~ \"\\\"рядок лише для читання\\\".\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"Закоментований рядок індексується у рядку за позицією байта. `12..13` не \"\n#~ \"закінчується на межі символів, тому програма панікує. Налаштуйте її на \"\n#~ \"діапазон, який відповідає цій межі, виходячи з повідомлення про помилку.\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"Значна частина синтаксису Rust буде вам знайома з C, C++ або Java:\"\n\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"Блоки розділені фігурними дужками.\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"\"\n#~ \"Коментарі до рядків починаються з `//`, блокові коментарі розмежовуються \"\n#~ \"за допомогою `/* ... */`.\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"Такі ключові слова, як `if` та `while` працюють також само.\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"\"\n#~ \"Присвоєння змінної виконується за допомогою `=`, порівняння — за \"\n#~ \"допомогою `==`.\"\n\n#~ msgid \"\"\n#~ \"We will discuss iteration later; for now, just stick to range expressions.\"\n#~ msgstr \"\"\n#~ \"Ми обговоримо ітерації пізніше, а поки що просто використовуйте \"\n#~ \"діапазонні вирази.\"\n\n#~ msgid \"\\\"{result}\\\"\"\n#~ msgstr \"\\\"{result}\\\"\"\n\n#~ msgid \"\\\"x: {x}, i: {i}\\\"\"\n#~ msgstr \"\\\"x: {x}, i: {i}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"У цьому випадку ми розриваємо зовнішній цикл після 3 ітерацій \"\n#~ \"внутрішнього циклу.\"\n\n#~ msgid \"1\"\n#~ msgstr \"1\"\n\n#~ msgid \" greater than zero:\"\n#~ msgstr \" більше нуля:\"\n\n#~ msgid \"If _n\"\n#~ msgstr \"Якщо _n\"\n\n#~ msgid \"i\"\n#~ msgstr \"i\"\n\n#~ msgid \"_.\"\n#~ msgstr \"_.\"\n\n#~ msgid \"_ is even, then _n\"\n#~ msgstr \"_ парне, тоді _n\"\n\n#~ msgid \"i+1\"\n#~ msgstr \"i+1\"\n\n#~ msgid \" = n\"\n#~ msgstr \" = n\"\n\n#~ msgid \" / 2_.\"\n#~ msgstr \" / 2_.\"\n\n#~ msgid \"_ is odd, then _n\"\n#~ msgstr \"_ непарне, тоді _n\"\n\n#~ msgid \" = 3 * n\"\n#~ msgstr \" = 3 * n\"\n\n#~ msgid \" + 1_.\"\n#~ msgstr \" + 1_.\"\n\n#~ msgid \"_ = 3:\"\n#~ msgstr \"_ = 3:\"\n\n#~ msgid \"3 is odd, so _n\"\n#~ msgstr \"3 непарне, тому _n\"\n\n#~ msgid \"2\"\n#~ msgstr \"2\"\n\n#~ msgid \"_ = 3 * 3 + 1 = 10;\"\n#~ msgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#~ msgid \"10 is even, so _n\"\n#~ msgstr \"10 парне, тому _n\"\n\n#~ msgid \"_ = 10 / 2 = 5;\"\n#~ msgstr \"_ = 10 / 2 = 5;\"\n\n#~ msgid \"5 is odd, so _n\"\n#~ msgstr \"5 непарне, тому _n\"\n\n#~ msgid \"_ = 3 * 5 + 1 = 16;\"\n#~ msgstr \"_ = 3 * 15 + 1 = 16;\"\n\n#~ msgid \"16 is even, so _n\"\n#~ msgstr \"16 парне, тому _n\"\n\n#~ msgid \"5\"\n#~ msgstr \"5\"\n\n#~ msgid \"_ = 16 / 2 = 8;\"\n#~ msgstr \"_ = 16 / 2  = 8;\"\n\n#~ msgid \"8 is even, so _n\"\n#~ msgstr \"8 парне, тому _n\"\n\n#~ msgid \"_ = 8 / 2 = 4;\"\n#~ msgstr \"_ = 8 / 2  = 4\"\n\n#~ msgid \"4 is even, so _n\"\n#~ msgstr \"4 парне, тому _n\"\n\n#~ msgid \"7\"\n#~ msgstr \"7\"\n\n#~ msgid \"_ = 4 / 2 = 2;\"\n#~ msgstr \"_ = 4 / 2  = 2;\"\n\n#~ msgid \"2 is even, so _n\"\n#~ msgstr \"2 парне, тому _n\"\n\n#~ msgid \"_ = 1; and\"\n#~ msgstr \"_ = 1; та\"\n\n#~ msgid \"\"\n#~ \"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n#~ \"elements of an array have the same type, while tuples can accommodate \"\n#~ \"different types. Both types have a size fixed at compile time.\"\n#~ msgstr \"\"\n#~ \"Кортежі та масиви є першими \\\"складеними\\\" типами, з якими ми \"\n#~ \"познайомилися. Всі елементи масиву мають однаковий тип, тоді як кортежі \"\n#~ \"можуть мати різні типи. Обидва типи мають розмір, фіксований під час \"\n#~ \"компіляції.\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"Присвоєння масиву та доступ:\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"Присвоєння кортежу та доступ:\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"Масиви:\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"Кортежі:\"\n\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"Порожній кортеж `()` також відомий як \\\"тип одиниці\\\". Це одночасно і \"\n#~ \"тип, і єдине допустиме значення цього типу --- тобто і тип, і його \"\n#~ \"значення виражаються як `()`. Він використовується, наприклад, для \"\n#~ \"позначення того, що функція або вираз не має значення, яке повертається, \"\n#~ \"як ми побачимо на наступному слайді.\"\n\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"\"\n#~ \"Ви можете думати про це як про `void`, який може бути знайомий вам з \"\n#~ \"інших мов програмування.\"\n\n#~ msgid \"\"\n#~ \"Destructuring is a way of extracting data from a data structure by \"\n#~ \"writing a pattern that is matched up to the data structure, binding \"\n#~ \"variables to subcomponents of the data structure.\"\n#~ msgstr \"\"\n#~ \"Деструктуризація - це спосіб вилучення даних зі структури даних шляхом \"\n#~ \"написання шаблону, який відповідає структурі даних, прив'язуючи змінні до \"\n#~ \"підкомпонентів структури даних.\"\n\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"\"\n#~ \"Ви можете деструктурувати кортежі та масиви, зіставляючи їхні елементи:\"\n\n#~ msgid \"\\\"on Y axis\\\"\"\n#~ msgstr \"\\\"по осі Y\\\"\"\n\n#~ msgid \"\\\"on X axis\\\"\"\n#~ msgstr \"\\\"по осі X\\\"\"\n\n#~ msgid \"\\\"left of Y axis\\\"\"\n#~ msgstr \"\\\"зліва від осі Y\\\"\"\n\n#~ msgid \"\\\"below X axis\\\"\"\n#~ msgstr \"\\\"нижче осі X\\\"\"\n\n#~ msgid \"\\\"first quadrant\\\"\"\n#~ msgstr \"\\\"перший квадрант\\\"\"\n\n#~ msgid \"\\\"Tell me about {triple:?}\\\"\"\n#~ msgstr \"\\\"Розкажи мені про {triple:?}\\\"\"\n\n#~ msgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n#~ msgstr \"\\\"Перше число 0, y = {y}, and z = {z}\\\"\"\n\n#~ msgid \"\\\"First is 1 and the rest were ignored\\\"\"\n#~ msgstr \"\\\"Перший число 1, а решту проігноровано\\\"\"\n\n#~ msgid \"\\\"All elements were ignored\\\"\"\n#~ msgstr \"\\\"Всі елементи були проігноровані\\\"\"\n\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"\"\n#~ \"Створіть новий шаблон масиву, використовуючи `_` для представлення \"\n#~ \"елемента.\"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"Додайте більше значень до масиву.\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"\"\n#~ \"Зверніть увагу на те, як `..` буде розширюватися, щоб врахувати різну \"\n#~ \"кількість елементів.\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"\"\n#~ \"Покажіть  зіставлення  проти хвоста з хвостом за допомогою шаблонів `[.., \"\n#~ \"b]` і `[a@..,b]`\"\n\n#~ msgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\n#~ msgstr \"Жорстко закодуйте обидві функції для роботи з матрицями 3 × 3.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"functions:\"\n#~ msgstr \"\"\n#~ \"Скопіюйте наведений нижче код до <https://play.rust-lang.org/> та \"\n#~ \"застосуйте функції:\"\n\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"Статичні та постійні змінні — це два різні способи створення глобальних \"\n#~ \"значень, які не можна перемістити чи перерозподілити під час виконання \"\n#~ \"програми.\"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"Таблиця властивостей:\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"Має адресу в пам'яті\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"Ні (підставлена)\"\n\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"Живе протягом усього терміну програми\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"Може бути змінним\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"Так (небезпечно)\"\n\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"Обчислюється під час компіляції\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"Так (ініціалізуэться під час компіляції)\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"Підставляеться скрізь, де використовується\"\n\n#~ msgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](./welcome-day-2.md) (3 хвилини)\"\n\n#~ msgid \"[Pattern Matching](./pattern-matching.md) (50 minutes)\"\n#~ msgstr \"[Зіставлення шаблонів](../pattern-matching.md) (50 хвилин)\"\n\n#~ msgid \"[Methods and Traits](./methods-and-traits.md) (55 minutes)\"\n#~ msgstr \"[Методи та Трэйти] (./methods-and-traits.md) (55 хвилин)\"\n\n#~ msgid \"[Generics](./generics.md) (45 minutes)\"\n#~ msgstr \"[Узагальнення](./generics.md) (45 хвилин)\"\n\n#~ msgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\n#~ msgstr \"[Деструктуризація](./pattern-matching/destructuring.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Потік керування let](./pattern-matching/let-control-flow.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Обчислення виразу](./pattern-matching/exercise.md) (30 хвилин)\"\n\n#~ msgid \"`match` expressions\"\n#~ msgstr \"вирази `match`\"\n\n#~ msgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\n#~ msgstr \"[Методи](./methods-and-traits/methods.md) (10 хвилин)\"\n\n#~ msgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\n#~ msgstr \"[Трейти](./methods-and-traits/traits.md) (10 хвилин)\"\n\n#~ msgid \"[Deriving](./methods-and-traits/deriving.md) (5 minutes)\"\n#~ msgstr \"[Виведення](./methods-and-traits/deriving.md) (5 хвилин)\"\n\n#~ msgid \"[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Об'єкти трейтів](./methods-and-traits/trait-objects.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Загальний логгер](./methods-and-traits/exercise.md) (20 хвилин)\"\n\n#~ msgid \"\"\n#~ \"Trait objects allow for values of different types, for instance in a \"\n#~ \"collection:\"\n#~ msgstr \"\"\n#~ \"Об’єкти трейтів допускають значення різних типів, наприклад, у колекції:\"\n\n#~ msgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\n#~ msgstr \"[Узагальнені  функції](./generics/generic-functions.md) (5 хвилин)\"\n\n#~ msgid \"[Generic Data Types](./generics/generic-data.md) (15 minutes)\"\n#~ msgstr \"[Узагальнені типи даних](./generics/generic-data.md) (15 хвилин)\"\n\n#~ msgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\n#~ msgstr \"[Межі трейтів](./generics/trait-bounds.md) (10 хвилин)\"\n\n#~ msgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\n#~ msgstr \"[impl Trait](./generics/impl-trait.md) (5 хвилин)\"\n\n#~ msgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\n#~ msgstr \"[Вправа: Узагальний min](./generics/exercise.md) (10 хвилин)\"\n\n#~ msgid \"// fn set_x(&mut self, x: T)\\n\"\n#~ msgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#~ msgid \"/// Return true if self is less than other.\\n\"\n#~ msgstr \"/// Повертає true, якщо власник менший за іншого.\\n\"\n\n#~ msgid \"\\\"Shapiro\\\"\"\n#~ msgstr \"\\\"Shapiro\\\"\"\n\n#~ msgid \"\\\"Baumann\\\"\"\n#~ msgstr \"\\\"Baumann\\\"\"\n\n#~ msgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Трейти стандартної бібліотеки](./std-traits.md) (1 година 40 хвилин)\"\n\n#~ msgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\n#~ msgstr \"[Стандартна бібліотека](./std-types/std.md) (3 хвилини)\"\n\n#~ msgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\n#~ msgstr \"[Документація](./std-types/docs.md) (5 хвилин)\"\n\n#~ msgid \"[Option](./std-types/option.md) (10 minutes)\"\n#~ msgstr \"[Option](./std-types/option.md) (10 хвилин)\"\n\n#~ msgid \"[Result](./std-types/result.md) (10 minutes)\"\n#~ msgstr \"[Result](./std-types/result.md) (10 хвилин)\"\n\n#~ msgid \"[String](./std-types/string.md) (10 minutes)\"\n#~ msgstr \"[String](./std-types/string.md) (10 хвилин)\"\n\n#~ msgid \"[Vec](./std-types/vec.md) (10 minutes)\"\n#~ msgstr \"[Vec](./std-types/vec.md) (10 хвилин)\"\n\n#~ msgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\n#~ msgstr \"[HashMap](./std-types/hashmap.md) (10 хвилин)\"\n\n#~ msgid \"[Exercise: Counter](./std-types/exercise.md) (10 minutes)\"\n#~ msgstr \"[Вправа: Лічильник](./std-types/exercise.md) (10 хвилин)\"\n\n#~ msgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\n#~ msgstr \"[Порівняння](./std-traits/comparisons.md) (10 хвилин)\"\n\n#~ msgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\n#~ msgstr \"[Оператори](./std-traits/operators.md) (10 хвилин)\"\n\n#~ msgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\n#~ msgstr \"[From та Into](./std-traits/from-and-into.md) (10 хвилин)\"\n\n#~ msgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\n#~ msgstr \"[Приведення типів](./std-traits/casting.md) (5 хвилин)\"\n\n#~ msgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\n#~ msgstr \"[Read та Write](./std-traits/read-and-write.md) (10 хвилин)\"\n\n#~ msgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Default, синтаксис оновлення структур](./std-traits/default.md) (5 \"\n#~ \"хвилин)\"\n\n#~ msgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\n#~ msgstr \"[Закриття](./std-traits/closures.md) (20 хвилин)\"\n\n#~ msgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\n#~ msgstr \"[Вправа: ROT13](./std-traits/exercise.md) (30 хвилин)\"\n\n#~ msgid \"This segment should take about 1 hour and 40 minutes\"\n#~ msgstr \"Цей сегмент повинен зайняти близько 1 години 40 хвилин\"\n\n#~ msgid \"\\\"there\\\"\"\n#~ msgstr \"\\\"тобі\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](./welcome-day-3.md) (3 хвилини)\"\n\n#~ msgid \"[Memory Management](./memory-management.md) (1 hour and 10 minutes)\"\n#~ msgstr \"[Управління пам'яттю](./memory-management.md) (1 година 10 хвилин)\"\n\n#~ msgid \"[Smart Pointers](./smart-pointers.md) (45 minutes)\"\n#~ msgstr \"[Розумні вказівники](./smart-pointers.md) (45 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\n#~ msgstr \"[Огляд пам'яті програм](./memory-management/review.md) (5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Підходи до управління пам'яттю](./memory-management/approaches.md) (10 \"\n#~ \"хвилин)\"\n\n#~ msgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\n#~ msgstr \"[Володіння](./memory-management/ownership.md) (5 хвилин)\"\n\n#~ msgid \"[Move Semantics](./memory-management/move.md) (10 minutes)\"\n#~ msgstr \"[Семантика переміщення](./memory-management/move.md) (10 хвилин)\"\n\n#~ msgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\n#~ msgstr \"[Clone](./memory-management/clone.md) (2 хвилини)\"\n\n#~ msgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\n#~ msgstr \"[Типи які копіюються](./memory-management/copy-types.md) (5 хвилин)\"\n\n#~ msgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\n#~ msgstr \"[Drop](./memory-management/drop.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: тип конструктор](./memory-management/exercise.md) (20 хвилин)\"\n\n#~ msgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n#~ msgstr \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n\n#~ msgid \"[Box\"\n#~ msgstr \"[Box](./smart-pointers/box.md) \"\n\n#~ msgid \"](./smart-pointers/box.md) (10 minutes)\"\n#~ msgstr \" (10 хвилин)\"\n\n#~ msgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\n#~ msgstr \"[Rc](./smart-pointers/rc.md) (5 хвилин)\"\n\n#~ msgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\n#~ msgstr \"[Вправа: Бінарне дерево](./smart-pointers/exercise.md) (30 хвилин)\"\n\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. \"\n#~ \"This allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"`Box` не може бути порожнім, тому вказівник завжди дійсний і не є `null`. \"\n#~ \"Це дозволяє компілятору оптимізувати розташування пам'яті:\"\n\n#~ msgid \"[Borrowing](./borrowing.md) (1 hour)\"\n#~ msgstr \"[Запозичення](./borrowing.md) (1 година)\"\n\n#~ msgid \"\"\n#~ \"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Зрізи та тривалість життя](./slices-and-lifetimes.md) (1 година 10 \"\n#~ \"хвилин)\"\n\n#~ msgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\n#~ msgstr \"[Запозичення значення](./borrowing/shared.md) (10 хвилин)\"\n\n#~ msgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\n#~ msgstr \"[Перевірка запозичень](./borrowing/borrowck.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Внутрішня мутабельність](./borrowing/interior-mutability.md) (10 хвилин)\"\n\n#~ msgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)\"\n#~ msgstr \"[Вправа: Статистика здоров'я](./borrowing/exercise.md) (30 хвилин)\"\n\n#~ msgid \"The Rust compiler can do return value optimization (RVO).\"\n#~ msgstr \"Компілятор Rust може оптимізувати значення, що повертається (RVO).\"\n\n#~ msgid \"\"\n#~ \"In C++, copy elision has to be defined in the language specification \"\n#~ \"because constructors can have side effects. In Rust, this is not an issue \"\n#~ \"at all. If RVO did not happen, Rust will always perform a simple and \"\n#~ \"efficient `memcpy` copy.\"\n#~ msgstr \"\"\n#~ \"У C++ заборона копіювання повинна бути визначена в специфікації мови, \"\n#~ \"оскільки конструктори можуть мати побічні ефекти. У Rust це взагалі не \"\n#~ \"проблема. Якщо RVO не відбулося, Rust завжди виконуватиме просту та \"\n#~ \"ефективну копію `memcpy`.\"\n\n#~ msgid \"\\\"graph: {root:#?}\\\"\"\n#~ msgstr \"\\\"граф: {root:#?}\\\"\"\n\n#~ msgid \"\\\"graph sum: {}\\\"\"\n#~ msgstr \"\\\"сума графа: {}\\\"\"\n\n#~ msgid \"\"\n#~ \"`Rc` only allows shared (read-only) access to its contents, since its \"\n#~ \"purpose is to allow (and count) many references. But we want to modify \"\n#~ \"the value, so we need interior mutability.\"\n#~ msgstr \"\"\n#~ \"`Rc` дозволяє лише спільний (тільки для читання) доступ до свого вмісту, \"\n#~ \"оскільки його призначення - дозволяти (і рахувати) декілька посилань. Але \"\n#~ \"ми хочемо змінювати значення, тому нам потрібна внутрішня мутабельність.\"\n\n#~ msgid \"\"\n#~ \"Demonstrate that reference loops can be created by adding `root` to \"\n#~ \"`subtree.children`.\"\n#~ msgstr \"\"\n#~ \"Продемонструйте, що цикли посилань можна створити, додавши `root` до \"\n#~ \"`subtree.children`.\"\n\n#~ msgid \"\"\n#~ \"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n#~ \"`self.value` and calls the same method on its children. This will panic \"\n#~ \"in the presence of the reference loop, with `thread 'main' panicked at \"\n#~ \"'already borrowed: BorrowMutError'`.\"\n#~ msgstr \"\"\n#~ \"Щоб продемонструвати паніку під час виконання, додайте `fn inc(&mut \"\n#~ \"self)`, який збільшує `self.value` і викликає той самий метод для його \"\n#~ \"дітей. Це призведе до паніки за наявності циклу посилання, з `потоком \"\n#~ \"'main', який панікує з 'already borrowed: BorrowMutError'`.\"\n\n#~ msgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\n#~ msgstr \"[Зрізи: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 хвилин)\"\n\n#~ msgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\n#~ msgstr \"[Посилання на рядки](./slices-and-lifetimes/str.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) \"\n#~ \"(10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Анотації тривалісті життя](./slices-and-lifetimes/lifetime-annotations.\"\n#~ \"md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Усунення тривалості життя](./slices-and-lifetimes/lifetime-elision.md) \"\n#~ \"(5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Тривалість життя структур](./slices-and-lifetimes/struct-lifetimes.md) \"\n#~ \"(5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Синтаксичний розбір Protobuf](./slices-and-lifetimes/exercise.\"\n#~ \"md) (30 хвилин)\"\n\n#~ msgid \"\"\n#~ \"We can now understand the two string types in Rust: `&str` is almost like \"\n#~ \"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\n#~ msgstr \"\"\n#~ \"Тепер ми можемо зрозуміти два типи рядків у Rust: `&str` - це майже як \"\n#~ \"`&[char]`, але його дані зберігаються у кодуванні змінної довжини (UTF-8).\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Термінологія Rust:\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str` незмінне посилання на зріз рядка.\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` змінний буфер рядка.\"\n\n#~ msgid \"\\\"Unexpected wire-type)\\\"\"\n#~ msgstr \"\\\"Несподіваний wire-type)\\\"\"\n\n#~ msgid \"\\\"Invalid string (not UTF-8)\\\"\"\n#~ msgstr \"\\\"Неправильний рядок (не UTF-8)\\\"\"\n\n#~ msgid \"b\\\"hello\\\"\"\n#~ msgstr \"b\\\"привіт\\\"\"\n\n#~ msgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Ласкаво просимо](./welcome-day-4.md) (3 хвилини)\"\n\n#~ msgid \"[Iterators](./iterators.md) (45 minutes)\"\n#~ msgstr \"[Ітератори](./iterators.md) (45 хвилин)\"\n\n#~ msgid \"[Modules](./modules.md) (40 minutes)\"\n#~ msgstr \"[Модулі](./modules.md) (40 хвилин)\"\n\n#~ msgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\n#~ msgstr \"[Iterator](./iterators/iterator.md) (5 хвилин)\"\n\n#~ msgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\n#~ msgstr \"[IntoIterator](./iterators/intoiterator.md) (5 хвилин)\"\n\n#~ msgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\n#~ msgstr \"[FromIterator](./iterators/fromiterator.md) (5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Ланцюжок методів ітератора](./iterators/exercise.md) (30 хвилин)\"\n\n#~ msgid \"[Modules](./modules/modules.md) (5 minutes)\"\n#~ msgstr \"[Модулі](./modules/modules.md) (5 хвилин)\"\n\n#~ msgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\n#~ msgstr \"[Ієрархія файлової системи](./modules/filesystem.md) (5 хвилин)\"\n\n#~ msgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\n#~ msgstr \"[Видимість](./modules/visibility.md) (5 хвилин)\"\n\n#~ msgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\n#~ msgstr \"[use, super, self](./modules/paths.md) (10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Модулі для бібліотеки графічного інтерфейсу користувача](./\"\n#~ \"modules/exercise.md) (15 хвилин)\"\n\n#~ msgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\n#~ msgstr \"[Тестові модулі](./testing/unit-tests.md) (5 хвилин)\"\n\n#~ msgid \"[Other Types of Tests](./testing/other.md) (10 minutes)\"\n#~ msgstr \"[Інші види тестів](./testing/other.md) (10 хвилин)\"\n\n#~ msgid \"[Useful Crates](./testing/useful-crates.md) (3 minutes)\"\n#~ msgstr \"[Корисні крейти](./testing/useful-crates.md) (3 хвилини)\"\n\n#~ msgid \"[GoogleTest](./testing/googletest.md) (5 minutes)\"\n#~ msgstr \"[GoogleTest](./testing/googletest.md) (5 хвилин)\"\n\n#~ msgid \"[Mocking](./testing/mocking.md) (5 minutes)\"\n#~ msgstr \"[Імітування](./testing/mocking.md) (5 хвилин)\"\n\n#~ msgid \"[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)\"\n#~ msgstr \"[Лінти компілятора та Clippy](./testing/lints.md) (5 хвилин)\"\n\n#~ msgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\n#~ msgstr \"[Вправа: Алгоритм Луна](./testing/exercise.md) (30 хвилин)\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust поставляється лише з базовою підтримкою для написання тестів.\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"\"\n#~ \"Ось кілька додаткових крейтів, які ми рекомендуємо для написання тестів:\"\n\n#~ msgid \"\"\n#~ \"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n#~ \"library in the tradition of GoogleTest for C++.\"\n#~ msgstr \"\"\n#~ \"[googletest](https://docs.rs/googletest): комплексна бібліотека тестових \"\n#~ \"тверджень у традиціях GoogleTest для C++.\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"\"\n#~ \"[proptest](https://docs.rs/proptest): тестування на основі властивостей \"\n#~ \"для Rust.\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"\"\n#~ \"[rstest](https://docs.rs/rstest): підтримка фікстур і параметризованих \"\n#~ \"тестів.\"\n\n#~ msgid \"This just scratches the surface, there are many builtin matchers.\"\n#~ msgstr \"\"\n#~ \"Це лише поверхневий огляд, адже існує безліч вбудованих зрівнювачів.\"\n\n#~ msgid \"GoogleTest is available for use in AOSP.\"\n#~ msgstr \"GoogleTest доступний для використання в AOSP.\"\n\n#~ msgid \"[Error Handling](./error-handling.md) (45 minutes)\"\n#~ msgstr \"[Обробка помилок](./error-handling.md) (45 хвилин)\"\n\n#~ msgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Небезпечний Rust](./unsafe-rust.md) (1 година 5 хвилин)\"\n\n#~ msgid \"Including 10 minute breaks, this session should take about 2 hours\"\n#~ msgstr \"\"\n#~ \"Враховуючи 10-хвилинні перерви, ця сесія має тривати близько 2 годин\"\n\n#~ msgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\n#~ msgstr \"[Паніки](./error-handling/panics.md) (3 хвилини\"\n\n#~ msgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\n#~ msgstr \"[Оператор спроб](./error-handling/try.md) (5 хвилин)\"\n\n#~ msgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Перетворення спроб](./error-handling/try-conversions.md) (5 хвилин)\"\n\n#~ msgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\n#~ msgstr \"[Трейт Error](./error-handling/error.md) (5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[thiserror та anyhow](./error-handling/thiserror-and-anyhow.md) (5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Вправа: Переписування з Result](./error-handling/exercise.md) (20 хвилин)\"\n\n#~ msgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\n#~ msgstr \"[Unsafe](./unsafe-rust/unsafe.md) (5 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\n#~ msgstr \"\"\n#~ \"[Розіменування необроблених вказівників](./unsafe-rust/dereferencing.md) \"\n#~ \"(10 хвилин)\"\n\n#~ msgid \"\"\n#~ \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\n#~ msgstr \"\"\n#~ \"[Мутабельні статичні змінні](./unsafe-rust/mutable-static.md) (5 хвилин)\"\n\n#~ msgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\n#~ msgstr \"[Об'єднання](./unsafe-rust/unions.md) (5 хвилин)\"\n\n#~ msgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\n#~ msgstr \"[Небезпечні функції](./unsafe-rust/unsafe-functions.md) (5 хвилин)\"\n\n#~ msgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\n#~ msgstr \"[Небезпечні трейти](./unsafe-rust/unsafe-traits.md) (5 хвилин)\"\n\n#~ msgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\n#~ msgstr \"[Вправа: Обгортка FFI](./unsafe-rust/exercise.md) (30 хвилин)\"\n\n#~ msgid \"// Undefined behavior if abs misbehaves.\\n\"\n#~ msgstr \"// Невизначена поведінка, якщо abs поводиться неправильно.\\n\"\n\n#~ msgid \"// Safe because ...\\n\"\n#~ msgstr \"// Безпечно, тому що ...\\n\"\n\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"Додайте `vendor_available: true`, якщо ваш файл AIDL використовується \"\n#~ \"бінарний файлом у розділі постачальника.\"\n\n#~ msgid \"/// Connect to the BirthdayService.\\n\"\n#~ msgstr \"/// Підключення до BirthdayService.\\n\"\n\n#~ msgid \"\"\n#~ \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\n#~ msgstr \"\"\n#~ \"// БЕЗПЕКА: `print_card` безпечно викликати з дійсним покажчиком `card`.\\n\"\n\n#~ msgid \"ADC\"\n#~ msgstr \"АЦП\"\n\n#~ msgid \"I2C, SPI, UART, CAN\"\n#~ msgstr \"I2C, SPI, UART, CAN\"\n\n#~ msgid \"RNG\"\n#~ msgstr \"RNG\"\n\n#~ msgid \"Timers\"\n#~ msgstr \"Таймери\"\n\n#~ msgid \"Watchdogs\"\n#~ msgstr \"Наглядачі\"\n\n#~ msgid \"\"\n#~ \"There is work in progress on an `async` version of `embedded-hal`, but it \"\n#~ \"isn't stable yet.\"\n#~ msgstr \"\"\n#~ \"Виконується робота над `async` версією `embedded-hal`, але вона ще не є \"\n#~ \"стабільною.\"\n\n#~ msgid \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Налаштувати контролер I2C та блок інерційних вимірювань.\\n\"\n#~ \"    // TODO\\n\"\n\n#~ msgid \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Зчитати дані компаса і записати їх у послідовний порт.\\n\"\n#~ \"        // TODO\\n\"\n\n#~ msgid \"// TODO: Create instance of RTC driver and print current time.\\n\"\n#~ msgstr \"// TODO: Створити екземпляр драйвера RTC та вивести поточний час.\\n\"\n\n#~ msgid \"// TODO: Wait for 3 seconds.\\n\"\n#~ msgstr \"// TODO: Зачекати 3 секунди.\\n\"\n\n#~ msgid \"\\\"sync_exception_current\\\"\"\n#~ msgstr \"\\\"sync_exception_current\\\"\"\n\n#~ msgid \"\\\"irq_current\\\"\"\n#~ msgstr \"\\\"irq_current\\\"\"\n\n#~ msgid \"\\\"No pending interrupt\\\"\"\n#~ msgstr \"\\\"Немає очікуваного переривання\\\"\"\n\n#~ msgid \"\\\"IRQ {intid:?}\\\"\"\n#~ msgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#~ msgid \"\\\"fiq_current\\\"\"\n#~ msgstr \"\\\"fiq_current\\\"\"\n\n#~ msgid \"\\\"serr_current\\\"\"\n#~ msgstr \"\\\"serr_current\\\"\"\n\n#~ msgid \"\\\"sync_lower\\\"\"\n#~ msgstr \"\\\"sync_lower\\\"\"\n\n#~ msgid \"\\\"irq_lower\\\"\"\n#~ msgstr \"\\\"irq_lower\\\"\"\n\n#~ msgid \"\\\"fiq_lower\\\"\"\n#~ msgstr \"\\\"fiq_lower\\\"\"\n\n#~ msgid \"\\\"serr_lower\\\"\"\n#~ msgstr \"\\\"serr_lower\\\"\"\n\n#~ msgid \"// ANCHOR: main\\n\"\n#~ msgstr \"// ANCHOR: main\\n\"\n\n#~ msgid \"// ANCHOR: Flags\\n\"\n#~ msgstr \"// ANCHOR: Flags\\n\"\n\n#~ msgid \"// ANCHOR_END: Flags\\n\"\n#~ msgstr \"// ANCHOR_END: Flags\\n\"\n\n#~ msgid \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n#~ msgstr \"\"\n#~ \"/// Прапори з регістру стану отримання UART / регістр очищення помилок.\\n\"\n\n#~ msgid \"/// Framing error.\\n\"\n#~ msgstr \"/// Помилка фреймінгу.\\n\"\n\n#~ msgid \"/// Parity error.\\n\"\n#~ msgstr \"/// Помилка паритету.\\n\"\n\n#~ msgid \"/// Break error.\\n\"\n#~ msgstr \"/// Помилка переривання.\\n\"\n\n#~ msgid \"/// Overrun error.\\n\"\n#~ msgstr \"/// Помилка перевиконання.\\n\"\n\n#~ msgid \"// ANCHOR: Registers\\n\"\n#~ msgstr \"// ANCHOR: Registers\\n\"\n\n#~ msgid \"// ANCHOR_END: Registers\\n\"\n#~ msgstr \"// ANCHOR_END: Registers\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Драйвер для PL011 UART.\\n\"\n\n#~ msgid \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n#~ msgstr \"\"\n#~ \"/// Створює новий екземпляр драйвера UART для пристрою PL011 за заданою\\n\"\n#~ \"    /// базовою адресою.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Безпека\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// Зазначена базова адреса повинна вказувати на керуючі регістри \"\n#~ \"MMIO\\n\"\n#~ \"    /// пристрою PL011, які повинні бути відображені в адресному просторі \"\n#~ \"процесу\\n\"\n#~ \"    /// як пам'ять пристрою і не мати ніяких інших псевдонімів.\\n\"\n\n#~ msgid \"// ANCHOR_END: Uart\\n\"\n#~ msgstr \"// ANCHOR_END: Uart\\n\"\n\n#~ msgid \"\\\"linux\\\"\"\n#~ msgstr \"\\\"linux\\\"\"\n\n#~ msgid \"\\\"CROSS_COMPILE\\\"\"\n#~ msgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"\\\"aarch64-linux-gnu\\\"\"\n\n#~ msgid \"\\\"aarch64-none-elf\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#~ msgid \"\\\"entry.S\\\"\"\n#~ msgstr \"\\\"entry.S\\\"\"\n\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"\\\"exceptions.S\\\"\"\n\n#~ msgid \"\\\"idmap.S\\\"\"\n#~ msgstr \"\\\"idmap.S\\\"\"\n\n#~ msgid \"\\\"empty\\\"\"\n#~ msgstr \"\\\"empty\\\"\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic entry point for an image. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* Розмір гранул 4 KiB для TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* Розмір гранул 4 KiB для TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Вимкнути обхід таблиці перекладу для TTBR1_EL1, замість цього \"\n#~ \"генерувати помилку трансляції. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Обхід таблиці перекладу для TTBR0_EL1 є внутрішньо спільним. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Обхід таблиці трансляції для TTBR0_EL1 є зовнішнім зворотним записом \"\n#~ \"зчитуванням-виділенням записом-виділенням\\n\"\n#~ \" * з кешуванням.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Обхід таблиці трансляції для TTBR0_EL1 є внутрішнім зворотним записом \"\n#~ \"зчитуванням-виділенням записом-виділенням\\n\"\n#~ \" * з кешуванням.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Зміщення розміру для TTBR0_EL1 становить 2**39 байт (512 Гігабайт). \"\n#~ \"*/\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Кешування доступу до інструкцій етапу 1 не порушується. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* Помилка вирівнювання SP, якщо SP не вирівняно до межі 16 байт. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Кешування доступу до даних на етапі 1 не порушується. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 і EL1 етапу 1 MMU увімкнено. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never не змінюється, коли робиться виключення з EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* Інструкція SETEND відключена на EL0 у режимі aarch32. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* У режимі aarch32 на EL0 відключені різні ІТ-інструкції. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Це загальна точка входу для образу. Вона виконує операції, необхідні \"\n#~ \"для підготовки\\n\"\n#~ \" * завантаженого образу до запуску. Зокрема, обнуляє секцію bss за \"\n#~ \"допомогою регістрів x25 і вище,\\n\"\n#~ \" * готує стек, вмикає плаваючу крапку і налаштовує вектор виключень. Вона \"\n#~ \"зберігає x0-x3 для\\n\"\n#~ \" * точки входу у Rust, оскільки вони можуть містити параметри \"\n#~ \"завантаження.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Завантажує та застосовує конфігурацію керування пам'яттю, готові до \"\n#~ \"ввімкнення MMU та кешів. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Копіюємо підтримуваний діапазон PA у TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Перевіряємо все до завершення цього етапу, а потім робимо недійсними \"\n#~ \"всі потенційно застарілі\\n\"\n#~ \"\\t * локальні записи TLB, перш ніж вони почнуть використовуватися.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Налаштовуємо sctlr_el1, щоб увімкнути MMU і кеш, і не продовжуємо, \"\n#~ \"доки це не буде зроблено.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Вимкнути перехоплення доступу з плаваючою комою в EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Обнулити секцію bss. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Готуємо стек. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Настроюємо вектор виключень. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Виклик коду Rust. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Цикл з постійним очікуванням переривань. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Зберігає непостійні регістри у стеку. Наразі це займає 14 \\n\"\n#~ \" * інструкцій, тому його можна використовувати в обробниках винятків з 18 \"\n#~ \"інструкціями,\\n\"\n#~ \" * що залишилися.\\n\"\n#~ \" *\\n\"\n#~ \" * При поверненні x0 і x1 ініціалізуються значеннями elr_el2 і spsr_el2 \"\n#~ \"відповідно,\\n\"\n#~ \" * які можуть бути використані як перший і другий аргументи наступного \"\n#~ \"виклику.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Зарезервувати місце у стеку та зберегти регістри x0-x18, x29 та \"\n#~ \"x30. \\n\"\n#~ \"*/\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Зберігаємо elr_el1 та spsr_el1. Таким чином, ми можемо отримати \"\n#~ \"вкладені \\n\"\n#~ \"\\t * виключення і все ще мати можливість розмотати.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Відновлює непостійні регістри зі стеку. Наразі це займає 14 \"\n#~ \"інструкцій,\\n\"\n#~ \" * тому цей метод можна використовувати у обробниках виключень, залишаючи \"\n#~ \"18\\n\"\n#~ \" * інструкцій; у поєднанні з save_volatile_to_stack залишається ще 4\\n\"\n#~ \" * інструкції у запасі.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Відновити регістри x2-x18, x29 та x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Відновити регістри elr_el1 та spsr_el1, використовуючи x0 та x1 як \"\n#~ \"скретч.*/\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Відновити x0 та x1 і звільнити місце у стеку. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Це загальний обробник виключень, що виникають у поточному EL під час \"\n#~ \"використання\\n\"\n#~ \" * SP0. Він поводиться подібно до випадку SPx, спочатку перемикаючись на \"\n#~ \"SPx, виконуючи\\n\"\n#~ \" * роботу, а потім перемикаючись назад на SP0 перед поверненням.\\n\"\n#~ \" *\\n\"\n#~ \" * Перехід до SPx і виклик обробника Rust займає 16 інструкцій. Для\\n\"\n#~ \" * відновлення і повернення нам потрібно ще 16 інструкцій, тому ми можемо \"\n#~ \"реалізувати\\n\"\n#~ \" * весь обробник у межах виділених 32 інструкцій.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Це загальний обробник виключень, що виникають у поточному EL під час \"\n#~ \"використання\\n\"\n#~ \" * SPx. Він зберігає непостійні регістри, викликає обробник Rust, \"\n#~ \"відновлює непостійні\\n\"\n#~ \" * регістри, а потім повертається.\\n\"\n#~ \" *\\n\"\n#~ \" * Це також працює для виключень, отриманих з EL0, якщо нас не \"\n#~ \"цікавлять \\n\"\n#~ \" * постійні регістри.\\n\"\n#~ \" *\\n\"\n#~ \" * Збереження стану та перехід до обробника Rust займає 15 інструкцій, \\n\"\n#~ \" * відновлення та повернення також займає 15 інструкцій, тож ми можемо \"\n#~ \"вмістити\\n\"\n#~ \" * весь обробник у 30 інструкцій, при обмеженні у 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Код почне виконуватися з цього символу, який розміщено на початку * \"\n#~ \"образу.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Збираємо код разом.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Збираємо разом дані тільки для читання..\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Збираємо разом дані для читання і запису, включаючи .bss в кінці,\\n\"\n#~ \"\\t * який буде обнулено кодом входу.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * Код точки входу передбачає, що .data має довжину, кратну 32\\n\"\n#~ \"\\t\\t * байтам.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * Все, що знаходиться за цією точкою, не буде включено до бінарного\\n\"\n#~ \"\\t\\t * файлу.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Код точки входу передбачає, що .bss вирівняно по 16 байтів. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Видалити з образу невикористані секції.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* Образ завантажується сам, тому йому не потрібні ці секції. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"# Copyright 2023 Google LLC\"\n#~ msgstr \"# Copyright 2023 Google LLC\"\n\n#~ msgid \"$(shell uname -s)\"\n#~ msgstr \"$(shell uname -s)\"\n\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-linux-gnu\"\n\n#~ msgid \"stdio -display none -kernel $< -s\"\n#~ msgstr \"stdio -display none -kernel $< -s\"\n\n#~ msgid \"cargo clean\"\n#~ msgstr \"cargo clean\"\n\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 --- the main \"\n#~ \"thread is not waiting.\"\n#~ msgstr \"\"\n#~ \"Зверніть увагу, що потік зупиняється, не досягнувши 10 --- головний потік \"\n#~ \"не чекає.\"\n\n#~ msgid \"\"\n#~ \"Rust uses the type system to enforce synchronization of shared data. This \"\n#~ \"is primarily done via two types:\"\n#~ msgstr \"\"\n#~ \"Rust використовує систему типів для забезпечення синхронізації спільних \"\n#~ \"даних. В першу чергу це робиться за допомогою двох типів:\"\n\n#~ msgid \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n#~ \"reference counted `T`: handles sharing between threads and takes care to \"\n#~ \"deallocate `T` when the last reference is dropped,\"\n#~ msgstr \"\"\n#~ \"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), атомарний \"\n#~ \"підрахунок посилань `T`: обробляє спільне використання між потоками і \"\n#~ \"дбає про звільнення `T` при видаленні останнього посилання,\"\n\n#~ msgid \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"ensures mutually exclusive access to the `T` value.\"\n#~ msgstr \"\"\n#~ \"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): \"\n#~ \"забезпечує взаємовиключний доступ до значення `T`.\"\n\n#~ msgid \"Let us practice our new concurrency skills with\"\n#~ msgstr \"Давайте потренуємо наші нові навички одночасного використання з\"\n\n#~ msgid \"Dining philosophers: a classic problem in concurrency.\"\n#~ msgstr \"Вечеря філософів: класична проблема одночасного виконання.\"\n\n#~ msgid \"\"\n#~ \"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n#~ \"download dependencies and then check links in parallel.\"\n#~ msgstr \"\"\n#~ \"Багатопотокова перевірка лінків: більший проект, у якому ви \"\n#~ \"використовуватимете Cargo для завантаження залежностей, а потім \"\n#~ \"паралельно перевірятимете лінкі.\"\n\n#~ msgid \"\"\n#~ \"For this, you will need an HTTP client such as [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency \"\n#~ \"with:\"\n#~ msgstr \"\"\n#~ \"Для цього вам знадобиться HTTP-клієнт, наприклад [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Створіть новий проект Cargo та додайте `reqwest` до нього \"\n#~ \"як залежність за допомогою:\"\n\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://\"\n#~ \"docs.rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"Вам також знадобиться спосіб пошуку лінків. Для цього ми можемо \"\n#~ \"використовувати [`scraper`](https://docs.rs/scraper/):\"\n\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"Нарешті, нам знадобиться якийсь спосіб обробки помилок. Ми використовуємо \"\n#~ \"[`thiserror`](https://docs.rs/thiserror/) для цього:\"\n\n#~ msgid \"Concurrency Morning Exercise\"\n#~ msgstr \"Ранкова вправа одночасного виконання\"\n\n#~ msgid \"([back to exercise](dining-philosophers.md))\"\n#~ msgstr \"([назад до вправи](dining-philosophers.md))\"\n\n#~ msgid \"([back to exercise](link-checker.md))\"\n#~ msgstr \"([назад до вправи](link-checker.md))\"\n\n#~ msgid \"Async Rust\"\n#~ msgstr \"Асинхронний (Async) Rust\"\n\n#~ msgid \"Futures Control Flow\"\n#~ msgstr \"Потік керування ф'ючерсами\"\n\n#~ msgid \"\"\n#~ \"Futures can be combined together to produce concurrent compute flow \"\n#~ \"graphs. We have already seen tasks, that function as independent threads \"\n#~ \"of execution.\"\n#~ msgstr \"\"\n#~ \"Ф’ючерси можна об’єднувати, щоб створювати графи потоків одночасних \"\n#~ \"обчислень. Ми вже бачили завдання, які функціонують як незалежні потоки \"\n#~ \"виконання.\"\n\n#~ msgid \"[Join](control-flow/join.md)\"\n#~ msgstr \"[Join](control-flow/join.md)\"\n\n#~ msgid \"[Select](control-flow/select.md)\"\n#~ msgstr \"[Select](control-flow/select.md)\"\n\n#~ msgid \"Pitfalls of async/await\"\n#~ msgstr \"Підводні камені async/await\"\n\n#~ msgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\n#~ msgstr \"[Блокування виконавця](pitfalls/blocking-executor.md)\"\n\n#~ msgid \"[Pin](pitfalls/pin.md)\"\n#~ msgstr \"[Pin](pitfalls/pin.md)\"\n\n#~ msgid \"[Async Traits](pitfalls/async-traits.md)\"\n#~ msgstr \"[Асинхронні трейти](pitfalls/async-traits.md)\"\n\n#~ msgid \"[Cancellation](pitfalls/cancellation.md)\"\n#~ msgstr \"[Скасування](pitfalls/cancellation.md)\"\n\n#~ msgid \"\"\n#~ \"Async methods in traits are not yet supported in the stable channel ([An \"\n#~ \"experimental feature exists in nightly and should be stabilized in the \"\n#~ \"mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-\"\n#~ \"trait-nightly.html))\"\n#~ msgstr \"\"\n#~ \"Асинхронні методи в трейтах ще не підтримуються в стабільному каналі \"\n#~ \"([Експериментальна можливість існує в nightly і має бути стабілізована в \"\n#~ \"середньостроковій перспективі.](https://blog.rust-lang.org/inside-\"\n#~ \"rust/2022/11)/17/async-fn-in-trait-nightly.html))\"\n\n#~ msgid \"\"\n#~ \"To practice your Async Rust skills, we have again two exercises for you:\"\n#~ msgstr \"\"\n#~ \"Щоб відпрацювати свої навички Async Rust, ми знову пропонуємо вам дві \"\n#~ \"вправи:\"\n\n#~ msgid \"\"\n#~ \"Dining philosophers: we already saw this problem in the morning. This \"\n#~ \"time you are going to implement it with Async Rust.\"\n#~ msgstr \"\"\n#~ \"Вечеря філософів: ми вже бачили цю проблему вранці. Цього разу ви \"\n#~ \"збираєтеся реалізувати це за допомогою Async Rust.\"\n\n#~ msgid \"\"\n#~ \"A Broadcast Chat Application: this is a larger project that allows you \"\n#~ \"experiment with more advanced Async Rust features.\"\n#~ msgstr \"\"\n#~ \"Програма широкомовного чату: це більший проект, який дозволяє \"\n#~ \"експериментувати з розширенішими функціями Async Rust.\"\n\n#~ msgid \"Concurrency Afternoon Exercise\"\n#~ msgstr \"Вправа з одночасного виконання: Полудень\"\n\n#~ msgid \"([back to exercise](dining-philosophers-async.md))\"\n#~ msgstr \"([назад до вправи](dining-philosophers-async.md))\"\n\n#~ msgid \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n#~ msgstr \"\"\n#~ \"// Додати затримку перед вибором другої розвилки, щоб дати можливість\\n\"\n#~ \"        // перевести виконання на інше завдання\\n\"\n\n#~ msgid \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n#~ msgstr \"\"\n#~ \"// Щоб уникнути глухого кута, ми повинні порушити симетрію\\n\"\n#~ \"            // десь. Це дозволить поміняти місцями виделки без\\n\"\n#~ \"            // деініціалізації жодної з них.\\n\"\n\n#~ msgid \"([back to exercise](chat-app.md))\"\n#~ msgstr \"([назад до вправи](chat-app.md))\"\n\n#~ msgid \"Exercise: GUI Library\"\n#~ msgstr \"Вправа: Бібліотека графічного інтерфейсу користувача\"\n\n#~ msgid \"With C++)\"\n#~ msgstr \"З С++\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects. We'll only implement the drawing of it (as text) for \"\n#~ \"simplicity.\"\n#~ msgstr \"\"\n#~ \"Давайте розробимо класичну бібліотеку GUI, використовуючи наші нові \"\n#~ \"знання про ознаки та об’єкти ознак.\"\n\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"У нашій бібліотеці буде декілька віджетів:\"\n\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Вікно`: має `заголовок` і містить інші віджети.\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`: має `label`.\"\n\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"Віджети реалізують властивість «Віджет», див. нижче.\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"Скопіюйте наведений нижче код до <https://play.rust-lang.org/>, заповніть \"\n#~ \"відсутні методи `draw_into`, щоб реалізувати властивість `Widget`:\"\n\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"Вихід вищезазначеної програми може бути таким простим:\"\n\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"Якщо ви хочете намалювати вирівняний текст, ви можете використовувати \"\n#~ \"оператори форматування [fill/alignment](https://doc.rust-lang.org/std/fmt/\"\n#~ \"index.html#fillalignment). Зокрема, зверніть увагу на те, як ви можете \"\n#~ \"додавати різні символи (тут `'/'`) і як ви можете керувати вирівнюванням:\"\n\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"\"\n#~ \"Використовуючи такі трюки вирівнювання, ви можете, наприклад, створити \"\n#~ \"такий вихід:\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` і `RefCell`\"\n\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) і \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell /struct.RefCell.html) \"\n#~ \"реалізує те, що Rust називає _внутрішньою мінливістю:_ мутація значень у \"\n#~ \"незмінному контексті.\"\n\n#~ msgid \"\"\n#~ \"`Cell` is typically used for simple types, as it requires copying or \"\n#~ \"moving values. More complex interior types typically use `RefCell`, which \"\n#~ \"tracks shared and exclusive references at runtime and panics if they are \"\n#~ \"misused.\"\n#~ msgstr \"\"\n#~ \"`Cell` зазвичай використовується для простих типів, оскільки вимагає \"\n#~ \"копіювання або переміщення значень. Більш складні внутрішні типи зазвичай \"\n#~ \"використовують `RefCell`, який відстежує спільні та ексклюзивні посилання \"\n#~ \"під час виконання та панікує, якщо вони використовуються неправильно.\"\n\n#~ msgid \"\"\n#~ \"If we were using `Cell` instead of `RefCell` in this example, we would \"\n#~ \"have to move the `Node` out of the `Rc` to push children, then move it \"\n#~ \"back in. This is safe because there's always one, un-referenced value in \"\n#~ \"the cell, but it's not ergonomic.\"\n#~ msgstr \"\"\n#~ \"Якби ми використовували `Cell` замість `RefCell` у цьому прикладі, нам \"\n#~ \"довелося б перемістити `Node` з `Rc`, щоб перемістити дочірні елементи, а \"\n#~ \"потім перемістити його назад. Це безпечно, тому що завжди є один, -\"\n#~ \"посилальне значення в комірці, але це не ергономічно.\"\n\n#~ msgid \"\"\n#~ \"To do anything with a Node, you must call a `RefCell` method, usually \"\n#~ \"`borrow` or `borrow_mut`.\"\n#~ msgstr \"\"\n#~ \"Щоб зробити будь-що з вузлом, ви повинні викликати метод `RefCell`, \"\n#~ \"зазвичай `borrow` або `borrow_mut`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The return type of the function has to be compatible with the nested \"\n#~ \"functions it calls. For instance, a function returning a `Result<T, Err>` \"\n#~ \"can only apply the `?` operator on a function returning a `Result<AnyT, \"\n#~ \"Err>`. It cannot apply the `?` operator on a function returning an \"\n#~ \"`Option<AnyT>` or `Result<T, OtherErr>` unless `OtherErr` implements \"\n#~ \"`From<Err>`. Reciprocally, a function returning an `Option<T>` can only \"\n#~ \"apply the `?` operator on a function returning an `Option<AnyT>`.\"\n#~ msgstr \"\"\n#~ \"Тип повернення функції має бути сумісним із вкладеними функціями, які \"\n#~ \"вона викликає. Наприклад, функція, яка повертає `Result<T, Err>`, може \"\n#~ \"застосовувати лише оператор `?` до функції, яка повертає `Result<AnyT, \"\n#~ \"Err>`. Він не може застосувати оператор `?` до функції, яка повертає \"\n#~ \"`Option<AnyT>` або `Result<T, OtherErr>`, якщо `OtherErr` не реалізує \"\n#~ \"`From<Err>`. Відповідно, функція, яка повертає `Option<T>`, може \"\n#~ \"застосовувати лише оператор `?` до функції, яка повертає `Option<AnyT>`.\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can convert incompatible types into one another with the different \"\n#~ \"`Option` and `Result` methods such as `Option::ok_or`, `Result::ok`, \"\n#~ \"`Result::err`.\"\n#~ msgstr \"\"\n#~ \"Ви можете конвертувати несумісні типи один в інший за допомогою різних \"\n#~ \"методів `Option` і `Result`, таких як `Option::ok_or`, `Result::ok`, \"\n#~ \"`Result::err`.\"\n\n#~ msgid \"\"\n#~ \"It is good practice for all error types that don't need to be `no_std` to \"\n#~ \"implement `std::error::Error`, which requires `Debug` and `Display`. The \"\n#~ \"`Error` crate for `core` is only available in [nightly](https://github.\"\n#~ \"com/rust-lang/rust/issues/103765), so not fully `no_std` compatible yet.\"\n#~ msgstr \"\"\n#~ \"Це хороша практика для всіх типів помилок, які не потребують `no_std`, \"\n#~ \"щоб реалізувати `std::error::Error`, для якого потрібні `Debug` і \"\n#~ \"`Display`. Ящик `Error` для `core` доступний лише в [nightly](https://\"\n#~ \"github.com/rust-lang/rust/issues/103765), тому ще не повністю сумісний з \"\n#~ \"`no_std`.\"\n\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"Їм, як правило, корисно застосовувати `Clone` і `Eq`, де це можливо, щоб \"\n#~ \"полегшити життя тестам і споживачам вашої бібліотеки. У цьому випадку ми \"\n#~ \"не можемо легко зробити це, оскільки `io::Error` не реалізує їх.\"\n\n#~ msgid \"`thiserror`  and `anyhow`\"\n#~ msgstr \"`thiserror` і `anyhow`\"\n\n#~ msgid \"\"\n#~ \"When you await a future, all local variables (that would ordinarily be \"\n#~ \"stored on a stack frame) are instead stored in the Future for the current \"\n#~ \"async block. If your future has pointers to data on the stack, those \"\n#~ \"pointers might get invalidated. This is unsafe.\"\n#~ msgstr \"\"\n#~ \"Коли ви очікуєте майбутнього, усі локальні змінні (які зазвичай \"\n#~ \"зберігаються у фреймі стеку) натомість зберігаються у майбутньому для \"\n#~ \"поточного асинхронного блоку. Якщо ваше майбутнє має вказівники на дані в \"\n#~ \"стеку, ці вказівники можуть стати недійсними. Це небезпечно.\"\n\n#~ msgid \"\"\n#~ \"Therefore, you must guarantee that the addresses your future points to \"\n#~ \"don't change. That is why we need to \\\"pin\\\" futures. Using the same \"\n#~ \"future repeatedly in a `select!` often leads to issues with pinned values.\"\n#~ msgstr \"\"\n#~ \"Тому ви повинні гарантувати, що адреси, на які ви вказує ф'ючерс, не \"\n#~ \"зміняться. Тому нам потрібно  \\\"закріпити\\\" ф'ючерси. Повторне \"\n#~ \"використання одного і того ж ф'ючерс в `select!` часто призводить до \"\n#~ \"проблем із закріпленими значеннями.\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"Невеликий Приклад\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"Чому Rust?\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"Гарантії під час компіляції\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"Гарантії під час виконання\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"Сучасні можливості\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"Базовий синтаксис\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String та str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"Перевантаження\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"Масиви та цикли for\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"вирази if\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"вирази for\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"вирази while\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break та continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"цикли\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"Варіанти зі значенням\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"Розміри перелічуваних типів\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"вирази if let\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"вирази while let\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"вирази match\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"Деструктурування масивів\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"Умовні запобіжники\"\n\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"Зіставлення зразків\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"Стек та Купа\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"Стекова пам'ять\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"Ручне управління пам'яттю\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"Управління памяттю на основі областей видимості\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"Збирання сміття\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Управління пам'яттю в Rust\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Переміщені стрічки в Rust\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"Подвійні вивільнення в сучасному C++\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"Переміщення у викликах функцій\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"Копіювання та клонування\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"Спільні та унікальні запозичення\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"Скорочений синтаксис полів структур\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"Зберігання книжок\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option та Result\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"Рекурсивні типи даних\"\n\n#~ msgid \"Cell/RefCell\"\n#~ msgstr \"Cell/RefCell\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"Ітератори та володіння\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"Стрічки та ітератори\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"Узагальнені методи\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"Мономорфізація\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"Методи за замовчуванням\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"Важливі трейти\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Трейт `Default`\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"Оператори: Add, Mul, ...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"Замикання: Fn, FnMut, FnOnce\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"Точки і багатокутники\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"Перехоплення розмотування стека\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"Структурована обробка помилок\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"Розповсюдження помилок за допомогою ?\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"Перетворення типів помилок\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"Наслідування перечислюваних типів помилок\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"Додавання контексту до помилок\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"виділення\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"probe-rs, cargo-embed\"\n#~ msgstr \"probe-rs, cargo-embed\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"нульова копія\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"spin\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"День 1 Ранок\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"День 1 Після обіду\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"День 2 Ранок\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"День 2 Після обіду\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"День 3 Ранок\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"День 3 Після обіду\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Rust на голому залізі Ранок\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"Одночасний Ранок\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"Одночасний обід\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"\"\n#~ \"День 1: Базовий Rust, синтаксис, потік керування, створення та \"\n#~ \"використання значень.\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"\"\n#~ \"День 2: Управління пам’яттю, володіння, складові типи даних, стандартна \"\n#~ \"бібліотека.\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"День 3: Трейти та узагальнення, обробка помилок, тестування, небезпечний \"\n#~ \"Rust.\"\n\n#~ msgid \"\"\n#~ \"We suggest using [VS Code](https://code.visualstudio.com/) to edit the \"\n#~ \"code (but any LSP compatible editor works with rust-analyzer[3](https://\"\n#~ \"rust-analyzer.github.io/)).\"\n#~ msgstr \"\"\n#~ \"Ми пропонуємо використовувати [VS Code](https://code.visualstudio.com/) \"\n#~ \"для редагування коду (однак будь-який LSP сумісний редактор працює з rust-\"\n#~ \"analyzer[3](https://rust-analyzer.github.io/).\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"Декому також подобається використовувати сімейство IDE [JetBrains]\"\n#~ \"(https://www.jetbrains.com/clion/), які виконують власний аналіз, але \"\n#~ \"мають свої особливості. Якщо ви вважаєте за краще, ви можете встановити \"\n#~ \"[Rust Plugin](https://www.jetbrains.com/rust/). Зверніть увагу, що станом \"\n#~ \"на січень 2023 року налагодження працює тільки в CLion.\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"Конструкції потоку керування: `if`, `if let`, `while`, `while let`, \"\n#~ \"`break` та `continue`.\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"Ідея першого дня полягає в тому, щоб показати _рівно стільки_ Rust, щоб \"\n#~ \"можна було говорити про знамениту перевірку позик. Те, як Rust обробляє \"\n#~ \"пам’ять, є головною особливістю, і ми повинні негайно показати це \"\n#~ \"студентам.\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"Якщо ви викладаєте це в класі, це гарне місце, щоб переглянути розклад. \"\n#~ \"Пропонуємо розділити день на дві частини (за слайдами):\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"Ранок: з 9:00 до 12:00,\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"Післяобідній час: з 13:00 до 16:00.\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"Ви, звичайно, можете налаштувати це за потреби. Будь ласка, обов’язково \"\n#~ \"передбачте перерви, ми рекомендуємо перерву щогодини!\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"Ось невеликий приклад програми в Rust:\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"Код реалізує гіпотезу Коллатца: вважається, що цикл завжди закінчується, \"\n#~ \"але це ще не доведено. Редагуйте код та пограйте з різними введеннями.\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"Поясніть, що всі змінні мають статичний тип. Спробуйте видалити `i32`, \"\n#~ \"щоб активувати визначення типу. Натомість спробуйте використати `i8` і \"\n#~ \"запустіть цілочисельне переповнення під час виконання.\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"Змініть `let mut x` на `let x`, обговоріть помилку компілятора.\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"\"\n#~ \"Покажіть, як `print!` видає помилку компіляції, якщо аргументи не \"\n#~ \"відповідають рядку формату.\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"Покажіть, як вам потрібно використовувати `{}` як заповнювач, якщо ви \"\n#~ \"хочете надрукувати вираз, складніший за одну змінну.\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"Покажіть студентам стандартну бібліотеку, покажіть їм, як шукати `std::\"\n#~ \"fmt`, який містить правила міні-мови форматування. Важливо, щоб учні \"\n#~ \"ознайомилися з пошуком у стандартній бібліотеці.\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"У оболонці `rustup doc std::fmt` відкриє браузер локальної документації \"\n#~ \"std::fmt\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"Безпека пам'яті часу компіляції.\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"Відсутність невизначеної поведінки під час виконання.\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"Сучасні мовні особливості.\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"Cтатичне керування пам'яттю під час компіляції:\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"Немає витоків пам'яті (_переважно_, дивитится примітки).\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"У (безпечному) Rust можливі витоки пам’яті. Деякі приклади:\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"Ви можете використовувати [`Box::leak`](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html#method.leak) для витоку вказівника. Це може бути \"\n#~ \"використано для отримання статичних змінних, ініціалізованих під час \"\n#~ \"виконання та з розміром під час виконання\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"Ви можете використовувати [`std::mem::forget`](https://doc.rust-lang.org/\"\n#~ \"std/mem/fn.forget.html), щоб змусити компілятор «забути» про значення \"\n#~ \"(тобто деструктор ніколи не запускається).\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"Ви також можете випадково створити [довідковий цикл](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) за допомогою `Rc` або `Arc`.\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"По факту, дехто вважатиме нескінченне заповнення колекції витоком \"\n#~ \"пам’яті, і Rust від цього не захищає.\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"Для цілей цього курсу «Немає витоків пам’яті» слід розуміти як «Майже \"\n#~ \"ніяких _випадкових_ витоків пам’яті».\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"Цілочисельне переповнення визначається за допомогою позначки [`overflow-\"\n#~ \"checks`](https://doc.rust-lang.org/rustc/codegen-options/index.\"\n#~ \"html#overflow-checks) під час компіляції. Якщо ввімкнене, програма буде \"\n#~ \"панікувати (контрольований збій програми), інакше ви отримаєте семантику \"\n#~ \"обертання. За замовчуванням ви отримуєте паніку в режимі налагодження \"\n#~ \"(`cargo build`) і обертання в режимі випуску (`cargo build --release`).\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"Перевірку меж не можна вимкнути за допомогою позначки компілятора. Ії \"\n#~ \"також не можна вимкнути безпосередньо за допомогою ключового слова \"\n#~ \"`unsafe`. Однак `unsafe` дозволяє викликати такі функції, як `slice::\"\n#~ \"get_unchecked`, яка не виконує перевірку меж.\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust будується з усім досвідом, набутим за останні десятиліття.\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"Особливості мови\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"Інструменти\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"Абстракції без витрат, подібні до C++, означають, що вам не потрібно \"\n#~ \"«платити» за конструкції програмування вищого рівня за допомогою пам’яті \"\n#~ \"чи процесора. Наприклад, написання циклу за допомогою `for` має призвести \"\n#~ \"до приблизно тих самих інструкцій низького рівня, що й використання \"\n#~ \"конструкції `.iter().fold()`.\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"Можливо, варто згадати, що переліки Rust — це «алгебраїчні типи даних», \"\n#~ \"також відомі як «типи сум», які дозволяють системі типів виражати такі \"\n#~ \"речі, як «Option<T>» та «Result<T, E>».\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"Нагадайте людям читати помилки --- багато розробників звикли ігнорувати \"\n#~ \"довгий вихід компілятора. Компілятор Rust значно балакучіший, ніж інші \"\n#~ \"компілятори. Він часто надає вам _дієві_ відгуки, готові до копіювання та \"\n#~ \"вставки у ваш код.\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"Стандартна бібліотека Rust невелика порівняно з такими мовами, як Java, \"\n#~ \"Python і Go. У Rust немає кількох речей, які ви можете вважати \"\n#~ \"стандартними та важливими:\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"\"\n#~ \"генератор випадкових чисел, але дивится [rand](https://docs.rs/rand/).\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"\"\n#~ \"підтримка SSL або TLS, але дивится [rusttls](https://docs.rs/rustls/).\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"підтримка JSON, але дивится [serde_json](https://docs.rs/serde_json/).\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Причиною цього є те, що функціональність стандартної бібліотеки не може \"\n#~ \"зникнути, тому вона має бути дуже стабільною. Для наведених вище \"\n#~ \"прикладів спільнота Rust все ще працює над пошуком найкращого рішення --- \"\n#~ \"і, можливо, для деяких із цих речей не існує єдиного \\\"найкращого рішення\"\n#~ \"\\\".\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust постачається з вбудованим менеджером пакетів у формі Cargo, і це \"\n#~ \"спрощує завантаження та компіляцію крейтів сторонніх розробників. \"\n#~ \"Наслідком цього є те, що стандартна бібліотека може бути меншою.\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"Виявлення хороших крейтів сторонніх виробників може бути проблемою. Такі \"\n#~ \"сайти, як <https://lib.rs/>, допомагають у цьому, дозволяючи порівнювати \"\n#~ \"показники здоров’я крейтів, щоб знайти хороший і надійний.\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) — це добре підтримувана \"\n#~ \"реалізація LSP, яка використовується в основних IDEs і текстових \"\n#~ \"редакторах.\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`, `\\\"два\\\\nрядки\\\"`\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"Як і C++, Rust має посилання:\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"Ми повинні розіменувати `ref_x` під час присвоєння, подібно до \"\n#~ \"вказівників C і C++.\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"Посилання, оголошені як `mut`, можуть бути пов’язані з різними значеннями \"\n#~ \"протягом свого життя.\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"Кажуть, що посилання «позичає» значення, на яке воно посилається.\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"\"\n#~ \"Rust відстежує терміни життя всіх посилань, щоб переконатися, що вони \"\n#~ \"живуть достатньо довго.\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` проти `str`\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"\"\n#~ \"Ви можете запозичити зріз `&str` з `String` через `&` і, за бажанням, \"\n#~ \"вибіру діапазону.\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"Rust-версія відомого запитання для інтерв’ю [FizzBuzz](https://en.\"\n#~ \"wikipedia.org/wiki/Fizz_buzz):\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"У `main` ми посилаємося на функцію, написану нижче. Ні попередні \"\n#~ \"оголошення, ні заголовки не потрібні.\"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"Вираз діапазону в циклі `for` у `print_fizzbuzz_to()` містить `=n`, що \"\n#~ \"змушує його включати верхню межу.\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"\"\n#~ \"Усі мовні елементи в Rust можна задокументувати за допомогою спеціального \"\n#~ \"синтаксису `///`.\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"Цей курс не містить rustdoc на слайдах, щоб заощадити місце, але в \"\n#~ \"реальному коді вони повинні бути присутніми.\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"\"\n#~ \"Коментарі до внутрішніх документів обговорюються пізніше (на сторінці \"\n#~ \"модулів), і їх тут не потрібно розглядати.\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"Коментарі rustdoc можуть містити фрагменти коду, які ми можемо запускати \"\n#~ \"та тестувати за допомогою `cargo test`. Ми обговоримо ці тести в [розділі \"\n#~ \"тестування](../testing/doc-tests.html).\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"Методи — це функції, які пов’язані з типом. Аргумент `self` методу є \"\n#~ \"екземпляром типу, з яким він пов’язаний:\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"\"\n#~ \"Ми розглянемо методи набагато детальніше в сьогоднішній вправі та на \"\n#~ \"завтрашньому уроці.\"\n\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"\"\n#~ \"Додайте статичний метод під назвою `Rectangle::new` і викличте його із \"\n#~ \"`main`:\"\n\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"Хоча _технічно_, Rust не має нестандартних конструкторів, для \"\n#~ \"ініціалізації структур зазвичай використовуються статичні методи (але це \"\n#~ \"не обов’язково). Фактичний конструктор, `Rectangle { width, height }`, \"\n#~ \"можна викликати безпосередньо. Перегляньте [Rustnomicon](https://doc.rust-\"\n#~ \"lang.org/nomicon/constructors.html).\"\n\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"Додайте конструктор `Rectangle::square(width: u32)`, щоб проілюструвати, \"\n#~ \"що такі статичні методи можуть приймати будь-яки параметри.\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"Перевантаження функцій\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Перевантаження не підтримується:\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"Завжди приймає фіксовану кількість параметрів.\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"Значення за замовчуванням не підтримуються:\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"Усі сайти викликів мають однакову кількість аргументів.\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"Макроси іноді використовуються як альтернатива.\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"Однак параметри функції можуть бути узагальнені:\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"При використанні узагальнених типів, `Into<T>` зі стандартної бібліотеки  \"\n#~ \"може забезпечити певний обмежений поліморфізм типів аргументів. Ми \"\n#~ \"побачимо більше деталей у наступному розділі.\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"День 1: Ранкова зарядка\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"У цих вправах ми дослідимо дві частини Rust:\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"Неявні перетворення між типами.\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"Масиви та цикли `for`.\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"Кілька речей, які слід враховувати під час вирішення вправ:\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"Використовуйте локальну установку Rust, якщо можливо. Таким чином ви \"\n#~ \"можете отримати автозаповнення у своєму редакторі. Перегляньте сторінку \"\n#~ \"про [Використання Cargo](../../cargo.md), щоб дізнатися більше про \"\n#~ \"встановлення Rust.\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"Як варіант, скористайтеся Rust Playground.\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"Фрагменти коду не можна редагувати навмисно: вбудовані фрагменти коду \"\n#~ \"втрачають свій стан, якщо ви переходите зі сторінки.\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust не застосовуватиме автоматично _неявні перетворення_ між типами ([на \"\n#~ \"відміну від C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). Ви можете побачити це в такій програмі:\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Усі цілі типи Rust реалізують [`From<T>`](https://doc.rust-lang.org/std/\"\n#~ \"convert/trait.From.html) і [`Into<T>`](https: //doc.rust-lang.org/std/\"\n#~ \"convert/trait.Into.html) трейти, щоб ми могли конвертувати між ними. \"\n#~ \"Трейт `From<T>` має єдиний метод `from()`, а трейт `Into<T>` має один \"\n#~ \"метод `into()`. Реалізація цих трейтів є тим засобом, яким тип виражає, \"\n#~ \"що його можна перетворити на інший тип.\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"Стандартна бібліотека має реалізацію `From<i8> для i16`, що означає, що \"\n#~ \"ми можемо перетворити змінну `x` типу `i8` на `i16`, викликавши `i16::\"\n#~ \"from(x)`. Або, простіше, з `x.into()`, оскільки реалізація `From<i8> для \"\n#~ \"i16` автоматично створює реалізацію `Into<i16> для i8`.\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"Те саме стосується і ваших власних реалізацій `From` для ваших власних \"\n#~ \"типів, тому достатньо реалізувати лише `From`, щоб автоматично отримати \"\n#~ \"відповідну реалізацію `Into`.\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"\"\n#~ \"Виконайте наведену вище програму та подивіться на помилку компілятора.\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"\"\n#~ \"Оновіть код вище таким чином, щоб використовувати `into()` для виконання \"\n#~ \"перетворення.\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"Змініть типи `x` і `y` на інші речі (наприклад, `f32`, `bool`, `i128`), \"\n#~ \"щоб побачити, які типи можна перетворити на інші типи. Спробуйте \"\n#~ \"перетворити малі типи на великі типи і навпаки. Подивіться [документацію \"\n#~ \"стандартної бібліотеки](https://doc.rust-lang.org/std/convert/trait.From.\"\n#~ \"html), щоб перевірити, чи реалізовано `From<T>` для пар типів, які ви \"\n#~ \"перевіряєте.\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"Масиви та цикли `for`\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"Ми побачили, що масив можна декларувати так:\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"\"\n#~ \"Ви можете надрукувати такий масив, запитавши його налагоджувальне \"\n#~ \"представлення за допомогою `{:?}`:\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"\"\n#~ \"Rust дозволяє вам перебирати такі речі, як масиви та діапазони, \"\n#~ \"використовуючи ключове слово `for`:\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"Бонусне питання\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"Чи можете ви використати зрізи `&[i32]` замість жорстко закодованих \"\n#~ \"матриць 3 × 3 для ваших аргументів і типів повернення? Щось на зразок \"\n#~ \"`&[&[i32]]` для двовимірного зрізу зрізів. Чому так або чому ні?\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"Перегляньте [`ndarray` ящик](https://docs.rs/ndarray/), щоб дізнатися про \"\n#~ \"якісну реалізацію, ака готова до використання.\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"Рішення та відповідь до бонусного розділу доступні в розділі [Рішення]\"\n#~ \"(solutions-morning.md#arrays-and-for-loops).\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"Використання посилання `&array` у `for n in &array` є тонким попереднім \"\n#~ \"переглядом питань власності, які виникнуть пізніше вдень.\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"Без `&`...\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"Цикл мав би споживати масив. Це зміна [внесена у випуск 2021](https://doc.\"\n#~ \"rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html).\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"Як ми бачили, `if` є виразом у Rust. Він використовується для умовного \"\n#~ \"оцінювання одного з двох блоків, але блоки можуть мати значення, яке \"\n#~ \"потім стає значенням виразу if. Інші вирази потоку керування працюють \"\n#~ \"подібним чином у Rust.\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"\"\n#~ \"Те саме правило використовується для функцій: значення тіла функції є \"\n#~ \"значенням, що повертається:\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"Мета цього слайда — показати, що блоки мають тип і значення в Rust.\"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"Цикл [`for`] (https://doc.rust-lang.org/std/keyword.for.html) тісно \"\n#~ \"пов’язаний із циклом [`while let`] (while-let-expressions.md). Він \"\n#~ \"автоматично викличе `into_iter()` для виразу, а потім перебере його:\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"Ви можете використовувати `break` і `continue` тут, як зазвичай.\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"\"\n#~ \"Ітерація індексу не є спеціальним синтаксисом у Rust лише для цього \"\n#~ \"випадку.\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"\\\"(0..10)\\\" – це діапазон, який реалізує ознаку \\\"ітератора\\\".\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` — це метод, який повертає ще один `ітератор`, який пропускає \"\n#~ \"всі інші елементи.\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"Змініть елементи у векторі та поясніть помилки компілятора. Змініть \"\n#~ \"вектор `v` на змінний, а цикл for — на `for x у v.iter_mut()`.\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"вирази `циклу`\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"Нарешті, є [`loop` ключове слово](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops), яке створює нескінченний цикл.\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"Тут ви повинні або `break`, або `return`, щоб зупинити цикл:\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"\"\n#~ \"Розірвіть «цикл» зі значенням (наприклад, «break 8») і роздрукуйте його.\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"Через визначення типу `i32` є необов'язковим. Ми поступово показуватимемо \"\n#~ \"типи все рідше в міру просування курсу.\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"Наведений нижче код повідомляє компілятору скопіювати в певний загальний \"\n#~ \"контейнер без явного вказівки коду типу, що міститься, використовуючи `_` \"\n#~ \"як заповнювач:\"\n\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) покладається на [`FromIterator`](https://doc.rust- \"\n#~ \"lang.org/std/iter/trait.FromIterator.html), який [`HashSet`](https://doc.\"\n#~ \"rust-lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT% \"\n#~ \"3E-for-HashSet%3CT,+S%3E).\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"Статичні та постійні змінні\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"Наступний код демонструє, чому компілятор не може просто повторно \"\n#~ \"використовувати розташування пам’яті під час затінення незмінної змінної \"\n#~ \"в області, навіть якщо тип не змінюється.\"\n\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"Ця сторінка пропонує тип переліку `CoinFlip` з двома варіантами `Heads` і \"\n#~ \"`Tails`. Ви можете звернути увагу на простір імен під час використання \"\n#~ \"варіантів.\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"В обох асоційовані функції визначені в блоці `impl`.\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"Ви можете визначити більш багаті переліки, де варіанти несуть дані. Потім \"\n#~ \"ви можете використати оператор `match`, щоб отримати дані з кожного \"\n#~ \"варіанту:\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"Вираз зіставляється із шаблонами зверху вниз. Немає провалів, як у C або C\"\n#~ \"++.\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"\"\n#~ \"Вираз відповідності має значення. Значення — це останній вираз у групі \"\n#~ \"відповідності, який було виконано.\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"Починаючи згори, ми шукаємо, який шаблон відповідає значенню, а потім \"\n#~ \"запускаємо код за стрілкою. Коли ми знаходимо збіг, ми зупиняємось.\"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` перевіряє приховане дискримінантне поле в `enum`.\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"Можна отримати дискримінант, викликавши `std::mem::discriminant()`\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"Це корисно, наприклад, якщо реалізовано `PartialEq` для структур, де \"\n#~ \"порівняння значень полів не впливає на рівність.\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` не зовсім те саме, що `WebEvent::Click(Click)` \"\n#~ \"з верхньою структурою `struct Click { ... }`. Вбудована версія не може \"\n#~ \"реалізувати ознаки, наприклад.\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"\"\n#~ \"Переліки Rust упаковані щільно, враховуючи обмеження через вирівнювання:\"\n\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"\"\n#~ \"Внутрішньо Rust використовує поле (дискримінант), щоб відстежувати \"\n#~ \"варіант переліку.\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"Спробуйте інші типи, наприклад\"\n\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"`dbg_size!(bool)`: розмір 1 байт, вирівнювання: 1 байт,\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<bool>)`: розмір 1 байт, вирівнювання: 1 байт \"\n#~ \"(оптимізація ніші, див. нижче),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(&i32)`: розмір 8 байт, вирівнювання: 8 байт (на 64-бітній \"\n#~ \"машині),\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<&i32>)`: розмір 8 байтів, вирівнювання: 8 байтів \"\n#~ \"(оптимізація нульового вказівника, див. нижче).\"\n\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"\"\n#~ \"Оптимізація ніші: Rust об’єднає невикористані шаблони бітів для \"\n#~ \"дискримінанта enum.\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"Більш складний приклад, якщо ви хочете обговорити, що відбувається, коли \"\n#~ \"ми об’єднуємо більше 256 опцій.\"\n\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"Починаючи з версії 1.65, подібна конструкція [let-else](https://doc.rust-\"\n#~ \"lang.org/rust-by-example/flow_control/let_else.html) дозволяє виконати \"\n#~ \"призначення деструктуризації або, якщо це не вдається, виконати блок, \"\n#~ \"який потрібен для припинення нормального потоку керування (з `panic`/\"\n#~ \"`return`/`break`/`continue`):\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"Ключове слово [`match`](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) використовується для зіставлення значення з одним або \"\n#~ \"кількома шаблонами. У цьому сенсі це працює як серія виразів `if let`:\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"Збережіть вираз відповідності до змінної та роздрукуйте його.\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"Видаліть `.as_deref()` і поясніть помилку.\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` повертає `Option<String>`, але ми не можемо \"\n#~ \"порівняти з `String`.\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` перетворює `Option<T>` на `Option<&T::Target>`. У нашому \"\n#~ \"випадку це перетворює `Option<String>` на `Option<&str>`.\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"\"\n#~ \"Тепер ми можемо використовувати зіставлення за шаблоном для порівняння з \"\n#~ \"`&str` всередині `Option`.\"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"\"\n#~ \"Шаблон `_` — шаблон підстановки, який відповідає будь-якому значенню.\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"Це може бути корисним, щоб показати, як працює зв’язування, наприклад, \"\n#~ \"замінивши символ підстановки змінною або видаливши лапки навколо `q`.\"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"Ви можете продемонструвати відповідність на довідці.\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"Це може бути вдалий час, щоб підняти концепцію неспростовних шаблонів, \"\n#~ \"оскільки цей термін може з’являтися в повідомленнях про помилки.\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"Ви також можете деструктурувати `структури`:\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"\"\n#~ \"Деструктурування фрагментів невідомої довжини також працює з шаблонами \"\n#~ \"фіксованої довжини.\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"Під час зіставлення ви можете додати _guard_ до шаблону. Це довільний \"\n#~ \"логічний вираз, який буде виконано, якщо шаблон збігається:\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"\"\n#~ \"Ви можете використовувати змінні, визначені в шаблоні, у своєму виразі if.\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"День 1: післяобідні вправи\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"Ми розглянемо дві речі:\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Алгоритм Луна,\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"Вправа на встановлення відповідності за зразком.\"\n\n#~ msgid \"\"\n#~ \"Try to solve the problem the \\\"simple\\\" way first, using `for` loops and \"\n#~ \"integers. Then, revisit the solution and try to implement it with \"\n#~ \"iterators.\"\n#~ msgstr \"\"\n#~ \"Спробуйте спочатку вирішити проблему «простим» способом, використовуючи \"\n#~ \"цикли for і цілі числа. Потім перегляньте рішення та спробуйте \"\n#~ \"реалізувати його за допомогою ітераторів.\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"Керування пам’яттю: стек проти купи, керування пам’яттю вручну, керування \"\n#~ \"пам’яттю на основі області та збирання сміття.\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"Право власності: семантика переміщення, копіювання та клонування, \"\n#~ \"запозичення та терміни життя.\"\n\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"Структури та методи.\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"Стандартна бібліотека: `String`, `Option` і `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` і `Arc`.\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"Модулі: видимість, шляхи та ієрархія файлової системи.\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"По-перше, давайте оновимо, як працює керування пам’яттю.\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"Стек проти купи\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"Приклад стека та купи\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"Ви самостійно розподіляєте та звільняєте пам’ять купи.\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"\"\n#~ \"Якщо не робити це обережно, це може призвести до збоїв, помилок, \"\n#~ \"вразливості системи безпеки та витоку пам’яті.\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"C Приклад\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"\"\n#~ \"Ви повинні викликати `free` для кожного покажчика, який ви виділяєте за \"\n#~ \"допомогою `malloc`:\"\n\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"Витік пам’яті відбувається, якщо функція повертається раніше між `malloc` \"\n#~ \"і `free`: покажчик втрачається, і ми не можемо звільнити пам’ять. Гірше \"\n#~ \"того, двічі звільнити вказівник або отримати доступ до звільненого \"\n#~ \"вказівника може призвести до використання вразливостей безпеки.\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"\"\n#~ \"Конструктори та деструктори дозволяють підключити час життя об’єкта.\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"Загортаючи вказівник в об’єкт, ви можете звільнити пам’ять, коли об’єкт \"\n#~ \"знищено. Компілятор гарантує, що це станеться, навіть якщо виникне \"\n#~ \"виняток.\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"Це часто називають _отримання ресурсу є ініціалізацією_ (RAII) і дає \"\n#~ \"розумні вказівники.\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"\"\n#~ \"Об’єкт `std::unique_ptr` розміщено в стеку та вказує на пам’ять, виділену \"\n#~ \"в купі.\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"Наприкінці `say_hello` запуститься деструктор `std::unique_ptr`.\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"Деструктор звільняє об’єкт `Person`, на який він вказує.\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"\"\n#~ \"Спеціальні конструктори переміщення використовуються під час передачі \"\n#~ \"права власності функції:\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"Альтернативою ручному управлінню пам’яттю та управлінню пам’яттю на \"\n#~ \"основі обсягу є автоматичне керування пам’яттю:\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"Програміст ніколи не виділяє та не звільняє пам'ять явно.\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"\"\n#~ \"Збирач сміття знаходить невикористану пам'ять і звільняє її для \"\n#~ \"програміста.\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Приклад Java\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"Об’єкт `person` не звільняється після повернення `sayHello`:\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Керування пам’яттю в Rust\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Керування пам’яттю в Rust є сумішшю:\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"Безпечний і правильний, як Java, але без збирача сміття.\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"\"\n#~ \"На основі області видимості, як C++, але компілятор забезпечує повне \"\n#~ \"дотримання.\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Користувач Rust може вибрати правильну абстракцію для ситуації, деякі \"\n#~ \"навіть не мають витрат під час виконання, як C.\"\n\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"Rust досягає цього шляхом явного моделювання _володіння_.\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"Якщо вас запитають, як на цьому етапі, ви можете згадати, що в Rust це \"\n#~ \"зазвичай обробляється типами обгорток RAII, такими як [Box](https://doc.\"\n#~ \"rust-lang.org/std/boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/\"\n#~ \"std/vec/struct.Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.\"\n#~ \"Rc .html) або [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). \"\n#~ \"Вони інкапсулюють право власності та розподіл пам’яті різними засобами та \"\n#~ \"запобігають потенційним помилкам у C.\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"Тут вас можуть запитати про деструктори, трейт [Drop](https://doc.rust-\"\n#~ \"lang.org/std/ops/trait.Drop.html) є еквівалентом Rust.\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"Тут можна запустити деструктор, щоб звільнити ресурси.\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"\"\n#~ \"Завжди існує _рівно_ одне зв’язування змінної, яке володіє значенням.\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"Дані купи з `s1` повторно використовуються для `s2`.\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"\"\n#~ \"Коли `s1` виходить за межі області видимості, нічого не відбувається \"\n#~ \"(його було переміщено з).\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"Якщо учні запитують про `derive`, достатньо сказати, що це спосіб \"\n#~ \"генерувати код у Rust під час компіляції. У цьому випадку генеруються \"\n#~ \"стандартні реалізації ознак `Копіювати` і `Клонувати`.\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"Позичене значення має _час життя_:\"\n\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"\"\n#~ \"Час життя може бути неявним: `add(p1: &Point, p2: &Point) -> Point`.\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"Час життя також може бути явним: `&'a Point`, `&'document str`.\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"\"\n#~ \"Читайте `&'a Point` як \\\"позичений `Point`, який дійсний принаймні \"\n#~ \"протягом усього життя `a`\\\".\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"\"\n#~ \"Тривалість життя завжди визначається компілятором: ви не можете \"\n#~ \"призначити тривалість життя самостійно.\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"\"\n#~ \"Окрім запозичення своїх аргументів, функція може повертати позичене \"\n#~ \"значення:\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"\\\"a\\\" є загальним параметром, його визначає компілятор.\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"\"\n#~ \"Тривалість життя починається з ```, а ``a` є типовою назвою за умовчанням.\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"\"\n#~ \"Частина _at least_ важлива, коли параметри знаходяться в різних областях.\"\n\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"\"\n#~ \"Перемістіть оголошення `p2` і `p3` в нову область (`{ ... }`), що \"\n#~ \"призведе до такого коду:\"\n\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"Зауважте, що це не компілюється, оскільки `p3` переживає `p2`.\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"Скиньте робочу область і змініть підпис функції на `fn left_most<'a, \"\n#~ \"'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. Це не буде \"\n#~ \"компілюватися, оскільки зв’язок між часами життя `'a` і `'b` неясний.\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"Інший спосіб пояснити це:\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"\"\n#~ \"Функція запозичує два посилання на два значення, і функція повертає інше \"\n#~ \"посилання.\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"\"\n#~ \"Він, мабуть, надійшов від одного з цих двох вхідних даних (або від \"\n#~ \"глобальної змінної).\"\n\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"який це? Компілятор повинен знати, тому на сайті виклику повернуте \"\n#~ \"посилання не використовується довше, ніж змінна, звідки надійшло \"\n#~ \"посилання.\"\n\n#~ msgid \"\"\n#~ \"Methods are defined in an `impl` block, which we will see in following \"\n#~ \"slides.\"\n#~ msgstr \"\"\n#~ \"Методи визначені в блоці `impl`, який ми побачимо на наступних слайдах.\"\n\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"Функція `new` може бути написана з використанням `Self` як типу, оскільки \"\n#~ \"вона взаємозамінна з назвою типу struct\"\n\n#~ msgid \"\"\n#~ \"Implement the `Default` trait for the struct. Define some fields and use \"\n#~ \"the default values for the other fields.\"\n#~ msgstr \"\"\n#~ \"Реалізуйте атрибут `Default` для структури. Визначте деякі поля та \"\n#~ \"використовуйте значення за замовчуванням для інших полів.\"\n\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"Методи визначені в блоці `impl`.\"\n\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"Використовуйте синтаксис оновлення структури, щоб визначити нову \"\n#~ \"структуру за допомогою `peter`. Зауважте, що після цього змінна `peter` \"\n#~ \"більше не буде доступною.\"\n\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"\"\n#~ \"Використовуйте `{:#?}` під час друку структур для запиту представлення \"\n#~ \"`Debug`.\"\n\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"Далі ми опишемо різницю між приймачами методів.\"\n\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"Спробуйте наголосити на «спільних і незмінних» і «унікальних і змінних». \"\n#~ \"Ці обмеження завжди поєднуються в Rust завдяки правилам перевірки \"\n#~ \"запозичень, і `self` не є винятком. Неможливо посилатися на структуру з \"\n#~ \"кількох місць і викликати на ній мутуючий метод (`&mut self`).\"\n\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"Усі чотири методи тут використовують різні приймачі методів.\"\n\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"Ви можете вказати, як це змінює те, що функція може робити зі значеннями \"\n#~ \"змінних, і якщо/як її можна використовувати знову в `main`.\"\n\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"\"\n#~ \"Ви можете продемонструвати помилку, яка з’являється при спробі двічі \"\n#~ \"викликати `finish`.\"\n\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"Зауважте, що хоча отримувачі методів різні, нестатичні функції \"\n#~ \"викликаються однаково в основному корпусі. Rust підтримує автоматичне \"\n#~ \"посилання та розіменування під час виклику методів. Rust автоматично \"\n#~ \"додає `&`, `*`, `muts`, щоб цей об’єкт відповідав сигнатурі методу.\"\n\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"Ви можете зазначити, що `print_laps` використовує вектор, який \"\n#~ \"повторюється. Більш детально вектори описуємо вдень.\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"День 2: Ранкова зарядка\"\n\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"Ми розглянемо методи реалізації в двох контекстах:\"\n\n#~ msgid \"Storing books and querying the collection\"\n#~ msgstr \"Зберігання книг і запити про колекцію\"\n\n#~ msgid \"Keeping track of health statistics for patients\"\n#~ msgstr \"Ведення медичної статистики пацієнтів\"\n\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"Завтра ми дізнаємося набагато більше про структури та тип `Vec<T>`. \"\n#~ \"Наразі вам просто потрібно знати частину його API:\"\n\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"Використовуйте це для моделювання книжкової колекції бібліотеки. \"\n#~ \"Скопіюйте наведений нижче код на <https://play.rust-lang.org/> і оновіть \"\n#~ \"типи, щоб він скомпілювався:\"\n\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[Рішення](solutions-afternoon.md#designing-a-library)\"\n\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"До загальних типів лексики входять:\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"Типи [`Option` і `Result`](std/option-result.md): використовуються для \"\n#~ \"необов’язкових значень і [обробки помилок](error-handling.md).\"\n\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"\"\n#~ \"[`Рядок`](std/string.md): типовий тип рядка, який використовується для \"\n#~ \"даних, що належать.\"\n\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md): стандартний розширюваний вектор.\"\n\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"\"\n#~ \"[`HashMap`](std/hashmap.md): тип хеш-карти з настроюваним алгоритмом \"\n#~ \"хешування.\"\n\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"[`Box`](std/box.md): власний вказівник для даних, виділених у купі.\"\n\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"\"\n#~ \"[`Rc`](std/rc.md): спільний покажчик із підрахунком посилань для даних, \"\n#~ \"виділених у купі.\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Варіант` і `Результат`\"\n\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"Типи представляють додаткові дані:\"\n\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"`Option<&T>` має нульовий простір порівняно з `&T`.\"\n\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` повертає `Result<usize, usize>`.\"\n\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"Якщо знайдено, `Result::Ok` містить індекс, де знайдено елемент.\"\n\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"\"\n#~ \"В іншому випадку `Result::Err` містить індекс, куди слід вставити такий \"\n#~ \"елемент.\"\n\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"У наведеному вище прикладі ви навіть можете пропустити `*` в операторі \"\n#~ \"`println!` завдяки `Deref`.\"\n\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"Коробка з рекурсивними структурами даних\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"День 2: післяобідні вправи\"\n\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"\"\n#~ \"Вправи на сьогоднішній день будуть зосереджені на рядках та ітераторах.\"\n\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Модель власності Rust впливає на багато API. Прикладом цього є \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) і \"\n#~ \"[`IntoIterator`](https://doc.rust-lang .org/std/iter/trait.IntoIterator.\"\n#~ \"html).\"\n\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"Трейти схожі на інтерфейси: вони описують поведінку (методи) для типу. \"\n#~ \"Функція `Iterator` просто говорить, що ви можете викликати `next`, доки \"\n#~ \"не отримаєте `None` назад:\"\n\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"Ви використовуєте цю рису так:\"\n\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"Який тип повертає ітератор? Перевірте свою відповідь тут:\"\n\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"Чому використовується цей тип?\"\n\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"Як і раніше, який тип повертає ітератор?\"\n\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"Тепер, коли ми знаємо і `Iterator`, і `IntoIterator`, ми можемо \"\n#~ \"створювати цикли `for`. Вони викликають `into_iter()` для виразу та \"\n#~ \"повторюють отриманий ітератор:\"\n\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"Поекспериментуйте з кодом вище, а потім зверніться до документації для \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for -%26'a+Vec%3CT,+A%3E) і [`impl \"\n#~ \"IntoIterator для Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html# impl-IntoIterator-for-Vec%3CT,+A%3E), щоб перевірити ваші відповіді.\"\n\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"У цій вправі ви реалізуєте компонент маршрутизації веб-сервера. Сервер \"\n#~ \"налаштовано з кількома _префіксами шляху_, які збігаються з _шляхами \"\n#~ \"запиту_. Префікси шляху можуть містити символ підстановки, який \"\n#~ \"відповідає повному сегменту. Перегляньте модульні тести нижче.\"\n\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"\"\n#~ \"Характеристики: ознаки отримання, методи за замовчуванням і важливі \"\n#~ \"ознаки стандартної бібліотеки.\"\n\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"\"\n#~ \"Генерики: загальні типи даних, загальні методи, мономорфізація та об’єкти \"\n#~ \"ознак.\"\n\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"\"\n#~ \"Тестування: модульні тести, тести документації та інтеграційні тести.\"\n\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"\"\n#~ \"Небезпечний Rust: необроблені покажчики, статичні змінні, небезпечні \"\n#~ \"функції та зовнішні функції.\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"Виправте код, щоб дозволити точки, які мають елементи різних типів.\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"Ви можете оголосити загальний тип у своєму блоці `impl`:\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Загальний код перетворюється на незагальний код на основі сайтів викликів:\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"поводиться так, ніби ви написали\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"\"\n#~ \"Макроси отримання Rust працюють шляхом автоматичного генерування коду, \"\n#~ \"який реалізує вказані характеристики для структури даних.\"\n\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"Ви можете дозволити компілятору вивести ряд ознак наступним чином:\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"Риси можуть реалізовувати поведінку з точки зору інших методів рис:\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"Перемістіть метод `not_equals` до нового атрибута `NotEquals`.\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"Зробіть «Equals» суперфункцією для «NotEquals».\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"Надайте загальну реалізацію `NotEquals` для `Equals`.\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"\"\n#~ \"З загальною реалізацією вам більше не потрібен «Equals» як супер-трейт \"\n#~ \"для «NotEqual».\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"\"\n#~ \"`impl Trait` дозволяє вам працювати з типами, які ви не можете назвати.\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"Цей приклад чудовий, тому що він двічі використовує `impl Display`. Це \"\n#~ \"допомагає пояснити, що тут ніщо не гарантує, що це _той самий_ тип `impl \"\n#~ \"Display`. Якби ми використовували єдиний `T: Display`, це б забезпечувало \"\n#~ \"обмеження того, що тип введення `T` і повернення `T` є одним типом. Це не \"\n#~ \"працюватиме для цієї конкретної функції, оскільки тип, який ми очікуємо \"\n#~ \"як вхідні дані, швидше за все, не той, який повертає `format!`. Якби ми \"\n#~ \"хотіли зробити те саме за допомогою синтаксису `: Display`, нам \"\n#~ \"знадобилися б два незалежні загальні параметри.\"\n\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"\"\n#~ \"Зараз ми розглянемо деякі з найпоширеніших властивостей стандартної \"\n#~ \"бібліотеки Rust:\"\n\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Ітератор`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) і \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter /trait.IntoIterator.\"\n#~ \"html), що використовується в циклах `for`,\"\n\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Читати`](https://doc.rust-lang.org/std/io/trait.Read.html) і \"\n#~ \"[`Написати`](https://doc.rust-lang.org/std/io /trait.Write.html) \"\n#~ \"використовується для IO,\"\n\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Додати`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops /trait.Mul.html), ... використовується \"\n#~ \"для перевантаження операторів і\"\n\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Ітератор` реалізує `fn collect<B>(self) -> B де B: FromIterator<Self::\"\n#~ \"Item>, Self: Sized`\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Додати`, `Mul`, ...\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"День 3: Ранкова зарядка\"\n\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"\"\n#~ \"Ми розробимо класичну бібліотеку графічного інтерфейсу, використовуючи \"\n#~ \"ознаки та об’єкти ознак.\"\n\n#~ msgid \"\"\n#~ \"We will also look at enum dispatch with an exercise involving points and \"\n#~ \"polygons.\"\n#~ msgstr \"\"\n#~ \"Ми також розглянемо диспетчеризацію enum із вправою, що включає точки та \"\n#~ \"багатокутники.\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"\"\n#~ \"`Кнопка`: має `мітку` та функцію зворотного виклику, яка викликається під \"\n#~ \"час натискання кнопки.\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"Структура багатокутника\"\n\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"Ми створимо структуру `Polygon`, яка міститиме кілька точок. Скопіюйте \"\n#~ \"наведений нижче код на <https://play.rust-lang.org/> і заповніть відсутні \"\n#~ \"методи, щоб тести були успішними:\"\n\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"Оскільки сигнатури методів відсутні в формулюваннях задач, ключовою \"\n#~ \"частиною вправи є їх правильне визначення. Вам не потрібно змінювати \"\n#~ \"тести.\"\n\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"Інші цікаві частини вправи:\"\n\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"Отримайте ознаку «Копіювати» для деяких структур, оскільки в тестах \"\n#~ \"методи іноді не запозичують свої аргументи.\"\n\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"Дізнайтеся, що властивість `Add` має бути реалізована, щоб два об’єкти \"\n#~ \"можна було додавати через «+». Зауважте, що ми не обговорюємо генерики до \"\n#~ \"3-го дня.\"\n\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"\"\n#~ \"Обробка помилок у Rust здійснюється за допомогою явного потоку керування:\"\n\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"\"\n#~ \"Функції, які можуть мати помилки, вказують це у своєму типі повернення,\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"Немає винятків.\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"Спіймати розмотування стопки\"\n\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"Ми вже бачили перелік `Result`. Це використовується повсюдно, коли \"\n#~ \"очікуються помилки як частина нормальної роботи:\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"Поширення помилок за допомогою `?`\"\n\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"\"\n#~ \"Оператор try `?` використовується для повернення помилок абоненту. Це \"\n#~ \"дозволяє перетворити загальне\"\n\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"Похідний макрос `thiserror` автоматично реалізує `std::error::Error` і \"\n#~ \"додатково `Display` (якщо надано атрибути `#[error(...)]` і `From` (якщо \"\n#~ \"` додано атрибут #[from]`). Це також працює для структур.\"\n\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"\"\n#~ \"Це не впливає на ваш публічний API, що робить його корисним для бібліотек.\"\n\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"Широко використовуваний ящик [anyhow](https://docs.rs/anyhow/) може \"\n#~ \"допомогти вам додати контекстну інформацію до ваших помилок і дозволить \"\n#~ \"вам мати менше спеціальних типів помилок:\"\n\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"Позначайте модульні тести за допомогою `#[test]`:\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"\"\n#~ \"Використовуйте `cargo test`, щоб знайти та запустити модульні тести.\"\n\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"Модульні тести часто розміщують у вкладених модулях (виконуйте тести на \"\n#~ \"[Playground](https://play.rust-lang.org/)):\"\n\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"Корисні ящики для написання тестів\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"Виклик зовнішнього коду\"\n\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"Функції з інших мов можуть порушувати гарантії Rust. Тому викликати їх \"\n#~ \"небезпечно:\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"День 3: післяобідні вправи\"\n\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"Давайте створимо безпечну оболонку для читання вмісту каталогу!\"\n\n#~ msgid \"\"\n#~ \"For this exercise, we suggest using a local dev environment instead of \"\n#~ \"the Playground. This will allow you to run your binary on your own \"\n#~ \"machine.\"\n#~ msgstr \"\"\n#~ \"Для цієї вправи ми пропонуємо використовувати локальне середовище \"\n#~ \"розробника замість Playground. Це дозволить вам запускати бінарний файл \"\n#~ \"на вашій машині.\"\n\n#~ msgid \"\"\n#~ \"To get started, follow the [running locally](../../cargo/running-locally.\"\n#~ \"md) instructions.\"\n#~ msgstr \"\"\n#~ \"Щоб почати, дотримуйтесь інструкцій [running locally](../../cargo/running-\"\n#~ \"locally.md).\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"Переглянувши вправу, ви можете переглянути надане [рішення](solutions-\"\n#~ \"afternoon.md).\"\n\n#~ msgid \"\"\n#~ \"At this point, the instructor should switch to the [CXX tutorial](https://\"\n#~ \"cxx.rs/tutorial.html).\"\n#~ msgstr \"\"\n#~ \"На цьому етапі викладач має перейти до [підручника CXX](https://cxx.rs/\"\n#~ \"tutorial.html).\"\n\n#~ msgid \"Walk the students through the tutorial step by step.\"\n#~ msgstr \"Проведіть учнів крок за кроком через підручник.\"\n\n#~ msgid \"\"\n#~ \"Highlight how CXX presents a clean interface without unsafe code in _both \"\n#~ \"languages_.\"\n#~ msgstr \"\"\n#~ \"Підкресліть, як CXX представляє чистий інтерфейс без небезпечного коду \"\n#~ \"_обома мовами_.\"\n\n#~ msgid \"\"\n#~ \"Explain how a Rust `String` cannot map to a C++ `std::string` (the latter \"\n#~ \"does not uphold the UTF-8 invariant). Show that despite being different \"\n#~ \"types, `rust::String` in C++ can be easily constructed from a C++ `std::\"\n#~ \"string`, making it very ergonomic to use.\"\n#~ msgstr \"\"\n#~ \"Поясніть, як Rust `String` не може зіставлятися з C++ `std::string` \"\n#~ \"(останній не підтримує інваріант UTF-8). Покажіть, що незважаючи на різні \"\n#~ \"типи, `rust::String` у C++ можна легко сконструювати з C++ `std::string`, \"\n#~ \"що робить його дуже ергономічним у використанні.\"\n\n#~ msgid \"\"\n#~ \"Explain that a Rust function returning `Result<T, E>` becomes a function \"\n#~ \"which throws a `E` exception in C++ (and vice versa).\"\n#~ msgstr \"\"\n#~ \"Поясніть, що функція Rust, яка повертає `Result<T, E>`, стає функцією, \"\n#~ \"яка створює виняток `E` у C++ (і навпаки).\"\n\n#~ msgid \"SWD\"\n#~ msgstr \"SWD\"\n\n#~ msgid \"GDB stub and Microsoft \"\n#~ msgstr \"Заглушка GDB і Microsoft\"\n\n#~ msgid \"DAP\"\n#~ msgstr \"DAP\"\n\n#~ msgid \" server\"\n#~ msgstr \" сервер\"\n\n#~ msgid \"\"\n#~ \"`cargo-embed` is a cargo subcommand to build and flash binaries, log \"\n#~ msgstr \"\"\n#~ \"`cargo-embed` — це підкоманда cargo для створення та флеш бінарних \"\n#~ \"файлів, журналу\"\n\n#~ msgid \"RTT\"\n#~ msgstr \"RTT\"\n\n#~ msgid \"HVC\"\n#~ msgstr \"HVC\"\n\n#~ msgid \" to tell the firmware to power off the system:\"\n#~ msgstr \" щоб повідомити програмному забезпеченню вимкнути систему:\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"Розв’язки вправ ви знайдете на наступних сторінках.\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"Не соромтеся ставити запитання щодо рішень [на GitHub](https://github.com/\"\n#~ \"google/comprehensive-rust/discussions). Повідомте нас, якщо у вас є інше \"\n#~ \"або краще рішення, ніж представлене тут.\"\n\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**Примітка.** Не звертайте уваги на коментарі `// ANCHOR: label` і `// \"\n#~ \"ANCHOR_END: ​​label`, які ви бачите в рішеннях. Вони існують для того, щоб \"\n#~ \"зробити можливим повторне використання частин рішень як вправ.\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"День 1 Ранкова зарядка\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([назад до вправи](for-loops.md))\"\n\n#~ msgid \"Bonus question\"\n#~ msgstr \"Бонусне запитання\"\n\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"Це вимагає більш просунутих концепцій. Може здатися, що ми можемо \"\n#~ \"використовувати фрагмент фрагментів (`&[&[i32]]`) як тип введення для \"\n#~ \"транспонування і таким чином змусити нашу функцію обробляти будь-який \"\n#~ \"розмір матриці. Однак це швидко виходить з ладу: тип повернення не може \"\n#~ \"бути `&[&[i32]]`, оскільки він повинен володіти даними, які ви повертаєте.\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"Ви можете спробувати використати щось на кшталт `Vec<Vec<i32>>`, але це \"\n#~ \"теж не працює з коробки: важко перетворити з `Vec<Vec<i32>>` на \"\n#~ \"`&[ &[i32]]`, тож тепер ви також не можете легко використовувати \"\n#~ \"`pretty_print`.\"\n\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"Коли ми перейдемо до трейтів і генериків, ми зможемо використовувати \"\n#~ \"[`std::convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.\"\n#~ \"html) властивість абстрагуватися над усім, на що можна посилатися як на \"\n#~ \"зріз.\"\n\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"Крім того, сам тип не гарантує, що дочірні сегменти мають однакову \"\n#~ \"довжину, тому така змінна може містити недійсну матрицю.\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"День 1 Післяобідні вправи\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([назад до вправи](luhn.md))\"\n\n#~ msgid \"Pattern matching\"\n#~ msgstr \"Зіставлення шаблону\"\n\n#~ msgid \"TBD.\"\n#~ msgstr \"Уточнюється\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"2 день Ранкова зарядка\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"Проектування бібліотеки\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([назад до вправи](book-library.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([назад до вправи](strings-iterators.md))\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"День 3 Ранкова зарядка\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([назад до вправи](simple-gui.md))\"\n\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([назад до вправи](points-polygon.md))\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"День 3 Після обіду\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([назад до вправи](safe-ffi-wrapper.md))\"\n"
  },
  {
    "path": "po/vi.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-05-21T22:14:00+09:00\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: Vinh Tran <vinhdaitran@google.com>\\n\"\n\"Language-Team: \\n\"\n\"Language: vi\\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\"X-Generator: Poedit 3.4.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"Chào mừng bạn đến với Comprehensive Rust\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"Hướng Dẫn Khóa Học\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"Cấu Trúc Khóa Học\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"Phím Tắt\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"Bản Dịch\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"Sử Dụng Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Hệ Sinh Thái Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"Code Mẫu\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"Chạy Cargo Trong Máy Của Bạn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"Ngày 1: Buổi Sáng\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome-async.md\nmsgid \"Welcome\"\nmsgstr \"Lời Chào Mừng\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/hello-world.md src/types-and-values.md\n#: src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hello, World\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"Rust là gì?\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Lợi ích của việc sử dụng Rust\"\n\n#: src/SUMMARY.md src/hello-world.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Sân chơi (*Playground*)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"Kiểu Dữ Liệu Và Giá Trị\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"Biến\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"Giá trị\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"Số Học\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"Suy Luận Kiểu\"\n\n#: src/SUMMARY.md src/types-and-values.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"Thực Hành: Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"Đáp Án\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"Control flow (Điểu khiển luồng) căn bản\"\n\n#: src/SUMMARY.md\nmsgid \"`if` Expressions\"\nmsgstr \"Lệnh `if`\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"Vòng lặp\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` và `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"Labels (nhãn)\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"Blocks và scopes\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"Scopes và shadowing\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"Hàm\"\n\n#: src/SUMMARY.md src/control-flow-basics.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"Macros\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\n#: src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"Thực hành: Chuỗi Collatz\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"Ngày 1: Buổi chiều\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"Bộ (Tuples) và mảng (Arrays)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"Mảng (Arrays)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"Bộ (Tuples)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"Duyệt mảng\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"Patterns and Destructuring\"\nmsgstr \"Mẫu (Patterns) và giải cấu trúc (Destructuring)\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"Bài tập: Mảng lồng nhau\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/references.md\nmsgid \"References\"\nmsgstr \"Tham chiếu (References)\"\n\n#: src/SUMMARY.md src/references.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"Tham chiếu chia sẻ (Shared References)\"\n\n#: src/SUMMARY.md src/references.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"Tham chiếu độc quyền (Exclusive References)\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"Miếng (Slices): `&[T]`\"\n\n#: src/SUMMARY.md src/references.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"Chuỗi ký tự (Strings)\"\n\n#: src/SUMMARY.md src/references.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"Bài tập: Hình học\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-1-afternoon.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"Kiểu do người dùng định nghĩa\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"Kiểu cấu trúc có tên (Named Structs)\"\n\n#: src/SUMMARY.md src/user-defined-types.md\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"Kiểu cấu trúc bộ (Tuple Structs)\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Enums\"\nmsgstr \"Kiểu liệt kê (Enums)\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"Static\"\nmsgstr \"Tĩnh (Static)\"\n\n#: src/SUMMARY.md\nmsgid \"Const\"\nmsgstr \"Hằng (Const)\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"Biệt danh kiểu (Type Aliases)\"\n\n#: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"Bài tập: Sự kiện thang máy\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"Ngày 2: Buổi sáng\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"Khớp mẫu (Pattern Matching)\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"Khớp giá trị\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Structs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Destructuring Enums\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching.md\n#: src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"Luồng điều khiển `let`\"\n\n#: src/SUMMARY.md src/pattern-matching.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"Bài tập: Đánh giá biểu thức (Expression Evaluation)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"Phương thức (Methods) và đặc điểm (Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"Phương thức (Methods)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"Đặc điểm (Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\nmsgid \"Implementing Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\nmsgid \"Supertraits\"\nmsgstr \"Siêu đặc điểm (Supertraits)\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"Kiểu liên kết (Associated Types)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"Dẫn xuất (Deriving) từ các đặc điểm (Traits)\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"Bài tập: Bộ ghi log tổng quát (Generic Logger)\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"Ngày 2: Buổi chiều\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"Tổng quát (Generics)\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"Hàm tổng quát (Generic Functions)\"\n\n#: src/SUMMARY.md src/generics.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"Kiểu dữ liệu tổng quát (Generic Data Types)\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\nmsgid \"Generic Traits\"\nmsgstr \"Đặc điểm tổng quát (Generic Traits)\"\n\n#: src/SUMMARY.md src/generics.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"Gắn với đặc điểm (Trait Bounds)\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"Bài tập: Hàm tổng quát `min`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"Các kiểu trong thư viện chuẩn (Standard Library Types)\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"Thư viện chuẩn\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"Tài liệu\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"Bài tập: Bộ đếm\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-2-afternoon.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"Các đặc điểm trong thư viện chuẩn (Standard Library Traits)\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/comparisons.md\n#: src/concurrency/welcome-async.md\nmsgid \"Comparisons\"\nmsgstr \"Hỗ trợ so sánh\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"Nạp chồng toán tử (Operator Overloading)\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` và `Into`\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"Ép kiểu (Casting)\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` và `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`, cú pháp cập nhật kiểu cấu trúc\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"Bao đóng (Closures)\"\n\n#: src/SUMMARY.md src/std-traits.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"Bài tập: Mật mã ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"Ngày 3: Buổi sáng\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"Quản lý bộ nhớ\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"Xem xét về bộ nhớ chương trình\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"Những cách tiếp cận quản lý bộ nhớ\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"Quyền sở hữu (Ownership)\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"Ngữ nghĩa chuyển dịch (Move Semantics)\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Sao chép kiểu\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"Bài tập: Kiểu Builder\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"Con trỏ thông minh (Smart Pointers)\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"Đối tượng đặc điểm (Trait Objects)\"\n\n#: src/SUMMARY.md src/smart-pointers.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"Bài tập: Cây nhị phân\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"Ngày 3: Buổi chiều\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"Mượn (Borrowing)\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"Mượn một giá trị\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"Kiểm tra mượn (Borrow Checking)\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/examples.md\nmsgid \"Borrow Errors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"Tính khả biến nội tại (Interior Mutability)\"\n\n#: src/SUMMARY.md src/borrowing.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"Bài tập: Thống kê sức khỏe\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-3-afternoon.md src/lifetimes.md\nmsgid \"Lifetimes\"\nmsgstr \"Vòng đời (Lifetimes)\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"Chú thích vòng đời (Lifetime Annotations)\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Lifetime Elision\"\nmsgstr \"Sự lược bỏ vòng đời (Lifetime Elision)\"\n\n#: src/SUMMARY.md src/lifetimes.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"Vòng đời kiểu cấu trúc (Struct Lifetimes)\"\n\n#: src/SUMMARY.md src/lifetimes.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"Bài tập: Phân tích cú pháp Protobuf (Protobuf Parsing)\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"Ngày 4: Buổi sáng\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"Trình lặp (Iterators)\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"Bài tập: Chuỗi phương thức trình lặp (Iterator Method Chaining)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"Modules\"\n\n#: src/SUMMARY.md src/modules.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"Thứ bậc hệ thống tập tin\"\n\n#: src/SUMMARY.md src/modules.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"Phạm vi truy cập (Visibility)\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`, `super`, `self`\"\n\n#: src/SUMMARY.md src/modules.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"Bài tập: Modules cho thư viện giao diện đồ họa (GUI Library)\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"Kiểm thử\"\n\n#: src/SUMMARY.md src/testing.md\nmsgid \"Test Modules\"\nmsgstr \"Modules kiểm thử\"\n\n#: src/SUMMARY.md src/testing.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"Các loại kiểm thử khác\"\n\n#: src/SUMMARY.md src/testing.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"Các lỗi biên dịch và Clippy\"\n\n#: src/SUMMARY.md src/testing.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"Bài tập: Thuật toán Luhn\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"Ngày 4: Buổi chiều\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"Xử lý lỗi\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Sự sợ hãi (Panics)\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"Toán tử thử nghiệm (Try Operator)\"\n\n#: src/SUMMARY.md src/error-handling.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"Chuyển đổi thử nghiệm (Try Conversions)\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"Đặc điểm `Error` (Error Trait)\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` và `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"Bài tập: Viết lại với `Result`\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/welcome-day-4-afternoon.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"Rust \\\"không an toàn\\\" (Unsafe Rust)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe\"\nmsgstr \"Không an toàn (Unsafe)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"Giải tham chiếu con trỏ thô (Dereferencing Raw Pointers)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"Biến tĩnh khả biến (Mutable Static Variables)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"Kiểu Union\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Hàm \\\"không an toàn\\\" (Unsafe Functions)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Đặc điểm \\\"không an toàn\\\" (Unsafe Traits)\"\n\n#: src/SUMMARY.md src/unsafe-rust.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"Bài tập: Lớp bọc FFI (FFI Wrapper)\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"Cài đặt\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"Luật xây dựng (Build Rules)\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"Tệp nhị phân (Binary)\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"Thư viện (Library)\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"Hướng dẫn: Dịch vụ sinh nhật\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"Giao diện (Interface)\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"API dịch vụ (Service API)\"\n\n#: src/SUMMARY.md\nmsgid \"Service\"\nmsgstr \"Dịch vụ (Service)\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"Máy chủ (Server)\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"Triển khai (Deploy)\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"Máy khách (Client)\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"Thay đổi API\"\n\n#: src/SUMMARY.md\nmsgid \"Updating Implementations\"\nmsgstr \"Cập nhật cài đặt (Updating Implementations)\"\n\n#: src/SUMMARY.md\nmsgid \"AIDL Types\"\nmsgstr \"Các kiểu trong AIDL (AIDL Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"Kiểu nguyên thủy (Primitive Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\nmsgid \"Array Types\"\nmsgstr \"Kiểu mảng (Array Types)\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\nmsgid \"Sending Objects\"\nmsgstr \"Gửi đối tượng (Sending Objects)\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\nmsgid \"Parcelables\"\nmsgstr \"Parcelables\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"Gửi tệp\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"Kỹ thuật tạo đối tượng giả (Mocking)\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"Ghi log (Logging)\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"Tính tương thích với các ngôn ngữ khác (Interoperability)\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"Với ngôn ngữ C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"Gọi C với Bindgen\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"Gọi Rust từ C\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"Với ngôn ngữ C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"Module cầu nối (The Bridge Module)\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Cầu nối Rust (Rust Bridge)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"Sinh code C++ (Generated C++)\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"Cầu nối C++ (C++ Bridge)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"Các kiểu chung (Shared Types)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"Các kiểu liệt kê chung (Shared Enums)\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Xử lý lỗi trong Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"Xử lý lỗi trong C++\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"Các kiểu bổ sung\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"Xây dựng cho Android: C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"Xây dựng cho Android: Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"Xây dựng cho Android: Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"Với ngôn ngữ Java\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/exercises/android/morning.md src/exercises/bare-metal/morning.md\n#: src/exercises/bare-metal/afternoon.md src/concurrency/welcome.md\n#: src/concurrency/sync-exercises.md src/concurrency/welcome-async.md\n#: src/concurrency/async-exercises.md\nmsgid \"Exercises\"\nmsgstr \"Bài tập\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"So sánh hệ sinh thái Chromium và Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"Chính sách\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"Code \\\"không an toàn\\\" (Unsafe Code)\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"Phụ thuộc vào code Rust từ Chromium C++\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"Bài tập\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"Thư viện `rust_gtest_interop`\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Luật GN cho các bài kiểm thử Rust\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"Macro `chromium::import!`\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"Khả năng tương thích với C++ (Interoperability with C++)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"Kết nối ví dụ (Example Bindings)\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"Giới hạn của CXX\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"Xử lý lỗi trong CXX\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"Xử lý lỗi: Ví dụ QR\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"Xử lý lỗi: Ví dụ PNG\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"Sử dụng CXX trong Chromium\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"Thêm các bộ thư viện của bên thứ ba (Adding Third Party Crates)\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"Tùy chỉnh Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"Tùy chỉnh `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"Tải về các bộ thư viện (Downloading Crates)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"Tạo ra luật xây dựng `gn` (Generating `gn` Build Rules)\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"Xử lý vấn đề\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"Scripts xây dựng tạo ra code (Build Scripts Which Generate Code)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"\"\n\"Scripts xây dựng ra C++ hoặc thực hiện các hành động tùy ý (Build Scripts \"\n\"Which Build C++ or Take Arbitrary Actions)\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"Phụ thuộc vào một bộ thư viện (Depending on a Crate)\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"Xem xét và kiểm tra (Reviews and Audits)\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"Kiểm tra vào mã nguồn Chromium (Checking into Chromium Source Code)\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"Giữ các bộ thư viện được cập nhật (Keeping Crates Up to Date)\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"Ghép tất cả lại - Bài tập\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"Lời giải bài tập\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Solutions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/plain.md\nmsgid \"Plain Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/threads.md src/concurrency/threads/scoped.md\nmsgid \"Scoped Threads\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"Senders and Receivers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\n#: src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"Marker Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\n#: src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome.md src/concurrency/shared-state.md\nmsgid \"Shared State\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/shared-state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md src/concurrency/shared-state.md\n#: src/concurrency/shared-state/example.md\nmsgid \"Example\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises.md\nmsgid \"Dining Philosophers\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises.md\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\nmsgid \"Async Basics\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/futures.md\nmsgid \"Futures\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async.md src/concurrency/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/async.md src/concurrency/async/tasks.md\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-control-flow.md\nmsgid \"Channels and Control Flow\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Async Channels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"Join\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-control-flow.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"Select\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\nmsgid \"Pitfalls\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\nmsgid \"Blocking the Executor\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/concurrency/async-exercises.md\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"Chú giải thuật ngữ\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"Trang này là dành cho người hướng dẫn khóa học.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"\"\n\"Đây là một số thông tin cơ bản về cách chúng tôi triển khai khóa học trong \"\n\"nội bộ Google.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"Chúng tôi mở lớp từ 9 giờ sáng đến 4 giờ chiều, trong đó có 1 tiếng nghỉ \"\n\"trưa. Một ngày học bao gồm lớp buổi sáng và lớp buổi chiều, mỗi buổi kéo dài \"\n\"3 tiếng. Một buổi học sẽ được chia thành nhiều quãng nghỉ để học sinh có \"\n\"thời gian thực hành.\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"Trước khi bắt đầu giảng dạy khóa học này, bạn sẽ cần:\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"Làm quen với cách sử dụng giáo trình của khóa học. Chúng tôi đã lồng ghép \"\n\"các ghi chú thuyết trình để giúp tóm lược lại nội dung từng phần (chúng tôi \"\n\"cũng rất mong bạn có thể giúp đỡ, đóng góp vào các ghi chú này!). Khi giảng \"\n\"dạy, bạn nên chắc chắn rằng các ghi chú thuyết trình sẽ được mở dưới dạng \"\n\"một cửa sổ popup (bằng cách nhấn vào biểu tượng có mũi tên nhỏ bên phải chữ \"\n\"\\\"Speaker Notes\\\"). Làm vậy sẽ giúp bạn có thể  thuyết trình với slide rõ \"\n\"ràng nhất.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"Xác định lịch học. Vì nội dung khóa học kéo dài bốn ngày, chúng tôi khuyến \"\n\"nghị bạn sắp xếp lịch học dàn trải ra hai tuần. Các học viên đều bảo rằng \"\n\"việc có những \\\"khoảng trống\\\" trong khóa rất có ích để họ có thể tiêu hóa \"\n\"hết lượng thông tin được cung cấp.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"Tìm một căn phòng đủ lớn để chứa tất cả học viên. Chúng tôi khuyến nghị một \"\n\"lớp nên từ 15 đến 25 người, đủ nhỏ để mọi người có thể thoải mái đưa ra các \"\n\"câu hỏi --- và nó cũng đủ để người hướng dẫn có thể trả lời hết các câu hỏi \"\n\"đó. Hãy đảm bảo rằng phòng học có đủ _ghế_ cho cả bạn và học sinh: bạn đương \"\n\"nhiên cần ngồi dạy với laptop của bạn. Đặc biệt, bạn sẽ hướng dẫn và thực \"\n\"hành mẫu rất nhiều bài live-coding, nên một cái ghế sẽ có ích hơn là một cái \"\n\"bục giảng đó.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"Trong ngày học, hãy đến lớp sớm một chút để chuẩn bị sẵn sàng mọi thứ. Chúng \"\n\"tôi khuyến khích chạy trực tiếp lệnh `mdbook serve` trên laptop của bạn \"\n\"(tham khảo hướng dẫn cài đặt ở [đây](https://github.com/google/comprehensive-\"\n\"rust#building)). Việc này giúp đảm bảo việc chuyển trang của bạn được diễn \"\n\"ra mượt mà nhất, ngoài ra còn cho phép bạn sửa lỗi chính tả trực tiếp khi \"\n\"bạn hoặc ai đó phát hiện ra.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"Để mọi người làm các bài luyện tập theo hình thức cá nhân hoặc nhóm nhỏ. \"\n\"Chúng tôi thường bỏ ra 30 đến 45 phút để thực hành vào buối sáng hoặc chiều \"\n\"(tính cả thời gian chữa đáp án). Hãy chắc chắn hỏi các học viên xem có ai \"\n\"đang bị tắc hoặc cần mình giúp không. Nếu bạn thấy vài người đang gặp một \"\n\"vấn đề giống nhau, hay đưa nó lên trước lớp và đề xuất giải pháp, như là, \"\n\"gợi ý mọi người cách để tìm kiếm thông tin liên quan trong thư viện tiêu \"\n\"chuẩn.\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"\"\n\"Đó là tất cả, chúc bạn may mắn với hành trình hướng dẫn của bạn! Chúng tôi \"\n\"hy vọng bạn có thể tìm thấy niềm vui như cách chúng tôi tìm thấy khi dạy \"\n\"khóa học này!\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"Sau khi khóa học kết thúc, rất mong nhận được [feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/86) từ bạn để chúng tôi có thể hoàn \"\n\"thiện khóa học hơn nữa. Chúng tôi rất vui lòng khi được biết những gì mang \"\n\"lại hiệu quả cho bạn và những gì cần cải thiện thêm. Ngoài ra, học viên của \"\n\"bạn cũng có thể tích cực gửi feedback cho chúng tôi tại [đây](https://github.\"\n\"com/google/comprehensive-rust/discussions/100)!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust Căn Bản\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"Ở bốn ngày học đầu tiên, ta sẽ nhanh chóng khái quát rất nhiều khía cạnh \"\n\"[căn bản](../welcome-day-1.md) của Rust!\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"Thời khóa biểu:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"Ngày 1 Buổi Sáng (2 tiếng và 5 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Segment\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/welcome-day-1-afternoon.md src/tuples-and-arrays.md src/references.md\n#: src/user-defined-types.md src/welcome-day-2.md src/pattern-matching.md\n#: src/methods-and-traits.md src/welcome-day-2-afternoon.md src/generics.md\n#: src/std-types.md src/std-traits.md src/welcome-day-3.md\n#: src/memory-management.md src/smart-pointers.md\n#: src/welcome-day-3-afternoon.md src/borrowing.md src/lifetimes.md\n#: src/welcome-day-4.md src/iterators.md src/modules.md src/testing.md\n#: src/welcome-day-4-afternoon.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Duration\"\nmsgstr \"Thời lượng\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/user-defined-types.md src/generics.md src/std-types.md src/std-traits.md\n#: src/memory-management.md src/smart-pointers.md src/lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md src/concurrency/shared-state.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"5 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/references.md src/user-defined-types.md src/methods-and-traits.md\n#: src/modules.md src/concurrency/welcome.md src/concurrency/threads.md\n#: src/concurrency/shared-state.md\nmsgid \"15 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-4.md\nmsgid \"40 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"Ngày 1 Buổi Chiều (2 tiếng và 35 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\nmsgid \"35 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-3.md src/welcome-day-3-afternoon.md\n#: src/welcome-day-4-afternoon.md src/concurrency/welcome-async.md\nmsgid \"55 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-1-afternoon.md\n#: src/welcome-day-2.md src/welcome-day-3-afternoon.md\nmsgid \"50 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Ngày 2 Buổi Sáng (2 tiếng và 55 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/hello-world.md\n#: src/types-and-values.md src/control-flow-basics.md src/tuples-and-arrays.md\n#: src/welcome-day-2.md src/methods-and-traits.md src/std-types.md\n#: src/welcome-day-3.md src/borrowing.md src/welcome-day-4.md src/modules.md\n#: src/testing.md src/error-handling.md\nmsgid \"3 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2.md\n#: src/welcome-day-3.md\nmsgid \"1 hour\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (4 hours, including breaks)\"\nmsgstr \"Ngày 2 Buổi Chiều (3 tiếng và 10 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\nmsgid \"1 hour and 20 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-2-afternoon.md\nmsgid \"1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"Ngày 3 Buổi Sáng (2 tiếng và 20 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (1 hour and 55 minutes, including breaks)\"\nmsgstr \"Ngày 3 Buổi Chiều (1 tiếng và 50 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"Ngày 4 Buổi Sáng (2 tiếng và 40 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4.md\nmsgid \"45 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"Ngày 4 Buổi Chiều (2 tiếng và 10 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/welcome-day-4-afternoon.md\nmsgid \"1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"Chuyên Sâu\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"\"\n\"Ngoài lớp học \\\"4 ngày\\\" về Rust căn bản ra, chúng tôi còn cung cấp thêm một \"\n\"số chủ đề chuyên sâu sau:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Rust trong Android\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"Chủ đề chuyên sâu [Rust trong Android](../android.md) là khóa học nửa ngày \"\n\"hướng dẫn sử dụng Rust cho phát triển trên nền tảng Android, bao gồm tính \"\n\"tương tác với C, C++ và Java.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"Bạn sẽ cần cài sẵn [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading), rồi tạo một checkout cho [repository của khóa học]\"\n\"(https://github.com/google/comprehensive-rust) và di chuyển thư mục `src/\"\n\"android/` tới thư mục root của AOSP checkout trên. Việc này sẽ đảm bảo hệ \"\n\"thống build của Android tìm được file `Android.bp` trong thư mục `src/\"\n\"android/`.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"Hãy chắc chắn rằng lệnh `adb sync` hoạt động được với trình giả lập hoặc \"\n\"thiết bị thực của bạn, và pre-build tất cả ví dụ Android bằng `src/android/\"\n\"build_all.sh`. Bạn có thể đọc script để xem các lệnh mà nó chạy và xác nhận \"\n\"rằng mọi thứ đều hoạt động khi bạn kích hoạt bằng tay.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Rust trong Chromium\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"Chủ đề chuyên sâu [Rust trong Chromium](../chromium.md) là khóa học nửa ngày \"\n\"hướng dẫn sử dụng Rust như là một phần của trình duyệt nhân Chromium, bao \"\n\"gồm hệ thống build `gn`, đưa vào thư viện bên thứ ba (\\\"crates\\\") và tính \"\n\"tương tác với C++.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"Bạn sẽ cần có khả năng build được Chromium --- chúng tôi [đề xuất](../\"\n\"chromium/setup.md) build bằng công cụ xây dựng thành phần, debug bởi tốc độ \"\n\"ấn tượng của nó. Dù sao thì bất kỳ cách build nào cũng đều hoạt động được, \"\n\"chỉ cần bạn đảm bảo rằng mình sẽ chạy được trình duyệt Chromium vừa build \"\n\"xong.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"Bare-Metal Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"Chủ đề chuyên sâu [Bare-Metal Rust](../bare-metal.md) là khóa học một ngày \"\n\"hướng dẫn sử dụng Rust cho phát triển nhúng (bare-metal). Nội dung về vi \"\n\"điều khiển và bộ xử lý ứng dụng sẽ được bao quát trong phần này.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"Về phần vi điều khiển, bạn sẽ cần mua trước bo mạch [BBC micro:bit](https://\"\n\"microbit.org/) v2. Mỗi người sẽ cần cài đặt một số packages dựa theo miêu tả \"\n\"ở [trang chào mừng](../bare-metal.md).\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Tính đồng thời trong Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"Chủ đề chuyên sâu [Tính đồng thời trong Rust](../concurrency.md) là khóa học \"\n\"một ngày hướng dẫn về khái niệm đồng thời `async`/`await` điển hình.\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"Bạn sẽ cần thiết lập một crate mới và tải xuống các gói phụ thuộc cần thiết \"\n\"để sẵn sàng chạy. Rồi bạn có thể copy/paste các ví dụ vào `src/main.rs` để \"\n\"thử nghiệm:\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Morning (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Ngày 3 Buổi Sáng (2 tiếng và 20 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md src/pattern-matching.md\n#: src/std-traits.md src/smart-pointers.md src/lifetimes.md src/iterators.md\n#: src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-exercises.md\nmsgid \"30 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/methods-and-traits.md\n#: src/std-types.md src/std-traits.md src/memory-management.md src/borrowing.md\n#: src/concurrency/welcome.md src/concurrency/sync-exercises.md\n#: src/concurrency/welcome-async.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"20 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\nmsgid \"Send and Sync\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"1 hour and 10 minutes\"\nmsgstr \"\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Afternoon (3 hours and 20 minutes, including breaks)\"\nmsgstr \"Buổi Chiều (3 tiếng và 20 phút, bao gồm thời gian nghỉ)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"Quy Chuẩn\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"\"\n\"Khóa học này hướng tới tính tương tác cao nên chúng tôi khuyến khích để các \"\n\"câu hỏi dẫn bạn đi khám phá nhiều thứ thú vị của Rust!\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"Dưới đây là một vài phím tắt có ích cho việc sử dụng mdBook:\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"Mũi tên trái\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \": Điều hướng tới trang trước.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"Mũi tên phải\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \": Điều hướng tới trang tiếp theo.\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \": Chạy đoạn code mẫu chỉ định.\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \": Kích hoạt thanh tìm kiếm.\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"\"\n\"Khóa học này đã được dịch ra các ngôn ngữ sau nhờ các tình nguyện viên tuyệt \"\n\"vời:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[Tiếng Bồ Đào Nha - Brasil](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/) bởi [@rastringer](https://github.com/rastringer), [@hugojacob](https://\"\n\"github.com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), \"\n\"và [@henrif75](https://github.com/henrif75).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[Tiếng Trung Giản Thể](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"bởi [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), và [@nodmp]\"\n\"(https://github.com/nodmp).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[Tiếng Trung Phồn Thể](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"bởi [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), và [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[Tiếng Hàn](https://google.github.io/comprehensive-rust/ko/) bởi [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), và [@namhyung](https://github.\"\n\"com/namhyung).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[Tiếng Tây Ban Nha](https://google.github.io/comprehensive-rust/es/) và \"\n\"[@deavid](https://github.com/deavid).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"\"\n\"Sử dụng nút lựa chọn ngôn ngữ ở góc phía trên bên phải để đổi sang ngôn ngữ \"\n\"khác.\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"Bản Dịch Chưa Hoàn Chỉnh\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"\"\n\"Hiện tại, vẫn còn một lượng lớn các bản dịch đang được tiến hành. Chúng tôi \"\n\"liên kết đến các bản dịch được cập nhật gần đây nhất:\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[Tiếng Bengal](https://google.github.io/comprehensive-rust/bn/) bởi \"\n\"[@raselmandol](https://github.com/raselmandol).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) and \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\nmsgstr \"\"\n\"[Tiếng Pháp](https://google.github.io/comprehensive-rust/fr/) bởi [@KookaS]\"\n\"(https://github.com/KookaS), [@vcaen](https://github.com/vcaen) và \"\n\"[@AdrienBaudemont](https://github.com/AdrienBaudemont).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[Tiếng Đức](https://google.github.io/comprehensive-rust/de/) bởi [@Throvn]\"\n\"(https://github.com/Throvn) và [@ronaldfw](https://github.com/ronaldfw).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[Tiếng Nhật](https://google.github.io/comprehensive-rust/ja/) bởi [@CoinEZ-\"\n\"JPN](https://github.com/CoinEZ) và [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[Tiếng Ý](https://google.github.io/comprehensive-rust/it/) bởi \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) và [@detro](https://\"\n\"github.com/detro).\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"Nếu bạn muốn đóng góp giúp đỡ, vui lòng xem [hướng dẫn của chúng tôi]\"\n\"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) để \"\n\"biết nên bắt đầu như thế nào. Các bản dịch được hợp tác cùng hoàn thành trên \"\n\"một bản [issue tracker](https://github.com/google/comprehensive-rust/\"\n\"issues/1957).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"Khi bạn bắt đầu đọc về Rust, bạn sẽ rất nhanh chóng được thấy [Cargo]\"\n\"(https://doc.rust-lang.org/cargo/), một công cụ tiêu chuẩn xây dựng và chạy \"\n\"ứng dụng Rust, nằm trong hệ sinh thái của Rust. Trong phần này, chúng tôi sẽ \"\n\"tóm tắt ngắn gọn Cargo là gì, nó phù hợp với hệ sinh thái rộng lớn hơn ra \"\n\"sao, và nó phù hợp với khóa đào tạo như thế nào.\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"Cài đặt\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**Vui lòng tuân theo hướng dẫn cài đặt tại <https://rustup.rs/>.**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"Bạn sẽ nhận được công cụ xây dựng Cargo (`cargo`) và trình biên dịch Rust \"\n\"(`rustc`). Bạn cũng sẽ có `rustup`, một tiện ích dòng lệnh mà bạn có thể sử \"\n\"dụng để cài đặt các phiên bản khác nhau cho trình biên dịch.\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"Sau khi cài đặt Rust thành công, bạn nên cấu hình trình Text Editor hoặc IDE \"\n\"của bạn để hoạt động với Rust. Hầu hết các Text Editor như [VS Code](https://\"\n\"code.visualstudio.com/), [Emacs](https://rust-analyzer.github.io/manual.\"\n\"html#emacs), [Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim), v.v... đều áp dụng [rust-analyzer](https://rust-analyzer.\"\n\"github.io/) để thực hiện tính năng auto-completion và jump-to-definition. \"\n\"Bên cạnh đó, vẫn còn một IDE khác khá phổ biến được phát triển bởi JetBrains \"\n\"là [RustRover](https://www.jetbrains.com/rust/).\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"Trong hệ máy Debian/Ubuntu, bạn còn có thể tự cài đặt Cargo, mã nguồn của \"\n\"Rust, và [Rust Formatter](https://github.com/rust-lang/rustfmt) bằng `apt`. \"\n\"Tuy nhiên, bạn sẽ chỉ cài được phiên bản đã bị quá hạn và có thể dẫn tới \"\n\"những lỗi không mong muốn. Câu lệnh để cài sẽ là như sau:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Hệ Sinh Thái Rust\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"\"\n\"Hệ sinh thái của Rust bao gồm một số lượng đáng kể các công cụ, trong đó nổi \"\n\"bật nhất như là:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"\"\n\"`rustc`: trình biên dịch Rust, thứ mà sẽ \\\"dịch\\\" các file `.rs` sang dạng \"\n\"nhị phân hoặc các formats bậc trung khác.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`: trình quản lý các gói phụ thuộc và công cụ xây dựng cho Rust. Cargo \"\n\"sẽ tải các gói phụ thuộc, thường được lưu trữ trên <https://crates.io>, rồi \"\n\"đưa chúng cho `rustc` khi bạn xây dựng dự án. Cargo còn có các trình chạy \"\n\"kiểm thử được cài sẵn phục vụ cho việc thực thi các đơn vị kiểm thử.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`: bộ công cụ cài đặt và cập nhật cho Rust. Công cụ này được sử dụng \"\n\"để cài đặt và cập nhật `rustc` và `cargo` khi các phiên bản mới của Rust \"\n\"được phát hành. Thêm vào đó, `rustup` còn có thể tải các tài liệu cho thư \"\n\"viện tiêu chuẩn. Bạn có thể cài đặt nhiều phiên bản Rust cùng lúc và \"\n\"`rustup` sẽ cho bạn chuyển đổi các phiên bản với nhau khi cần.\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/memory-management/move.md\n#: src/error-handling/try.md src/android/setup.md\n#: src/concurrency/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"Các điểm chính:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust có một lịch phát hành phiên bản mới dày đặc với một phiên bản mới mỗi \"\n\"sáu tuần. Các phiên bản mới bảo toàn tính tương thích với các phiên bản cũ \"\n\"--- cùng với đó chúng kích hoạt thêm các chức năng mới.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"Có tổng cộng ba kênh phát hành: \\\"stable\\\", \\\"beta\\\", và \\\"nightly\\\".\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"\"\n\"Các tính năng mới dang được thử nghiệm trên \\\"nightly\\\", còn \\\"beta\\\" sẽ trở \"\n\"thành \\\"stable\\\" sau mỗi sáu tuần.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"Các gói phụ thuộc cũng có thể được phân giải từ các [hệ thống đăng ký]\"\n\"(https://doc.rust-lang.org/cargo/reference/registries.html) thay thế, git, \"\n\"các thư mục, v.v...\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust còn có nhiều [phiên bản lớn](https://doc.rust-lang.org/edition-guide/): \"\n\"Rust 2021 là bản hiện tại, Rust 2018, và Rust 2015.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"\"\n\"Các phiên bản lớn được cho phép thực hiện các thay đổi không tương thích đối \"\n\"với ngôn ngữ.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"Để phòng trừ phá vỡ cấu trúc mã, các phiên bản lớn sẽ được chọn cho crate \"\n\"của bạn thông qua file `Cargo.toml`.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"\"\n\"Nhằm tránh hệ sinh thái bị chia nhỏ ra, trình biên dịch Rust có thể trộn lẫn \"\n\"các đoạn mã được viết dưới các phiên bản lớn khác nhau.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"Hãy đề cập với người học rằng việc sử dụng trình biên dịch trực tiếp mà \"\n\"không thông qua `cargo` là việc rất hiếm (hầu hết người dùng không bao giờ \"\n\"làm như vậy).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"Nói không ngoa bản thân Cargo là một công cụ cự kỳ mạnh mẽ và toàn diện. Nó \"\n\"có khả năng bao gồm nhưng không giới hạn tới nhiều tính năng mở rộng sau:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"Cấu trúc dự án/bộ phần mềm.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\"\n\"[Workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"\"\n\"Các Dev Dependencies và trình quản lý/bộ nhớ đệm cho Runtime Dependency.\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[Build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[Cài đặt trên toàn môi trường](https://doc.rust-lang.org/cargo/commands/\"\n\"cargo-install.html).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"Nó còn có khả năng mở rộng được với các lệnh con dưới dạng plugins (như là \"\n\"[cargo clippy](https://github.com/rust-lang/rust-clippy)).\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"Tham khảo thêm tại [The Cargo Book](https://doc.rust-lang.org/cargo/).\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"Code Mẫu Trong Khóa Đào Tạo\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"Với khóa đào tạo này, chúng ta sẽ hầu như khám phá ngôn ngữ Rust qua các ví \"\n\"dụ có thể thực thi được ngay trên trình duyệt của mình. Việc này giúp cho \"\n\"việc chuẩn bị được thực hiện dễ dàng hơn và đảm bảo trải nghiệm đồng nhất \"\n\"với mọi người.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"Cài đặt Cargo vẫn được khuyến khích: nó sẽ giúp bạn làm các bài thực hành dễ \"\n\"hơn. Trong ngày học cuối cùng, chúng tôi sẽ làm một bài tập lớn để cho bạn \"\n\"thấy cách làm việc với các gói phụ thuộc và bạn sẽ cần Cargo để làm nó.\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"Các khối code trong khóa học này hoàn toàn tương tác được:\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Chỉnh sửa tôi đê!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"Bạn có thể sử dụng \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" để thực thi khối code đang chứa con trỏ soạn thảo của bạn.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"Hầu hết các đoạn code mẫu đều có thể chỉnh sửa được như trên. Nhưng có một \"\n\"ít các đoạn mẫu lại không chỉnh sửa được vì vài lý do sau:\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"Các Playgrounds được nhúng không thể thực thi được các đơn vị kiểm thử. Hãy \"\n\"copy-paste đoạn code và mở nó trong một Playground thực sự để minh họa các \"\n\"thử nghiệm.\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"Các Playgrounds được nhúng bị mất trạng thái tạm thời ở thời điểm bạn chuyển \"\n\"sang trang khác! Vì lý do này, các học sinh nên giải các bài thực hành sử \"\n\"dụng Rust đã được cài đặt trong máy tính riêng hoặc qua Playground thực sự.\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"Chạy Cargo Trong Máy Tính Của Bạn\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"Nếu bạn muốn thử nghiệm code trong hệ thống riêng của bạn, vậy thì trước hết \"\n\"bạn cần phải cài đặt Rust. Hãy tuân theo [các hướng dẫn trong Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch01-01-installation.html). Bạn sẽ học được \"\n\"cách sử dụng `rustc` và `cargo` ở đây. Tại thời điểm bài này được viết, \"\n\"phiên bản ổn định mới nhất của Rust có các số phiên bản sau:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"\"\n\"Bạn cũng có thể sử dụng bất kỳ phiên bản nào ra sau đó vì Rust luôn bảo trì \"\n\"khả năng tương thích ngược của nó.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"Sau khi cài xong, tuân theo các bước sau đây để xây dựng tệp nhị phân Rust \"\n\"từ một trong các ví dụ trong khóa đào tạo:\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"Nhấn vào nút \\\"Copy to clipboard\\\" trong ví dụ mà bạn muốn copy.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"\"\n\"Sử dụng `cargo new exercise` để tạo một thư mục `exercise/` mới cho code của \"\n\"bạn:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"\"\n\"Điều hướng tới `exercise/` và sử dụng `cargo run` để build và chạy tệp nhị \"\n\"phân của bạn:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"Thay thế khung code trong `src/main.rs` với code riêng của bạn. Chẳng hạn, \"\n\"sử dụng ví dụ ở trang trước, viết `src/main.rs` sao cho thành như sau\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"Sử dụng `cargo run` để build và chạy tệp nhị phân vừa được cập nhật:\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"Sử dụng `cargo check` để kiểm tra nhanh dự án của bạn, sử dụng `cargo build` \"\n\"để biên dịch nó mà không chạy nó luôn. Bạn có thể tìm các tệp được tạo ra ở \"\n\"`target/debug/` cho debug build thông thường. Sử dụng `cargo build --\"\n\"release` để xuất ra bản build tối ưu cho việc xuất bản ở `target/release/`.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"Bạn có thể thêm các gói phụ thuộc vào dự án của bạn bằng cách chỉnh sửa file \"\n\"`Cargo.toml`. Khi bạn chạy các lệnh `cargo`, nó sẽ tự động tải về và biên \"\n\"dịch các gói phụ thuộc bị thiếu cho bạn.\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"Hãy cố gắng khuyến khích các học viên cài đặt Cargo và sử dụng trong Text \"\n\"Editor ở máy riêng. Điều này sẽ giúp cuộc sống của họ dễ thở hơn một tý vì \"\n\"họ sẽ được làm việc trong một môi trường phát triển bình thường.\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"Chào mừng tới Ngày 1\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"\"\n\"Đây là ngày học đầu tiên của Rust Căn Bản. Sẽ có rất nhiều nội dung mà chúng \"\n\"ta bao quát trong hôm nay:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Câu lệnh Rust cơ bản: các biến, kiểu dữ liệu đơn giản và phức hợp, enum, \"\n\"struct, tham chiếu, hàm và phương thức.\"\n\n#: src/welcome-day-1.md\nmsgid \"Types and type inference.\"\nmsgstr \"Các kiểu dữ liệu và suy luận kiểu.\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"Các cấu trúc điều kiển luồng: vòng lặp, điều kiện, vân vân...\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"Các kiểu dữ liệu tự định nghĩa: struct và enum.\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"So khớp mẫu: hủy enum, struct, và mảng.\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md src/concurrency/welcome.md\n#: src/concurrency/welcome-async.md\nmsgid \"Schedule\"\nmsgstr \"Mục lục\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 2 tiếng và 5 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"Hãy lưu ý các học viên rằng:\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"Học viên nên đặt câu hỏi bất kì khi nào thay vì đợi đến cuối buổi học.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"Lớp học rất khuyến khích có nhiều sự tương tác và thảo luận!\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"Với vai trò là người hướng dẫn, bạn nên giữ các cuộc thảo luận sao cho không \"\n\"bị lạc đề, chẳng hạn, thử giới hạn các cuộc thảo luận xung quanh cách Rust \"\n\"hoạt động so với vài ngôn ngữ khác. Việc cân bằng này có thể sẽ khá khó \"\n\"khăn, nhưng ta thà chấp nhận nó để học viên thấy hứng thú hơn là việc giao \"\n\"tiếp một chiều.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"Một phần có thể bị hỏi trước khi ta học tới slide của phần đó.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"Đây là điều hoàn toàn chấp nhận được! Nhắc lại kiến thức là một phần quan \"\n\"trọng của việc học. Hãy nhớ rằng các slides chỉ là công cụ hỗ trợ cho bạn và \"\n\"bạn có thể bỏ qua chúng nếu muốn.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"Ý tưởng cho ngày đầu tiên đó là đưa ra các khía cạnh \\\"cơ bản\\\" của Rust \"\n\"tương tự với các ngôn ngữ khác. Các phần nâng cao hơn sẽ được đề cập tới ở \"\n\"những ngày kế tiếp.\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"Nếu bạn đang giảng bài này trên lớp, thì bạn nên vắn tắt một lượt mục lục \"\n\"trên. Hãy ghi nhớ rằng cuối mỗi mục nhỏ sẽ có một bài thực hành, sau đó là \"\n\"giờ nghỉ giải lao. Hãy lên kế hoạch để chữa bài thực hành sau giờ nghỉ. Thời \"\n\"gian ở sau mỗi đề mục là nhằm giúp bạn giữ đúng tiến độ khóa học, nhưng bạn \"\n\"cũng có thể thoải mái điều chỉnh linh hoạt nếu cần thiết!\"\n\n#: src/hello-world.md src/concurrency/send-sync.md\nmsgid \"This segment should take about 15 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 15 phút, bao gồm:\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\n#: src/concurrency/threads.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md src/concurrency/shared-state.md\n#: src/concurrency/sync-exercises.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\n#: src/concurrency/async-exercises.md\nmsgid \"Slide\"\nmsgstr \"\"\n\n#: src/hello-world.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/modules.md\n#: src/unsafe-rust.md src/concurrency/channels.md src/concurrency/send-sync.md\n#: src/concurrency/shared-state.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md src/concurrency/async-pitfalls.md\nmsgid \"10 minutes\"\nmsgstr \"\"\n\n#: src/hello-world.md src/control-flow-basics.md src/user-defined-types.md\n#: src/memory-management.md src/concurrency/channels.md\n#: src/concurrency/send-sync.md\nmsgid \"2 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust là một ngôn ngữ lập trình mới được phát hành [phiên bản 1.0 vào năm \"\n\"2015](https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust là một ngôn ngữ được biên dịch tĩnh với vai trò tương tự như C++\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` sử dụng LLVM làm bộ dịch backend.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust hỗ trợ rất nhiều [nền tảng và kiểu kiến trúc](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust được sử dụng cho nhiều loại thiết bị:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"firmware và các chương trình khởi động (*boot loaders*),\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"màn hình thông minh,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"điện thoại di động,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"máy tính,\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"máy chủ.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust phù hợp trong cùng lĩnh vực như C++:\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"Độ linh hoạt cao.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"Có quyền điều khiển cao.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"\"\n\"Có thể ứng dụng với các thiết bị có tài nguyên hạn chế như vi điều khiển.\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"\"\n\"Không có thời gian chạy (*runtime*) hay trình thu dọn rác (*garbage \"\n\"collection*).\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"\"\n\"Tập trung vào tính đáng tin cậy và độ an toàn mà không làm giảm hiệu suất.\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Sân chơi cho Rust (*Rust Playground*)](https://play.rust-lang.org/) cho \"\n\"phép chúng ta chạy thử những đoạn code ngắn viết bằng Rust, đặc biệt là các \"\n\"ví dụ và bài tập trong khoá học này. Hãy mở Rust Playground và chạy thử \"\n\"chương trình “hello-world”. Rust Playground đi kèm với một vài tính năng hữu \"\n\"ích:\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"\"\n\"Ở phần “Công cụ (*Tools*)”, sử dụng tuỳ chọn`rustfmt` để định dạng đoạn code \"\n\"của bạn theo cách “tiêu chuẩn”.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust có hai “chế độ” chính để tạo code: Gỡ lỗi (*Debug*) (thêm nhiều thông \"\n\"tin hỗ trợ trong quá trình chạy (*runtime*), ít tối ưu hơn) và Phát hành \"\n\"(*Release*) (ít thông tin hỗ trợ trong quá trình chạy (*runtime*), tối ưu \"\n\"hoá nhiều hơn). Các tuỳ chọn này có trong mục “Gỡ lỗi (*Debug*)” ở phía trên.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"\"\n\"Nếu bạn quan tâm, bạn có thể sử dụng chế độ “ASM” ở trong phần “...” để xem \"\n\"đoạn code Assembly được tạo.\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"Hãy khuyến khích học viên sử dụng Rust Playground để thử nghiệm trong giờ \"\n\"giải lao. Khuyến khích học viên luôn giữ tab mở và liên tục thử nghiệm mọi \"\n\"thứ trong suốt phần còn lại của khoá học. Điều này đặc biệt hữu ích cho \"\n\"những học viên nâng cao muốn biết thêm về tối ưu hoá của Rust và những đoạn \"\n\"code Assembly được tạo ra.\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/generics.md\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes. It contains:\"\nmsgstr \"Phân đoạn này sẽ kéo dài khoảng 40 phút, bao gồm:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"\"\n\"Chúng ta hãy cùng bước vào chương trình Rust đơn giản nhất, một chương trình \"\n\"Hello World điển hình:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"Những gì bạn thấy được:\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"Khái niệm hàm được giới thiệu với `fn`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"Các khối code được phân tách theo ngoặc nhọn y như C và C++.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"Hàm `main` là điểm bắt đầu của cả chương trình.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust có các hygienic macros, ví dụ như `println!`.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"\"\n\"Các chuỗi của Rust được mã hóa theo chuẩn UTF-8 và có thể chứa bất kỳ ký tự \"\n\"Unicode nào.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"Slide này là nhằm cố gắng giúp các học viên thấy thoải mái với Rust code. Họ \"\n\"sẽ được thấy hàng tấn đoạn code tương tự trong bốn ngày tiếp theo nên ta có \"\n\"thể bắt đầu với những thứ nhỏ bé quen thuộc trước.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust khá giống với các ngôn ngữ truyền thống như C/C++/Java, đó là điều bắt \"\n\"buộc. Nó cũng cố tránh sáng tạo lại những thứ đã có trừ khi thực sự cần \"\n\"thiết.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"\"\n\"Rust là ngôn ngữ hiện đại với khả năng hỗ trợ đầy đủ các tính năng như là \"\n\"Unicode.\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"Rust sử dụng các macro trong các tình huống như khi bạn muốn có số lượng đối \"\n\"số thay đổi (không bao gồm [nạp chồng hàm](../control-flow-basics/functions.\"\n\"md)).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"Macros được gọi là 'hygienic' khi chúng không vô tình bắt các định danh từ \"\n\"phạm vi mà chúng được sử dụng. Rust macros thực chất chỉ là [hygienic từng \"\n\"phần](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html).\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust là ngôn ngữ đa mô hình. Ví dụ, nó có các [tính năng hướng đối tượng]\"\n\"(https://doc.rust-lang.org/book/ch17-00-oop.html) mạnh mẽ, và dù cho nó \"\n\"không phải là một ngôn ngữ lập trình chức năng, nó vẫn bao gồm nhiều [khái \"\n\"niệm lập trình hàm](https://doc.rust-lang.org/book/ch13-00-functional-\"\n\"features.html).\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"\"\n\"Rust cung cấp tính năng an toàn kiểu thông qua kiểu dữ liệu tĩnh. Việc liên \"\n\"kết biến được thực thi bằng `let`:\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"Hãy thử  loại bỏ ghi chú `x = 20` để cho thấy các biến theo mặc định là bất \"\n\"biến. Thêm từ khóa `mut` để cho các biến được chấp nhận thay đổi.\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"Ở đây, từ khóa `i32` chỉ kiểu dữ liệu của biến. Từ khóa này là bắt buộc cho \"\n\"việc biên dịch, nhưng trong nhiều trường hợp, suy luận kiểu (sẽ được thảo \"\n\"luận sau) cho phép lập trình viên bỏ qua nó.\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"\"\n\"Dưới đây là các kiểu dữ liệu được định nghĩa sẵn, và nguyên văn cú pháp cho \"\n\"các giá trị của từng loại.\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"Kiểu Dữ Liệu\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"Nguyên Văn Cú Pháp\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"Số nguyên có dấu\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`, `0`, `1_000`, `123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"Số nguyên không dấu\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`, `123`, `10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"Số thực dấu phẩy động\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`, `f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`, `-10.0e20`, `2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Giá trị vô hướng Unicode\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`, `'α'`, `'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"Boolean\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`, `false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"Các kiểu dữ liệu có độ lớn như sau:\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN`, và `fN` tương đương _N_ bit,\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` và `usize` tương đương một pointer,\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` tương đương 32 bit,\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` tương đương 8 bit.\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"Ngoài ra, còn có một vài cú pháp không được kể  đến ở trên:\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"Tất cả dấu gạch dưới trong số đều có thể  bỏ qua, chúng chỉ nhằm cho mục \"\n\"đích dễ đọc mã. Vậy nên, `1_000` có thể  được viết thành `1000` (hoặc \"\n\"`10_00`), và `123_i64` có thể được viết thành `123i64`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"kết quả: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"Đây là lần đầu tiên ta thấy một hàm mới ngoài hàm `main`, nhưng hàm này cũng \"\n\"có logic rõ ràng dễ hiểu: nó nhận ba số nguyên, và trả lại một số nguyên. \"\n\"Chi tiết về hàm sẽ được bao quát sau.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"\"\n\"Số học trong Rust cũng rất giống với các ngôn ngữ khác, với tiền đề giống \"\n\"nhau.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\"Vậy còn hiên tượng tràn số nguyên thì sao? Trong C và C++, vấn đề tràn số \"\n\"nguyên _có dấu_ thực ra lại không được xác định, và nó có thể  xảy ra theo \"\n\"các cách khác nhau trên các nền tảng hoặc trình biên dịch khác nhau. Còn \"\n\"trong Rust, nó được xác định rõ ràng.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"Để  xem cách tràn số nguyên xảy ra, hãy thử  đổi `i32` sang `i16`. Việc này \"\n\"sẽ gây ra lỗi (đã được kiểm tra) trong bản debug build và được điều chỉnh \"\n\"lại kiểu phù hợp trong bản release build. Ngoài ra, còn có các tùy chọn số \"\n\"học khác như tính số tràn (overflowing), tính số bão hòa (saturating), và \"\n\"tính giữ phần dư (carrying). Chúng được truy cập bằng cú pháp riêng, ví dụ, \"\n\"`(a * b).saturating_add(b * c).saturating_add(c * a)`.\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"Trên thực tế, trình biên dịch sẽ phát hiện ra tràn số nguyên trong các biểu \"\n\"thức hằng số, vì thế nên ta cần phải tách ra các hàm riêng ở trong ví dụ \"\n\"trên.\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"\"\n\"Rust sẽ kiểm tra xem biến được _sử dụng_ như thế nào để xác định kiểu dữ \"\n\"liệu:\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"Slide này cho ta thấy cách mà trình biên dịch Rust đoán kiểu dữ liệu dựa \"\n\"trên các ràng buộc từ việc khai báo và sử dụng biến.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"Một điều quan trọng cần lưu ý đó là việc khai báo các biến như trên không \"\n\"phải là một dạng khai báo động theo kiểu \\\"any\\\" mà có thể  gán được bất kỳ \"\n\"dữ liệu nào. Mã máy được sinh ra từ cách khai báo này cũng giống như cách \"\n\"khai báo một kiểu dữ liệu cụ thể. Trình biên dịch sẽ lo liệu những việc này \"\n\"cho ta và giúp ta viết những đoạn mã ngắn gọn hơn.\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"Khi không có bất cứ ràng buộc nào cho khai báo kiểu số nguyên, Rust sẽ mặc \"\n\"định sử dụng `i32`. Đôi khi trong thông báo lỗi biến sẽ được hiển thị dưới \"\n\"dạng `{integer}`. Tương tự, với các số thực dấu phẩy động, Rust mặc định là \"\n\"`f64`.\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ERROR: no implementation for `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci \"\n\"number is calculated recursively as the sum of the n-1'th and n-2'th \"\n\"Fibonacci numbers.\"\nmsgstr \"\"\n\"Hai số Fibonacci đầu tiên mang giá trị `1`. Với n > 2, số Fibonacci thứ n sẽ \"\n\"được tính đệ quy bằng với tổng của số Fibonacci thứ n - 1 và n - 2.\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"Hãy viết một hàm `fib(n)` để tính số Fibonacci thứ n. Khi nào thì hàm này sẽ \"\n\"gây lỗi?\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// Trường hợp dừng.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"\\\"Triển khai ở đây\\\"\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// Trường hợp đệ quy.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib({n}) = {}\\\"\"\n\n#: src/control-flow-basics.md\nmsgid \"if Expressions\"\nmsgstr \"Lệnh `if`\"\n\n#: src/control-flow-basics.md src/pattern-matching.md src/concurrency/async.md\n#: src/concurrency/async-control-flow.md\nmsgid \"4 minutes\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"break and continue\"\nmsgstr \"`break` và `continue`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"Lệnh `if`\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"Học viên sử dụng [lệnh `if`](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) giống hệt như lệnh `if` ở những ngôn ngữ lập \"\n\"trình khác\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"số không\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"số lớn\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"số rất hơn\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"Ngoài ra, học viên có thể sử dụng `if` như một biểu thức. Biểu thức cuối \"\n\"cùng của mỗi khối lệnh sẽ trở thành giá trị của biểu thức `if` đó\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"nhỏ\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"lớn\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"kích thước số: {}\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"Bởi vì `if` là một biểu thức và phải có một kiểu dữ liệu nhất định, mỗi \"\n\"nhánh khối lệnh phải có cùng một kiểu dữ liểu. Hãy trình bày nếu học viên \"\n\"thêm dấu `;` vào sau `\\\"nhỏ\\\"` ở ví dụ thứ hai\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"Khi `if` được sử dụng cho một biểu thức, biểu thức đó phải có dấu `;` để \"\n\"tách biệt nó khỏi lệnh tiếp theo. Loại bỏ dấu `;` sau `println!` để thấy \"\n\"được lỗi biên dịch\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"Có ba từ khóa cho vòng lặp trong Rust: while`, `loop` và `for`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[Từ khóa `while`](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-loops) hoạt đông tương tự như những ngôn ngữ lập trình khác, \"\n\"thực hiện vòng lặp lại một khối lệnh trong khi điều kiện còn đúng\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Số x cuối cùng: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[Từ khóa `for`] lặp lại qua chuỗi dữ liệu hoặc các phần tử trong một tập hợp:\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\"Cơ chế hoạt động của vòng lặp `for` sử dụng một khái niệm gọi là \"\n\"\\\"iterators\\\" để xử việc lặp lại qua nhiều dạng dãy/tập hợp khác nhau. \"\n\"Iterators sẽ được nhắc tới chi tiết sau.\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\"Lưu ý rằng vòng lặp `for` chỉ lặp tới `4`. Trình bày cú pháp `1..=5` để có \"\n\"một dãy bao gồm\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[Từ khóa `loop`](https://doc.rust-lang.org/std/keyword.loop.html) là một \"\n\"vòng lặp bất tận, cho tới khi `break`.\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"Nếu học viên muốn bắt đầu vòng lặp tiếp theo thì hãy sử dụng [`continue`]\"\n\"(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-\"\n\"expressions).\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"Nếu học viên muốn kết thúc một vòng lặp sớm, sử dụng [`break`](https://doc.\"\n\"rust-lang.org/reference/expressions/loop-expr.html#break-expressions). Đối \"\n\"với `loop`, từ khóa này có thể dùng một biểu thức tùy chọn trở thành giá trị \"\n\"của biểu thức `loop` \"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/borrowing/interior-mutability.md src/modules/exercise.md\n#: src/modules/solution.md src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"Cả `continue` và `break` có thể sử dụng một nhãn tùy chọn để được sử dụng để \"\n\"thoát ra khỏi những vòng lặp lồng nhau\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\\\"elements searched: {elements_searched}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"Lưu ý rằng `loop` là kiểu vòng lặp duy nhất có thể trả về một giá trị. Đấy \"\n\"là vởi vì vòng lặp sẽ chắc chắn được nhập vào ít nhất một lần (không giống \"\n\"như vòng lặp `while` và `for`) \"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"Blocks (khối lệnh)\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Mỗi block trong Rust chứa một chuỗi những biểu thức, được bao bọc bởi dấu `{}\"\n\"`. Mỗi block có một giá trị và một kiểu dữ liệu tương ứng với biểu thức cuối \"\n\"cùng của block đó:\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"\"\n\"Nếu biểu thức cuối cùng kết thúc bằng dấu `;`, giá trị trả về và kiểu dữ \"\n\"liệu sẽ là `()`.\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"Giáo viên có thể trình bày rằng giá trị của block thay đổi bằng cách thay \"\n\"đổi dòng cuối cùng của block đó. Ví dụ, thêm vào hoặc loại bỏ dấu `;` hoặc \"\n\"sử dụng lệnh `return`\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"Mỗi scope của một biến đều được giới hạn trong một block (khối lệnh).\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"\"\n\"Học viên có thể shadow (che khuất) các biến,  bao gồm các biến ở ngoài phạm \"\n\"vi và các biến ở trong cùng một scope:\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"ban đầu: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope (phạm vi bên trong): {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"được shadow bên trong phạm vi: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"sau cùng: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"Trình bày rằng mỗi phạm vi của một biến bị giới hạn bằng cách thêm một biến \"\n\"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó từ bên \"\n\"ngoài block.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"Shadow khác với mutation (đột biến), bởi vì sau khi shadow tất cả các vị trí \"\n\"bộ nhớ của biến đó cùng đồng thời tồn tại. Tất cả đều tồn tại dưới cùng một \"\n\"tên, biến nào được sử dụng trong chương trình tùy thuộc vào việc học viên sử \"\n\"dụng chúng ở đâu trong mã.\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"\"\n\"Mỗi một shadowing variable (biến bóng) đều có thể có một kiểu dữ liệu khác \"\n\"nhau\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"\"\n\"Shadowing có thể khó hiểu ban đầu, nhưng hữu dụng trong việc giữ giá trị sau \"\n\"khi `.unwrap()`.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"\"\n\"Những tham số phải được chú thích sau bằng một kiểu dữ liệu (ngược lại với \"\n\"một số ngôn ngữ lập trình khác), rồi một giá trị trả về.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"Biểu thức cuối cùng trong hàm (hay một khối) sẽ trở thành giá trị tả về. Đơn \"\n\"giản bằng cách bỏ qua dấu `;` ở cuối biểu thức. Từ khóa `return` có thể sử \"\n\"dụng để trả về sớm, nhưng \\\"giá trị trần (bare value)\\\" là triết lí ngôn ngữ \"\n\"(idiomatic) khi đặt ở cuối hàm (tái cấu trúc `gcd` dể sử dụng `return`).\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"Một số hàm sẽ không có giá trị trở về, sẽ trả về 'kiểu dữ liệu', `()`. Trình \"\n\"biên dịch sẽ kết luận rằng kiểu dữ liệu sẽ là `-> ()` nếu kiểu dữ liệu trả \"\n\"về được bỏ qua.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"\"\n\"Overloading (nạp chồng) không được hỗ trợ -- mỗi hàm chỉ có duy nhất một \"\n\"triển khai.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"Luôn luôn lấy một số những tham số nhất định. Đối số mặc định không đưọc hỗ \"\n\"trợ. Macros có thể sử dụng cho hỗ trợ hàm đa tham số.\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"\"\n\"Luôn luôn chỉ lấy một nhóm kiểu tham số dữ liệu. Những kiểu dữ liệu này có \"\n\"thể là generic (tổng quát), và sẽ được đề cập tới ở phần sau.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"Macros được triển khai qua mã Rust trong quá trình biên dịch, và có thể nhận \"\n\"nhiều những biến khác nhau. Macros được nhận diện bởi dấu `!` ở sau cùng. \"\n\"Rust standard library (Thư viện Rust căn bản) bao gồm nhiều loại macros hữu \"\n\"dụng khác nhau.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"`println!(format, ..)` in nội dung ra standard output, áp dụng format được \"\n\"miêu tả trong [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` hoạt động tương tự như `println!` nhưng trả về dữ liệu \"\n\"ở dạng `string`.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` logs giá trị của biểu thức rồi trả về giá trị đó.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`todo!()` đánh dấu một phần của mã là not-yet-implemented (chưa được hoàn \"\n\"thiện). Khi được triển khai, đoạn mã đõ sẽ panic.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` đánh dẫu một đoạn mã là unreachable (không thể tới). Khi \"\n\"được triển khai, đoạn mã đõ sẽ panic.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"Bài học được rút ra trong chương này là những cú pháp thông dụng tiện nghi \"\n\"trên tồn tại, và các sử dụng chúng. Tại sao chúng được định nghĩa là macros, \"\n\"với cách những macros triền khai qua đều không quan trọng.\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"\"\n\"Khóa học này sẽ không đi qua về định nghĩ macros, nhưng những chương tiếp \"\n\"theo sẽ đề cập tới sử dụng derive macros.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"[Chuỗi Collatz](https://vi.wikipedia.org/wiki/\"\n\"Gi%E1%BA%A3_thuy%E1%BA%BFt_Collatz) được định nghĩa như sau: với một giá trị \"\n\"bất kì n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \" lớn hơn 0:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"Nếu _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ là 1, thì chuỗi sẽ chấm dứt tại _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ là chẵn, thì _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" / 2_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ là lẻ, thì _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"Ví dụ, bắt đầu bằng _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3:\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 là số lẻ, nên _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 là số chẵn, nên _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 là số lẻ, nên _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 5 + 1 = 16;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"16 là số chẵn, nên _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2 = 8;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"8 là số chẵn, nên _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2 = 4;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"4 là số chẵn, nên _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2 = 2;\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"2 là số chẵn, nên _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1; và\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"chuỗi chấm dứt.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"\"\n\"Viết một hàm để tính độ dài chủa chuỗi Collatz với một giá trị ban đầu `n`\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Đưa ra độ dài của chuỗi Collatz bắt đầu bằng `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/threads/scoped.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Độ dài: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\nmsgid \"Welcome Back\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 2 tiếng và 35 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 35 phút, bao gồm:\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"What is the type of this variable?\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"function. This function only operates on 3x3 matrices.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/references.md src/smart-pointers.md src/borrowing.md\n#: src/error-handling.md src/concurrency/async-pitfalls.md\nmsgid \"This segment should take about 55 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 55 phút, bao gồm:\"\n\n#: src/references.md\nmsgid \"Slices: &\\\\[T\\\\]\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\n#: src/references/slices.md\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md\nmsgid \"This segment should take about 50 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 50 phút, bao gồm:\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\n#: src/user-defined-types/static.md\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"Chào mừng tới Ngày 2\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"\"\n\"Chúng ta đã có kiến thức tổng quan về Rust, hôm nay sẽ tập trung vào hệ \"\n\"thống kiểu trong Rust:\"\n\n#: src/welcome-day-2.md\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"So khớp mẫu (Pattern matching): trích xuất dữ liệu từ các cấu trúc.\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"Phương thức (Methods): liên kết hàm với các kiểu dữ liệu.\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"Traits: hành vi được chia sẻ bởi nhiều kiểu dữ liệu.\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"Generics: tham số hóa các kiểu dữ liệu trên các kiểu khác nhau.\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"\"\n\"Các kiểu thư viện chuẩn và traits: sơ bộ về thư viện chuẩn phong phú của \"\n\"Rust.\"\n\n#: src/welcome-day-2.md src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 2 tiếng và 10 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/pattern-matching.md src/memory-management.md\nmsgid \"This segment should take about 1 hour. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 1 giờ, bao gồm:\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Structs\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Like tuples, Struct can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-structs.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"Like tuples, enums can also be destructured by matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\n#: src/pattern-matching/destructuring-enums.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 4 hours. It \"\n\"contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 4 tiếng, bao gồm thời gian 10 phút nghỉ trưa. \"\n\"Nội dung buổi học bao gồm:\"\n\n#: src/generics.md\nmsgid \"impl Trait\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"Exercise: Generic min\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::From(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'7'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"'1'\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"This segment should take about 1 hour and 20 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 1 giờ và 20 phút, bao gồm:\"\n\n#: src/std-types.md src/std-types/option.md\nmsgid \"Option\"\nmsgstr \"Option\"\n\n#: src/std-types.md src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types.md src/std-types/string.md\nmsgid \"String\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"Vec\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"HashMap\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"Hãy dành thời gian xem lại tài liệu cho từng trang trong phần này, đặc biệt \"\n\"là những hàm phổ biến.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Đi kèm với Rust là một thư viện chuẩn tổng hợp các kiểu dữ liệu thông dụng.\"\n\"Nhờ đó, hai thư viện có thể hoạt động cùng nhau một cách mượt mà vì cả hai \"\n\"đều sử dụng cùng một kiểu `String` của thư viện chuẩn.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"\"\n\"Trong thực tế, thư viện chuẩn của Rust chứa nhiều tầng riêng biệt: `core`, \"\n\"`alloc` và `std`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` bao gồm các kiểu dữ liệu và hàm cơ bản nhất không phụ thuộc vào \"\n\"`libc`, bộ cấp phát bộ nhớ hoặc thậm chí là hệ điều hành.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"\"\n\"`alloc` bao gồm các kiểu dữ liệu yêu cầu phải được cấp phát trên bộ nhớ \"\n\"heap, như `Vec`, `Box` và `Arc`.\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"\"\n\"Phần mềm nhúng viết bằng Rust thường chỉ sử dụng `core`, và đôi khi `alloc`.\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust đi kèm với một bộ tài liệu rất chi tiết. Ví dụ:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"Tất cả chi tiết về [vòng lặp](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"Các kiểu dữ liệu cơ bản như [`u8`](https://doc.rust-lang.org/stable/std/\"\n\"primitive.u8.html).\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"Các kiểu dữ liệu thuộc về thư viện chuẩn như [`Option`](https://doc.rust-\"\n\"lang.org/stable/std/option/enum.Option.html) hoặc [`BinaryHeap`](https://doc.\"\n\"rust-lang.org/stable/std/collections/struct.BinaryHeap.html).\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"Ngoài ra, bạn cũng có thể tự viết tài liệu cho code của bản thân:\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Xác định xem tham số thứ nhất có chia hết cho tham số thứ hai không.\\n\"\n\"///\\n\"\n\"/// Nếu tham số thứ hai bằng không, trả về kết quả là sai.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"Nội dung tài liệu sẽ được xử lý bằng Markdown. Tất cả các thư viện Rust đã \"\n\"được publish đều sẽ tự động được công cụ [rustdoc](https://doc.rust-lang.org/\"\n\"rustdoc/what-is-rustdoc.html) viết tài liệu, và được lưu trữ tại [`docs.rs`]\"\n\"(https://docs.rs). Tất cả thành phần công khai trong một API nên được viết \"\n\"tài liệu theo phương pháp này.\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"Để viết tài liệu cho một thành phần từ bên trong thành phần đó (như bên \"\n\"trong một module), hãy sử dụng `//!` hoặc `/*! .. */`. Cú pháp trên thường \"\n\"được gọi là \\\"inner doc comments\\\":\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! Module này chứa các chức năng liên quan đến việc kiểm tra quan hệ chia \"\n\"hết của các số nguyên.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"Cho học sinh xem tài liệu được viết cho thư viện `rand` tại <https://docs.rs/\"\n\"rand>.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"Chúng ta đã thấy một số cách dùng `Option<T>`. Kiểu dữ liệu này hoặc lưu trữ \"\n\"một giá trị kiểu `T` hoặc không lưu trữ gì cả. Ví dụ, hàm [`String::find`]\"\n\"(https://doc.rust-lang.org/stable/std/string/struct.String.html#method.find) \"\n\"trả về một `Option<usize>`.\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"Hoàng Hữu Văn A\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"ă\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find trả về {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Không tìm thấy ký tự\\\"\"\n\n#: src/std-types/option.md\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"\"\n\"`Option` được sử dụng rộng rãi ở nhiều nơi, không chỉ trong thư viện chuẩn.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` sẽ trả về giá trị của `Option` hoặc panic. `expect` hoạt động tương \"\n\"tự nhưng có thể truyền thêm một thông báo lỗi.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"\"\n\"Chương trình có thể panic khi gặp phải giá trị `None`, nhưng bạn không thể \"\n\"\\\"vô tình\\\" quên kiểm tra `None`.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"Thông thường, ta có thể thoải mái sử dụng `unwrap`/`expect` khi thử nghiệm \"\n\"một ý tưởng mới, nhưng code production thường xử lý `None` một cách an toàn \"\n\"hơn.\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"\"\n\"`Option<T>` được tối ưu để chiếm bằng bộ nhớ như `T`trong đa số trường hợp.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` hoạt động tương tự như `Option`, nhưng được sử dụng để biểu diễn \"\n\"kết quả thành công hoặc thất bại của một tác vụ. Tương tự như `Res` trong \"\n\"phần thực hành về biểu thức, `Result` cũng có hai biến thể khác nhau cho mỗi \"\n\"trường hợp thành công và thất bại, nhưng được tổng quát hóa: `Result<T, E>` \"\n\"trong đó `T` được sử dụng trong trường hợp `Ok` và `E` xuất hiện trong \"\n\"trường hợp `Err`.\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"nhat_ky.txt\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Hôm nay, tôi đã: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Không thể đọc nội dung tập tin\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"Không thể mở nhật ký: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"Tương tự với `Option`, giá trị trả về trong trường hợp thành công được đặt \"\n\"bên trong `Result`, buộc người dùng phải trích xuất giá trị một cách rõ \"\n\"ràng, đảm bảo mọi lỗi đều được kiểm tra. Trong trường hợp mà lỗi chắc chắn \"\n\"không thể xảy ra, `unwrap()` hoặc `expect()` có thể được gọi, bày tỏ rõ ràng \"\n\"ý định của người viết là lỗi không thể xảy ra.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"Khuyến khích học viên đọc tài liệu về `Result`. Không nhất thiết phải đọc \"\n\"trong khóa học, nhưng đáng đề cập đến. Tài liệu này chứa nhiều hàm khá tiện \"\n\"lợi, hỗ trợ việc lập trình theo functional-style programming.\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"\"\n\"`Result` là kiểu dữ liệu chuẩn để xử lý lỗi như chúng ta sẽ thấy trong ngày \"\n\"4.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is a \"\n\"growable UTF-8 encoded string:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) là kiểu \"\n\"dữ liệu chuẩn sử dụng để lưu trữ chuỗi UTF-8 trên bộ nhớ heap, có thể được \"\n\"mở rộng:\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/threads/scoped.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Xin chào\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: độ dài = {}, kích thước = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: độ dài = {}, kích thước = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇻🇳\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: độ dài = {}, số ký tự = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` implement [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), có nghĩa tất cả các hàm của \"\n\"`str` đều có thể được gọi trên một biến kiểu `String`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` trả về một chuỗi rỗng. Khi dữ liệu cần đẩy vào chuỗi đã được \"\n\"xác định trước, hãy sử dụng `String::with_capacity`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` trả về kích thước của `String` theo byte (có thể khác với số \"\n\"ký tự trong chuỗi).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` trả về một con trỏ chạy dọc theo các ký tự của chuỗi. Lưu ý \"\n\"rằng một `char` có thể khác với một \\\"ký tự\\\" thông thường bởi vì một khái \"\n\"niệm gọi là [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"Khi nói đến chuỗi, ta có thể sử dụng `&str` hoặc `String` đều được.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"Khi một kiểu dữ liệu implement `Deref<Target = T>`, trình biên dịch sẽ cho \"\n\"phép gọi các hàm thuộc về `T` trên kiểu dữ liệu đó.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"\"\n\"Chúng ta chưa đi sâu vào `Deref` trait, việc đề cập đến `Deref` ở đây chủ \"\n\"yếu là để giải thích cấu trúc của mục lục tài liệu.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` implement `Deref<Target = str>`, nên các hàm của `str` đều có thể \"\n\"được gọi trên các biến kiểu `String`.\"\n\n#: src/std-types/string.md\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"\"\n\"So sánh `let s3 = s1.deref();` và `let s3 = &*s1;`. Cái nào dễ hiểu hơn?\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` được được viết dựa trên một vector gồm nhiều byte, nên những hàm \"\n\"gọi được trên vector cũng có thể được gọi trên `String`, nhưng đi kèm với \"\n\"một số điều kiện để đảm bảo các tính chất của chuỗi.\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"So sánh các cách truy cập phần tử trong một biến kiểu `String`:\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"\"\n\"Truy cập một ký tự bằng cách sử dụng `s3.chars().nth(i).unwrap()` với `i` \"\n\"nằm trong phạm vi của chuỗi, và với `i` nằm ngoài phạm vi của chuỗi.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"Truy cập một xâu con bằng cách sử dụng `s3[0..4]`, với phạm vi của xâu con \"\n\"con giao thoa với ranh giới của các ký tự cận biên, hoặc với các ký tự cận \"\n\"biên hoàn toàn nằm bên trong xâu con. Ví dụ, truy cập `s[5..7] với `s = \"\n\"\\\"Xin chào\\\"`.\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\"Nhiều kiểu dữ liệu có thể được chuyển đổi thành chuỗi bằng phương thức \"\n\"[`to_string`](https://doc.rust-lang.org/std/string/trait.ToString.\"\n\"html#tymethod.to_string). Trait này đã được implement sẵn cho tất cả các \"\n\"kiểu dữ liệu implement `Display`, nên bất cứ giá trị nào có thể được định \"\n\"dạng cũng có thể được chuyển thành chuỗi.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) là kiểu dữ liệu \"\n\"chuẩn dạng mảng có thể tự thay đổi kích thước:\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: độ dài = {}, kích thước = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: độ dài = {}, kích thước = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Macro để khởi tạo một vector với nhiều phần tử cho trước.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Chỉ giữ lại các phần tử chẵn.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Loại bỏ các phần tử liên tiếp giống nhau.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` implement [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), nên tất cả các hàm của slice đều có \"\n\"thể được gọi trên một biến kiểu `Vec`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"Tương tự `String` và `HashMap`, `Vec` là một kiểu dữ liệu sử dụng để lưu trữ \"\n\"nhiều phần tử. Dữ liệu được lưu trữ trên bộ nhớ heap, nên không cần phải \"\n\"biết trước kích thước của dữ liệu tại thời điểm compile. Kích thước của \"\n\"`Vec` có thể thay đổi tại trong quá trình chạy.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"`Vec<T>` cũng là một kiểu dữ liệu generic, nhưng trong đa số trường hợp ta \"\n\"không cần phải chỉ rõ ra `T`. Hệ thống nội suy kiểu dữ liệu của Rust sẽ tự \"\n\"động xác định `T` trong lần đầu tiên gọi hàm `push`.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"Ta có thể sử dụng macro `vec![...]` thay vì gọi hàm `Vec::new()` để khởi tạo \"\n\"một `Vec`. `vec![...]` còn có thể được dùng để khởi tạo vector với một số \"\n\"phần tử cho trước.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"Để truy cập phần tử của một vector ta có thể sử dụng `[` `]`, nhưng nếu phần \"\n\"tử được truy cập cập nằm ngoài phạm vi của vector, chương trình sẽ panic. \"\n\"Trong trường hợp này, ta có thể sử dụng hàm `get` để trả về một `Option`. \"\n\"Hàm `pop` sẽ loại bỏ phần tử cuối cùng của vector.\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"Chúng ta sẽ đi sâu vào chi tiết về slice trong ngày 3. Bây giờ, học viên chỉ \"\n\"cần biết rằng một biến kiểu `Vec` cũng có thể sử dụng tất cả các hàm của \"\n\"slice.\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"\"\n\"Một bảng băm chuẩn với cơ chế bảo vệ chống lại các cuộc tấn công HashDoS:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Những cuộc phiêu lưu của Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Truyện cổ tích của Grimms\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Kiêu hãnh và định kiến\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Những người khốn khổ\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"Chúng ta biết {} cuốn sách, nhưng không biết về Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice lạc vào xứ sở thần tiên\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} trang\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} không tồn tại.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"\"\n\"// Sử dụng phương thức .entry() để chèn một giá trị nếu giá trị đó chưa tồn \"\n\"tại trong hashmap.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"\"\n\"`HashMap` không được định nghĩa trong prelude và cần phải được import vào \"\n\"scope trước khi sử dụng.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"Thử chạy đoạn code sau. Dòng đầu tiên sẽ kiểm tra xem một cuốn sách có tồn \"\n\"tại trong hashmap không, và nếu không trả về một giá trị thay thế. Dòng thứ \"\n\"hai sẽ chèn giá trị thay thế vào hashmap nếu cuốn sách không tồn tại.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter và hòn đá phù thủy\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"Trò chơi sinh tử\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"Khác với `vec!`, Rust không cung cấp macro `hashmap!`.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"Thay vào đó, kể từ phiên bản Rust 1.56, HashMap implement [`From<[(K, V); \"\n\"N]>`](https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.\"\n\"html#impl-From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), cho \"\n\"phép chúng ta dễ dàng khởi tạo một hashmap từ một mảng giá trị:\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"\"\n\"HashMap cũng có thể được khởi tạo từ bất kỳ `Iterator` nào trả về các cặp \"\n\"key-value.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"Trong những ví dụ trên, `HashMap<String, i32>` được sử dụng thay vì `&str` \"\n\"để làm cho ví dụ dễ hiểu hơn. Ta tất nhiên có thể sử dụng tham chiếu trong \"\n\"các cấu trúc dữ liệu, nhưng có thể gặp nhiều vấn đề với hệ thống kiểm tra \"\n\"vay mượn của Rust.\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"Thử xoá hàm `to_string()` từ ví dụ trên và xem chương trình có vẫn chạy \"\n\"không. Bạn nghĩ chúng ta sẽ gặp vấn đề ở đâu?\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"HashMap đi kèm với nhiều kiểu dữ liệu chỉ sử dụng làm kiểu trả về của một số \"\n\"hàm, như `std::collections::hash_map::Keys`. Những kiểu dữ liệu này thường \"\n\"xuất hiện trong tài liệu của Rust. Hãy cho học viên xem tài liệu về kiểu dữ \"\n\"liệu `Keys`, và liên hệ với hàm `keys`.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"Trong bài tập này, ta sẽ chuyển một cấu trúc dữ liệu đơn giản thành một cấu \"\n\"trúc dữ liệu generic. Chúng ta sẽ sử dụng một [`std::collections::HashMap`]\"\n\"(https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html) để \"\n\"theo dõi các giá trị đã xuất hiện và số lần xuất hiện của mỗi giá trị.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"Phiên bản đầu tiên của `Counter` chỉ hoạt động với các giá trị kiểu `u32`. \"\n\"Hãy biến struct `Counter` và các hàm của nó thành generic, để `Counter` có \"\n\"thể theo dõi bất kỳ kiểu dữ liệu nào.\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"Nếu bạn hoàn thành sớm, hãy thử sử dụng hàm [`entry`](https://doc.rust-lang.\"\n\"org/stable/std/collections/struct.HashMap.html#method.entry) để giảm đi một \"\n\"nửa số lần thực hiện hash lookup cần thiết để thực hiện hàm `count`.\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"/// Counter đếm số lần mỗi giá trị kiểu T xuất hiện.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Khởi tạo một Counter mới.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Tăng số lần xuất hiện của giá trị đã cho.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Trả về số lần mà giá trị đã cho đã xuất hiện.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"{} xuất hiện {} lần\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"táo\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"cam\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"có {} quả táo\\\"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 1 giờ và 40 phút, bao gồm:\"\n\n#: src/std-traits.md\nmsgid \"From and Into\"\nmsgstr \"From và Into\"\n\n#: src/std-traits.md\nmsgid \"Read and Write\"\nmsgstr \"Read và Write\"\n\n#: src/std-traits.md\nmsgid \"Default, struct update syntax\"\nmsgstr \"Default, cú pháp cập nhật struct\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"\"\n\"Tương tự như trong chương về các kiểu dữ liệu chuẩn, hãy dành thời gian để \"\n\"ôn lại tài liệu cho mỗi trait.\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"\"\n\"Nội dung của chương này khá dài, hãy cho học sinh nghỉ giải lao giữa chương.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"Kiểu dữ liệu implement các trait này có thể được so sánh với nhau. Tất cả \"\n\"các trait này có thể được derive nếu các trường của kiểu dữ liệu sử dụng \"\n\"derive cũng implement các trait này.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` và `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` là một quan hệ tương đương một phần. Kiểu dữ liệu implement \"\n\"trait này phải định nghĩa hàm `eq`, hàm `ne` tự được định nghĩa dựa trên \"\n\"`eq`. Các toán tử `==` và `!=` sẽ gọi đến các hàm này.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` là một quan hệ tương đương toàn phần (tính phản xạ, đối xứng và bắc \"\n\"cầu). Kiểu dữ liệu implement trait này mặc định implement `PartialEq`. Các \"\n\"hàm yêu cầu quan hệ tương đương toàn phần sẽ sử dụng `Eq` dưới dạng một \"\n\"trait bound.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` và `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` định nghĩa một quan hệ thứ tự một phần, với hàm `partial_cmp`. \"\n\"Trait này được sử dụng để implement các toán tử `<`, `<=`, `>=`, và `>`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"\"\n\"`Ord` là một quan hệ thứ tự toàn phần, với hàm `cmp` trả về kiểu dữ liệu \"\n\"`Ordering`.\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"\"\n\"`PartialEq` có thể được implement để so sánh giữa các kiểu dữ liệu khác \"\n\"nhau, nhưng `Eq` thì không, vì `Eq` có tính phản xạ:\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"\"\n\"Trong thực tế, các trait này thường thường được derive, ít khi được \"\n\"implement.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"Ta có thể thực hiện overloading toán tử thông qua các trait trong [`std::\"\n\"ops`](https://doc.rust-lang.org/std/ops/index.html):\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"Một số điểm cần thảo luận:\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"\"\n\"Ta có thể implement `Add` cho `&Point`. Việc này có ích trong những tình \"\n\"huống nào?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"Trả lời: `Add:add` tiêu thụ `self`. Nếu kiểu `T` mà ta muốn overloading toán \"\n\"tử không implement `Copy`, ta cũng nên cân nhắc overload toán tử cho `&T`. \"\n\"Như vậy ta có thể tránh việc clone không cần thiết tại thời điểm gọi hàm.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"\"\n\"Tại sao `Output` là một associated type? Có thể thay thế `Output` bằng một \"\n\"tham số generic cho hàm không?\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"Trả lời: Tham số generic của hàm được quyết định bởi người gọi hàm, nhưng \"\n\"associated types (như `Output`) được quyết định bởi người implement trait.\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"Ta có thể implement `Add` cho hai kiểu dữ liệu khác nhau, ví dụ `impl \"\n\"Add<(i32, i32)> for Point` sẽ cộng một tuple vào một `Point`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\nmsgstr \"\"\n\"Ta có thể implement trait [`From`](https://doc.rust-lang.org/std/convert/\"\n\"trait.From.html) và [`Into`](https://doc.rust-lang.org/std/convert/trait.\"\n\"Into.html) để đơn giản hoá việc chuyển đổi kiểu dữ liệu:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\nmsgstr \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) sẽ tự động \"\n\"được implement khi [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) được implement:\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"\"\n\"Vì vậy, thông thường ta chỉ cần implement `From`, vì kiểu dữ liệu của bạn sẽ \"\n\"tự động có `Into`.\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"Ngược lại, khi ta muốn khai báo 1 hàm nhận \\\"bất kỳ kiểu dữ liệu nào có thể \"\n\"chuyển đổi thành `String`\\\", ta nên sử dụng `Into`. Như vậy, hàm được khai \"\n\"báo sẽ chấp nhận các kiểu dữ liệu implement `From` và những kiểu dữ liệu chỉ \"\n\"implement `Into`.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust không hỗ trợ ép kiểu ngầm định, nhưng hỗ trợ ép kiểu một cách tường \"\n\"minh với `as`. Cú pháp này khá giống với cách ép kiểu trong ngôn ngữ C.\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"ép về u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"ép về i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"ép về u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"Kết quả của việc ép kiểu bằng `as` _luôn_ được định nghĩa rõ ràng trong \"\n\"Rust, cố định trên mọi nền tảng. Vì vậy, đôi lúc kết quả có thể không giống \"\n\"với dự kiến của bạn, ví dụ như khi đổi dấu hoặc chuyển về kiểu dữ liệu nhỏ \"\n\"hơn -- hãy kiểm tra tài liệu cho chắc chắn.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"Ép kiểu dữ liệu với `as` là một công cụ khá mạnh nên dễ bị sử dụng sai, có \"\n\"thể gây ra những lỗi khó phát hiện khi thay đổi kiểu dữ liệu hoặc phạm vi \"\n\"giá trị của biến. Ép kiểu với `as` nên được sử dụng chỉ khi ta chắc chắn \"\n\"rằng lỗi không thể xảy ra (ví dụ: lấy 32 bit cuối của một `u64` với `as \"\n\"u32`, bỏ qua giá trị của 32 bit đầu).\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"Nên sử dụng `From` hoặc `Into` thay vì `as` cho những trường hợp ép kiểu \"\n\"không thể thất bại (ví dụ: `u32` sang `u64`), để đảm bảo rằng quá trình \"\n\"chuyển đổi thật sự không thể thất bại. Đối với những trường hợp ép kiểu có \"\n\"thể thất bại, nên sử dụng `TryFrom` và `TryInto` để xử lý lỗi khi ép kiểu \"\n\"(khi một giá trị không hoàn toàn phù hợp với kiểu dữ liệu đích).\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"Hãy cân nhắc cho học viên nghỉ giải lao sau slide này.\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` hoạt động tương tự như static cast trong C++. Không nên sử dụng `as` \"\n\"nếu dữ liệu có thể bị mất khi ép kiểu, ít nhất phải có một comment giải \"\n\"thích rõ ràng lý do sử dụng `as`.\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"\"\n\"Một trường hợp ngoại lệ là khi ép kiểu số nguyên sang `usize` để sử dụng làm \"\n\"index trong array.\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"Bằng cách sử dụng [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) \"\n\"và [`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), ta có \"\n\"thể đọc dữ liệu văn bản từ một mảng `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"số dòng trong mảng: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"số dòng trong file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"Tương tự, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) cho \"\n\"phép ta ghi dữ liệu văn bản vào một mảng `u8`:\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Dữ liệu đã được ghi: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"Trait `Default`\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"Kiểu dữ liệu implement trait [`Default`](https://doc.rust-lang.org/std/\"\n\"default/trait.Default.html) sẽ sở hữu một giá trị mặc định.\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Biến Y đã được gán!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"\"\n\"Người dùng có thể trực tiếp implement trait này, hoặc derive trait này bằng \"\n\"`#[derive(Default)]`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"\"\n\"Khi derive trait này, từng miền của giá trị mặc định được tạo ra sẽ được gán \"\n\"bằng giá trị mặc định của kiểu dữ liệu tương ứng.\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"Vì vậy tất cả các miền của struct cũng phải implement `Default`.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"Kiểu dữ liệu chuẩn của Rust thường hay implement trait `Default` (như `0`, \"\n\"`\\\"\\\"`, vân vân).\"\n\n#: src/std-traits/default.md\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"Trait này rất hữu dụng khi ta cần khởi tạo struct chỉ với một ít miền.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Vì các kiểu dữ liệu thường hay implment `Default`, thư viện chuẩn của Rust \"\n\"cũng cung cấp một số hàm giúp người dùng có thể tận dụng giá trị mặc định \"\n\"của biến.\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"Dấu `..` còn được gọi là [ký hiệu update struct](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"Chào mừng tới Ngày 3\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"Chủ đề chúng ta sẽ học hôm nay là:\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"\"\n\"Quản lý bộ nhớ, vòng đời (lifetimes), và quá trình kiểm mượn (the borrow \"\n\"checker): cách mà Rust đảm bảo được tính an toàn bộ nhớ.\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"\"\n\"Con trỏ thông minh (smart pointers): các kiểu con trỏ trong thư viện chuẩn.\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 2 tiếng và 20 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/memory-management.md src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"Drop\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md src/memory-management/clone.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `vec!` or `Box::new`.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"`clone` generally performs a deep copy of the value, meaning that if you e.\"\n\"g. clone an array, all of the elements of the array are cloned as well.\"\nmsgstr \"\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The behavior for `clone` is user-defined, so it can perform custom cloning \"\n\"logic if needed.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"Rc\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"\\\"Optional box\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has` for `Subtree`.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 55 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 1 tiếng và 55 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns and inlining:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation, by inlining the call to add into main. Change \"\n\"the above code to print stack addresses and run it on the [Playground]\"\n\"(https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"The Rust compiler can do automatic inlining, that can be disabled on a \"\n\"function level with `#[inline(never)]`.\"\nmsgstr \"\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"Once disabled, the printed address will change on all optimization levels. \"\n\"Looking at Godbolt or Playground, one can see that in this case, the return \"\n\"of the value depends on the ABI, e.g. on amd64 the two i32 that is making up \"\n\"the point will be returned in 2 registers (eax and edx).\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"As a concrete example of how these borrowing rules prevent memory errors, \"\n\"consider the case of modifying a collection while there are references to \"\n\"its elements:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\\\"{elem}\\\"\"\nmsgstr \"\\\"{elem}\\\"\"\n\n#: src/borrowing/examples.md\nmsgid \"Similarly, consider the case of iterator invalidation:\"\nmsgstr \"\"\n\n#: src/borrowing/examples.md\nmsgid \"\"\n\"In both of these cases, modifying the collection by pushing new elements \"\n\"into it can potentially invalidate existing references to the collection's \"\n\"elements if the collection has to reallocate.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`RefCell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"// Note that `cell` is NOT declared as mutable.\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"// This triggers an error at runtime.\\n\"\n\"        // let other = cell.borrow();\\n\"\n\"        // println!(\\\"{}\\\", *other);\\n\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"{cell:?}\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The extra block in the `RefCell` example is to end the borrow created by the \"\n\"call to `borrow_mut` before we print the cell. Trying to print a borrowed \"\n\"`RefCell` just shows the message `\\\"{borrowed}\\\"`.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"\"\n\n#: src/lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 2 tiếng và 40 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 45 phút, bao gồm:\"\n\n#: src/iterators.md\nmsgid \"Iterator\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"IntoIterator\"\nmsgstr \"\"\n\n#: src/iterators.md src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"`Iterator` implements\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\n#: src/modules.md src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Cargo Setup\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"Error Trait\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"thiserror and anyhow\"\nmsgstr \"\"\n\n#: src/error-handling.md src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"//std::fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 1 giờ và 5 phút, bao gồm:\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\\n\"\n\"    // be non-null and properly aligned, the objects underlying the \"\n\"references\\n\"\n\"    // from which they were obtained are live throughout the whole unsafe\\n\"\n\"    // block, and they are not accessed either through the references or\\n\"\n\"    // concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\\n\"\n\"    // string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\\n\"\n\"    // requirements.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: ...\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"_Generated trait_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"// Call the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Position\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"Testing in Android\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"You can now run the test with\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"The output looks like this:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"This just scratches the surface, there are many builtin matchers. Consider \"\n\"going through the first chapter of [\\\"Advanced testing for Rust \"\n\"applications\\\"](https://github.com/mainmatter/rust-advanced-testing-\"\n\"workshop), a self-guided Rust course: it provides a guided introduction to \"\n\"the library, with exercises to help you get comfortable with `googletest` \"\n\"macros, its matchers and its overall philosophy.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"C++ Type\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Mini exercise\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Build rules\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"Build rules exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"Example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Specifically,\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\\\"A string\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"PWM\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Delay timers\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C and SPI buses and devices\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Similar traits for byte streams (e.g. UARTs), CAN buses and RNGs and broken \"\n\"out into [`embedded-io`](https://crates.io/crates/embedded-io), [`embedded-\"\n\"can`](https://crates.io/crates/embedded-can) and [`rand_core`](https://\"\n\"crates.io/crates/rand_core) respectively.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI device instance.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The traits cover using the peripherals but not initialising or configuring \"\n\"them, as initialisation and configuration is usually highly platform-\"\n\"specific.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) provides \"\n\"async versions of the traits.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"[`embedded-hal-nb`](https://crates.io/crates/embedded-hal-nb) provides \"\n\"another approach to non-blocking I/O, based on the [`nb`](https://crates.io/\"\n\"crates/nb) crate.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md src/concurrency/welcome-async.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 20 \"\n\"minutes. It contains:\"\nmsgstr \"\"\n\"Buổi học nên kéo dài khoảng 3 tiếng và 20 phút, bao gồm thời gian 10 phút \"\n\"nghỉ trưa. Nội dung buổi học bao gồm:\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md src/concurrency/shared-state.md\n#: src/concurrency/async.md\nmsgid \"This segment should take about 30 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 30 phút, bao gồm:\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Run the example.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads/plain.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\n#: src/concurrency/threads/scoped.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\n#: src/concurrency/channels.md src/concurrency/async-control-flow.md\nmsgid \"This segment should take about 20 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 20 phút, bao gồm:\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/senders-receivers.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Send\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync.md\nmsgid \"Sync\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../../unsafe-rust/unsafe-traits.md). \"\n\"The compiler will automatically derive them for your types as long as they \"\n\"only contain `Send` and `Sync` types. You can also implement them manually \"\n\"when you know it is valid.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/marker-traits.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Arc\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state.md\nmsgid \"Mutex\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md src/concurrency/shared-state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\n#: src/concurrency/shared-state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises.md src/concurrency/async-exercises.md\nmsgid \"This segment should take about 1 hour and 10 minutes. It contains:\"\nmsgstr \"Phần này sẽ kéo dài khoảng 1 giờ và 10 phút, bao gồm:\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/sync-exercises/solutions.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"Link Checker\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/sync-exercises/solutions.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\n#: src/concurrency/welcome-async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\n#: src/concurrency/async.md\nmsgid \"async/await\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async/async-await.md\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"\"\n\n#: src/concurrency/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"\"\n\n#: src/concurrency/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\n#: src/concurrency/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\n#: src/concurrency/async-control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls.md\nmsgid \"Pin\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\n#: src/concurrency/async-pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/dining-philosophers.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.37.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.8.2\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"\"\n\n#: src/concurrency/async-exercises/solutions.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\n# this is a translation, so the second part of the sentence need not be translated\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"Bảng từ vựng dưới đây cung cấp định nghĩa ngắn gọn của nhiều thuật ngữ Rust. \"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"allocate:  \\n\"\n\"Cấp phát bộ nhớ động trên [bộ nhớ heap](memory-management/stack-vs-heap.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"argument:  \\n\"\n\"Giá trị được truyền vào một hàm. Có thể được gọi là tham số.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Bare-metal Rust:  \\n\"\n\"Việc phát triển chương trình Rust ở cấp thấp, thường để triển khai trên hệ \"\n\"thống không cần hệ điều hành. Xem [Bare-metal Rust](bare-metal.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"block:  \\n\"\n\"Xem [Blocks](control-flow/blocks.md) và _scope_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"borrow:  \\n\"\n\"Xem [Borrowing](ownership/borrowing.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"borrow checker:  \\n\"\n\"Một bộ phận của Rust compiler kiểm tra xem tất cả các _borrow_ có hợp lệ hay \"\n\"không.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"brace:  \\n\"\n\"`{` và `}`. Được gọi là dấu _ngoặc nhọn_, phân chia các _block_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"build:  \\n\"\n\"Quá trình chuyển đổi mã nguồn thành một chương trình executable.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"call:  \\n\"\n\"Gọi hoặc thực thi hàm.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"channel:  \\n\"\n\"Dùng để truyền thông điệp một cách an toàn [giữa các _thread_](concurrency/\"\n\"channels.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"Các khóa học ở đây được gọi chung là Comprehensive Rust 🦀.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"concurrency:  \\n\"\n\"Quá trình thực thi nhiều tác vụ hoặc process cùng một lúc.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Concurrency in Rust:  \\n\"\n\"Xem [Concurrency trong Rust](concurrency.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"constant:  \\n\"\n\"Một giá trị không thay đổi trong quá trình thực thi của chương trình. Còn \"\n\"được gọi là _hằng số_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"control flow:  \\n\"\n\"Thứ tự thực thi của các câu lệnh trong một chương trình. Một vài sách gọi từ \"\n\"này là _luồng điều khiển_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"crash:  \\n\"\n\"Khi chương trình gặp lỗi không xử lý được và bị dừng đột ngột.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"enumeration:  \\n\"\n\"Môt kiểu dữ liệu chứa một hoặc nhiều hằng số, có thể kèm theo một _tuple_ \"\n\"hoặc một _struct_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"error:  \\n\"\n\"Khi gặp phải một hành vi hoặc kết quả không như dự kiến.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"error handling:  \\n\"\n\"Quá trình quản lý và xử lý lỗi xảy ra trong quá trình thực thi chương trình.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"exercise:  \\n\"\n\"Bài tập được thiết kế giúp học viên luyện tập và kiểm tra năng lực lập \"\n\"trình. \"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"function:  \\n\"\n\"Một đoạn code có thể được tái sử dụng, nhằm thực hiện một nhiệm vụ cụ thể.\"\n\"Còn được gọi là _hàm_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"garbage collector:  \\n\"\n\"Một cơ chế tự động giải phóng bộ nhớ bị chiếm bởi các biến không còn được sử \"\n\"dụng nữa.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"generics:  \\n\"\n\"Một tính năng của ngôn ngữ lập trình, cho phép code được viết nhưng không \"\n\"cần phải định rõ kiểu dữ liệu, giúp tái sử dụng code với nhiều kiểu dữ liệu \"\n\"khác nhau.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"immutable:  \\n\"\n\"Không thể thay đổi sau khi tạo. Có thể được dịch là _bất biến_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"integration test:  \\n\"\n\"Một quy trình _test_ code để kiểm tra sự tương tác giữa các thành phần của \"\n\"hệ thống.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"keyword:  \\n\"\n\"Một từ khóa trong ngôn ngữ lập trình, có ý nghĩa cụ thể và không thể sử dụng \"\n\"như một _identifier_ (tên biến).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"library:  \\n\"\n\"Một bộ sưu tập các hàm hoặc code đã được biên dịch trước, có thể được sử \"\n\"dụng trong chương trình. Thường được gọi là _thư viện_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"macro:  \\n\"\n\"Macros trong Rust có thể được nhận diện bằng việc tên có dấu `!`. Macros \"\n\"được sử dụng khi hàm thông thường không đáp ứng được nhu cầu của chương \"\n\"trình. Một ví dụ điển hình là `format!`, macro này có thể nhận một số lượng \"\n\"tham số không cố định (có thể 1 tham số, 2 tham số, hay thậm chí là không có \"\n\"tham số nào). Hàm thông thường trong Rust không làm được điều này.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` function:  \\n\"\n\"Điểm bắt đầu của mọi chương trình Rust là hàm `main`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"match:  \\n\"\n\"Một _control flow_ trong Rust cho phép so sánh một giá trị với một số \"\n\"_pattern_ cho trước.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"memory leak:  \\n\"\n\"Khi chương trình không giải phóng bộ nhớ của biến không còn cần thiết, dẫn \"\n\"đến việc bộ nhớ sử dụng tăng dần trong quá trình thực thi.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"method:  \\n\"\n\"Một hàm liên kết với một đối tượng hoặc một kiểu dữ liệu trong Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"module:  \\n\"\n\"Một phương pháp đẻ nhóm các định nghĩa, như hàm, kiểu dữ liệu, hoặc traits, \"\n\"trong Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"move:  \\n\"\n\"Chuyển quyền sở hữu của một giá trị từ một biến sang một biến khác trong \"\n\"Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"mutable:  \\n\"\n\"Một thuộc tính trong Rust cho phép biến có thể được thay đổi sau khi đã được \"\n\"khai báo.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"ownership:  \\n\"\n\"Một khái niệm trong Rust xác định phần nào của code chịu trách nhiệm quản lý \"\n\"bộ nhớ liên quan đến một giá trị.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"panic:  \\n\"\n\"Khi chương trình gặp phải một lỗi không thể phục hồi được, dẫn đến việc dừng \"\n\"chương trình.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"parameter:  \\n\"\n\"Giá trị được truyền vào một hàm khi hàm đó được gọi. Còn được gọi là tham số.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"pattern:  \\n\"\n\"Cách sử dụng giá trị, hằng số, hoặc cấu trúc để so sánh với một biểu thức \"\n\"trong Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"payload:  \\n\"\n\"Dữ liệu hoặc thông tin được chuyển đi, thường sử dụng khi nhắc đến việc \"\n\"chuyển dữ liệu qua mạng.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"program:  \\n\"\n\"Một tập hợp các dòng lệnh máy tính có thể thực thi để thực hiện một nhiệm vụ \"\n\"hoặc giải quyết một vấn đề cụ thể. Còn được gọi là _chương trình_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"programming language:  \\n\"\n\"Một hệ thống ngôn ngữ được sử dụng để truyền thông điệp cho máy tính, như \"\n\"Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"receiver:  \\n\"\n\"Tham số đầu tiên trong một _method_ của Rust, đại diện cho biến mà _method_ \"\n\"đó gọi lên.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"reference counting:  \\n\"\n\"Một kỹ thuật quản lý bộ nhớ trong đó số lượng tham chiếu đến một đối tượng \"\n\"được theo dõi, và đối tượng được giải phóng khi số lượng tham chiếu giảm về \"\n\"0.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"return:  \\n\"\n\"Một từ khóa trong Rust dùng để chỉ ra giá trị trả về của một hàm.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust:  \\n\"\n\"Ngôn ngữ lập trình hệ thống chú trọng vào an toàn và hiệu suất.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Rust Fundamentals:  \\n\"\n\"Ngày 1 đến ngày 4 của khóa học này.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Rust in Android:  \\n\"\n\"Xem [Sử dụng Rust trong Android](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Rust in Chromium:  \\n\"\n\"Xem [Sử dụng Rust trong Chromium](chromium.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"safe:  \\n\"\n\"Đoạn code tuân thủ các quy tắc về _ownership_ và _borrowing_ của Rust, ngăn \"\n\"chặn lỗi liên quan đến bộ nhớ.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"scope:  \\n\"\n\"Một phạm vi trong chương trình mà một biến có thể được sử dụng.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"standard library:  \\n\"\n\"Một bộ sưu tập các _module_ cung cấp các chức năng cần thiết trong Rust. Một \"\n\"số sách gọi là _thư viện chuẩn_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static:  \\n\"\n\"Một từ khóa trong Rust dùng để định nghĩa biến tĩnh hoặc các phần tử với \"\n\"_lifetime_ là `'static`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\"string:  \\n\"\n\"Một kiểu dữ liệu lưu trữ dữ liệu văn bản. Xem [`String` vs `str`](basic-\"\n\"syntax/string-slices.html) để biết thêm chi tiết. Còn được gọi là _chuỗi_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"struct:  \\n\"\n\"Một kiểu dữ liệu trong Rust, dùng để nhóm các biến khác nhau với nhau thành \"\n\"một kiểu dữ liệu mới.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"test:  \\n\"\n\"Một _module_ trong Rust chứa các hàm kiểm tra sự chính xác của các hàm khác.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"thread:  \\n\"\n\"Một cơ chế cho phép thực thi nhiều tác vụ cùng một lúc trong chương trình. \"\n\"Còn được gọi là _luồng_.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"thread safety:  \\n\"\n\"Thuộc tính của chương trình đảm bảo chương trình hoạt động chuẩn xác trong \"\n\"môi trường đa luồng.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"trait:  \\n\"\n\"Một tập hợp các hành vi mà ta muốn một kiểu dữ liệu cụ thể phải có.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"trait bound:  \\n\"\n\"Một cách để yêu cầu một kiểu dữ liệu phải _implement_ một số _trait_ cụ thể.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"tuple:  \\n\"\n\"Một kiểu dữ liệu trong Rust chứa các biến khác nhau. Các trường của _tuple_ \"\n\"không có tên, và được truy cập bằng số thứ tự.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"type:  \\n\"\n\"Một cơ chế giúp xác định các thao tác có thể thực hiện trên giá trị của một \"\n\"kiểu dữ liệu cụ thể trong Rust.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"type inference:  \\n\"\n\"Một chức năng của Rust compiler giúp suy luận kiểu dữ liệu của biến hoặc \"\n\"biểu thức, thay vì phải khai báo kiểu dữ liệu cho từng biến.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"undefined behavior:  \\n\"\n\"Một số hành vi và điều kiện trong Rust không có kết quả cụ thể, thường dẫn \"\n\"đến việc chương trình hoạt động bất thường.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"union:  \\n\"\n\"Một kiểu dữ liệu có thể chứa giá trị của nhiều kiểu dữ liệu khác nhau, nhưng \"\n\"chỉ một giá trị một lúc.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"unit test:  \\n\"\n\"Một loại _test_ trong Rust, giúp kiểm tra từng phần nhỏ của chương trình. \"\n\"Xem [Unit Tests](testing/unit-tests.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"unit type:  \\n\"\n\"Kiểu dữ liệu không chứa dữ liệu, ký hiệu bằng `()`.\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"unsafe:  \\n\"\n\"Một phần của Rust cho phép người lập trình gây ra _undefined behavior_. Xem \"\n\"[Unsafe Rust](unsafe.html).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"variable:  \\n\"\n\"Một vùng bộ nhớ lưu trữ dữ liệu. Có thể được sử dụng trong một _scope_. Còn \"\n\"được gọi là _biến_.\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Advanced testing for Rust applications](https://github.com/mainmatter/rust-\"\n\"advanced-testing-workshop): a self-paced workshop that goes beyond Rust's \"\n\"built-in testing framework. It covers `googletest`, snapshot testing, \"\n\"mocking as well as how to write your own custom test harness.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\n#~ msgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Lời Chào Mừng](../welcome-day-1.md) (5 phút)\"\n\n#~ msgid \"[Hello, World](../hello-world.md) (15 minutes)\"\n#~ msgstr \"[Hello, World](../hello-world.md) (15 phút)\"\n\n#~ msgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\n#~ msgstr \"[Kiểu Dữ Liệu và Giá Trị](../types-and-values.md) (40 phút)\"\n\n#~ msgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\n#~ msgstr \"[Điều Khiển Luồng Căn Bản](../control-flow-basics.md) (40 phút)\"\n\n#~ msgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\n#~ msgstr \"[Tuples và Mảng](../tuples-and-arrays.md) (35 phút)\"\n\n#~ msgid \"[References](../references.md) (55 minutes)\"\n#~ msgstr \"[Tham Chiếu](../references.md) (55 phút)\"\n\n#~ msgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\n#~ msgstr \"[Kiểu Dữ Liệu Tự Định Nghĩa](../user-defined-types.md) (50 phút)\"\n\n#~ msgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\n#~ msgstr \"[Lời Chào Mừng](../welcome-day-2.md) (3 phút)\"\n\n#~ msgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\n#~ msgstr \"[So Khớp Mẫu (Pattern Matching)](../pattern-matching.md) (1 tiếng)\"\n\n#~ msgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\n#~ msgstr \"[Phương Thức và Traits](../methods-and-traits.md) (50 phút)\"\n\n#~ msgid \"[Generics](../generics.md) (40 minutes)\"\n#~ msgstr \"[Tham Số Hóa Kiểu Dữ Liệu (Generics)](../generics.md) (40 phút)\"\n\n#~ msgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\n#~ msgstr \"\"\n#~ \"[Thư Viện Kiểu Dữ Liệu Tiêu Chuẩn (Standard Library Types)](../std-types.\"\n#~ \"md) (1 tiếng và 20 phút)\"\n\n#~ msgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\n#~ msgstr \"\"\n#~ \"[Thư Viện Traits Tiêu Chuẩn (Standard Library Traits)](../std-traits.md) \"\n#~ \"(1 tiếng và 40 phút)\"\n\n#~ msgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\n#~ msgstr \"[Lời Chào Mừng](../welcome-day-3.md) (3 phút)\"\n\n#~ msgid \"[Memory Management](../memory-management.md) (1 hour)\"\n#~ msgstr \"[Quản Lý Bộ Nhớ](../memory-management.md) (1 tiếng)\"\n\n#~ msgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\n#~ msgstr \"[Con Trỏ Thông Minh](../smart-pointers.md) (55 phút)\"\n\n#~ msgid \"[Borrowing](../borrowing.md) (50 minutes)\"\n#~ msgstr \"[Vay Mượn](../borrowing.md) (50 phút)\"\n\n#~ msgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\n#~ msgstr \"[Vòng đời](../lifetimes.md) (50 phút)\"\n\n#~ msgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\n#~ msgstr \"[Lời Chào Mừng](../welcome-day-4.md) (3 phút)\"\n\n#~ msgid \"[Iterators](../iterators.md) (45 minutes)\"\n#~ msgstr \"[Iterators](../iterators.md) (45 phút)\"\n\n#~ msgid \"[Modules](../modules.md) (40 minutes)\"\n#~ msgstr \"[Mô Đun](../modules.md) (40 phút)\"\n\n#~ msgid \"[Testing](../testing.md) (45 minutes)\"\n#~ msgstr \"[Kiểm Thử](../testing.md) (45 phút)\"\n\n#~ msgid \"[Error Handling](../error-handling.md) (55 minutes)\"\n#~ msgstr \"[Xử Lý Lỗi](../error-handling.md) (55 phút)\"\n\n#~ msgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\n#~ msgstr \"[Rust \\\"Không An Toàn\\\"](../unsafe-rust.md) (1 giờ và 5 phút)\"\n\n#~ msgid \"In this session:\"\n#~ msgstr \"Trong buổi này:\"\n\n#~ msgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\n#~ msgstr \"[Lời Chào Mừng](./welcome-day-1.md) (5 phút)\"\n\n#~ msgid \"[Hello, World](./hello-world.md) (15 minutes)\"\n#~ msgstr \"[Hello, World](./hello-world.md) (15 phút)\"\n\n#~ msgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\n#~ msgstr \"[Kiểu Dữ Liệu Và Giá Trị](./types-and-values.md) (40 phút)\"\n\n#~ msgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\n#~ msgstr \"[Điều Khiển Luồng Cơ Bản](./control-flow-basics.md) (40 phút)\"\n\n#~ msgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\n#~ msgstr \"[Lệnh if](./control-flow-basics/if.md) (4 phút)\"\n\n#~ msgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\n#~ msgstr \"[Vòng lặp](./control-flow-basics/loops.md) (5 phút)\"\n\n#~ msgid \"\"\n#~ \"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\n#~ msgstr \"\"\n#~ \"[Lệnh break và lệnh continue](./control-flow-basics/break-continue.md) (4 \"\n#~ \"phút)\"\n\n#~ msgid \"\"\n#~ \"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Khối và phạm vi](./control-flow-basics/blocks-and-scopes.md) (5 phút)\"\n\n#~ msgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\n#~ msgstr \"[Hàm](./control-flow-basics/functions.md) (3 phút)\"\n\n#~ msgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\n#~ msgstr \"[Macros](./control-flow-basics/macros.md) (2 phút)\"\n\n#~ msgid \"\"\n#~ \"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 \"\n#~ \"minutes)\"\n#~ msgstr \"\"\n#~ \"[Bài tập: Chuỗi Collatz](./control-flow-basics/exercise.md) (15 phút)\"\n\n#~ msgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\n#~ msgstr \"[Thư viện chuẩn](./std-types/std.md) (3 phút)\"\n\n#~ msgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\n#~ msgstr \"[Tài liệu](./std-types/docs.md) (5 phút)\"\n\n#~ msgid \"[Option](./std-types/option.md) (10 minutes)\"\n#~ msgstr \"[Option](./std-types/option.md) (10 phút)\"\n\n#~ msgid \"[Result](./std-types/result.md) (10 minutes)\"\n#~ msgstr \"[Result](./std-types/result.md) (10 phút)\"\n\n#~ msgid \"[String](./std-types/string.md) (10 minutes)\"\n#~ msgstr \"[String](./std-types/string.md) (10 phút)\"\n\n#~ msgid \"[Vec](./std-types/vec.md) (10 minutes)\"\n#~ msgstr \"[Vec](./std-types/vec.md) (10 phút)\"\n\n#~ msgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\n#~ msgstr \"[HashMap](./std-types/hashmap.md) (10 phút)\"\n\n#~ msgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\n#~ msgstr \"[Thực hành: Đếm số](./std-types/exercise.md) (20 phút)\"\n\n#~ msgid \"Destructuring\"\n#~ msgstr \"Giải cấu trúc (Destructuring)\"\n\n#~ msgid \"Implmementing Traits\"\n#~ msgstr \"Cài đặt đặc điểm (Implementing Traits)\"\n"
  },
  {
    "path": "po/zh-CN.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-04-15T18:42:46+08:00\\n\"\n\"PO-Revision-Date: \\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: Language zh-Hans\\n\"\n\"Language: zh_CN\\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\"X-Generator: Poedit 3.4.2\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"欢迎来到 Comprehensive Rust 🦀\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"授课\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"课程结构\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"键盘快捷键\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"翻译\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"使用 Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust 生态系统\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"代码示例\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"在本地运行 Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"第一天：上午\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"欢迎\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hello, World\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"什么是 Rust？\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Rust 的优势\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"类型和值\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"变量\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"值\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"算术\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"类型推导\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"练习：Fibonacci\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/lifetimes/solution.md src/iterators/solution.md src/modules/solution.md\n#: src/testing/solution.md src/error-handling/solution.md\n#: src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"解答\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"控制流基础\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`if` Expressions\"\nmsgstr \"`if` 表达式\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\nmsgid \"Loops\"\nmsgstr \"循环控制\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` 和 `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"代码块和作用域\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"作用域和遮蔽（Shadowing）\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"函数\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"宏\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"练习：考拉兹序列\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"第一天：下午\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"元组和数组\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"数组（Arrays）\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"元组（Tuples）\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\nmsgid \"Array Iteration\"\nmsgstr \"数组迭代\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"Patterns and Destructuring\"\nmsgstr \"解构\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"练习：嵌套数组\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"引用\"\n\n#: src/SUMMARY.md src/references/shared.md\nmsgid \"Shared References\"\nmsgstr \"共享引用\"\n\n#: src/SUMMARY.md src/references/exclusive.md\nmsgid \"Exclusive References\"\nmsgstr \"独占引用\"\n\n#: src/SUMMARY.md\nmsgid \"Slices: `&[T]`\"\nmsgstr \"切片：`&[T]`\"\n\n#: src/SUMMARY.md src/references/strings.md\nmsgid \"Strings\"\nmsgstr \"字符串\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"练习：几何图形\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"用户定义的类型\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\nmsgid \"Named Structs\"\nmsgstr \"结构体\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"元组结构体\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"枚举\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Static\"\nmsgstr \"`static`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Const\"\nmsgstr \"常量\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"类型别名\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"练习：电梯事件\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"第二天：上午\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"模式匹配\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching/destructuring.md\nmsgid \"Destructuring\"\nmsgstr \"解构\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\nmsgid \"Let Control Flow\"\nmsgstr \"`let` 控制流\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"练习：表达式求值\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\nmsgid \"Methods and Traits\"\nmsgstr \"方法和特征\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"方法\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"特征（Trait）\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"Implementing Traits\"\nmsgstr \"实现 Unsafe Trait\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"Supertraits\"\nmsgstr \"更多 trait\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\n#, fuzzy\nmsgid \"Associated Types\"\nmsgstr \"共享类型\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\nmsgid \"Deriving\"\nmsgstr \"派生特征\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"练习：通用日志\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"泛型\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\nmsgid \"Generic Functions\"\nmsgstr \"泛型函数\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"泛型类型\"\n\n#: src/SUMMARY.md src/generics/generic-traits.md\n#, fuzzy\nmsgid \"Generic Traits\"\nmsgstr \"泛型\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"特征边界\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"练习：通用 `min` 函数\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"第二天：下午\"\n\n#: src/SUMMARY.md src/std-types.md\nmsgid \"Standard Library Types\"\nmsgstr \"标准库类型\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"标准库\"\n\n#: src/SUMMARY.md src/std-types/docs.md\nmsgid \"Documentation\"\nmsgstr \"文档\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"String\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"练习：计数器\"\n\n#: src/SUMMARY.md src/std-traits.md\nmsgid \"Standard Library Traits\"\nmsgstr \"标准库特征\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\nmsgid \"Comparisons\"\nmsgstr \"比较\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\nmsgid \"Operators\"\nmsgstr \"运算符\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` 和 `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\nmsgid \"Casting\"\nmsgstr \"类型转换\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` 和 `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default`，结构体更新语法\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"闭包\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"练习：ROT13\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"第三天：上午\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"内存管理\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"回顾：程序的内存分配\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\nmsgid \"Approaches to Memory Management\"\nmsgstr \"内存管理方法\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"所有权\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"移动语义\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"复合类型\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"练习：构建器类型\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"智能指针\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"特征对象\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"练习：二叉树\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"第三天：下午\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\nmsgid \"Borrowing a Value\"\nmsgstr \"借用值\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\nmsgid \"Borrow Checking\"\nmsgstr \"借用检查\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"内部可变性\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"练习：健康统计\"\n\n#: src/SUMMARY.md src/lifetimes.md\n#, fuzzy\nmsgid \"Lifetimes\"\nmsgstr \"结构体生命周期\"\n\n#: src/SUMMARY.md src/lifetimes/lifetime-annotations.md\nmsgid \"Lifetime Annotations\"\nmsgstr \"生命周期注解\"\n\n#: src/SUMMARY.md\nmsgid \"Lifetime Elision\"\nmsgstr \"生命周期省略\"\n\n#: src/SUMMARY.md\nmsgid \"Struct Lifetimes\"\nmsgstr \"结构体生命周期\"\n\n#: src/SUMMARY.md src/lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"练习：Protobuf 解析\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"第四天：上午\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"迭代器\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"练习：迭代器方法链\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"模块\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"文件系统层级结构\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"可见性\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`、`super`、`self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"测试\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"测试模块\"\n\n#: src/SUMMARY.md src/testing/other.md\nmsgid \"Other Types of Tests\"\nmsgstr \"其他类型的测试\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"编译器 Lint 和 Clippy\"\n\n#: src/SUMMARY.md src/testing/exercise.md\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"练习：卢恩算法\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"第四天：下午\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"错误处理\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"Panics\"\n\n#: src/SUMMARY.md src/error-handling/try.md\nmsgid \"Try Operator\"\nmsgstr \"尝试运算符\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\nmsgid \"Try Conversions\"\nmsgstr \"尝试转换\"\n\n#: src/SUMMARY.md\nmsgid \"`Error` Trait\"\nmsgstr \"`Error` 特征\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`thiserror` 和 `anyhow`\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"练习：使用 `Result` 进行重写\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"不安全 Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe\"\nmsgstr \"Unsafe\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"解引用裸指针\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"可变的静态变量\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"联合体\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\nmsgid \"Unsafe Functions\"\nmsgstr \"Unsafe 函数\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Traits\"\nmsgstr \"Unsafe 特征\"\n\n#: src/SUMMARY.md\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"练习：FFI 封装容器\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"设置\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"构建规则\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"可执行文件\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"库\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\n#, fuzzy\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"/** Birthday service interface. */\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"接口\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Service\"\nmsgstr \"服务器\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"服务器\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"部署\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"客户端\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"更改 API\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Updating Implementations\"\nmsgstr \"实现\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"AIDL Types\"\nmsgstr \"类型\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Array Types\"\nmsgstr \"数组（Arrays）\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"Sending Objects\"\nmsgstr \"特征对象\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"变量\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"模拟\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"日志记录\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"互操作性\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"与 C 语言交互\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"使用 Bindgen 调用 C 语言\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"从 C 语言调用 Rust 语言\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"与 C++ 交互\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\nmsgid \"The Bridge Module\"\nmsgstr \"桥接模块\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust 桥接\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"生成的 C++ 代码\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ 桥接\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\nmsgid \"Shared Types\"\nmsgstr \"共享类型\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"共享枚举\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\nmsgid \"Rust Error Handling\"\nmsgstr \"Rust 错误处理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\nmsgid \"C++ Error Handling\"\nmsgstr \"C++ 错误处理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"其他类型\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"为 Android 构建：C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"为 Android 构建：Genrule\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"为 Android 构建：Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"与 Java 交互\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"习题\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"Chromium 和 Cargo 的生态对比\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"政策\"\n\n#: src/SUMMARY.md\nmsgid \"Unsafe Code\"\nmsgstr \"不安全代码\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"在 Chromium C++ 中导入 Rust 代码\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"练习\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` 库\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Rust 测试的 GN 规则\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` 宏\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\nmsgid \"Interoperability with C++\"\nmsgstr \"与 C++ 的互操作性\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Example Bindings\"\nmsgstr \"绑定示例\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"CXX 的局限性\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"CXX Error Handling\"\nmsgstr \"CXX 错误处理\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: QR Example\"\nmsgstr \"错误处理：QR 码示例\"\n\n#: src/SUMMARY.md\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"错误处理：PNG 示例\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"在 Chromium 中使用 CXX\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"添加第三方 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"配置 Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"配置 `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"下载 Crate\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"生成 `gn` 构建规则\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"解决问题\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"构建用于生成代码的脚本\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"构建用于构建 C++ 或执行任意操作的脚本\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"依赖于 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"审查和审核\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"提交到 Chromium 源代码\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"及时更新 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"综合应用练习\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\nmsgid \"Exercise Solutions\"\nmsgstr \"练习解答\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"裸机：上午\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"最小示例\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"微控制器\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"原始 MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"板级支持 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"类型状态模式\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"`probe-rs` 和 `cargo-embed`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"调试\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"其他项目\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"罗盘\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"解答\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"裸机：下午\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"应用处理器\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"准备使用 Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"内联汇编\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"编写 UART 驱动程序\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"更多特征\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"优化 UART 驱动程序\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"多寄存器\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"驱动程序\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"开始使用\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"异常\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"实用 Crate\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC 驱动\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"并发：上午\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"线程\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"范围线程\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"通道\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"无界通道\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"有界通道\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` 和 `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"示例\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"共享状态\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"互斥器（`Mutex`）\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"示例\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"哲学家就餐问题\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"多线程链接检查器\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"并发：下午\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"异步基础\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md src/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Runtimes\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"任务\"\n\n#: src/SUMMARY.md src/async/channels.md\nmsgid \"Async Channels\"\nmsgstr \"异步通道\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"控制流\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"加入\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"选择\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"误区\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"阻塞执行器\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"异步特征\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\nmsgid \"Cancellation\"\nmsgstr \"消除\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"广播聊天应用\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"结束语\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"谢谢！\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"词汇表\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"其他资源\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"鸣谢\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![构建工作流](https://img.shields.io/github/actions/workflow/status/google/\"\n\"comprehensive-rust/build.yml?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub 贡献者](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub 星标](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"这是一门由 Android 团队开发的免费 Rust 课程。课程涵盖了 Rust 的全部内容，从基\"\n\"本语法到泛型和错误处理等高级主题。\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"如需查看课程的最新版本，请访问 <https://google.github.io/comprehensive-rust/\"\n\">。如果您在其他地方阅读，请在那里查看更新。\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"本课程的目标是教会你使用 Rust。假设你对 Rust 一无所知，本课程可以：\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"帮助你全面理解 Rust 的语法和语言。\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"让你可以用 Rust 修改现有程序和编写新程序。\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"为你展示常见的 Rust 习惯用法。\"\n\n#: src/index.md\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"我们将前四天的课程称为“Rust 基础”。\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"在此基础上，你可以选择深入研究一个或多个专门的主题：\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md)：为期半天的课程，介绍如何在 Android 平台开发中使用 Rust\"\n\"（AOSP）。课程内容包括与 C、C++ 和 Java 的互操作性。\"\n\n#: src/index.md\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md)：为期半天的课程，介绍如何在基于 Chromium 的浏览器中使\"\n\"用 Rust。课程内容包括与 C++ 的互操作性以及如何在 Chromium 中加入第三方 \"\n\"crate。\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[裸机](bare-metal.md)：为期一天的课程，介绍如何使用 Rust 进行裸机（嵌入式）开\"\n\"发。课程内容涵盖微控制器和应用处理器。\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[并发](concurrency.md)：为期一天的课程，介绍 Rust 中的并发性。我们将涵盖传统\"\n\"并发（使用线程和互斥锁进行抢占式调度）和 async/await 并发（使用 futures 进行\"\n\"协作式多任务处理）。\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"非目标\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust 是一门庞大的语言，短短几天的课程无法覆盖其全部内容。本课程不包括以下内\"\n\"容：\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"学习如何开发宏：请参阅 [Rust Book 的第 19.5 章](https://doc.rust-lang.org/\"\n\"book/ch19-06-macros.html) 和 [Rust by Examples 对应章节](https://doc.rust-\"\n\"lang.org/rust-by-example/macros.html)。\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"学习前提\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"本课程假设你已经具备编程知识。Rust 是一种静态类型语言，本课程有时会将其与 C \"\n\"和 C++ 进行比较，以便更好地解释或对比 Rust 的设计。\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"如果你会使用 Python 或 JavaScript 等动态类型语言编程，那么你也能够很好地跟上\"\n\"进度。\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"这是演讲者备注（_Speaker Notes_）的示例。页面中使用它来为幻灯片添加备注信息，\"\n\"其内容包括讲师应涉及的要点，以及对课堂上可能出现的典型问题的回答。\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"本页供课程讲师使用。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"以下是有关 Google 内部开展课程的一些相关背景。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"上课时间通常是从上午 9:00 到下午 4:00，中间有 1 小时的午餐休息时间。这样上午\"\n\"和下午就各有 3 小时上课时间。上下午上课时间段内都有多次休息时间和学生做练习的\"\n\"时间。\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"在授课之前，你需要完成以下事项：\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"熟悉课程资料。页面提供了演讲者注释以突出重点（请帮忙多多贡献演讲者备注！）。\"\n\"演讲时，请确保在弹出窗口中打开演讲者笔记（点击“演讲者笔记”旁边带小箭头的链\"\n\"接）。这样就可以确保屏幕整洁有序，更好地向全班学员展示课程内容。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"决定培训日期。由于课程为期四天，建议将时间安排在两周内。课程学员曾表示，他们\"\n\"认为在课程保留一些间隙有助于更好地进行理解。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"找一间足以容纳全体线下学员的教室。建议的班级人数为 15-25 人。这样少的人数可以\"\n\"让大家能够更轻松地提问，也可以让仅有一位的讲师有足够时间回答问题。确保教室里\"\n\"有讲师和学生用的桌子，并能够坐下来使用笔记本电脑。特别地，讲师需要进行大量的\"\n\"现场编码工作，因此讲台是不需要的。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"课程当天，请提早到教室进行准备。建议直接在笔记本电脑上运行 `mdbook serve` 来\"\n\"演示课程内容（请参阅[安装说明](https://github.com/google/comprehensive-\"\n\"rust#building)）。这样可以确保在更换页面时不会出现延迟，演示效果更好。使用笔\"\n\"记本运行还可以在发现错别字时及时更正。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"让学员自己或以小组为单位解决练习问题。通常在上午和下午各安排 30-45 分钟的练习\"\n\"时间（包括查看解答的时间）。请务必询问学员是否遇到困难，或是否需要任何帮助。\"\n\"如果有多位学员遇到同样的问题，则在班级内进行讲解，并提供相应的解决方案，例如\"\n\"告诉大家在标准库的什么位置可以找到相关信息。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"以上就是全部事项，祝你授课顺利！希望你能像我们一样享受其中的乐趣！\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"欢迎你在课后 [提供反馈](https://github.com/google/comprehensive-rust/\"\n\"discussions/86)，以帮助我们不断改进课程。我们非常期待了解哪些方面做得不错，哪\"\n\"些方面还需要改进。同时非常欢迎学生们 [向我们发送反馈](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)！\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust 基础\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"前四天的内容是 [Rust 基础](../welcome-day-1.md)。这几天的课程节奏很快，内容也\"\n\"很丰富！\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Course schedule:\"\nmsgstr \"课程安排：\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Morning (2 hours and 5 minutes, including breaks)\"\nmsgstr \"第一天上午（2 小时 40 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[欢迎](../welcome-day-1.md)（5 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md)（20 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Types and Values](../types-and-values.md) (40 minutes)\"\nmsgstr \"[类型和值](../types-and-values.md)（55 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"[控制流](../control-flow-basics.md)（55 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 1 Afternoon (2 hours and 35 minutes, including breaks)\"\nmsgstr \"第一天下午（2 小时 55 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[元组和数组](../tuples-and-arrays.md)（1 小时）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[References](../references.md) (55 minutes)\"\nmsgstr \"[引用](../references.md)（50 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[用户定义的类型](../user-defined-types.md)（50 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Morning (2 hours and 55 minutes, including breaks)\"\nmsgstr \"第二天上午（2 小时 40 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[欢迎](../welcome-day-2.md)（3 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[模式匹配](../pattern-matching.md)（50 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Methods and Traits](../methods-and-traits.md) (50 minutes)\"\nmsgstr \"[方法和特征](../methods-and-traits.md)（45 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (40 minutes)\"\nmsgstr \"[泛型](../generics.md)（45 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 2 Afternoon (3 hours and 10 minutes, including breaks)\"\nmsgstr \"第三天下午（2 小时 20 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[标准库类型](../std-types.md)（1 小时 10 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"[标准库特征](../std-traits.md)（1 小时 40 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"第三天上午（2 小时 20 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[欢迎](../welcome-day-3.md)（3 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[内存管理](../memory-management.md)（1 小时）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[智能指针](../smart-pointers.md)（55 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 3 Afternoon (1 hour and 50 minutes, including breaks)\"\nmsgstr \"第三天下午（2 小时 20 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Borrowing](../borrowing.md) (50 minutes)\"\nmsgstr \"[借用](../borrowing.md)（1 小时）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Lifetimes](../lifetimes.md) (50 minutes)\"\nmsgstr \"[引用](../references.md)（50 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"第一天上午（2 小时 40 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[欢迎](../welcome-day-4.md)（3 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[迭代器](../iterators.md)（45 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[模块](../modules.md)（40 分钟）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[测试](../testing.md)（1 小时）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"第三天下午（2 小时 20 分钟，含休息时间）\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"[Error Handling](../error-handling.md) (55 minutes)\"\nmsgstr \"[错误处理](../error-handling.md)（45 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[不安全 Rust](../unsafe-rust.md)（1 小时 5 分钟）\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"深入探究\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"除了为期四天的“Rust 基础”课程外，还有一些专业课题提供：\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Android\"\nmsgstr \"Android 中的 Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"深入探究 [Android 中的 Rust](../android.md) 课程为期半天，旨在介绍如何使用 \"\n\"Rust 进行 Android 平台开发。其中包括与 C、C++ 和 Java 的互操作性。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"你需要 [检出 AOSP](https://source.android.com/docs/setup/download/\"\n\"downloading)。在同一机器上检出 [课程库](https://github.com/google/\"\n\"comprehensive-rust)， 然后将 `src/android/` 目录移至所检出的 AOSP 的根目录。\"\n\"这将确保 Android 构建系统能检测到 `src/android/` 中的 `Android.bp` 文件。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"确保 `adb sync` 适用于你的模拟器或实际设备， 并使用 `src/android/build_all.\"\n\"sh` 预构建所有 Android 示例。请阅读脚本， 查看它所运行的命令，并确保这些命令\"\n\"能在你手动运行时正确执行。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust in Chromium\"\nmsgstr \"Chromium 中的 Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"深入探究 [Chromium 中的 Rust](../chromium.md) 课程为期半天，旨在介绍 \"\n\"Chromium 浏览器中 Rust 的使用。课程内容包括在 Chromium 的 `gn` 编译系统中使\"\n\"用 Rust，引入第三方 crate，以及与 C++ 的互操作性。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"您需要能够构建 Chromium。为了提高速度，建议使用调试、组件 [构建方式](../\"\n\"chromium/setup.md)，其他构建方式也可以使用。确保所构建的 Chromium 浏览器可以\"\n\"正常运行。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Bare-Metal Rust\"\nmsgstr \"裸机 Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"深入探究 [裸机 Rust](../bare-metal.md) 课程为期一天，旨在介绍如何使用 Rust 进\"\n\"行裸机（嵌入式）开发。其中涵盖了微控制器和应用处理器。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"对于微控制器部分，需要提前购买 [BBC micro:bit](https://microbit.org/) v2 开发\"\n\"板。每个人都需要安装多个软件包， 具体如 [欢迎页面](../bare-metal.md) 中所述。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Concurrency in Rust\"\nmsgstr \"Rust 中的并发\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"深入探究 [Rust 中的并发](../concurrency.md) 课程为期一天，旨在介绍传统并发和 \"\n\"`async`/`await` 并发。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"你需要设置一个新 crate，下载所需的依赖项， 做好课前准备。然后，你可以将示例复\"\n\"制/粘贴到 `src/main.rs` 中， 以便对以下代码进行实验：\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"课程形式\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"本课程的互动性非常强， 建议你以问题驱动探索 Rust！\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"mdBook 中有一些实用键盘快捷键：\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"向左箭头\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \"：转到上一页。\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"向右箭头\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \"：转到下一页。\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \"：执行具有焦点的代码示例。\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \"：激活搜索栏。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"一批优秀的志愿者已将本课程翻译成其他语言：\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"[巴西葡萄牙语版本](https://google.github.io/comprehensive-rust/pt-BR/) 译者：\"\n\"[@rastringer](https://github.com/rastringer)、[@hugojacob](https://github.\"\n\"com/hugojacob)、[@joaovicmendes](https://github.com/joaovicmendes) 和 \"\n\"[@henrif75](https://github.com/henrif75)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[简体中文版本](https://google.github.io/comprehensive-rust/zh-CN/) 译者：\"\n\"[@suetfei](https://github.com/suetfei)、[@wnghl](https://github.com/wnghl)、\"\n\"[@anlunx](https://github.com/anlunx)、[@kongy](https://github.com/kongy)、\"\n\"[@noahdragon](https://github.com/noahdragon)、[@superwhd](https://github.com/\"\n\"superwhd)、[@SketchK](https://github.com/SketchK) 和 [@nodmp](https://github.\"\n\"com/nodmp)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[繁体中文版本](https://google.github.io/comprehensive-rust/zh-TW/) 译者：\"\n\"[@hueich](https://github.com/hueich)、[@victorhsieh](https://github.com/\"\n\"victorhsieh)、[@mingyc](https://github.com/mingyc)、[@kuanhungchen](https://\"\n\"github.com/kuanhungchen) 和 [@johnathan79717](https://github.com/\"\n\"johnathan79717)。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[韩语版本](https://google.github.io/comprehensive-rust/ko/) 译者：[@keispace]\"\n\"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp) 和 \"\n\"[@jooyunghan](https://github.com/jooyunghan)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[西班牙语版本](https://google.github.io/comprehensive-rust/es/) 译者：\"\n\"[@deavid](https://github.com/deavid)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"使用右上角的语言选择器切换语言。\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"未完成的翻译\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"还有很多语言版本仍在翻译中。以下是最近更新的翻译版本的链接：\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[孟加拉语版本](https://google.github.io/comprehensive-rust/bn/) 译者：\"\n\"[@raselmandol](https://github.com/raselmandol)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\"[法语版本](https://google.github.io/comprehensive-rust/fr/) 译者：[@KookaS]\"\n\"(https://github.com/KookaS) 和 [@vcaen](https://github.com/vcaen)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[德语版本](https://google.github.io/comprehensive-rust/de/) 译者：[@Throvn]\"\n\"(https://github.com/Throvn) 和 [@ronaldfw](https://github.com/ronaldfw)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[日语版本](https://google.github.io/comprehensive-rust/ja/) 译者：[@CoinEZ-\"\n\"JPN](https://github.com/CoinEZ) 和 [@momotaro1105](https://github.com/\"\n\"momotaro1105)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[意大利语版本](https://google.github.io/comprehensive-rust/it/) 译者：\"\n\"[@henrythebuilder](https://github.com/henrythebuilder) 和 [@detro](https://\"\n\"github.com/detro)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"如果你想协助翻译，请参阅 [翻译说明](https://github.com/google/comprehensive-\"\n\"rust/blob/main/TRANSLATIONS.md)，了解如何开始翻译工作。翻译工作可通过 [此议\"\n\"题](https://github.com/google/comprehensive-rust/issues/282) 追踪。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"开始了解 Rust 后，你很快就会遇到 [Cargo](https://doc.rust-lang.org/cargo/)，\"\n\"这是 Rust 生态系统中用于构建和运行 Rust 应用的标准工具。在这里，我们想简要介\"\n\"绍一下什么是 Cargo、它如何融入更广泛的生态系统， 以及我们如何在本培训中合理利\"\n\"用 Cargo。\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"安装\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**请按照 <https://rustup.rs/> 上的说明操作。**\"\n\n#: src/cargo.md\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"这将为你提供 Cargo 构建工具 (`cargo`)和 Rust 编译器 (`rustc`)。你还将获得 \"\n\"`rustup`，这是一个命令行实用程序,你可以用它来安装不同的编译器版本。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"安装 Rust 之后，你应当配置你的编辑器或 IDE 以开始使用 Rust。大多数编辑器使用\"\n\"了 [rust-analyzer](https://rust-analyzer.github.io/)。它为 [VS Code](https://\"\n\"code.visualstudio.com/)、[Emacs](https://rust-analyzer.github.io/manual.\"\n\"html#emacs)、[Vim/Neovim](https://rust-analyzer.github.io/manual.\"\n\"html#vimneovim) 及其他许多编辑器提供了自动补全及定义跳转的功能。同样也可以使\"\n\"用 [RustRover](https://www.jetbrains.com/rust/) IDE。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"在 Debian/Ubuntu 上，你也可以通过 `apt` 安装 Cargo、Rust 源代码和 [Rust 格式\"\n\"化工具](https://github.com/rust-lang/rustfmt)。但是，这样会得到一个过时的 \"\n\"Rust 版本，这可能会导致意外的行为。命令如下:\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Rust 生态系统\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"Rust 生态系统由许多工具组成，主要包括：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"`rustc`：Rust 编译器，可将 `.rs` 文件转换为二进制文件和其他中间格式。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`：Rust 依赖项管理器和构建工具。Cargo 知道如何下载托管在 <https://\"\n\"crates.io> 上的依赖项,并在构建项目时将它们传递给 `rustc`。Cargo 还附带一个内\"\n\"置的测试运行程序，用于执行单元测试。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`：Rust 工具链安装和更新工具。当 Rust 发布新版本时，此工具用于安装并更\"\n\"新 `rustc` 和 `cargo`。 此外，`rustup` 还可以下载标准库的文档。可以同时安装多\"\n\"个版本的 Rust，`rustup` 会根据需要让你在这些版本之间切换。\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/pattern-matching/destructuring.md\n#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"关键点：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust 有一个快速发布时间表，每六周就会发布一次新版本。新版本保持与旧版本的向后\"\n\"兼容性，并添加新功能。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"共有三个发布阶段：“稳定版（stable）”、“测试版（beta）”和“夜间版（nightly）”。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"新功能会先在“夜间版”上测试，“测试版”会每六周转为“稳定版”。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"依赖关系也可以通过其他 [registry](https://doc.rust-lang.org/cargo/reference/\"\n\"registries.html)、git 及文件夹等解析。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust 区分 [版本（edition）](https://doc.rust-lang.org/edition-guide/)：当前版\"\n\"本是 Rust 2021。之前的版本是 Rust 2015 和 Rust 2018。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"这些版本支持对语言进行向后不兼容的更改。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"为防止破坏代码，版本是可选的： 通过 `Cargo.toml` 文件为 crate 选择合适的版\"\n\"本。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"为免分割生态系统，Rust 编译器可以混合使用为不同版本编写的代码。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"\"\n\"请注意，不借助 `cargo` 直接使用编译器的情况相当少见（大多数用户从不这样做）。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"值得一提的是，Cargo 本身就是一个功能强大且全面的工具。它能够实现许多高级功\"\n\"能，包括但不限于：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"项目/软件包结构\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"[工作区](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"开发依赖和运行时依赖管理/缓存\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\"\n\"[构建脚本](https://doc.rust-lang.org/cargo/reference/build-scripts.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\"\n\"[全局安装](https://doc.rust-lang.org/cargo/commands/cargo-install.html)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"它还可以使用子命令插件（例如 [cargo clippy](https://github.com/rust-lang/\"\n\"rust-clippy)）进行扩展。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"详情请参阅 [官方 Cargo Book](https://doc.rust-lang.org/cargo/)\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"本培训中的代码示例\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"在本培训中，我们将主要通过示例探索 Rust 语言，这些示例可以通过浏览器执行。这\"\n\"能大大简化配置过程， 并确保所有人都能获得一致的体验。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"我们仍然建议你安装 Cargo：它有助于你更轻松地完成练习。在最后一天，我们要做一\"\n\"个综合的练习， 向你展示如何使用依赖项，因此你需要安装 Cargo。\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"本课程中的代码块是完全交互式的：\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Edit me!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"你可以使用 \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" 来执行焦点所在文本框的代码。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"如上所示，大多数代码示例都可修改。少数代码示例可能会因以下原因而不可修改：\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"嵌入的 Playground 无法执行单元测试。将代码复制并粘贴到实际 Playground 中，以\"\n\"演示单元测试。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"嵌入的 Playground 会在离开页面后丢失编辑状态！因此，学员应使用本地安装的 \"\n\"Rust 或通过 Playground 解题。\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"使用 Cargo 在本地运行代码\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"如果你想在自己的系统上进行代码实验， 则需要先安装 Rust。为此，请按照 [Rust \"\n\"Book 中的说明](https://doc.rust-lang.org/book/ch01-01-installation.html) 操\"\n\"作。这应会为你提供一个有效的 `rustc` 和 `cargo`。在撰写本文时，最新的 Rust 稳\"\n\"定版是以下的版本号：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"你也可以使用任何更高版本，因为 Rust 保持向后兼容性。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"了解这些信息后，请按照以下步骤从本培训中的一个示例中构建 Rust 二进制文件：\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"在你要复制的示例上点击“复制到剪贴板（Copy to clipboard）”按钮。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"使用 `cargo new exercise` 为代码新建一个 `exercise/` 目录：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"转到 `exercise/` 并使用 `cargo run` 构建并运行二进制文件：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"将 `src/main.rs` 中的样板代码替换为自己的代码。例如， 使用上一页中的示例，将 \"\n\"`src/main.rs` 改为：\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"使用 `cargo run` 构建并运行更新后的二进制文件：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"使用 `cargo check` 快速检查项目是否存在错误；使用 `cargo build` 只进行编译，\"\n\"而不运行。你可以在 `target/debug/` 中找到常规调试 build 的输出。使用 `cargo \"\n\"build --release` 在 `target/release/` 中生成经过优化的 发布 build。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"可以通过修改 `Cargo.toml` 为项目添加依赖项。当运行 `cargo` 命令时，系统会自动\"\n\"下载和编译缺失的依赖项。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"尽量鼓励全班学员安装 Cargo 并使用本地编辑器。这能使他们拥有常规的开发环境，让\"\n\"工作变得更加轻松。\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"欢迎来到第一天\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"今天是学习 Comprehensive Rust 的第一天。我们会涉及很多内容：\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"Rust 基本语法：变量、标量（scalar）和复合（compound）类型、枚举（Enum）、结构\"\n\"体（struct）、引用、函数和方法。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"类型推导\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"控制流结构：循环、条件语句等。\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"用户定义的类型：结构体和枚举。\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"模式匹配：解构枚举、结构体和数组（array）。\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"时间表\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md)（20 分钟）\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Types and Values](./types-and-values.md) (40 minutes)\"\nmsgstr \"[类型和值](../types-and-values.md)（55 分钟）\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"[控制流](../control-flow-basics.md)（55 分钟）\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 5 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"请提醒学生：\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"他们可以随时提问，不需要留到最后。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"这个课程本应该是互动的，我们鼓励大家积极讨论。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"作为讲师，你应该尽量保证讨论话题的相关性，例如，讨论围绕Rust是如何做某些事\"\n\"情，而不是其他的语言如何如何。 这个平衡点不容易找到，但是尽量倾向于允许讨论，\"\n\"因为讨论比起单方面的灌输更有利于让大家投入。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"有些问题会导致我们提前谈到后面的内容。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"这完全没有问题！重复是学习的一个重要方法。请记住，这些幻灯片只是一种辅助，你\"\n\"可以选择性地跳过。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"第一天的目标是展示 Rust 中与其他编程语言有明显相似之处的 “基础”内容。Rust 中\"\n\"更高级复杂的内容将在后续几天中逐步介绍。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"如果您是在教室里授课，则这是一个好时机，可对课程时间表进行讲解。请注意，每节\"\n\"课结束之后会有练习内容，然后是休息时间。安排在休息结束后讲解练习内容的解答。\"\n\"为了确保课程按时间表进行，此处所列时间仅供参考。请按需进行灵活调整！\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/lifetimes.md src/iterators.md\n#: src/modules.md src/testing.md src/error-handling.md src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust 是一门新的编程语言，它的[1.0 版本于 2015 年发布](https://blog.rust-lang.\"\n\"org/2015/05/15/Rust-1.0.html)：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust 是一门静态编译语言，其功能定位与 C++ 相似\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` 使用 LLVM 作为它的后端。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust 支持多种[平台和架构](https://doc.rust-lang.org/nightly/rustc/platform-\"\n\"support.html):\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86、ARM、WebAssembly......\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux、Mac、Windows......\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust 被广泛用于各种设备中：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"固件和引导程序，\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"智能显示器，\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"手机，\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"桌面，\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"服务器。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust 和 C++ 适用于类似的场景：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"极高的灵活性。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"高度的控制能力。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"能够在资源匮乏的设备（如手机）上运行。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"没有运行时和垃圾收集。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"关注程序可靠性和安全性，而不会牺牲任何性能。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Rust 有一些独特的卖点：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"_编译时内存安全_：在编译时可防止所有类内存 bug\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"不存在未初始化的变量。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"不存在“双重释放”。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"不存在“释放后使用”。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"不存在 `NULL` 指针。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"不存在被遗忘的互斥锁。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"不存在线程之间的数据竞争。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"不存在迭代器失效。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"_没有未定义的运行时行为_：每个 Rust 语句的行为都有明确定义\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"数组访问有边界检查。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"整数溢出有明确定义（panic 或回绕）。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"_现代语言功能_：具有与高级语言一样丰富且人性化的表达能力\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"枚举和模式匹配。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"泛型。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"无额外开销的外部函数接口（FFI）。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"零成本抽象。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"强大的编译器错误提示。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"内置依赖管理器。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"对测试的内置支持。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"优秀的语言服务协议（Language Server Protocol）支持。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"不用在这里占用过多时间。所有这些要点均会在后面进行详细讲解。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"应该问问学生们都使用过哪些语言。根据答案侧重讲解 Rust 的不同特性：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"使用过 C 或 C++：Rust 利用借用检查消除了一类 _运行时错误_ 。你可以达到堪比 C \"\n\"和 C++ 的性能，而没有内存不安全的问题。并且你还可以得到些现代的语言构造，比如\"\n\"模式匹配和内置依赖管理。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"使用过 Java、Go、Python、JavaScript......：你可以得到和这些语言相同的内存安全\"\n\"特性，并拥有类似的使用高级语言的感受。同时你可以得到类似 C 和 C++ 的高速且可\"\n\"预测的执行性能（无垃圾回收机制），以及在需要时对底层硬件的访问。\"\n\n#: src/hello-world/playground.md\n#, fuzzy\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) 提供了一种运行简短 Rust 程序的\"\n\"简便方法，也是本课程所有示例和练习的依据所在。请尝试运行它初始提供的 \\\"hello-\"\n\"world\\\" 程序。该程序提供了一些便捷功能：\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"在 \\\"Tools\\\" 下，使用 `rustfmt` 选项以 \\\"standard\\\" 方式设置代码格式。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust 具有两个用于生成代码的主要 “配置文件”：调试（进行额外运行时检查、较少优\"\n\"化）和发布（较少运行时检查，进行大量优化）。可以在顶部的 \\\"Debug\\\" 下访问这些\"\n\"内容。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"如果感兴趣，您可以使用 \\\"...\\\" 下的 \\\"ASM\\\" 查看生成的汇编代码。\"\n\n#: src/hello-world/playground.md\n#, fuzzy\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"当学生开始休息时，鼓励他们打开 Playground 并进行一些实验。鼓励他们让该标签页\"\n\"保持打开状态，并在课余时间里进行一些尝试。对于具有较高水平并且希望深入了解 \"\n\"Rust 优化技巧或生成的汇编代码的学生，这尤其有益。\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md)（20 分钟）\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/types-and-values.md\n#, fuzzy\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\"如需详细了解 Rust 中 的模式，请参阅 [模式匹配](../pattern-matching.md)。\"\n\n#: src/types-and-values.md src/control-flow-basics.md src/generics.md\n#: src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"让我们进入最简单的 Rust 程序，一个经典的 Hello World 程序：\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"你看到的：\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"函数以 `fn` 开头。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"像 C 和 C++ 一样，块由花括号分隔。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"`main` 函数是程序的入口点。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust 有卫生宏 (hygienic macros)，`println!` 就是一个例子。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"Rust 字符串是 UTF-8 编码的，可以包含任何 Unicode 字符。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"这张幻灯片试图让学生们熟悉 Rust 代码。在接下来的四天里，他们会看到很多 Rust \"\n\"代码, 所以我们从一些熟悉的东西开始。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust 非常像 C/C++/Java 等其他传统语言。它是指令式语言（而非函数式），而且除非\"\n\"绝对必要，它不会尝试重新发明新的概念。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust 是一门现代编程语言，它完全支持 Unicode 等特性。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"在需要处理可变数量的参数的情况下，Rust 使用宏（没有函数[重载](basic-syntax/\"\n\"functions-interlude.md)）。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"宏是“卫生的”，这意味着它们不会意外地捕获它们所在作用域中的标识符。实际上，\"\n\"Rust 的宏只是[部分卫生](https://veykril.github.io/tlborm/decl-macros/\"\n\"minutiae/hygiene.html)。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust 是多范式编程语言。例如，它具有强大的[面向对象的编程功能](https://doc.\"\n\"rust-lang.org/book/ch17-00-oop.html)，虽然它不是函数式语言，但包括一系列的[函\"\n\"数概念](https://doc.rust-lang.org/book/ch13-00-functional-features.html)。\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"Rust 通过静态类型实现了类型安全。变量绑定默认是不可变的：\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"// x = 20;\"\nmsgstr \"\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"// println!(\\\"x: {x}\\\");\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"取消备注 `x = 20`，以证明变量默认是不可变的。添加 `mut` 关键字以允许进行更\"\n\"改。\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"这里的 `i32` 是变量的类型。编译时必须已知类型，但在很多情况下，由于具有类型推\"\n\"理功能（稍后介绍），程序员可以忽略这一点。\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"以下是一些基本的内置类型以及每种类型的字面量值的语法。\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"类型\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"字面量\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"有符号整数\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`、`i16`、`i32`、`i64`、`i128`、`isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`、`0`、`1_000`、`123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"无符号整数\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`、`u16`、`u32`、`u64`、`u128`、`usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`、`123`、`10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"浮点数\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`、`f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`、`-10.0e20`、`2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"Unicode 标量类型\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`、`'α'`、`'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"布尔值\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`、`false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"各类型占用的空间为：\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`, `uN` 和 `fN` 占用 _N_ 位，\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` 和 `usize` 占用一个指针大小的空间，\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` 占用 32 位空间，\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` 占用 8 位空间。\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"上表中还有一些未提及的语法：\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"数字中的所有下划线均可忽略，它们只是为了方便辨识。因此，`1_000` 可以写为 \"\n\"`1000`（或 `10_00`），而 `123_i64` 可以写为 `123i64`。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"这是我们第一次看到除 `main` 之外的函数，不过其含义应该很明确：它接受三个整\"\n\"数，然后返回一个整数。稍后会对这些函数进行详细介绍。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"算术和优先级均与其他语言极为相似。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\"整数溢出是什么样的？在 C 和 C++ 中，_有符号_ 整数溢出实际上是未定义的，可能会\"\n\"在不同平台或编译器上执行不同的操作。在 Rust 中，整数溢出具有明确定义。\"\n\n#: src/types-and-values/arithmetic.md\n#, fuzzy\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"将 `i32` 更改为 `i16` 即可看到整数溢出，在调试 build 中，这会触发 panic（已检\"\n\"查），而在发布 build 中，则会发生封装。还有其他选项，例如溢出、饱和和进位等。\"\n\"可以通过方法语法访问这些选项，例如`(a * b).saturating_add(b * c).\"\n\"saturating_add(c * a)`。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"事实上，编译器会检测常量表达式的溢出情况，这便是为何该示例需要单独的函数。\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust 会根据变量的使用来确定其类型：\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"这张幻灯片演示了 Rust 编译器是如何根据变量声明和用法来推导其类型的。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"需要重点强调的是这样声明的变量并非像那种动态类型语言中可以持有任何数据的“任何\"\n\"类型”。这种声明所生成的机器码与明确类型声明完全相同。编译器进行类型推导能够让\"\n\"我们编写更简略的代码。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"当整数字面量的类型不受限制时，Rust 默认为 `i32`。这在错误消息中有时显示为 \"\n\"`{integer}`。同样，浮点字面量默认为 `f64`。\"\n\n#: src/types-and-values/inference.md\n#, fuzzy\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\"\nmsgstr \"// ERROR: no implementation for `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\"第一个和第二个斐波那契数都是 `1`。如果 n>2，则第 n 个斐波那契数以递归方式计算\"\n\"为第 n-1 个和第 n-2 个斐波那契数之和。\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"编写一个函数 `fib(n)`，用于计算第 n 个斐波那契数。何时该函数会 panic？\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"// The base case.\"\nmsgstr \"// The base case.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"实现\"\n\n#: src/types-and-values/exercise.md\n#, fuzzy\nmsgid \"// The recursive case.\"\nmsgstr \"// The recursive case.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\n#, fuzzy\nmsgid \"\\\"fib({n}) = {}\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[控制流](../control-flow-basics.md)（55 分钟）\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"[控制流](../control-flow-basics.md)（55 分钟）\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"`if` 表达式\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"[`if` 表达式](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-expressions) 的用法与其他语言中的 `if` 语句完全一样。\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"biggish\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"huge\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"此外，你还可以将 `if` 用作一个表达式。每个块的最后一个表达式 将成为 `if` 表达\"\n\"式的值：\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"small\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"large\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"number size: {}\\\"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"由于 `if` 是一个表达式且必须有一个特定的类型，因此它的两个分支块必须有相同的\"\n\"类型。考虑在第二个示例中将 `;` 添加到 `x / 2` 的后面，看看会出现什么情况。\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"如果在表达式中使用 `if`，则表达式中必须包含 `;` 来将其与下一个语句分隔开。移\"\n\"除 `println!` 前面的 `;` 即可查看编译器错误。\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"Rust 中有三个循环关键字：`while`、`loop` 和 `for`：\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"`while`\"\nmsgstr \"`while` 循环\"\n\n#: src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[`while` 关键字](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-loops) 的工作方式与其他语言非常相似：\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 用于定义析构函\"\n\"数。\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\"请注意，`for` 循环只迭代到 `4`。现在展示使用 `1..=5` 语法表示一个包含边界的范\"\n\"围。\"\n\n#: src/control-flow-basics/loops/loop.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 用于定义析构函\"\n\"数。\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"如果需要立即启动 下一次迭代，请使用 [`continue`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#continue-expressions)。\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"如果你想提前退出循环，请使用 [`break`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#break-expressions)，\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\\\"{}\\\"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"`continue` 和 `break` 都可以选择接受一个标签参数，用来 终止嵌套循环：\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"请注意，`loop` 是唯一返回有意义的值的循环结构。 这是因为它保证至少被输入一次\"\n\"（与 `while` 和 `for` 循环不同）。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"块\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"Rust 中的块包含值和类型：值是 块的最后一个表达式：\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"不过，如果最后一个表达式以 `;` 结尾，那么生成的值和类型为 `()`。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"你可以通过更改块的最后一行，来展示块值的变化情况。例如，添加/移除分号或使用 \"\n\"`return`。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"变量的作用域仅限于封闭代码块内。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"你可以隐藏变量，位于外部作用域的变量和 相同作用域的变量都可以：\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/from-and-into.md\n#: src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"shadowed in inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"after: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"通过在上一个示例的内部代码块中添加 `b`，并尝试在该代码块之外访问它，表明变量\"\n\"的作用域是受限的。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"定义: 遮蔽和变更（mutation）不同，因为在遮蔽之后，两个变量都会同时存在于内存\"\n\"的不同位置中。在同一个名字下的两个变量都是可以被使用的，但是你在代码的哪里使\"\n\"用会最终决定你使用哪一个变量。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"一个遮蔽变量可以具有不同的类型。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"隐藏起初看起来会有些晦涩，但是它很便于存 `.unwrap()` 之后的得到的值。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"类型跟随在声明的参数后（与某些编程语言相反），然后是返回类型。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"函数体（或任何块）中的最后一个表达式将成为返回值。只需省略表达式末尾的 `;` 即\"\n\"可。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"有些函数没有返回值，会返回“单元类型（unit type）”`()`。如果省略了`-> ()`的返\"\n\"回类型，编译器将会自动推断。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"每一个函数都只有一种实现：\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"始终采用固定数量的参数。不支持默认参数。宏可用于支持可变函数。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"始终接受一组形参类型。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"宏在编译过程中会扩展为 Rust 代码，并且可以接受可变数量的参数。它们以 `!` 结尾\"\n\"来进行区分。Rust 标准库包含各种有用的宏。\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"运算符重载是通过 [`std::ops`](https://doc.rust-lang.org/std/ops/index.html) \"\n\"中的特征实现的：\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` 的用法与 `println!` 类似，但它以字符串形式返回结果。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` 会记录表达式的值并返回该值。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"`todo!()` 用于标记尚未实现的代码段。如果执行该代码段，则会触发 panic。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"\"\n\"`unreachable!()` 用于标记无法访问的代码段。如果执行该代码段，则会触发 panic。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"这一节的要点是介绍这些常见的便捷功能以及如何使用它们。而为何将它们定义为宏以\"\n\"及它们可以扩展为什么内容，并不是特别关键。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"本课程不会介绍如何定义宏，但在后续部分会介绍派生宏的用法。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"[考拉兹序列](https://en.wikipedia.org/wiki/Collatz_conjecture) 的定义如下，其\"\n\"中任意 n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \" 大于零：\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"如果 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ 为 1，则序列在 _n 处终止\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_.\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ 为偶数，则 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" / 2_。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ 为奇数，则 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"例如，以 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3 开头：\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 是奇数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"10 is even, so _n\"\nmsgstr \"10 是偶数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 是奇数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 15 + 1 = 16；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"16 is even, so _n\"\nmsgstr \"16 是偶数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2  = 8；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"8 is even, so _n\"\nmsgstr \"8 是偶数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2  = 4；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"4 is even, so _n\"\nmsgstr \"4 是偶数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2  = 2；\"\n\n#: src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"2 is even, so _n\"\nmsgstr \"2 是偶数，因此 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1；并且\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"序列终止。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"编写一个函数，用于计算给定初始 `n` 的考拉兹序列的长度。\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"欢迎\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[元组和数组](../tuples-and-arrays.md)（1 小时）\"\n\n#: src/welcome-day-1-afternoon.md\n#, fuzzy\nmsgid \"[References](./references.md) (55 minutes)\"\nmsgstr \"[引用](../references.md)（50 分钟）\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 35 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"\"\n\"如需详细了解 Rust 中 的模式，请参阅 [模式匹配](../pattern-matching.md)。\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"[类型和值](../types-and-values.md)（55 分钟）\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"如需详细了解 Rust 中的模式，请参阅[模式匹配](../pattern-matching.md)。\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/tuples-and-arrays.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"数组中的元素具有相同的类型 `T`，数组的长度为 `N`，`N` 是一个编译期常量。 需要\"\n\"注意的是数组的长度是它_类型的一部分\\\\_, 这意味着 `[u8; 3]` 和 `[u8; 4]` 在 \"\n\"Rust 中被认为是不同的类型。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"请尝试访问出界数组元素。系统会在运行时检查数组访问。Rust 通常会通过优化消除这\"\n\"些检查，以及使用不安全的 Rust 来避免这些检查。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"我们可以使用字面量来为数组赋值。\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"在主函数中，打印（print）语句使用 `?` 格式请求调试实现。 使用参数 `{}` 打印默\"\n\"认输出，`{:?}` 表示以调试格式输出。 我们也可以不在格式化字符串后面指定变量\"\n\"值，直接使用 `{a}` 和 `{a:?}` 进行输出。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"\"\n\"添加 `#`，比如 `{a:#?}`，会输出“美观打印（pretty printing）” 格式，这种格式可\"\n\"能会更加易读。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"和数组一样，元组也具有固定的长度。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"元组将不同类型的值组成一个复合类型。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"元组中的字段可以通过英文句号加上值的下标进行访问比如：`t.0`, `t.1`。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"`for` 语句支持对数组进行迭代（但不支持元组）。\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"此功能使用了 `IntoIterator` trait，但我们还没有讲到它。\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"这里新增了 `assert_ne!` 宏。此外，还有 `assert_eq!` 和 `assert!` 宏。系统始终\"\n\"会对这些宏进行检查，而像 `debug_assert!` 这样的仅调试变体在发布 build 中不会\"\n\"编译成任何代码。\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"数组可以包含其他数组：\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"每个循环中的“word”是什么类型？\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"使用以上知识，写一个用易读的格式输出矩阵的 `pretty_print` 函数，以及一个对矩\"\n\"阵进行转置（将行和列互换）的 `transpose` 函数：\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"硬编码这两个函数，让它们处理 3 × 3 的矩阵。\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"将下面的代码复制到 <https://play.rust-lang.org/> 并实现上述函数：\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// TODO: remove this when you're done with your implementation.\"\nmsgstr \"// TODO: remove this when you're done with your implementation.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- the comment makes rustfmt add a newline\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transposed: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Slices: &\\\\[T\\\\]](./references/slices.md) (10 minutes)\"\nmsgstr \"[引用](../references.md)（50 分钟）\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Strings](./references/strings.md) (10 minutes)\"\nmsgstr \"\"\n\"如需详细了解 Rust 中 的模式，请参阅 [模式匹配](../pattern-matching.md)。\"\n\n#: src/references.md\n#, fuzzy\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/references.md src/smart-pointers.md src/error-handling.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"引用提供了一种可以访问另一个值但无需对该值负责的方式，也被称为 “借用”。共享引\"\n\"用处于只读状态，且引用的数据无法更改。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"对类型 `T` 的共享引用表示为 `&T`。可以使用 `&` 运算符创建引用值。`*` 运算符\"\n\"会 “解引用”某个引用，并得到该引用值。\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust 会静态禁止悬垂引用：\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"引用被称为 “借用”了其所引用的值，这对于不熟悉指针的学生来说是一个很好的模型：\"\n\"代码可以通过引用来访问值，但原始变量仍然保有对该值的 “所有权”。本课程会在第 \"\n\"3 天详细介绍所有权。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"引用是以指针的形式实现的，其关键优势在于它们可以比其所指的内容小得多。熟悉 C \"\n\"或 C++ 的学生会将引用视为指针。本课程的后续部分将介绍 Rust 如何防止因使用原始\"\n\"指针而导致的内存安全 bug。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"Rust 不会自动为您创建引用，必须始终使用 `&` 符号。\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"Rust 有时会进行自动解引用。比如调用方法 `ref_x.count_ones()` 时，ref_x 会被解\"\n\"引用。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"在本例中，`r` 是可变的，因此可以为其重新赋值 (`r = &b`)。请注意，这会重新绑\"\n\"定 `r`，使其引用其他内容。这与 C++ 不同，在 C++ 中为引用赋值会更改引用的值。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"共享引用不允许修改其所引用的值，即使该值是可变的。请尝试 `*r = 'X'`。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust 会跟踪所有引用的生命周期，以确保它们存在足够长的时间。在安全的 Rust 中不\"\n\"会出现悬空引用。`x_axis` 会返回对 `point` 的引用，但 `point` 会在该函数返回时\"\n\"取消分配，因此不会进行编译。\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"我们会在讲到所有权（ownership）时详细讨论借用（borrow）。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"独占引用（也称为可变引用）允许更改其所引用的值。它们的类型为 `&mut T`。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"“独占模式”表示只有此引用可用于访问该值。在独占引用存在期间，不允许同时存在其\"\n\"他引用（无论是共享引用还是独占引用），并且无法访问引用的值。请尝试在 \"\n\"`x_coord` 处于活动状态时创建 `&point.0` 或更改 `point.0`。\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"注意 `let mut ref_x: &i32` 与 `let ref_x: &mut i32` 之间的区别。第一条语句声\"\n\"明了一个可变引用，所以我们可以修改这个引用所绑定的值；第二条语句声明了一个指\"\n\"向可变变量的引用。\"\n\n#: src/references/slices.md\nmsgid \"Slices\"\nmsgstr \"切片\"\n\n#: src/references/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"切片 (slice) 的作用是提供对集合 (collection) 的视图 (view):\"\n\n#: src/references/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"切片从被切片的类型中借用 (borrow) 数据。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"请思考：如果我们改变 `a[3]`，将会产生怎样的后果？\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"创建切片时，我们借用了 `a` ，并在方括号中标明了起始和结尾下标。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"如果切片的起始下标为 0， Rust 语法允许我们省略起始下标。比如说 `&a[0..a.\"\n\"len()]` 与 `&a[..a.len()]` 是等价的。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"结尾下标也可以用相同方式省略。比如说 `&a[2..a.len()]` 和 `&a[2..]` 是等价的。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"因此，我们可以用 `&a[..]` 来创建包含整个数组的切片。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"切片会从另外一个对象中借用数据。在这个例子中， `a` 必须在其切片存活时保持存活\"\n\"（处于作用域中）。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"关于修改 `a[3]` 的问题可能会引发精彩的讨论。正确答案是：为了保证内存安全，在\"\n\"创建切片后，我们不能通过 `a` 来修改数据。不过我们可以通过 `a` 或者 `s` 来读取\"\n\"数据。我们将会在“借用”章节着重介绍这个内容。\"\n\n#: src/references/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"关于修改“a\\\\[3\\\\]”的问题可能会引发一些有趣的讨论，但正解是，出于内存安全方面\"\n\"的原因，您无法在执行作业的这个时间点通过“a”来进行此修改，但可以从“a”和“s”安全\"\n\"地读取数据。它会在您创建 Slice 之前运作，在“println”之后（不再使用 Slice 时）\"\n\"再次运作。更多详情会在“借用检查器”部分中加以说明。\"\n\n#: src/references/strings.md\nmsgid \"We can now understand the two string types in Rust:\"\nmsgstr \"现在我们就可以理解 Rust 中的两种字符串类型：\"\n\n#: src/references/strings.md\nmsgid \"`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`.\"\nmsgstr \"\"\n\n#: src/references/strings.md\nmsgid \"`String` is an owned, heap-allocated buffer of UTF-8 bytes.\"\nmsgstr \"\"\n\n#: src/references/strings.md src/std-traits/read-and-write.md\n#, fuzzy\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"World\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"b\\\"hello\\\"\"\n\n#: src/references/strings.md src/memory-management/move.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/references/strings.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`\\\"Hello\\\"`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` 引入了一个字符串切片，它是一个指向保存在内存块中的 UTF-8 编码字符串数\"\n\"据的不可变引用。   字符串字面量（`”Hello”`）会保存在程序的二进制文件中。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"Rust's `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Rust 的 `String` 类型是一个字节 vector 的封装。和 `Vec<T>` 一样，它是拥有所有\"\n\"权的。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"和其他类型一样，`String::from()` 会从字符串字面量创建一个字符串；`String::\"\n\"new()` 会创建一个新的空字符串，   之后可以使用 `push()` 和 `push_str()` 方法\"\n\"向其中添加字符串数据。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"`format!()` 宏可以方便地动态生成拥有所有权的字符串。它接受和 `println!()` 相\"\n\"同的格式规范。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"您可以通过 `&` 和范围选择（可选）来从 `String` 借用 `&str` slice。如果选择的\"\n\"字节范围未与字符边界对齐，则表达式会 panic。`chars` 迭代器会迭代字符，比尝试\"\n\"正确获取字符边界更为推荐。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"对于 C++ 程序员：可以把 `&str` 当作 C++ 中的 `const char*`，但是它总是指向内\"\n\"存中的一个有效字符串。   Rust 的 `String` 大致相当于 C++ 中 `std::string` \"\n\"（主要区别：它只能包含 UTF-8 编码的字节，   并且永远不会使用小字符串优化\"\n\"（small-string optimization））。\"\n\n#: src/references/strings.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"字节串可以用于直接创建 `&[u8]` 类型的值：\"\n\n#: src/references/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"原始字符串可在创建 `&str` 时禁用转义：`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`。可以在外层引号\"\n\"两侧添加相同数量的 `#`，以在字符串中嵌入双引号：\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"我们将为三维几何图形创建几个实用函数，将点表示为 `[f64;3]`。函数签名由您自行\"\n\"确定。\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\"\nmsgstr \"/// Calculate the magnitude of the given vector.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\"\nmsgstr \"\"\n\n#: src/references/exercise.md\nmsgid \"// root, like `v.sqrt()`.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\"\nmsgstr \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// coordinates by that magnitude.\"\nmsgstr \"\"\n\n#: src/references/exercise.md\n#, fuzzy\nmsgid \"// Use the following `main` to test your work.\"\nmsgstr \"// Use the following `main` to test your work.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitude of a unit vector: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Calculate the magnitude of the given vector.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\n#, fuzzy\nmsgid \"[Static](./user-defined-types/static.md) (5 minutes)\"\nmsgstr \"[用户定义的类型](../user-defined-types.md)（50 分钟）\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"\"\n\n#: src/user-defined-types.md src/methods-and-traits.md src/borrowing.md\n#: src/lifetimes.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"与 C 和 C++ 一样，Rust 支持自定义结构体：\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"关键点：\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"结构体的运作方式与使用 C 或 C++ 时类似。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"不需要 typedef 即可定义类型，这与使用 C++ 类似，但与使用 C 不同。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"与使用 C++ 不同的是，结构体之间没有继承关系。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"这时可能很适合告诉学员存在不同类型的结构体。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"针对某类型实现 trait 时，可能会使用大小为零的结构体 `e.g., struct Foo;`，但其\"\n\"中没有任何您要储存在值本身中的数据。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"下一张幻灯片将介绍元组结构体，当字段名称不重要时使用。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"如果您已有名称正确的变量，则可以使用简写形式创建结构体：\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"通过语法“..peter”，我们可以从旧结构体复制大部分字段，而无需明确地输入所有字\"\n\"段。它必须始终是最后一个元素。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"如果字段名称不重要，您可以使用元组结构体：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"这通常用于单字段封装容器（称为 newtype）：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Ask a rocket scientist at NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"// ...\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"如需对基元类型中的值的额外信息进行编码，使用 newtype 是一种非常好的方式，例\"\n\"如：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"数字会以某些单位来衡量：上方示例中为 `Newtons`。\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"值在创建时已通过一些验证，因此您不再需要在每次使用时都再次验证它：\"\n\"`PhoneNumber(String)` 或 `OddNumber(u32)`。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"展示如何通过访问 newtype 中的单个字段，将 `f64` 值添加到 `Newtons` 类型。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"Rust 通常不喜欢不明确的内容，例如自动解封或将布尔值用作整数。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"运算符过载在第 3 天（泛型）讨论。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"此示例巧妙地引用了[火星气候探测者号](https://zh.wikipedia.org/wiki/\"\n\"%E7%81%AB%E6%98%9F%E6%B0%A3%E5%80%99%E6%8E%A2%E6%B8%AC%E8%80%85%E8%99%9F) 的\"\n\"失败事故。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"`enum` 关键字允许创建具有几个 不同变体的类型：\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Simple variant\"\nmsgstr \"// Simple variant\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Tuple variant\"\nmsgstr \"// Tuple variant\\n\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"// Struct variant\"\nmsgstr \"// Struct variant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"On this turn: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"枚举允许你从一种类型下收集一组值\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"PlayerMove 会显示三种类型的变体。Rust 还会存储判别标识，以便在运行时确定值中\"\n\"包含哪个变体。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"这可能是比较结构体和枚举的好时机：\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"在这两者中，你可以获得一个不含字段的简单版本（单位结构体），或一个包含不同类\"\n\"型字段的版本（变体载荷）。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"你甚至可以使用单独的结构体实现枚举的不同变体，但这样一来，如果它们都已在枚举\"\n\"中定义，类型与之前也不一样。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust 使用最小的空间来存储判标识。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"如有必要，它会存储所需最小大小的整数\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"如果允许的变体值未涵盖所有位模式，则它将使用无效的位模式对判别标识进行编码\"\n\"（“小众优化”）。例如，`Option<&u8>` 存储的要么是指向整数的指针，要么是 \"\n\"`None` 变体的 `NULL` 值。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"你可以根据需要控制判别（例如，与 C 的兼容性）：\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"如果不使用 `repr`，判别类型会占用 2 个字节，因为 10001 是一个 2 个字节的数\"\n\"值。\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"探索更多\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"Rust 具有多种优化措施，可以减少枚举占用的空间。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"Null 指针优化：对于[某些 类型](https://doc.rust-lang.org/std/option/\"\n\"#representation)，Rust 保证 `size_of::<T>()` 等效于 `size_of::\"\n\"<Option<T>>()`。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"如果你想展示位表示方式在实践中“可能”会是什么样子，请参考示例代码。 请务必注\"\n\"意，编译器对此表示法不提供任何保证，因此这是完全不安全的。\"\n\n#: src/user-defined-types/static.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"静态变量在程序的整个执行过程中始终有效，因此不会移动：\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"欢迎来到第一天\"\n\n#: src/user-defined-types/static.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"正如 [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html) 中所述，这些变量在使用时并不是内联的，而且还具有实际相关联的内存位置。\"\n\"这对于不安全的嵌入式代码是有用的，并且这些变量存在于整个程序的执行过程之中。\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"`static` is similar to mutable global variables in C++.\"\nmsgstr \"另一方面，`static` 远远更类似于C++中的 `const` 或可改变的全局变量。\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"“static”提供对象标识：内存中的一个地址及具有内部可变性的类型（如“Mutex\\n\"\n\"\\n\"\n\"”）所需的状态。\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"由于“static”变量可从任何线程访问，因此它们必须是“Sync”。内部可变性可通过[“互\"\n\"斥量”](https://doc.rust-lang.org/std/sync/struct.Mutex.html)、原子性或类似对\"\n\"象实现。也可能具有可变静态项，但它们需要手动同步，因此对它们的任何访问都需\"\n\"要“unsafe”代码。我们将在“不安全 Rust”章节中探讨[可变静态项](../unsafe/\"\n\"mutable-static-variables.md)。\"\n\n#: src/user-defined-types/static.md\n#, fuzzy\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"可以使用宏“std::thread_local”创建“thread_local”数据。\"\n\n#: src/user-defined-types/const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"\"\n\"Constants are evaluated at compile time and their values are inlined \"\n\"wherever they are used:\"\nmsgstr \"系统会在编译时对常量变量进行求值；无论在何处使用，其值都会被内嵌：\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"根据 [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html) 这些变量在使用时是内联 (inlined) 的。\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"在编译时只能调用标记为“const”的函数以生成“const”值。不过，可在运行时调\"\n\"用“const”函数。\"\n\n#: src/user-defined-types/const.md\n#, fuzzy\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`\"\nmsgstr \"值得一提的是，`const` 在语义上与C++的 `constexpr` 类似。\"\n\n#: src/user-defined-types/const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"虽然需要使用在运行中求值的常量的情况并不是很常见，但是它是有帮助的，而且比使\"\n\"用静态变量更安全。\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"类型别名为另一种类型创建名称。这两种类型可以互换使用。\"\n\n#: src/user-defined-types/aliases.md\n#, fuzzy\nmsgid \"// Aliases are more useful with long, complex types:\"\nmsgstr \"// Aliases are more useful with long, complex types:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"C 语言程序员会认为这类似于 `typedef`。\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"我们将创建一个数据结构来表示电梯控制系统中的事件。您可以自行定义用于构造各种\"\n\"事件的类型和函数。使用 `#[derive(Debug)]` 以允许通过 `{:?}` 设置类型格式。\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"此次练习只需创建数据结构。本课程的下一部分将介绍如何从这些结构中获取数据。\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\n\n#: src/user-defined-types/exercise.md\n#, fuzzy\nmsgid \"// TODO: add required variants\"\nmsgstr \"// Tuple variant\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// A direction of travel.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// The car has arrived on the given floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// The car doors have opened.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// The car doors have closed.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// A floor button was pressed in the elevator car.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"The car door opened: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"The car door closed: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// A button was pressed.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// The car has arrived at the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// The car's doors have opened.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// The car's doors have closed.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// A floor is represented as an integer.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// A user-accessible button.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// A button in the elevator lobby on the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// A floor button within the car.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"欢迎来到第二天\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"现在我们已经了解了相当多的Rust，接下来我们将学习：\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"模式匹配：解构枚举、结构体和数组（array）。\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"方法：将函数与类型相关联。\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"特征：多个类型所共有的行为。\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"泛型：对其他类型进行类型参数化。\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"标准库类型和特征：探索 Rust 丰富的标准库。\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"如需详细了解 Rust 中的模式，请参阅[模式匹配](../pattern-matching.md)。\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Methods and Traits](./methods-and-traits.md) (50 minutes)\"\nmsgstr \"[方法和特征](../methods-and-traits.md)（45 分钟）\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 55 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"如需详细了解 Rust 中的模式，请参阅[模式匹配](../pattern-matching.md)。\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/pattern-matching.md src/memory-management.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"使用关键词 `match` 对一个值进行模式匹配。进行匹配时，会从上至下依次进行比较，\"\n\"并选定第一个匹配成功的结果。\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"模式（pattern）可以是简单的值，其用法类似于 C 与 C++ 中的 `switch` 。\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\\\"Quitting\\\"\"\n\n#: src/pattern-matching/match.md src/generics/exercise.md\n#: src/generics/solution.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\\\"Moving around\\\"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\\\"Number input\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\\\"Lowercase: {key}\\\"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\\\"Something else\\\"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\"`_` 模式是与任何值匹配的通配符模式。表达式 _必须_ 不可反驳，即其涵盖了所有可\"\n\"能性，因此通常将 `_` 用作最终的万能符。\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"与 `if let` 类似，每个匹配分支必须有相同的类型。该类型是块的最后一个 表达式\"\n\"（如有）。在上例中，类型是 `()`。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"模式中的变量（本例中为 `key`）将创建一个可在匹配分支内使用的绑定。\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"只有当条件为真时，保护语句才能使分支匹配成功。\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"\"\n\"你可以解释一些用于表达模式的特殊字符的用法 \\\\*`|` 表示或 (or) \\\\*`..` 可以展\"\n\"开为任意一个或多个值 \\\\*`1..=5` 代表了一个闭区间范围\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`|` as an `or`\"\nmsgstr \"\"\n\"解释模式匹配中的绑定的原理可能会很有帮助。比如可以用一个变量替代外卡，或者去\"\n\"除 `q` 外面的引号。\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"你可以展示如何匹配一个引用。\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"\"\n\"现在是一个讲解不可反驳 (irrefutable) 模式的好时机。因为这个术语可能会出现在错\"\n\"误信息中。\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"“\\\\_”是通配符\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"有些想法比模式本身所允许的程度更加复杂，如果我们希望简要地表达这些想法，就必\"\n\"须把匹配守卫视为独立的语法功能。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"它们与匹配分支中的单独“if”表达式不同。选择匹配分支后，分支块内（在“=>”之后）\"\n\"会出现“if”表达式。如果该分支块内的“if”条件失败，系统不会考虑原始“match”表达式\"\n\"的其他分支。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"只要表达式在包含“|”的模式中，就会适用守卫定义的条件。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"与元组一样，结构体和枚举也可以通过匹配方式进行解构：\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"结构体\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, other fields were ignored\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"模式还可用于将变量绑定到值的某些部分。这是您检查类型结构的方式。我们先从简单\"\n\"的“enum”类型开始：\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"cannot divide {n} into two equal parts\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} divided in two is {half}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"sorry, an error happened: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"在这里，我们使用了分支来解构“Result”值。在第一个分支中，“half”被绑定到“Ok”变\"\n\"体中的值。在第二个分支中，“msg”被绑定到错误消息。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"更改“foo”中的字面量值以与其他模式相匹配。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"向“Foo”添加一个新字段，并根据需要更改模式。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"捕获和常量表达式之间的区别可能很难发现。尝试将第二个分支中的“2”更改为一个变\"\n\"量，可以看到它几乎无法运作了。将它更改为“const”，可以看到它又正常运作了。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"“if”/“else”表达式将返回一个枚举，该枚举之后会使用“match”进行解封装。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"您可以尝试在枚举定义中添加第三个变体，并在运行代码时显示错误。指出代码现在有\"\n\"哪些地方还不详尽，并说明编译器会如何尝试给予提示。\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"枚举变体中的值只有在被模式匹配后，才可访问。模式将引用绑定到 `=>` 之后\"\n\"的“match 分支”中的字段。\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"展示搜索不详尽时会发生的情况。请注意 Rust 编译器的优势，即确认所有情况何时都\"\n\"得到了处理。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"Rust 有几个与其他语言不同的控制流结构。它们用于模式匹配：\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"`if let` 表达式\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`while let` expressions\"\nmsgstr \"while let 表达式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"`match` 表达式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[`if let` 表达式](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions) 能让你根据某个值是否与模式相匹配来执行不同的代码：\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"slept for {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"`let else` expressions\"\nmsgstr \"while let 表达式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"如需了解匹配模式并从函数返回的常见情况，请使用 [`let else`](https://doc.rust-\"\n\"lang.org/rust-by-example/flow_control/let_else.html)。\\\"else\\\" 分支必须执行不\"\n\"同的结束方式（例如，`return`、`break` 或 `panic`，但不能直接执行到代码块的末\"\n\"尾）。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"got None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"got empty string\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"not a hex digit\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"与 `if let` 一样，[`while let`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#predicate-pattern-loops) 变体会针对一个模式重复测\"\n\"试一个值：\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"在这里，每次 调用 `next()` 时，`v.iter()` 返回的迭代器都会返回一个 \"\n\"`Option<i32>`。它将一直返回 `Some(x)`，直到完成。 之后它将返回 `None`。\"\n\"`while let`能让我们持续迭代所有项。\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"与 `match` 不同的是，`if let` 不支持模式匹配的 guard 子句。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"使用 `Option` 时，常见的做法是处理 `Some` 值。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"与 `match` 不同的是，`if let` 不支持模式匹配的 guard 子句。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"`if-let` 可以堆叠使用，如下所示。`let-else` 结构支持展平此嵌套代码。将不通顺\"\n\"的版本重写，以便学生们能够理解其中的变化。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"重写后的版本为：\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"指出只要值与模式匹配，`while let` 循环就会一直进行下去。\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"你可以使用 if 语句将 `while let` 循环重写为无限循环，当 `iter.next()` 没有值\"\n\"可以解封时中断。`while let` 为上述情况提供了语法糖。\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"为算术表达式编写一个简单的递归评估器。先从定义二进制操作的枚举开始：\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"这里的 `Box` 类型是智能指针，本课程稍后会详细介绍。可以使用 `Box::new` 对表达\"\n\"式进行 “封装”操作，如测试中所示。如需对已封装的表达式求值，请使用 deref 运算\"\n\"符将其 “解封装”：`eval(*boxed_expr)`。\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"部分表达式无法求值，将返回错误。`Res` 类型表示有效值或错误消息。这与我们后面\"\n\"将看到的标准库的“Result”非常类似。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"将代码复制粘贴到 Rust Playground，然后开始实现 `eval`。最终结果应能通过测试。\"\n\"使用 `todo!()` 并使测试逐个通过可能会很有帮助。您还可以使用 `#[ignore]` 暂时\"\n\"跳过测试：\"\n\n#: src/pattern-matching/exercise.md\n#, fuzzy\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"如果提前完成测试，请尝试编写一项可导致被零除或整数溢出的测试。如何使用 `Res::\"\n\"Err` 而非 panic 来应对这种情况？\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// An operation to perform on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// An expression, in tree form.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// An operation on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// A literal value\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"division by zero\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Traits](./methods-and-traits/traits.md) (15 minutes)\"\nmsgstr \"\"\n\"如需详细了解 Rust 中 的模式，请参阅[模式匹配](../pattern-matching.md)。\"\n\n#: src/methods-and-traits.md\n#, fuzzy\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"\"\n\"如需详细了解 Rust 中 的模式，请参阅[模式匹配](../pattern-matching.md)。\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"Rust 允许您将函数与新类型相关联。您可以使用“impl”块来执行此操作：\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// No receiver, a static method\"\nmsgstr \"// No receiver, a static method\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive borrowed read-write access to self\"\nmsgstr \"// Exclusive borrowed read-write access to self\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Shared and read-only borrowed access to self\"\nmsgstr \"// Shared and read-only borrowed access to self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Recorded {} laps for {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Lap {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// Exclusive ownership of self\"\nmsgstr \"// Exclusive ownership of self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Race {} is finished, total lap time: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Monaco Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"// race.add_lap(42);\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"上面的“&self”表明该方法以不可变的方式借用了对象。还有其他可能的方法接收器：\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"“&self”：使用不可变的共享引用从调用方借用对象。之后可以再次使用该对象。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"“&mut self”：使用唯一的可变引用从调用方借用对象。之后可以再次使用该对象。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"“self”：获取对象的所有权并将其从调用方移出。该方法会成为对象的所有者。除非明\"\n\"确转移对象的所有权，否则在该方法返回时，对象将被丢弃（取消分配）。具备完全所\"\n\"有权，不自动等同于具备可变性。\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`：同上，但该方法可以改变对象。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"无接收器：这将变为结构体上的静态方法。通常用于创建构造函数，按惯例被称\"\n\"为“new”。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"引入方法时，将方法与函数进行比较会很有帮助。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"在某种类型（例如结构体或枚举）的实例上调用方法，第一个参数将该实例表示\"\n\"为“self”。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"开发者可能会选择使用方法，以便利用方法接收器语法并让方法更有条理。通过使用方\"\n\"法，我们可以将所有实现代码保存在一个可预测的位置。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"指出关键字“self”的用法，它是一种方法接收器。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"显示它是“self: Self”的缩写术语，或许要显示结构体名称的可能用法。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"说明“Self”是“impl”块所属类型的类型别名，可以在块中的其他位置使用。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"指出“self”的使用方式与其他结构体一样，并且可以使用点表示法来指代各个字段。\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"这可能是演示“&self”和“self”差别的好时机，您只要修改代码并尝试执行 say_hello \"\n\"两次即可。\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"除“self”的变体外，还可以将[特殊封装容器类型](https://doc.rust-lang.org/\"\n\"reference/special-types-and-traits.html)作为接收器类型，例如“Box\\n\"\n\"\\n\"\n\"”。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"Rust 让您可以依据特征对类型进行抽象化处理。特征与接口类似：\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Return a sentence from this pet.\"\nmsgstr \"// Re-export types from this module.\\n\"\n\n#: src/methods-and-traits/traits.md\n#, fuzzy\nmsgid \"/// Print a string to the terminal greeting this pet.\"\nmsgstr \"/// The car has arrived on the given floor.\\n\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"trait 定义了类型实现该 trait 所必须具备的一些方法。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Woof, my name is {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"trait 在 `<type> { .. } 的 impl <trait>` 代码块中实现。\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\"trait 或许可指定预实现（默认）方法，以及用户需要自行实现的方法。具有默认实现\"\n\"的方法可以依赖于必需的方法。\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"A trait can require that types implementing it also implement other traits, \"\n\"called _supertraits_. Here, any type implementing `Pet` must implement \"\n\"`Animal`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\n#, fuzzy\nmsgid \"\\\"{} has {} legs\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/methods-and-traits/traits/supertraits.md\nmsgid \"\"\n\"This is sometimes called \\\"trait inheritance\\\" but students should not \"\n\"expect this to behave like OO inheritance. It just specifies an additional \"\n\"requirement on implementations of a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are placeholder types which are supplied by the trait \"\n\"implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\n#: src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"系统可以自动为您的自定义类型实现支持的 trait，如下所示：\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Default trait adds `default` constructor.\"\nmsgstr \"// Default trait adds `default` constructor.\\n\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Clone trait adds `clone` method.\"\nmsgstr \"// Clone trait adds `clone` method.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"// Debug trait adds support for printing with `{:?}`.\"\nmsgstr \"// Debug trait adds support for printing with `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} vs. {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"派生功能是通过宏实现的，并且许多 crate 提供有用的派生宏，以添加实用功能。例\"\n\"如，`serde` 可以使用 `#[derive(Serialize)]` 为结构体派生序列化支持。\"\n\n#: src/methods-and-traits/exercise.md\n#, fuzzy\nmsgid \"Exercise: Logger Trait\"\nmsgstr \"练习：通用日志\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\n#, fuzzy\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"uhoh\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust 支持泛型，允许您根据算法（例如排序）中使用的类型对算法进行抽象化处理。\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\"\nmsgstr \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"picked a number: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"picked a tuple: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"Rust 会根据参数类型和返回值推理出 T 的类型。\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"这与 C++ 模板类似，但 Rust 会立即编译部分通用函数，因此该函数必须对所有符合约\"\n\"束条件的类型都有效。例如，请尝试修改 `pick` 函数，如果 `n == 0`，则返回 \"\n\"`even + odd`。即使仅使用带有整数的“pick”实例化，Rust 仍会将其视为无效。C++ 可\"\n\"让您做到这一点。\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"这是零成本的抽象化处理：您得到的结果不会受到影响，也就是说，与在没有进行抽象\"\n\"化处理的情况下，对数据结构进行手动编码时的结果一样。\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"您可以使用泛型对具体字段类型进行抽象化处理：\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} and {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"\"\n\"\\\\*问：\\\\*为什么 `T` 在 `impl<T> Point<T> {}` 中指定了两次？这不是多余的吗？\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"这是因为它是泛型类型的泛型实现部分。它们是独立的泛型内容。\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"这意味着这些方法是针对所有 `T` 定义的。\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"可以编写 `impl Point<u32> { .. }`。\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"`Point` 依然是一个泛型，并且您可以使用 `Point<f64>`，但此块中的方法将仅适用\"\n\"于 `Point<u32>`。\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"请尝试声明一个新变量 `let p = Point { x: 5, y: 10.0 };`。通过使用两种类型变量\"\n\"（例如 `T` 和 `U`），更新代码以允许具有不同类型元素的点。\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Traits can also be generic, just like types and functions. A trait's \"\n\"parameters get concrete types when it is used.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from integer: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"Converted from bool: {from}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\\\"{from_int:?}, {from_bool:?}\\\"\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"The `From` trait will be covered later in the course, but its [definition in \"\n\"the `std` docs](https://doc.rust-lang.org/std/convert/trait.From.html) is \"\n\"simple.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Implementations of the trait do not need to cover all possible type \"\n\"parameters. Here, `Foo::From(\\\"hello\\\")` would not compile because there is \"\n\"no `From<&str>` implementation for `Foo`.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"Generic traits take types as \\\"input\\\", while associated types are a kind of \"\n\"\\\"output\\\" type. A trait can have multiple implementations for different \"\n\"input types.\"\nmsgstr \"\"\n\n#: src/generics/generic-traits.md\nmsgid \"\"\n\"In fact, Rust requires that at most one implementation of a trait match for \"\n\"any type T. Unlike some other languages, Rust has no heuristic for choosing \"\n\"the \\\"most specific\\\" match. There is work on adding this support, called \"\n\"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"使用泛型时，您通常会想要利用类型来实现某些特性， 这样才能调用此特征的方法。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"您可以使用 `T: Trait` 或 `impl Trait` 执行此操作：\"\n\n#: src/generics/trait-bounds.md\n#, fuzzy\nmsgid \"// struct NotClonable;\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"请尝试创建一个 `NonClonable` 对象，并将其传递给 `duplicate` 函数。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"当需要多个 trait 时，请使用 `+` 将它们连接起来。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"显示 `where` 子句，学员在阅读代码时会看到它。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"它会在您有多个形参的情况下整理函数签名。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"它具有额外功能，因此也更强大。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"如果有人提问，便阐明额外功能是指“:”左侧的类别可为任意值，例如 `Option<T>`。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"请注意，Rust 尚不支持专精领域认证。例如，根据原始 `duplicate` 函数，添加专精\"\n\"领域认证的 `Duplicate(a: u32)` 是无效的。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"与特征边界类似，`impl Trait` 语法可以在函数形参 和返回值中使用：\"\n\n#: src/generics/impl-trait.md\nmsgid \"// Syntactic sugar for:\"\nmsgstr \"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\"\nmsgstr \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"`impl Trait` 的意义因使用位置而略有不同。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"对形参来说，`impl Trait` 就像是具有特征边界的匿名泛型形参。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"对返回值类型来说，它则意味着返回值类型就是实现该特征的某具体类型， 无需为该类\"\n\"型命名。如果您不想在公共 API 中公开该具体类型，便可 使用此方法。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"在返回位置处进行推断有一定难度。会返回 `impl Foo` 的函数会挑选 自身返回的具体\"\n\"类型，而不必在来源中写出此信息。会返回 泛型类型（例如 `collect<B>() -> B`）的\"\n\"函数则可返回符合 `B` 的任何类型，而调用方可能需要选择一个类型，例如使用 `let \"\n\"x: Vec<_> = foo.collect()` 或使用以下 Turbofish：`foo.collect::<Vec<_>>()`。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"`debuggable` 是什么类型？尝试输入 `let debuggable: () = ..`，查看会显示什么错\"\n\"误消息。\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using the [`Ord`](https://doc.rust-\"\n\"lang.org/stable/std/cmp/trait.Ord.html) trait.\"\nmsgstr \"\"\n\"在这个简短的练习中，您将使用 `LessThan` trait，实现一个通用 `min` 函数，用于\"\n\"确定两个值中的最小值。\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"// TODO: implement the `min` function used in `main`.\"\nmsgstr \"// TODO: implement the `min` function used in `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"'7'\"\nmsgstr \"'x'\"\n\n#: src/generics/exercise.md src/generics/solution.md\n#, fuzzy\nmsgid \"'1'\"\nmsgstr \"'x'\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"goodbye\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"bat\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"armadillo\\\"\"\nmsgstr \"\"\n\n#: src/generics/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord.\"\n\"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum.\"\n\"Ordering.html) enum.\"\nmsgstr \"\"\n\"[“OsStr”](https://doc.rust-lang.org/std/ffi/struct.OsStr.html)和[“OsString”]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/welcome-day-2-afternoon.md\n#, fuzzy\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[标准库类型](../std-types.md)（1 小时 10 分钟）\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-types.md\n#, fuzzy\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/std-types.md\nmsgid \"This segment should take about 1 hour and 20 minutes\"\nmsgstr \"\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"对于本部分的每张幻灯片，请花些时间仔细阅读文档页面，重点了解一些较为常用的方\"\n\"法。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust 附带一个标准库，此库有助于建立一个供 Rust 库和程序 使用的常用类型集。这\"\n\"样一来，两个库便可顺畅地搭配运作， 因为它们使用相同的 `String` 类型。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"Rust 实际上含有多个层级的标准库，分别是 `core`、`alloc` 和 `std`。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` 包括最基本的类型与函数，这些类型与函数不依赖于 `libc`、分配器 或是否存\"\n\"在操作系统。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"`alloc` 包括需要全局堆分配器的类型，例如 `Vec`、`Box` 和 `Arc`。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"嵌入式 Rust 应用通常只使用 `core`，偶尔会使用 `alloc`。\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust 附带有大量关于该语言和标准库的文档。\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"如果你想提前退出循环，请使用 [`break`](https://doc.rust-lang.org/reference/\"\n\"expressions/loop-expr.html#break-expressions)，\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"['u8'](https://doc.rust-lang.org/stable/std/primitive.u8.html) 等基元类型。\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[“str”](https://doc.rust-lang.org/std/primitive.str.html)和[“String”]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"事实上，您可以为自己的代码编写文档：\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second argument.\"\nmsgstr \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\n\n#: src/std-types/docs.md src/testing/other.md\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"///\"\nmsgstr \"//\\n\"\n\n#: src/std-types/docs.md\nmsgid \"/// If the second argument is zero, the result is false.\"\nmsgstr \"\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"文档的内容会被当做 Markdown 处理。所有已发布 Rust 库 crate 都会自动被\"\n\"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) 工具在 \"\n\"[`docs.rs`](https://docs.rs)存档。 按照这种方式来为 API 中的所有公开项编写文\"\n\"档是 Rust 中惯用的做法。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"如需从项内（例如在模块内）为项编写文档，请使用 `//!` 或 `/*! .. */`，这称\"\n\"为“内部文档注释”：\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of integers.\"\nmsgstr \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"向学生展示在 [`docs.rs/rand`](https://docs.rs/rand) 中为 `rand` crate 生成的\"\n\"文档。\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"异常\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"我们已经了解了 `Option<T>` 的一些用法。它可以存储“T”类型的值，或者不存储任何\"\n\"值。例如，['String::find'](https://doc.rust-lang.org/stable/std/string/\"\n\"struct.String.html#method.find) 会返回 `Option<usize>`。\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find returned {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Character not found\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"`Option` 和 `Result` 的使用范围很广，不局限于标准库。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` 会返回 `Option` 或 panic 中的值。`expect` 方法与此类似，但其使用错误\"\n\"消息。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"出现 None 时您或许会恐慌，但不能 “无意中”忘记检查是否为 None 的情况。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"在草拟阶段的编程中，频繁使用 `unwrap`/`expect` 进行处理十分常见，但在正式版代\"\n\"码时，通常以更为妥当的方式处理 `None` 的情况。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"小众优化意味着 `Option<T>` 在内存中的大小通常与 `T` 相同。\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"Result\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` 与 `Option` 相似，但表示操作成功或失败，且每个操作的类型不同。这类似\"\n\"于表达式练习中定义的 `Res`，但是一个泛型：`Result<T, E>`，其中 `T` 用于 `Ok` \"\n\"变体，`E` 出现在 `Err` 变体中。\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Could not read file content\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"The diary could not be opened: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"与 `Option` 方法相同，成功值位于 `Result` 方法内部， 开发者必须显示提取成功\"\n\"值。因此，建议进行错误检查。在绝不应出现错误的情况下， 可以调用 `unwrap()` \"\n\"或 `expect()` 方法，这也是一种开发者意向信号。\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"我们建议阅读 `Result` 文档。虽然课程中不会涉及该文档，但是有必要提到它。 该文\"\n\"档中包含许多便捷的方法和函数，对于函数式编程很有帮助。\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 4.\"\nmsgstr \"`Result` 是用于实现错误处理的标准类型，我们将在第 3 天的课程中介绍。\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) 是标准堆\"\n\"分配的可扩容 UTF-8 字符串缓冲区：\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\n#, fuzzy\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hello\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, number of chars = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` 会实现 [`Deref<Target = str>`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#deref-methods-str)，这意味着您可以 对 `String` 调用所有 \"\n\"`str` 方法。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"“String::new”会返回一个新的空字符串，如果您知道自己想要推送到字符串的数据量，\"\n\"请使用“String::with_capacity”。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"“String::len”会返回“String”的大小（以字节为单位，可能不同于以字符为单位的长\"\n\"度）。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"“String::chars”会针对实际字符返回一个迭代器。请注意，由于[字素簇](https://\"\n\"docs.rs/unicode-segmentation/latest/unicode_segmentation/struct.Graphemes.\"\n\"html)，“char”可能与人们所认为的“字符”有所不同。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"当人们提到字符串时，可能是指“&str”或“String”。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"当某个类型实现“Deref\\\\<Target = T>”时，编译器会让您以公开透明方式从“T”调用方\"\n\"法。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"我们尚未讨论过 `Deref` trait，所以本部分目前主要介绍文档中边栏的结构。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"“String”会实现“Deref\\\\<Target = str>”，后者可公开透明地授予其访问“str”方法的\"\n\"权限。\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"写下并比较“let s3 = s1.deref();”和“let s3 = &\\\\*s1;”。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"“String”是作为字节矢量的封装容器实现的，矢量上支持的许多操作在“String”上也受\"\n\"支持，但有一些额外保证。\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"比较将“String”编入索引的不同方式：\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"使用“s3.chars().nth(i).unwrap()”转换为字符，其中“i”代表是否出界。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"\"\n\"通过使用“s3\\\\[0..4\\\\]”转换为子字符串，其中该 Slice 在或不在字符边界上。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) 是标准的可调整大小\"\n\"堆分配缓冲区：\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Canonical macro to initialize a vector with elements.\"\nmsgstr \"// Canonical macro to initialize a vector with elements.\\n\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Retain only the even elements.\"\nmsgstr \"// Retain only the even elements.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"// Remove consecutive duplicates.\"\nmsgstr \"// Remove consecutive duplicates.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` 会实现 [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D)，这意味着您可以对 `Vec` 调用 slice 方\"\n\"法。\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"“Vec”以及“String”和“HashMap”都是一种集合。它包含的数据会存储在堆上。这意味着\"\n\"在编译时不需要知道数据量。它可以在运行时增大或缩小。\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"请注意，“Vec\\n\"\n\"\\n\"\n\"”也是一种泛型，但您不必明确指定“T”。和往常的 Rust 类别推断一样，系统会在第一\"\n\"次“push”调用期间建立“T”。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"“vec![...\\\\]”是用来代替“Vec::new()”的规范化宏，它支持向矢量添加初始元素。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"如需将矢量编入索引，您可以使用“\\\\[’ ‘\\\\]”方法，但如果超出边界，矢量将会 \"\n\"panic。此外，使用“get”将返回“Option”。“pop”函数会移除最后一个元素。\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"第 3 天会介绍 slice。目前，学生只需知道使用 `Vec` 类型的值也可访问所有已载明\"\n\"的只读 slice 方法。\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"标准的哈希映射，内含针对 HashDoS 攻击的保护措施：\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Adventures of Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms' Fairy Tales\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Pride and Prejudice\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"We know about {} books, but not Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice's Adventure in Wonderland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} pages\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} is unknown.\\\"\"\n\n#: src/std-types/hashmap.md\n#, fuzzy\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\"\nmsgstr \"// Use the .entry() method to insert a value if nothing is found.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"“HashMap”未在序言中定义，因此需要纳入范围中。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"请尝试使用以下代码行。第一行将查看图书是否在 hashmap 中；如果不在，则返回替代\"\n\"值。如果未找到图书，第二行会在 hashmap 中插入替代值。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"遗憾的是，与“vec!”不同，不存在标准的“hashmap!”宏。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"不过，从 Rust 1.56 开始，HashMap 实现了[“From\\\\<\\\\[(K, V); N\\\\]\\\\>”](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E)，让我们能够轻松\"\n\"地从字面量数组初始化哈希映射：\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"或者，HashMap 也可以基于任何可生成键-值元组的“Iterator”进行构建。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"我们要展示“HashMap\\\\<String, i32>”，避免将“&str”用作键，以便简化示例。当然，\"\n\"可以在集合中使用引用，但可能会导致借用检查器出现复杂问题。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"尝试从上述示例中移除“to_string()”，看看它是否仍可编译。您认为我们可能会在哪些\"\n\"方面遇到问题？\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"此类型具有几种特定于方法的返回值类型，例如“std::collections::hash_map::\"\n\"Keys”。这些类型通常会出现在 Rust 文档的搜索结果中。向学员展示此类型的文档，以\"\n\"及指向“keys”方法的实用链接。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"在本练习中，您将学习一个非常简单的数据结构，并将其变成泛型的。该结构使用 \"\n\"[`std::collections::HashMap`](https://doc.rust-lang.org/stable/std/\"\n\"collections/struct.HashMap.html) 来跟踪已经出现过的值以及每个值出现的次数。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"`Counter` 的初始版本经过硬编码，仅适用于 `u32` 值。使结构体及其方法可用于所跟\"\n\"踪的值类型，以便 `Counter` 能够跟踪任何类型的值。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"如果提前完成操作，请尝试使用 [`entry`](https://doc.rust-lang.org/stable/std/\"\n\"collections/struct.HashMap.html#method.entry) 方法将哈希查找次数减半，从而实\"\n\"现 `count` 方法。\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\"\nmsgstr \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"/// Create a new Counter.\"\nmsgstr \"/// Create a new Counter.\\n\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"/// Count an occurrence of the given value.\"\nmsgstr \"/// Count an occurrence of the given value.\\n\"\n\n#: src/std-types/exercise.md\n#, fuzzy\nmsgid \"/// Return the number of times the given value has been seen.\"\nmsgstr \"/// Return the number of times the given value has been seen.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"saw {} values equal to {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"apple\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"orange\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"got {} apples\\\"\"\n\n#: src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\n\n#: src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Create a new Counter.\\n\"\n\n#: src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Count an occurrence of the given value.\\n\"\n\n#: src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Return the number of times the given value has been seen.\\n\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"与标准库类型一样，请花些时间仔细阅读每个 trait 的文档。\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"此部分内容较长。中途可休息一下。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"这些 trait 支持在值之间进行比较。对于包含实现这些 trait 的字段，可以派生所有\"\n\"这些 trait。\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` 和 `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` 指部分等价关系，其中包含必需的方法 `eq` 和提供的方法 `ne`。`==` \"\n\"和 `!=` 运算符会调用这些方法。\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` 指完全等价关系（具有自反性、对称性和传递性），并且隐含了 `PartialEq`。需\"\n\"要完全等价的函数将使用 `Eq` 作为特征边界。\"\n\n#: src/std-traits/comparisons.md\n#, fuzzy\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` 和 `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` 定义了使用 `partial_cmp` 方法的部分排序。它用于实现 `<`、`<=`、\"\n\"`>=` 和 `>` 运算符。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` 是总排序，其中 `cmp` 返回 `Ordering`。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"`PartialEq` 可以在不同类型之间实现，但 `Eq` 不能，因为它具有自反性：\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"在实践中，派生这些 trait 很常见，但很少会实现它们。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"运算符重载是通过 [`std::ops`](https://doc.rust-lang.org/std/ops/index.html) \"\n\"中的特征实现的：\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"讨论点：\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"您可以针对 `&Point` 实现 `Add`。此做法在哪些情况下可派上用场？\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"回答：`Add:add` 会耗用 `self`。如果您的运算符重载对象 （即类型 `T`）不是 \"\n\"`Copy`，建议您也为 `&T` 重载运算符。这可避免调用点上存在不必要的 克隆任务。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"为什么 `Output` 是关联类型？可将它用作该方法的类型形参吗？\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"简答：函数类型形参是由调用方控管，但 `Output` 这类关联类型则由特征实现人员 控\"\n\"管。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"您可以针对两种不同类型实现 `Add`，例如， `impl Add<(i32, i32)> for Point` 会\"\n\"向 `Point` 中添加元组。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\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\"转换：\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\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\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"这就是为什么通常只需实现 `From`，因为您的类型也会实现 `Into`。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"若要声明某个函数实参输入类型（例如“任何可转换成 `String` 的类型”），规则便会\"\n\"相反，此时应使用 `Into`。 您的函数会接受可实现 `From` 的类型，以及那些仅实现 \"\n\"`Into` 的类型。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust 没有隐式类型转换，但支持使用 `as` 进行显式转换。转换写法通常和 C 语言的\"\n\"写法相一致。\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"as u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"as i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"as u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"使用 `as` 的结果在 Rust 中 _始终_ 定义明确，并且在不同平台上保持一致。这可能\"\n\"和您对于更改符号或转换为更小类型的直观理解不一样。为清晰起见，请查看文档和注\"\n\"释。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"使用 `as` 进行类型转换是一种快捷好用但容易出错的方法，也在未来进行代码更新\"\n\"时，比如改变了类型或类型范围时会导致潜伏的 Bug。 类型转换最好是用于明确是要进\"\n\"行无条件截取（比如截取低位的 `u64` 为 `u32`，忽略高位的数值）。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"对于绝对不会出错的转换（比如 `u32` 转 `u64`），相比 `as`，更推荐用 `From` 或 \"\n\"`Into` 以肯定该转换是不会出错的。对于可能出错的转换，如果你想对这些不能成功转\"\n\"换的情况有不同处理方案时，可以考虑 `TryFrom` 和 `TryInto`。\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"请在这张幻灯片之后休息一下。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` 类似于 C++ 静态类型转换。通常不建议在可能丢失数据的情况下使用 `as`，或者\"\n\"至少应该添加说明性注释。\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"会经常遇到的是，将整数类型转换为 `usize` 以用作索引。\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"您可以使用 [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) 和 \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html) 对 `u8` 来源\"\n\"进行抽象化处理：\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"lines in slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"lines in file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"您同样可使用 [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) 对 \"\n\"`u8` 接收器进行抽象化处理：\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Logged: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"`Default` 特征\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) 特征会\"\n\"为类型生成默认值。\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y is set!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/lifetimes/exercise.md\n#: src/lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"系统可以直接实现它，也可以通过 `#[derive(Default)]` 派生出它。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"派生的实现会生成一个实例，其中字段全都设为其默认值。\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"这意味着，该结构体中的所有类型也都必须实现 `Default`。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"标准的 Rust 类型通常会以合理的值（例如 ` 0`\\\"\\\" \\\\``等）实现`Default\\\\`。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"部分结构体副本可与默认值完美搭配运作。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"Rust 标准库了解类型可能会实现 `Default`，因此提供了便利的使用方式。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"“..”语法被称为[结构体更新语法](https://doc.rust-lang.org/book/ch05-01-\"\n\"defining-structs.html#creating-instances-from-other-instances-with-struct-\"\n\"update-syntax)\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"闭包或 lambda 表达式具有无法命名的类型。不过，它们会 实现特殊的 [`Fn`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.Fn.html)， [`FnMut`](https://doc.\"\n\"rust-lang.org/std/ops/trait.FnMut.html) 和 [`FnOnce`](https://doc.rust-lang.\"\n\"org/std/ops/trait.FnOnce.html) 特征：\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"调用 Unsafe 函数\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"`Fn`（例如 `add_3`）既不会耗用也不会修改捕获的值，或许 也不会捕获任何值。它可\"\n\"被并发调用多次。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"`FnMut`（例如 `accumulate`）可能会改变捕获的值。您可以多次调用它， 但不能并发\"\n\"调用它。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"如果您使用 `FnOnce`（例如 `multiply_sum`），或许只能调用它一次。它可能会耗用 \"\n\"所捕获的值。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` 是 `FnOnce` 的子类型。`Fn` 是 `FnMut` 和 `FnOnce` 的子类型。也就是\"\n\"说，您可以在任何 需要调用 `FnOnce` 的地方使用 `FnMut`，还可在任何需要调用 \"\n\"`FnMut` 或 `FnOnce` 的地方 使用 `Fn`。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\"编译器也会推断 `Copy`（例如针对 `add_3`）和 `Clone`（例如 `multiply_sum`）， \"\n\"具体取决于闭包捕获的数据。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\"默认情况下，闭包会依据引用来捕获数据（如果可以的话）。`move` 关键字则可让闭包\"\n\"依据值 来捕获数据。\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Hi\\\"\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\\\"Greetings\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"在此示例中，您将实现经典的 [“ROT13”加密](https://en.wikipedia.org/wiki/\"\n\"ROT13)。将此代码复制到 Playground，并实现缺失的位。请仅旋转 ASCII 字母字符，\"\n\"以确保结果仍为有效的 UTF-8 编码字符。\"\n\n#: src/std-traits/exercise.md\n#, fuzzy\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\"\nmsgstr \"// Implement the `Read` trait for `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"如果将两个 `RotDecoder` 实例链接在一起，每个实例旋转 13 个字符，会发生什么情\"\n\"况？\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"欢迎参加第 3 天的课程\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"今日内容：\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"内存管理、生命周期和借用检查器：Rust 如何确保内存安全。\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"智能指针：标准库指针类型。\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"程序通过以下两种方式分配内存：\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"栈：局部变量的连续内存区域。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"值在编译时具有已知的固定大小。\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"速度极快：只需移动一个栈指针。\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"易于管理：遵循函数调用规则。\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"优秀的内存局部性。\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"堆：函数调用之外的值的存储。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"值具有动态大小，具体大小需在运行时确定。\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"比栈稍慢：需要向系统申请空间。\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"不保证内存局部性。\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"创建 `String` 时将固定大小的数据存储在栈上， 并将动态大小的数据存储在堆上：\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"指出 `String` 底层由 `Vec` 实现，因此它具有容量和长度，如果值可变，则可以通过\"\n\"在堆上重新分配存储空间进行增长。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"如果学员提出相关问题，你可以提及我们不仅能使用\\\\[系统分配器\\\\]在堆上分配底层\"\n\"内存，还能使用 [Allocator API](https://doc.rust-lang.org/std/alloc/index.\"\n\"html) 实现自定义分配器\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"我们可以使用 `unsafe` 代码检查内存布局。不过，你应该指出，这种做法不安全！\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"world\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"// DON'T DO THIS AT HOME! For educational purposes only.\"\nmsgstr \"\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"// String provides no guarantees about its layout, so this could lead to\"\nmsgstr \"\"\n\"// DON'T DO THIS AT HOME!For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"// undefined behavior.\"\nmsgstr \"Rust 没有运行时未定义行为：\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"传统上，语言分为两大类：\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"通过手动内存管理实现完全控制：C、C++、Pascal…\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"程序员决定何时分配或释放堆内存。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"程序员必须确定指针是否仍指向有效内存。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"研究表明，程序员难免会犯错。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"运行时通过自动内存管理实现完全安全：Java、Python、Go、Haskell…\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"运行时系统可确保在内存无法被引用之前，不会释放该内存。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"通常通过引用计数、垃圾回收或 RAII 实现。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust 提供了一个全新的组合：\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"通过编译时强制执行正确的内存>管理来实现完全控制与安全。\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"它通过一个明确的所有权（ownership）概念来实现此目的。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"本幻灯片旨在帮助学习其他语言的学生更好地了解 Rust。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"C 语言必须使用 `malloc` 和 `free` 函数手动管理堆。常见错误包括忘记调用 \"\n\"`free`、针对同一指针多次调用它，或在释放某指针所指向的内存后解引用它。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++ 具有智能指针（`unique_ptr`、`shared_ptr`）等工具，可以利用与调用析构函数\"\n\"相关的语言保证来确保在函数返回时释放内存。这些工具仍然很容易被滥用并导致与 C \"\n\"语言类似的 bug。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java、Go 和 Python 依赖垃圾回收器来识别无法再访问的内存并将其舍弃。这保证可对\"\n\"所有指针进行解引用操作，从而消除了释放后使用等各类 bug。但是，垃圾回收 (GC) \"\n\"会产生运行时成本，并且很难进行适当调优。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"在许多情况下，Rust 的所有权和借用模型可以实现 C 语言的性能，能够精确地在所需\"\n\"位置执行分配和释放操作，且为零成本。它还提供类似于 C++ 智能指针的工具。必要\"\n\"时，它还提供引用计数等其他选项，甚至还有第三方 crate 可以支持运行时垃圾回收\"\n\"（本课程中不作介绍）。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"所有变量绑定都有一个有效的“作用域”，使用 超出其作用域的变量是错误的：\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"指出变量“拥有”值。\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"作用域结束时，变量会“被丢弃”，数据会被释放。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"熟悉垃圾回收实现的学生知道，垃圾回收器从一组 “根”开始查找所有可访问内存。\"\n\"Rust 的 “单一所有者”原则与此类似。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"赋值操作将在变量之间转移所有权：\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"b\\\"Hello!\\\"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// println!(\\\"s1: {s1}\\\");\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"将 `s1` 赋值给 `s2`，即转移了所有权。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"当 `s1` 离开作用域时，什么都不会发生：它没有所有权。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"当 `s2` 离开作用域时，字符串数据被释放。\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"移动到 `s2` 中之前：\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"移动到 `s2` 中之后：\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     6 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     6 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     6 |   :\\n\"\n\":   | capacity  |     6 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 栈                           堆\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                         :     :                                             :\\n\"\n\":    \"\n\"list                 :     :                                             :\\n\"\n\":   +----+----+           :     :    +----+----+    +----+------\"\n\"+             :\\n\"\n\":   | 1  | o--+-----------+-----+--->| 2  | o--+--->| // | null \"\n\"|             :\\n\"\n\":   +----+----+           :     :    +----+----+    +----+------\"\n\"+             :\\n\"\n\":                         :     :                                             :\\n\"\n\":                         :     :                                             :\\n\"\n\"`- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"你将值传递给函数时，该值会被赋给函数 参数。这就转移了所有权：\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"切片\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// say_hello(name);\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"指出这与 C++ 中的默认值相反。除非你使用 `std::move`（并已定义 move 构造函\"\n\"数！），否则 C++ 中的默认值是按值复制的。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"只有所有权发生了转移。是否会生成任何机器码来操控数据本身是一个优化方面的问\"\n\"题，系统会主动优化此类副本。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"简单的值（例如整数）可以标记为“Copy”（请看后续幻灯片）。\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"在 Rust 中，克隆是显式的（通过使用 `clone`）。\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"在 `say_hello` 示例中：\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"首次调用 `say_hello` 时，`main` 便放弃了 `name` 的所有权。此后，`main` 中不能\"\n\"再使用 `name`。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"在 `say_hello` 函数结束时，系统会释放为 `name` 分配的堆内存。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"如果 `main` 将 `name` 作为引用 (`&name`) 传递过去，且 `say_hello` 接受作为参\"\n\"数的引用，则可保留所有权。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"此外，`main` 也可以在首次调用时传递 `name` 的克隆 (`name.clone()`)。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"相较于 C++，Rust 通过将移动语义设为默认值，并强制程序员进行显式克隆，更难以无\"\n\"意中创建副本。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"现代 C++ 中的双重释放\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"现代 C++ 以不同的方式解决此问题：\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"// Duplicate the data in s1.\"\nmsgstr \"// Duplicate the data in s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"`s1` 中的堆数据被复制，`s2` 获得自己的独立副本。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"当 `s1` 和 `s2` 离开作用域时，它们会各自释放自己的内存。\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"复制-赋值之前：\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"复制-赋值之后：\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++ 做出了与 Rust 略有不同的选择。由于“=”会复制数据，因此必须克隆字符串数据。\"\n\"否则，当任一字符串超出范围时，便会出现二次释放。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ 还包含[“std::move”](https://en.cppreference.com/w/cpp/utility/move)，它用\"\n\"于指示何时可以移动某个值。如果示例为“s2 = std::move(s1)”，则不会发生堆分配。\"\n\"移动后，“s1”将处于有效但未指定的状态。与 Rust 不同，程序员可以继续使用“s1”。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"与 Rust 不同，使用 C++ 时，“=”可以运行任意代码，具体取决于要复制或移动的类\"\n\"型。\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"克隆\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"有时，_如需_ 复制某个值。`Clone` 特征 可以完成此操作。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\"`Clone` 的设计理念是让您轻松发现堆分配的位置。查找 `.clone()` 和其他一些内\"\n\"容，例如 `Vec::new` 或 `Box::new`。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"通常的做法是，先使用 “克隆操作”解决借用检查器问题，在后续通过优化消除这些克隆\"\n\"操作。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"虽然移动语义是默认的，但默认情况下会复制某些类型：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"这些类型实现了 `Copy` trait。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"你可以选择自己的类型来使用复制语义：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"赋值之后，`p1` 和 `p2` 都拥有自己的数据。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"我们还可以使用 `p1.clone()` 显式复制数据。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"复制和克隆是两码事：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"复制是指内存区域的按位复制，不适用于任意对象。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"复制不允许自定义逻辑（不同于 C++ 中的复制构造函数）。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"克隆是一种更通用的操作，也允许通过实现 `Clone` trait 来自定义行为。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"复制不适用于实现 `Drop` trait 的类型。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"在上述示例中，请尝试以下操作：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"在 `struct Point` 中添加 `String` 字段。由于 `String` 不属于 `Copy` 类型，因\"\n\"此无法编译。\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"从 `derive` 属性中移除 `Copy`。现在，编译器错误位于 `p1`的 `println!` 中。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"指出如果你改为克隆 `p1`，则可按预期运行。\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"`Drop` 特征\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"用于实现 [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 的值可以\"\n\"指定在超出范围时运行的代码：\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropping {}\\\"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\n#, fuzzy\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Exiting block B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Exiting block A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Exiting main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"请注意，`std::mem::drop` 与 `std::ops::Drop::drop` 不同。\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"当值超出范围时，系统会自动将其删除。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"丢弃某个值时，如果该值实现了 `std::ops::Drop`，则会调用其 `Drop::drop` 实现。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"然后，该值所有字段也会被丢弃，无论其是否实现了 `Drop`。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` 只是一个采用任何值的空函数。重要的是它获得了值的所有权，因此\"\n\"在其作用域结束时便会被丢弃。如此您可以轻松提前明确地丢弃值，而不必等到值超过\"\n\"范围的时候。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"这对于通过 `drop` 执行任务的对象来说非常有用，例如释放锁、关闭文件等。\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"为什么 `Drop::drop` 不使用 `self`？\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"简答：如果这样的话，系统会在代码块结尾 调用 `std::mem::drop`，进而引发再一次\"\n\"调用 `Drop::drop`，并引发堆栈 溢出！\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"尝试用 `a.drop()` 替换 `drop(a)`。\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"在此示例中，我们将实现一个拥有全部数据所有权的复杂数据类型。我们将使用 “构建\"\n\"器模式”来支持逐步构建新值，通过便捷函数来实现。\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"填补缺失的内容。\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// A representation of a software package.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Set the package version.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Set the package authors.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Add an additional dependency.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Set the language. If not set, language defaults to None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) 是指向堆上数据的\"\n\"自有指针：\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` 会实现 `Deref<Target = T>`，这意味着您可以[直接在 `Box<T>` 上通过 \"\n\"`T` 调用相应方法](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-\"\n\"deref-coercion)。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"递归数据类型或具有动态大小的数据类型需要使用 `Box`：\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 栈                           堆\\n\"\n\".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                         :     :                                               :\\n\"\n\":    \"\n\"list                 :     :                                               :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":   | Cons | 1  | o--+----+-----+--->| Cons | 2  | o--+--->| Nil  | // | // \"\n\"|   :\\n\"\n\":   +------+----+----+    :     :    +------+----+----+    +------+----+----\"\n\"+   :\\n\"\n\":                         :     :                                               :\\n\"\n\":                         :     :                                               :\\n\"\n\"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"在 C++ 中，`Box` 与 `std::unique_ptr` 类似，除了它一定会不为 null 以外。\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"在以下情况下，`Box` 可能会很实用：\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"在编译时间遇到无法知晓大小的类型，但 Rust 编译器需要知道确切大小。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"想要转让大量数据的所有权。为避免在堆栈上复制大量数据，请改为将数据存储在 \"\n\"`Box` 中的堆上，以便仅移动指针。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"如果这里未使用 `Box`，且我们曾尝试将一个 `List` 直接嵌入 `List`， 编译器就不\"\n\"会计算内存中结构体的固定大小，结构体看起来会像是无限大。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` 大小与一般指针相同，并且只会指向堆中的下一个 `List` 元素， 因此可以解决\"\n\"这个问题。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"将 `Box` 从 List 定义中移除后，画面上会显示编译器错误。如果您看到“Recursive \"\n\"with indirection”错误消息，这是在提示您使用 Box 或其他类型的引用，而不是直接\"\n\"储存值。\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"小众优化\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Though `Box` looks like `std::unique_ptr` in C++, it cannot be empty/null. \"\n\"This makes `Box` one of the types that allow the compiler to optimize \"\n\"storage of some enums.\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"For example, `Option<Box<T>>` has the same size, as just `Box<T>`, because \"\n\"compiler uses NULL-value to discriminate variants instead of using explicit \"\n\"tag ([\\\"Null Pointer Optimization\\\"](https://doc.rust-lang.org/std/option/\"\n\"#representation)):\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Just box\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Optional box\\\"\"\nmsgstr \"异常\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of just_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"Size of optional_box: {}\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\\\"Size of none: {}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) 是引用计数的共享指\"\n\"针。如果您需要从多个位置 引用相同的数据，请使用此指针：\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"如果您在多线程情境中，请参阅 [`Arc`](https://doc.rust-lang.org/std/sync/\"\n\"struct.Mutex.html)。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"您可以将共享指针_降级_为 [`Weak`](https://doc.rust-lang.org/std/rc/struct.\"\n\"Weak.html) 指针， 以便创建之后会被舍弃的循环引用。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"`Rc` 的计数可确保只要有引用，内含的值就会保持有效。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Rust 中的“Rc”与 C++ 中的“std::shared_ptr”类似。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` 的成本很低：这个做法会创建指向相同分配的指针，并增加引用计数，而\"\n\"不会产生深层的克隆，排查代码性能问题时通常可以忽略。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` 实际上会在必要时克隆内部值（“clone-on-write”），并返回可变的引用。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"使用 `Rc::strong_count` 可查看引用计数。\"\n\n#: src/smart-pointers/rc.md\n#, fuzzy\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` 会向您提供 _弱引用计数_ 对象， 以便创建之后会被适当舍弃的周期\"\n\"（可能会与 `RefCell` 组合）。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"特征（Trait）对象可接受不同类型的值，举例来说，在集合中会是这样：\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\\\"Miau!\\\"\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Hello, who are you? {}\\\"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"以下是分配 `pets` 后的内存布局：\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"实现给定 trait 的类型可能大小不同。因此，上例中不可能具有像 `Vec<dyn Pet>` 这\"\n\"样的项。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"可通过“dyn Pet”这个方法向编译器告知实现“Pet”的动态大小类型。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"在本例中，`pets` 在栈上分配内存，矢量数据存储在堆上。这两个矢量元素是 _胖指针\"\n\"_：\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"胖指针属于全角指针。它包含两个部分：指向实际对象的指针，以及指向该特定对象的 \"\n\"`Pet` 实现的 [虚拟方法表](https://en.wikipedia.org/wiki/\"\n\"Virtual_method_table) (vtable) 的指针。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"`Dog`（名为 Fido）类型的数据是 `name` 和 `age` 字段。`Cat` 类型包含一个 \"\n\"`lives` 字段。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"比较上述示例中的这些输出：\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"二元树是一种树型数据结构，其中每个节点都有两个子节点（左侧和右侧）。我们将创\"\n\"建一个树状结构，其中每个节点存储一个值。对于给定的节点 N，N 的左侧子树中的所\"\n\"有节点都包含较小的值，而 N 的右侧子树中的所有节点都将包含较大的值。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"实现以下类型，以便通过指定的测试。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"额外提示：对按顺序返回值的二元树实现迭代器。\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\n\n#: src/smart-pointers/exercise.md\n#, fuzzy\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\"\nmsgstr \"// Implement `new`, `insert`, and `has`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// not a unique item\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"[Borrowing](./borrowing.md) (50 minutes)\"\nmsgstr \"\"\n\"借用：\\n\"\n\"请参阅 [借用](ownership/borrowing.md)。\"\n\n#: src/welcome-day-3-afternoon.md\n#, fuzzy\nmsgid \"[Lifetimes](./lifetimes.md) (50 minutes)\"\nmsgstr \"[引用](../references.md)（50 分钟）\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 1 hour and 50 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/borrowing.md\n#, fuzzy\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"练习：迭代器方法链接\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"调用函数时，你可以让 函数“借用”值，而不是转移所有权：\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"`add` 函数“借用”两个点并返回一个新点。\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"调用方会保留输入的所有权。\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"此幻灯片是对第 1 天引用材料的回顾，并稍作了扩展，添加了函数参数和返回值。\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"关于栈返回的说明：\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"证明从 `add` 返回的开销很低，因为编译器可以消除复制操作。更改上述代码以输出栈\"\n\"地址，并在 [Playground](https://play.rust-lang.org/) 上运行它。在“调试”优化级\"\n\"别中，地址应发生变化，而在改成“发布”设置时保持不变：\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"Rust 编译器能够执行返回值优化 (RVO)。\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\"在 C++ 中，必须在语言规范中定义复制省略，因为构造函数可能会有附带效应。在 \"\n\"Rust 中，这完全不是问题。如果 RVO 未发生，Rust 将始终执行简单且高效的 \"\n\"`memcpy` 复制。\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"Rust 限制了借用值的方式：\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"在任何给定时间，你都可以有一个或多个 `&T` 值，或者\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"你可以有且只有一个 `&mut T` 值。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"请注意，要求是相冲突的引用不能 _同时存在_。而引用的解引用位置无关紧要。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"上述代码无法编译，因为 `a` 同时作为可变值（通过 `c`）和不可变值（通过 `b`）被\"\n\"借用。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"\"\n\"将`b` 的 `println!` 语句移到引入 `c` 的作用域之前，这段代码就可以编译。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"这样更改后，编译器会发现 `b` 只在通过 `c` 对 `a` 进行新可变借用之前使用过。这\"\n\"是借用检查器的一个功能，名为“非词法作用域生命周期”。\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"独占引用的约束条件非常严格。Rust 使用它来确保不会发生数据争用。Rust 还会 _依\"\n\"赖_ 此约束条件来优化代码。例如，共享引用背后的值可以安全地缓存在寄存器中，并\"\n\"在该引用的生命周期内保持有效。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"借用检查器专用于处理许多常见模式，例如同时对结构体中的不同字段进行独占引用。\"\n\"但在某些情况下，它并不能完全 “领会”您的意图，这往往会导致 “与借用检查器进行一\"\n\"番斗争”。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\\\"graph: {root:#?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\\\"graph sum: {}\\\"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`Cell`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\"演示可以通过向“subtree.children”添加“root”来创建引用循环（不要尝试输出\"\n\"它！）。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\"为了演示运行时 panic，请添加一个会递增“self.value”并以相同方法调用其子项\"\n\"的“fn inc(&mut self)”。如果存在引用循环，就会 panic，并且“thread”“main”会\"\n\"因“already borrowed: BorrowMutError”而 panic。\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"\"\n\"你正在实现一个健康监控系统。作为其中的一部分，你需要对用户的健康统计数据进行\"\n\"追踪。\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"`User` 结构体的定义和 `impl` 块中一些函数的框架已经给出。你的目标是实现在 \"\n\"`impl` 块中定义的 `User` `struct` 的方法。\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"将以下代码复制到 <https://play.rust-lang.org/>，并填充缺失的方法：\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"I'm {} and my age is {}\\\"\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"\"\n\"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)\"\nmsgstr \"[切片与生命周期](../slices-and-lifetimes.md)（1 小时 10 分钟）\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"[切片与生命周期](../slices-and-lifetimes.md)（1 小时 10 分钟）\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"[切片与生命周期](../slices-and-lifetimes.md)（1 小时 10 分钟）\"\n\n#: src/lifetimes.md\n#, fuzzy\nmsgid \"[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"练习：迭代器方法链接\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"\"\n\"引用具有 _生命周期_，该生命周期必须比其所引用的值 “存在得更久”。这由借用检查\"\n\"器进行验证。\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"生命周期可以是隐式的，我们目前所看到的便是如此。生命周期也可以是显式的：`&'a \"\n\"Point` 和 `&'document str`。生命周期以 `'` 开头，`'a` 是典型的默认名称。将 \"\n\"`&'a Point` 读取为 “一个借用的 `Point`，至少在生命周期 `a` 内有效”。\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"生命周期注释会创建约束条件；编译器会验证 是否存在有效的解决方案。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"当考虑向函数传递值和从函数返回值时，生命周期会变得更加复杂。\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"// What is the lifetime of p3?\"\nmsgstr \"// What is the lifetime of p3?\\n\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"在此示例中，编译器无法推理出 `p3` 的生命周期。查看函数体内部后则可放心地假\"\n\"定，`p3` 的生命周期是 `p1` 和 `p2` 中的较短者。但与类型一样，Rust 需要对函数\"\n\"参数和返回值进行明确的生命周期注解。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"将 `'a` 适当添加到 `left_most` 中：\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"这表示.，“假设 p1 和 p2 的存在时间都比 `'a` 更长，则返回值至少在 `'a` 内有\"\n\"效”。\"\n\n#: src/lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"在一般情况下，可以省略生命周期，如下一张幻灯片中所述。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"函数调用中的生命周期\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"必须完全指定函数参数和返回值的生命周期， 但 Rust 允许在大多数情况下通过\\\\[一\"\n\"些简单的 规则\\\\](https://doc.rust-lang.org/nomicon/lifetime-elision.html）来\"\n\"省略此操作。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"每个没有生命周期注解的参数都会添加一个生命周期注解。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"如果只有一个参数生命周期，则将其赋予所有未加注解的返回值。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"如果有多个参数生命周期，但第一个是用于 `self` 的，则将该生命周期赋予所有未加\"\n\"注解的返回值。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"在此示例中，`cab_distance` 被轻易省略掉了。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"\"\n\"`nearest` 函数提供了另一个函数示例，该函数的参数中包含多个引用，需要显式注\"\n\"解。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"请尝试将签名调整为 “谎报”了返回的生命周期：\"\n\n#: src/lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"这将无法编译，表面编译器会检查注解是否有效。请注意，原始指针并非如此（不安\"\n\"全），这是不安全 Rust 中导致错误的常见原因。\"\n\n#: src/lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"数据结构中的生命周期\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"如果数据类型存储了借用的数据，则必须对其添加生命周期注释：\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Bye {text}!\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\n#, fuzzy\nmsgid \"// erase(text);\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"在上述示例中，`Highlight` 注释会强制包含 `&str` 的底层数据的生命周期至少与使\"\n\"用该数据的任何 `Highlight` 实例一样长。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"如果 `text` 在 `fox`（或 `dog`）的生命周期结束前被消耗，借用检查器将抛出一个\"\n\"错误。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"借用数据的类型会迫使用户保留原始数据。这对于创建轻量级视图很有用，但通常会使\"\n\"它们更难使用。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"如有可能，让数据结构直接拥有自己的数据。\"\n\n#: src/lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"一些包含多个引用的结构可以有多个生命周期注释。除了结构体本身的生命周期之外，\"\n\"如果需要描述引用之间的生命周期关系，则可能需要这样做。这些都是非常高级的用\"\n\"例。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"在本练习中，您将为 [protobuf 二进制编码](https://protobuf.dev/programming-\"\n\"guides/encoding/) 构建一个解析器。别担心，其实非常简单！这展示了一种常见的解\"\n\"析模式，即传递数据 slice。底层数据本身永远不会被复制。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"如要完整解析 protobuf 消息，需要知道字段的类型（按字段编号编入索引）。这通常\"\n\"会在 `proto` 文件中提供。在本练习中，我们将把这些信息编码成处理每个字段所调用\"\n\"的函数中的 `match` 语句。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"我们将使用以下 proto：\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"proto 消息被编码为连续的一系列字段。每个字段都通过 “标签”后面紧跟值的形式来实\"\n\"现。标签包含一个字段编号（例如`Person` 消息的 `id` 字段的值为 `2`）和线型（用\"\n\"于定义应如何从字节流确定载荷）。\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"整数（包括标签）使用名为 VARINT 的可变长度编码表示。幸运的是，下面为您提供了 \"\n\"`parse_varint` 的定义。该指定代码还定义了一些回调，用于处理 `Person` 和 \"\n\"`PhoneNumber` 字段，并将消息解析为对这些回调的一系列调用。\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"您要做的是实现 `parse_field` 函数，以及`Person` 和 `PhoneNumber`的特征\"\n\"`ProtoMessage`。\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\\\"Invalid varint\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\\\"Invalid wire-type\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"Unexpected EOF\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\\\"Invalid length\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\\\"Unexpected wire-type)\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\\\"Invalid string (not UTF-8)\\\"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// A wire type as seen on the wire.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// Varint WireType 表明该值为单个 VARINT。\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a VARINT\\n\"\n\"    /// followed by exactly that number of bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in little-\"\n\"endian order\\n\"\n\"    /// containing a 32-bit signed integer.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// A field's value, typed based on the wire type.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// A field, containing the field number and its value.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// More than 7 bytes is invalid.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Convert a tag into a field number and a WireType.\\n\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Parse a field, returning the remaining bytes\\n\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\"\n\n#: src/lifetimes/exercise.md src/lifetimes/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Parse a message in the given data, calling `field_callback` for each \"\n\"field in the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\n\n#: src/lifetimes/exercise.md\n#, fuzzy\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\"\nmsgstr \"// TODO: Implement `Widget` for `Label`.\\n\"\n\n#: src/lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\n\n#: src/lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// skip everything else\\n\"\n\n#: src/lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Welcome to Day 4\"\nmsgstr \"欢迎来到第一天\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"今天，我们将介绍一些更高级的 Rust 主题：\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"迭代器：深入了解 `Iterator` 特征。\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"模块和可见性。\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"Testing.\"\nmsgstr \"测试\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"错误处理：panic、“Result”和 try 运算符“?”。\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"不安全 Rust：当无法用安全 Rust 表达您的意图时，则可将其作为应急方法。\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"\"\n\"借用：\\n\"\n\"请参阅 [借用](ownership/borrowing.md)。\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/iterators.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"练习：迭代器方法链接\"\n\n#: src/iterators.md src/testing.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"['Iterator'](https://doc.rust-lang.org/std/iter/trait.Iterator.html) trait 支\"\n\"持迭代集合中的值。它需要用到 `next` 方法，并提供很多方法。许多标准库类型均能\"\n\"实现 `Iterator`，您也可以自行实现：\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"`Iterator` 特征会对集合实现许多常见的函数程序操作， 例如 ` map`filter \\\\``和\"\n\"`reduce\\\\` 等。您可以通过此特征找到有关它们的所有 文档。在 Rust 中，这些函数\"\n\"应生成代码，且生成的代码应与等效命令式实现一样 高效。\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` 是迫使 for 循环运作的特征。此特征由集合类型 （例如 `Vec<T>`）\"\n\"和相关引用（例如 `&Vec<T>` 和 `&[T]`）而实现。此外，范围也会实现这项特征。因\"\n\"此， 您可以使用 `for i in some_vec { .. }` 来遍历某矢量，但 `some_vec.\"\n\"next()` 不存在。\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"“Iterator”trait会告知您在创建迭代器后如何进行迭代。相关 trait“IntoIterator”会\"\n\"告知您如何创建迭代器：\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"这里的语法表示，“IntoIterator”的每个实现都必须声明两种类型：\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`：我们迭代的类型，例如 `i8`，\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"“IntoIter”：“into_iter”方法返回的“Iterator”类型。\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"请注意，“IntoIter”和“Item”已关联：迭代器必须具有相同的“Item”类型，这意味着它\"\n\"会返回“Option\\n\"\n\"\\n\"\n\"”\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"此示例对 x 坐标和 y 坐标的所有组合进行了迭代。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"请尝试在 `main` 中对网格进行两次迭代。为什么会失败？请注意，`IntoIterator::\"\n\"into_iter` 获得了 `self` 的所有权。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"如要解决此问题，请为 `&Grid` 实现 `IntoIterator`，并在 `GridIter` 中存储对 \"\n\"`Grid` 的引用。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"对于标准库类型，可能会出现同样的问题：`for e in some_vector` 将获得` \"\n\"some_vector` 的所有权，并迭代该矢量中的自有元素。请改用 `for e in \"\n\"&some_vector` 来迭代 `some_vector` 的元素的引用。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"让您可通过 [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html) 构建一个集合。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"“Iterator”\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"可以通过两种方式为此方法指定 `B`：\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"使用 `turbofish` 时：`some_iterator.collect::<COLLECTION_TYPE>()`，如下所示。\"\n\"通过此处所用的 `_` 简写形式，Rust 能够推理 `Vec` 元素的类型。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"使用类型推理功能时：`let prime_squares: Vec<_> = some_iterator.collect()`。将\"\n\"示例重写成使用这种形式。\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"还有一些实现，让您可执行一些很酷的操作，比如 将 `Iterator<Item = Result<V, \"\n\"E>>` 转换成 `Result<Vec<V>, E>`。\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"您可以自行实现 [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html) 特征：\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"将以下代码复制到 <https://play.rust-lang.org/>，然后设法通过测试。请尽量避免\"\n\"为中间结果分配“Vec”：\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\n#, fuzzy\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`, wrapping\\n\"\n\"/// around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/modules.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"练习：面向 GUI 库的模块\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"我们已看了“impl”块如何让我们将函数的命名空间建为一种类型。\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"同样，“mod”让我们可为类型和函数建立命名空间：\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"In the foo module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"In the bar module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"包提供功能，并包含一个描述如何构建包含 1 个以上 crate 的捆绑包的“Cargo.\"\n\"toml”文件。\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"crate 是一种模块树，其中的二进制 crate 会创建一个可执行文件，而库 crate 会编\"\n\"译为库。\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"模块定义了组织和范围，并且是本部分的重点。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"如果省略模块内容，则会指示 Rust 在另一个文件中查找：\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"这会告知 Rust 可以在“src/garden.rs”中找到“garden”模块内容。同样，您可以\"\n\"在“src/garden/vegetables.rs”中找到“garden::vegetables”模块。\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"“crate”根目录位于：\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"“src/lib.rs”（对于库 crate）\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"“src/main.rs”（对于二进制文件 crate）\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"也可以使用“内部文档注释”对文件中定义的模块进行记录。这些用于记录包含它们的项\"\n\"（在本例中为模块）。\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\"\nmsgstr \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"//! implementation.\"\nmsgstr \"实现\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"// Re-export types from this module.\"\nmsgstr \"// Re-export types from this module.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Sow the given seed packets.\"\nmsgstr \"/// Sow the given seed packets.\\n\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"/// Harvest the produce in the garden that is ready.\"\nmsgstr \"/// Harvest the produce in the garden that is ready.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"在 Rust 2018 之前的版本中，模块需要位于“module/mod.rs”而非“module.rs”中，对\"\n\"于 2018 年之后的版本而言，这仍是有效的替代方案。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"引入“filename.rs”来替代“filename/mod.rs”的主要原因是，许多名为“mod.rs”的文件\"\n\"在 IDE 中可能难以区分。\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"即使主模块是文件，更深层的嵌套也可以使用文件夹：\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"Rust 寻找模块的位置可通过编译器指令更改：\"\n\n#: src/modules/filesystem.md\n#, fuzzy\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"例如，如果您想将某个模块的测试放在名为“some_module_test.rs”的文件中（类似于 \"\n\"Go 中的惯例），这样做很有用。\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"模块是一种隐私边界：\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"默认情况下，模块项是私有的（隐藏实现详情）。\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"父项和同级子项始终可见。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"\"\n\"换言之，如果某个项在模块“foo”中可见，那么该项在“foo”的所有后代中均可见。\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"使用“pub”关键字将模块设为公开。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"此外，您还可以使用高级“pub(...)”说明符来限制公开可见的范围。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"请参阅 [Rust 参考](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself)。\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"配置“pub(crate)”可见性是一种常见模式。\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"您可以为特定路径授予可见性，这种情况不太常见。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"在任何情况下，都必须向祖先模块（及其所有后代）授予可见性。\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use、super、self\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"一个模块可以使用“use”将另一个模块的符号全部纳入。您通常在每个模块的顶部会看到\"\n\"如下内容：\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"路径\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"路径解析如下：\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"作为相对路径：\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` 或 `self::foo` 是指当前模块中的 `foo`，\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"“super::foo”是指父模块中的“foo”。\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"作为绝对路径：\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` 是指当前 crate 的根中的 `foo`，\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"“bar::foo”是指“bar”crate 中的“foo”。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"通常使用较短的路径来 “重新导出”符号。例如，crate 中的顶层 `lib.rs` 文件可能会\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"\"\n\"通过便捷的短路径，使得 `DiskStorage` 和 `NetworkStorage` 可供其他 crate 使\"\n\"用。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"在大多数情况下，只有模块中显示的项才需通过 `use` 引入。不过，即使实现该 \"\n\"trait 的类型已处于作用域内，如要调用该 trait 的任何方法，仍需将该 trait 引入\"\n\"到作用域内。例如，如需对实现 `Read` trait 的类型使用 `read_to_string` 方法，\"\n\"您需要使用 `use std::io::Read` 引入。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"`use` 语句可以包含通配符：`use std::io::*`。但不推荐这种做法，因为不清楚导入\"\n\"了哪些项，并且这些内容可能会随时间而变化。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"在本练习中，您需要将课程 “方法和特征”部分的 GUI 库练习重新整理为一组模块。通\"\n\"常情况下，将每种类型或一组密切相关的类型放入各自的模块中，因此每种 widget 类\"\n\"型都应拥有自己的模块。\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"设置\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"Rust Playground 仅支持一个文件，因此您需要在本地文件系统上创建一个 Cargo 项\"\n\"目：\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"修改 `src/main.rs` 以添加 `mod` 语句，并在 `src` 目录中添加其他文件。\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"\"\n\n#: src/modules/exercise.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Natural width of `self`.\\n\"\n\n#: src/modules/exercise.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Draw the widget into a buffer.\\n\"\n\n#: src/modules/exercise.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Draw the widget on standard output.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Add 4 paddings for borders\\n\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// add a bit of padding\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"This is a small text GUI demo.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Click me!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"鼓励学生按照自己认为合适的方式划分代码，并熟悉必需的 `mod`、`use` 和 `pub` 声\"\n\"明。之后，讨论哪些组织方式最符合惯例。\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets.rs ----\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"/// Natural width of `self`.\"\nmsgstr \"/// Natural width of `self`.\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget into a buffer.\"\nmsgstr \"/// Draw the widget into a buffer.\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"/// Draw the widget on standard output.\"\nmsgstr \"/// Draw the widget on standard output.\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/label.rs ----\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-width\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Label-draw_into\"\nmsgstr \"// ANCHOR：Label-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Label-draw_into\"\nmsgstr \"// ANCHOR_END：Label-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/button.rs ----\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-width\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// add a bit of padding\"\nmsgstr \"// add a bit of padding\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Button-draw_into\"\nmsgstr \"// ANCHOR：Button-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Button-draw_into\"\nmsgstr \"// ANCHOR_END：Button-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/widgets/window.rs ----\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-width\"\nmsgstr \"// ANCHOR_END：Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// Add 4 paddings for borders\"\nmsgstr \"// Add 4 paddings for borders\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR: Window-draw_into\"\nmsgstr \"// ANCHOR：Window-draw_into\\n\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ANCHOR_END: Window-draw_into\"\nmsgstr \"// ANCHOR_END：Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// TODO: after learning about error handling, you can change\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// draw_into to return Result<(), std::fmt::Error>. Then use\"\nmsgstr \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// the ?-operator here instead of .unwrap().\"\nmsgstr \"\"\n\n#: src/modules/solution.md\n#, fuzzy\nmsgid \"// ---- src/main.rs ----\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"单元测试\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust 和 Cargo 随附了一个简单的单元测试框架：\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"单元测试在您的整个代码中都受支持。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"您可以通过 `tests/` 目录来支持集成测试。\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"测试标有 `#[test]`。单元测试通常会放在嵌套的 `tests` 模块中，仅在构建测试时使\"\n\"用 `#[cfg(test)]` 对它们进行有条件地编译。\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"这样一来，您可以对专用帮助程序进行单元测试。\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"仅当您运行 `cargo test` 时，`#[cfg(test)]` 属性才有效。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"在 Playground 中运行测试显示测试结果。\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"集成测试\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"如果您想要以客户的身份测试您的库，请使用集成测试。\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"在 `tests/` 下方创建一个 `.rs` 文件：\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"// tests/my_library.rs\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"这些测试只能使用您的 crate 的公共 API。\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"文档测试\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust 本身就支持文档测试：\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"/// Shortens a string to the given length.\"\nmsgstr \"/// The car has arrived on the given floor.\\n\"\n\n#: src/testing/other.md\nmsgid \"/// ```\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// # use playground::shorten_string;\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\"\nmsgstr \"\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"`///` 注释中的代码块会自动被视为 Rust 代码。\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"代码会作为 `cargo test` 的一部分进行编译和执行。\"\n\n#: src/testing/other.md\n#, fuzzy\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"在代码中添加 `#` 可以将其隐藏在文档中，但系统仍会编译/运行它。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"在 [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) \"\n\"上测试上述代码。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"Rust 编译器会生成出色的错误消息，并提供实用的内置 lint 功能。[Clippy]\"\n\"(https://doc.rust-lang.org/clippy/) 提供了更多 lint 功能，采用按组分类方式，\"\n\"并可按项目灵活启用。\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X probably fits in a u16, right? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"运行代码示例并检查错误消息。此处还会显示一些 lint，但是一旦完成代码编译，就不\"\n\"会再显示这些 lint。切换到 Playground 网站以显示这些 lint。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"解析完 lint 之后，请在 Playground 网站上运行 `clippy`，以显示 clippy 警告。\"\n\"Clippy 提供了大量的 lint 文档，并且在不断添加新的 lint（包括默认拒绝 lint）。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"请注意，带有 `help: ...` 的错误或警告可以通过 `cargo Fix` 或编辑器进行修复。\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"卢恩算法\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[卢恩算法](https://zh.wikipedia.org/wiki/卢恩算法)用于验证信用卡号。该算法将\"\n\"字符串作为输入内容，并执行以下操作来验证信用卡号：\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"忽略所有空格。拒绝少于两位的号码。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"从**右到左**，将偶数位的数字乘二。对于数字“1234”，我们将“3”和“1”乘二；对于数\"\n\"字“98765”，将“6”和“8”乘二。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"将一个数字乘二后，如果结果大于 9，则将每位数字相加。因此，将“7”乘二得“14”，然\"\n\"后“1 + 4 = 5”。\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"将所有未乘二和已乘二的数字相加。\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"如果总和以“0”结尾，则信用卡号有效。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"提供的代码提供了一个有缺陷的 Luhn 算法实现，附带两个基本单元测试，用于验证大\"\n\"部分算法是否正确实现。\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"将以下代码复制到 <https://play.rust-lang.org/>，并填入缺少的函数和方法：\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// This is the buggy version that appears in the problem.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// This is the solution and passes all of the tests below.\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"yes\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"no\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"[Error Handling](./error-handling.md) (55 minutes)\"\nmsgstr \"[错误处理](../error-handling.md)（45 分钟）\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"练习：迭代器方法链接\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust 通过 “panic”机制处理严重错误。\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"如果运行时发生严重错误，Rust 会触发 panic：\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"Panic 用于指示不可恢复的意外错误。\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"Panic反映了程序中的 bug 问题。\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"运行时失败（例如边界检查失败）可能会触发 panic\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"断言（例如 `assert!`）在失败时会触发 panic\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"针对特定用途的 panic 可以使用 `panic!` 宏。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"使用 panic 会 “展开”堆栈，并丢弃对应的值，就像函数已经返回一样。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"如果崩溃不可接受，请使用不会触发 panic 的 API（例如 `Vec::get`）。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"默认情况下，panic 会导致堆栈展开。您可以捕获展开信息：\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"No problem here!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"oh no!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"捕获异常；请勿尝试使用 `catch_unwind` 实现异常！\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"如果服务器需要持续运行（即使是在请求发生崩溃的情况下）， 此方法十分有用。\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"如果您在 `Cargo.toml` 中设置了 `panic = 'abort'`，此方法不会生效。\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"运行时错误（如连接遭拒或未找到文件）使用 `Result` 类型进行处理，但在每次调用\"\n\"中匹配此类型会很繁琐。try 运算符 `?` 用于将错误返回给调用方。它能将常用命令\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"转换成更简单的命令\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"我们可以用它来简化错误处理代码：\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"username or error: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"简化 `read_username` 函数以使用 `?`。\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"`username` 变量可以是 `Ok(string)` 或 `Err(error)`。\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"可以使用 `fs::write` 调用来测试不同的场景：没有文件、空文件、包含用户名的文\"\n\"件。\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"请注意，`main` 函数只要实现 `std::process:Terality`，就可以返回 `Result<(), \"\n\"E>`。在实践中，这意味着 `E` 会实现 `Debug`。可执行文件将输出 `Err` 变体，并在\"\n\"出现错误时返回非零退出状态。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"`?` 的有效展开比前面介绍的内容略微复杂一些：\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"效果等同于\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"此处的 `From::from` 调用表示，我们尝试将错误类型转换为 函数返回的类型：\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"IO error: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Found no username in {0}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"`From` 实现的常见替代方案是 `Result::map_err`，尤其是只在一个位置进行转换时。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"动态错误类型\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"有时，我们需要允许返回任意类型的错误，但又不想自己手动编写枚举来涵盖所有不同\"\n\"的可能性。 `std::error::Error` 可以让我们轻松做到这一点。\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Count: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Error: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"`read_count` 函数可以返回 `std::io::Error`（通过文件操作）或 `std::num::\"\n\"ParseIntError`（通过 `String::parse`）。\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"虽然这可以省却编写代码的麻烦，但也会导致我们无法在程序中以不同的方式正常处理\"\n\"不同的 错误情况。因此，在库的公共 API 中使用 `Box<dyn Error>` 通常不是一个好\"\n\"主意。 但是对于您只需要在某处显示错误消息的程序来说，这不失为一个 很好的选\"\n\"择。\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"[`thiserror`](https://docs.rs/thiserror/) 和 [`anyhow`](https://docs.rs/\"\n\"anyhow/) crate 用于简化错误处理。`thiserror` 有助于创建实现 `From<T>` 的自定\"\n\"义错误类型。`anyhow` 有助于处理函数中的错误，包括为错误添加上下文信息。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Found no username in {0}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Failed to open {path}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Failed to read\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Username: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Error: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"`Error` 派生宏由 `thiserror` 提供，并且具有许多有用的属性（例如 \"\n\"`#[error]`），有助于定义有用的错误类型。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"”是“Result\\\\<V, anyhow::Error>”的类型别名。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"“anyhow::Result\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"“anyhow::Error”本质上是“Box\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"”的封装容器。因此，就像前面提到的那样，在库的公共 API 中 使用它通常不是一个好\"\n\"主意。但是它广泛用于应用中。\\n\"\n\"\\n\"\n\"如果需要，可以提取其内部的实际错误类型进行检查。\\n\"\n\"\\n\"\n\"Go 开发者可能会十分熟悉 `anyhow::Result<T>` 提供的功能， 因为它的使用模式和工\"\n\"效学设计与 Go 的 `(T, error)` 方法十分相似。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\n#: src/error-handling/exercise.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"练习：使用 Result 进行重写\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"以下代码实现了一个非常简单的表达式语言解析器。不过，它通过 panic 机制来处理错\"\n\"误。请重写该代码，改用惯用的错误处理方式，并将错误传播到 `main` 函数的返回\"\n\"值。您可以随意使用 `thiserror` 和 `anyhow`。\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"提示：请先修复 `parse` 函数中的错误处理问题。该部分正常运行后，请更新 \"\n\"`Tokenizer` 以实现 `Iterator<Item=Result<Token, TokenizerError>>`，并在解析器\"\n\"中进行相应处理。\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// An arithmetic operator.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// A token in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// An expression in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// A reference to a variable.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// A literal number.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// A binary operation.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Unexpected character {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Unexpected end of input\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"Invalid 32-bit integer'\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Unexpected token {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// Look ahead to parse a binary operation if present.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Unexpected character '{0}' in input\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Tokenizer error: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Unexpected token {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Invalid number\\\"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Rust 语言包含两个部分：\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\\\\*\\\\*安全 Rust：\\\\*\\\\*内存安全，没有潜在的未定义行为。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\\\\*\\\\*不安全 Rust：\\\\*\\\\*如果违反了前提条件，可能会触发未定义的行为。\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"\"\n\"本课程中出现的大多为“安全 Rust”，但是了解“不安全 Rust”的定义 非常重要。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"不安全的代码通常内容很少而且与其他代码隔离， 其正确性也应得到仔细记录。这类代\"\n\"码通常封装在安全的抽象层中。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"不安全 Rust 提供了五种新功能：\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"解引用原始指针。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"访问或修改可变的静态变量。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"访问 `union` 字段。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"调用 `unsafe` 函数，包括 `extern` 函数。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"实现 `unsafe` trait。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"下面，我们将简要介绍这些不安全功能。如需了解完整详情，请参阅 [《Rust 手册》\"\n\"第 19.1 章](https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html) 和 \"\n\"[Rustonomicon](https://doc.rust-lang.org/nomicon/)。\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"不安全 Rust 并不意味着代码不正确，而是这意味着开发者已停用 编译器的安全功能，\"\n\"必须自行编写正确的 代码。也就是说，编译器不再强制执行 Rust 的内存安全规则。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"创建指针是安全的操作，但解引用指针需要使用 `unsafe` 方法：\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"careful!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// be non-null and properly aligned, the objects underlying the references\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// from which they were obtained are live throughout the whole unsafe\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// block, and they are not accessed either through the references or\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// concurrently through any other pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"uhoh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"// NOT SAFE. DO NOT DO THIS.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"/*\"\nmsgstr \"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"我们建议（而且 Android Rust 样式指南要求）为每个 `unsafe` 代码块编写一条注\"\n\"释， 说明该代码块中的代码如何满足其所执行的不安全操作的 安全要求。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"对于指针解除引用，这意味着指针必须为 [_valid_](https://doc.rust-lang.org/std/\"\n\"ptr/index.html#safety)，即：\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"指针必须为非 null。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"指针必须是 _dereferenceable_（在单个已分配对象的边界内）。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"对象不得已取消分配。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"不得并发访问相同位置。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"如果通过转换引用类型来获取指针，则底层对象必须处于活跃状态， 而且不得使用任何\"\n\"引用来访问内存。\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"在大多数情况下，指针还必须正确对齐。\"\n\n#: src/unsafe-rust/dereferencing.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"“不安全”部分给出了一个常见 UB bug 的示例：`*r1` 的生命周期为 `'static`，因此 \"\n\"`r3` 为 `&'static String` 类型，存在时间比 `s` 更长。从指针创建引用需要 _特别\"\n\"注意_。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"读取不可变的静态变量是安全的操作：\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"但是，读取和写入可变的静态变量是不安全的，因为这可能会 造成数据争用：\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"// SAFETY: There are no other threads which could be accessing `COUNTER`.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"此处的程序是安全的，因为它是单线程的。不过，Rust 编译器比较保守，会做出最坏的\"\n\"假设。请尝试移除 `unsafe`，看看编译器如何解释从多个线程中修改静态变量是一种未\"\n\"定义的行为。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"通常，我们不建议使用可变的静态变量，但在某些情况下，在低层级 `no_std` 代码中\"\n\"可能需要这样做， 例如实现堆分配器或使用某些 C API。\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"联合体与枚举类似，但您需要自行跟踪活跃字段：\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\"\nmsgstr \"Rust 没有运行时未定义行为：\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"在 Rust 中很少需要用到联合体，因为您通常可以使用枚举。联合体只是偶尔用于 与 \"\n\"C 库 API 进行交互。\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"如果您只是想将字节重新解释为其他类型，则可能需要使用 [`std::mem::transmute`]\"\n\"(https://doc.rust-lang.org/stable/std/mem/fn.transmute.html) 或 安全的封装容\"\n\"器，例如 [`zerocopy`](https://crates.io/crates/zerocopy) crate。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"调用 Unsafe 函数\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"如果函数或方法具有额外的前提条件，您必须遵守这些前提条件来避免未定义的行为， \"\n\"则可以将该函数或方法标记为 `unsafe`：\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The indices are in the correct order, within the bounds of the\"\nmsgstr \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// string slice, and lie on UTF-8 sequence boundaries.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"char count: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// SAFETY: `abs` doesn't deal with pointers and doesn't have any safety\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// requirements.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Absolute value of -3 according to C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Not upholding the UTF-8 encoding requirement breaks memory safety!\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// println!(\\\"char count: {}\\\", count_chars(unsafe {\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// emojis.get_unchecked(0..3) }));\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"编写 Unsafe 函数\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"如果您自己编写的函数需要满足特定条件以避免未定义的行为， 您可以将这些函数标记\"\n\"为 `unsafe`。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"/// Swaps the values pointed to by the given pointers.\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/unsafe-traits.md\nmsgid \"/// # Safety\"\nmsgstr \"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"/// The pointers must be valid and properly aligned.\"\nmsgstr \"在大多数情况下，指针还必须正确对齐。\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// SAFETY: ...\"\nmsgstr \"// ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"这个问题通常仅存在于使用指针执行违反 Rust 内存模型的操作的外部函数中。 但一般\"\n\"而言，任何 C 函数都有可能在任意情况下出现未定义行为。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"本例中的“C”是 ABI；[也可以使用其他 ABI](https://doc.rust-lang.org/reference/\"\n\"items/external-blocks.html)。\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"实际上，我们不会这样使用指针，因为使用引用可以安全地达到相同的目的。\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"请注意，在不安全函数中，可以在没有 `unsafe` 代码块的情况下使用不安全代码。我\"\n\"们可以 使用 `#[deny(unsafe_op_in_unsafe_fn)]` 来禁止此行为。请尝试添加该命\"\n\"令，看看会出现什么情况。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"实现 Unsafe Trait\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"与函数一样，如果您在实现某个 trait 时必须保证特定条件来避免未定义的行为， 您\"\n\"也可以将该 trait 标记为 `unsafe`。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"例如，`zerocopy` crate 包含一个不安全的 trait， [大致内容是这样的](https://\"\n\"docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html)：\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"/// ...\"\nmsgstr \"// ...\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"/// The type must have a defined representation and no padding.\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\n#, fuzzy\nmsgid \"// SAFETY: `u32` has a defined representation and no padding.\"\nmsgstr \"// Safe because u32 has a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"在 Rustdoc 中有关 trait 的章节下，有一个标题为 `# 安全` 的部分介绍了 安全实\"\n\"现 trait 的要求。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"实际上，与 `AsBytes` 相关的安全说明远比这里展示的更详尽、更复杂。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"内置的 `Send` 和 `Sync` trait 都是不安全的。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"安全 FFI 封装容器\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust 为通过 _外部函数接口_ (FFI) 调用函数提供了出色的支持。我们将使用它为 \"\n\"`libc` 函数构建一个安全封装容器，用于从 C 代码中读取目录中的文件名称。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"建议您参考以下手册页面：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"您还需要浏览[“std::ffi”](https://doc.rust-lang.org/std/ffi/)模块。在下方，您\"\n\"会发现完成这个练习所需的多种字符串类型：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"编码\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"使用\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[“str”](https://doc.rust-lang.org/std/primitive.str.html)和[“String”]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"用 Rust 进行文本处理\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[“CStr”](https://doc.rust-lang.org/std/ffi/struct.CStr.html)和[“CString”]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"以空字符结尾\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"与 C 函数通信\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[“OsStr”](https://doc.rust-lang.org/std/ffi/struct.OsStr.html)和[“OsString”]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"特定于操作系统\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"与操作系统通信\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"您将在以下所有类型之间进行转换：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"将 `&str` 转换为 `CString`：您需要为尾随 `\\\\0` 字符分配空格，\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"将 `CString` 转换为 `\\\\*const i8` ：您需要一个指针来调用 C 函数，\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"\"\n\"将 `\\\\*const i8` 转换为 `&CStr` ：您需要一些能够找到尾随 `\\\\0` 字符的内容，\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"\"\n\"将 `&CStr` 转换为 `&\\\\[u8\\\\]` ：一个字节 Slice 是“一些未知数据”的通用接口，\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"将 `&\\\\[u8\\\\]` 转换为 `&OsStr` ：`&OsStr` 是向 `OsString` 迈进的一步，请使用\"\n\"[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html)来\"\n\"创建它，\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"将“&OsStr”转换为“OsString”：您需要克隆“&OsStr”中的数据，以便能够返回它并再次\"\n\"调用“readdir”。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"[秘典](https://doc.rust-lang.org/nomicon/ffi.html) 中也有一个关于 FFI 的非常\"\n\"实用的章节。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"将以下代码复制到 <https://play.rust-lang.org/>，并填入缺少的函数和方法：\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Layout according to the macOS man page for dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\"\nmsgstr \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\"\nmsgstr \"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"// Call closedir as needed.\"\nmsgstr \"// Call closedir as needed.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"files: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Invalid path: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"Could not open {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// We have reached the end of the directory.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Call closedir as needed.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SAFETY: self.dir is not NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Could not close {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Non UTF-8 character in path\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\n#, fuzzy\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"欢迎来到Android 中的Rust\"\n\n#: src/android.md\n#, fuzzy\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Rust 支持Android 的原生平台开发。这意味着您可以在Rust 中编写新的操作系统服\"\n\"务，以及扩展现有服务。\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"今天我们会尝试在你自己的项目中调用Rust。 所以试着在你的代码中找一小段来改成\"\n\"Rust。 代码中越少依赖(dependencies)，越少“独特”的类型，越好。比如 一段解析原\"\n\"始字符的代码就很理想。\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"鉴于 Android 中越来越多地使用 Rust，演讲者可能会提到以下任何一项：\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"服务示例：[DNS-over-HTTP](https://security.googleblog.com/2022/07/dns-over-\"\n\"http3-in-android.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"库：[Rutabaga 虚拟图形接口](https://crosvm.dev/book/appendix/rutabaga_gfx.\"\n\"html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"内核驱动程序：[Binder](https://lore.kernel.org/rust-for-linux/20231101-rust-\"\n\"binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"固件：[pKVM 固件](https://security.googleblog.com/2023/10/bare-metal-rust-in-\"\n\"android.html)\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"我们将会使用Android 虚拟设备（Android Virtual Device）来测试我们的代码。 确保\"\n\"你有权限访问一个，或者用以下命令创建一个新的：\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"更多细节请参考 [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start).\"\n\n#: src/android/setup.md\n#, fuzzy\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish 是一款 Android 引用设备，专用于通用 Linux 桌面设备。此外，我们还计\"\n\"划支持 MacOS。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"Cuttlefish 系统映像会保持媲美真实设备的高保真度，是运行许多 Rust 用例的理想模\"\n\"拟器。\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"Android 构建系统（Soong）通过一系列模块来支持Rust：\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Module Type\"\nmsgstr \"\"\n\"\\\\| 模块类型      | 描\"\n\"述                                                                                        \"\n\"| \\\\|—————————|——————————————————————————————————————————————————| \\\\| \"\n\"`rust_binary`     | Rust 二进制文\"\n\"件。                                                                           \"\n\"| \\\\| `rust_library`    | 生成Rust 库，并且提供 `rlib` 和 `dylib` 变\"\n\"体。                       | \\\\| `rust_ffi`        | 生成可由 cc 模块使用的 \"\n\"Rust C 库，并提供静态和共享变体。    | \\\\| `rust_proc_macro` | 生成 proc-\"\n\"macro Rust 库。 这些宏与编译器插件类似。                     | \\\\| \"\n\"`rust_test`       | 生成使用标准 Rust 自动化测试框架的 Rust 测试二进制文\"\n\"件。                             | \\\\| `rust_fuzz`       | 生成使用 \"\n\"libfuzzer 的 Rust 模糊测试二进制文\"\n\"件。                                         | \\\\| `rust_protobuf`   | 生成源\"\n\"代码，并生成为特定 protobuf 提供接口的 Rust 库。| \\\\| `rust_bindgen`    | 生\"\n\"成源代码，并生成包含与 C 库的 Rust 绑定的 Rust 库。｜\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"描述\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"Produces a Rust binary.\"\nmsgstr \"生成一个Rust二进制文件。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"生成一个 Rust 库，并提供 `rlib` 和 `dylib` 两种变体。\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi `\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"生成一个可由 `cc` 模块使用的 Rust C 库，并提供静态和共享两种变体。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"生成“proc-macro”Rust 库。这些宏与编译器插件类似。\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test `\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"生成使用标准 Rust 测试框架的 Rust 测试二进制文件。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"生成使用 `libfuzzer` 的 Rust 模糊测试二进制文件。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"生成源代码并生成为特定 protobuf 提供接口的 Rust 库。\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"生成源代码并生成包含 Rust 绑定到 C 库的 Rust 库。\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"下面我们来看看 `rust_binary` 和 `rust_library`。\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"演讲者可能会提及其他内容：\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"Cargo 未针对多语言代码库进行优化，并且从互联网下载软件包。\"\n\n#: src/android/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"为了确保合规性和性能，Android 必须具有树内 crate。它还必须与 C/C++/Java 代码\"\n\"进行互操作。Soong 填补了这一空白。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong 与 Bazel 有许多相似之处，后者是 Blaze 的开源变体（在 google3 中使用）。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\"我们计划逐渐在 [Android](https://source.android.com/docs/setup/build/bazel/\"\n\"introduction)，[ChromeOS](https://chromium.googlesource.com/chromiumos/\"\n\"bazel/) 和 [Fuchsia](https://source.android.com/docs/setup/build/bazel/\"\n\"introduction) 中采用 Bazel 进行开发。\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"对所有 Rust 操作系统开发者而言，了解类似 Bazel 的构建规都很有用。\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"趣味小知识：《星际迷航》中的数据是 Soong 类型的 Android。\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Rust 二进制文件\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"让我们从一个简单的应用程序开始。在 AOSP 签出的根目录下，创建以下文件：\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Rust demo.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Prints a greeting to standard output.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Hello from Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"你现在可以构建、推送和运行二进制文件：\"\n\n#: src/android/build-rules/binary.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Rust 库\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"您可以使用 `rust_library` 为 Android 创建一个新的 Rust 库。\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"在这里，我们声明了对两个库的依赖：\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting`, 我们在下面进行了定义，\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap`, 一个已经在 [`external/rust/crates/`](https://cs.android.com/\"\n\"android/platform/superproject/+/master:external/rust/crates/) 中提供的 \"\n\"crate。\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Greeting library.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Greet `name`.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"您可以像之前一样构建、推送和运行二进制文件：\"\n\n#: src/android/build-rules/library.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Rust 支持 [Android 接口定义语言 (AIDL)](https://developer.android.com/guide/\"\n\"components/aidl)：\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Rust 代码可以调用现有的 AIDL 服务器，\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"您可以在 Rust 中创建新的 AIDL 服务器。\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"AIDL 接口\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"您可以使用 AIDL 接口声明您的服务的 API：\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Birthday service interface. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Generate a Happy Birthday message. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_:\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\n#, fuzzy\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust is not enabled by default\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"生成的 Rust：\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"服务实现\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"我们现在可以实现AIDL服务：\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/example-service/service.md\n#, fuzzy\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"`IBirthdayService`实现 \"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_:\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"AIDL 服务器\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"最后，我们可以创建一个暴露服务的服务器：\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_:\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Entry point for birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Failed to register service\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#, fuzzy\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"`src/bin/server.rs`:\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"我们现在可以构建、推送和启动服务：\"\n\n#: src/android/aidl/example-service/deploy.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"在另一个终端中，检查该服务是否正在运行：\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"您还可以使用 `service call` 命令调用该服务：\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"AIDL 客户端\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"最后，我们可以为我们的新服务创建一个 Rust 客户端。\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Failed to connect to BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// Call the service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"请注意，客户端不依赖于 `libbirthdayservice`。\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"在您的设备上构建、推送并运行客户端：\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"让我们扩展API以提供更多功能：我们希望允许客户端指定生日贺卡的行列表：\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\n#, fuzzy\nmsgid \"'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"AIDL Type\"\nmsgstr \"AIDL\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"Rust Type\"\nmsgstr \"Rust 示例\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"`boolean`\"\nmsgstr \"`bool`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\n#, fuzzy\nmsgid \"Note that bytes are signed.\"\nmsgstr \"// More than 7 bytes is invalid.\\n\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"描述\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&[T]`\"\nmsgstr \"切片：`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"_birthday_service/src/client.rs_:\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\n\n#: src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"_birthday_service/src/lib.rs_:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\n#, fuzzy\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\\\"Invalid length\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"Android 中的 Rust\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_:\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Greeting library.\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"您现在可以自动生成绑定代码：\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"整体的方法如下：\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"[googletest](https://docs.rs/googletest)：遵从 GoogleTest for C++ 传统的综合\"\n\"测试断言库。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\"如果我们将最后一个元素更改为 `\\\"!\\\"`，测试将失败，并会提供详细的错误消息来指\"\n\"出错误的位置：\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\"GoogleTest 不是 Rust Playground 的一部分，因此您需要在本地环境中运行此示例。\"\n\"使用 `cargo add googletest` 快速将其添加到现有 Cargo 项目中。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\"`use googletest::prelude::*;` 行会导入一些 [常用的宏和类型](https://docs.rs/\"\n\"googletest/latest/googletest/prelude/index.html)。\"\n\n#: src/android/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"这只是冰山一角，还有很多内置匹配器。\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\"有一个特别实用的功能是，多行字符串中的不匹配问题会以差异的形式显示出来：\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"显示用颜色标识的差异（此处未显示颜色）：\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\"crate 是 [适用于 C++ 的 GoogleTest](https://google.github.io/googletest/) 的 \"\n\"Rust 移植版。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\"对于模拟，[Mockall](https://docs.rs/mockall/) 是一个广泛使用的库。您需要重构\"\n\"代码才能使用 trait，然后便可很快地对其进行模拟：\"\n\n#: src/android/testing/mocking.md\n#, fuzzy\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\"此处的建议适用于 Android (AOSP)，其中推荐使用 Mockall 模拟库。[crates.io 上还\"\n\"有其他模拟库可用](https://crates.io/keywords/mock)，尤其是在模拟 HTTP 服务方\"\n\"面。其他模拟库的工作方式与 Mockall 类似，这意味着通过它们您可轻松实现对指定 \"\n\"trait 的模拟。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\"请注意，模拟在某种程度上具有 _争议性_：借助模拟，您可以将测试与其依赖项完全隔\"\n\"离。最立竿见影的是，测试作业会更快且更稳定。另一方面，模拟对象的配置可能出现\"\n\"错误，并返回与真实依赖项不同的输出。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\"建议您尽可能使用真实依赖项。例如，许多数据库都支持您配置内存后端。这意味着，\"\n\"您可以在测试中获得正确的功能行为，而且测试速度会很快并会自动清理。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\"同样，许多 Web 框架都支持您启动进程内服务器，该服务器会绑定到 `localhost` 上\"\n\"的随机端口。相比模拟框架，请始终优先选择这种方式，因为这有助于您在真实环境中\"\n\"测试代码。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\"Mockall 不是 Rust Playground 的一部分，因此您需要在本地环境中运行此示例。使\"\n\"用 `cargo add mockall` 快速将 Mockall 添加到现有 Cargo 项目中。\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\"Mockall 具有更多功能。具体而言，您可以设置基于传递参数的预期值。在这里，我们\"\n\"使用该功能来模拟一只猫，它在上次被喂食的 3 小时后会感到饥饿：\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\"您可以使用 `.times(n)` 将调用模拟方法的次数限制为 `n`，如果不满足此条件，模拟\"\n\"对象被释放时会自动 panic。\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"你应该使用 `log` crate 来自动记录日志到 `logcat` （设备上）或 `stdout`（主机\"\n\"上）：\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_:\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_:\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Rust logging demo.\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Logs a greeting.\\n\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Starting program.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Things are going fine.\\\"\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Something went wrong!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"在你的设备上构建，推送，并运行二进制文件 ：\"\n\n#: src/android/logging.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"日志将会在 `adb logcat` 中显示：\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"Rust 对于与其他编程语言的互操作性有着出色的支持。这意味着您可以：\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"从其他语言调用 Rust 函数。\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"从 Rust 调用用其他语言编写的函数。\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"当您从外部语言调用函数时，我们称之为使用 **外部函数接口**（*Foreign Function \"\n\"Interface*， FFI）。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"与 C 的互操作性\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust 对使用 C 调用约定链接目标文件提供了完整的支持。同样地，你可以导出 Rust \"\n\"函数并从 C 中调用它们。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"如果你愿意的话，你可以手工完成它：\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"// SAFETY: `abs` doesn't have any safety requirements.\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"我们已经在[安全 FFI 封装容器](../../exercises/day-3/safe-ffi-wrapper.md)练习\"\n\"中看到了这个例子。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"这假设对目标平台拥有充分的了解，不建议用于生产环境。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"接下来我们将探讨更好的选择。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"使用 Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"[bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) 工具可\"\n\"以自动生成 C 头文件的绑定代码。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"首先创建一个小型的 C 语言库：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"interoperability/bindgen/libbirthday.h:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"_interoperability/bindgen/libbirthday.c_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| Happy Birthday %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"将该库添加到你的 `Android.bp` 文件中：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"_interoperability/bindgen/Android.bp_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"为该库创建一个包装头文件（在此示例中不是必需的）：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"您现在可以自动生成绑定代码：\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"birthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"最后，我们可以在 Rust 程序中使用这些绑定：\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"_interoperability/bindgen/main.rs_:\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"// SAFETY: The pointer we pass is valid because it came from a Rust\\n\"\n\"    // reference, and the `name` it contains refers to `name` above which \"\n\"also\\n\"\n\"    // remains valid. `print_card` doesn't store either pointer to use \"\n\"later\\n\"\n\"    // after it returns.\\n\"\nmsgstr \"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"最后，我们可以运行自动生成的测试来确保绑定代码正常工作：\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Generated file, skip linting\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"调用 Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"将 Rust 函数和类型导出到 C 很简单：\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.rs_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI demo.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analyze the numbers.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) is smallest!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"_interoperability/rust/libanalyze/analyze.h_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"_interoperability/rust/libanalyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"我们现在可以从一个 C 二进制文件中调用它：\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"_interoperability/rust/analyze/main.c_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"_interoperability/rust/analyze/Android.bp_\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\n#, fuzzy\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/\"\n\"tmp\\\"\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` 禁用了 Rust 通常的名称重整，因此导出的符号将仅为函数的名称。你\"\n\"还可以使用 `#[export_name = \\\"some_name\\\"]` 来指定任意你想要的名称。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"[CXX crate](https://cxx.rs/) 使得在 Rust 和 C++ 之间进行安全的互操作成为可\"\n\"能。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"整体的方法如下：\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX依赖于提供的函数签名说明，这些签名会在不用语言之间进行交互使用。您可以在带\"\n\"有 `#[cxx::bridge]` 属性宏注解的 Rust 模块中使用 extern 代码块提供此说明。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Shared structs with fields visible to both languages.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Rust types and signatures exposed to C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// C++ types and signatures exposed to Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"桥接通常在您的 crate 内的 `ffi` 模块中声明。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"根据在桥接模块中进行的声明，CXX 将生成匹配的 Rust 和 C++ 类型/函数定义，以便\"\n\"将这些内容公开给这两种语言。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"如需查看生成的 Rust 代码，请使用 [cargo-expand](https://github.com/dtolnay/\"\n\"cargo-expand) 查看展开后的 proc 宏。对于大多数示例，您可以使用 `cargo \"\n\"expand ::ffi` 来仅展开 `ffi` 模块（但这不适用于 Android 项目）。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"如需查看生成的 C++ 代码，请在 `target/cxxbridge` 中查找。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Rust 桥接声明\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Opaque type\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Method on `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\n#, fuzzy\nmsgid \"// Free function\\n\"\nmsgstr \"函数\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"`extern \\\"Rust\\\"` 中声明的内容引用了父级模块中作用域内的内容。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"CXX 代码生成器使用 `extern \\\"Rust\\\"` 部分生成包含相应 C++ 声明的 C++ 头文件。\"\n\"生成的头文件与包含桥接的 Rust 源文件的路径相同，但文件扩展名为 .rs.h。\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"大致生成以下 C++：\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"C++ 桥接声明\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"大致生成以下 Rust：\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"程序员无需承诺他们输入的签名准确无误。CXX 会执行静态断言，确认签名与 C++ 中声\"\n\"明的内容完全一致。\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"借助 `unsafe extern` 代码块，您可以声明可从 Rust 安全调用的 C++ 函数。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"仅支持类似 C 函数（单元）的枚举。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"共享类型的 `#[derive()]` 支持有限数量的 trait。系统还会针对 C++ 代码生成相应\"\n\"的功能，例如，如果您派生了 `Hash`，还会为相应的 C++ 类型生成 `std::hash` 实\"\n\"现。\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated Rust:\"\nmsgstr \"生成的 Rust：\"\n\n#: src/android/interoperability/cpp/shared-enums.md\n#, fuzzy\nmsgid \"Generated C++:\"\nmsgstr \"生成的 C++：\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"在 Rust 端，为共享枚举生成的代码实际上是封装数值的结构体。这是因为在 C++ 中，\"\n\"枚举类存储与所有已列变体不同的值不属于 UB，而 Rust 表示法需要具有相同的行为。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 requires depth > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Success!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"在 C++ 方面，返回 `Result` 的 Rust 函数会被翻译为异常。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"抛出的异常始终是 `rust::Error` 类型，该类型主要用于提供获取错误消息字符串的方\"\n\"法。错误消息将由错误类型的 `Display` impl 提供。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"当 panic 从 Rust 展开到 C++ 时，会始终导致进程立即终止。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"声明用于返回 `Result` 的 C++ 函数将捕获 C++ 端抛出的任何异常，并将其作为 \"\n\"`Err` 值返回给调用 Rust 函数。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"如果外部 “C++”函数抛出l了异常，但 CXX 桥接中未声明该函数用于返回 `Result`，则\"\n\"程序会调用 C++ 的 `std::terminate`。此行为等同于通过 C++ 函数 `nowithout` 抛\"\n\"出了相同的异常。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"C++ 示例\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxString`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::string`\"\nmsgstr \"String\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"这些类型可用于共享结构体的字段以及外部函数的参数和返回结果。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"请注意，Rust 的 `String` 不会直接映射到 `std::string`。导致这种情况的原因有以\"\n\"下几种：\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` 不遵循 `String` 所需的 UTF-8 不变性。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"这两种类型的内存布局不同，因此无法直接在语言之间进行传递。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` 需要与 Rust 的移动语义不匹配的 move 构造函数，因此 `std::\"\n\"string` 无法按值传递给 Rust。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"Building in Android\"\nmsgstr \"Android 中的 Rust\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"创建 `cc_library_static` 以构建 C++ 库，包括 CXX 生成的头文件和源文件。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"指出 `libcxx_test_bridge_header` 和 `libcxx_test_bridge_code` 是 CXX 生成的 \"\n\"C++ 绑定的依赖项。我们将在下一张幻灯片中介绍具体的设置方法。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"请注意，您还需要依靠 `cxx-bridge-header` 库才能提取常见的 CXX 定义。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"如需了解如何在 Android 中使用 CXX 的完整文档，请参阅 [Android 文档](https://\"\n\"source.android.com/docs/setup/build/rust/building-rust-modules/android-rust-\"\n\"patterns#rust-cpp-interop-using-cxx)。建议您与全班同学分享该链接，以便学生知\"\n\"道日后可以在哪里找到这些说明。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"创建两个 genrule：一个用于生成 CXX 头文件，另一个用于生成 CXX 源文件。然后，\"\n\"这些内容会被用作 `cc_library_static` 的输入。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"// Generate a C++ header containing the C++ bindings\"\nmsgstr \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"// to the Rust exported functions in lib.rs.\"\nmsgstr \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\n#, fuzzy\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"// Generate the C++ code that Rust calls into.\"\nmsgstr \"// Generate the C++ code that Rust calls into.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#, fuzzy\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"`cxxbridge` 工具是一款独立工具，用于生成桥接模块的 C++ 端。它包含在 Android \"\n\"中，并作为 Soong 工具提供。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"按照惯例，如果您的 Rust 源文件是 `lib.rs`，则头文件将命名为 `lib.rs.h`，源文\"\n\"件将命名为 `lib.rs.cc`。不过，系统并不强制执行此命名惯例。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"创建一个依赖于 `libcxx` 和 `cc_library_static` 的 `rust_binary`。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"与 Java 的互操作性\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java可以通过 [ Java 本地接口 (JNI)](https://en.wikipedia.org/wiki/\"\n\"Java_Native_Interface) 加载共享对象。[`jni` crate](https://docs.rs/jni/) 允许\"\n\"您创建一个兼容的库。\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"首先，我们创建一个可以导出到 Java 的 Rust 函数：\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"_interoperability/java/src/lib.rs_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI demo.\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// HelloWorld::hello method implementation.\\n\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Hello, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"_interoperability/java/Android.bp_:\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"We then call this function from Java:\"\nmsgstr \"最后，我们可以从 Java 中调用这个函数：\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"_interoperability/java/HelloWorld.java_:\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\n#, fuzzy\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"最后，您可以构建、同步和运行二进制文件：\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"这是一个小组练习：我们将查看你们正在处理的项目之一，并尝试将一些 Rust 代码集\"\n\"成进去。以下是一些建议：\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"使用 Rust 编写的客户端调用你的 AIDL 服务。\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"将你项目中的某个函数迁移到 Rust 中并调用它。\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"此处没有提供解决方案，因为这是开放式的：它依赖于班级中是否有人有一段您可以即\"\n\"时转换成 Rust 的代码。\"\n\n#: src/chromium.md\n#, fuzzy\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"欢迎来到Android 中的Rust\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Chromium 中的第三方库支持 Rust，并使用第一方粘合代码连接 Rust 和现有 \"\n\"Chromium C++ 代码。\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"今天，我们将调用 Rust 对字符串进行一些有趣的操作。如果您的代码中某个部分是用\"\n\"于向用户展示 UTF8 字符串，那么可以在代码库中的对应部分按照这个步骤来操作，而\"\n\"不一定要在我们所讨论的确切部分。\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"请确保您可以构建并运行 Chromium。只要您的代码较新（提交位置始于 1223636，对应\"\n\"于 2023 年 11 月），则可在任何平台和任何一组 build 标志下运行。\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"（建议使用调试 build 组件，以缩短迭代时间。这是默认值！）\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"如果您不具备这点，请参阅 [如何构建 Chromium](https://www.chromium.org/\"\n\"developers/how-tos/get-the-code/)。注意：设置 build Chromium 需要花些时间。\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"此外，我们还建议您安装 Visual Studio 代码。\"\n\n#: src/chromium/setup.md\n#, fuzzy\nmsgid \"About the exercises\"\nmsgstr \"练习简介\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"本课程的这一部分包含一系列练习，它们之间是相辅相成的。我们将在整个课程中进行\"\n\"这些练习，而不仅仅是在最后阶段完成。如果您没有时间完成某个部分，也无需担心：\"\n\"可以在下一阶段赶上进度。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"Rust 社区通常使用 `cargo` 和 [crates.io](https://crates.io/) 中的库。\"\n\"Chromium 是使用 `gn` 和 `ninja` 以及一组精选依赖项而构建。\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"使用 Rust 编写代码时，您可以选择：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"借助 `//build/rust/*.gni` 模板（例如 `rust_static_library`，我们稍后会介绍）\"\n\"使用 `gn` 和 `ninja`。该操作会使用经过审核的 Chromium 工具链和 crate。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"使用 `cargo`，但 [仅限于经过审核的 Chromium 工具链和 crate](https://chromium.\"\n\"googlesource.com/chromium/src/+/refs/heads/main/docs/rust.md#Using-cargo)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"使用 `cargo`，信任 [工具链](https://rustup.rs/) 和/或 [从互联网下载的 crate]\"\n\"(https://crates.io/)\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"从现在开始，我们将重点介绍 `gn` 和 `ninja`，因为这是在 Chromium 浏览器构建 \"\n\"Rust 代码时必会用到的两种方式。同时，Cargo 是 Rust 生态系统的重要组成部分，您\"\n\"应将其视为必备工具。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"习题\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"分成各个小组开展以下活动：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"思考 `cargo` 在哪些场景下具有优势，并评估这些场景的风险状况。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"讨论在使用 `gn` 和 `ninja` 以及离线 `cargo` 等时，需要信任哪些工具、库和人\"\n\"群。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"请要求学生在完成练习前先不要看演讲者备注。假设参加课程的学员们同处一室，请让\"\n\"他们以 3-4 人的小组进行讨论。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"与第一部分练习相关的备注/提示（“Cargo 可能具有优势的场景”）：\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"很棒的是，当我们在编写工具或对 Chromium 的某个部分进行原型设计时，可以轻松访\"\n\"问丰富的 crate.io 库生态系统。几乎可以找到适用于任何需求的 crate，而且非常简\"\n\"单易用。（例如，`clap` 用于命令行解析，`serde 用于序列化/反序列化各种格式，\"\n\"`itertools` 用于和迭代器搭配使用等）。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"借助 `cargo`，您便可以轻松试用库（只需向 `Cargo.toml`` 添加一行代码然后开始编\"\n\"写即可）\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"不妨比较下 CPAN 是如何帮助 `perl` 成为热门之选的。或者与 `python` + `pip` 进\"\n\"行比较。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"良好的开发体验不仅得益于核心 Rust 工具（例如，在测试需要在夜间版、当前稳定版\"\n\"和较旧稳定版上运行的 crate 时，使用 `rustup` 切换到不同的 `rustc` 版本），还\"\n\"得益于第三方工具生态系统（例如，Mozilla 提供的 `cargo vet` 用于简化和共享安全\"\n\"审核流程；`criterion` crate 为运行基准审核提供了便捷方式）。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"借助 `cargo`，您可通过 `cargo install --locked cargo-vet` 轻松添加工具。\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"不妨与 Chrome 扩展程序或 VScode 扩展程序进行比较。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"以下是一些适合选用 `cargo`，较为宽泛的通用项目示例：\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"可能令人惊讶的是，Rust 在编写命令行工具方面越来越受到业界的欢迎。库在广度和工\"\n\"效学设计方面与 Python 相当，同时更稳健（得益于丰富的类型系统）且运行速度更快\"\n\"（作为编译语言而不是解释型语言）。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"如要加入 Rust 生态系统，必须使用 Cargo 等标准 Rust 工具。如果希望库获得外部贡\"\n\"献，并且能够用于除 Chromium 之外（例如用于 Bazel 或 Android/Soong 构建环境）\"\n\"的项目，则应该使用 Cargo。\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"基于 `cargo`\\\\ 的 Chromium 相关项目示例：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient`（已在 Google 的其他部分进行了实验，结果是能使 PR 性能得\"\n\"到提升）\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"字体库（例如 `font-types`）\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"`gnrt` 工具（我们将在本课程稍后的部分中加以介绍）使用 `clap` 进行命令行解析，\"\n\"使用 `toml` 处理配置文件。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"免责声明：必须使用 `cargo` 的一个原因是在构建 Rust 工具链时，无法使用 `gn` 来\"\n\"构建和引导 Rust 标准库。）\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` 使用 Chromium 的 `cargo` 和 `rustc` 副本。虽然 `gnrt` 依赖于从\"\n\"互联网下载的第三方库，但 `run_gnrt.py` 规定 `cargo` 仅允许使用 `Cargo.lock` \"\n\"中以 `--locked` 标记的内容。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"学生可将以下内容认定为隐式信任或明确信任：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc`（Rust 编译器）则依赖于 LLVM 库、Clang 编译器、“rustc”源代码（从 \"\n\"GitHub 获取，并由 Rust 编译器团队审核）、为引导而下载的二进制 Rust 编译器\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup`（值得注意的是，`rustup` 是在 https://github.com/rust-lang/ 保护下组\"\n\"织开发的，与 `rustc` 相同。）\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`、`rustfmt` 等\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"各种内部基础架构（用于构建 `rustc` 的聊天机器人、用于将预构建工具链分发给 \"\n\"Chromium 工程师的系统等。）\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"`cargo Audit`、`cargo vet` 等 Cargo 工具\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"包含到 `//third_party/rust` 的 Rust 库（由 security@chromium.org 进行审核）\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"其他 Rust 库（一些小众但很受欢迎又常用的库）\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Chromium Rust 政策\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium 尚不支持使用第一方 Rust，除非是经过 [区域技术主管](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:ATL_OWNERS) 批准的特殊情况。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"有关 Chromium 的第三方库政策，请参阅 [此处](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#rust)。根据该这些政策，\"\n\"在很多情况下允许将 Rust 作为第三方库使用，包括无论是在性能还是安全方面，它们\"\n\"都是理想之选。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"鲜少有 Rust 库会直接公开 C/C++ API，这意味着几乎所有此类库都需要使用少量的第\"\n\"一方粘合代码。\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 栈                             堆\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"（无法访问）\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"特定第三方 crate 的第一方 Rust 粘合代码通常应放在 `third_party/rust/<crate>/\"\n\"<version>/wrapper` 目录中。\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"因此，今天的课程将重点介绍以下内容：\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"引入第三方 Rust 库 (\\\"crates\\\")\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"编写粘合代码，以便能够从 Chromium C++ 中使用这些 crate。\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"如果此政策随时间而发生变化，则本课程也会随之更新。\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"构建规则\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"Rust 代码通常使用 `cargo` 构建而成。为提高效率，Chromium 使用 `gn` 和 \"\n\"`ninja` 进行构建，其静态规则支持实现最大程度的并行处理。Rust 也不例外。\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"在 Chromium 中添加 Rust 代码\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"在一些现有的 Chromium `BUILD.gn` 文件中，声明 `rust_static_library`：\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"您还可以在其他 Rust 目标上添加 `deps`。稍后，我们通过该操作来使用第三方代码。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"您必须 _同时_ 指定 crate 根目录 _和_ 完整的源代码列表。`crate_root` 是供 \"\n\"Rust 编译器使用的文件，表示编译单元的根文件，通常为 `lib.rs`。`sources` 是所\"\n\"有源文件的完整列表，`ninja` 需要用它来确定何时该进行重新构建。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"（在 Rust 中，并不存在所谓的 Rust `source_set`，因为整个 crate 就是一个编译单\"\n\"元。`static_library` 是最小的单元。）\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"学生可能会疑惑为何我们需要 gn 模板，而不使用 [gn 内置的 Rust 静态库支持]\"\n\"(https://gn.googlesource.com/gn/+/main/docs/reference.\"\n\"md#func_static_library) 进行操作。原因是此模板支持 CXX 互操作性、各项 Rust 功\"\n\"能以及单元测试，我们稍后便会用到其中的一些功能。\"\n\n#: src/chromium/build-rules/unsafe.md\n#, fuzzy\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"添加 `unsafe` Rust 代码\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"默认情况下，禁止在 `rust_static_library` 中使用不安全的 Rust 代码，因为此类代\"\n\"码无法编译。如需使用不安全的 Rust 代码，请将 `allow_unsafe = true` 添加到 gn \"\n\"目标中。（在本课程的稍后部分，我们将介绍在哪些情形下必须这样做。）\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"只需将上述目标添加到某些 Chromium C++ 目标的 `deps` 中即可。\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"在 Rust 代码中，通常会省略类型，这使得拥有强大的 IDE 甚至比 C++ 更为有用。\"\n\"Visual Studio Code 非常适用于在 Chromium 中处理 Rust 代码。如需使用此功能，\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"\"\n\"请确保您的 VSCode 安装了 `rust-analyzer` 扩展程序，而不是较早版本的 Rust 支持\"\n\"插件。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"`gn gen out/Debug --export-rust-project`（或输出目录的等效项）\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`In -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"如果受众群体对 IDE 持有怀疑态度，不妨演示下 rust-analyzer 的部分代码注解和探\"\n\"索功能，或许能让他们改观。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"以下步骤可能会对演示有所帮助（但您也可以选用一段最为熟悉的 Chromium 相关 \"\n\"Rust 代码）：\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"打开 `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"将光标置于 \\\\`qr_code_generator_ffi_glue.rs 中的 `QrCode::new` 调用（大约第 \"\n\"26 行）上\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"\"\n\"演示 **show documentation**（典型绑定：vscode = ctrl ki；vim/CoC = K）。\"\n\n#: src/chromium/build-rules/vscode.md\n#, fuzzy\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"演示 **go to definition**（典型绑定：vscode = F12；vim/CoC = gd）。（然后您会\"\n\"前往 `//third_party/rust/.../qr_code-.../src/lib.rs`。）\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"演示 **outline** 并前往 `QrCode::with_bits` 方法（大约第 164 行；大纲位于 \"\n\"vscode 中的文件资源管理器窗格中；典型绑定：vim/CoC = space o）\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"\"\n\"演示 **type annotations**（`QrCode::with_bits` 方法中提供了一些很好的示例）\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"值得注意的是，修改 `BUILD.gn` 文件后，需要重新运行 `gn gen ... --export-rust-\"\n\"project`（我们将在本课程的练习中多次执行该操作）。\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"构建规则练习\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"在 Chromium build 中，向 `//ui/base/BUILD.gn` 添加新的 Rust 目标，其中包含：\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**重要提示**：请注意，在此处使用 `no_mangle` 会被Rust 编译器视为一种不安全行\"\n\"为，因此需要允许在“gn”目标中使用不安全的代码。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"将这个新的 Rust 目标添加为 `//ui/base:base` 的依赖项。在 `ui/base/resource/\"\n\"resource_bundle.cc` 顶部声明此函数（稍后，我们将介绍如何通过绑定生成工具来自\"\n\"动执行此操作）：\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"从 `ui/base/resource/resource_bundle.cc` 中的某个位置调用此函数，我们建议在\"\n\"从 `ResourceBundle::MaybeMangleLocalizedString` 的顶部调用此函数。构建并运行 \"\n\"Chromium，并确保多次显示 \\\"Hello from Rust!\\\"。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"如果您使用 VSCode，现在就请设置 Rust，以便其能在 VSCode 中正常运行。这对后续\"\n\"练习会很有帮助。如果操作成功，则可使用右键点击 `println!` 上的 \\\"Go to \"\n\"definition\\\"。\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"如何获取帮助\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"适用于 [`rust_static_library` gn 模板] 的选项 (https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"关于 [`#[no_mangle]`] 的详细信息 (https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"关于 [`extern \\\"C\\\"`] 的详细信息 (https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"关于 gn 的 [`--export-rust-project`] 开关的详细信息 (https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#compilation-database) \"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[如何在 VSCode 中安装 rust-analyzer](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"此示例很独特，因为其归根结底是最通用的互操作语言，即 C 语言。C++ 和 Rust 本身\"\n\"都可以声明和调用 C ABI 函数。在本课程的稍后部分，我们会直接将 C++ 和 Rust 关\"\n\"联起来。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"此处需要使用 `allow_unsafe = true`，因为 `#[no_mangle]` 可能会支持 Rust 生成\"\n\"两个同名函数，而 Rust 无法保证会调用正确的函数。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"如果需要纯 Rust 可执行文件，也可以使用 `rust_executable` gn 模板执行此操作。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"示例\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\n#, fuzzy\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Testing exercise\"\nmsgstr \"习题\"\n\n#: src/exercises/chromium/testing.md\n#, fuzzy\nmsgid \"Time for another exercise!\"\nmsgstr \"是时候进行下一个练习了！\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"Rust 社区提供了多种 C++/Rust 互操作选项，并且一直在不断开发新工具。目前，\"\n\"Chromium 使用一种名为 CXX 的工具。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"您可以使用接口定义语言（与 Rust 极为相似）描述整个语言边界，然后 CXX 工具会据\"\n\"此生成 Rust 和 C++ 函数及类型的声明。\"\n\n#: src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"请参阅 [CXX tutorial](https://cxx.rs/tutorial.html) ，了解有关使用的完整示\"\n\"例。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"请仔细研究这个图表。解释背后的原理和您之前所做的完全相同。说明自动执行这一流\"\n\"程具有以下好处：\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"使用该工具可保证 C++ 端和 Rust 端相匹配（例如，如果 `#[cxx::bridge]` 与实际\"\n\"的 C++ 或 Rust 定义不匹配，则会出现编译错误。但使用不同步的手动绑定，可能会导\"\n\"致未定义行为）\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"该工具还可自动生成 FFI thunk（即小型但可兼容 C-ABI 的自由函数），以便适应非 \"\n\"C 语言特性（例如，启用对 Rust 或 C++ 方法的 FFI 调用；而手动实现绑定一般需要\"\n\"自行编写这种顶级的自由函数）\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"该工具和库可以处理一系列核心类型，例如：\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` 可以跨 FFI 边界进行传递，即使它无法保证任何特定的 ABI 或内存布局一致无\"\n\"误。进行手动绑定时，必须手动解构 `std::span<T>` / `&[T]`，并根据指针和长度进\"\n\"行重新构建，但这很容易出错，因为每种语言对于空 slice 的表示方式略有不同\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"系统对 `std::unique_ptr<T>`、`std::shared_ptr<T>` 和/或 `Box` 等智能指针提供\"\n\"原生支持。如果使用手动绑定，则必须传递可兼容 C-ABI 的原始指针，这会增加生命周\"\n\"期和内存安全风险。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"`rust::String` 和 `CxxString` 类型能够识别并处理不同语言之间在字符串表示方面\"\n\"的差异（例如，`rust::String::lossy` 可以通过非 UTF8 输入构建 Rust 字符串；\"\n\"`rust::String::c_str` 可以为字符串加上 NUL 终止符）。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"\"\n\"根据 CXX 要求，在 `.rs` 源代码内的 `cxx::bridge` “模块”中声明整个 C++/Rust 边\"\n\"界。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"// Definitions of Rust types and functions go here\"\nmsgstr \"// Definitions of Rust types and functions go here\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"指出：\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"RRust 对 C++ 的 `std::unique_ptr` 提供原生支持\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"RRust 对 C++ 的 `std::unique_ptr` 提供原生支持\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"从 C++ 调用 Rust，并使用 Rust 类型（顶部位置）\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"从 Rust 调用 C++，并使用 C++ 类型（底部位置）\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**常见误解**：这 _看似_ Rust 在解析 C++ 头文件，其实具有误导性。Rust 不会对此\"\n\"头文件进行解释，只是在生成的 C++ 代码中添加 `#include`，以便于 C++ 编译器 使\"\n\"用。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\n#, fuzzy\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"展示 [Rust 和 C++类型](https://cxx.rs/bindings.html) 之间的对应关系：\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX 基本适用于以下情况：\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"您的 Rust-C++ 接口非常简单，可以声明其中的全部内容。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"目前，您只使用了 CXX 提供原生支持的类型，例如 `std::unique_ptr`、`std::\"\n\"string`、`&[u8]` 等。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"这样具有很多局限性，例如缺少对 Rust 的 `Option` 类型的支持。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"由于这些局限，我们在 Chromium 中只能将 Rust 用于隔离紧密的 “叶节点”，而无法用\"\n\"于任意的 Rust-C++ 互操作。当您打算在 Chromium 中探索 Rust 的应用场景时，推荐\"\n\"先从拟定针对语言边界的 CXX 绑定入手，以查看该语言边界是否足够简单明了。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"此外，还应讨论使用 CXX 时的其他一些困难之处，例如：\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"其根据 C++ 异常来进行错误处理（下一张幻灯片中将加以介绍）\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"函数指针使用起来很不方便。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"CXX 对于 `Result<T,E>` 类型的支持取决于 C++ 异常机制，因此无法在 Chromium 中\"\n\"使用该功能。替代选项：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"错误处理\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#, fuzzy\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"如果操作成功，则可用简单的布尔值进行表示，如 [二维码生成器](https://source.\"\n\"chromium.org/chromium/chromium/src/+/main:components/qr_code_generator/\"\n\"qr_code_generator_ffi_glue.rs;l=10) 中的原理一样：返回表示操作成功的布尔值，\"\n\"并使用输出参数记录结果：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\n#, fuzzy\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"错误处理\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// ()>`.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"Using cxx in Chromium\"\nmsgstr \"在 Chromium 中使用 cxx\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"在 Chromium 中，针对每个需要使用 Rust 的叶节点，我们定义独立的 `#[cxx::\"\n\"bridge] mod`。通常，每个 `rust_static_library` 都有对应的定义。只需将\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"添加到您现有的 `rust_static_library` 以及 `crate_root` 和 `sources` 的目标\"\n\"中。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"C++ 头文件会在合理的位置生成，因此您只需\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"您会发现，`//base` 中提供了一些实用函数，可将 Chromium C++ 类型与 CXX Rust 类\"\n\"型相互转换，例如 [`SpanToRustSlice`](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:base/containers/span_rust.h;l=21)。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"学生可能会问：为什么我们仍然需要 `allow_unsafe = true`？\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"总的来说，按照常规 Rust 标准，没有任何 C/C++ 代码是 “安全”的。在 Rust 中来回\"\n\"调用 C/C++ 可能会对内存执行任意操作，并危及 Rust 自身数据布局的安全性。如果 \"\n\"C/C++ 互操作性中出现 _过多_ 的 `unsafe` 关键字，可能会损害此类关键字的信噪\"\n\"比，并且 [存在争议](https://steveklabnik.com/writing/the-cxx-debate)。但严格\"\n\"地说，将任何外部代码引入 Rust 二进制文件可能会导致 Rust 中出现意外行为。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\n#, fuzzy\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"具体答案可在本页顶部的图表中找到：CXX 会在后台生成 Rust `unsafe` 和 `extern \"\n\"\\\"C\\\"` 函数，与我们在上一部分手动生成的函数类似。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"与 C 的互操作性\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"第一部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"在您之前创建的 Rust 文件中，添加 `#[cxx::bridge]` 来指定一个将从 C++ 调用的函\"\n\"数（名为 `hello_from_rust`），该函数不接受任何参数也不返回任何值。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"修改之前的 `hello_from_rust` 函数，移除 `extern \\\"C\\\"` 和 `#[no_mangle]`。现\"\n\"在，这只是一个标准的 Rust 函数。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"请修改 `gn` 目标以构建这些绑定。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"在 C++ 代码中，移除 `hello_from_rust` 的正向声明，然后添加生成的头文件。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Build and run!\"\nmsgstr \"构建并运行！\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"第二部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"\"\n\"建议尝试操作一下 CXX。这有助于您更好地理解 Rust 在Chromium 中的灵活性。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Some things to try:\"\nmsgstr \"一些注意事项：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"从 Rust 回调到 C++。您需要执行以下操作：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"创建一个附加头文件，且您可以从 `cxx::bridge` 对其进行 `include!` 操作。您需要\"\n\"在这个新的头文件中声明要调用的 C++ 函数。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"创建一个 `unsafe` 代码块，用于调用此类函数，也可以在 `#[cxx::bridge]` 中指定 \"\n\"`unsafe` 关键字，[如此处所述](https://cxx.rs/extern-c++.html#functions-and-\"\n\"member-functions)。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"您可能还需要添加 `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.h\\\"`\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"将 C++ 字符串从 C++ 传递到 Rust。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"将对 C++ 对象的引用传递到 Rust。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"刻意让 Rust 函数签名与 `#[cxx::bridge]` 不匹配，并逐渐熟悉所看到的错误信息。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"刻意让 C++ 函数签名与 `#[cxx::bridge]` 不匹配，并适应您看到的错误。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"将某个类型的 `std::unique_ptr` 从 C++ 传递到 Rust，以便 Rust 拥有某个 C++ 对\"\n\"象的所有权。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"创建一个 Rust 对象并将其传递到 C++，以便 C++ 拥有它的所有权。（提示：您需要使\"\n\"用 `Box`）。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"声明调用某个 C++ 类型的方法。从 Rust 调用它们。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"声明调用某个 Rust 类型的方法。从 C++ 调用它们。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"第三部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"现在，您已经了解了 CXX 互操作性的优势和局限，请思考几个 Rust 在 Chromium 中的\"\n\"应用场景，其中接口要足够简单构思该如何定义该接口。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"展示 [Rust 和 C++类型](https://cxx.rs/bindings.html) 之间的对应关系：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` gn 模板](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"您可能会遇到以下问题：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"当我用类型 Y 初始化类型 X 的变量时，出现了初始化问题，其中 X 和 Y 都是函数类\"\n\"型。这是因为您的 C++ 函数实现与 `cxx::bridge` 中的声明并不完全一致。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"我好像能随意将 C++ 引用转换为 Rust 引用。这样不会导致 UB 风险吗？对于 CXX 的_\"\n\"不透明_类型，答案为否，因为它们的大小为零。对于 CXX 的基本类型，确实_有可能_\"\n\"导致 UB，但鉴于 CXX 的设计策略，要构建能导致这种情况的示例颇为困难。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Rust 库被称为 `crate`，可在 [crates.io](https://crates.io) 中找到。Rust 的 \"\n\"crate 之间非常容易相互依赖。事实证明，他们确实如此！\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"属性\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"C++ library\"\nmsgstr \"库\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Rust crate\"\nmsgstr \"Rust 生态系统\"\n\n#: src/chromium/adding-third-party-crates.md\n#, fuzzy\nmsgid \"Build system\"\nmsgstr \"Rust 生态系统\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"很多\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"保持一致：`Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"典型库的大小\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"大\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"小\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"传递依赖项\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"很少\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"对于 Chromium 工程师来说，这种依赖关系具有以下利弊：\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"\"\n\"所有 crate 都使用共同的构建系统，这样我们就可以自动将其收录到 Chromium 中...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"...但是，crate 通常具有传递依赖项，因此可能需要引入多个库。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"我们将讨论以下内容：\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"如何将 crate 添加到 Chromium 源代码树中\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"如何为其制定 `gn` 构建规则\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"如何审核其源代码以确保足够的安全性。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"配置 `Cargo.tom` 文件以添加 crate\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium 具有一组集中管理的直接 crate 依赖项。这些依赖项通过单独的 [`Cargo.\"\n\"toml`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/\"\n\"rust/chromium_crates_io/Cargo.toml) 文件进行管理：\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"与任何其他 `Cargo.toml` 一样，您可以指定 [有关依赖项的更多详细信息](https://\"\n\"doc.rust-lang.org/cargo/reference/specifying-dependencies.html)。最常见的是，\"\n\"您需要指定要在 crate 中启用的 `features`。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"向 Chromium 中添加 crate 时，通常需要在附加文件 `gnrt_config.toml` 中提供一些\"\n\"额外的信息，我们将在下文中加以介绍。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"与 `Cargo.toml` 一起使用的是 [`gnrt_config.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/\"\n\"gnrt_config.toml)。此文件包含 Chromium 专用扩展程序，可用于处理 crate。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"如果添加新的 crate，至少要明确指定 `group`。可以为以下选项之一：\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"例如：\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"根据 crate 源代码布局，您可能还需要使用此文件指定其 `LICENSE` 文件的所在位\"\n\"置。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"稍后，我们将介绍需要在此文件中配置的其他内容，以便能够解决问题。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"\"\n\"有一款名为 `gnrt` 的工具，具有下载 crate 以及生成 `BUILD.gn` 规则的功能。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"首先，按如下所示下载所需的 crate：\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"虽然 `gnrt` 工具是 Chromium 源代码的一部分，但通过运行此命令，您可以从 \"\n\"`crates.io` 下载并运行其依赖项。有关该安全决策的讨论，请参阅 [前面的部分](../\"\n\"cargo.md)。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"运行此 `vendor` 命令可能会下载以下内容：\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\n#, fuzzy\nmsgid \"Your crate\"\nmsgstr \"实用 crate\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"直接依赖项和传递依赖项\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"`cargo` 要求的其他 crate 的新版本，用于解析 Chromium 所需的全部 crate。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium 会修复一些 crate 的补丁，并将其保存在 `//third_party/rust/\"\n\"chromium_crates_io/patches` 中。系统会自动重新应用这些补丁，但如果补丁应用失\"\n\"败，您可能需要进行手动操作。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"下载 crate 后，按如下方式生成 `BUILD.gn` 文件：\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"现在，运行 `git status`。您应该会看到：\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"`third_party/rust/chromium_crates_io/vendor` 中至少包含一个新的 crate 源代码\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"`third_party/rust/<crate name>/v<major semver version>` 中至少包含一个新的 \"\n\"`BUILD.gn`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"相应的 `README.chromium`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"请参阅 [Rust 引用](https://doc.rust-lang.org/reference/type-layout.html)。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"请仔细观察，尤其是 `third_party/rust` 中生成的内容。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"浅谈下 semver，特别是在 Chromium 中，它支持使用多个不兼容的 crate 版本。虽然\"\n\"在 Cargo 生态系统中不鼓励这种方式，但在某些情况下却是必要的。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"如果构建失败，可能是 `build.rs` 文件所致：这些程序在构建过程中执行了任意操\"\n\"作。这与 `gn` 和 `ninja` 的设计完全不相符，它们旨在实现静态、确定性的构建规\"\n\"则，以最大限度地提高构建的并行性和可重复性。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"系统支持自动进行某些 `build.rs` 操作；而有些需要进行额外的处理：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"构建脚本效果\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"我们的 gn 模板均支持\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"您需要完成的工作\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"检查 rustc 版本以配置启用和停用功能\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"是\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"无\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"检查平台或 CPU 以配置启用和停用功能\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Generating code\"\nmsgstr \"生成 代码\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"是的，在 `gnrt_config.toml` 中指定\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"构建 C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"否\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"进行补丁修复\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\n#, fuzzy\nmsgid \"Arbitrary other actions\"\nmsgstr \"任意其他操作\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"幸运的是，大多数 crate 不包含构建脚本，而且大多数的构建脚本只执行前两项操作。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"\"\n\"如果 `ninja` 提示有文件缺失，请检查 `build.rs`，确认其是否写入了源代码文件。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"如果是，请修改 [`gnrt_config.toml`](../configuring-gnrt-config-toml.md)，将 \"\n\"`build-script-outputs` 添加到 crate。如果这是一个传递依赖项（即 Chromium 代码\"\n\"不应直接依赖的依赖项），还要添加 `allow-first-party-usage=false`。该文件中已\"\n\"经提供了若干示例：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [ \\\"tables.rs\\\" ]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"现在，请重新运行 [`gnrt.py -- gen`](../generating-gn-build-rules.md)，重新生\"\n\"成 `BUILD.gn` 文件，以通知 ninja 此特定输出文件将被用作后续构建步骤的输入。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"有些 crate 使用 [`cc`](https://crates.io/crates/cc) crate 来构建和关联 C/C++ \"\n\"库。其他 crate 会在其构建脚本中使用 [`bindgen`](https://crates.io/crates/\"\n\"bindgen) 解析 C/C++。Chromium 环境中不支持进行这些操作，因为我们的 gn、ninja \"\n\"和 LLVM 构建系统在表达构建操作之间的关系方面具有非常严格具体的要求。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"因此，您可以选择：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"避开这些 crate\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"对 crate 应用补丁。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"补丁应保存在 `third_party/rust/chromium_crates_io/patches/<crate>` 中，请参\"\n\"阅 [面向 `cxx` crate 的补丁](https://source.chromium.org/chromium/chromium/\"\n\"src/+/main:third_party/rust/chromium_crates_io/patches/cxx/) 中的示例。每当 \"\n\"`gnrt` 升级该 crate 时，将会自动应用补丁文件。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"添加第三方 crate 并生成构建规则后，就可轻松使用该 crate。请找到 \"\n\"`rust_static_library` 目标，并在 crate 中的 `:lib` 目标上添加 `dep`。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"Specifically,\"\nmsgstr \"特定于操作系统\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\"/:\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\n#, fuzzy\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"审核第三方 crate\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"添加新库须遵守 Chromium 的标准 [政策](https://chromium.googlesource.com/\"\n\"chromium/src/+/refs/heads/main/docs/rust.md#Third_party-review)，当然也要遵守\"\n\"安全审核标准。您可能不仅要引入单个 crate，而且还要引入传递依赖项，因此可能需\"\n\"要审核大量代码。另一方面，安全的 Rust 代码可能产生的副作用有限。应如何对其进\"\n\"行审核？\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"随着时间的推移，Chromium 计划逐步采用以 [cargo vet](https://mozilla.github.\"\n\"io/cargo-vet/) 为核心的处理流程。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"与此同时，每当添加新的 crate 时，我们都会检查以下内容：\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"了解每个 crate 的用途。crate 之间存在什么关系？如果每个 crate 的构建系统都包\"\n\"含 `build.rs` 或过程宏，请确定它们的用途。它们能否与 Chromium 的正常构建方式\"\n\"相兼容。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"检查每个 crate 是否得到合理维护。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"使用 `cd third-party/rust/chromium_crates_io; cargo review` 检查已知漏洞（首\"\n\"先需要运行 `cargo install cargo-audit`，令人意外的是，这个过程中需要从互联网\"\n\"下载大量的依赖项 [2](../cargo.md)）\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"确保所有 `unsafe` 代码都符合 [两大规则](https://chromium.googlesource.com/\"\n\"chromium/src/+/main/docs/security/rule-of-2.md#unsafe-code-in-safe-\"\n\"languages) 的要求\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"检查是否使用了 `fs` 或 `net` API\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"尽可能地仔细阅读所有代码，查找任何可能属于恶意插入，稍显异常的地方。（但现实\"\n\"中，您不可能做到百无遗漏，因为代码量通常太庞大了。）\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"以下只是一些指导建议，请与 `security@chromium.org` 的审核者合租，共同找出能够\"\n\"确保 crate 安全的正确方法。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\n#, fuzzy\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"将 crate 签入 Chromium 源代码\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` 应显示以下内容：\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"`//third_party/rust/chromium_crates_io` 中的 crate 代码\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"`//third_party/rust/<crate>/<version>` 中的元数据（`BUILD.gn` 和 `README.\"\n\"chromium`）\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"此外，请在后面的位置添加 `OWNERS` 文件。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"您应将所有这些内容，以及对 `Cargo.toml` 和 `gnrt_config.toml` 的更改一起提交\"\n\"到 Chromium 仓库中。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**重要提示**：您需要使用 `git add -f` 命令，否则 `.gitignore` 文件可能会导致\"\n\"某些文件被跳过。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"在此过程中，您可能会发现由于使用了非包容性语言，导致提交前检查失败。这是因为 \"\n\"Rust crate 数据往往包含 git 分支的名称，而许多项目仍然在使用非包容性术语。因\"\n\"此，您需要运行以下命令：\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"作为任何第三方 Chromium 依赖项的所有者，您 [应使用任何安全修复程序，确保该依\"\n\"赖项处于最新状态](https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#add-owners)。我们希望能够尽快实现对 Rust crate 自动\"\n\"执行此操作，但目前仍由您负责执行，就像对待任何其他第三方依赖项一样。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"将 [uwuify](https://crates.io/crates/uwuify) 添加到 Chromium，以停用 crate \"\n\"的 [默认功能](https://doc.rust-lang.org/cargo/reference/features.html#the-\"\n\"default-feature)。假设该 crate 会交付 Chromium 时被使用，但不会用于处理不可信\"\n\"的输入内容。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"（在下一个练习中，我们将使用 Chromium 中的 uwuify；但您也可以跳过这一步，现在\"\n\"就开始此操作。或者，您可以创建一个使用 `uwuify` 的新 [`rust_executable` 目标]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_executable.gni)。\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"学生们需要下载很多传递依赖项\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"`instant`,\"\nmsgstr \"例如：\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"\"\n\"所需的全部 crate 包括：uwuify、smallvec、scopeguard、parking_lot、\"\n\"park_lot_core、lock_api 和 Instant。如果学生下载的 crate 数目比这还多，则他们\"\n\"可能忘了停用默认功能。\"\n\n#: src/exercises/chromium/third-party.md\n#, fuzzy\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"感谢 [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) 提供此 crate！\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"综合应用练习\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"在本练习中，您将运用之前所学的全部知识，添加一项全新的 Chromium 功能。\"\n\n#: src/exercises/chromium/bringing-it-together.md\n#, fuzzy\nmsgid \"The Brief from Product Management\"\nmsgstr \"“产品管理”简介\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"在偏僻的热带雨林中，发现住着一群小精灵。我们务必尽快创建一款精灵版 Chromium，\"\n\"交付给他们。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"要求是将 Chromium 的所有界面字符串翻译为精灵语。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"由于时间紧迫，无法等待准确的翻译。但幸运的是，精灵语与英语非常接近，然后我们\"\n\"发现有一个 Rust crate 可以执行此翻译任务。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"事实上，您已经 [在上一个练习中导入了该 crate](https://crates.io/crates/\"\n\"uwuify)。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"\"\n\"（显然，对 Chrome 进行准确恰当的翻译，需要做到极度细致和全力以赴。请勿交付此\"\n\"产品！）\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"步骤\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"修改 `ResourceBundle::MaybeMangleLocalizedString`，在显示之前对所有字符串进\"\n\"行 uwu 处理。在这个特殊的 Chromium 版本中，无论 `mangle_localized_strings_` \"\n\"的设置如何，都应该始终执行此操作。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"\"\n\"如果您正确完成了这些练习中的所有操作，那么恭喜您已经成功创建了一款精灵版 \"\n\"Chrome！\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 与 UTF8。学生应注意，Rust 字符串始终采用 UTF8 编码，它们可能会决定在 C+\"\n\"+ 端使用 `base::UTF16ToUTF8` 进行转换，然后再进行反向转换。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"如果学生决定在 Rust 端进行转换，则需要考虑使用 [`String::from_utf16`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf16) \"\n\"方法，同时注意错误处理，并确定哪些 [CXX 支持的类型可以传输大量 u16s](https://\"\n\"cxx.rs/binding/slice.html)。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"学生可以通过多种方式设计 C++/Rust 边界，例如按值传递和返回字符串，或对字符串\"\n\"采取可变引用。如果使用可变引用，CXX 可能会提示学生需要使用 [`Pin`](https://\"\n\"doc.rust-lang.org/std/pin/) 方法。您可能需要解释“Pin”的用途，以及为何 CXX 需\"\n\"要它来对 C++ 数据进行可变引用：原因是 C++ 数据无法像 Rust 数据那样自由移动，\"\n\"它可能包含自引用指针。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"对于包含 `ResourceBundle::MaybeMangleLocalizedString` 的 C++ 目标，需要依赖\"\n\"于 `rust_static_library` 目标。学生可能已经执行了此操作。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"`rust_static_library` 目标需要依赖于 `//third_party/rust/uwuify/v0_2:lib`。\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\n#: src/bare-metal.md\n#, fuzzy\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"欢迎来学习裸机 Rust\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"这是单独为裸机 Rust 开设的课程，为期一天，主要面向熟悉 Rust 基础知识的人员\"\n\"（例如已学完 Comprehensive Rust），最好也有一些使用其他语言（例如 C）进行裸机\"\n\"编程的经验。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"今天，我们将探讨 `bare-metal` Rust：即在没有操作系统支持的情况下运行 Rust 代\"\n\"码。该部分主要分为以下内容：\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"什么是 `no_std` Rust？\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"编写微控制器固件。\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"为应用处理器编写引导加载程序 / 内核代码。\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"有助于裸机 Rust 开发的一些实用 crate。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"在本课程的微控制器部分，我们将使用 [BBC micro:bit](https://microbit.org/) v2 \"\n\"作为示例。这是一款基于 Nordic nRF51822 微控制器的 [开发板](https://tech.\"\n\"microbit.org/hardware/)，配有一些 LED 和按钮、连接 I2C 的加速度计和罗盘，以及\"\n\"板载 SWD 调试程序。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"首先，请安装我们稍后需要用到的一些工具。在 gLinux 或 Debian 上：\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"然后，向 `plugdev` 组中的用户授予 micro:bit 编程器的访问权限：\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"在 MacOS 上：\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"Slice、`&str`、`CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`、`Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`、`Debug`、`write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`、`assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` 和所有常见的指针相关函数\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` 和 `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`、`AtomicBool`、`AtomicPtr`、`AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`、`Cow`、`Arc`、`Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`、`BinaryHeap`、`BtreeMap`、`LinkedList`、`VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`、`CString`、`format!`\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`、`Condvar`、`Barrier`、`Once`、`RwLock`、`mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` 和 `fs` 的其余部分\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`、`Read`、`Write`、`Stdin`、`Stdout` 以及 `io` 的其余部分\"\n\n#: src/bare-metal/no_std.md\n#, fuzzy\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`、`OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`、`Child`、`ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`、`sleep` 和 `thread` 的其余部分\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`、`Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` 依赖于 RNG。\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` 会重新导出 `core` 和 `alloc` 的内容。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"极小的 `no_std` 程序\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"这将编译为空二进制文件。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"`std` 提供了一个 panic 处理程序；如果没有它，我们就必须自行提供。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"其他 crate（例如 `panic-halt`）也可以提供该处理程序。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"根据目标不同，可能需要使用 `panic = \\\"abort\\\"` 进行编译，以避免出现与 \"\n\"`eh_personality` 相关的错误。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"请注意，未提供 `main` 函数或任何其他入口点；您可以自行定义入口点。通常需要使\"\n\"用链接器脚本和一些汇编代码进行设置工作，以便 Rust 代码能够顺利运行。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"如需使用 `alloc`，您必须实现 [全局（堆）分配器](https://doc.rust-lang.org/\"\n\"stable/std/alloc/trait.GlobalAlloc.html)。\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"// SAFETY: `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Give the allocator some memory to allocate.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Now we can do things that require heap allocation.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` 是第三方 crate，用于实现基本伙伴系统分配器。还可以使\"\n\"用其他 crate，或者自行编写 crate，或者接入现有分配器。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"`LockedHeap` 的常量参数是分配器的最大阶数；即在本例中，它可以最多分配 \"\n\"2\\\\*\\\\*32 字节大小的区域。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"如果依赖项树中的所有 crate 都依赖于 `alloc`，则您必须在二进制文件中明确定义一\"\n\"个全局分配器。通常，在顶级二进制 crate 中完成此操作。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"为了确保能够成功关联 `panic_halt` crate，以便我们获取其 panic 处理程序，必须\"\n\"使用 `extern crate panic_halt as _` 方法。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"我们可以构建该示例，但由于没有入口点，无法运行。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"`cortex_m_rt` crate 提供针对 Cortex M 微控制器的重置处理程序（以及其他内\"\n\"容）。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"接下来，我们看看随着抽象层级的不断提升，该如何访问外围设备。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"`cortex_m_rt::entry` 宏要求函数的类型为 `fn() -> !`，因为返回重置处理程序会毫\"\n\"无意义。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"使用 `cargo embed --bin minimum` 运行该示例\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"大多数微控制器通过内存映射 IO 访问外围设备。现在试着开启 micro:bit 上的 LED \"\n\"指示灯：\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// GPIO port 0 peripheral address\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// GPIO peripheral offsets\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// PIN_CNF fields\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: The pointers are to valid peripheral control registers, and no\\n\"\n\"    // aliases exist.\\n\"\nmsgstr \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"将 GPIO 0 的引脚 21 连接到 LED 矩阵的第一列，将引脚 28 连接到第一行。\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"使用以下命令运行该示例：\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"外围设备访问 crate\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) 使用 [CMSIS-SVD](https://www.\"\n\"keil.com/pack/doc/CMSIS/SVD/html/index.html) 文件为内存映射外围设备生成了大部\"\n\"分安全的 Rust 封装容器。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"SVD（系统视图描述）文件通常是由芯片供应商提供的 XML 文件，用于描述设备的内存\"\n\"映射。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"这些文件按照外围设备、寄存器、字段和值进行组织分类，其中包含名称、内容描述、\"\n\"地址等信息。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"由于 SVD 文件常常存在错误和不完整的情况，因此有许多项目会修复这些错误，补充缺\"\n\"失的相关信息，并发布生成的 crate。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` 提供矢量表以及其他功能。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"如果您使用 `cargo install cargo-binutils`，则可以运行 `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn`，查看生成的二进制文件。\"\n\n#: src/bare-metal/microcontrollers/hals.md\n#, fuzzy\nmsgid \"HAL crates\"\nmsgstr \"HAL crate\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"许多微控制器的 [HAL crate](https://github.com/rust-embedded/awesome-embedded-\"\n\"rust#hal-implementation-crates) 为各种外围设备提供了封装容器。通常，这些封装\"\n\"容器可以实现 [`embedded-hal`](https://crates.io/crates/embedded-hal) 中的各\"\n\"种 trait。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Create HAL wrapper for GPIO port 0.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"`set_low` 和 `set_high` 是 `embedded_hal` `OutputPin` trait 上的方法。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"HAL crate 被广泛用于许多 Cortex-M 和 RISC-V 设备，包括各种 STM32、GD32、nRF、\"\n\"NXP、MSP430、AVR 和 PIC 微控制器。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\n#, fuzzy\nmsgid \"Board support crates\"\nmsgstr \"板级支持 crate\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"为了方便使用，板级支持 crate 为特定开发板提供了更高级别的封装功能。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"在本例中，该板级支持 crate 仅提供了一些实用的名称和初始化功能。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"除微控制器以外，该 crate 还包含一些可用于板载设备的驱动程序。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` 包含一个可用于 LED 矩阵的简单驱动程序。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"类型状态模式\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"引脚无法实现 `Copy` 或 `Clone`，因此，每个引脚只能存在一个实例。一旦某个引脚\"\n\"从端口结构体移出，任何人都无法再使用它。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"更改引脚的配置会使旧的引脚实例失效，因此您无法再继续使用旧实例。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"值的类型表示其所处状态：例如，在本例中，表示 GPIO 引脚的配置状态。通过这种方\"\n\"式，可将状态机编码成类型系统，并确保在未正确完成引脚配置之前，不会尝试以某种\"\n\"方式使用引脚。编译时捕获了非法状态转换。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"您可以在输入引脚上调用 `is_high`，在输出引脚上调用 `set_high`，反之则不行。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"许多 HAL crate 都遵循此模式。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal) crate 提供许多适用于\"\n\"常见微控制器外围设备的 trait。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"ADC\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"I2C、SPI、UART、CAN\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"RNG\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"定时器\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"监控定时器\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\"然后，其他 crate 可以根据这些 trait 实现 [驱动程序](https://github.com/rust-\"\n\"embedded/awesome-embedded-rust#driver-crates)，例如加速度计驱动程序可能需要通\"\n\"过 I2C 或 SPI 总线实现。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"还有适用于许多微控制器以及其他平台（例如 Raspberry Pi 上的 Linux）的实现。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"我们正在开发 `async` 版本的 `embedded-hal`，但目前还欠缺稳定性。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) 是一个方便的嵌入式调试工具集，跟 OpenOCD 较为相\"\n\"似，但集成度更高。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"通过 CMSIS-DAP、ST-Link 和 J-Link 探针实现 SWD（串行调试）和 JTAG\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB 桩和 Microsoft DAP（调试适配器协议）服务器\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"Cargo integration\"\nmsgstr \"Cargo 集成\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed` 是一个 cargo 子命令，用于构建和刷写二进制文件、记录 RTT（实时传\"\n\"输）输出以及连接 GDB。您可通过项目目录中的 `Embed.toml` 文件对其进行配置。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) 是一\"\n\"项基于 USB 的 Arm 标准协议，使得电路内调试程序能够接入各种 Arm Cortex 处理器\"\n\"的 CoreSight 调试访问端口。BBC micro:bit 的板载调试程序所使用的便是此协议。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"ST-Link 属于 ST Microelectronics 产品系列，J-Link 是 SEGGER 系列。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"调试访问端口通常为 5 针 JTAG 接口或 2 针串行线调试接口。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"probe-rs 是一个库，如有需要，可以将其集成到您的工具中。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"借助 [Microsoft 调试适配器协议](https://microsoft.github.io/debug-adapter-\"\n\"protocol/)，VSCode 和其他 IDE 可以调试任何受支持的微控制器上运行的代码。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed 是使用 probe-rs 库构建的二进制文件。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT（实时传输）是一种通过多个环形缓冲区，在调试主机和目标之间进行数据传输的机\"\n\"制。\"\n\n#: src/bare-metal/microcontrollers/debugging.md\n#, fuzzy\nmsgid \"_Embed.toml_:\"\nmsgstr \"_Embed.toml_:\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"在 `src/bare-metal/microcontrollers/examples/` 目录下某个终端中：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"在同一目录下的另一个终端中：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"在 gLinux 或 Debian 上：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"在 GDB 中，请尝试运行以下命令：\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\n#, fuzzy\nmsgid \"Other projects\"\nmsgstr \"其他项目\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"共享资源管理、消息传递、任务调度、定时器队列\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"具有优先级、计时器、网络和 USB 功能的 `async` 执行器\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"以安全为中心的 RTOS，具有抢占式调度功能和提供内存保护单元支持\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"Oxide Computer Company 开发的微内核 RTOS，提供内存保护、非特权驱动程序和 IPC \"\n\"功能\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[FreeRTOS 的绑定](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"有些平台可以实现 `std`，例如 [esp-idf](https://esp-rs.github.io/book/\"\n\"overview/using-the-standard-library.html)。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC 可被视为 RTOS 或并发框架，\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"但不包含任何 HAL。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"它使用 Cortex-M NVIC（嵌套虚拟中断控制器）进行调度，而不是选用适合的内核。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"仅限 Cortex-M。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"Google 在 Haven 微控制器上使用 TockOS 作为 Titan 安全密钥的操作系统。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"FreeRTOS 主要使用 C 语言编写，但也提供了专用于编写应用的 Rust 绑定。\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"我们将从 I2C 罗盘读取方向，并将读数记录到串行端口。\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"读完习题后，可以阅读本书提供的 \\\\[题解\\\\]。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"我们将从 I2C 罗盘读取方向，并将读数记录到串行端口。如有时间，请尝试通过 LED \"\n\"灯亮起的方式，或者使用按钮来显示方向。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"提示：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"请参阅 [`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) 和 \"\n\"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) crate，以及 \"\n\"[micro:bit 硬件](https://tech.microbit.org/hardware/) 相关文档。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"LSM303AGR 惯性测量装置与内部 I2C 总线相连接。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"TWI 是 I2C 的别称，因此 I2C 主外围设备称为 TWIM。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"LSM303AGR 驱动程序需要使用某种方法来实现 `embedded_hal::blocking::i2c::\"\n\"WriteRead` trait。[`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/hal/struct.Twim.html) 结构体便可以做到这一点。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"您拥有一个 [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) 结构体，其中包含各种引脚和外围设备的字段。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"如有需要，您还可以查看 [nRF52833 数据表](https://infocenter.nordicsemi.com/\"\n\"pdf/nRF52833_PS_v1.5.pdf)，但对本练习来说这不是必需的。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"下载 [练习模板](../../comprehensive-rust-exercises.zip) 并在 `compass` 目录中\"\n\"查找以下文件。\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\n#, fuzzy\nmsgid \"_src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Cargo.toml_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"_Embed.toml_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \"_.cargo/config.toml_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"运行以下命令查看 Linux 上的串行输出：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"或者在 Mac OS 上，如下所示（设备名称可能略有不同）：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"使用 Ctrl+A Ctrl+Q 退出 picocom。\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"裸机 Rust 上午练习\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([返回练习](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configure serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Setting up IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Set up display and timer.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Ready.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Read compass data and log it to the serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\n#, fuzzy\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs on.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"应用处理器\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"到目前为止，我们已经讨论了微控制器，例如 Arm Cortex-M 系列。现在，尝试为 \"\n\"Cortex-A 编写一些代码。为简单起见，我们只使用 QEMU 的 aarch64 [`virt`]\"\n\"(https://qemu-project.gitlab.io/qemu/system/arm/virt.html) 开发板 进行编写。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"一般来说，微控制器不具备 MMU 或多级特权（例如，Arm CPU 中的异常级别，x86 中的\"\n\"铃声级别）的功能，而应用处理器则具备这些功能。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU 支持针对每种架构模拟不同的机器或板级模型。“虚拟”开发板并不适用于任何特定\"\n\"的真实硬件，而是专为虚拟机设计的。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"在开始运行 Rust 代码之前，我们需要进行一些初始化设置。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS.*/\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1.*/\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section.*/\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack.*/\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector.*/\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code.*/\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts.*/\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"这与 C 语言的情况相同：初始化处理器状态，将 BSS 清零，然后设置堆栈指针。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"BSS（由于历史原因，称为代码块起始符）属于对象文件的一部分，其中包含静态分配的\"\n\"变量，这些变量被初始化为零。图像中省略了这些符号，以避免因存储零值而占用过多\"\n\"空间。编译器假定加载器会负责将它们清零。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"BSS 可能已经被清零，具体取决于内存的初始化方式以及图像的加载方式，但为了确保\"\n\"起见，我们会将其手动清零。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"我们需要先启用 MMU 和缓存功能，然后才能读取或写入任何内存。否则：\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"非对齐访问将会出错。我们为 `aarch64-unknown-none` 目标构建 Rust 代码，该目标\"\n\"会设置 `+Strict-align` 以防止编译器生成非对齐访问，因此在本例中应该没有问题，\"\n\"但一般情况下并不一定如此。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"如果是在虚拟机中运行该命令，可能会导致缓存一致性问题。问题在于，虚拟机是在禁\"\n\"用缓存的情况下直接访问内存，而主机具有同一内存的缓存别名。即使主机并没有明确\"\n\"访问该内存，推测性访问仍然会导致缓存被填充，然后在清除缓存或虚拟机启用缓存\"\n\"时，任何一方对于该内存进行的更改就会丢失。（使用物理地址来键控缓存，而 VA 或 \"\n\"IPA。）\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"为简单起见，我们只使用硬编码的分页表（请参阅 `dmap.S`），其通过身份映射将前一\"\n\"个 1 GiB 的地址空间用于设备，紧接着的 1 GiB 用于 DRAM，然后在更高位置预留了 \"\n\"1 GiB 给其他设备。这与 QEMU 使用的内存布局一致。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"我们还设置了异常矢量 (`vbar_el1`)，稍后会对此进行详细介绍。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"今天下午的所有示例都假定我们将在异常级别 1 (EL1) 下运行。如果您需要在其他异常\"\n\"级别下运行，则需要修改相应的 `entry.S`。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"内嵌汇编\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"有时，如果无法通过 Rust 代码实现某些操作，我们就需要使用汇编来解决。例如，如\"\n\"需发出 HVC（Hypervisor 调用）来指示固件关闭系统，请使用以下命令：\"\n\n#: src/bare-metal/aps/inline-assembly.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: this only uses the declared registers and doesn't do anything\\n\"\n\"    // with memory.\\n\"\nmsgstr \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"（如果确实想要这样做，请使用 [`smccc`](https://crates.io/crates/smccc) \"\n\"crate，其中包含适用于所有这些函数的封装容器。）\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI 是 Arm 电源状态协调接口，为一组标准函数，用于管理系统和 CPU 电源状态等。\"\n\"在许多系统中，通过 EL3 固件和 Hypervisor 来实现该函数。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"`0 => _` 语法表示在运行内嵌汇编代码之前将寄存器初始化为 0，并在之后忽略寄存器\"\n\"中的内容。我们需要使用 `inout` 而非 `in`，因为该调用操作可能会破坏寄存器中的\"\n\"内容。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"所用 `main` 函数必须是 `#[no_mangle]` 和 `extern \\\"C\\\"`，因为是从 `entry.S` \"\n\"中的入口点调用该函数。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0`–`_x3` 表示寄存器 `x0`-`x3` 的值，引导加载程序通常使用这些值来传递各种内\"\n\"容（例如将指针传递到设备树）。根据标准的 aarch64 调用规范（`extern \\\"C\\\"`指定\"\n\"使用此规范），需要使用寄存器 `x0`-`x7` 将前 8 个参数传递给函数，因此 `entry.\"\n\"S` 无需执行任何特殊操作，只要确保不会更改这些寄存器。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"在 QEMU 中，使用 `src/bare-metal/aps/examples` 目录下的 `make qemu_psci` 运行\"\n\"该示例。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"MMIO 的易失性内存访问\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"使用 `pointer::read_volatile` 和 `pointer::write_volatile`。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"切勿提及引用。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"借助 `addr_of!`，您无需创建中间引用即可获取结构体字段。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"易失性访问：执行读取或写入操作可能会产生副作用，因此应阻止编译器或硬件对这些\"\n\"操作进行重新排序、复制或省略。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"通常情况下，如果您先写入操作，紧接着进行读取操作（例如通过可变引用），则编译\"\n\"器可能会认为读取的值是最新写入的值，就不再执行实际的内存读取过程。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"虽然在对硬件进行易失性访问时，一些 crate 确实会提及引用，但这很不安全。只要存\"\n\"在引用，编译器就会选择对其进行解引用操作。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"使用 `addr_of!` 宏可以从结构体指针中获取结构体字段的指针。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"编写 UART 驱动程序\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"QEMU “虚拟机”具有 [PL011](https://developer.arm.com/documentation/ddi0183/g) \"\n\"UART，现在为其编写驱动程序。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Minimal driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Writes a single byte to the UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Wait until there is room in the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Write to the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Wait until the UART is no longer busy.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"请注意，使用 `Uart::new` 方法不安全，而其他方法则安全。原因在于，只要 `Uart::\"\n\"new` 的调用方保证满足其安全要求（即所指定的 UART 只有一个驱动程序实例，且没有\"\n\"其他内容与其地址空间存在重叠），那么后续调用 `write_byte` 始终是安全的，因为\"\n\"我们假定需要满足的前提条件。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"我们也可以采用相反的方式（即确保 `new` 安全，但 `write_byte` 不安全），不过这\"\n\"样会很不方便，因为每当调用 `write_byte` 时都需要推断是否安全。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"这是安全地封装不安全代码时常见的策略：即在少数调用代码的地方进行安全验证，而\"\n\"不是在很多地方进行。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"更多 trait\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"已经派生了 `Debug` trait。如果再实现更多 trait，会大有帮助。\"\n\n#: src/bare-metal/aps/uart/traits.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Uart` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"\"\n\"通过实现 `Write`，我们可以将 `write!` 和 `writeln!` 宏与 `Uart` 类型搭配使\"\n\"用。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"在 QEMU 中，使用 `src/bare-metal/aps/examples` 目录下的 `make qemu_minimal` \"\n\"运行该示例。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"更好的 UART 驱动程序\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"事实上，PL011 具有 [很多额外的寄存器](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers)，但通过添加偏\"\n\"移量构建指针的方式来访问这些寄存器，既容易出错又难以读取。此外，其中有些寄存\"\n\"器是位字段，非常便于以结构化方式访问。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"偏移\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"寄存器名称\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"宽度\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"为简洁起见，我们省略了一些 ID 寄存器。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"[`bitflags`](https://crates.io/crates/bitflags) crate 非常适用于处理 \"\n\"bitflag。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Flags from the UART flag register.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Data set ready.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Data carrier detect.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART busy transmitting data.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// Receive FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// Transmit FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// Receive FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// Transmit FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Ring indicator.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"`bitflags!` 宏会创建类似于 `Flags(u16)` 的新类型，以及一系列用于获取和设置标\"\n\"记的方法实现。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"多个寄存器\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"我们可以使用结构体来表示 UART 寄存器的内存布局。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"通过运行 [`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.\"\n\"html#the-c-representation) 命令，指示编译器按顺序布置结构体字段，遵循与 C 语\"\n\"言相同的规则。这是确保结构体具有可预测布局的必要条件，因为默认的 Rust 表示法\"\n\"允许编译器（以及其他内容）按照其认为合适的方式重新排列字段。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"现在将新的 `Registers` 结构体用于我们的驱动程序。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been \"\n\"received.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control\\n\"\n\"            // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Check for error conditions in bits 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"请注意，只使用 `addr_of!` / `addr_of_mut!` 获取指向各个字段的指针，而不创建中\"\n\"间引用，这样很不安全。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"开始使用\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"使用驱动程序编写一个小程序，将数据写入串行控制台，并回显传入的字节。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Base address of the primary PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL011_BASE_ADDRESS` is the base address of a PL011 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"Bye!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"与 [内嵌汇编](../inline-assembly.md) 示例一样，从 `entry.S` 中的入口点代码调\"\n\"用此 `main` 函数。如需了解详情，请参阅演讲者备注。\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"在 QEMU 中，使用 `src/bare-metal/aps/examples` 目录下的 `make qemu` 运行该示\"\n\"例。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"最好能够使用 [`log`](https://crates.io/crates/log) crate 中的日志记录宏。可以\"\n\"通过实现“Log”trait 来做到这一点。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Initialises UART logger.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"使用 `log` 进行解封装是安全的，因为我们会在调用 `set_logger` 之前初始化 \"\n\"`LOGGER`。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"需要先初始化日志记录器，然后才能使用它。\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"请注意，panic 紧急处理程序现在可以记录各类 panic 详细信息。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"在 QEMU 中，使用 `src/bare-metal/aps/examples` 目录下的 `make qemu_logger` 运\"\n\"行该示例。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 定义了一个包含 16 个条目的异常矢量表，适用于处理 4 种状态（当前 EL 使\"\n\"用 SP0，当前 EL 使用 SPx，较低 EL 使用 AArch64，较低 EL 使用 AArch32）下的 4 \"\n\"种异常（同步、IRQ、FIQ、SError）。可以通过汇编方式实现这一操作，以便在调用 \"\n\"Rust 代码之前将易失性寄存器保存到堆栈：\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"EL 指异常级别；我们今天下午的所有示例都在 EL1 级别下运行。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"为简单起见，我们没有区分当前 EL 异常中的 SP0 和 SPx，也没有区分较低 EL 异常中\"\n\"的 AArch32 和 AArch64。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"在本示例中，只需记录异常并进行关机操作，因为预计不会发生任何此类异常。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"我们可以将异常处理程序和主执行上下文视为不同的线程。通过 [`Send` 和 `Sync`]\"\n\"(../../concurrency/send-sync.md) 控制它们之间可以共享的内容，就像使用线程进行\"\n\"共享一样。例如，如果想在异常处理程序和程序的其余部分之间共享某个值，并且使用 \"\n\"`Send` 而非 `Sync`，则需要将该值封装在诸如 `Mutex` 之类的内容中，并放入静态变\"\n\"量。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"\\\"coreboot without the C\\\"\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"支持 x86、aarch64 和 RISC-V。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"依赖于 LinuxBoot，而不是许多驱动程序本身。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Rust RaspberryPi 操作系统教程](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"初始化、UART 驱动程序、简单引导加载程序、JTAG、异常级别、异常处理、分页表\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"在 Rust 中，有些用于处理缓存维护和初始化的方法并不安全，不适宜照搬到正式版代\"\n\"码中。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"使用静态分析来确定堆栈用量上限。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"在 RaspberryPi 操作系统教程中，先运行 Rust 代码然后启用 MMU 和缓存。此操作会\"\n\"读取和写入内存（例如堆栈）。不过：\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"如果不启用 MMU 和缓存，非对齐访问将会出错。它使用 `aarch64-unknown-none` 进行\"\n\"构建，后者会设置 `+strict-align` 以防止编译器生成非对齐访问，因此应该没有问\"\n\"题，但一般情况下并不一定如此。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"如果是在虚拟机中运行该命令，可能会导致缓存一致性问题。问题在于，虚拟机是在禁\"\n\"用缓存的情况下直接访问内存，而主机具有同一内存的缓存别名。即使主机并没有明确\"\n\"访问该内存，推测性访问仍然会导致缓存被填充，然后任何一方对于该内存进行的更改\"\n\"就会丢失。再次强调，尽管在此特定示例中（即在硬件上直接运行且无 Hypervisor）这\"\n\"种做法是可行的，但总的来说，这并非一种良好策略。\"\n\n#: src/bare-metal/useful-crates.md\n#, fuzzy\nmsgid \"Useful crates\"\nmsgstr \"有用的 crate\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"接下来介绍几个 crate，用于解决裸机编程中的一些常见问题。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"[`zerocopy`](https://docs.rs/zerocopy/) crate（源自 Fuchsia）提供了 trait 和\"\n\"宏，用于确保在字节序列和其他类型之间进行安全转换。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"这不适用于 MMIO（因为它不使用易失性读取和写入），但在与硬件共享的结构（例如通\"\n\"过 DMA 传输或发送到外部接口）中进行操作时会很有用。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"对于可以接受任何字节模式的类型，都可以实现 `FromBytes`方法，因此可以对不受信\"\n\"任的字节序列进行安全转换。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"如果尝试为这些类型派生 `FromBytes`，都将会失败，因为 `RequestType` 不会将所有\"\n\"可能的 u32 值用作判别标识，所以并非所有的字节模式都有效。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"`zerocopy::byteorder` 提供了适用于字节顺序感知的数字基元类型。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"使用 `src/bare-metal/useful-crates/zerocopy-example/` 目录下的 `cargo run` 运\"\n\"行该示例。（由于存在 crate 依赖项，无法在 Playground 中运行该示例。）\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"借助 [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate，您可\"\n\"根据 AArch64 虚拟内存系统架构创建分页表。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Create a new page table with identity mapping.\"\nmsgstr \"// Create a new page table with identity mapping.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Map a 2 MiB region of memory as read-only.\"\nmsgstr \"// Map a 2 MiB region of memory as read-only.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\n#, fuzzy\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\"\nmsgstr \"// Set `TTBR0_EL1` to activate the page table.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"目前，该方法仅支持 EL1 级别，但也可以直接添加对其他异常级别的支持。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"在 Android 中，该方法适用于 [受保护的虚拟机固件](https://cs.android.com/\"\n\"android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/)。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"\"\n\"由于此示例需要在真实硬件上或在 QEMU 中运行，因此没有简单的运行方法可用。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"是第三方 crate，用于实现基本伙伴系统分配器。同时，也可将其用于 [`LockedHeap`]\"\n\"(https://docs.rs/buddy_system_allocator/0.9.0/buddy_system_allocator/struct.\"\n\"LockedHeap.html) 以实现 [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/\"\n\"trait.GlobalAlloc.html)，这样便可以使用标准的 `alloc` crate（正如在 [之前部\"\n\"分](../alloc.md) 中所示），或者用于分配其他地址空间。例如，我们可能需要为 \"\n\"PCI BAR 分配 MMIO 空间：\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"PCI BAR 的对齐方式始终与其大小相等。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"使用 `src/bare-metal/useful-crates/allocator-example/` 目录下的 `cargo run` \"\n\"运行该示例。（由于存在 crate 依赖项，无法在 Playground 中运行该示例。）\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"有时，需要一些像 `Vec` 一样能够调整大小的特性，但无需进行堆分配。[`tinyvec`]\"\n\"(https://crates.io/crates/tinyvec) 提供了以下特性：由数组或 slice 支持的矢\"\n\"量，该矢量支持进行静态分配或堆分配；用于跟踪使用的元素数量，如果元素使用量超\"\n\"过了分配额度，则会出现 panic。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"根据 `tinyvec`要求，元素类型需实现初始化 `Default`。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"Rust Playground 中包含 `tinyvec`，因此本示例将以内嵌方式正常运行。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"在 `core` 或 `alloc` 中无法使用 `std::sync::Mutex` 和 `std::sync` 中的其他同\"\n\"步基元。那么该如何管理同步或内部可变性，例如在不同 CPU 之间共享状态？\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"[`spin`](https://crates.io/crates/spin) crate 为许多基元提供了基于自旋锁的等\"\n\"效方法。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"在中断处理程序中进行锁定操作时，请注意避免出现死锁的情况。\"\n\n#: src/bare-metal/useful-crates/spin.md\n#, fuzzy\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` 还提供了一种票卡锁互斥实现，等同于 `std::sync` 中的 `RwLock`、\"\n\"`Barrier` 和 `Once`，以及用于用于延迟初始化的 `Lazy`。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"[`once_cell`](https://crates.io/crates/once_cell) crate 也提供了一些适用于延\"\n\"迟初始化的实用类型，它们与 `spin::once::Once` 所用方法略有不同。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"Rust Playground 中包含 `spin`，因此本示例将以内嵌方式正常运行。\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"如需在 AOSP 中构建裸机 Rust 二进制文件，应使用 `rust_ffi_static` Soong 规则来\"\n\"构建 Rust 代码，然后通过 `cc_binary` 和链接器脚本生成二进制文件本身，再使用 \"\n\"`raw_binary` 将 ELF 转换为可以正常运行的原始二进制文件。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"对于在 aarch64 上使用 crosvm 运行的虚拟机，[vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) 库提供了链接器脚本和实用的默认构建规则，以及入口点、UART 控制\"\n\"台日志记录等功能。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"`main!` 宏用于标记需从 `vmbase` 入口点调用的 main 函数。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"`vmbase` 入口点用于处理控制台初始化，并在 main 函数返回时发送 \"\n\"PSCI_SYSTEM_OFF 命令以关闭虚拟机。\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"我们将为 PL031 实时时钟设备编写驱动程序。\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\n#, fuzzy\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"读完习题后，可以阅读本书提供的 \\\\[题解\\\\]。\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"RTC 驱动程序\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"QEMU aarch64 虚拟机在 0x9010000 地址处 配备了 [PL031](https://developer.arm.\"\n\"com/documentation/ddi0224/c) 实时时钟。对于本练习，应该为其编写驱动程序。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"使用该时钟可将当前时间输出到串行控制台。您可以使用 [`chrono`](https://crates.\"\n\"io/crates/chrono) crate 设置日期/时间格式。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"通过匹配寄存器和原始中断状态，使得系统在某段指定的时间内一直进行繁忙等待（例\"\n\"如 3 秒后）。（在循环操作中调用 [`core::hint::spin_loop`](https://doc.rust-\"\n\"lang.org/core/hint/fn.spin_loop.html)。）\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"_进行扩展（如有时间）：_启用并处理由 RTC 匹配产生的中断。可以使用 [`arm-gic`]\"\n\"(https://docs.rs/arm-gic/) crate 中提供的驱动程序来配置 Arm 通用中断控制器。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"请使用 RTC 中断，将其作为 `IntId::spi(2)` 连接到 GIC。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"启用中断后，可以通过 `arm_gic::wfi()` 让核心进入休眠状态，直到它收到中断信\"\n\"号。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"下载 [练习模板](../../comprehensive-rust-exercises.zip) 并在 `rtc` 目录中查找\"\n\"以下文件。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"_src/exceptions.rs_（只需在本练习的第 3 部分更改此项）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/logger.rs_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"_src/pl011.rs_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"_build.rs_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"_entry.S_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"_exceptions.S_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"_idmap.S_（无需对此进行更改）\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"_image.ld_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"_Makefile_（无需对此进行更改）：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"使用 `make qemu` 在 QEMU 中运行代码。\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"嵌入式 Rust：进阶篇\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([返回练习](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_main.rs_:\"\nmsgstr \"`main.rs`:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Base addresses of the GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Base address of the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// The IRQ used by the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `PL031_BASE_ADDRESS` is the base address of a PL031 device, and\\n\"\n\"    // nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Wait for 3 seconds, without interrupts.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Waiting for {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Finished waiting\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Wait another 3 seconds for an interrupt.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_：\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Data register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Match register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Load register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Control register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Interrupt Mask Set or Clear register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Raw Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Masked Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Interrupt Clear Register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Driver for a PL031 real-time clock.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Reads the current RTC value.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: We know that self.registers points to the control registers\\n\"\n\"        // of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Clears a pending interrupt, if any.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// SAFETY: `Rtc` just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/concurrency.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"欢迎了解 Rust 中的并发\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"Rust 完全支持使用带有互斥锁和通道的操作系统线程进行并发。\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"Rust 类型系统能帮助我们把许多并发bug转换为编译期bug 发挥着重要作用。这通常称\"\n\"为“无畏并发”，因为你可以依靠编译器来确保 运行时的正确性。\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Rust 线程的运作方式与其他语言中的线程类似：\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Count in thread: {i}!\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Main thread: {i}\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"线程均为守护程序线程，主线程不会等待这些线程。\"\n\n#: src/concurrency/threads.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"线程紧急警报 (panic) 是彼此独立的。\"\n\n#: src/concurrency/threads.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"紧急警报可以携带载荷，并可以使用 `downcast_ref` 对载荷进行解压缩。\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Run the example.\"\nmsgstr \"使用以下命令运行该示例：\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) 用于构\"\n\"建相应类型的默认实例。\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"使用 `let handle = thread::spawn(...)` 和后面的 `handle.join()` 等待 线程完\"\n\"成。\"\n\n#: src/concurrency/threads.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"不过，你可以使用[范围线程](https://doc.rust-lang.org/std/thread/fn.scope.\"\n\"html)来实现此目的：\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"使用 `handle.join()` 的 `Result` 返回值来获取对紧急警报 载荷的访问权限。现在\"\n\"有必要介绍一下 [`Any`](https://doc.rust-lang.org/std/any/index.html) 了。\"\n\n#: src/concurrency/threads.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"在线程中触发紧急警报，并注意这为何不会影响到 `main`。\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"使用 `handle.join()` 的 `Result` 返回值来获取对紧急警报 载荷的访问权限。现在\"\n\"有必要介绍一下 [`Any`](https://doc.rust-lang.org/std/any/index.html) 了。\"\n\n#: src/concurrency/threads.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"常规线程不能从它们所处的环境中借用：\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"不过，你可以使用[范围线程](https://doc.rust-lang.org/std/thread/fn.scope.\"\n\"html)来实现此目的：\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"其原因在于，在 `thread::scope` 函数完成后，可保证所有线程都已联结在一起，使得\"\n\"线程能够返回借用的数据。\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"此时须遵守常规 Rust 借用规则：你可以通过一个线程以可变的方式借用，也可以通过\"\n\"任意数量的线程以不可变的方式借用。\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Rust 通道（Channel）包含两个部分：`Sender<T>` 和 `Receiver<T>`。这两个部分 通\"\n\"过通道进行连接，但你只能看到端点。\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Received: {:?}\\\"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` 代表多个生产方，单个使用方。`Sender` 和 `SyncSender` 会实现 `Clone`\"\n\"（因此， 你可以设置多个生产方），但 `Receiver` 不会实现。\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` 和 `recv()` 会返回 `Result`。如果它们返回 `Err`，则表示对应的 \"\n\"`Sender` 或 `Receiver` 已被丢弃，且通道已关闭。\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"你可以使用 `mpsc::channel()` 获得无边界的异步通道：\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: sent Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: done\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"有边界的同步通道会使 `send` 阻塞当前线程：\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"调用 `send` 将阻塞当前线程，直到通道中有足够的空间放置新消息。如果无人从通道\"\n\"读取数据，线程会被无限期地阻塞。\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"如果通道关闭，调用 `send` 将中止并返回错误（这就是它会返回 `Result` 的原\"\n\"因）。当接收器被丢弃时，通道将关闭。\"\n\n#: src/concurrency/channels/bounded.md\n#, fuzzy\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `recv`.\"\nmsgstr \"\"\n\"大小为零的有界通道称为 “集合通道”。每次调用 send 都会阻塞当前线程，直到另一个\"\n\"线程调用 `read`。\"\n\n#: src/concurrency/send-sync.md\n#, fuzzy\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"Rust 如何知道要禁止跨线程共享访问？答案在于 Rust 的两个特征：\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html)：如果跨线程边\"\n\"界移动 `T` 是安全的，则类型 `T` 为 `Send`。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html)：如果跨线程边\"\n\"界移动 `&T` 是安全的，则类型 `T` 为 `Sync`。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"`Send` 和 `Sync` 均为[不安全特征](../unsafe/unsafe-traits.md)。只要类型仅包\"\n\"含 `Send` 和 `Sync` 类型，编译器就会自动为类型派生 这两种特征。你也可以手动实\"\n\"现它们（如果你确定这样 有效的话）。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"不妨将这些特征视为类型包含某些线程安全属性的标记。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"它们可以在泛型约束中作为常规特征使用。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"如果将 `T` 值移动到另一个线程是安全的，则类型 `T` 为 [`Send`](https://doc.\"\n\"rust-lang.org/std/marker/trait.Send.html)。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"将所有权转移到另一个线程的影响是，“析构函数”将在相应线程中 运行。因此，问题在\"\n\"于你何时可以在一个线程中分配某个值，然后在 另一个线程中取消分配该值。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"例如，与 SQLite 库的连接只能通过 单个线程访问。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"如果同时从多个线程访问 `T` 值是安全的，则类型 `T` 为 [`Sync`](https://doc.\"\n\"rust-lang.org/std/marker/trait.Sync.html)。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"更准确地说，定义是：\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"当且仅当 `&T` 为 `Send` 时，`T` 为 `Sync`\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"该语句实质上是一种简写形式，表示如果某个类型对于共享使用是线程安全的，那么跨\"\n\"线程传递对该类型的引用也是线程安全的。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"这是因为如果某个类型为 Sync，则意味着它可以在多个线程之间共享，而不存在数据争\"\n\"用或其他同步问题的风险，因此将其移动到另一个线程是安全的。对该类型的引用同样\"\n\"可以安全地移动到另一个线程，因为它引用的数据可以从任何线程安全地访问。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"你遇到的类型大都属于 `Send + Sync`：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`、`f32`、`bool`、`char`、`&str`…\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`、`[T; N]`、`&[T]`、`struct { x: T }`…\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`、`Option<T>`、`Vec<T>`、`Box<T>`…\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"`Arc<T>`：明确通过原子引用计数实现线程安全。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`：明确通过内部锁定实现线程安全。\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"`mpsc::Sender<T>`: As of 1.72.0.\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"`AtomicBool`、`AtomicU8`…：使用特殊的原子指令。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"当类型参数为 `Send + Sync` 时，泛型类型通常 为 `Send + Sync`。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"这些类型可以移动到其他线程，但它们不是线程安全的。 这通常是由内部可变性造成\"\n\"的：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"这些类型是线程安全的，但它们不能移动到另一个线程：\"\n\n#: src/concurrency/send-sync/examples.md\n#, fuzzy\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`：使用操作系统级别的原语（必须在创建这些原语的线程上 取消分\"\n\"配）。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"这些类型不是线程安全的，不能移动到其他线程：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`：每个 `Rc<T>` 都具有对 `RcBox<T>` 的引用，其中包含 非原子引用计数。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"\"\n\"`*const T`、`*mut T`：Rust 会假定原始指针可能 在并发方面有特殊的注意事项。\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"Rust 使用类型系统来强制同步共享数据。这主要 通过两种类型实现：\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html)，对 `T` 进行原\"\n\"子计数：用于处理线程之间的共享，并负责 在最后一个引用被丢弃时取消分配 `T`。\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html)：确保对 \"\n\"`T` 值的互斥访问。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) 允许通过 \"\n\"`Arc::clone` 实现共享只读权限：\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"`Arc` 代表“原子引用计数”，它是使用原子操作的 `Rc` 的 线程安全版本。\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"无论 `T` 是否实现 `Clone`，`Arc<T>` 都会实现 `Clone`。如果 `T` 实现了 `Send` \"\n\"和 `Sync`，`Arc<T>` 便会 实现二者。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` 在执行原子操作方面有开销，但在此之后，`T` 便可 随意使用，而没\"\n\"有任何开销。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"请警惕引用循环，`Arc` 不会使用垃圾回收器检测引用循环。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` 对此有所帮助。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) 能够确保互\"\n\"斥，并允许对只读接口 后面的 `T` 进行可变访问：\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"请注意我们如何设置 [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) 通用 实现。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"\"\n\"Rust 中的互斥器看起来就像只包含一个元素的集合，其中的元素就是受保护的数据。\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"在访问受保护的数据之前不可能忘记获取互斥量。\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"你可以通过获取锁，从 `&Mutex<T>` 中获取 `&mut T`。`MutexGuard` 能够确保 \"\n\"`&mut T` 存在的时间不会比持有锁的时间更长。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"如果 `T` 实现了 `Send`，`Mutex<T>` 便会实现 `Send` 和 `Sync`。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"读写锁版本 - `RwLock`。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"为什么 `lock()` 会返回 `Result`？\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"如果持有 `Mutex` 的线程发生panic，`Mutex` 便会“中毒”并发出信号， 表明其所保护\"\n\"的数据可能处于不一致状态。对中毒的互斥量调用 `lock()` 将会失败， 并将显示 \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html)。\"\n\"无论如何，你可以对该错误调用 `into_inner()` 来 恢复数据。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"让我们看看 `Arc` 和 `Mutex` 的实际效果：\"\n\n#: src/concurrency/shared_state/example.md\n#, fuzzy\nmsgid \"// use std::sync::{Arc, Mutex};\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"可能有用的解决方案：\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"值得注意的部分：\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"`Arc` 和 `Mutex` 中都封装了 `v`，因为它们的关注点是正交的。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"将 `Mutex` 封装在 `Arc` 中是一种在线程之间共享可变状态的常见模式。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` 必须先克隆为 `v2`，然后才能移动到另一个线程中。请注意，lambda 签\"\n\"名中添加了 `move`。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"我们引入了块，以尽可能缩小 `LockGuard` 的作用域。\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"现在通过\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"哲学家用餐示例来练习我们新学习到的并发技巧：该示例是典型的并发问题。\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\"多线程链接检查器：对于大型项目，需要使用 Cargo 下载依赖项，然后并行检查链接。\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"哲学家用餐示例是一个典型的并发问题：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"五位哲学家在同一桌子上用餐。每位哲学家在桌前都有自己的座位。每个盘子之间都有\"\n\"一把叉子。上的菜品是一种意大利面，需要用两把叉子才能吃。每位哲学家只能交替进\"\n\"行思考和用餐。此外，只有当哲学家们同时拿到左边和右边的叉子才能吃这个意大利\"\n\"面。因此，只有当两旁坐着的人在思考，而非在吃面时，他们才能使用两把叉子。每位\"\n\"哲学家吃完饭后，就会放下手中的两把叉子。\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"在本练习中，需要使用本地 [Cargo 安装](../../cargo/running-locally.md)。将以下\"\n\"代码复制到名为 `src/main.rs` 的文件中，并填写空白的地方，然后测试 `cargo \"\n\"run` 不会死锁：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// left_fork: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// right_fork: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// thoughts: ...\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Eureka! {} has a new idea!\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"// Pick up forks...\"\nmsgstr \"// Pick up forks...\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} is eating...\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Socrates\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hypatia\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Plato\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristotle\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"// Create forks\"\nmsgstr \"// Create forks\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"// Create philosophers\"\nmsgstr \"// Create philosophers\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#, fuzzy\nmsgid \"// Make each of them think and eat 100 times\"\nmsgstr \"// Make each of them think and eat 100 times\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"// Output their thoughts\"\nmsgstr \"// Output their thoughts\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"您可以使用以下 `Cargo.toml`：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"运用掌握的新知识创建一个多线程链接检查工具。应先从网页入手，并检查网页上的链\"\n\"接是否有效。该工具应以递归方式检查同一网域中的其他网页，并且一直执行此操作，\"\n\"直到所有网页都通过验证。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). You will also need a way to find links, we can use [`scraper`]\"\n\"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, \"\n\"we will use [`thiserror`](https://docs.rs/thiserror/).\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/link-checker.md\n#, fuzzy\nmsgid \"Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"创建一个新的 Cargo 项目并添加以下依赖：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"如果 `cargo add` 操作失败并显示 `error: no such subcommand`，请手动修改 \"\n\"`Cargo.toml` 文件。添加下面列出的依赖项。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"`cargo add` 调用会将 `Cargo.toml` 文件更新为如下所示：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"您现在可以下载初始页了。请尝试使用一个小网站，例如 `https://www.google.org/\"\n\"`。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"您的 `src/main.rs` 文件应如下所示：\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"request error: {0}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Checking {:#}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Links: {links:#?}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Could not extract links: {err:#}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"使用以下命令运行 `src/main.rs` 中的代码\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"通过线程并行检查链接：将要检查的网址发送到某个通道，然后使用多个线程并行检查\"\n\"这些网址。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"您可以对此进行扩展，以递归方式从 `www.google.org` 网域的所有网页中提取链接。\"\n\"设置网页上限（例如 100 个），以免被网站屏蔽。\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"并发编程：上午练习\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([返回练习](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} is trying to eat\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"Link Checker\"\nmsgstr \"多线程链接检查器\"\n\n#: src/exercises/concurrency/solutions-morning.md\n#, fuzzy\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([返回练习](luhn.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// The sender got dropped. No more commands coming in.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Got crawling error: {:#}\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"Bad URLs: {:#?}\\\"\"\n\n#: src/async.md\nmsgid \"Async Rust\"\nmsgstr \"异步 Rust\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"“异步”是一种并发模型，可以同时执行多个任务。具体做法是逐个执行任务直至阻塞，\"\n\"然后切换到另一项可以继续进行的任务。该模型支持在有限数量的线程上运行更多任\"\n\"务。原因在于，每个任务的开销通常很低，并且操作系统提供了基元来高效识别能够执\"\n\"行的 I/O 任务。\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"Rust 的异步操作基于 \\\"Futures\\\" 来实现，即表示未来可能完成的工作。系统会对这\"\n\"些 Future 进行 “轮询”，直到显示全部已完成。\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"由异步运行时对这些 Future 进行轮询，并且有多种不同的运行时可供选择。\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python 的 `asyncio` 中也有类似的模型。不过，其 `Future` 类型基于回调的实现方\"\n\"式，而非通过轮询。使用异步 Python 程序需要类似于 Rust 中运行时的 “循环” 进行\"\n\"管理。\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"JavaScript 的 `Promise` 与之类似，但同样基于回调的实现方式。语言运行时实现了\"\n\"事件循环，因此许多与 Promise 解析相关的细节被隐藏起来。\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"从高层次上看，异步 Rust 代码与“正常”的顺序代码非常类似：\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Count is: {i}!\\\"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"请注意，这只是一个简单的示例，用于展示语法。其中没有长时间运行的操作或任何真\"\n\"正的并发！\"\n\n#: src/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"异步调用的返回类型是什么？\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"在 `main` 中使用 `let future: () = async_main(10);` 来查看类型。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\\\"async\\\" 关键字是语法糖。编译器会将返回类型替换为 future。\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"你不能将 `main` 声明为异步函数，除非在编译器中加入额外的指令来告诉它如何使用\"\n\"返回的 future。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"你需要一个执行器来运行异步代码。`block_on`会阻塞当前线程，直到提供的future完\"\n\"成为止。 \"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` 会异步地等待另一个操作的完成。与 `block_on` 不同，`.await` 不会阻塞\"\n\"当前线程。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"`.await` 只能在 `async` 函数（或块，这些稍后会介绍）中使用。 \"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) 是一种 \"\n\"trait，由表示尚未完成的操作的对象所实现。可以轮询 Future，并且 `poll` 会返回 \"\n\"一个 [`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html) 对象。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"异步函数会返回 `impl Future`。对于自定义的类型，也可以实现 `Future`（但不常\"\n\"见）。例如，从 `tokio::spawn` 返回的 `JoinHandle` 会实现 `Future`，以允许加入\"\n\"该任务。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"在 Future 中使用 `.await` 关键字会导致当前异步函数暂停，直到该 Future 准备就\"\n\"绪，然后计算其输出。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"`Future` 和 `Poll` 类型的实现完全如下所示：请点击链接查看文档中的实现。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"我们的重点在于编写异步代码，而不是构建新的异步基元，因此不会涉及 `Pin` 和 \"\n\"`Context`。简言之：\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"通过 `Context`，Future 在事件发生时可自行安排重新进行轮询。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` 确保 Future 不会移到内存中，以便指向该 Future 的指针仍然有效。为了确保\"\n\"使用 `.await` 之后引用依然有效，必须执行此操作。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"_运行时_ 支持异步执行操作（即 _反应器），并负责执行 Future （即 _执行器）。\"\n\"Rust 没有 “内置”运行时，但有以下几个选项可供选择：\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/)：性能出色，拥有成熟的功能生态系统，例如适用于 \"\n\"HTTP 的 [Hyper](https://hyper.rs/) 或 适用于 gRPC 的 [Tonic](https://github.\"\n\"com/hyperium/tonic)。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/)：旨在成为 “异步编程的标准库”，并在 `async::\"\n\"task` 中包含基本运行时。\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/)：简单且轻量\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"有些大型应用具有自己的运行时。例如，[Fuchsia](https://fuchsia.googlesource.\"\n\"com/fuchsia/+/refs/heads/main/src/lib/fuchsia-async/src/lib.rs) 已有一个运行\"\n\"时。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"请注意，在列出的运行时中，Rust Playground 仅支持 Tokio。该 Playground 也不支\"\n\"持任何 I/O 操作，因此大多数有趣的异步操作无法在该平台上运行。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"Future 是 “惯性”的，除非有执行程序对其进行轮询，否则它们不会执行任何操作（甚\"\n\"至不会启动 I/O 操作）。这与 JS promise 不同，例如，后者即使从未使用也会完成运\"\n\"行过程。\"\n\n#: src/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio 提供：\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"用于执行异步代码的多线程运行时。\"\n\n#: src/async/runtimes/tokio.md\n#, fuzzy\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"异步版本的标准库。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"庞大的库生态系统。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Count in task: {i}!\\\"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Main task: {i}\\\"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"借助 `tokio::main` 宏，我们现在可以将 `main` 设为异步函数。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"`spawn` 函数会创建新的并发 “任务”。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"\"\n\"注意：`spawn` 使用 `Future` 方法实现，而不是对 `count_to` 调用 `.await`。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**深入探索**：\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"为何 `count_to` 通常无法计数到 10？这是一个异步取消的示例。`tokio::spawn` 会\"\n\"返回一个句柄，可以等待该句柄直至其代表的任务执行完毕。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"尝试使用 `count_to(10).await`，而不是派生方法。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"尝试等待 `tokio::spawn` 返回的任务执行完毕。\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust 有一个任务系统，这是一种轻量级线程处理形式。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"每个任务只有一个顶级 Future，执行器会对此进行轮询来推进任务进度。该 Future 可\"\n\"能包含一个或多个嵌套的 Future，可以通过其 `poll` 方法对它们进行轮询，类似于调\"\n\"用堆栈。可以通过轮询多个子 Future（例如争用定时器和 I/O 操作）在任务内部实现\"\n\"并发操作。\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"listening on port 6142\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"connection from {addr:?}\\\"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Who are you?\\\\n\\\"\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"socket error: {e:?}\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"将此示例复制到准备好的 `src/main.rs` 文件中，并从该文件运行它。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"请尝试使用像 [nc](https://www.unix.com/man-page/linux/1/nc/) 或 [telnet]\"\n\"(https://www.unix.com/man-page/linux/1/telnet/) 这样的 TCP 连接工具进行连接。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"让学生想象一下，当连接多个客户端时，示例服务器会达到怎样的状态。存在哪些任\"\n\"务？具有哪些 Future？\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"这是我们首次看到 `async` 代码块。这与闭包类似，但不采用任何参数。该代码块的返\"\n\"回值是 Future，类似于 `async fn`。\"\n\n#: src/async/tasks.md\n#, fuzzy\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"将 async 代码块重构为一个函数，并使用 `?` 优化错误处理。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"有些 crate 支持使用异步通道。例如 `tokio`：\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Received {count} pings so far.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler complete\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Sent {} pings so far.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Something went wrong in ping handler task.\\\"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"将通道大小更改为 `3`，然后看看对操作执行会有什么影响。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\"总体而言，该接口类似于 [上午课程](concurrency/channels.md) 中所讲的 `sync` 通\"\n\"道。\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"尝试移除 `std::mem::drop` 调用。会出现什么情况？这是为什么？\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"[Flume](https://docs.rs/flume/latest/flume/) crate 包含可以同时实现 `sync`、\"\n\"`async` `send` 和 `recv` 的渠道，为涉及 IO 和大量 CPU 处理任务的复杂应用提供\"\n\"了极大便利。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"使用 `async` 通道的优势在于，我们能够将它们与其他 `future` 结合起来，从而创建\"\n\"复杂的控制流。\"\n\n#: src/async/control-flow.md\n#, fuzzy\nmsgid \"Futures Control Flow\"\nmsgstr \"Future 控制流\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\"可以将很多 Future 组合在一起生成并发计算流图。我们已经介绍过用作独立线程的任\"\n\"务类型。\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"[联接](control-flow/join.md)\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"[选择](control-flow/select.md)\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"联接操作会等待一组 Future 全部就绪，然后返回它们的结果集合。这类似于 \"\n\"JavaScript 中的 `Promise.al` 或 Python 中的 `asyncio.gather`。\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"对于多个类型不相交的 Future，可以使用 `std::future::join!` 进行处理，但必须要\"\n\"确定在编译时 Future 的数量。目前，可在 `futures` crate 中使用该功能，但很快也\"\n\"会在 `std::future` 中正式发布。\"\n\n#: src/async/control-flow/join.md\n#, fuzzy\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"\"\n\"使用 `join` 的风险在于，可能永远无法解析其中某个 Future，这会导致程序停滞不\"\n\"前。\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"还可以将 `join_all` 与 `join!` 结合使用，并行处理所有对 http 服务的请求和数据\"\n\"库查询。尝试使用 `futures::join!` 将 `tokio::time::sleep` 添加到 Future 中。\"\n\"这不是一个超时操作（其需要使用 `select!`，下一章会详细介绍），而是展示了 \"\n\"`join!` 的使用方式。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"选择操作会等待一组 Future 中的任意一个就绪，并对 Future 产生的结果进行响应。\"\n\"在 JavaScript 中，该操作类似于 `Promise.race`。在 Python 中，它相当于 \"\n\"`asyncio.wait(task_set, return_when=asyncio.FIRST_COMPLETED)`。\"\n\n#: src/async/control-flow/select.md\n#, fuzzy\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"与 match 语句类似，`select!` 的正文也包含多个分支，每个分支的形式为 `pattern \"\n\"= future => statement`。当 `future` 就绪时，系统会执行 `statement`，并将 \"\n\"`pattern` 中的变量绑定到 `future` 所产生的结果。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"Failed to send cat.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"Failed to send dog.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"Failed to receive winner\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"Winner is {winner:?}\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"在本示例中，猫和狗之间进行了一场比赛。`first_animal_to_finish_race` 会同时监\"\n\"听这两个通道，并选择最先到达终点的作为胜者。由于狗用时 50 毫秒，而猫用时 500 \"\n\"毫秒，前者在此比赛中大获全胜。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"\"\n\"在本示例中，可以使用 `oneshot` 通道，因为这些通道只能接收一次 `send` 信号。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"尝试为比赛添加截至时间，演示如何选择不同类型的 Future。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"请注意，`select!` 会丢弃不匹配的分支，相对应的 Future 也会随之取消。最简单的\"\n\"方法是，每次执行 `select!` 时创建新的 Future。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\"另一种方法是传递 `&mut future` 而不是 future 本身，但这可能会导致问题，在本幻\"\n\"灯片的 “固定” 部分进行了详细介绍。\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"关于 async/await 的误区\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\"async / await 为处理并发异步编程提供了一种方便高效的抽象方法。然而，Rust 中\"\n\"的 async/await 模型也存在一些误区和隐患。本章将展示其中的部分内容：\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"[阻塞执行器](pitfalls/blocking-executor.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"[固定](pitfalls/pin.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"[异步 trait](pitfalls/async-traits.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"[取消](pitfalls/cancellation.md)\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"阻塞执行器\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"大多数异步运行时支持并发运行 IO 任务。这意味着 CPU 的阻塞性任务会阻塞执行器，\"\n\"并阻止执行其他任务。最简单的方法是，尽可能使用异步等效方法。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"运行该代码，您会发现休眠操作是连续发生的，而不是并发进行的。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"`\\\"current_thread\\\"` 变种将所有任务放在单个线程上。这样做效果会更明显，但 \"\n\"bug 仍然存在于多线程变种中。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"将 `std::thread::sleep` 切换为 `tokio::time::sleep`，并等待结果。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"另一个修复方案是 `tokio::task::spawn_blocking`，其会生成实际线程并将句柄转换\"\n\"为 Future，且不会阻塞执行器。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"不应将任务视为操作系统线程。它们之间并非一对一的映射关系，并且大多数执行器都\"\n\"支持在单个操作系统线程上运行多个任务。尤其是通过 FFI 与其他库交互时，会更容易\"\n\"出现问题，因为在 FFI 中，因为该库可能依赖于线程本地存储或映射到特定的操作系统\"\n\"线程（例如，CUDA）。在这些情况下，首选 `tokio::task::spawn_blocking`。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"请谨慎使用同步互斥操作。对 `.await` 一直执行互斥操作能会导致另一个任务阻塞，\"\n\"并且该任务可能与其在同一线程上运行。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\n#, fuzzy\nmsgid \"// A work item. In this case, just sleep for the given time and respond\"\nmsgstr \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// with a message on the `respond_on` channel.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\n#, fuzzy\nmsgid \"// A worker which listens for work on a queue and performs it.\"\nmsgstr \"// A worker which listens for work on a queue and performs it.\\n\"\n\n#: src/async/pitfalls/pin.md\n#, fuzzy\nmsgid \"// Pretend to work.\"\nmsgstr \"// Pretend to work.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"failed to send response\\\"\"\n\n#: src/async/pitfalls/pin.md\n#, fuzzy\nmsgid \"// TODO: report number of iterations every 100ms\"\nmsgstr \"// TODO: report number of iterations every 100ms\\n\"\n\n#: src/async/pitfalls/pin.md\n#, fuzzy\nmsgid \"// A requester which requests work and waits for it to complete.\"\nmsgstr \"// A requester which requests work and waits for it to complete.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"failed to send on work queue\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"failed waiting for response\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"work result for iteration {i}: {resp}\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"您可能认为这是执行器模式的一个示例。执行器通常会循环调用 `select!`。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"本部分是对前面几节课的总结，因此请多花时间用心学习。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"只是单纯地在 `select!` 中添加 `_ = sleep(Duration::from_millis(100)) => \"\n\"{ println!(..) }`，该行代码将不会执行任何操作。这是为什么？\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"请改为在 `loop` 外部添加包含该 Future 的 `timeout_fut`：\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"这仍然不起作用。根据编译器提示的错误，通过向 `select!` 中的 `timeout_fut` 添\"\n\"加 `&mut` 解决移动问题，然后使用 `Box::pin`：\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\"可以编译这段代码了，但超时过期后，每次迭代都会变为 `Poll::Ready`（使用混合 \"\n\"Future 有助于解决此问题）。每次超时过期后，通过更新重置 `timeout_fut`。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box 在堆上进行分配。在某些情况下，也可以选择使用 `std::pin::pin!`（最近才正式\"\n\"发布，较旧的代码通常使用 `tokio::pin!`），但对于重新分配的 Future，使用此功能\"\n\"较为困难。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"另一种替代方案是完全不使用 `pin`，而是生成另一个任务，该任务每隔 100 毫秒就会\"\n\"发送到 `oneshot` 通道。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\n#, fuzzy\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) 通过宏提\"\n\"供了一种解决方法：\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"running all sleepers..\\\"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"slept for {}ms\\\"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` 易于使用，但请注意，它通过堆分配来实现这一点。这种堆分配会产生\"\n\"性能开销。\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"对于 `async trait` 的语言支持中的挑战是深入  Rust的，并且可能不值得深入描述。\"\n\"如果您对深入了解感兴趣，Niko Matsakis 在[这篇文章](https://\"\n\"smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-\"\n\"hard/)中对它们做了很好的解释。\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"尝试创建一个新的 sleeper 结构，使其随机休眠一段时间，并将其添加到 Vec 中。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"丢弃 Future 意味着无法再对其进行轮询。这称为 _取消_，在任何 `await` 点都可能\"\n\"发生。请务必小心谨慎，确保即使 Future 任务被取消，系统也能正常运行。例如，系\"\n\"统不应死锁或丢失数据。\"\n\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"UTF-8\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"编译器无法确保取消操作的安全性。您需要阅读 API 文档，并考虑 `async fn` 所持状\"\n\"态。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"与 `panic` 和 `?` 不同，取消属于正常控制流的一部分（而非错误处理）。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"该示例丢失了字符串的某些部分。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"每当 `tick()` 分支先完成操作时，`next() 及其 `buf` 均会被丢弃。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"通过将 `buf` 整合到结构体中，`LinesReader 可以确保取消操作的安全性：\"\n\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"// prefix buf and bytes with self.\"\nmsgstr \"// prefix buf and bytes with self.\\n\"\n\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[BufReader::read_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line)：用于从标准输入异步读取用户消息。\"\n\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[BufReader::read_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line)：用于从标准输入异步读取用户消息。\"\n\n#: src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[BufReader::read_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line)：用于从标准输入异步读取用户消息。\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"为了练习您的异步 Rust 技能，我们再次为您提供了两个练习：\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\"哲学家进餐：我们已经在上午看到了这个问题。这次你将使用异步 Rust 来实现它。\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"广播聊天应用：这是一个更大的项目，允许您尝试更高级的异步Rust功能。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"哲学家进餐 - 异步\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"查看[哲学家进餐](dining-philosophers.md)以获取问题的描述。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"在本练习中，需要使用本地 [Cargo 安装](../../cargo/running-locally.md)。将以下\"\n\"代码复制到名为 `src/main.rs` 的文件中，并填写空白的地方，然后测试 `cargo \"\n\"run` 不会死锁：\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"// Keep trying until we have both forks\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"// Make them think and eat\"\nmsgstr \"// Make them think and eat\\n\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"因为这次您正在使用异步Rust，您将需要一个 `tokio` 依赖。您可以使用以下的 \"\n\"`Cargo.toml`：\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = {version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"]}\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"另外，请注意，这次您必须使用来自 `tokio` 包的 `Mutex` 和 `mpsc` 模块。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#, fuzzy\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"您可以单线程化您的实现吗？\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"在本练习中，我们想要使用我们的新知识来实现一个广播聊天应用。我们有一个聊天服\"\n\"务器，客户端连接到该服务器并发布他们的消息。客户端从标准输入读取用户消息，并\"\n\"将其发送到服务器。聊天服务器将收到的每条消息广播给所有客户端。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"为此，我们在服务器上使用一个[广播 channel](https://docs.rs/tokio/latest/\"\n\"tokio/sync/broadcast/fn.channel.html)，并使用[`tokio_websockets`](https://\"\n\"docs.rs/tokio-websockets/0.3.2/tokio_websockets/) 来进行客户端与服务器之间的\"\n\"通信。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"创建一个新的 Cargo 项目并添加以下依赖：\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"_Cargo.toml_:\"\nmsgstr \"`Cargo.toml`：\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.1.0\\\"\\n\"\n\"tokio = { version = \\\"1.37.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.7.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.28\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"0.2.9\\\"\\n\"\n\"tokio = { version = \\\"1.28.1\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.4.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"所需的API\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"您将需要来自 `tokio` 和 [`tokio_websockets`](https://docs.rs/tokio-\"\n\"websockets/0.3.2/tokio_websockets/) 的以下函数。请花几分钟时间熟悉这些 API。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) 由`WebsocketStream`实现：用于在Websocket流上\"\n\"异步发送消息。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) 由`WebsocketStream`实现：用于在Websocket流上\"\n\"异步发送消息。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[BufReader::read_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line)：用于从标准输入异步读取用户消息。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe)：用于订阅广播频道。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"两个可执行文件\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"通常在一个 Cargo 项目中，你只能有一个二进制文件，和一个 `src/main.rs` 文件。\"\n\"在这个项目中，我们需要两个二进制文件。一个用于客户端，另一个用于服务器。你可\"\n\"能会考虑将它们制作成两个单独的 Cargo 项目，但我们将它们放在一个包含两个二进制\"\n\"文件的 Cargo 项目中。为了使其工作，客户端和服务器的代码应该放在 `src/bin` 下\"\n\"（参见[文档](https://doc.rust-lang.org/cargo/reference/cargo-targets.\"\n\"html#binaries)）。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"将以下服务器和客户端代码分别复制到 `src/bin/server.rs` 和 `src/bin/client.\"\n\"rs` 中。您的任务是按照下面的描述完成这些文件。\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"`src/bin/server.rs`:\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"// TODO: For a hint, see the description of the task below.\"\nmsgstr \"// TODO: For a hint, see the description of the task below.\\n\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"listening on port 2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"New connection from {addr:?}\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Wrap the raw TCP stream into a websocket.\\n\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"`src/bin/client.rs`:\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"运行可执行文件\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"Run the server with:\"\nmsgstr \"and the client with:\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"and the client with:\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"在 `src/bin/server.rs` 中实现 `handle_connection` 函数。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"提示：使用 `tokio::select!` 在一个连续的循环中并发执行两个任务。一个任务从客\"\n\"户端接收消息并广播它们。另一个任务将服务器接收到的消息发送给客户端。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"完成 `src/bin/client.rs` 中的 `main` 函数。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"提示：与之前一样，使用 `tokio::select!` 在一个连续的循环中并发执行两个任务：\"\n\"(1) 从标准输入读取用户消息并发送给服务器，以及 (2) 从服务器接收消息并显示给用\"\n\"户。\"\n\n#: src/exercises/concurrency/chat-app.md\n#, fuzzy\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"可选：完成后，将代码更改为将消息广播给除消息发送者以外的所有客户端。\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"并发编程：下午练习\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([返回练习](dining-philosophers-async.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Pick up forks...\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// The locks are dropped here\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Create forks\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Create philosophers\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Make them think and eat\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Output their thoughts\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Here is a thought: {thought}\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([返回练习](chat-app.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Welcome to chat! Type a message\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\n#, fuzzy\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"提示：与之前一样，使用 `tokio::select!` 在一个连续的循环中并发执行两个任务：\"\n\"(1) 从标准输入读取用户消息并发送给服务器，以及 (2) 从服务器接收消息并显示给用\"\n\"户。\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"From client {addr:?} {text:?}\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Continuous loop for concurrently sending and receiving messages.\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"From server: {}\\\"\"\n\n#: src/thanks.md\n#, fuzzy\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"_感谢您参与学习 Comprehensive Rust 🦀！_ 希望您喜欢并且觉得它有用。\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"组织这门课程让我们收获了很多乐趣。本课程并非完美无缺，因此，如果您发现任何错\"\n\"误或有任何改进建议，请[在 GitHub 上与我们联系](https://github.com/google/\"\n\"comprehensive-rust/discussions)。我们期待收到您的宝贵意见。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"本页面的词汇表提供了许多 Rust 术语的简要定义。同时提供翻译版本和英语原文的对\"\n\"应。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"分配（allocate）：  \\n\"\n\"在 [堆](memory-management/stack-vs-heap.md) 上进行动态内存分配。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"参数（argument）：  \\n\"\n\"传入某个函数或方法中的信息。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"裸机 Rust（Bare-metal Rust）：  \\n\"\n\"底层 Rust 开发方式，通常部署于没有操作系统的系统。请参阅 [裸机 Rust](bare-\"\n\"metal.md)。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"代码块（block）：  \\n\"\n\"请参阅 [代码块](control-flow/blocks.md) 和 **作用域**。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"借用（borrow）：  \\n\"\n\"请参阅 [借用](ownership/borrowing.md)。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"借用检查器（borrow checker）：  \\n\"\n\"Rust 编译器的一部分，用于检查所有借用操作是否有效。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"大括号（brace）：  \\n\"\n\"`{` 和 `}`。也称为 **花括号**，用于分隔 **代码块**。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"构建（build）：  \\n\"\n\" 将源代码转换为可执行代码或可用程序的过程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"调用（call）：  \\n\"\n\"调用或执行某个函数或方法。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"通道（channel）：  \\n\"\n\"用于安全地 [在线程之间](concurrency/channels.md) 传递消息。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀：  \\n\"\n\"本课程统称为 Comprehensive Rust 🦀。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"并发（concurrency）：  \\n\"\n\"同时执行多个任务或进程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Rust 中的并发（Concurrency in Rust）：  \\n\"\n\"请参阅 [Rust 中的并发](concurrency.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"常量（constant）：  \\n\"\n\"在程序执行期间不会改变的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"控制流（control flow）：  \\n\"\n\"程序中各个语句或指令的执行顺序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"崩溃（crash）：  \\n\"\n\"程序出现意外的、未处理的故障或终止。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"枚举（enumeration）：  \\n\"\n\"一种用于保存多个已命名常量中的一个的数据类型，可能还有一个相关的元组或结构\"\n\"体。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"错误（error）：  \\n\"\n\"与预期行为存在偏差的意外情况或结果。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"错误处理（error handling）：  \\n\"\n\"对程序执行期间发生的错误进行管理和响应的过程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"练习（exercise）：  \\n\"\n\"专为练习和测试编程技能而设计的任务或问题。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"函数（function）：  \\n\"\n\"用于执行特定任务且可重复使用的代码块。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"垃圾回收器（garbage collector）：  \\n\"\n\"一种自动释放不再使用的对象所占内存的机制。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"泛型（generics）：  \\n\"\n\"这项功能支持使用类型占位符编写代码，支持对不同数据类型的代码进行重复使用。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"不可变（immutable）：  \\n\"\n\"创建后无法再进行更改。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"集成测试（integration test）：  \\n\"\n\"一种验证系统不同部分或组件之间交互的测试类型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"关键字（keyword）：  \\n\"\n\"编程语言中的保留字，具有特定含义且不能用作标识符。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"库（library）：  \\n\"\n\"程序可以使用的一组预编译例程或代码。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"宏（macro）：  \\n\"\n\"Rust 宏可通过名称中的 `!` 符号识别。当普通函数无法满足需求时，可以使用宏。一\"\n\"个典型示例是 `format!`，其接受可变数量的参数，但 Rust 函数不支持这种类型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` 函数（`main` function）：  \\n\"\n\"Rust 程序从 `main` 函数开始执行。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"匹配（match）：  \\n\"\n\"Rust 中的控制流结构，允许对表达式的值进行模式匹配。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"内存泄漏（memory leak）：  \\n\"\n\"程序无法释放不再不要的内存的情况，会导致内存用量不断增加。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"方法（method）：  \\n\"\n\"与 Rust 中的某个对象或类型相关联的函数。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"模块（module）：  \\n\"\n\"Rust 中用于归纳整理代码的命名空间，其中包含函数、类型或特性等定义。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"移动（move）：  \\n\"\n\"在 Rust 中，将值的所有权从一个变量转移到另一个变量。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"可变（mutable）：  \\n\"\n\"Rust 中的一个属性，支持在声明变量后对其进行修改。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"所有权（ownership）：  \\n\"\n\"Rust 中的概念，用于定义代码中的哪一部分负责管理与值关联的内存。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"panic：  \\n\"\n\"Rust 中导致程序终止且不可恢复的错误情况。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"参数（parameter）：  \\n\"\n\"在调用函数或方法时传入函数或方法的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"模式（pattern）：  \\n\"\n\"Rust 中可与表达式匹配的值、字面量或结构的组合。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"载荷（payload）：  \\n\"\n\"消息、事件或数据结构所携带的数据或信息。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"程序（program）：  \\n\"\n\"计算机为执行特定任务或解决特定问题而执行的一组指令。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"编程语言（programming language）：  \\n\"\n\"用于向计算机传递指令的正式系统，例如 Rust。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"接收器（receiver）：  \\n\"\n\"Rust 方法中的首个参数，表示正在调用该方法的实例。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"引用计数（reference counting）：  \\n\"\n\"一种内存管理方法，可以跟踪某个对象的引用数量，并在计数为零时释放该对象。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"返回（return）：  \\n\"\n\"Rust 中的一个关键字，用于表示从函数返回的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust：  \\n\"\n\"一种系统编程语言，专注于安全性、性能和并发性。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Rust 基础（Rust Fundamentals）：  \\n\"\n\" 本课程第 1 天到第 4 天的内容。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Android 中的 Rust（Rust in Android）：  \\n\"\n\"请参阅 [Android 中的 Rust](android.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Chromium 中的 Rust（Rust in Chromium）:  \\n\"\n\"请参阅 [Chromium 中的 Rust](chromium.md).\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"安全（safe）：  \\n\"\n\"指代码遵循 Rust 的所有权和借用规则，以防止出现与内存相关的错误。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"作用域（scope）：  \\n\"\n\"程序中变量有效且可使用的区域。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"标准库（standard library）：  \\n\"\n\"Rust 中提供基本功能的一系列模块。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"静态（static）：  \\n\"\n\"Rust 中的关键字，用于定义具有 `'static` 生命周期的静态变量或项。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\"字符串（string）：  \\n\"\n\"一种存储文本数据的数据类型。如需了解详情，请参阅 [`String` 与 `str`](basic-\"\n\"syntax/string-slices.html)。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"结构体（struct）：  \\n\"\n\"Rust 中的复合数据类型，可将不同类型的变量归到同一名称下。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"测试（test）：  \\n\"\n\"Rust 中的模块，其中包含用于测试其他函数是否正确的函数。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"线程（thread）：  \\n\"\n\"程序中的单独执行顺序，支持并发执行。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"线程安全（thread safety）：  \\n\"\n\"一种程序属性，用于确保多线程环境中的行为正确无误。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"特征（trait）：  \\n\"\n\"用于定义未知类型的一系列方法，为在 Rust 中实现多态性提供了方法。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"特征约束（trait bound）:  \\n\"\n\"一种可以要求类型实现一些感兴趣的特性的抽象。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"元组（tuple）：  \\n\"\n\"包含不同类型变量的复合数据类型。元组的字段没有名称，需要通过序号访问。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"类型（type）：  \\n\"\n\"一种分类方式，用于指定可以对 Rust 中特定类型的值执行哪些操作。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"类型推导（type inference）：  \\n\"\n\"Rust 编译器能够推断变量或表达式的类型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"未定义行为（undefined behavior）：  \\n\"\n\"Rust 中未指定结果的操作或条件，通常会导致不可预测的程序行为。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"联合体（union）：  \\n\"\n\"一种数据类型，可以存储不同类型的值，但一次只能保存一个值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"单元测试（unit test）：  \\n\"\n\"Rust 内置了运行小型单元测试和大型集成测试的支持功能。请参阅 [单元测试]\"\n\"(testing/unit-tests.html)。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"单元类型（unit type）:  \\n\"\n\"不保存数据的类型，写为没有成员的元组。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"不安全（unsafe）：  \\n\"\n\"Rust 的子集，允许触发 **未定义行为**。请参阅 [不安全 Rust](unsafe.html)。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"变量（variable）：  \\n\"\n\"用于存储数据的内存位置。变量在 **作用域** 内有效。\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"其他 Rust 资源\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"Rust 社区已经创造了丰富的高质量免费资源在线提供。\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"官方文档\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Rust 项目提供了许多资源。这些资源涵盖了 Rust 的一般内容：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[Rust 程序设计语言](https://doc.rust-lang.org/book/)：一部有关 Rust 的免费权\"\n\"威图书。书中详细介绍了该语言，并包含一些可供读者构建的项目。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[通过例子学 Rust](https://doc.rust-lang.org/rust-by-example/)：通过一系列展示\"\n\"不同结构的示例介绍 Rust 语法。有时会包括一些小练习，会要求您充分地阐述示例中\"\n\"的代码。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"[Rust 标准库](https://doc.rust-lang.org/std/)：Rust 标准库的完整文档。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[Rust 参考手册](https://doc.rust-lang.org/reference/)：一本未完成的书，介绍\"\n\"了 Rust 语法和内存模型。\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"Rust 官方网站上有更多专业指南：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[Rust 秘典](https://doc.rust-lang.org/nomicon/)：介绍了不安全 Rust，包括使用\"\n\"原始指针以及与其他语言 (FFI) 交互。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Rust 中的异步编程](https://rust-lang.github.io/async-book/)：介绍了在《Rust \"\n\"程序设计语言》成书后引入的新异步编程模型。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[嵌入式 Rust 之书](https://doc.rust-lang.org/stable/embedded-book/)：介绍如何\"\n\"在没有操作系统的嵌入式设备上使用 Rust。\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"非官方学习资料\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"其他 Rust 指南和教程的小选集：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way（以危险的方式学 Rust）](http://cliffle.com/p/\"\n\"dangerust/)：从低级 C 语言程序员的角度介绍 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[面向嵌入式 C 程序员的 Rust](https://docs.opentitan.org/doc/ug/rust_for_c/)：\"\n\"从使用 C 语言编写固件的开发者的角度介绍 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust for professionals（面向专业人士的 Rust）](https://overexact.com/rust-\"\n\"for-professionals/)：通过与其他语言（例如 C、C++、Java、JavaScript 和 \"\n\"Python）进行并排比较，介绍 Rust 的语法。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism（在 Exercism 上学 Rust）](https://exercism.org/tracks/\"\n\"rust)：100 多项练习助您学习 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html)：一系列小演示文稿，涵盖 Rust 语言的基础知识和高级部分。\"\n\"还涵盖了 WebAssembly 和 async/await 等其他主题。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"[面向 Rust 的初学者系列](https://docs.microsoft.com/zh-cn/shows/beginners-\"\n\"series-to-rust/)和[使用 Rust 迈出第一步](https://docs.microsoft.com/zh-cn/\"\n\"learn/paths/rust-first-steps/)：两个面向新手开发者的 Rust 指南。第一个指南包\"\n\"含 35 个视频，第二个指南包含 11 个模块，内容涵盖 Rust 语法和基本结构。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[通过大量的链表学习Rust](https://rust-unofficial.github.io/too-many-lists/)：\"\n\"通过实现几种不同类型的列表结构，深入探索 Rust 的内存管理规则。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"如需更多 Rust 图书，请查看 [Rust 小册](https://lborb.github.io/book/)。\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"本课中的资料以众多优秀的 Rust 文档资源为基础。 如需查看实用资源的完整列表， \"\n\"请参阅关于[其他资源](other-resources.md)的页面。\"\n\n#: src/credits.md\n#, fuzzy\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"我们根据 Apache 2.0 许可条款 授权你使用“全面了解 Rust”（Comprehensive Rust）\"\n\"的资料。如需了解详情，请参阅[`许可`](../LICENSE)。\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust 示例\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"部分示例和练习复制并 改编自[Rust by Example](https://doc.rust-lang.org/rust-\"\n\"by-example/)。如需了解详情（包括许可 条款），请参阅 `third_party/rust-by-\"\n\"example/` 目录。\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Rust on Exercism\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"部分练习复制并 改编自 [Rust on Exercism](https://exercism.org/tracks/rust)。\"\n\"如需了解详情（包括许可 条款），请参阅 `third_party/rust-on-exercism/` 目录。\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"“[与 C++ 的互操作性](android/interoperability/cpp.md)”部分引用了一张 来自 \"\n\"[CXX](https://cxx.rs/) 的图片。如需了解详情（包括许可条款）， 请参阅 \"\n\"`third_party/cxx/` 目录。\"\n\n#~ msgid \"Conditionals\"\n#~ msgstr \"条件控制\"\n\n#~ msgid \"Static and Const\"\n#~ msgstr \"静态变量与常量\"\n\n#~ msgid \"Slices and Lifetimes\"\n#~ msgstr \"切片与生命周期\"\n\n#~ msgid \"String References\"\n#~ msgstr \"字符串引用\"\n\n#~ msgid \"Day 2 Afternoon (3 hours, including breaks)\"\n#~ msgstr \"第二天下午（3 小时，含休息时间）\"\n\n#~ msgid \"Day 4 Morning (2 hours and 50 minutes, including breaks)\"\n#~ msgstr \"第四天上午（2 小时 50 分钟，含休息时间）\"\n\n#~ msgid \"Day 4 Afternoon (2 hours, including breaks)\"\n#~ msgstr \"第四天下午（2 小时，含休息时间）\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust has two types to represent strings, both of which will be covered in \"\n#~ \"more depth later. Both _always_ store UTF-8 encoded strings.\"\n#~ msgstr \"\"\n#~ \"Rust 有两种用于表示字符串的类型，稍后会对它们进行更详细的介绍。两种类型都 \"\n#~ \"_始终_ 存储UTF-8 编码的字符串。\"\n\n#, fuzzy\n#~ msgid \"`String` - a modifiable, owned string.\"\n#~ msgstr \"`String` 是一个可变字符串缓冲区。\"\n\n#~ msgid \"`&str` - a read-only string. String literals have this type.\"\n#~ msgstr \"`&str` 为只读字符串。字符串字面量属于此类型。\"\n\n#~ msgid \"\\\"🪐\\\"\"\n#~ msgstr \"\\\"🪐\\\"\"\n\n#~ msgid \"\\\", \\\"\"\n#~ msgstr \"\\\", \\\"\"\n\n#~ msgid \"\\\"final sentence: {}\\\"\"\n#~ msgstr \"\\\"final sentence: {}\\\"\"\n\n#, fuzzy\n#~ msgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\"\n#~ msgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#~ msgid \"\"\n#~ \"This slide introduces strings. Everything here will be covered in more \"\n#~ \"depth later, but this is enough for subsequent slides and exercises to \"\n#~ \"use strings.\"\n#~ msgstr \"\"\n#~ \"此幻灯片介绍了字符串。此处所有内容均会在稍后进行更详细的介绍，但对于后续幻\"\n#~ \"灯片和练习而言，当前介绍足以支撑使用字符串了。\"\n\n#~ msgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\n#~ msgstr \"\"\n#~ \"字符串中的无效 UTF-8 是未定义行为 (UB)，这在安全的 Rust 中是不允许的。\"\n\n#~ msgid \"\"\n#~ \"`String` is a user-defined type with a constructor (`::new()`) and \"\n#~ \"methods like `s.push_str(..)`.\"\n#~ msgstr \"\"\n#~ \"`String` 是一种用户定义的类型，具有构造函数 (`::new()`) 和类似 `s.\"\n#~ \"push_str(..)` 的方法。\"\n\n#~ msgid \"\"\n#~ \"The `&` in `&str` indicates that this is a reference. We will cover \"\n#~ \"references later, so for now just think of `&str` as a unit meaning \\\"a \"\n#~ \"read-only string\\\".\"\n#~ msgstr \"\"\n#~ \"`&str` 中的 `&` 表示这是一个引用。我们稍后将介绍引用，现在只需将 `&str` 视\"\n#~ \"为一个单位，表示 “只读字符”。\"\n\n#~ msgid \"\"\n#~ \"The commented-out line is indexing into the string by byte position. \"\n#~ \"`12..13` does not end on a character boundary, so the program panics. \"\n#~ \"Adjust it to a range that does, based on the error message.\"\n#~ msgstr \"\"\n#~ \"注释掉的行会按字节位置编入字符串的索引。`12..13` 不是以字符边界结尾，因此\"\n#~ \"会导致程序 panic。根据错误消息，将其调整至以字符边界结尾的范围。\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"Rust 的许多语法与 C、C++ 和 Java 的语法相似：\"\n\n#, fuzzy\n#~ msgid \"Blocks are delimited by curly braces.\"\n#~ msgstr \"代码块和作用域都是由花括号来界定的。\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"行内注释以 `//` 起始，块注释使用 `/* ... */` 来界定。\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"`if` 和 `while` 等关键词作用与以上语言一致。\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"变量赋值使用 `=`，值之间比较使用 `==`。\"\n\n#~ msgid \"\"\n#~ \"We will discuss iteration later; for now, just stick to range expressions.\"\n#~ msgstr \"我们稍后会讨论迭代；暂时只使用范围表达式。\"\n\n#~ msgid \"\\\"{result}\\\"\"\n#~ msgstr \"\\\"{result}\\\"\"\n\n#~ msgid \"\\\"x: {x}, i: {i}\\\"\"\n#~ msgstr \"\\\"x: {x}, i: {i}\\\"\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"在本示例中，我们会在内循环 3 次迭代后终止外循环。\"\n\n#~ msgid \"\"\n#~ \"Tuples and arrays are the first \\\"compound\\\" types we have seen. All \"\n#~ \"elements of an array have the same type, while tuples can accommodate \"\n#~ \"different types. Both types have a size fixed at compile time.\"\n#~ msgstr \"\"\n#~ \"元组和数组是我们见过的第一个 “复合”类型。数组的所有元素具有相同的类型，而\"\n#~ \"元组可以适应不同的类型。这两种类型的大小在编译时是固定的。\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`, `[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`, `(T,)`, `(T1, T2)`, ...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"数组的赋值和访问操作：\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"元组的赋值和访问操作：\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"数组：\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"元组：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type --- that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide.\"\n#~ msgstr \"\"\n#~ \"空元组 `()` 也被称作 “单元（unit）类型”. 它既是一个类型， 也是这种类型的唯\"\n#~ \"一值——也就是说它的类型和它的值都被表示为 `()`。它通常用于表示，比如，一个\"\n#~ \"函数或表达式没有返回值，我们会在后续的幻灯片种见到这种用法。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other \"\n#~ \"programming languages.\"\n#~ msgstr \"你可以将其理解为你可能在其他编程语言中比较熟悉的 `void` 类型。\"\n\n#~ msgid \"\"\n#~ \"Destructuring is a way of extracting data from a data structure by \"\n#~ \"writing a pattern that is matched up to the data structure, binding \"\n#~ \"variables to subcomponents of the data structure.\"\n#~ msgstr \"\"\n#~ \"解构是一种从数据结构中提取数据的方法，具体方法是编写与数据结构匹配的模式，\"\n#~ \"将变量绑定到数据结构的子组件。\"\n\n#, fuzzy\n#~ msgid \"You can destructure tuples and arrays by matching on their elements:\"\n#~ msgstr \"你可以通过元素匹配来解构数组、元组和切片：\"\n\n#~ msgid \"\\\"on Y axis\\\"\"\n#~ msgstr \"\\\"on Y axis\\\"\"\n\n#~ msgid \"\\\"on X axis\\\"\"\n#~ msgstr \"\\\"on X axis\\\"\"\n\n#~ msgid \"\\\"left of Y axis\\\"\"\n#~ msgstr \"\\\"left of Y axis\\\"\"\n\n#~ msgid \"\\\"below X axis\\\"\"\n#~ msgstr \"\\\"below X axis\\\"\"\n\n#~ msgid \"\\\"first quadrant\\\"\"\n#~ msgstr \"\\\"first quadrant\\\"\"\n\n#~ msgid \"\\\"Tell me about {triple:?}\\\"\"\n#~ msgstr \"\\\"Tell me about {triple:?}\\\"\"\n\n#~ msgid \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n#~ msgstr \"\\\"First is 0, y = {y}, and z = {z}\\\"\"\n\n#~ msgid \"\\\"First is 1 and the rest were ignored\\\"\"\n#~ msgstr \"\\\"First is 1 and the rest were ignored\\\"\"\n\n#~ msgid \"\\\"All elements were ignored\\\"\"\n#~ msgstr \"\\\"All elements were ignored\\\"\"\n\n#, fuzzy\n#~ msgid \"Create a new array pattern using `_` to represent an element.\"\n#~ msgstr \"使用 `_` 创建一个新的模式来代表一个元素。\"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"向数组中添加更多的值。\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"指出 `..` 是如何扩展以适应不同数量的元素的。\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"展示使用模式 `[.., b]` 和 `[a@..,b]` 来匹配切片的尾部。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Static and constant variables are two different ways to create globally-\"\n#~ \"scoped values that cannot be moved or reallocated during the execution of \"\n#~ \"the program.\"\n#~ msgstr \"\"\n#~ \"静态变量和常量是创建全局范围值的两种不同方法，这类值在程序执行期间无法移动\"\n#~ \"或重新分配。\"\n\n#~ msgid \"Properties table:\"\n#~ msgstr \"属性表：\"\n\n#~ msgid \"Has an address in memory\"\n#~ msgstr \"在内存中有地址\"\n\n#~ msgid \"No (inlined)\"\n#~ msgstr \"否（内嵌）\"\n\n#, fuzzy\n#~ msgid \"Lives for the entire duration of the program\"\n#~ msgstr \"`main` 函数是程序的入口。\"\n\n#~ msgid \"Can be mutable\"\n#~ msgstr \"可变\"\n\n#~ msgid \"Yes (unsafe)\"\n#~ msgstr \"是（不安全）\"\n\n#, fuzzy\n#~ msgid \"Evaluated at compile time\"\n#~ msgstr \"值在编译时具有已知的固定大小。\"\n\n#~ msgid \"Yes (initialised at compile time)\"\n#~ msgstr \"是（在编译时被初始化）\"\n\n#~ msgid \"Inlined wherever it is used\"\n#~ msgstr \"内嵌在使用它的任何位置\"\n\n#, fuzzy\n#~ msgid \"// fn set_x(&mut self, x: T)\"\n#~ msgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#~ msgid \"/// Return true if self is less than other.\\n\"\n#~ msgstr \"/// Return true if self is less than other.\\n\"\n\n#~ msgid \"\\\"Shapiro\\\"\"\n#~ msgstr \"\\\"Shapiro\\\"\"\n\n#~ msgid \"\\\"Baumann\\\"\"\n#~ msgstr \"\\\"Baumann\\\"\"\n\n#~ msgid \"\\\"there\\\"\"\n#~ msgstr \"\\\"there\\\"\"\n\n#~ msgid \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n#~ msgstr \"\\\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\\\"\"\n\n#~ msgid \"\"\n#~ \"A `Box` cannot be empty, so the pointer is always valid and non-`null`. \"\n#~ \"This allows the compiler to optimize the memory layout:\"\n#~ msgstr \"\"\n#~ \"`Box` 不得为空，因此指针始终有效且非 `null`。这样， 编译器就可以优化内存布\"\n#~ \"局：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                           Heap\\n\"\n#~ \".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":    list                    :     :                           :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n#~ \":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \":                            :     :                           :\\n\"\n#~ \"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" 栈                           堆\\n\"\n#~ \".- - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - - -.\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \":    \"\n#~ \"list                 :     :                                               :\\n\"\n#~ \":   +------+----+----+    :     :    +------+----+----+    +------+----\"\n#~ \"+----+   :\\n\"\n#~ \":   | Cons | 1  | o--+----+-----+--->| Cons | 2  | o--+--->| Nil  | // \"\n#~ \"| // |   :\\n\"\n#~ \":   +------+----+----+    :     :    +------+----+----+    +------+----\"\n#~ \"+----+   :\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \":                         :     :                                               :\\n\"\n#~ \"'- - - - - - - - - - - - -'     '- - - - - - - - - - - - - - - - - - - - \"\n#~ \"- - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"We can now understand the two string types in Rust: `&str` is almost like \"\n#~ \"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\n#~ msgstr \"\"\n#~ \"现在，我们能够理解 Rust 中的两种字符串类型：`&str` 几乎与 `&[char]` 一样，\"\n#~ \"只不过其数据存储在可变长度编码 (UTF-8) 中。\"\n\n#~ msgid \"Rust terminology:\"\n#~ msgstr \"Rust 术语：\"\n\n#~ msgid \"`&str` an immutable reference to a string slice.\"\n#~ msgstr \"`&str` 是一个指向字符串片段的不可变引用。\"\n\n#~ msgid \"`String` a mutable string buffer.\"\n#~ msgstr \"`String` 是一个可变字符串缓冲区。\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust 仅为编写测试提供基本支持。\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"下面列出了我们建议在编写测试时使用的一些其他 crate：\"\n\n#~ msgid \"\"\n#~ \"[googletest](https://docs.rs/googletest): Comprehensive test assertion \"\n#~ \"library in the tradition of GoogleTest for C++.\"\n#~ msgstr \"\"\n#~ \"[googletest](https://docs.rs/googletest)：遵从 GoogleTest for C++ 传统的综\"\n#~ \"合测试断言库。\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"[proptest](https://docs.rs/proptest)：基于属性的测试，适用于 Rust。\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"[rstest](https://docs.rs/rstest)：支持固件和参数化测试。\"\n\n#~ msgid \"GoogleTest is available for use in AOSP.\"\n#~ msgstr \"GoogleTest 可以在 AOSP 中使用。\"\n\n#, fuzzy\n#~ msgid \"// Undefined behavior if abs misbehaves.\"\n#~ msgstr \"Rust 没有运行时未定义行为：\"\n\n#, fuzzy\n#~ msgid \"// Safe because ...\"\n#~ msgstr \"// Safe because ...\\n\"\n\n#~ msgid \"\"\n#~ \"Add `vendor_available: true` if your AIDL file is used by a binary in the \"\n#~ \"vendor partition.\"\n#~ msgstr \"\"\n#~ \"如果供应商分区中的二进制文件使用了您的 AIDL 文件，请添加 \"\n#~ \"`vendor_available: true`。\"\n\n#, fuzzy\n#~ msgid \"/// Connect to the BirthdayService.\\n\"\n#~ msgstr \"/// Connect to the BirthdayService.\\n\"\n\n#, fuzzy\n#~ msgid \"// Set up the I2C controller and Inertial Measurement Unit.\"\n#~ msgstr \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\n#, fuzzy\n#~ msgid \"// Read compass data and log it to the serial port.\"\n#~ msgstr \"// Read compass data and log it to the serial port.\\n\"\n\n#, fuzzy\n#~ msgid \"// TODO: Create instance of RTC driver and print current time.\"\n#~ msgstr \"// TODO: Create instance of RTC driver and print current time.\\n\"\n\n#, fuzzy\n#~ msgid \"// TODO: Wait for 3 seconds.\"\n#~ msgstr \"// TODO: Wait for 3 seconds.\\n\"\n\n#~ msgid \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n#~ msgstr \"\"\n#~ \"// Copyright 2023 Google LLC\\n\"\n#~ \"//\\n\"\n#~ \"// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \"// you may not use this file except in compliance with the License.\\n\"\n#~ \"// You may obtain a copy of the License at\\n\"\n#~ \"//\\n\"\n#~ \"//      http://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \"//\\n\"\n#~ \"// Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \"// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \"// See the License for the specific language governing permissions and\\n\"\n#~ \"// limitations under the License.\\n\"\n\n#~ msgid \"\\\"sync_exception_current\\\"\"\n#~ msgstr \"\\\"sync_exception_current\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"irq_current\\\"\"\n#~ msgstr \"\\\"irq_current\\\"\"\n\n#~ msgid \"\\\"No pending interrupt\\\"\"\n#~ msgstr \"\\\"No pending interrupt\\\"\"\n\n#~ msgid \"\\\"IRQ {intid:?}\\\"\"\n#~ msgstr \"\\\"IRQ {intid:?}\\\"\"\n\n#~ msgid \"\\\"fiq_current\\\"\"\n#~ msgstr \"\\\"fiq_current\\\"\"\n\n#~ msgid \"\\\"serr_current\\\"\"\n#~ msgstr \"\\\"serr_current\\\"\"\n\n#~ msgid \"\\\"sync_lower\\\"\"\n#~ msgstr \"\\\"sync_lower\\\"\"\n\n#~ msgid \"\\\"irq_lower\\\"\"\n#~ msgstr \"\\\"irq_lower\\\"\"\n\n#~ msgid \"\\\"fiq_lower\\\"\"\n#~ msgstr \"\\\"fiq_lower\\\"\"\n\n#~ msgid \"\\\"serr_lower\\\"\"\n#~ msgstr \"\\\"serr_lower\\\"\"\n\n#~ msgid \"// ANCHOR: main\\n\"\n#~ msgstr \"// ANCHOR: main\\n\"\n\n#~ msgid \"// ANCHOR: Flags\\n\"\n#~ msgstr \"// ANCHOR: Flags\\n\"\n\n#~ msgid \"// ANCHOR_END: Flags\\n\"\n#~ msgstr \"// ANCHOR_END: Flags\\n\"\n\n#~ msgid \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n#~ msgstr \"\"\n#~ \"/// Flags from the UART Receive Status Register / Error Clear Register.\\n\"\n\n#~ msgid \"/// Framing error.\\n\"\n#~ msgstr \"/// Framing error.\\n\"\n\n#~ msgid \"/// Parity error.\\n\"\n#~ msgstr \"/// Parity error.\\n\"\n\n#~ msgid \"/// Break error.\\n\"\n#~ msgstr \"/// Break error.\\n\"\n\n#~ msgid \"/// Overrun error.\\n\"\n#~ msgstr \"/// Overrun error.\\n\"\n\n#~ msgid \"// ANCHOR: Registers\\n\"\n#~ msgstr \"// ANCHOR: Registers\\n\"\n\n#~ msgid \"// ANCHOR_END: Registers\\n\"\n#~ msgstr \"// ANCHOR_END: Registers\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR: Uart\\n\"\n#~ \"/// Driver for a PL011 UART.\\n\"\n\n#~ msgid \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n#~ msgstr \"\"\n#~ \"/// Constructs a new instance of the UART driver for a PL011 device at \"\n#~ \"the\\n\"\n#~ \"    /// given base address.\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// # Safety\\n\"\n#~ \"    ///\\n\"\n#~ \"    /// The given base address must point to the MMIO control registers \"\n#~ \"of a\\n\"\n#~ \"    /// PL011 device, which must be mapped into the address space of the \"\n#~ \"process\\n\"\n#~ \"    /// as device memory and not have any other aliases.\\n\"\n\n#~ msgid \"// ANCHOR_END: Uart\\n\"\n#~ msgstr \"// ANCHOR_END: Uart\\n\"\n\n#~ msgid \"\\\"linux\\\"\"\n#~ msgstr \"\\\"linux\\\"\"\n\n#~ msgid \"\\\"CROSS_COMPILE\\\"\"\n#~ msgstr \"\\\"CROSS_COMPILE\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"aarch64-linux-gnu\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"aarch64-none-elf\\\"\"\n#~ msgstr \"\\\"aarch64-none-elf\\\"\"\n\n#~ msgid \"\\\"entry.S\\\"\"\n#~ msgstr \"\\\"entry.S\\\"\"\n\n#, fuzzy\n#~ msgid \"\\\"exceptions.S\\\"\"\n#~ msgstr \"异常\"\n\n#~ msgid \"\\\"idmap.S\\\"\"\n#~ msgstr \"\\\"idmap.S\\\"\"\n\n#~ msgid \"\\\"empty\\\"\"\n#~ msgstr \"\\\"empty\\\"\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic entry point for an image. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".macro adr_l, reg:req, sym:req\\n\"\n#~ \"\\tadrp \\\\reg, \\\\sym\\n\"\n#~ \"\\tadd \\\\reg, \\\\reg, :lo12:\\\\sym\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".macro mov_i, reg:req, imm:req\\n\"\n#~ \"\\tmovz \\\\reg, :abs_g3:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g2_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g1_nc:\\\\imm\\n\"\n#~ \"\\tmovk \\\\reg, :abs_g0_nc:\\\\imm\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".set .L_MAIR_DEV_nGnRE,\\t0x04\\n\"\n#~ \".set .L_MAIR_MEM_WBWA,\\t0xff\\n\"\n#~ \".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\\n\"\n#~ \"\\n\"\n#~ \"/* 4 KiB granule size for TTBR0_EL1. */\\n\"\n#~ \".set .L_TCR_TG0_4KB, 0x0 << 14\\n\"\n#~ \"/* 4 KiB granule size for TTBR1_EL1. */\\n\"\n#~ \".set .L_TCR_TG1_4KB, 0x2 << 30\\n\"\n#~ \"/* Disable translation table walk for TTBR1_EL1, generating a translation \"\n#~ \"fault instead. */\\n\"\n#~ \".set .L_TCR_EPD1, 0x1 << 23\\n\"\n#~ \"/* Translation table walks for TTBR0_EL1 are inner sharable. */\\n\"\n#~ \".set .L_TCR_SH_INNER, 0x3 << 12\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are outer write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_OWB, 0x1 << 10\\n\"\n#~ \"/*\\n\"\n#~ \" * Translation table walks for TTBR0_EL1 are inner write-back read-\"\n#~ \"allocate write-allocate\\n\"\n#~ \" * cacheable.\\n\"\n#~ \" */\\n\"\n#~ \".set .L_TCR_RGN_IWB, 0x1 << 8\\n\"\n#~ \"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\\n\"\n#~ \".set .L_TCR_T0SZ_512, 64 - 39\\n\"\n#~ \".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | .\"\n#~ \"L_TCR_RGN_OWB\\n\"\n#~ \".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | .\"\n#~ \"L_TCR_T0SZ_512\\n\"\n#~ \"\\n\"\n#~ \"/* Stage 1 instruction access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_I, 0x1 << 12\\n\"\n#~ \"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\\n\"\n#~ \".set .L_SCTLR_ELx_SA, 0x1 << 3\\n\"\n#~ \"/* Stage 1 data access cacheability is unaffected. */\\n\"\n#~ \".set .L_SCTLR_ELx_C, 0x1 << 2\\n\"\n#~ \"/* EL0 and EL1 stage 1 MMU enabled. */\\n\"\n#~ \".set .L_SCTLR_ELx_M, 0x1 << 0\\n\"\n#~ \"/* Privileged Access Never is unchanged on taking an exception to EL1. \"\n#~ \"*/\\n\"\n#~ \".set .L_SCTLR_EL1_SPAN, 0x1 << 23\\n\"\n#~ \"/* SETEND instruction disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_SED, 0x1 << 8\\n\"\n#~ \"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\\n\"\n#~ \".set .L_SCTLR_EL1_ITD, 0x1 << 7\\n\"\n#~ \".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << \"\n#~ \"28) | (0x1 << 29)\\n\"\n#~ \".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | .\"\n#~ \"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\\n\"\n#~ \".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | .\"\n#~ \"L_SCTLR_EL1_RES1\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic entry point for an image. It carries out the \"\n#~ \"operations required to prepare the\\n\"\n#~ \" * loaded image to be run. Specifically, it zeroes the bss section using \"\n#~ \"registers x25 and above,\\n\"\n#~ \" * prepares the stack, enables floating point, and sets up the exception \"\n#~ \"vector. It preserves x0-x3\\n\"\n#~ \" * for the Rust entry point, as these may contain boot parameters.\\n\"\n#~ \" */\\n\"\n#~ \".section .init.entry, \\\"ax\\\"\\n\"\n#~ \".global entry\\n\"\n#~ \"entry:\\n\"\n#~ \"\\t/* Load and apply the memory management configuration, ready to enable \"\n#~ \"MMU and caches. */\\n\"\n#~ \"\\tadrp x30, idmap\\n\"\n#~ \"\\tmsr ttbr0_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lmairval\\n\"\n#~ \"\\tmsr mair_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Ltcrval\\n\"\n#~ \"\\t/* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n#~ \"\\tmrs x29, id_aa64mmfr0_el1\\n\"\n#~ \"\\tbfi x30, x29, #32, #4\\n\"\n#~ \"\\n\"\n#~ \"\\tmsr tcr_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\tmov_i x30, .Lsctlrval\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Ensure everything before this point has completed, then invalidate \"\n#~ \"any potentially stale\\n\"\n#~ \"\\t * local TLB entries before they start being used.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\ttlbi vmalle1\\n\"\n#~ \"\\tic iallu\\n\"\n#~ \"\\tdsb nsh\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n#~ \"this has completed.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmsr sctlr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Disable trapping floating point access in EL1. */\\n\"\n#~ \"\\tmrs x30, cpacr_el1\\n\"\n#~ \"\\torr x30, x30, #(0x3 << 20)\\n\"\n#~ \"\\tmsr cpacr_el1, x30\\n\"\n#~ \"\\tisb\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Zero out the bss section. */\\n\"\n#~ \"\\tadr_l x29, bss_begin\\n\"\n#~ \"\\tadr_l x30, bss_end\\n\"\n#~ \"0:\\tcmp x29, x30\\n\"\n#~ \"\\tb.hs 1f\\n\"\n#~ \"\\tstp xzr, xzr, [x29], #16\\n\"\n#~ \"\\tb 0b\\n\"\n#~ \"\\n\"\n#~ \"1:\\t/* Prepare the stack. */\\n\"\n#~ \"\\tadr_l x30, boot_stack_end\\n\"\n#~ \"\\tmov sp, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Set up exception vector. */\\n\"\n#~ \"\\tadr x30, vector_table_el1\\n\"\n#~ \"\\tmsr vbar_el1, x30\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Call into Rust code. */\\n\"\n#~ \"\\tbl main\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Loop forever waiting for interrupts. */\\n\"\n#~ \"2:\\twfi\\n\"\n#~ \"\\tb 2b\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Saves the volatile registers onto the stack. This currently takes 14\\n\"\n#~ \" * instructions, so it can be used in exception handlers with 18 \"\n#~ \"instructions\\n\"\n#~ \" * left.\\n\"\n#~ \" *\\n\"\n#~ \" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 \"\n#~ \"respectively,\\n\"\n#~ \" * which can be used as the first and second arguments of a subsequent \"\n#~ \"call.\\n\"\n#~ \" */\\n\"\n#~ \".macro save_volatile_to_stack\\n\"\n#~ \"\\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\\n\"\n#~ \"\\tstp x0, x1, [sp, #-(8 * 24)]!\\n\"\n#~ \"\\tstp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tstp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tstp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tstp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tstp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tstp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tstp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tstp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tstr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tstp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Save elr_el1 & spsr_el1. This such that we can take nested \"\n#~ \"exception\\n\"\n#~ \"\\t * and still be able to unwind.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\tmrs x0, elr_el1\\n\"\n#~ \"\\tmrs x1, spsr_el1\\n\"\n#~ \"\\tstp x0, x1, [sp, #8 * 22]\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * Restores the volatile registers from the stack. This currently takes \"\n#~ \"14\\n\"\n#~ \" * instructions, so it can be used in exception handlers while still \"\n#~ \"leaving 18\\n\"\n#~ \" * instructions left; if paired with save_volatile_to_stack, there are 4\\n\"\n#~ \" * instructions to spare.\\n\"\n#~ \" */\\n\"\n#~ \".macro restore_volatile_from_stack\\n\"\n#~ \"\\t/* Restore registers x2-x18, x29 & x30. */\\n\"\n#~ \"\\tldp x2, x3, [sp, #8 * 2]\\n\"\n#~ \"\\tldp x4, x5, [sp, #8 * 4]\\n\"\n#~ \"\\tldp x6, x7, [sp, #8 * 6]\\n\"\n#~ \"\\tldp x8, x9, [sp, #8 * 8]\\n\"\n#~ \"\\tldp x10, x11, [sp, #8 * 10]\\n\"\n#~ \"\\tldp x12, x13, [sp, #8 * 12]\\n\"\n#~ \"\\tldp x14, x15, [sp, #8 * 14]\\n\"\n#~ \"\\tldp x16, x17, [sp, #8 * 16]\\n\"\n#~ \"\\tldr x18, [sp, #8 * 18]\\n\"\n#~ \"\\tldp x29, x30, [sp, #8 * 20]\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\\n\"\n#~ \"\\tldp x0, x1, [sp, #8 * 22]\\n\"\n#~ \"\\tmsr elr_el1, x0\\n\"\n#~ \"\\tmsr spsr_el1, x1\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Restore x0 & x1, and release stack space. */\\n\"\n#~ \"\\tldp x0, x1, [sp], #8 * 24\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SP0. It behaves similarly to the SPx case by first switching to SPx, \"\n#~ \"doing\\n\"\n#~ \" * the work, then switching back to SP0 before returning.\\n\"\n#~ \" *\\n\"\n#~ \" * Switching to SPx and calling the Rust handler takes 16 instructions. \"\n#~ \"To\\n\"\n#~ \" * restore and return we need an additional 16 instructions, so we can \"\n#~ \"implement\\n\"\n#~ \" * the whole handler within the allotted 32 instructions.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_sp0 handler:req\\n\"\n#~ \"\\tmsr spsel, #1\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\tmsr spsel, #0\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \"/**\\n\"\n#~ \" * This is a generic handler for exceptions taken at the current EL while \"\n#~ \"using\\n\"\n#~ \" * SPx. It saves volatile registers, calls the Rust handler, restores \"\n#~ \"volatile\\n\"\n#~ \" * registers, then returns.\\n\"\n#~ \" *\\n\"\n#~ \" * This also works for exceptions taken from EL0, if we don't care about\\n\"\n#~ \" * non-volatile registers.\\n\"\n#~ \" *\\n\"\n#~ \" * Saving state and jumping to the Rust handler takes 15 instructions, \"\n#~ \"and\\n\"\n#~ \" * restoring and returning also takes 15 instructions, so we can fit the \"\n#~ \"whole\\n\"\n#~ \" * handler in 30 instructions, under the limit of 32.\\n\"\n#~ \" */\\n\"\n#~ \".macro current_exception_spx handler:req\\n\"\n#~ \"\\tsave_volatile_to_stack\\n\"\n#~ \"\\tbl \\\\handler\\n\"\n#~ \"\\trestore_volatile_from_stack\\n\"\n#~ \"\\teret\\n\"\n#~ \".endm\\n\"\n#~ \"\\n\"\n#~ \".section .text.vector_table_el1, \\\"ax\\\"\\n\"\n#~ \".global vector_table_el1\\n\"\n#~ \".balign 0x800\\n\"\n#~ \"vector_table_el1:\\n\"\n#~ \"sync_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_sp0:\\n\"\n#~ \"\\tcurrent_exception_sp0 serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx sync_exception_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx irq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_cur_spx:\\n\"\n#~ \"\\tcurrent_exception_spx serr_current\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_64:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"sync_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx sync_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"irq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx irq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"fiq_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx fiq_lower\\n\"\n#~ \"\\n\"\n#~ \".balign 0x80\\n\"\n#~ \"serr_lower_32:\\n\"\n#~ \"\\tcurrent_exception_spx serr_lower\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* Access flag. */\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* Not global. */\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n#~ \"shareable\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* level 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```armasm\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_TYPE_BLOCK, 0x1\\n\"\n#~ \".set .L_TT_TYPE_PAGE,  0x3\\n\"\n#~ \".set .L_TT_TYPE_TABLE, 0x3\\n\"\n#~ \"\\n\"\n#~ \"/* Access flag. */\\n\"\n#~ \".set .L_TT_AF, 0x1 << 10\\n\"\n#~ \"/* Not global. */\\n\"\n#~ \".set .L_TT_NG, 0x1 << 11\\n\"\n#~ \".set .L_TT_XN, 0x3 << 53\\n\"\n#~ \"\\n\"\n#~ \".set .L_TT_MT_DEV, 0x0 << 2\\t\\t\\t// MAIR #0 (DEV_nGnRE)\\n\"\n#~ \".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\\t// MAIR #1 (MEM_WBWA), inner \"\n#~ \"shareable\\n\"\n#~ \"\\n\"\n#~ \".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\\n\"\n#~ \".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\\n\"\n#~ \"\\n\"\n#~ \".section \\\".rodata.idmap\\\", \\\"a\\\", %progbits\\n\"\n#~ \".global idmap\\n\"\n#~ \".align 12\\n\"\n#~ \"idmap:\\n\"\n#~ \"\\t/* level 1 */\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x0\\t\\t    // 1 GiB of device mappings\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_MEM | 0x40000000\\t// 1 GiB of DRAM\\n\"\n#~ \"\\t.fill\\t\\t254, 8, 0x0\\t\\t\\t// 254 GiB of unmapped VA space\\n\"\n#~ \"\\t.quad\\t\\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\\n\"\n#~ \"\\t.fill\\t\\t255, 8, 0x0\\t\\t\\t// 255 GiB of remaining VA space\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```ld\\n\"\n#~ \"/*\\n\"\n#~ \" * Copyright 2023 Google LLC\\n\"\n#~ \" *\\n\"\n#~ \" * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\"\n#~ \" * you may not use this file except in compliance with the License.\\n\"\n#~ \" * You may obtain a copy of the License at\\n\"\n#~ \" *\\n\"\n#~ \" *     https://www.apache.org/licenses/LICENSE-2.0\\n\"\n#~ \" *\\n\"\n#~ \" * Unless required by applicable law or agreed to in writing, software\\n\"\n#~ \" * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\"\n#~ \" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \"\n#~ \"implied.\\n\"\n#~ \" * See the License for the specific language governing permissions and\\n\"\n#~ \" * limitations under the License.\\n\"\n#~ \" */\\n\"\n#~ \"\\n\"\n#~ \"/*\\n\"\n#~ \" * Code will start running at this symbol which is placed at the start of \"\n#~ \"the\\n\"\n#~ \" * image.\\n\"\n#~ \" */\\n\"\n#~ \"ENTRY(entry)\\n\"\n#~ \"\\n\"\n#~ \"MEMORY\\n\"\n#~ \"{\\n\"\n#~ \"\\timage : ORIGIN = 0x40080000, LENGTH = 2M\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"SECTIONS\\n\"\n#~ \"{\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.init : ALIGN(4096) {\\n\"\n#~ \"\\t\\ttext_begin = .;\\n\"\n#~ \"\\t\\t*(.init.entry)\\n\"\n#~ \"\\t\\t*(.init.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.text : {\\n\"\n#~ \"\\t\\t*(.text.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\ttext_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together read-only data.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.rodata : ALIGN(4096) {\\n\"\n#~ \"\\t\\trodata_begin = .;\\n\"\n#~ \"\\t\\t*(.rodata.*)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\t.got : {\\n\"\n#~ \"\\t\\t*(.got)\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\trodata_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Collect together the read-write data including .bss at the end \"\n#~ \"which\\n\"\n#~ \"\\t * will be zero'd by the entry code.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t.data : ALIGN(4096) {\\n\"\n#~ \"\\t\\tdata_begin = .;\\n\"\n#~ \"\\t\\t*(.data.*)\\n\"\n#~ \"\\t\\t/*\\n\"\n#~ \"\\t\\t * The entry point code assumes that .data is a multiple of 32\\n\"\n#~ \"\\t\\t * bytes long.\\n\"\n#~ \"\\t\\t */\\n\"\n#~ \"\\t\\t. = ALIGN(32);\\n\"\n#~ \"\\t\\tdata_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t/* Everything beyond this point will not be included in the binary. */\\n\"\n#~ \"\\tbin_end = .;\\n\"\n#~ \"\\n\"\n#~ \"\\t/* The entry point code assumes that .bss is 16-byte aligned. */\\n\"\n#~ \"\\t.bss : ALIGN(16)  {\\n\"\n#~ \"\\t\\tbss_begin = .;\\n\"\n#~ \"\\t\\t*(.bss.*)\\n\"\n#~ \"\\t\\t*(COMMON)\\n\"\n#~ \"\\t\\t. = ALIGN(16);\\n\"\n#~ \"\\t\\tbss_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t.stack (NOLOAD) : ALIGN(4096) {\\n\"\n#~ \"\\t\\tboot_stack_begin = .;\\n\"\n#~ \"\\t\\t. += 40 * 4096;\\n\"\n#~ \"\\t\\t. = ALIGN(4096);\\n\"\n#~ \"\\t\\tboot_stack_end = .;\\n\"\n#~ \"\\t} >image\\n\"\n#~ \"\\n\"\n#~ \"\\t. = ALIGN(4K);\\n\"\n#~ \"\\tPROVIDE(dma_region = .);\\n\"\n#~ \"\\n\"\n#~ \"\\t/*\\n\"\n#~ \"\\t * Remove unused sections from the image.\\n\"\n#~ \"\\t */\\n\"\n#~ \"\\t/DISCARD/ : {\\n\"\n#~ \"\\t\\t/* The image loads itself so doesn't need these sections. */\\n\"\n#~ \"\\t\\t*(.gnu.hash)\\n\"\n#~ \"\\t\\t*(.hash)\\n\"\n#~ \"\\t\\t*(.interp)\\n\"\n#~ \"\\t\\t*(.eh_frame_hdr)\\n\"\n#~ \"\\t\\t*(.eh_frame)\\n\"\n#~ \"\\t\\t*(.note.gnu.build-id)\\n\"\n#~ \"\\t}\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"# Copyright 2023 Google LLC\"\n#~ msgstr \"# 版权所有 2023 Google LLC。\"\n\n#~ msgid \"$(shell uname -s)\"\n#~ msgstr \"$(shell uname -s)\"\n\n#, fuzzy\n#~ msgid \"aarch64-linux-gnu\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"stdio -display none -kernel $< -s\"\n#~ msgstr \"stdio -display none -kernel $< -s\"\n\n#~ msgid \"cargo clean\"\n#~ msgstr \"cargo 清理\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 --- the main \"\n#~ \"thread is not waiting.\"\n#~ msgstr \"请注意，线程在达到 10 之前就停止了，而主线程并 没有等待。\"\n\n#~ msgid \"\"\n#~ \"For this, you will need an HTTP client such as [`reqwest`](https://docs.\"\n#~ \"rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency \"\n#~ \"with:\"\n#~ msgstr \"\"\n#~ \"为此，需要创建一个 HTTP 客户端，例如 [`reqwest`](https://docs.rs/\"\n#~ \"reqwest/)。创建新的 Cargo 项目，并使用以下命令通过 `reqwest` 将其作为依赖\"\n#~ \"项：\"\n\n#~ msgid \"\"\n#~ \"You will also need a way to find links. We can use [`scraper`](https://\"\n#~ \"docs.rs/scraper/) for that:\"\n#~ msgstr \"\"\n#~ \"您还需要一种查找链接的方法。为此，我们可以使用 [`scraper`](https://docs.\"\n#~ \"rs/scraper/)：\"\n\n#~ msgid \"\"\n#~ \"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n#~ \"(https://docs.rs/thiserror/) for that:\"\n#~ msgstr \"\"\n#~ \"最后，我们需要某种处理错误的方法。为此，可以使用 [`thiserror`](https://\"\n#~ \"docs.rs/thiserror/)：\"\n\n#~ msgid \"\"\n#~ \"Async methods in traits are not yet supported in the stable channel ([An \"\n#~ \"experimental feature exists in nightly and should be stabilized in the \"\n#~ \"mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-\"\n#~ \"trait-nightly.html))\"\n#~ msgstr \"\"\n#~ \"稳定版尚不支持在 trait 中使用异步方法（[夜间版提供此项功能，但正处于试验阶\"\n#~ \"段，预计在中期正式发布。](https://blog.rust-lang.org/inside-\"\n#~ \"rust/2022/11/17/async-fn-in-trait-nightly.html)）\"\n\n#~ msgid \"\"\n#~ \"// x = 20;\\n\"\n#~ \"    // println!(\\\"x: {x}\\\");\\n\"\n#~ msgstr \"\"\n#~ \"// x = 20;\\n\"\n#~ \"    // println!(\\\"x: {x}\\\");\\n\"\n\n#~ msgid \"\"\n#~ \"// Calculate the magnitude of a vector by summing the squares of its \"\n#~ \"coordinates\\n\"\n#~ \"// and taking the square root. Use the `sqrt()` method to calculate the \"\n#~ \"square\\n\"\n#~ \"// root, like `v.sqrt()`.\\n\"\n#~ msgstr \"\"\n#~ \"// Calculate the magnitude of a vector by summing the squares of its \"\n#~ \"coordinates\\n\"\n#~ \"// and taking the square root. Use the `sqrt()` method to calculate the \"\n#~ \"square\\n\"\n#~ \"// root, like `v.sqrt()`.\\n\"\n\n#~ msgid \"\"\n#~ \"// ANCHOR_END: Window-width\\n\"\n#~ \"        // Add 4 paddings for borders\\n\"\n#~ msgstr \"\"\n#~ \"// ANCHOR_END: Window-width\\n\"\n#~ \"        // Add 4 paddings for borders\\n\"\n\n#~ msgid \"\"\n#~ \"// TODO: after learning about error handling, you can change\\n\"\n#~ \"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n#~ \"        // the ?-operator here instead of .unwrap().\\n\"\n#~ msgstr \"\"\n#~ \"// TODO: after learning about error handling, you can change\\n\"\n#~ \"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n#~ \"        // the ?-operator here instead of .unwrap().\\n\"\n\n#~ msgid \"\"\n#~ \"/// Shortens a string to the given length.\\n\"\n#~ \"///\\n\"\n#~ \"/// ```\\n\"\n#~ \"/// # use playground::shorten_string;\\n\"\n#~ \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n#~ \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n#~ \"/// ```\\n\"\n#~ msgstr \"\"\n#~ \"/// Shortens a string to the given length.\\n\"\n#~ \"///\\n\"\n#~ \"/// ```\\n\"\n#~ \"/// # use playground::shorten_string;\\n\"\n#~ \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n#~ \"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n#~ \"/// ```\\n\"\n\n#~ msgid \"\"\n#~ \"// Safe because r1 and r2 were obtained from references and so are\\n\"\n#~ \"    // guaranteed to be non-null and properly aligned, the objects \"\n#~ \"underlying\\n\"\n#~ \"    // the references from which they were obtained are live throughout \"\n#~ \"the\\n\"\n#~ \"    // whole unsafe block, and they are not accessed either through the\\n\"\n#~ \"    // references or concurrently through any other pointers.\\n\"\n#~ msgstr \"\"\n#~ \"// Safe because r1 and r2 were obtained from references and so are\\n\"\n#~ \"    // guaranteed to be non-null and properly aligned, the objects \"\n#~ \"underlying\\n\"\n#~ \"    // the references from which they were obtained are live throughout \"\n#~ \"the\\n\"\n#~ \"    // whole unsafe block, and they are not accessed either through the\\n\"\n#~ \"    // references or concurrently through any other pointers.\\n\"\n\n#~ msgid \"\"\n#~ \"// NOT SAFE. DO NOT DO THIS.\\n\"\n#~ \"    /*\\n\"\n#~ \"    let r3: &String = unsafe { &*r1 };\\n\"\n#~ \"    drop(s);\\n\"\n#~ \"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n#~ \"    */\"\n#~ msgstr \"\"\n#~ \"// NOT SAFE. DO NOT DO THIS.\\n\"\n#~ \"    /*\\n\"\n#~ \"    let r3: &String = unsafe { &*r1 };\\n\"\n#~ \"    drop(s);\\n\"\n#~ \"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n#~ \"    */\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n#~ \"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n#~ \"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n#~ \"    // emojis.get_unchecked(0..3) }));\\n\"\n#~ msgstr \"\"\n#~ \"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n#~ \"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n#~ \"    // println!(\\\"char count: {}\\\", count_chars(unsafe { emojis.\"\n#~ \"get_unchecked(0..3) }));\\n\"\n\n#~ msgid \"\"\n#~ \"/// Swaps the values pointed to by the given pointers.\\n\"\n#~ \"///\\n\"\n#~ \"/// # Safety\\n\"\n#~ \"///\\n\"\n#~ \"/// The pointers must be valid and properly aligned.\\n\"\n#~ msgstr \"\"\n#~ \"/// Swaps the values pointed to by the given pointers.\\n\"\n#~ \"///\\n\"\n#~ \"/// # Safety\\n\"\n#~ \"///\\n\"\n#~ \"/// The pointers must be valid and properly aligned.\\n\"\n\n#~ msgid \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n#~ \"    // TODO\\n\"\n\n#~ msgid \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n#~ msgstr \"\"\n#~ \"// Read compass data and log it to the serial port.\\n\"\n#~ \"        // TODO\\n\"\n\n#~ msgid \"\"\n#~ \"// left_fork: ...\\n\"\n#~ \"    // right_fork: ...\\n\"\n#~ \"    // thoughts: ...\\n\"\n#~ msgstr \"\"\n#~ \"// left_fork: ...\\n\"\n#~ \"    // right_fork: ...\\n\"\n#~ \"    // thoughts: ...\\n\"\n\n#~ msgid \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n#~ msgstr \"\"\n#~ \"// Add a delay before picking the second fork to allow the execution\\n\"\n#~ \"        // to transfer to another task\\n\"\n\n#~ msgid \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n#~ msgstr \"\"\n#~ \"// To avoid a deadlock, we have to break the symmetry\\n\"\n#~ \"            // somewhere. This will swap the forks without \"\n#~ \"deinitializing\\n\"\n#~ \"            // either of them.\\n\"\n\n#, fuzzy\n#~ msgid \"Exercise: GUI Library\"\n#~ msgstr \"练习：面向 GUI 库的模块\"\n\n#, fuzzy\n#~ msgid \"With C++)\"\n#~ msgstr \"与 C++ 交互\"\n\n#, fuzzy\n#~ msgid \"{{%course outline Fundamentals}}\"\n#~ msgstr \"Rust 基础知识\"\n\n#~ msgid \"{{%session outline}}\"\n#~ msgstr \"{{%s课程大纲}}\"\n\n#~ msgid \"{{%segment outline}}\"\n#~ msgstr \"{{%s小节大纲}}\"\n\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects. We'll only implement the drawing of it (as text) for \"\n#~ \"simplicity.\"\n#~ msgstr \"\"\n#~ \"让我们利用关于 trait 和 trait 对象的新知识，设计一个经典的 GUI 库。为简单\"\n#~ \"起见，我们仅以文本形式实现绘制。\"\n\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"我们的库中有许多 widget：\"\n\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"“Window”：具有“title”且包含其他 widget。\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label`. In reality, it would also take a callback \"\n#~ \"function to allow the program to do something when the button is clicked \"\n#~ \"but we won't include that since we're only drawing the GUI.\"\n#~ msgstr \"\"\n#~ \"`Button`：上面有一个 `Label`。实际上，它还需要一个回调函数，以便程序在用户\"\n#~ \"点击按钮时执行某些操作，但由于我们仅绘制 GUI，所以不会添加该函数。\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"“Label”：具有“label”。\"\n\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"这些 widget 将实现“Widget”trait，如下所示。\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"将以下代码复制到 <https://play.rust-lang.org/>，然后填入缺少\"\n#~ \"的“draw_into”方法，以便实现“Widget”trait：\"\n\n#~ msgid \"// TODO: Implement `Widget` for `Button`.\\n\"\n#~ msgstr \"// TODO: Implement `Widget` for `Button`.\\n\"\n\n#~ msgid \"// TODO: Implement `Widget` for `Window`.\\n\"\n#~ msgstr \"// TODO: Implement `Widget` for `Window`.\\n\"\n\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"上述程序的输出可能非常简单，例如：\"\n\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"如果要绘制对齐的文本，可以使用[填充/对齐](https://doc.rust-lang.org/std/\"\n#~ \"fmt/index.html#fillalignment)格式设置运算符。需要特别注意的是您填充不同字\"\n#~ \"符（此处是“/”）的方式以及控制对齐的方式：\"\n\n#~ msgid \"\\\"left aligned:  |{:/<width$}|\\\"\"\n#~ msgstr \"\\\"left aligned:  |{:/<width$}|\\\"\"\n\n#~ msgid \"\\\"centered:      |{:/^width$}|\\\"\"\n#~ msgstr \"\\\"centered:      |{:/^width$}|\\\"\"\n\n#~ msgid \"\\\"right aligned: |{:/>width$}|\\\"\"\n#~ msgstr \"\\\"right aligned: |{:/>width$}|\\\"\"\n\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"使用这些对齐技巧，您可以生成如下的输出内容：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Rust provides a few safe means of modifying a value given only a shared \"\n#~ \"reference to that value. All of these replace compile-time checks with \"\n#~ \"runtime checks.\"\n#~ msgstr \"\"\n#~ \"Rust 提供了一些安全的方法，只需对指定值拥有共享引用，即可修改该值。所有这\"\n#~ \"些方法都用运行时检查取代了编译时检查。\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"“Cell”和“RefCell”\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`Cell`](https://doc.rust-lang.org/std/cell/struct.Cell.html) and \"\n#~ \"[`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) \"\n#~ \"implement what Rust calls _interior mutability:_ mutation of values in an \"\n#~ \"immutable context.\"\n#~ msgstr \"\"\n#~ \"您可以使用 [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) 和 \"\n#~ \"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html) 对 `u8` \"\n#~ \"来源进行抽象化处理：\"\n\n#~ msgid \"\"\n#~ \"`Cell` is typically used for simple types, as it requires copying or \"\n#~ \"moving values. More complex interior types typically use `RefCell`, which \"\n#~ \"tracks shared and exclusive references at runtime and panics if they are \"\n#~ \"misused.\"\n#~ msgstr \"\"\n#~ \"“Cell”通常用于简单类型，因为它需要复制或移动值。更复杂的内部类型通常使\"\n#~ \"用“RefCell”，它会在运行时跟踪已共享和专有的引用，并在这些引用被滥用时 \"\n#~ \"panic。\"\n\n#~ msgid \"\"\n#~ \"If we were using `Cell` instead of `RefCell` in this example, we would \"\n#~ \"have to move the `Node` out of the `Rc` to push children, then move it \"\n#~ \"back in. This is safe because there's always one, un-referenced value in \"\n#~ \"the cell, but it's not ergonomic.\"\n#~ msgstr \"\"\n#~ \"在此示例中，如果我们使用的是“Cell”而非“RefCell”，则必须将“Node”从“Rc”中移\"\n#~ \"出以推送子项，然后再将其移回原位。这是安全的做法，因为单元格中总是有一个未\"\n#~ \"引用的值，但这不符合人体工程学。\"\n\n#~ msgid \"\"\n#~ \"To do anything with a Node, you must call a `RefCell` method, usually \"\n#~ \"`borrow` or `borrow_mut`.\"\n#~ msgstr \"\"\n#~ \"如需使用 Node 执行任何操作，您必须调用“RefCell”方法，通常\"\n#~ \"为“borrow”或“borrow_mut”。\"\n\n#~ msgid \"\"\n#~ \"If you no longer have your version, that's fine - refer back to the \"\n#~ \"[provided solution](../methods-and-traits/solution.html).\"\n#~ msgstr \"\"\n#~ \"如果您的版本已不存在，也没关系，请参阅 [提供的解决方案](../methods-and-\"\n#~ \"traits/solution.html)。\"\n\n#~ msgid \"\"\n#~ \"When you await a future, all local variables (that would ordinarily be \"\n#~ \"stored on a stack frame) are instead stored in the Future for the current \"\n#~ \"async block. If your future has pointers to data on the stack, those \"\n#~ \"pointers might get invalidated. This is unsafe.\"\n#~ msgstr \"\"\n#~ \"在等待 Future 就绪时，所有局部变量（通常存储在堆栈帧上）将改为存储在当前异\"\n#~ \"步代码块的 Future 中。如果您的 Future 中有指向堆栈上数据的指针，这些指针可\"\n#~ \"能会失效。这很不安全。\"\n\n#~ msgid \"\"\n#~ \"Therefore, you must guarantee that the addresses your future points to \"\n#~ \"don't change. That is why we need to \\\"pin\\\" futures. Using the same \"\n#~ \"future repeatedly in a `select!` often leads to issues with pinned values.\"\n#~ msgstr \"\"\n#~ \"因此，必须保证 Future 指向的地址不会发生更改。这就是为何需要对 Future 执\"\n#~ \"行 “固定”操作。在 `select!` 中反复使用相同的 Future 通常会导致已固定的值出\"\n#~ \"现问题。\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"简短示例\"\n\n#~ msgid \"An Example in C\"\n#~ msgstr \"C语言示例\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"编译期保障\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"运行时保障\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"现代特性\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"基本语法\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String vs str\"\n\n#~ msgid \"Rustdoc\"\n#~ msgstr \"Rustdoc\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"重载\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"数组与 for 循环\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"if 表达式\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for 表达式\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while 表达式\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break & continue\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop 表达式\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"变体载荷\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"枚举大小\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let 表达式\"\n\n#~ msgid \"while let expressions\"\n#~ msgstr \"while let 表达式\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"match 表达式\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"解构结构体\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"解构数组\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"匹配守卫\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"栈 vs 堆\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"栈内存\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"手动内存管理\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"基于作用域的内存管理\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"垃圾回收\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Rust 内存管理\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Rust 中移动的字符串\"\n\n#~ msgid \"Double Frees in Modern C++\"\n#~ msgstr \"现代 C++ 中的双重释放\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"函数调用中的移动\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"复制和克隆\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"共享和唯一的借用\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"字段简写语法\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"方法接收者\"\n\n#~ msgid \"Storing Books\"\n#~ msgstr \"书籍存储\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option 和 Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"哈希表\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"递归数据类型\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Cell/RefCell\"\n#~ msgstr \"Cell/RefCell\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"迭代器和所有权\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"字符串和迭代器\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"泛型方法\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"单态化\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"默认方法\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"impl Trait\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"重要特征\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From 和 Into\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"运算符：Add、Mul...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"闭包：Fn、FnMut、FnOnce\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"点和多边形\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"捕获堆栈展开\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"结构化错误处理\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"使用 ? 传播错误\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"转换错误类型\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"派生错误枚举\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"为错误添加背景信息\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#, fuzzy\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"转动\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send 和 Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"Pin\"\n#~ msgstr \"固定\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"第一天上午\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"第一天下午\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"第二天上午\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"第二天下午\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"第三天上午\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"第三天下午\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"嵌入式 Rust：入门篇\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"并发编程：入门篇\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"并发编程：进阶篇\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"第 1 天：Rust 基础知识、语法、控制流、创建及使用值。\"\n\n#~ msgid \"\"\n#~ \"Day 2: Memory management, ownership, compound data types, and the \"\n#~ \"standard library.\"\n#~ msgstr \"第 2 天：内存管理、所有权、复合数据类类型及标准库。\"\n\n#~ msgid \"Day 3: Generics, traits, error handling, testing, and unsafe Rust.\"\n#~ msgstr \"第 3 天：泛型、trait、错误处理、测试和不安全 Rust。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"控制流的构造：`if`、`if let`、`while`、`while let`、`break` 和 \"\n#~ \"`continue`。\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"第一天的主要目标是要谈到著名的 borrow checker，其他方面点到为止。Rust 处理\"\n#~ \"内存的方式是其主要特点，这点我们应该尽早展示给学生。\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"如果你是在教室里教授此课程，不妨在这里介绍一下时间安排。 这边建议是把每天\"\n#~ \"分成两部分（跟着幻灯片来）：\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"早上：9:00 到 12:00，\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"下午：13:00 到 16:00。\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"当然你也可以看情况调整时间。但是请务必记得提供休息时间。我们建议每个小时休\"\n#~ \"息一次！\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello 🌍!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"以下是一个简短的 Rust 示例程序：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // Program entry point\\n\"\n#~ \"    let mut x: i32 = 6;  // Mutable variable binding\\n\"\n#~ \"    print!(\\\"{x}\\\");       // Macro for printing, like printf\\n\"\n#~ \"    while x != 1 {       // No parenthesis around expression\\n\"\n#~ \"        if x % 2 == 0 {  // Math like in other languages\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {              // 程序入口\\n\"\n#~ \"    let mut x: i32 = 6;  // 可变变量绑定\\n\"\n#~ \"    print!(\\\"{x}\\\");       // 与 printf 类似的输出宏\\n\"\n#~ \"    while x != 1 {       // 表达式周围没有括号\\n\"\n#~ \"        if x % 2 == 0 {  // 与其他语言类似的数值计算\\n\"\n#~ \"            x = x / 2;\\n\"\n#~ \"        } else {\\n\"\n#~ \"            x = 3 * x + 1;\\n\"\n#~ \"        }\\n\"\n#~ \"        print!(\\\" -> {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"这段代码实现了 Collatz 猜想：猜想认为该循环总是会结束，但该猜想还没有被证\"\n#~ \"明。可以编辑代码来尝试不同的输入。\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"说明所有变量的类型都是静态的。尝试删除 `i32` 来触发类型推断。尝试使用 \"\n#~ \"`i8` 来触发运行时整数溢出。\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"将 `let mut x` 改为 `let x`，讨论出现的编译错误。\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"展示 `print!` 在参数与格式字符串不匹配时产生的编译错误。\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"展示如何使用 `{}` 作为占位符，来输出比单个变量更复杂的表达式。\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"向学生展示标准库，展示如何搜索 `std::fmt`，其中包含用于格式化字符串的微型\"\n#~ \"语言规则。要点是让学生熟悉在标准库中搜索的过程。\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"在 shell 中，运行 `rustup doc std::fmt` 会在浏览器中打开本地 std::fmt 文档\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"编译期内存安全。\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"没有运行时未定义行为。\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"现代的编程语言特性。\"\n\n#~ msgid \"Let's consider the following \\\"minimum wrong example\\\" program in C:\"\n#~ msgstr \"让我们查看以下 C 语言的“最小错误示例”程序：\"\n\n#~ msgid \"How many bugs do you spot?\"\n#~ msgstr \"你发现了多少 bug？\"\n\n#~ msgid \"\"\n#~ \"Despite just 29 lines of code, this C example contains serious bugs in at \"\n#~ \"least 11:\"\n#~ msgstr \"尽管该 C 语言示例仅有29行代码，但它却包含了至少11个严重 bug：\"\n\n#~ msgid \"Assignment `=` instead of equality comparison `==` (line 28)\"\n#~ msgstr \"使用赋值 `=` 而非判断相等 `==`（第28行）\"\n\n#~ msgid \"Excess argument to `printf` (line 23)\"\n#~ msgstr \"`printf` 有多余参数（第23行）\"\n\n#~ msgid \"File descriptor leak (after line 26)\"\n#~ msgstr \"文件描述符泄露（第26行之后）\"\n\n#~ msgid \"Forgotten braces in multi-line `if` (line 22)\"\n#~ msgstr \"多行 `if` 语句缺少花括号（第22行）\"\n\n#~ msgid \"Forgotten `break` in a `switch` statement (line 32)\"\n#~ msgstr \"`switch` 语句忘记添加 `break`（第32行）\"\n\n#~ msgid \"\"\n#~ \"Forgotten NUL-termination of the `buf` string, leading to a buffer \"\n#~ \"overflow (line 29)\"\n#~ msgstr \"`buf` 字符串忘记NUL终止符，从而导致缓冲区溢出（第29行）\"\n\n#~ msgid \"Memory leak by not freeing the `malloc`\\\\-allocated buffer (line 21)\"\n#~ msgstr \"未释放由 `malloc` 分配的缓冲区，从而导致内存泄漏（第21行）\"\n\n#~ msgid \"Out-of-bounds access (line 17)\"\n#~ msgstr \"越界访问（第17行）\"\n\n#~ msgid \"Unchecked cases in the `switch` statement (line 11)\"\n#~ msgstr \"`switch` 语句存在未检查的情况（第11行）\"\n\n#~ msgid \"Unchecked return values of `stat` and `fopen` (lines 18 and 26)\"\n#~ msgstr \"`stat` 和 `fopen` 存在未检查的返回值（第18行及第26行）\"\n\n#~ msgid \"\"\n#~ \"_Shouldn't these bugs be obvious even for a C compiler?_  \\n\"\n#~ \"No, surprisingly this code compiles warning-free at the default warning \"\n#~ \"level, even in the latest GCC version (13.2 as of writing).\"\n#~ msgstr \"\"\n#~ \"_即使对于 C 语言编译器，这些bug难道不应该是显而易见的吗？_  \\n\"\n#~ \"惊人的是，即便使用最新版本的GCC（截至撰文时为13.2），在默认警告等级下编译\"\n#~ \"代码时也不出现任何警告。\"\n\n#~ msgid \"\"\n#~ \"_Isn't this a highly unrealistic example?_  \\n\"\n#~ \"Absolutely not, these kind of bugs have lead to serious security \"\n#~ \"vulnerabilities in the past. Some examples:\"\n#~ msgstr \"\"\n#~ \"_这是非常极端的示例吗？_  \\n\"\n#~ \"当然不是。这些类型的bug在过去曾引发一系列的安全漏洞，比如以下案例：\"\n\n#~ msgid \"\"\n#~ \"Assignment `=` instead of equality comparison `==`: [The Linux Backdoor \"\n#~ \"Attempt of 2003](https://freedom-to-tinker.com/2013/10/09/the-linux-\"\n#~ \"backdoor-attempt-of-2003)\"\n#~ msgstr \"\"\n#~ \"使用赋值 `=` 而非判断相等 `==`：[2003年Linux后门尝试](https://freedom-to-\"\n#~ \"tinker.com/2013/10/09/the-linux-backdoor-attempt-of-2003)\"\n\n#~ msgid \"\"\n#~ \"Forgotten braces in multi-line `if`: [The Apple goto fail vulnerability]\"\n#~ \"(https://dwheeler.com/essays/apple-goto-fail.html)\"\n#~ msgstr \"\"\n#~ \"多行 `if` 语句缺少花括号：[Apple goto失败漏洞](https://dwheeler.com/\"\n#~ \"essays/apple-goto-fail.html)\"\n\n#~ msgid \"\"\n#~ \"Forgotten `break` in a `switch` statement: [The break that broke sudo]\"\n#~ \"(https://nakedsecurity.sophos.com/2012/05/21/anatomy-of-a-security-hole-\"\n#~ \"the-break-that-broke-sudo)\"\n#~ msgstr \"\"\n#~ \"`switch` 语句忘记添加 `break`：[破坏sudo的break](https://nakedsecurity.\"\n#~ \"sophos.com/2012/05/21/anatomy-of-a-security-hole-the-break-that-broke-\"\n#~ \"sudo)\"\n\n#~ msgid \"\"\n#~ \"_How is Rust any better here?_  \\n\"\n#~ \"Safe Rust makes all of these bugs impossible:\"\n#~ msgstr \"\"\n#~ \"_Rust在这些方面表现得怎么样？_  \\n\"\n#~ \"安全Rust使这些bug的出现变得不可能：\"\n\n#~ msgid \"Assignments inside an `if` clause are not supported.\"\n#~ msgstr \"不支持 `if` 语句内赋值。\"\n\n#~ msgid \"Format strings are checked at compile-time.\"\n#~ msgstr \"编译时检查格式化字符串。\"\n\n#~ msgid \"Resources are freed at the end of scope via the `Drop` trait.\"\n#~ msgstr \"在作用域末尾，Rust通过 `Drop` trait 来释放资源。\"\n\n#~ msgid \"All `if` clauses require braces.\"\n#~ msgstr \"所有 `if` 语句必须有花括号。\"\n\n#~ msgid \"\"\n#~ \"`match` (as the Rust equivalent to `switch`) does not fall-through, hence \"\n#~ \"you can't accidentally forget a `break`.\"\n#~ msgstr \"\"\n#~ \"`match` 语句（在 Rust 中相当于 `switch`）并不会落空，因此你不会意外忘记一\"\n#~ \"个 `break`。\"\n\n#~ msgid \"Buffer slices carry their size and don't rely on a NUL terminator.\"\n#~ msgstr \"缓冲区切片自带它们的大小，且不依赖NUL终止符。\"\n\n#~ msgid \"\"\n#~ \"Heap-allocated memory is freed via the `Drop` trait when the \"\n#~ \"corresponding `Box` leaves the scope.\"\n#~ msgstr \"当相关 `Box` 离开作用域时，Rust 通过 `Drop` trait 释放堆分配内存。\"\n\n#~ msgid \"\"\n#~ \"Out-of-bounds accesses cause a panic or can be checked via the `get` \"\n#~ \"method of a slice.\"\n#~ msgstr \"\"\n#~ \"越界访问会导致程序发生 panic 而终止，也可以用 `get` 方法来检查一个序列是否\"\n#~ \"越界。\"\n\n#~ msgid \"`match` mandates that all cases are handled.\"\n#~ msgstr \"`match` 语句规定要处理所有情况。\"\n\n#~ msgid \"\"\n#~ \"Fallible Rust functions return `Result` values that need to be unwrapped \"\n#~ \"and thereby checked for success. Additionally, the compiler emits a \"\n#~ \"warning if you miss to check the return value of a function marked with \"\n#~ \"`#[must_use]`.\"\n#~ msgstr \"\"\n#~ \"可出错的 Rust 函数返回的 `Result` 值需要拆箱并检查是否成功。此外，如果你忽\"\n#~ \"略检查标注为 `#[must_use]` 的函数的返回值，编译器会发出警告。\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"编译期静态内存管理：\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"不存在内存泄漏（_通常情况下_，见注释）。\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"在（安全的）Rust 中也有可能产生内存泄漏。例如：\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"可以使用 [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) 来泄漏一个指针。该方法可以用于得到在运行时决定大小和初始\"\n#~ \"化的静态变量\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"可以使用 [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget.\"\n#~ \"html) 来让编译器“忘记”一个值（即其析构函数不会被执行）。\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"可以使用 `Rc` 或 `Arc` 意外创建一个循环引用（[reference cycle](https://\"\n#~ \"doc.rust-lang.org/book/ch15-06-reference-cycles.html)）。\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"实际上，有人认为无限填充一个集合也是一种内存泄漏，而 Rust 对此没有保护。\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"就本课程而言，“不存在内存泄漏”应理解为“几乎没有 _意外_ 内存泄漏”。\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"整数溢出的行为由编译时的标志指定。可以选择 panic（一种受控的程序崩溃）或使\"\n#~ \"用“回绕（wrap-around）”语义。默认情况下，使用调试模式编译（`cargo build`）\"\n#~ \"的行为为 panic，使用发布模式编译（`cargo build --release`）的行为为“回\"\n#~ \"绕”。\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"边界检查不能使用编译标志禁用，也不能直接通过 `unsafe` 关键字禁用。然而， \"\n#~ \"`unsafe` 允许你调用 `slice::get_unchecked` 等不做边界检查的函数。\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust 建立于过去几十年来所获得的经验之上。\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"语言特性\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"工具\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"与 C++ 类似的零成本抽象，意味着你不需要为高级程序语言的结构“付出”更多的内\"\n#~ \"存和 CPU。例如使用 `for` 循环与使用 `.iter().fold()` 结构应该会生成大致相\"\n#~ \"同的底层指令。\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"值得一提的是，Rust 的枚举是“代数数据类型”（也叫“和类型”）。它使得类型系统\"\n#~ \"可以表示 `Option<T>` 和 `Result<T, E>` 等结构。\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"提醒学生去阅读编译错误 --- 许多开发者已经习惯去忽略冗长的编译器输出。Rust \"\n#~ \"编译器会比其它编译器更健谈。它通常会提供 _可操作的_ 反馈，可以直接复制粘贴\"\n#~ \"到代码中。\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"相比 Java、Python 和 Go 等语言，Rust 标准库较为精简。Rust 并没有内置一些你\"\n#~ \"可能认为标准和必要的功能：\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"随机数生成器，可以使用 [rand](https://docs.rs/rand/) 替代。\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"SSL 和 TLS 支持，可以使用 [rusttls](https://docs.rs/rustls/) 替代。\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"\"\n#~ \"JSON 支持，可以使用 [serde_json](https://docs.rs/serde_json/) 替代。\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"Rust 这么做的原因是标准库中的功能是无法去除的，因此该功能必须非常稳定。对\"\n#~ \"于以上例子，Rust 社区仍在寻找最佳解决方案 --- 甚至对一些情况可能没有单一\"\n#~ \"的“最佳解决方案”。\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust 内置了一个包管理器 Cargo，使得下载和编译第三方 crate 变得简单。这也导\"\n#~ \"致标准库可以更加精简。\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"发现高质量的第三方 crate 也许是一个问题。 <https://lib.rs/> 等网站对此问题\"\n#~ \"有所帮助。它能帮你比较 crate 的健康指标，以找到一个高质量并受信任的 \"\n#~ \"crate。\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) 是一个受到广泛支持的 \"\n#~ \"LSP 实现，被主流的 IDE 和文本编辑器所使用。\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`、`“两\\\\n行”`\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"如同 C++ 一样，Rust 也提供了引用类型。\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"\"\n#~ \"就像 C 与 C++ 中的指针一样，对引用 `ref_x` 进行赋值时，我们必须对其解引\"\n#~ \"用。\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"\"\n#~ \"如果引用值被声明为 `mut`（可变引用），那么这个引用值可以在它的生命周期内被\"\n#~ \"绑定为不同的值。\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"一个引用被认为是“借用（borrow）”了它指向的值。\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"Rust 会跟踪所有引用的生命周期，以确保这些值的存活时间足够长。\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"“String”与“str”的区别\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"你可以通过 `&` 和可选的范围选择从 `String` 中借用 `&str` 切片。\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"一个 Rust 版本的著名 [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) \"\n#~ \"面试题：\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"\"\n#~ \"我们在 `main` 中引用了下面编写的一个函数。不需要提前声明或添加头文件。 \"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"`print_fizzbuzz_to()`函数中`for`循环的范围表达式（range expression）包含\"\n#~ \"`=n`，这会导致它包括上限。\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"Rust 中的所有语言元素都可以通过特殊的 `///` 语法进行文档化。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"/// Determine whether the first argument is divisible by the second \"\n#~ \"argument.\\n\"\n#~ \"///\\n\"\n#~ \"/// If the second argument is zero, the result is false.\\n\"\n#~ \"///\\n\"\n#~ \"/// # Example\\n\"\n#~ \"/// ```\\n\"\n#~ \"/// assert!(is_divisible_by(42, 2));\\n\"\n#~ \"/// ```\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // Corner case, early return\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // The last expression in a block is the return \"\n#~ \"value\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"/// 判断第一个参数是否可以被第二个参数整除。\\n\"\n#~ \"///\\n\"\n#~ \"/// 如果第二个参数是 0，则返回结果为 false。\\n\"\n#~ \"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\\n\"\n#~ \"    if rhs == 0 {\\n\"\n#~ \"        return false;  // 边界条件，直接返回\\n\"\n#~ \"    }\\n\"\n#~ \"    lhs % rhs == 0     // 代码块中的最后一个表达式就是它的返回值\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"本课程的幻灯片中不包含 rustdoc，这是为了节省空间，但是在实际的代码中，应当\"\n#~ \"编写相关的程序文档。\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"内部文档注释将在稍后（在讲解模块的页面）讨论，这里无需进行说明。\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"Rustdoc 注释可以包含我们可使用“cargo test”运行和测试的代码段。我们将在[“测\"\n#~ \"试”部分](../testing/doc-tests.html)中讨论这些测试。\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"方法是与某种类型关联的函数。方法的 `self` 参数是与其关联类型的一个实例：\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"我们将在今天的练习和明天的课程中更深入地学习方法相关的概念。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"新增一个 `Rectangle::new` 构造函数并在 `main` 函数中调用它:\"\n\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"虽然从技术层面来讲，Rust 没有自定义构造函数，但静态方法通常用于初始化结构\"\n#~ \"体（但并非必须这样做）。您可以直接调用实际构造函数“Rectangle { width, \"\n#~ \"height }”。请参阅 [Rust 秘典](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html)。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"新增一个 `Rectangle::new_square(width: u32)` 构造函数来说明构造函数可以接\"\n#~ \"受任意参数。\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"函数重载\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"不支持重载：\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"始终接受固定个数的形参。\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"不支持提供默认值：\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"实参的数量在所有调用的地方都是一样的。\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"有时可以用宏（Macro）作为替代。\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"然而，函数形参可以是泛型（generics）：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"coin toss: {}\\\", pick_one(\\\"heads\\\", \\\"tails\\\"));\\n\"\n#~ \"    println!(\\\"cash prize: {}\\\", pick_one(500, 1000));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn pick_one<T>(a: T, b: T) -> T {\\n\"\n#~ \"    if std::process::id() % 2 == 0 { a } else { b }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"coin toss: {}\\\", pick_one(\\\"heads\\\", \\\"tails\\\"));\\n\"\n#~ \"    println!(\\\"cash prize: {}\\\", pick_one(500, 1000));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"标准库中的 `Into<T>` 通过泛型参数提供了一种具有有限多态性的参数类型。详见\"\n#~ \"之后的章节。\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"第一天上午习题\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"在这些习题中，我们将探索 Rust 的两个部分：\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"类型之间的隐式转换。\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"数组和 `for` 循环。\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"在解题时要考虑几件事：\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"最好使用本地安装的 Rust，以实现在编辑器中自动补全。关于安装 Rust 的细节，\"\n#~ \"请参见 \\\\[使用 Cargo\\\\] 页面。\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"也可以使用 Rust Playground 作为替代。\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"页面内嵌的代码片段是不可编辑的：因为离开页面后内嵌代码片段中的修改会丢失。\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"[与 C++ 不同](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)，Rust 不会自动进行 _隐式类型转换_。例如，下面的程序中\"\n#~ \"不存在隐式类型转换：\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Rust 的整数类型都实现了 [`From<T>`](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) 和 [`Into<T>`](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.Into.html) trait，使得我们可以在它们之间进行转换。`From<T>` trait 包\"\n#~ \"含 `from()` 方法，`Into<T>` trait 包含 `into()` 方法。类型通过实现这些 \"\n#~ \"trait 来表达它将被如何转换为另一个类型。\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"标准库中包含 `From<i8> for i16` 的实现，即我们可以通过调用 `i16::from(x)` \"\n#~ \"来将 `i8` 类型的变量 `x` 转换为 `i16`。或者也可以简单地使用 `x.into()`，因\"\n#~ \"为 `From<i8> for i16` 的实现会自动创建 `Into<i16> for i8` 的实现。\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"这同样也适用于自定义类型的 `From` 实现，只需实现 `From` 就可以自动得到对应\"\n#~ \"的 `Into` 实现。\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"执行上述程序，并查看对应的编译错误。\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"修改代码，使用 `into()` 进行类型转换。\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"修改 `x` 和 `y` 的类型（例如 `f32`, `bool`, `i128` 等）来了解哪些类型之间\"\n#~ \"可以相互转换。尝试将较小的类型转换为较大的类型和将较大的类型转换为较小的类\"\n#~ \"型。阅读 [标准库文档](https://doc.rust-lang.org/std/convert/trait.From.\"\n#~ \"html) 来了解对于你所尝试的两个类型 `From<T>` 是否已被实现。\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"数组与 `for` 循环\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"我们可以这样声明一个数组：\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"你可以使用 `{:?}` 来打印这种数组的调试格式：\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"在 Rust 中，可以使用 `for` 关键词遍历数组和区间等元素：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterating over array:\\\");\\n\"\n#~ \"    for n in &array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"\\n\"\n#~ \"    print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"    for i in 0..3 {\\n\"\n#~ \"        print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let array = [10, 20, 30];\\n\"\n#~ \"    print!(\\\"Iterating over array:\\\");\\n\"\n#~ \"    for n in array {\\n\"\n#~ \"        print!(\\\" {n}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"\\n\"\n#~ \"    print!(\\\"Iterating over range:\\\");\\n\"\n#~ \"    for i in 0..3 {\\n\"\n#~ \"        print!(\\\" {}\\\", array[i]);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: remove this when you're done with your implementation.\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"fn transpose(matrix: [[i32; 3]; 3]) -> [[i32; 3]; 3] {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn pretty_print(matrix: &[[i32; 3]; 3]) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let matrix = [\\n\"\n#~ \"        [101, 102, 103], // <-- the comment makes rustfmt add a newline\\n\"\n#~ \"        [201, 202, 203],\\n\"\n#~ \"        [301, 302, 303],\\n\"\n#~ \"    ];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"matrix:\\\");\\n\"\n#~ \"    pretty_print(&matrix);\\n\"\n#~ \"\\n\"\n#~ \"    let transposed = transpose(matrix);\\n\"\n#~ \"    println!(\\\"transposed:\\\");\\n\"\n#~ \"    pretty_print(&transposed);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,should_panic\\n\"\n#~ \"// TODO: 完成你的实现后移除此行。\\n\"\n#~ \"#![allow(unused_variables, dead_code)]\\n\"\n#~ \"\\n\"\n#~ \"fn transpose(matrix: [[i32; 3]; 3]) -> [[i32; 3]; 3] {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn pretty_print(matrix: &[[i32; 3]; 3]) {\\n\"\n#~ \"    unimplemented!()\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let matrix = [\\n\"\n#~ \"        [101, 102, 103], // <-- 这个注释会让 rustfmt 添加一个新行\\n\"\n#~ \"        [201, 202, 203],\\n\"\n#~ \"        [301, 302, 303],\\n\"\n#~ \"    ];\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"matrix:\\\");\\n\"\n#~ \"    pretty_print(&matrix);\\n\"\n#~ \"\\n\"\n#~ \"    let transposed = transpose(matrix);\\n\"\n#~ \"    println!(\\\"transposed:\\\");\\n\"\n#~ \"    pretty_print(&transposed);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"附加题\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"是否可以使用 `&[i32]` 切片而不是硬编码的 3 × 3 矩阵作为函数的参数和返回类\"\n#~ \"型？例如使用 `&[&[i32]]` 表示一个二维的切片的切片。为什么这样做是可行或不\"\n#~ \"可行的？\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"参考 [`ndarray` crate](https://docs.rs/ndarray/) 以了解该功能满足生产环境\"\n#~ \"质量的实现。\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"题目解答和附加题的答案在 [题解](solutions-morning.md#arrays-and-for-\"\n#~ \"loops) 章节中。\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"在“for n in &array”中使用引用“&array”这一做法巧妙地预先展示了下午将谈到的\"\n#~ \"所有权问题。\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"如果不使用“&”…\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"循环将会是一个使用数组的循环。这是一项[在 2021 年版中引入](https://doc.\"\n#~ \"rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html)的变\"\n#~ \"更。\"\n\n#~ msgid \"\"\n#~ \"An implicit array copy would have occurred.  Since `i32` is a copy type, \"\n#~ \"then `[i32; 3]` is also a copy type.\"\n#~ msgstr \"\"\n#~ \"会发生隐式数组复制。由于“i32”是复制类型，因此“\\\\[i32; 3\\\\]”也是复制类型。\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"正如我们所知，`if` 是 Rust 中的一个表达式。它用于有条件地 评估两个块中的一\"\n#~ \"个，但这些块可以有一个值， 然后成为 `if` 表达式的值。其他控制流表达式在 \"\n#~ \"Rust 中也有类似 的运作方式。\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"同样的规则也适用于函数：函数主体的值 是返回值：\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"这张幻灯片的重点是说明在 Rust 中，块有类型和值。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expressions.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"[`for` 循环](https://doc.rust-lang.org/std/keyword.for.html) 与 [`when \"\n#~ \"let` 循环](when-let-expression.md)密切相关。它会 自动对表达式调用 \"\n#~ \"`into_iter()`，然后对其进行迭代：\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"你可以在此照常使用 `break` 和 `continue`。\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"在这种情况下，索引迭代在 Rust 中并不是一个特殊的语法。\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` 是实现 `Iterator` trait 的区间。\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"\"\n#~ \"`step_by` 是返回另一个 `Iterator` 的方法，用于逐一跳过所有其他元素。\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"修改矢量中的元素并说明编译器错误。将矢量 `v` 改为可变，并将 for 循环改为 \"\n#~ \"`for x in v.iter_mut()`。\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"`loop` 表达式\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"最后是用于创建无限循环的 [`loop` 关键字](https://doc.rust-lang.org/\"\n#~ \"reference/expressions/loop-expr.html#infinite-loops) 。\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"在下例中，你必须 `break` 或 `return` 才能停止循环：\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"用一个值（例如 `break 8`）来中断 `loop` 并将其输出。\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"由于类型推导，`i32` 可以省略。随着课程推进，我们会越来越少地看到类型声明。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"下面的代码通过使用 `_` 占位符来告诉编译器无需明确指定其类型就可以将对应数\"\n#~ \"据拷贝到该容器： \"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-\"\n#~ \"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-\"\n#~ \"HashSet%3CT,+S%3E) implements.\"\n#~ msgstr \"\"\n#~ \"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.\"\n#~ \"html#method.collect) 依赖 [`HashSet`](https://doc.rust-lang.org/std/iter/\"\n#~ \"trait.FromIterator.html) 实现的 `FromIterator`。\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"静态变量和常量\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"Welcome to RustOS 3.14\\\";\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{BANNER}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"static BANNER: &str = \\\"Welcome to RustOS 3.14\\\";\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{BANNER}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 10;\\n\"\n#~ \"    println!(\\\"before: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let a = \\\"hello\\\";\\n\"\n#~ \"        println!(\\\"inner scope: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"        let a = true;\\n\"\n#~ \"        println!(\\\"shadowed in inner scope: {a}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"after: {a}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let a = 10;\\n\"\n#~ \"    println!(\\\"before: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let a = \\\"hello\\\";\\n\"\n#~ \"        println!(\\\"inner scope: {a}\\\");\\n\"\n#~ \"\\n\"\n#~ \"        let a = true;\\n\"\n#~ \"        println!(\\\"shadowed in inner scope: {a}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"after: {a}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"以下代码说明了为什么在作用域内隐藏一个不可变的变量时，即使是在变量类型没有\"\n#~ \"改变的情况下，编译器也不能简单地重复利用之前的内存位置。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tails`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"本页提供了一个枚举类型 `CoinFlip`，其中包含 `Heads` 和`Tail`两个变体。在使\"\n#~ \"用变体时，你可能会注意到命名空间。\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"在这两者中，关联的函数都在 `impl` 块中定义。\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"你可以定义更丰富的枚举，其中变体会携带数据。然后，你可以使用 `match` 语句\"\n#~ \"从每个变体中提取数据：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"enum WebEvent {\\n\"\n#~ \"    PageLoad,                 // Variant without payload\\n\"\n#~ \"    KeyPress(char),           // Tuple struct variant\\n\"\n#~ \"    Click { x: i64, y: i64 }, // Full struct variant\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(event: WebEvent) {\\n\"\n#~ \"    match event {\\n\"\n#~ \"        WebEvent::PageLoad       => println!(\\\"page loaded\\\"),\\n\"\n#~ \"        WebEvent::KeyPress(c)    => println!(\\\"pressed '{c}'\\\"),\\n\"\n#~ \"        WebEvent::Click { x, y } => println!(\\\"clicked at x={x}, \"\n#~ \"y={y}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let load = WebEvent::PageLoad;\\n\"\n#~ \"    let press = WebEvent::KeyPress('x');\\n\"\n#~ \"    let click = WebEvent::Click { x: 20, y: 80 };\\n\"\n#~ \"\\n\"\n#~ \"    inspect(load);\\n\"\n#~ \"    inspect(press);\\n\"\n#~ \"    inspect(click);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"enum WebEvent {\\n\"\n#~ \"    PageLoad,                 // Variant without payload\\n\"\n#~ \"    KeyPress(char),           // Tuple struct variant\\n\"\n#~ \"    Click { x: i64, y: i64 }, // Full struct variant\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(event: WebEvent) {\\n\"\n#~ \"    match event {\\n\"\n#~ \"        WebEvent::PageLoad       => println!(\\\"page loaded\\\"),\\n\"\n#~ \"        WebEvent::KeyPress(c)    => println!(\\\"pressed '{c}'\\\"),\\n\"\n#~ \"        WebEvent::Click { x, y } => println!(\\\"clicked at x={x}, \"\n#~ \"y={y}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let load = WebEvent::PageLoad;\\n\"\n#~ \"    let press = WebEvent::KeyPress('x');\\n\"\n#~ \"    let click = WebEvent::Click { x: 20, y: 80 };\\n\"\n#~ \"\\n\"\n#~ \"    inspect(load);\\n\"\n#~ \"    inspect(press);\\n\"\n#~ \"    inspect(click);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"表达式会从上到下与模式匹配。没有像 C 或 C++ 中那样的跳转。\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"匹配表达式拥有一个值。值是 match 分支中被执行的最后一个表达式。\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"从顶部开始，查找与该值匹配的模式，然后沿箭头运行代码。一旦找到匹配，我们便\"\n#~ \"会停止。\"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` 会检查 `enum` 中的隐藏的判别字段。\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"可以通过调用 `std::mem::discriminant()` 来检索判别\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"这很有用，例如如果为结构体实现 `PartialEq`，比较字段值不会影响等式。\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` 与含顶层 `struct Click { ... }` 的 `WebEvent::\"\n#~ \"Click(Click)` 不完全相同。例如，内嵌版本无法实现 trait。\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"Rust 枚举被紧密地打包，考虑到了对齐的影响，因此存在一些限制：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::any::type_name;\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"\\n\"\n#~ \"fn dbg_size<T>() {\\n\"\n#~ \"    println!(\\\"{}: size {} bytes, align: {} bytes\\\",\\n\"\n#~ \"        type_name::<T>(), size_of::<T>(), align_of::<T>());\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"enum Foo {\\n\"\n#~ \"    A,\\n\"\n#~ \"    B,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    dbg_size::<Foo>();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_size {\\n\"\n#~ \"    ($t:ty) => {\\n\"\n#~ \"        println!(\\\"{}: size {} bytes, align: {} bytes\\\",\\n\"\n#~ \"                 stringify!($t), size_of::<$t>(), align_of::<$t>());\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"enum Foo {\\n\"\n#~ \"    A,\\n\"\n#~ \"    B,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    dbg_size!(Foo);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"在内部，Rust 使用字段（判别）来跟踪枚举变体。\"\n\n#, fuzzy\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"试试其他类型，例如：\"\n\n#, fuzzy\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"`dbg_size!(bool)`：大小占用 1 个字节，对齐占用 1 个字节；\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<bool>)`：大小占用 1 个字节，对齐占用 1 个字节（小众优\"\n#~ \"化，请参阅下文）；\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(&i32)`：大小占用 8 个字节，对齐占用 8 个字节（在 64 位设备\"\n#~ \"上）；\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<&i32>)`：大小占用 8 个字节，对齐占用 8 个字节（Null 指针\"\n#~ \"优化，请参阅下文）。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"小众优化：Rust 将对枚举判别合并使用 未使用的位模式。\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"如果您想讨论将 256 多个“Option”链在一起时会发生什么情况，可以使用下方这个\"\n#~ \"更复杂的示例。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Program name: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Missing name?\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Program name: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Missing name?\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, execute a block which is \"\n#~ \"required to abort normal control flow (with `panic`/`return`/`break`/\"\n#~ \"`continue`):\"\n#~ msgstr \"\"\n#~ \"自 1.65 版以来，类似的 [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) 结构允许执行解构赋值，或者如果不满足条\"\n#~ \"件，则有一个非返回块分支 (panic/return/break/continue)：\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"[`match` 关键字](https://doc.rust-lang.org/reference/expressions/match-\"\n#~ \"expr.html) 用于将一个值与一个或多个模式进行匹配。从这个意义上讲，它的工作\"\n#~ \"方式 类似于一系列的 `if let` 表达式：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    match std::env::args().next().as_deref() {\\n\"\n#~ \"        Some(\\\"cat\\\") => println!(\\\"Will do cat things\\\"),\\n\"\n#~ \"        Some(\\\"ls\\\")  => println!(\\\"Will ls some files\\\"),\\n\"\n#~ \"        Some(\\\"mv\\\")  => println!(\\\"Let's move some files\\\"),\\n\"\n#~ \"        Some(\\\"rm\\\")  => println!(\\\"Uh, dangerous!\\\"),\\n\"\n#~ \"        None        => println!(\\\"Hmm, no program name?\\\"),\\n\"\n#~ \"        _           => println!(\\\"Unknown program name!\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    match std::env::args().next().as_deref() {\\n\"\n#~ \"        Some(\\\"cat\\\") => println!(\\\"Will do cat things\\\"),\\n\"\n#~ \"        Some(\\\"ls\\\")  => println!(\\\"Will ls some files\\\"),\\n\"\n#~ \"        Some(\\\"mv\\\")  => println!(\\\"Let's move some files\\\"),\\n\"\n#~ \"        Some(\\\"rm\\\")  => println!(\\\"Uh, dangerous!\\\"),\\n\"\n#~ \"        None        => println!(\\\"Hmm, no program name?\\\"),\\n\"\n#~ \"        _           => println!(\\\"Unknown program name!\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"将 match 表达式保存到一个变量中并输出结果。\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"移除 `.as_deref()` 并说明错误。\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` 会返回  `Option<String>`，但无法与 `String` 进行\"\n#~ \"匹配。\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` 会将 `Option<T>` 转换为 `Option<&T::Target>`。在我们的示例\"\n#~ \"中，这会将 `Option<String>` 转换为 `Option<&str>`。\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"现在，我们可以使用模式匹配来匹配 `Option` 中的 `&str`。\"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"模式 `_` 是外卡 (wildcard) 模式。它可以匹配任何值。\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"展示绑定的运作方式可能会很有帮助，例如通过用变量替换通配符或移除“q”周围的\"\n#~ \"引号来展示。\"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"您可以在参照项上演示如何匹配。\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"这时可能很适合提到“不可反驳的模式”这个概念，因为这个术语可能会出现在错误消\"\n#~ \"息中。\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"您还可以解构“structs”：\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"对未知长度的切片进行解构也可以使用固定长度的模式。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    inspect(&[0, -2, 3]);\\n\"\n#~ \"    inspect(&[0, -2, 3, 4]);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(slice: &[i32]) {\\n\"\n#~ \"    println!(\\\"Tell me about {slice:?}\\\");\\n\"\n#~ \"    match slice {\\n\"\n#~ \"        &[0, y, z] => println!(\\\"First is 0, y = {y}, and z = {z}\\\"),\\n\"\n#~ \"        &[1, ..]   => println!(\\\"First is 1 and the rest were \"\n#~ \"ignored\\\"),\\n\"\n#~ \"        _          => println!(\\\"All elements were ignored\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    inspect(&[0, -2, 3]);\\n\"\n#~ \"    inspect(&[0, -2, 3, 4]);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(slice: &[i32]) {\\n\"\n#~ \"    println!(\\\"Tell me about {slice:?}\\\");\\n\"\n#~ \"    match slice {\\n\"\n#~ \"        &[0, y, z] => println!(\\\"First is 0, y = {y}, and z = {z}\\\"),\\n\"\n#~ \"        &[1, ..]   => println!(\\\"First is 1 and the rest were \"\n#~ \"ignored\\\"),\\n\"\n#~ \"        _          => println!(\\\"All elements were ignored\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"匹配时，您可以向模式中添加“守卫”。这是一个任意布尔表达式，如果模式匹配，就\"\n#~ \"会执行该表达式：\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"您可以在 if 表达式中使用模式中定义的变量。\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"第 1 天：下午练习\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"我们将关注以下两方面：\"\n\n#, fuzzy\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"Luhn 算法\"\n\n#, fuzzy\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"枚举和模式匹配。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"function.\"\n#~ msgstr \"将下面的代码复制到 <https://play.rust-lang.org/> 并实现上述函数：\"\n\n#~ msgid \"\"\n#~ \"Try to solve the problem the \\\"simple\\\" way first, using `for` loops and \"\n#~ \"integers. Then, revisit the solution and try to implement it with \"\n#~ \"iterators.\"\n#~ msgstr \"\"\n#~ \"使用“for”循环和整数，先尝试以简单的方式解决问题。然后，再次查看该解决方\"\n#~ \"案，并尝试使用迭代器来实现它。\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"内存管理：栈与堆，手动内存管理，基于作用域的内存管理，以及垃圾回收。\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"\"\n#~ \"所有权：移动（move）的语义，复制（copy）和克隆（clone），借用（borrow），\"\n#~ \"以及生命周期。\"\n\n#, fuzzy\n#~ msgid \"Structs and methods.\"\n#~ msgstr \"结构体（struct）, 枚举（enum）, 方法（method）。\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"标准库: `字符串（String）`, `选项（Option）` 和 `结果（Result）`, `动态数\"\n#~ \"组（Vec）`, `散列表（HashMap）`, `引用计数（Rc）` 和 `共享引用计数（Arc）\"\n#~ \"`。\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"模块: 可见性, 路径和文件系统的层次结构。\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"首先，我们回顾一下内存管理的工作原理。\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"栈与堆\"\n\n#, fuzzy\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"栈 vs 堆\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n#~ \"    // String provides no guarantees about its layout, so this could lead \"\n#~ \"to\\n\"\n#~ \"    // undefined behavior.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (ptr, capacity, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n#~ \"    // String provides no guarantees about its layout, so this could lead \"\n#~ \"to\\n\"\n#~ \"    // undefined behavior.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (capacity, ptr, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"你自己实现堆内存分配和释放。\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"稍有不慎，这可能会导致崩溃、bug、安全漏洞和内存泄漏。\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"C++ 示例\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"你必须对使用 `malloc` 分配的每个指针调用 `free`：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = (int*)malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory. Worse, \"\n#~ \"freeing the pointer twice, or accessing a freed pointer can lead to \"\n#~ \"exploitable security vulnerabilities.\"\n#~ msgstr \"\"\n#~ \"如果函数在 `malloc` 和 `free` 之间提前返回，则会导致内存泄漏： 指针丢失，\"\n#~ \"而我们无法释放对应的内存。\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"构造函数和析构函数让你可以钩入对象的生命周期。\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"通过将指针封装在对象中，你可以在该对象 被销毁时释放内存。编译器可保证这一\"\n#~ \"点的实现，即使引发了异常也不例外。\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"\"\n#~ \"这通常称为“资源获取即初始化 (resource acquisition is initialization, \"\n#~ \"RAII)”， 并为你提供智能指针。\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"`std::unique_ptr` 对象在栈上分配内存，并指向在堆上分配的内存。\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"在 `say_hello` 结束时，`std::unique_ptr` 析构函数将运行。\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"析构函数释放它所指向的 `Person` 对象。\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"将所有权传递给函数时，使用特殊的 move 构造函数：\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"自动内存管理是手动和基于作用域的内存管理 的替代方案：\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"程序员从不显式分配或取消分配内存。\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"垃圾回收器找到未使用的内存，并为程序员将其取消分配。\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Java 示例\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"`sayHello` 返回后，`person` 对象未被取消分配：\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Rust 中的内存管理\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Rust 中的内存管理是一种混合模式：\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"像 Java 一样安全又正确，但没有垃圾回收器。\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"像 C++ 一样基于作用域，但编译器会强制完全遵循规则。\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Rust 用户可以根据具体情况选择合适的抽象，有些甚至没有像 C 那样的运行时开\"\n#~ \"销。\"\n\n#, fuzzy\n#~ msgid \"Rust achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"它通过对“所有权”进行显式建模来实现这一点。\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"如果此时被问及如何操作，你可以提及在 Rust 中，这通常由 RAII 封装容器类型\"\n#~ \"（例如 [Box](https://doc.rust-lang.org/std/boxed/struct.Box.html)、[Vec]\"\n#~ \"(https://doc.rust-lang.org/std/vec/struct.Vec.html)、[Rc](https://doc.\"\n#~ \"rust-lang.org/std/rc/struct.Rc.html) 或 [Arc](https://doc.rust-lang.org/\"\n#~ \"std/sync/struct.Arc.html)）处理。这些类型通过各种方式封装了所有权和内存分\"\n#~ \"配，并防止了 C 中潜在错误的发生。\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"你可能会被问及析构函数，此处 [Drop](https://doc.rust-lang.org/std/ops/\"\n#~ \"trait.Drop.html) trait 是 Rust 等效项。\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"析构函数可在此运行以释放资源。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"变量绑定在任一时刻有且“只有”一个值。\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"`s1` 中的堆数据会被 `s2` 重复使用。\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"当 `s1` 离开作用域时，什么都不会发生（它已被移出）。\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplicate the data in s1.\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // 复制 s1 中的数据。\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = String::from(\\\"Alice\\\");\\n\"\n#~ \"    say_hello(name);\\n\"\n#~ \"    // say_hello(name);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = String::from(\\\"Alice\\\");\\n\"\n#~ \"    say_hello(name);\\n\"\n#~ \"    // say_hello(name);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"如果学员问起 `derive`，只需说这是一种 在编译时生成 Rust 代码的方法。在这种\"\n#~ \"情况下，系统会生成 `Copy` 和 `Clone` trait 的默认实现。\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"借用的值是有“生命周期”的：\"\n\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"生命周期可以是隐式的：add(p1: &Point, p2: &Point) -> Point\\\\`。\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"生命周期也可以是显式的：`&'a Point`、`&'document str`。\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"将 `&'a Point` 读取为“借用的 `Point，至少 在 `a\\\\` 生命周期内有效。\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"生命周期始终由编译器推断出来：你不能自行 分配生命周期。\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"除了借用其参数之外，函数还可以返回借用的值：\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` 是一个泛型形参，由编译器推断出来。\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"以 `'` 和 `'a` 开头的生命周期是典型的默认名称。\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"当参数在不同的作用域时，“至少”部分至关重要。\"\n\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"将 `p2` 和 `p3` 的声明移至新作用域 (`{ ... }`)，以产生以下代码：\"\n\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"请注意：由于 `p3` 的生命周期比 `p2` 长，因此无法编译。\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"重置工作区，然后将函数签名更改为 `fn left_most<'a, 'b>(p1: &'a Point, p2: \"\n#~ \"&'a Point) -> &'b Point`。这不会被编译，因为 `'a` 和 `'b` 生命周期之间的关\"\n#~ \"系不明确。\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"另一种解释方式：\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"对两个值的两个引用被一个函数借用，该函数返回 另一个引用。\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"它必须是来自这两个输入中的一个（或来自一个全局变量）。\"\n\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"是哪一个呢？编译器需要知道这一点，因此在调用点，返回的引用 的使用时间不会\"\n#~ \"超过引用的来源中的变量。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Methods are defined in an `impl` block, which we will see in following \"\n#~ \"slides.\"\n#~ msgstr \"方法是在“impl”块中进行定义的，我们将在后面的幻灯片中看到。\"\n\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"在编写“new”函数时可以使用“Self”作为类型，因为它可以与结构体类型名称互换\"\n\n#~ msgid \"\"\n#~ \"Implement the `Default` trait for the struct. Define some fields and use \"\n#~ \"the default values for the other fields.\"\n#~ msgstr \"为结构体实现“Default”trait。定义一些字段并对其他字段使用默认值。\"\n\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"方法是在“impl”块中进行定义的。\"\n\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"使用结构体更新语法以利用“peter”定义一个新结构。请注意，之后将无法再访问变\"\n#~ \"量“peter”。\"\n\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"在输出结构体时，使用“{:#?}”来请求“Debug”表示法。\"\n\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"下面，我们将介绍方法接收器之间的区别。\"\n\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"建议强调“共享且不可变”和“唯一且可变”。由于借用检查器规则的原因，这些约束\"\n#~ \"在 Rust 中总是一起出现，而“self”也不例外。您无法从多个位置引用结构体并对其\"\n#~ \"调用一项改变（“&mut self”）方法。\"\n\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"这里的所有四种方法都使用一个不同的方法接收器。\"\n\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"您可以指出这会如何改变函数可对变量值采取的操作，以及是否/如何能够\"\n#~ \"在“main”中再次使用该函数。\"\n\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"您可以展示在尝试调用“finish”两次时出现的错误。\"\n\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"请注意，尽管方法接收器不同，但是非静态函数在 main 函数体中的调用方式相同。\"\n#~ \"Rust 支持在调用方法时自动引用和解引用，并会自动加入“&”“\\\\*”和“muts”以便该\"\n#~ \"对象与方法签名匹配。\"\n\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"您或许可以指出 `print_laps` 使用的是不断迭代的vector。我们将在下午详细说明\"\n#~ \"这些vector。\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"第二天上午习题\"\n\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"我们将考虑以下两种场景：\"\n\n#~ msgid \"Storing books and querying the collection\"\n#~ msgstr \"存储图书和查询馆藏\"\n\n#~ msgid \"Keeping track of health statistics for patients\"\n#~ msgstr \"跟踪患者的健康统计信息\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"我们明天会更详细地介绍结构体和“Vec\\n\"\n#~ \"\\n\"\n#~ \"”类型。目前，您只需了解其 API 的一部分：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"将下面的代码复制到 <https://play.rust-lang.org/> 并实现上述函数：\"\n\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"常见的词汇类型包括：\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"[`Option` 和 `Result`](std/option-result.md) 类型：用于可选值和 [错误处理]\"\n#~ \"(error-handling.md)。\"\n\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"[`String`](std/string.md)：用于自有数据的默认字符串类型。\"\n\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md)：标准的可扩展矢量。\"\n\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"[`HashMap`](std/hashmap.md)：采用可配置哈希算法的哈希映射 类型。\"\n\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"[`Box`](std/box.md)：适用于堆分配数据的自有指针。\"\n\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"[`Rc`](std/rc.md)：适用于堆分配数据的共享引用计数指针。\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` 和 `Result`\"\n\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"这些类型表示可选数据：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let numbers = vec![10, 20, 30];\\n\"\n#~ \"    let first: Option<&i8> = numbers.first();\\n\"\n#~ \"    println!(\\\"first: {first:?}\\\");\\n\"\n#~ \"\\n\"\n#~ \"    let arr: Result<[i8; 3], Vec<i8>> = numbers.try_into();\\n\"\n#~ \"    println!(\\\"arr: {arr:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"相较于 `&T`，`Option<&T>` 的空间开销为零。\"\n\n#~ msgid \"\"\n#~ \"Show iterating over a vector and mutating the value: `for e in &mut v \"\n#~ \"{ *e += 50; }`\"\n#~ msgstr \"介绍如何迭代矢量并更改它的值：“for e in &mut v { \\\\*e += 50; }”\"\n\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"\"\n#~ \"在上面的示例中，因为有 `Deref`，您甚至可以在 `println!` 语句中省略 `*`。\"\n\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"包含递归数据结构的 Box\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"第二天下午习题\"\n\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"今天下午的习题将重点关注字符串（string）和迭代器（iterator）。\"\n\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Rust 的所有权模式会影响许多 API。例如，[“Iterator”](https://doc.rust-lang.\"\n#~ \"org/std/iter/trait.Iterator.html)和[“IntoIterator”](https://doc.rust-lang.\"\n#~ \"org/std/iter/trait.IntoIterator.html) trait。\"\n\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"trait 类似于接口：它们描述某类型的行为（方法）。`Iterator` trait 只是告知\"\n#~ \"您可以调用 `next`，直到返回 `None`：\"\n\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"您可以按如下方式使用此 trait：\"\n\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"迭代器返回的类型是什么？请在此测试您的答案：\"\n\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"为什么要使用此类型？\"\n\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"和之前一样，迭代器返回的类型是什么？\"\n\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"现在，我们已了解了“Iterator”和“IntoIterator”，接下来可以构建“for”循环了。\"\n#~ \"它们会针对表达式调用“into_iter()”，并对生成的迭代器进行迭代：\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"使用上方代码进行实验，然后参阅[“impl IntoIterator for &Vec\\n\"\n#~ \"\\n\"\n#~ \"”](https://doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-\"\n#~ \"for-%26'a+Vec%3CT,+A%3E)和[“impl IntoIterator for Vec\\n\"\n#~ \"\\n\"\n#~ \"”](https://doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-\"\n#~ \"for-Vec%3CT,+A%3E)的相关文档来检查您的答案。\"\n\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"在本练习中，您将实现 Web 服务器的路由组件。服务器配置有多个路径前缀，这些\"\n#~ \"前缀与请求路径匹配。路径前缀可以包含与完整段匹配的通配符。请参阅下面的单元\"\n#~ \"测试。\"\n\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"trait：派生 trait、默认方法和重要的标准库 trait。\"\n\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"泛型：泛型数据类型、泛型方法、单态化和 trait 对象。\"\n\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"测试：单元测试、文档测试和集成测试。\"\n\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"不安全 Rust：原始指针、静态变量、不安全函数和外部函数。\"\n\n#~ msgid \"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\"\n#~ msgstr \"尝试声明一个新变量“let p = Point { x: 5, y: 10.0 };”。\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"修正代码，以允许点具有不同类型的元素。\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"您可以在 `impl` 块中声明通用类型：\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"泛型代码根据调用位置转换为非泛型代码：\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"具体行为与您所编写的一样\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"Rust 派生宏的运作方式是自动生成代码，用于实现数据结构的指定 trait。\"\n\n#, fuzzy\n#~ msgid \"You can let the compiler derive a number of traits as follows:\"\n#~ msgstr \"您可以让编译器派生多个特征：\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"特征可以依照其他特征方法来实现行为：\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"将方法“not_equals”移至新的 trait“NotEquals”。\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"将“Equals”设为“NotEquals”的超 trait。\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"为“Equals”提供“NotEquals”的通用实现。\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"借助通用实现，您不再需要将“Equals”作为“NotEqual”的超 trait。\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"`impl Trait` 让您可使用无法命名的类型。\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"这是一个非常棒的示例，因为它使用了两次 `impl Display`。这有助于说明 此处没\"\n#~ \"有任何项目会强制使用相同的 `impl Display` 类型。如果我们使用单个 `T: \"\n#~ \"Display`，它会强制限制输入 `T` 和返回 `T` 均为同一类型。 这并不适用于这个\"\n#~ \"特定函数，因为我们预期作为输入的类型可能 不会是 `format!` 返回的值。如果我\"\n#~ \"们希望通过 `: Display` 语法执行相同的操作，则需要两个 独立的泛型形参。\"\n\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"现在，我们来看看 Rust 标准库的一些最常见的特征：\"\n\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) 和 \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) 用于 `for` 循环中，\"\n\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\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#~ \"值，\"\n\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) 和 [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) 用于实现 IO。\"\n\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html)、[`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html) 等用于实现运算符重载，\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let primes = vec![2, 3, 5, 7];\\n\"\n#~ \"    let prime_squares = primes\\n\"\n#~ \"        .into_iter()\\n\"\n#~ \"        .map(|prime| prime * prime)\\n\"\n#~ \"        .collect::<Vec<_>>();\\n\"\n#~ \"    println!(\\\"prime_squares: {prime_squares:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Iterator` 会实现 `fn collect<B>(self) -> B where B: FromIterator<Self::\"\n#~ \"Item>, Self: Sized`\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"` Add`Mul \\\\``…\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"第 3 天：上午练习\"\n\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"我们将使用 trait 和 trait 对象设计一个经典的 GUI 库。\"\n\n#~ msgid \"\"\n#~ \"We will also look at enum dispatch with an exercise involving points and \"\n#~ \"polygons.\"\n#~ msgstr \"我们还将通过点和多边形的相关练习，探讨枚举调度情况。\"\n\n#, fuzzy\n#~ msgid \"Drawing A Simple GUI\"\n#~ msgstr \"一个简单的 GUI 库\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"多边形结构体\"\n\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"我们将创建一个包含一些点的“Polygon”结构体。将以下代码复制到 <https://play.\"\n#~ \"rust-lang.org/>，然后填入缺少的方法，设法通过测试：\"\n\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"由于问题语句中缺少方法签名，因此练习的关键部分是正确指定这些内容。您无需修\"\n#~ \"改测试。\"\n\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"练习的其他有趣部分：\"\n\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"为某些结构体派生“Copy”trait，因为在测试中，方法有时不借用它们的参数。\"\n\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"发现必须实现“Add”trait 才能通过“+”添加两个对象。请注意，我们在第 3 天之前\"\n#~ \"不会讨论泛型。\"\n\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"Rust 中的错误处理是使用显式控制流来进行的：\"\n\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"包含错误的函数会在返回类型中列出相关信息。\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"此规则没有例外。\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"捕获堆栈展开\"\n\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"在前面，我们看到了 `Result` 枚举。在遇到正常操作产生的预期错误时， 我们常\"\n#~ \"会用到此方法：\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"使用 `?` 传播错误\"\n\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"try 操作符 `?` 用于将错误返回给调用方。它能把常用命令\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"The return type of the function has to be compatible with the nested \"\n#~ \"functions it calls. For instance, a function returning a `Result<T, Err>` \"\n#~ \"can only apply the `?` operator on a function returning a  `Result<AnyT, \"\n#~ \"Err>`. It cannot apply the `?` operator on a function returning an \"\n#~ \"`Option<AnyT>` or `Result<T, OtherErr>` unless `OtherErr` implements \"\n#~ \"`From<Err>`. Reciprocally, a function returning an `Option<T>` can only \"\n#~ \"apply the `?` operator  on a function returning an `Option<AnyT>`.\"\n#~ msgstr \"\"\n#~ \"函数的返回值类型必须与其调用的嵌套函数兼容。例如，一个返回“Result\\\\<T, \"\n#~ \"Err>”的函数只能对返回“Result\\\\<AnyT, Err>”的函数应用“?”运算符。它无法对返\"\n#~ \"回“Option\\n\"\n#~ \"\\n\"\n#~ \"”或“Result\\\\<T, OtherErr>”的函数应用“?”运算符，除非“OtherErr”实现“From\\n\"\n#~ \"\\n\"\n#~ \"”。相反地，返回“Option\\n\"\n#~ \"\\n\"\n#~ \"”的函数只能对返回“Option\\n\"\n#~ \"\\n\"\n#~ \"”的函数应用“?”运算符。\"\n\n#~ msgid \"\"\n#~ \"You can convert incompatible types into one another with the different \"\n#~ \"`Option` and `Result` methods  such as `Option::ok_or`, `Result::ok`, \"\n#~ \"`Result::err`.\"\n#~ msgstr \"\"\n#~ \"您可以使用其他“Option”和“Result”方法（例如“Option::ok_or”“Result::\"\n#~ \"ok”“Result::err”）将不兼容的类型转换为另一种类型。\"\n\n#~ msgid \"\"\n#~ \"It is good practice for all error types that don't need to be `no_std` to \"\n#~ \"implement `std::error::Error`, which requires `Debug` and `Display`. The \"\n#~ \"`Error` crate for `core` is only available in [nightly](https://github.\"\n#~ \"com/rust-lang/rust/issues/103765), so not fully `no_std` compatible yet.\"\n#~ msgstr \"\"\n#~ \"对所有不需要是“no_std”的错误类型来说，实现“std::error::Error”是一种很好的\"\n#~ \"做法，而这需要“Debug”和“Display”。“core”的“Error”crate 仅在 [nightly]\"\n#~ \"(https://github.com/rust-lang/rust/issues/103765) 提供，因此尚未\"\n#~ \"与“no_std”完全兼容。\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"对所有错误类型实现 `std::error::Error` 是一种很好的做法，而这需要结合使用 \"\n#~ \"`Debug` 和 `Display` 方法。 通常，在可能的情况下实现 `Clone` 和 `Eq` 也十\"\n#~ \"分有益， 可以让库的测试和使用变得更加简单。在本例中，我们无法轻松做到这一\"\n#~ \"点， 因为 `io::Error` 不能实现这些方法。\"\n\n#~ msgid \"\"\n#~ \"The [thiserror](https://docs.rs/thiserror/) crate is a popular way to \"\n#~ \"create an error enum like we did on the previous page:\"\n#~ msgstr \"\"\n#~ \"[thiserror](https://docs.rs/thiserror/) crate 是创建错误枚举的常用方法， \"\n#~ \"就像前一页中提供的示例一样：\"\n\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"`thiserror` 的派生宏会自动实现 `std::error::Error`，并且可以选择性地实现 \"\n#~ \"`Display` （如果提供了 `#[error(...)]` 属性）和 `From`（如果添加了 \"\n#~ \"`#[from]` 属性）。 此规则也适用于结构体。\"\n\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"但是，此规则不会影响公共 API，对于库而言，这非常理想。\"\n\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"广泛使用的 [anyhow](https://docs.rs/anyhow/) crate 可以帮助我们为错误添加 \"\n#~ \"背景信息，并减少自定义错误类型的 数量。\"\n\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"使用 `#[test]` 标记单元测试：\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"使用 `cargo test` 查找并运行单元测试。\"\n\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"单元测试通常会放在嵌套模块中（在 [Playground](https://play.rust-lang.\"\n#~ \"org/) 上运行测试）：\"\n\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"用于编写测试的实用 crate\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"调用外部代码\"\n\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"\"\n#~ \"基于其他语言的函数可能会违反 Rust 的保证。因此， 调用这类函数是不安全的：\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"第 3 天：下午练习\"\n\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"让我们构建一个用于读取目录内容的安全封装容器！\"\n\n#~ msgid \"\"\n#~ \"For this exercise, we suggest using a local dev environment instead of \"\n#~ \"the Playground. This will allow you to run your binary on your own \"\n#~ \"machine.\"\n#~ msgstr \"\"\n#~ \"在本练习中，我们建议您使用本地开发环境，而不是 Playground。这样，您就可以\"\n#~ \"在自己的机器上运行二进制文件。\"\n\n#~ msgid \"\"\n#~ \"To get started, follow the [running locally](../../cargo/running-locally.\"\n#~ \"md) instructions.\"\n#~ msgstr \"\"\n#~ \"首先，请按照[在本地运行](../../cargo/running-locally.md)中的说明操作。\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"看过练习后，您可以查看所提供的[解题方法](solutions-afternoon.md)。\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"/// Prints a greeting to standard output.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello from Rust!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"/// Prints a greeting to standard output.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Hello from Rust!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"libgreetings\\\",\\n\"\n#~ \"        \\\"libtextwrap\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libgreetings\\\",\\n\"\n#~ \"    crate_name: \\\"greetings\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_with_dep\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"libgreetings\\\",\\n\"\n#~ \"        \\\"libtextwrap\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libgreetings\\\",\\n\"\n#~ \"    crate_name: \\\"greetings\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"use greetings::greeting;\\n\"\n#~ \"use textwrap::fill;\\n\"\n#~ \"\\n\"\n#~ \"/// Prints a greeting to standard output.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{}\\\", fill(&greeting(\\\"Bob\\\"), 24));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust demo.\\n\"\n#~ \"\\n\"\n#~ \"use greetings::greeting;\\n\"\n#~ \"use textwrap::fill;\\n\"\n#~ \"\\n\"\n#~ \"/// Prints a greeting to standard output.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{}\\\", fill(&greeting(\\\"Bob\\\"), 24));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Greeting library.\\n\"\n#~ \"\\n\"\n#~ \"/// Greet `name`.\\n\"\n#~ \"pub fn greeting(name: &str) -> String {\\n\"\n#~ \"    format!(\\\"Hello {name}, it is very nice to meet you!\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Greeting library.\\n\"\n#~ \"\\n\"\n#~ \"/// Greet `name`.\\n\"\n#~ \"pub fn greeting(name: &str) -> String {\\n\"\n#~ \"    format!(\\\"Hello {name}, it is very nice to meet you!\\\")\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"aidl_interface {\\n\"\n#~ \"    name: \\\"com.example.birthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"com/example/birthdayservice/*.aidl\\\"],\\n\"\n#~ \"    unstable: true,\\n\"\n#~ \"    backend: {\\n\"\n#~ \"        rust: { // Rust is not enabled by default\\n\"\n#~ \"            enabled: true,\\n\"\n#~ \"        },\\n\"\n#~ \"    },\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"aidl_interface {\\n\"\n#~ \"    name: \\\"com.example.birthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"com/example/birthdayservice/*.aidl\\\"],\\n\"\n#~ \"    unstable: true,\\n\"\n#~ \"    backend: {\\n\"\n#~ \"        rust: { // 默认情况下不启用 Rust \\n\"\n#~ \"            enabled: true,\\n\"\n#~ \"        },\\n\"\n#~ \"    },\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Implementation of the `IBirthdayService` AIDL interface.\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::IBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"/// The `IBirthdayService` implementation.\\n\"\n#~ \"pub struct BirthdayService;\\n\"\n#~ \"\\n\"\n#~ \"impl binder::Interface for BirthdayService {}\\n\"\n#~ \"\\n\"\n#~ \"impl IBirthdayService for BirthdayService {\\n\"\n#~ \"    fn wishHappyBirthday(&self, name: &str, years: i32) -> binder::\"\n#~ \"Result<String> {\\n\"\n#~ \"        Ok(format!(\\n\"\n#~ \"            \\\"Happy Birthday {name}, congratulations with the {years} \"\n#~ \"years!\\\"\\n\"\n#~ \"        ))\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! 实现了 `IBirthdayService` AIDL 接口。\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::IBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"/// `IBirthdayService` 接口的具体实现。\\n\"\n#~ \"pub struct BirthdayService;\\n\"\n#~ \"\\n\"\n#~ \"impl binder::Interface for BirthdayService {}\\n\"\n#~ \"\\n\"\n#~ \"impl IBirthdayService for BirthdayService {\\n\"\n#~ \"    fn wishHappyBirthday(&self, name: &str, years: i32) -> binder::\"\n#~ \"Result<String> {\\n\"\n#~ \"        Ok(format!(\\n\"\n#~ \"            \\\"Happy Birthday {name}, congratulations with the {years} \"\n#~ \"years!\\\"\\n\"\n#~ \"        ))\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libbirthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"    crate_name: \\\"birthdayservice\\\",\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_library {\\n\"\n#~ \"    name: \\\"libbirthdayservice\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"    crate_name: \\\"birthdayservice\\\",\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Birthday service.\\n\"\n#~ \"use birthdayservice::BirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::BnBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"const SERVICE_IDENTIFIER: &str = \\\"birthdayservice\\\";\\n\"\n#~ \"\\n\"\n#~ \"/// Entry point for birthday service.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let birthday_service = BirthdayService;\\n\"\n#~ \"    let birthday_service_binder = BnBirthdayService::new_binder(\\n\"\n#~ \"        birthday_service,\\n\"\n#~ \"        binder::BinderFeatures::default(),\\n\"\n#~ \"    );\\n\"\n#~ \"    binder::add_service(SERVICE_IDENTIFIER, birthday_service_binder.\"\n#~ \"as_binder())\\n\"\n#~ \"        .expect(\\\"Failed to register service\\\");\\n\"\n#~ \"    binder::ProcessState::join_thread_pool()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! 生日服务。\\n\"\n#~ \"use birthdayservice::BirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::BnBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"const SERVICE_IDENTIFIER: &str = \\\"birthdayservice\\\";\\n\"\n#~ \"\\n\"\n#~ \"/// 生日服务的入口。\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let birthday_service = BirthdayService;\\n\"\n#~ \"    let birthday_service_binder = BnBirthdayService::new_binder(\\n\"\n#~ \"        birthday_service,\\n\"\n#~ \"        binder::BinderFeatures::default(),\\n\"\n#~ \"    );\\n\"\n#~ \"    binder::add_service(SERVICE_IDENTIFIER, birthday_service_binder.\"\n#~ \"as_binder())\\n\"\n#~ \"        .expect(\\\"Failed to register service\\\");\\n\"\n#~ \"    binder::ProcessState::join_thread_pool()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"birthday_server\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_server\\\",\\n\"\n#~ \"    srcs: [\\\"src/server.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"        \\\"libbirthdayservice\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"birthday_server\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_server\\\",\\n\"\n#~ \"    srcs: [\\\"src/server.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"        \\\"libbirthdayservice\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Birthday service.\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::IBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"const SERVICE_IDENTIFIER: &str = \\\"birthdayservice\\\";\\n\"\n#~ \"\\n\"\n#~ \"/// Connect to the BirthdayService.\\n\"\n#~ \"pub fn connect() -> Result<binder::Strong<dyn IBirthdayService>, binder::\"\n#~ \"StatusCode> {\\n\"\n#~ \"    binder::get_interface(SERVICE_IDENTIFIER)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"/// Call the birthday service.\\n\"\n#~ \"fn main() -> Result<(), binder::Status> {\\n\"\n#~ \"    let name = std::env::args()\\n\"\n#~ \"        .nth(1)\\n\"\n#~ \"        .unwrap_or_else(|| String::from(\\\"Bob\\\"));\\n\"\n#~ \"    let years = std::env::args()\\n\"\n#~ \"        .nth(2)\\n\"\n#~ \"        .and_then(|arg| arg.parse::<i32>().ok())\\n\"\n#~ \"        .unwrap_or(42);\\n\"\n#~ \"\\n\"\n#~ \"    binder::ProcessState::start_thread_pool();\\n\"\n#~ \"    let service = connect().expect(\\\"Failed to connect to \"\n#~ \"BirthdayService\\\");\\n\"\n#~ \"    let msg = service.wishHappyBirthday(&name, years)?;\\n\"\n#~ \"    println!(\\\"{msg}\\\");\\n\"\n#~ \"    Ok(())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! 生日服务。\\n\"\n#~ \"use com_example_birthdayservice::aidl::com::example::birthdayservice::\"\n#~ \"IBirthdayService::IBirthdayService;\\n\"\n#~ \"use com_example_birthdayservice::binder;\\n\"\n#~ \"\\n\"\n#~ \"const SERVICE_IDENTIFIER: &str = \\\"birthdayservice\\\";\\n\"\n#~ \"\\n\"\n#~ \"/// 连接到 BirthdayService。\\n\"\n#~ \"pub fn connect() -> Result<binder::Strong<dyn IBirthdayService>, binder::\"\n#~ \"StatusCode> {\\n\"\n#~ \"    binder::get_interface(SERVICE_IDENTIFIER)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"/// 调用生日服务。\\n\"\n#~ \"fn main() -> Result<(), binder::Status> {\\n\"\n#~ \"    let name = std::env::args()\\n\"\n#~ \"        .nth(1)\\n\"\n#~ \"        .unwrap_or_else(|| String::from(\\\"Bob\\\"));\\n\"\n#~ \"    let years = std::env::args()\\n\"\n#~ \"        .nth(2)\\n\"\n#~ \"        .and_then(|arg| arg.parse::<i32>().ok())\\n\"\n#~ \"        .unwrap_or(42);\\n\"\n#~ \"\\n\"\n#~ \"    binder::ProcessState::start_thread_pool();\\n\"\n#~ \"    let service = connect().expect(\\\"Failed to connect to \"\n#~ \"BirthdayService\\\");\\n\"\n#~ \"    let msg = service.wishHappyBirthday(&name, years)?;\\n\"\n#~ \"    println!(\\\"{msg}\\\");\\n\"\n#~ \"    Ok(())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"birthday_client\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_client\\\",\\n\"\n#~ \"    srcs: [\\\"src/client.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"birthday_client\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_client\\\",\\n\"\n#~ \"    srcs: [\\\"src/client.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"com.example.birthdayservice-rust\\\",\\n\"\n#~ \"        \\\"libbinder_rs\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_logs\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_logs\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"liblog_rust\\\",\\n\"\n#~ \"        \\\"liblogger\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"    host_supported: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"hello_rust_logs\\\",\\n\"\n#~ \"    crate_name: \\\"hello_rust_logs\\\",\\n\"\n#~ \"    srcs: [\\\"src/main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\n\"\n#~ \"        \\\"liblog_rust\\\",\\n\"\n#~ \"        \\\"liblogger\\\",\\n\"\n#~ \"    ],\\n\"\n#~ \"    prefer_rlib: true,\\n\"\n#~ \"    host_supported: true,\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust logging demo.\\n\"\n#~ \"\\n\"\n#~ \"use log::{debug, error, info};\\n\"\n#~ \"\\n\"\n#~ \"/// Logs a greeting.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    logger::init(\\n\"\n#~ \"        logger::Config::default()\\n\"\n#~ \"            .with_tag_on_device(\\\"rust\\\")\\n\"\n#~ \"            .with_min_level(log::Level::Trace),\\n\"\n#~ \"    );\\n\"\n#~ \"    debug!(\\\"Starting program.\\\");\\n\"\n#~ \"    info!(\\\"Things are going fine.\\\");\\n\"\n#~ \"    error!(\\\"Something went wrong!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"//! Rust logging demo.\\n\"\n#~ \"\\n\"\n#~ \"use log::{debug, error, info};\\n\"\n#~ \"\\n\"\n#~ \"/// Logs a greeting.\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    logger::init(\\n\"\n#~ \"        logger::Config::default()\\n\"\n#~ \"            .with_tag_on_device(\\\"rust\\\")\\n\"\n#~ \"            .with_min_level(log::Level::Trace),\\n\"\n#~ \"    );\\n\"\n#~ \"    debug!(\\\"Starting program.\\\");\\n\"\n#~ \"    info!(\\\"Things are going fine.\\\");\\n\"\n#~ \"    error!(\\\"Something went wrong!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"extern \\\"C\\\" {\\n\"\n#~ \"    fn abs(x: i32) -> i32;\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = -42;\\n\"\n#~ \"    let abs_x = unsafe { abs(x) };\\n\"\n#~ \"    println!(\\\"{x}, {abs_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"extern \\\"C\\\" {\\n\"\n#~ \"    fn abs(x: i32) -> i32;\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = -42;\\n\"\n#~ \"    let abs_x = unsafe { abs(x) };\\n\"\n#~ \"    println!(\\\"{x}, {abs_x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"#include <stdio.h>\\n\"\n#~ \"#include \\\"libbirthday.h\\\"\\n\"\n#~ \"\\n\"\n#~ \"void print_card(const card* card) {\\n\"\n#~ \"  printf(\\\"+--------------\\\\n\\\");\\n\"\n#~ \"  printf(\\\"| Happy Birthday %s!\\\\n\\\", card->name);\\n\"\n#~ \"  printf(\\\"| Congratulations with the %i years!\\\\n\\\", card->years);\\n\"\n#~ \"  printf(\\\"+--------------\\\\n\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"#include <stdio.h>\\n\"\n#~ \"#include \\\"libbirthday.h\\\"\\n\"\n#~ \"\\n\"\n#~ \"void print_card(const card* card) {\\n\"\n#~ \"  printf(\\\"+--------------\\\\n\\\");\\n\"\n#~ \"  printf(\\\"| Happy Birthday %s!\\\\n\\\", card->name);\\n\"\n#~ \"  printf(\\\"| Congratulations with the %i years!\\\\n\\\", card->years);\\n\"\n#~ \"  printf(\\\"+--------------\\\\n\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"cc_library {\\n\"\n#~ \"    name: \\\"libbirthday\\\",\\n\"\n#~ \"    srcs: [\\\"libbirthday.c\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"cc_library {\\n\"\n#~ \"    name: \\\"libbirthday\\\",\\n\"\n#~ \"    srcs: [\\\"libbirthday.c\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_bindgen {\\n\"\n#~ \"    name: \\\"libbirthday_bindgen\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_bindgen\\\",\\n\"\n#~ \"    wrapper_src: \\\"libbirthday_wrapper.h\\\",\\n\"\n#~ \"    source_stem: \\\"bindings\\\",\\n\"\n#~ \"    static_libs: [\\\"libbirthday\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_bindgen {\\n\"\n#~ \"    name: \\\"libbirthday_bindgen\\\",\\n\"\n#~ \"    crate_name: \\\"birthday_bindgen\\\",\\n\"\n#~ \"    wrapper_src: \\\"libbirthday_wrapper.h\\\",\\n\"\n#~ \"    source_stem: \\\"bindings\\\",\\n\"\n#~ \"    static_libs: [\\\"libbirthday\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"print_birthday_card\\\",\\n\"\n#~ \"    srcs: [\\\"main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\\"libbirthday_bindgen\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_binary {\\n\"\n#~ \"    name: \\\"print_birthday_card\\\",\\n\"\n#~ \"    srcs: [\\\"main.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\\"libbirthday_bindgen\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"//! Bindgen demo.\\n\"\n#~ \"\\n\"\n#~ \"use birthday_bindgen::{card, print_card};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = std::ffi::CString::new(\\\"Peter\\\").unwrap();\\n\"\n#~ \"    let card = card {\\n\"\n#~ \"        name: name.as_ptr(),\\n\"\n#~ \"        years: 42,\\n\"\n#~ \"    };\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        print_card(&card as *const card);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"//! Bindgen demo.\\n\"\n#~ \"\\n\"\n#~ \"use birthday_bindgen::{card, print_card};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = std::ffi::CString::new(\\\"Peter\\\").unwrap();\\n\"\n#~ \"    let card = card {\\n\"\n#~ \"        name: name.as_ptr(),\\n\"\n#~ \"        years: 42,\\n\"\n#~ \"    };\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        print_card(&card as *const card);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_test {\\n\"\n#~ \"    name: \\\"libbirthday_bindgen_test\\\",\\n\"\n#~ \"    srcs: [\\\":libbirthday_bindgen\\\"],\\n\"\n#~ \"    crate_name: \\\"libbirthday_bindgen_test\\\",\\n\"\n#~ \"    test_suites: [\\\"general-tests\\\"],\\n\"\n#~ \"    auto_gen_config: true,\\n\"\n#~ \"    clippy_lints: \\\"none\\\", // Generated file, skip linting\\n\"\n#~ \"    lints: \\\"none\\\",\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_test {\\n\"\n#~ \"    name: \\\"libbirthday_bindgen_test\\\",\\n\"\n#~ \"    srcs: [\\\":libbirthday_bindgen\\\"],\\n\"\n#~ \"    crate_name: \\\"libbirthday_bindgen_test\\\",\\n\"\n#~ \"    test_suites: [\\\"general-tests\\\"],\\n\"\n#~ \"    auto_gen_config: true,\\n\"\n#~ \"    clippy_lints: \\\"none\\\", // Generated file, skip linting\\n\"\n#~ \"    lints: \\\"none\\\",\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"//! Rust FFI demo.\\n\"\n#~ \"#![deny(improper_ctypes_definitions)]\\n\"\n#~ \"\\n\"\n#~ \"use std::os::raw::c_int;\\n\"\n#~ \"\\n\"\n#~ \"/// Analyze the numbers.\\n\"\n#~ \"#[no_mangle]\\n\"\n#~ \"pub extern \\\"C\\\" fn analyze_numbers(x: c_int, y: c_int) {\\n\"\n#~ \"    if x < y {\\n\"\n#~ \"        println!(\\\"x ({x}) is smallest!\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"y ({y}) is probably larger than x ({x})\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"//! Rust FFI demo.\\n\"\n#~ \"#![deny(improper_ctypes_definitions)]\\n\"\n#~ \"\\n\"\n#~ \"use std::os::raw::c_int;\\n\"\n#~ \"\\n\"\n#~ \"/// Analyze the numbers.\\n\"\n#~ \"#[no_mangle]\\n\"\n#~ \"pub extern \\\"C\\\" fn analyze_numbers(x: c_int, y: c_int) {\\n\"\n#~ \"    if x < y {\\n\"\n#~ \"        println!(\\\"x ({x}) is smallest!\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"y ({y}) is probably larger than x ({x})\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"#ifndef ANALYSE_H\\n\"\n#~ \"#define ANALYSE_H\\n\"\n#~ \"\\n\"\n#~ \"extern \\\"C\\\" {\\n\"\n#~ \"void analyze_numbers(int x, int y);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#endif\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"#ifndef ANALYSE_H\\n\"\n#~ \"#define ANALYSE_H\\n\"\n#~ \"\\n\"\n#~ \"extern \\\"C\\\" {\\n\"\n#~ \"void analyze_numbers(int x, int y);\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#endif\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_ffi {\\n\"\n#~ \"    name: \\\"libanalyze_ffi\\\",\\n\"\n#~ \"    crate_name: \\\"analyze_ffi\\\",\\n\"\n#~ \"    srcs: [\\\"analyze.rs\\\"],\\n\"\n#~ \"    include_dirs: [\\\".\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_ffi {\\n\"\n#~ \"    name: \\\"libanalyze_ffi\\\",\\n\"\n#~ \"    crate_name: \\\"analyze_ffi\\\",\\n\"\n#~ \"    srcs: [\\\"analyze.rs\\\"],\\n\"\n#~ \"    include_dirs: [\\\".\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"#include \\\"analyze.h\\\"\\n\"\n#~ \"\\n\"\n#~ \"int main() {\\n\"\n#~ \"  analyze_numbers(10, 20);\\n\"\n#~ \"  analyze_numbers(123, 123);\\n\"\n#~ \"  return 0;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"#include \\\"analyze.h\\\"\\n\"\n#~ \"\\n\"\n#~ \"int main() {\\n\"\n#~ \"  analyze_numbers(10, 20);\\n\"\n#~ \"  analyze_numbers(123, 123);\\n\"\n#~ \"  return 0;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"cc_binary {\\n\"\n#~ \"    name: \\\"analyze_numbers\\\",\\n\"\n#~ \"    srcs: [\\\"main.c\\\"],\\n\"\n#~ \"    static_libs: [\\\"libanalyze_ffi\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"cc_binary {\\n\"\n#~ \"    name: \\\"analyze_numbers\\\",\\n\"\n#~ \"    srcs: [\\\"main.c\\\"],\\n\"\n#~ \"    static_libs: [\\\"libanalyze_ffi\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"At this point, the instructor should switch to the [CXX tutorial](https://\"\n#~ \"cxx.rs/tutorial.html).\"\n#~ msgstr \"\"\n#~ \"此时，讲师应该该切换到 [CXX tutorial](https://cxx.rs/tutorial.html)。\"\n\n#~ msgid \"Walk the students through the tutorial step by step.\"\n#~ msgstr \"逐步引导学生按照教程一步步操作。\"\n\n#~ msgid \"\"\n#~ \"Highlight how CXX presents a clean interface without unsafe code in _both \"\n#~ \"languages_.\"\n#~ msgstr \"突出展示 CXX 在 _两种语言_ 中都提供了一个没有不安全代码的干净接口。\"\n\n#~ msgid \"\"\n#~ \"Explain how a Rust `String` cannot map to a C++ `std::string` (the latter \"\n#~ \"does not uphold the UTF-8 invariant). Show that despite being different \"\n#~ \"types, `rust::String` in C++ can be easily constructed from a C++ `std::\"\n#~ \"string`, making it very ergonomic to use.\"\n#~ msgstr \"\"\n#~ \"解释 Rust 的 `String` 无法直接映射到 C++ 的 `std::string `（后者不符合\"\n#~ \"UTF-8不变性）。展示尽管类型不同，但在 C++ 中，可以很容易地从 C++ 的 `std::\"\n#~ \"string` 构造 `rust::String` ，使得使用起来非常方便。\"\n\n#~ msgid \"\"\n#~ \"Explain that a Rust function returning `Result<T, E>` becomes a function \"\n#~ \"which throws a `E` exception in C++ (and vice versa).\"\n#~ msgstr \"\"\n#~ \"解释 Rust 中返回 `Result<T, E> ` 的函数在 C++ 中会变成抛出 `E` 异常的函数\"\n#~ \"（反之亦然）。\"\n\n#~ msgid \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"//! Rust <-> Java FFI demo.\\n\"\n#~ \"\\n\"\n#~ \"use jni::objects::{JClass, JString};\\n\"\n#~ \"use jni::sys::jstring;\\n\"\n#~ \"use jni::JNIEnv;\\n\"\n#~ \"\\n\"\n#~ \"/// HelloWorld::hello method implementation.\\n\"\n#~ \"#[no_mangle]\\n\"\n#~ \"pub extern \\\"system\\\" fn Java_HelloWorld_hello(\\n\"\n#~ \"    env: JNIEnv,\\n\"\n#~ \"    _class: JClass,\\n\"\n#~ \"    name: JString,\\n\"\n#~ \") -> jstring {\\n\"\n#~ \"    let input: String = env.get_string(name).unwrap().into();\\n\"\n#~ \"    let greeting = format!(\\\"Hello, {input}!\\\");\\n\"\n#~ \"    let output = env.new_string(greeting).unwrap();\\n\"\n#~ \"    output.into_inner()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,compile_fail\\n\"\n#~ \"//! Rust <-> Java FFI demo.\\n\"\n#~ \"\\n\"\n#~ \"use jni::objects::{JClass, JString};\\n\"\n#~ \"use jni::sys::jstring;\\n\"\n#~ \"use jni::JNIEnv;\\n\"\n#~ \"\\n\"\n#~ \"/// HelloWorld::hello method implementation.\\n\"\n#~ \"#[no_mangle]\\n\"\n#~ \"pub extern \\\"system\\\" fn Java_HelloWorld_hello(\\n\"\n#~ \"    env: JNIEnv,\\n\"\n#~ \"    _class: JClass,\\n\"\n#~ \"    name: JString,\\n\"\n#~ \") -> jstring {\\n\"\n#~ \"    let input: String = env.get_string(name).unwrap().into();\\n\"\n#~ \"    let greeting = format!(\\\"Hello, {input}!\\\");\\n\"\n#~ \"    let output = env.new_string(greeting).unwrap();\\n\"\n#~ \"    output.into_inner()\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_ffi_shared {\\n\"\n#~ \"    name: \\\"libhello_jni\\\",\\n\"\n#~ \"    crate_name: \\\"hello_jni\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\\"libjni\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"rust_ffi_shared {\\n\"\n#~ \"    name: \\\"libhello_jni\\\",\\n\"\n#~ \"    crate_name: \\\"hello_jni\\\",\\n\"\n#~ \"    srcs: [\\\"src/lib.rs\\\"],\\n\"\n#~ \"    rustlibs: [\\\"libjni\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"class HelloWorld {\\n\"\n#~ \"    private static native String hello(String name);\\n\"\n#~ \"\\n\"\n#~ \"    static {\\n\"\n#~ \"        System.loadLibrary(\\\"hello_jni\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    public static void main(String[] args) {\\n\"\n#~ \"        String output = HelloWorld.hello(\\\"Alice\\\");\\n\"\n#~ \"        System.out.println(output);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"class HelloWorld {\\n\"\n#~ \"    private static native String hello(String name);\\n\"\n#~ \"\\n\"\n#~ \"    static {\\n\"\n#~ \"        System.loadLibrary(\\\"hello_jni\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    public static void main(String[] args) {\\n\"\n#~ \"        String output = HelloWorld.hello(\\\"Alice\\\");\\n\"\n#~ \"        System.out.println(output);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```javascript\\n\"\n#~ \"java_binary {\\n\"\n#~ \"    name: \\\"helloworld_jni\\\",\\n\"\n#~ \"    srcs: [\\\"HelloWorld.java\\\"],\\n\"\n#~ \"    main_class: \\\"HelloWorld\\\",\\n\"\n#~ \"    required: [\\\"libhello_jni\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```javascript\\n\"\n#~ \"java_binary {\\n\"\n#~ \"    name: \\\"helloworld_jni\\\",\\n\"\n#~ \"    srcs: [\\\"HelloWorld.java\\\"],\\n\"\n#~ \"    main_class: \\\"HelloWorld\\\",\\n\"\n#~ \"    required: [\\\"libhello_jni\\\"],\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            println!(\\\"Count in thread: {i}!\\\");\\n\"\n#~ \"            thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"        }\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    for i in 1..5 {\\n\"\n#~ \"        println!(\\\"Main thread: {i}\\\");\\n\"\n#~ \"        thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            println!(\\\"Count in thread: {i}!\\\");\\n\"\n#~ \"            thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"        }\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    for i in 1..5 {\\n\"\n#~ \"        println!(\\\"Main thread: {i}\\\");\\n\"\n#~ \"        thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn foo() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    foo();\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::scope(|scope| {\\n\"\n#~ \"        scope.spawn(|| {\\n\"\n#~ \"            println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"        });\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::scope(|scope| {\\n\"\n#~ \"        scope.spawn(|| {\\n\"\n#~ \"            println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"        });\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    tx.send(10).unwrap();\\n\"\n#~ \"    tx.send(20).unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"\\n\"\n#~ \"    let tx2 = tx.clone();\\n\"\n#~ \"    tx2.send(30).unwrap();\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    tx.send(10).unwrap();\\n\"\n#~ \"    tx.send(20).unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"\\n\"\n#~ \"    let tx2 = tx.clone();\\n\"\n#~ \"    tx2.send(30).unwrap();\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::sync_channel(3);\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::sync_channel(3);\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::sync::Arc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(vec![10, 20, 30]);\\n\"\n#~ \"    let mut handles = Vec::new();\\n\"\n#~ \"    for _ in 1..5 {\\n\"\n#~ \"        let v = Arc::clone(&v);\\n\"\n#~ \"        handles.push(thread::spawn(move || {\\n\"\n#~ \"            let thread_id = thread::current().id();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: {v:?}\\\");\\n\"\n#~ \"        }));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handles.into_iter().for_each(|h| h.join().unwrap());\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::sync::Arc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(vec![10, 20, 30]);\\n\"\n#~ \"    let mut handles = Vec::new();\\n\"\n#~ \"    for _ in 1..5 {\\n\"\n#~ \"        let v = Arc::clone(&v);\\n\"\n#~ \"        handles.push(thread::spawn(move || {\\n\"\n#~ \"            let thread_id = thread::current().id();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: {v:?}\\\");\\n\"\n#~ \"        }));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handles.into_iter().for_each(|h| h.join().unwrap());\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::Mutex;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Mutex::new(vec![10, 20, 30]);\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut guard = v.lock().unwrap();\\n\"\n#~ \"        guard.push(40);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::Mutex;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Mutex::new(vec![10, 20, 30]);\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut guard = v.lock().unwrap();\\n\"\n#~ \"        guard.push(40);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"// use std::sync::{Arc, Mutex};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let handle = thread::spawn(|| {\\n\"\n#~ \"        v.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"    v.push(1000);\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"// use std::sync::{Arc, Mutex};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let handle = thread::spawn(|| {\\n\"\n#~ \"        v.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"    v.push(1000);\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::{Arc, Mutex};\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(Mutex::new(vec![10, 20, 30]));\\n\"\n#~ \"\\n\"\n#~ \"    let v2 = Arc::clone(&v);\\n\"\n#~ \"    let handle = thread::spawn(move || {\\n\"\n#~ \"        let mut v2 = v2.lock().unwrap();\\n\"\n#~ \"        v2.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut v = v.lock().unwrap();\\n\"\n#~ \"        v.push(1000);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::{Arc, Mutex};\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(Mutex::new(vec![10, 20, 30]));\\n\"\n#~ \"\\n\"\n#~ \"    let v2 = Arc::clone(&v);\\n\"\n#~ \"    let handle = thread::spawn(move || {\\n\"\n#~ \"        let mut v2 = v2.lock().unwrap();\\n\"\n#~ \"        v2.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut v = v.lock().unwrap();\\n\"\n#~ \"        v.push(1000);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#, fuzzy\n#~ msgid \"concurrency:\"\n#~ msgstr \"并发\"\n\n#, fuzzy\n#~ msgid \"constant:\"\n#~ msgstr \"`const`\"\n\n#, fuzzy\n#~ msgid \"enumeration:\"\n#~ msgstr \"实现\"\n\n#, fuzzy\n#~ msgid \"error handling:\"\n#~ msgstr \"错误处理\"\n\n#, fuzzy\n#~ msgid \"garbage collector:\"\n#~ msgstr \"垃圾回收\"\n\n#, fuzzy\n#~ msgid \"generics:\"\n#~ msgstr \"泛型\"\n\n#, fuzzy\n#~ msgid \"integration test:\"\n#~ msgstr \"集成测试\"\n\n#, fuzzy\n#~ msgid \"main function:\"\n#~ msgstr \"调用 Unsafe 函数\"\n\n#, fuzzy\n#~ msgid \"memory leak:\"\n#~ msgstr \"内存泄漏。\"\n\n#, fuzzy\n#~ msgid \"method:\"\n#~ msgstr \"方法\"\n\n#, fuzzy\n#~ msgid \"module:\"\n#~ msgstr \"模块\"\n\n#~ msgid \"mutable:\"\n#~ msgstr \"可变：\"\n\n#, fuzzy\n#~ msgid \"ownership:\"\n#~ msgstr \"所有权\"\n\n#, fuzzy\n#~ msgid \"panic:\"\n#~ msgstr \"Panics\"\n\n#, fuzzy\n#~ msgid \"receiver:\"\n#~ msgstr \"驱动程序\"\n\n#, fuzzy\n#~ msgid \"reference counting:\"\n#~ msgstr \"解引用原始指针。\"\n\n#, fuzzy\n#~ msgid \"standard library:\"\n#~ msgstr \"标准库\"\n\n#, fuzzy\n#~ msgid \"static:\"\n#~ msgstr \"`static`\"\n\n#, fuzzy\n#~ msgid \"struct:\"\n#~ msgstr \"结构体\"\n\n#, fuzzy\n#~ msgid \"thread:\"\n#~ msgstr \"线程\"\n\n#, fuzzy\n#~ msgid \"thread safety:\"\n#~ msgstr \"线程\"\n\n#, fuzzy\n#~ msgid \"trait:\"\n#~ msgstr \"特征\"\n\n#, fuzzy\n#~ msgid \"union:\"\n#~ msgstr \"联合体\"\n\n#, fuzzy\n#~ msgid \"unit test:\"\n#~ msgstr \"单元测试\"\n\n#, fuzzy\n#~ msgid \"variable:\\\\\"\n#~ msgstr \"变量\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"您将在下面的页面找到练习的解答。\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"欢迎您在 [GitHub](https://github.com/google/comprehensive-rust/\"\n#~ \"discussions) 上提问关于解决方案的问题。如果您有与此处呈现的不同或更好的解\"\n#~ \"决方案，请告诉我们。\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"第一天上午的练习\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([返回练习](for-loops.md))\"\n\n#~ msgid \"Bonus question\"\n#~ msgstr \"附加问题\"\n\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"这需要更高级的概念。看起来，我们可以使用切片的切片（`&[&[i32]]`）作为输入\"\n#~ \"类型来进行转置，从而使我们的函数能够处理任意大小的矩阵。然而，这很快就会崩\"\n#~ \"溃：返回类型不能是 `&[&[i32]]`，因为它需要拥有您返回的数据。\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"您可以尝试使用类似 `Vec<Vec<i32>>` 的方式，但这也无法直接工作：从 \"\n#~ \"`Vec<Vec<i32>>` 转换为 `&[&[i32]]` 很困难，因此您现在也不能轻松使用 \"\n#~ \"`pretty_print`。\"\n\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"了解 trait 和泛型后，我们就可以使用[“std::convert::AsRef”](https://doc.\"\n#~ \"rust-lang.org/std/convert/trait.AsRef.html)trait 来抽象化任何可作为 Slice \"\n#~ \"引用的内容了。\"\n\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"此外，类型本身不会强制要求子切片具有相同的长度，因此这样的变量可能包含一个\"\n#~ \"无效的矩阵。\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"第一天下午的练习\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([返回练习](luhn.md))\"\n\n#, fuzzy\n#~ msgid \"Pattern matching\"\n#~ msgstr \"模式匹配\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"第二天上午的练习\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"设计一个库\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([返回练习](book-library.md))\"\n\n#, fuzzy\n#~ msgid \"([back to exercise](health-statistics.md))\"\n#~ msgstr \"([返回练习](rtc.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([返回练习](strings-iterators.md))\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"第三天上午的练习\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([返回练习](simple-gui.md))\"\n\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([返回练习](points-polygons.md))\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"第三天下午的练习\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([返回练习](safe-ffi-wrapper.md))\"\n\n#, fuzzy\n#~ msgid \"Why Rust?\"\n#~ msgstr \"异步 Rust\"\n\n#, fuzzy\n#~ msgid \"Novel Control Flow\"\n#~ msgstr \"Furture 控制流\"\n\n#, fuzzy\n#~ msgid \"async/await\"\n#~ msgstr \"关于 async/await 的误区\"\n\n#, fuzzy\n#~ msgid \"control flow:\"\n#~ msgstr \"Furture 控制流\"\n\n#~ msgid \"\\\"127.0.0.1:6142\\\"\"\n#~ msgstr \"\\\"127.0.0.1:6142\\\"\"\n"
  },
  {
    "path": "po/zh-TW.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Comprehensive Rust 🦀\\n\"\n\"POT-Creation-Date: 2024-03-06T16:11:58-08:00\\n\"\n\"PO-Revision-Date: 2023-10-09 19:59-0700\\n\"\n\"Last-Translator: \\n\"\n\"Language-Team: \\n\"\n\"Language: zh_TW\\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\"X-Generator: Poedit 3.4\\n\"\n\n#: src/SUMMARY.md src/index.md\nmsgid \"Welcome to Comprehensive Rust 🦀\"\nmsgstr \"歡迎參加 Comprehensive Rust 🦀 課程\"\n\n#: src/SUMMARY.md src/running-the-course.md\nmsgid \"Running the Course\"\nmsgstr \"講授課程\"\n\n#: src/SUMMARY.md src/running-the-course/course-structure.md\nmsgid \"Course Structure\"\nmsgstr \"課程架構\"\n\n#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md\nmsgid \"Keyboard Shortcuts\"\nmsgstr \"鍵盤快速鍵\"\n\n#: src/SUMMARY.md src/running-the-course/translations.md\nmsgid \"Translations\"\nmsgstr \"翻譯\"\n\n#: src/SUMMARY.md src/cargo.md\nmsgid \"Using Cargo\"\nmsgstr \"使用 Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Ecosystem\"\nmsgstr \"Rust 生態系統\"\n\n#: src/SUMMARY.md\nmsgid \"Code Samples\"\nmsgstr \"程式碼範例\"\n\n#: src/SUMMARY.md\nmsgid \"Running Cargo Locally\"\nmsgstr \"在本機執行 Cargo\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Morning\"\nmsgstr \"第 1 天：上午\"\n\n#: src/SUMMARY.md\nmsgid \"Welcome\"\nmsgstr \"歡迎\"\n\n#: src/SUMMARY.md src/hello-world.md src/types-and-values/hello-world.md\nmsgid \"Hello, World\"\nmsgstr \"Hello, World\"\n\n#: src/SUMMARY.md src/hello-world/what-is-rust.md\nmsgid \"What is Rust?\"\nmsgstr \"什麼是 Rust？\"\n\n#: src/SUMMARY.md src/hello-world/benefits.md\nmsgid \"Benefits of Rust\"\nmsgstr \"Rust 的優點\"\n\n#: src/SUMMARY.md src/hello-world/playground.md\nmsgid \"Playground\"\nmsgstr \"Playground\"\n\n#: src/SUMMARY.md src/types-and-values.md\nmsgid \"Types and Values\"\nmsgstr \"型別和值\"\n\n#: src/SUMMARY.md src/types-and-values/variables.md\nmsgid \"Variables\"\nmsgstr \"變數\"\n\n#: src/SUMMARY.md src/types-and-values/values.md\nmsgid \"Values\"\nmsgstr \"值\"\n\n#: src/SUMMARY.md src/types-and-values/arithmetic.md\nmsgid \"Arithmetic\"\nmsgstr \"算術\"\n\n#: src/SUMMARY.md src/types-and-values/strings.md\nmsgid \"Strings\"\nmsgstr \"字串 (String)\"\n\n#: src/SUMMARY.md src/types-and-values/inference.md\nmsgid \"Type Inference\"\nmsgstr \"型別推斷\"\n\n#: src/SUMMARY.md src/types-and-values/exercise.md\nmsgid \"Exercise: Fibonacci\"\nmsgstr \"練習：費波那契數列\"\n\n#: src/SUMMARY.md src/types-and-values/solution.md\n#: src/control-flow-basics/solution.md src/tuples-and-arrays/solution.md\n#: src/references/solution.md src/user-defined-types/solution.md\n#: src/pattern-matching/solution.md src/methods-and-traits/solution.md\n#: src/generics/solution.md src/std-types/solution.md\n#: src/std-traits/solution.md src/memory-management/solution.md\n#: src/smart-pointers/solution.md src/borrowing/solution.md\n#: src/slices-and-lifetimes/solution.md src/iterators/solution.md\n#: src/modules/solution.md src/testing/solution.md\n#: src/error-handling/solution.md src/unsafe-rust/solution.md\nmsgid \"Solution\"\nmsgstr \"解決方案\"\n\n#: src/SUMMARY.md src/control-flow-basics.md\nmsgid \"Control Flow Basics\"\nmsgstr \"基本的控制流程概念\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`if` Expressions\"\nmsgstr \"`if` 表達式\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops.md\n#, fuzzy\nmsgid \"Loops\"\nmsgstr \"`for` 迴圈\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/for.md\nmsgid \"`for`\"\nmsgstr \"`for`\"\n\n#: src/SUMMARY.md src/control-flow-basics/loops/loop.md\nmsgid \"`loop`\"\nmsgstr \"`loop` 迴圈\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue.md\nmsgid \"`break` and `continue`\"\nmsgstr \"`break` 和 `continue`\"\n\n#: src/SUMMARY.md src/control-flow-basics/break-continue/labels.md\nmsgid \"Labels\"\nmsgstr \"標籤\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks and Scopes\"\nmsgstr \"區塊 (block) 和範疇 (scope)\"\n\n#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"Scopes and Shadowing\"\nmsgstr \"範圍和遮蔽\"\n\n#: src/SUMMARY.md src/control-flow-basics/functions.md\nmsgid \"Functions\"\nmsgstr \"函式\"\n\n#: src/SUMMARY.md src/control-flow-basics/macros.md\nmsgid \"Macros\"\nmsgstr \"巨集\"\n\n#: src/SUMMARY.md src/control-flow-basics/exercise.md\nmsgid \"Exercise: Collatz Sequence\"\nmsgstr \"練習：考拉茲序列\"\n\n#: src/SUMMARY.md\nmsgid \"Day 1: Afternoon\"\nmsgstr \"第 1 天：下午\"\n\n#: src/SUMMARY.md src/tuples-and-arrays.md\nmsgid \"Tuples and Arrays\"\nmsgstr \"元組和陣列\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/arrays.md\nmsgid \"Arrays\"\nmsgstr \"陣列\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/tuples.md\nmsgid \"Tuples\"\nmsgstr \"元組\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/iteration.md\n#, fuzzy\nmsgid \"Array Iteration\"\nmsgstr \"疊代器\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md\n#, fuzzy\nmsgid \"Patterns and Destructuring\"\nmsgstr \"模式配對\"\n\n#: src/SUMMARY.md src/tuples-and-arrays/exercise.md\nmsgid \"Exercise: Nested Arrays\"\nmsgstr \"練習：巢狀陣列\"\n\n#: src/SUMMARY.md src/references.md\nmsgid \"References\"\nmsgstr \"參照\"\n\n#: src/SUMMARY.md src/references/shared.md\n#, fuzzy\nmsgid \"Shared References\"\nmsgstr \"共用列舉\"\n\n#: src/SUMMARY.md src/references/exclusive.md\n#, fuzzy\nmsgid \"Exclusive References\"\nmsgstr \"迷途參照\"\n\n#: src/SUMMARY.md src/references/exercise.md\nmsgid \"Exercise: Geometry\"\nmsgstr \"練習：幾何圖形\"\n\n#: src/SUMMARY.md src/user-defined-types.md\nmsgid \"User-Defined Types\"\nmsgstr \"使用者定義的型別\"\n\n#: src/SUMMARY.md src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"Named Structs\"\nmsgstr \"結構體\"\n\n#: src/SUMMARY.md src/user-defined-types/tuple-structs.md\nmsgid \"Tuple Structs\"\nmsgstr \"元組結構體\"\n\n#: src/SUMMARY.md src/user-defined-types/enums.md\n#: src/pattern-matching/destructuring.md\nmsgid \"Enums\"\nmsgstr \"列舉\"\n\n#: src/SUMMARY.md src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Static and Const\"\nmsgstr \"靜態和常數\"\n\n#: src/SUMMARY.md src/user-defined-types/aliases.md\nmsgid \"Type Aliases\"\nmsgstr \"型別別名\"\n\n#: src/SUMMARY.md src/user-defined-types/exercise.md\nmsgid \"Exercise: Elevator Events\"\nmsgstr \"練習：電梯事件\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Morning\"\nmsgstr \"第 2 天：上午\"\n\n#: src/SUMMARY.md src/pattern-matching.md\nmsgid \"Pattern Matching\"\nmsgstr \"模式配對\"\n\n#: src/SUMMARY.md src/pattern-matching/match.md\nmsgid \"Matching Values\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"Destructuring\"\nmsgstr \"解構列舉\"\n\n#: src/SUMMARY.md src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"Let Control Flow\"\nmsgstr \"控制流程\"\n\n#: src/SUMMARY.md src/pattern-matching/exercise.md\nmsgid \"Exercise: Expression Evaluation\"\nmsgstr \"練習：運算式求值\"\n\n#: src/SUMMARY.md src/methods-and-traits.md\n#, fuzzy\nmsgid \"Methods and Traits\"\nmsgstr \"Read 和 Write\"\n\n#: src/SUMMARY.md src/methods-and-traits/methods.md\nmsgid \"Methods\"\nmsgstr \"方法\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits.md\nmsgid \"Traits\"\nmsgstr \"特徵\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Implmementing Traits\"\nmsgstr \"實作不安全的特徵\"\n\n#: src/SUMMARY.md src/methods-and-traits/traits/associated-types.md\nmsgid \"Associated Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/methods-and-traits/deriving.md\n#, fuzzy\nmsgid \"Deriving\"\nmsgstr \"衍生特徵\"\n\n#: src/SUMMARY.md src/methods-and-traits/exercise.md\nmsgid \"Exercise: Generic Logger\"\nmsgstr \"練習：泛型 Logger\"\n\n#: src/SUMMARY.md src/generics.md\nmsgid \"Generics\"\nmsgstr \"泛型\"\n\n#: src/SUMMARY.md src/generics/generic-functions.md\n#, fuzzy\nmsgid \"Generic Functions\"\nmsgstr \"Extern 函式\"\n\n#: src/SUMMARY.md src/generics/generic-data.md\nmsgid \"Generic Data Types\"\nmsgstr \"泛型資料型別\"\n\n#: src/SUMMARY.md src/generics/trait-bounds.md\nmsgid \"Trait Bounds\"\nmsgstr \"特徵界限\"\n\n#: src/SUMMARY.md src/generics/impl-trait.md\nmsgid \"`impl Trait`\"\nmsgstr \"`impl Trait`\"\n\n#: src/SUMMARY.md src/generics/exercise.md\nmsgid \"Exercise: Generic `min`\"\nmsgstr \"練習：泛型 `min`\"\n\n#: src/SUMMARY.md\nmsgid \"Day 2: Afternoon\"\nmsgstr \"第 2 天：下午\"\n\n#: src/SUMMARY.md src/std-types.md\n#, fuzzy\nmsgid \"Standard Library Types\"\nmsgstr \"標準函式庫\"\n\n#: src/SUMMARY.md src/std-types/std.md\nmsgid \"Standard Library\"\nmsgstr \"標準函式庫\"\n\n#: src/SUMMARY.md src/std-types/docs.md\n#, fuzzy\nmsgid \"Documentation\"\nmsgstr \"說明文件測試\"\n\n#: src/SUMMARY.md\nmsgid \"`Option`\"\nmsgstr \"`Option`\"\n\n#: src/SUMMARY.md\nmsgid \"`Result`\"\nmsgstr \"`Result`\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`String`\"\nmsgstr \"`String`\"\n\n#: src/SUMMARY.md src/std-types/vec.md\nmsgid \"`Vec`\"\nmsgstr \"`Vec`\"\n\n#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md\nmsgid \"`HashMap`\"\nmsgstr \"`HashMap`\"\n\n#: src/SUMMARY.md src/std-types/exercise.md\nmsgid \"Exercise: Counter\"\nmsgstr \"練習：計數器\"\n\n#: src/SUMMARY.md src/std-traits.md\n#, fuzzy\nmsgid \"Standard Library Traits\"\nmsgstr \"標準函式庫\"\n\n#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md\nmsgid \"Comparisons\"\nmsgstr \"比較\"\n\n#: src/SUMMARY.md src/std-traits/operators.md\n#, fuzzy\nmsgid \"Operators\"\nmsgstr \"疊代器\"\n\n#: src/SUMMARY.md src/std-traits/from-and-into.md\nmsgid \"`From` and `Into`\"\nmsgstr \"`From` 和 `Into`\"\n\n#: src/SUMMARY.md src/std-traits/casting.md\n#, fuzzy\nmsgid \"Casting\"\nmsgstr \"測試\"\n\n#: src/SUMMARY.md src/std-traits/read-and-write.md\nmsgid \"`Read` and `Write`\"\nmsgstr \"`Read` 和 `Write`\"\n\n#: src/SUMMARY.md\nmsgid \"`Default`, struct update syntax\"\nmsgstr \"`Default` (結構體更新語法)\"\n\n#: src/SUMMARY.md src/std-traits/closures.md\nmsgid \"Closures\"\nmsgstr \"閉包\"\n\n#: src/SUMMARY.md src/std-traits/exercise.md\nmsgid \"Exercise: ROT13\"\nmsgstr \"練習：ROT13 (迴轉13位)\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Morning\"\nmsgstr \"第 3 天：上午\"\n\n#: src/SUMMARY.md src/memory-management.md\nmsgid \"Memory Management\"\nmsgstr \"記憶體管理\"\n\n#: src/SUMMARY.md src/memory-management/review.md\nmsgid \"Review of Program Memory\"\nmsgstr \"檢查程式記憶體\"\n\n#: src/SUMMARY.md src/memory-management/approaches.md\n#, fuzzy\nmsgid \"Approaches to Memory Management\"\nmsgstr \"自動記憶體管理\"\n\n#: src/SUMMARY.md src/memory-management/ownership.md\nmsgid \"Ownership\"\nmsgstr \"所有權\"\n\n#: src/SUMMARY.md src/memory-management/move.md\nmsgid \"Move Semantics\"\nmsgstr \"移動語意\"\n\n#: src/SUMMARY.md\nmsgid \"`Clone`\"\nmsgstr \"`Clone`\"\n\n#: src/SUMMARY.md src/memory-management/copy-types.md\nmsgid \"Copy Types\"\nmsgstr \"Copy 型別\"\n\n#: src/SUMMARY.md\nmsgid \"`Drop`\"\nmsgstr \"`Drop`\"\n\n#: src/SUMMARY.md src/memory-management/exercise.md\nmsgid \"Exercise: Builder Type\"\nmsgstr \"練習：建構工具型別\"\n\n#: src/SUMMARY.md src/smart-pointers.md\nmsgid \"Smart Pointers\"\nmsgstr \"智慧指標\"\n\n#: src/SUMMARY.md src/smart-pointers/box.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Box<T>`\"\nmsgstr \"`Box<T>`\"\n\n#: src/SUMMARY.md src/smart-pointers/rc.md\nmsgid \"`Rc`\"\nmsgstr \"`Rc`\"\n\n#: src/SUMMARY.md src/smart-pointers/trait-objects.md\nmsgid \"Trait Objects\"\nmsgstr \"特徵物件\"\n\n#: src/SUMMARY.md src/smart-pointers/exercise.md\nmsgid \"Exercise: Binary Tree\"\nmsgstr \"練習：二元樹\"\n\n#: src/SUMMARY.md\nmsgid \"Day 3: Afternoon\"\nmsgstr \"第 3 天：下午\"\n\n#: src/SUMMARY.md src/borrowing.md\nmsgid \"Borrowing\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md src/borrowing/shared.md\n#, fuzzy\nmsgid \"Borrowing a Value\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"Borrow Checking\"\nmsgstr \"借用\"\n\n#: src/SUMMARY.md src/borrowing/interior-mutability.md\nmsgid \"Interior Mutability\"\nmsgstr \"內部可變性 (Interior Mutability)\"\n\n#: src/SUMMARY.md src/borrowing/exercise.md\nmsgid \"Exercise: Health Statistics\"\nmsgstr \"練習：衛生統計資料\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes.md\n#, fuzzy\nmsgid \"Slices and Lifetimes\"\nmsgstr \"生命週期\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Slices: `&[T]`\"\nmsgstr \"切片\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"String References\"\nmsgstr \"迷途參照\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"Lifetime Annotations\"\nmsgstr \"函式呼叫中的生命週期\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Lifetime Elision\"\nmsgstr \"生命週期\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Struct Lifetimes\"\nmsgstr \"生命週期\"\n\n#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md\nmsgid \"Exercise: Protobuf Parsing\"\nmsgstr \"練習：Protobuf 剖析\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Morning\"\nmsgstr \"第 4 天：上午\"\n\n#: src/SUMMARY.md src/iterators.md\nmsgid \"Iterators\"\nmsgstr \"疊代器\"\n\n#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md\nmsgid \"`Iterator`\"\nmsgstr \"`Iterator`\"\n\n#: src/SUMMARY.md src/iterators/intoiterator.md\nmsgid \"`IntoIterator`\"\nmsgstr \"`IntoIterator`\"\n\n#: src/SUMMARY.md\nmsgid \"`FromIterator`\"\nmsgstr \"`FromIterator`\"\n\n#: src/SUMMARY.md src/iterators/exercise.md\nmsgid \"Exercise: Iterator Method Chaining\"\nmsgstr \"練習：疊代器方法鏈結\"\n\n#: src/SUMMARY.md src/modules.md src/modules/modules.md\nmsgid \"Modules\"\nmsgstr \"模組\"\n\n#: src/SUMMARY.md src/modules/filesystem.md\nmsgid \"Filesystem Hierarchy\"\nmsgstr \"檔案系統階層\"\n\n#: src/SUMMARY.md src/modules/visibility.md\nmsgid \"Visibility\"\nmsgstr \"能見度\"\n\n#: src/SUMMARY.md\nmsgid \"`use`, `super`, `self`\"\nmsgstr \"`use`、`super`、`self`\"\n\n#: src/SUMMARY.md src/modules/exercise.md\nmsgid \"Exercise: Modules for a GUI Library\"\nmsgstr \"練習：GUI 程式庫的模組\"\n\n#: src/SUMMARY.md src/testing.md src/chromium/testing.md\nmsgid \"Testing\"\nmsgstr \"測試\"\n\n#: src/SUMMARY.md\nmsgid \"Test Modules\"\nmsgstr \"測試模組\"\n\n#: src/SUMMARY.md src/testing/other.md\n#, fuzzy\nmsgid \"Other Types of Tests\"\nmsgstr \"其他資源\"\n\n#: src/SUMMARY.md src/testing/lints.md\nmsgid \"Compiler Lints and Clippy\"\nmsgstr \"編譯器檢查 (Lint) 和 Clippy \"\n\n#: src/SUMMARY.md src/testing/exercise.md\n#, fuzzy\nmsgid \"Exercise: Luhn Algorithm\"\nmsgstr \"盧恩演算法\"\n\n#: src/SUMMARY.md\nmsgid \"Day 4: Afternoon\"\nmsgstr \"第 4 天：下午\"\n\n#: src/SUMMARY.md src/error-handling.md\nmsgid \"Error Handling\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md src/error-handling/panics.md\nmsgid \"Panics\"\nmsgstr \"恐慌\"\n\n#: src/SUMMARY.md src/error-handling/try.md\n#, fuzzy\nmsgid \"Try Operator\"\nmsgstr \"疊代器\"\n\n#: src/SUMMARY.md src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"Try Conversions\"\nmsgstr \"隱含轉換\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"`Error` Trait\"\nmsgstr \"`Drop` 特徵\"\n\n#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"`thiserror` and `anyhow`\"\nmsgstr \"`From` 和 `Into`\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: Rewriting with `Result`\"\nmsgstr \"使用 `Result` 進行結構化錯誤處理\"\n\n#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust\"\nmsgstr \"不安全的 Rust\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe\"\nmsgstr \"不安全的 Rust\"\n\n#: src/SUMMARY.md src/unsafe-rust/dereferencing.md\nmsgid \"Dereferencing Raw Pointers\"\nmsgstr \"對裸指標解參考\"\n\n#: src/SUMMARY.md src/unsafe-rust/mutable-static.md\nmsgid \"Mutable Static Variables\"\nmsgstr \"可變的靜態變數\"\n\n#: src/SUMMARY.md src/unsafe-rust/unions.md\nmsgid \"Unions\"\nmsgstr \"聯合體\"\n\n#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"Unsafe Functions\"\nmsgstr \"呼叫不安全的函式\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Traits\"\nmsgstr \"實作不安全的特徵\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Exercise: FFI Wrapper\"\nmsgstr \"練習：封裝外部函式介面 (FFI)\"\n\n#: src/SUMMARY.md src/bare-metal/android.md\nmsgid \"Android\"\nmsgstr \"Android\"\n\n#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md\nmsgid \"Setup\"\nmsgstr \"設定\"\n\n#: src/SUMMARY.md src/android/build-rules.md\nmsgid \"Build Rules\"\nmsgstr \"建構規則\"\n\n#: src/SUMMARY.md\nmsgid \"Binary\"\nmsgstr \"二進位檔\"\n\n#: src/SUMMARY.md\nmsgid \"Library\"\nmsgstr \"函式庫\"\n\n#: src/SUMMARY.md src/android/aidl.md\nmsgid \"AIDL\"\nmsgstr \"AIDL\"\n\n#: src/SUMMARY.md src/android/aidl/birthday-service.md\nmsgid \"Birthday Service Tutorial\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\nmsgid \"Interface\"\nmsgstr \"介面\"\n\n#: src/SUMMARY.md\nmsgid \"Service API\"\nmsgstr \"\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Service\"\nmsgstr \"伺服器\"\n\n#: src/SUMMARY.md\nmsgid \"Server\"\nmsgstr \"伺服器\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/deploy.md\nmsgid \"Deploy\"\nmsgstr \"部署\"\n\n#: src/SUMMARY.md\nmsgid \"Client\"\nmsgstr \"用戶端\"\n\n#: src/SUMMARY.md src/android/aidl/example-service/changing-definition.md\nmsgid \"Changing API\"\nmsgstr \"改寫 API\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Updating Implementations\"\nmsgstr \"實作\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"AIDL Types\"\nmsgstr \"類型\"\n\n#: src/SUMMARY.md src/android/aidl/types/primitives.md\nmsgid \"Primitive Types\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Array Types\"\nmsgstr \"陣列\"\n\n#: src/SUMMARY.md src/android/aidl/types/objects.md\n#, fuzzy\nmsgid \"Sending Objects\"\nmsgstr \"特徵物件\"\n\n#: src/SUMMARY.md src/android/aidl/types/parcelables.md\n#, fuzzy\nmsgid \"Parcelables\"\nmsgstr \"變數\"\n\n#: src/SUMMARY.md src/android/aidl/types/file-descriptor.md\nmsgid \"Sending Files\"\nmsgstr \"\"\n\n#: src/SUMMARY.md src/android/testing/googletest.md\nmsgid \"GoogleTest\"\nmsgstr \"GoogleTest\"\n\n#: src/SUMMARY.md src/android/testing/mocking.md\nmsgid \"Mocking\"\nmsgstr \"模擬 (Mocking)\"\n\n#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md\nmsgid \"Logging\"\nmsgstr \"記錄\"\n\n#: src/SUMMARY.md src/android/interoperability.md\nmsgid \"Interoperability\"\nmsgstr \"互通性\"\n\n#: src/SUMMARY.md\nmsgid \"With C\"\nmsgstr \"與 C 的互通性\"\n\n#: src/SUMMARY.md\nmsgid \"Calling C with Bindgen\"\nmsgstr \"使用 Bindgen 呼叫 C\"\n\n#: src/SUMMARY.md\nmsgid \"Calling Rust from C\"\nmsgstr \"從 C 呼叫 Rust\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp.md\nmsgid \"With C++\"\nmsgstr \"與 C++ 的互通性\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md\n#, fuzzy\nmsgid \"The Bridge Module\"\nmsgstr \"測試模組\"\n\n#: src/SUMMARY.md\nmsgid \"Rust Bridge\"\nmsgstr \"Rust 橋接器\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Generated C++\"\nmsgstr \"產生的 C++\"\n\n#: src/SUMMARY.md\nmsgid \"C++ Bridge\"\nmsgstr \"C++ 橋接器\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md\n#, fuzzy\nmsgid \"Shared Types\"\nmsgstr \"共用型別\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md\nmsgid \"Shared Enums\"\nmsgstr \"共用列舉\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md\n#, fuzzy\nmsgid \"Rust Error Handling\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md\n#, fuzzy\nmsgid \"C++ Error Handling\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md\nmsgid \"Additional Types\"\nmsgstr \"其他型別\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: C++\"\nmsgstr \"針對 Android 建構：C++\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Genrules\"\nmsgstr \"針對 Android 建構：Genrules\"\n\n#: src/SUMMARY.md\nmsgid \"Building for Android: Rust\"\nmsgstr \"針對 Android 建構：Rust\"\n\n#: src/SUMMARY.md\nmsgid \"With Java\"\nmsgstr \"與 Java 的互通性\"\n\n#: src/SUMMARY.md src/exercises/android/morning.md\n#: src/exercises/bare-metal/morning.md src/exercises/bare-metal/afternoon.md\n#: src/exercises/concurrency/morning.md src/exercises/concurrency/afternoon.md\nmsgid \"Exercises\"\nmsgstr \"練習\"\n\n#: src/SUMMARY.md\nmsgid \"Chromium\"\nmsgstr \"Chromium\"\n\n#: src/SUMMARY.md src/chromium/cargo.md\nmsgid \"Comparing Chromium and Cargo Ecosystems\"\nmsgstr \"比較 Chromium 和 Cargo 的生態系統\"\n\n#: src/SUMMARY.md\nmsgid \"Policy\"\nmsgstr \"政策\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Unsafe Code\"\nmsgstr \"不安全的 Rust\"\n\n#: src/SUMMARY.md src/chromium/build-rules/depending.md\nmsgid \"Depending on Rust Code from Chromium C++\"\nmsgstr \"在 Chromium C++ 中使用 Rust 程式碼\"\n\n#: src/SUMMARY.md src/chromium/build-rules/vscode.md\nmsgid \"Visual Studio Code\"\nmsgstr \"Visual Studio Code\"\n\n#: src/SUMMARY.md src/exercises/chromium/third-party.md\nmsgid \"Exercise\"\nmsgstr \"練習\"\n\n#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md\nmsgid \"`rust_gtest_interop` Library\"\nmsgstr \"`rust_gtest_interop` 程式庫\"\n\n#: src/SUMMARY.md src/chromium/testing/build-gn.md\nmsgid \"GN Rules for Rust Tests\"\nmsgstr \"Rust 測試適用的 GN 規則\"\n\n#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md\nmsgid \"`chromium::import!` Macro\"\nmsgstr \"`chromium::import!` 巨集\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md\n#, fuzzy\nmsgid \"Interoperability with C++\"\nmsgstr \"互通性\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md\n#, fuzzy\nmsgid \"Example Bindings\"\nmsgstr \"範例\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Limitations of CXX\"\nmsgstr \"CXX 的限制\"\n\n#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md\n#, fuzzy\nmsgid \"CXX Error Handling\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: QR Example\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md\n#, fuzzy\nmsgid \"Error Handling: PNG Example\"\nmsgstr \"錯誤處理\"\n\n#: src/SUMMARY.md\nmsgid \"Using CXX in Chromium\"\nmsgstr \"在 Chromium 中使用 CXX\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates.md\nmsgid \"Adding Third Party Crates\"\nmsgstr \"新增第三方 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Configuring Cargo.toml\"\nmsgstr \"設定 Cargo.toml\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"Configuring `gnrt_config.toml`\"\nmsgstr \"設定 `gnrt_config.toml`\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Downloading Crates\"\nmsgstr \"下載 Crate\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Generating `gn` Build Rules\"\nmsgstr \"產生 `gn` 建構規則\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Resolving Problems\"\nmsgstr \"解決問題\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"Build Scripts Which Generate Code\"\nmsgstr \"建構用於產生程式碼的指令碼\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Build Scripts Which Build C++ or Take Arbitrary Actions\"\nmsgstr \"建構用於建立 C++ 或執行任意動作的指令碼\"\n\n#: src/SUMMARY.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"Depending on a Crate\"\nmsgstr \"使用 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"Reviews and Audits\"\nmsgstr \"程式庫審查和稽核\"\n\n#: src/SUMMARY.md\nmsgid \"Checking into Chromium Source Code\"\nmsgstr \"提交為 Chromium 原始碼\"\n\n#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"Keeping Crates Up to Date\"\nmsgstr \"保持 Crate 為最新版本\"\n\n#: src/SUMMARY.md\nmsgid \"Bringing It Together - Exercise\"\nmsgstr \"融會貫通 - 練習題\"\n\n#: src/SUMMARY.md src/exercises/chromium/solutions.md\n#, fuzzy\nmsgid \"Exercise Solutions\"\nmsgstr \"練習題的參考答案\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Morning\"\nmsgstr \"裸機開發：上午\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md\nmsgid \"`no_std`\"\nmsgstr \"`no_std`\"\n\n#: src/SUMMARY.md\nmsgid \"A Minimal Example\"\nmsgstr \"最小限度的範例\"\n\n#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md\nmsgid \"`alloc`\"\nmsgstr \"`alloc`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers.md\nmsgid \"Microcontrollers\"\nmsgstr \"微控制器\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md\nmsgid \"Raw MMIO\"\nmsgstr \"原始 MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"PACs\"\nmsgstr \"PAC\"\n\n#: src/SUMMARY.md\nmsgid \"HAL Crates\"\nmsgstr \"HAL Crates\"\n\n#: src/SUMMARY.md\nmsgid \"Board Support Crates\"\nmsgstr \"開發板支援 Crate\"\n\n#: src/SUMMARY.md\nmsgid \"The Type State Pattern\"\nmsgstr \"型別狀態模式\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"`embedded-hal`\"\nmsgstr \"`embedded-hal`\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md\n#, fuzzy\nmsgid \"`probe-rs` and `cargo-embed`\"\nmsgstr \"probe-rs、cargo-embed\"\n\n#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"Debugging\"\nmsgstr \"偵錯\"\n\n#: src/SUMMARY.md\nmsgid \"Other Projects\"\nmsgstr \"其他專案\"\n\n#: src/SUMMARY.md src/exercises/bare-metal/compass.md\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Compass\"\nmsgstr \"指南針\"\n\n#: src/SUMMARY.md\nmsgid \"Solutions\"\nmsgstr \"解決方案\"\n\n#: src/SUMMARY.md\nmsgid \"Bare Metal: Afternoon\"\nmsgstr \"裸機開發：下午\"\n\n#: src/SUMMARY.md\nmsgid \"Application Processors\"\nmsgstr \"應用程式處理器\"\n\n#: src/SUMMARY.md src/bare-metal/aps/entry-point.md\nmsgid \"Getting Ready to Rust\"\nmsgstr \"準備使用 Rust\"\n\n#: src/SUMMARY.md\nmsgid \"Inline Assembly\"\nmsgstr \"行內組語\"\n\n#: src/SUMMARY.md\nmsgid \"MMIO\"\nmsgstr \"MMIO\"\n\n#: src/SUMMARY.md\nmsgid \"Let's Write a UART Driver\"\nmsgstr \"編寫 UART 驅動程式\"\n\n#: src/SUMMARY.md\nmsgid \"More Traits\"\nmsgstr \"其他特徵\"\n\n#: src/SUMMARY.md\nmsgid \"A Better UART Driver\"\nmsgstr \"經改良的 UART 驅動程式\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"Bitflags\"\nmsgstr \"Bitflags\"\n\n#: src/SUMMARY.md\nmsgid \"Multiple Registers\"\nmsgstr \"多個暫存器\"\n\n#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"Driver\"\nmsgstr \"驅動程式\"\n\n#: src/SUMMARY.md\nmsgid \"Using It\"\nmsgstr \"開始使用\"\n\n#: src/SUMMARY.md src/bare-metal/aps/exceptions.md\nmsgid \"Exceptions\"\nmsgstr \"例外狀況\"\n\n#: src/SUMMARY.md\nmsgid \"Useful Crates\"\nmsgstr \"實用的 Crate\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md\nmsgid \"`zerocopy`\"\nmsgstr \"`zerocopy`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"`aarch64-paging`\"\nmsgstr \"`aarch64-paging`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"`buddy_system_allocator`\"\nmsgstr \"`buddy_system_allocator`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md\nmsgid \"`tinyvec`\"\nmsgstr \"`tinyvec`\"\n\n#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md\nmsgid \"`spin`\"\nmsgstr \"`spin`\"\n\n#: src/SUMMARY.md\nmsgid \"`vmbase`\"\nmsgstr \"`vmbase`\"\n\n#: src/SUMMARY.md\nmsgid \"RTC Driver\"\nmsgstr \"RTC 驅動程式\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Morning\"\nmsgstr \"並行：上午\"\n\n#: src/SUMMARY.md src/concurrency/threads.md\nmsgid \"Threads\"\nmsgstr \"執行緒\"\n\n#: src/SUMMARY.md src/concurrency/scoped-threads.md\nmsgid \"Scoped Threads\"\nmsgstr \"限定範圍執行緒\"\n\n#: src/SUMMARY.md src/concurrency/channels.md\nmsgid \"Channels\"\nmsgstr \"通道\"\n\n#: src/SUMMARY.md src/concurrency/channels/unbounded.md\nmsgid \"Unbounded Channels\"\nmsgstr \"無界限的通道\"\n\n#: src/SUMMARY.md src/concurrency/channels/bounded.md\nmsgid \"Bounded Channels\"\nmsgstr \"有界限的通道\"\n\n#: src/SUMMARY.md src/concurrency/send-sync.md\nmsgid \"`Send` and `Sync`\"\nmsgstr \"`Send` 和 `Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/send.md\nmsgid \"`Send`\"\nmsgstr \"`Send`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/sync.md\nmsgid \"`Sync`\"\nmsgstr \"`Sync`\"\n\n#: src/SUMMARY.md src/concurrency/send-sync/examples.md\nmsgid \"Examples\"\nmsgstr \"範例\"\n\n#: src/SUMMARY.md src/concurrency/shared_state.md\nmsgid \"Shared State\"\nmsgstr \"共享狀態\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/arc.md\nmsgid \"`Arc`\"\nmsgstr \"`Arc`\"\n\n#: src/SUMMARY.md src/concurrency/shared_state/mutex.md\nmsgid \"`Mutex`\"\nmsgstr \"`Mutex`\"\n\n#: src/SUMMARY.md src/memory-management/review.md\n#: src/error-handling/try-conversions.md\n#: src/concurrency/shared_state/example.md\nmsgid \"Example\"\nmsgstr \"範例\"\n\n#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Dining Philosophers\"\nmsgstr \"哲學家就餐問題\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md\nmsgid \"Multi-threaded Link Checker\"\nmsgstr \"多執行緒連結檢查器\"\n\n#: src/SUMMARY.md\nmsgid \"Concurrency: Afternoon\"\nmsgstr \"並行：下午\"\n\n#: src/SUMMARY.md\nmsgid \"Async Basics\"\nmsgstr \"Async 基本概念\"\n\n#: src/SUMMARY.md src/async/async-await.md\nmsgid \"`async`/`await`\"\nmsgstr \"`async`/`await`\"\n\n#: src/SUMMARY.md src/async/futures.md\nmsgid \"Futures\"\nmsgstr \"Futures\"\n\n#: src/SUMMARY.md src/async/runtimes.md\nmsgid \"Runtimes\"\nmsgstr \"Runtimes\"\n\n#: src/SUMMARY.md src/async/runtimes/tokio.md\nmsgid \"Tokio\"\nmsgstr \"Tokio\"\n\n#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Tasks\"\nmsgstr \"工作\"\n\n#: src/SUMMARY.md src/async/channels.md\nmsgid \"Async Channels\"\nmsgstr \"非同步管道\"\n\n#: src/SUMMARY.md\nmsgid \"Control Flow\"\nmsgstr \"控制流程\"\n\n#: src/SUMMARY.md src/async/control-flow/join.md\nmsgid \"Join\"\nmsgstr \"加入\"\n\n#: src/SUMMARY.md src/async/control-flow/select.md\nmsgid \"Select\"\nmsgstr \"選取\"\n\n#: src/SUMMARY.md\nmsgid \"Pitfalls\"\nmsgstr \"陷阱\"\n\n#: src/SUMMARY.md\nmsgid \"Blocking the Executor\"\nmsgstr \"阻占執行器\"\n\n#: src/SUMMARY.md src/async/pitfalls/pin.md\nmsgid \"`Pin`\"\nmsgstr \"`Pin`\"\n\n#: src/SUMMARY.md src/async/pitfalls/async-traits.md\nmsgid \"Async Traits\"\nmsgstr \"非同步特徵\"\n\n#: src/SUMMARY.md src/async/pitfalls/cancellation.md\n#, fuzzy\nmsgid \"Cancellation\"\nmsgstr \"安裝\"\n\n#: src/SUMMARY.md src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Broadcast Chat Application\"\nmsgstr \"廣播聊天應用程式\"\n\n#: src/SUMMARY.md\nmsgid \"Final Words\"\nmsgstr \"結語\"\n\n#: src/SUMMARY.md src/thanks.md\nmsgid \"Thanks!\"\nmsgstr \"謝謝！\"\n\n#: src/SUMMARY.md src/glossary.md\nmsgid \"Glossary\"\nmsgstr \"詞彙解釋\"\n\n#: src/SUMMARY.md\nmsgid \"Other Resources\"\nmsgstr \"其他資源\"\n\n#: src/SUMMARY.md src/credits.md\nmsgid \"Credits\"\nmsgstr \"出處清單\"\n\n#: src/index.md\nmsgid \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\nmsgstr \"\"\n\"[![Build workflow](https://img.shields.io/github/actions/workflow/status/\"\n\"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/\"\n\"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!\"\n\"[GitHub contributors](https://img.shields.io/github/contributors/google/\"\n\"comprehensive-rust?style=flat-square)](https://github.com/google/\"\n\"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields.\"\n\"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github.\"\n\"com/google/comprehensive-rust/stargazers)\"\n\n#: src/index.md\nmsgid \"\"\n\"This is a free Rust course developed by the Android team at Google. The \"\n\"course covers the full spectrum of Rust, from basic syntax to advanced \"\n\"topics like generics and error handling.\"\nmsgstr \"\"\n\"這個免費的 Rust 課程是由 Google 的 Android 團隊負責開發。本課程涵蓋 Rust 的全\"\n\"部內容，從基礎語法到進階主題 (泛型和錯誤處理等)，應有盡有。\"\n\n#: src/index.md\nmsgid \"\"\n\"The latest version of the course can be found at <https://google.github.io/\"\n\"comprehensive-rust/>. If you are reading somewhere else, please check there \"\n\"for updates.\"\nmsgstr \"\"\n\"如需最新版課程，請造訪 <https://google.github.io/comprehensive-rust/>。假如您\"\n\"是在其他網址閱讀課程資料，別忘了查看這個連結的內容是否有更新。\"\n\n#: src/index.md\nmsgid \"The course is also available [as a PDF](comprehensive-rust.pdf).\"\nmsgstr \"\"\n\n#: src/index.md\nmsgid \"\"\n\"The goal of the course is to teach you Rust. We assume you don't know \"\n\"anything about Rust and hope to:\"\nmsgstr \"\"\n\"本課程旨在教授 Rust 的知識。我們會假設您是從零開始學習 Rust，希望能夠：\"\n\n#: src/index.md\nmsgid \"Give you a comprehensive understanding of the Rust syntax and language.\"\nmsgstr \"讓您對 Rust 語法和語言有全面的認識。\"\n\n#: src/index.md\nmsgid \"Enable you to modify existing programs and write new programs in Rust.\"\nmsgstr \"讓您學會在 Rust 中修改現有程式及編寫新程式。\"\n\n#: src/index.md\nmsgid \"Show you common Rust idioms.\"\nmsgstr \"向您介紹常見的 Rust 慣用語法。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"We call the first four course days Rust Fundamentals.\"\nmsgstr \"我們將前三天的課程稱為「Rust 基礎知識」。\"\n\n#: src/index.md\nmsgid \"\"\n\"Building on this, you're invited to dive into one or more specialized topics:\"\nmsgstr \"在此基礎上，我們將誠摯邀請您深入探討一或多個專題：\"\n\n#: src/index.md\nmsgid \"\"\n\"[Android](android.md): a half-day course on using Rust for Android platform \"\n\"development (AOSP). This includes interoperability with C, C++, and Java.\"\nmsgstr \"\"\n\"[Android](android.md)：這是半天的課程，會說明如何針對 Android 平台開發作業 \"\n\"(Android 開放原始碼計畫) 使用 Rust，並介紹與 C、C++ 和 Java 的互通性。\"\n\n#: src/index.md\n#, fuzzy\nmsgid \"\"\n\"[Chromium](chromium.md): a half-day course on using Rust within Chromium \"\n\"based browsers. This includes interoperability with C++ and how to include \"\n\"third-party crates in Chromium.\"\nmsgstr \"\"\n\"[Chromium](chromium.md)： 是半天的深入探索課程，會說明如何在 Chromium 瀏覽器\"\n\"中使用 Rust。這包括在 Chromium 的 `gn` 建構系統中使用 Rust，以提供與第三方程\"\n\"式庫 (「Crate」) 和 C++ 的互通性。\"\n\n#: src/index.md\nmsgid \"\"\n\"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal \"\n\"(embedded) development. Both microcontrollers and application processors are \"\n\"covered.\"\nmsgstr \"\"\n\"[Bare-metal](bare-metal.md)：這是半天的課程，會說明如何使用 Rust 在 bare-\"\n\"metal (嵌入式系統) 上台開發。課程內容包含微控制器和處理器。\"\n\n#: src/index.md\nmsgid \"\"\n\"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We \"\n\"cover both classical concurrency (preemptively scheduling using threads and \"\n\"mutexes) and async/await concurrency (cooperative multitasking using \"\n\"futures).\"\nmsgstr \"\"\n\"[並行](concurrency.md)：這個全天課程著重於 Rust 中的並行問題。我們將探討傳統\"\n\"並行 (使用執行緒和互斥鎖進行先占式排程) 以及 async/await 並行 (使用 future 進\"\n\"行合作多工處理)。\"\n\n#: src/index.md\nmsgid \"Non-Goals\"\nmsgstr \"非課程目標\"\n\n#: src/index.md\nmsgid \"\"\n\"Rust is a large language and we won't be able to cover all of it in a few \"\n\"days. Some non-goals of this course are:\"\nmsgstr \"\"\n\"Rust 是大型的程式語言，無法在幾天內就介紹完畢。因此，本課程不包含下列內容：\"\n\n#: src/index.md\nmsgid \"\"\n\"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]\"\n\"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]\"\n\"(https://doc.rust-lang.org/rust-by-example/macros.html) instead.\"\nmsgstr \"\"\n\"學習如何開發巨集 (macro)。請直接閱讀 [Rust Book 的 Chapter 19.5](https://doc.\"\n\"rust-lang.org/book/ch19-06-macros.html) 和 [Rust by Example](https://doc.\"\n\"rust-lang.org/rust-by-example/macros.html).\"\n\n#: src/index.md\nmsgid \"Assumptions\"\nmsgstr \"課程要求\"\n\n#: src/index.md\nmsgid \"\"\n\"The course assumes that you already know how to program. Rust is a \"\n\"statically-typed language and we will sometimes make comparisons with C and \"\n\"C++ to better explain or contrast the Rust approach.\"\nmsgstr \"\"\n\"本課程假設您已瞭解如何設計程式。Rust 是一種靜態的程式設計類型，我們有時會將其\"\n\"與 C 和 C++ 比較，以便進一步解釋或凸顯 Rust 做法上的差別。\"\n\n#: src/index.md\nmsgid \"\"\n\"If you know how to program in a dynamically-typed language such as Python or \"\n\"JavaScript, then you will be able to follow along just fine too.\"\nmsgstr \"\"\n\"如果您知道如何以 Python 或 JavaScript 等動態程式語言編寫程式，也很適合跟著我\"\n\"們學習 Rust。\"\n\n#: src/index.md\nmsgid \"\"\n\"This is an example of a _speaker note_. We will use these to add additional \"\n\"information to the slides. This could be key points which the instructor \"\n\"should cover as well as answers to typical questions which come up in class.\"\nmsgstr \"\"\n\"這是「演講者備忘稿」的範例。我們會透過這些備忘稿補充投影片中未提到的資訊。這\"\n\"可能包括老師應提及的重點，以及課堂上典型問題的解答。\"\n\n#: src/running-the-course.md src/running-the-course/course-structure.md\nmsgid \"This page is for the course instructor.\"\nmsgstr \"本頁面的適用對象為課程講師。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Here is a bit of background information about how we've been running the \"\n\"course internally at Google.\"\nmsgstr \"以下提供一些背景資訊，說明 Google 內部近期採用的授課方式。\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break \"\n\"in the middle. This leaves 3 hours for the morning class and 3 hours for the \"\n\"afternoon class. Both sessions contain multiple breaks and time for students \"\n\"to work on exercises.\"\nmsgstr \"\"\n\"我們一般會從上午 10 點上課到下午 4 點，中間 1 小時午休。也就是說，上下午課程\"\n\"各為 2.5 小時。請注意，這只是建議的上課時間：您也可以將上午的課程訂為 3 小\"\n\"時，讓學員有更多時間練習。延長課程時間的缺點是，學員上了整整 6 小時的課，到了\"\n\"下午可能會非常疲倦。\"\n\n#: src/running-the-course.md\nmsgid \"Before you run the course, you will want to:\"\nmsgstr \"在講授課程前，建議您注意下列事項：\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Make yourself familiar with the course material. We've included speaker \"\n\"notes to help highlight the key points (please help us by contributing more \"\n\"speaker notes!). When presenting, you should make sure to open the speaker \"\n\"notes in a popup (click the link with a little arrow next to \\\"Speaker \"\n\"Notes\\\"). This way you have a clean screen to present to the class.\"\nmsgstr \"\"\n\"請熟悉課程教材。我們已附上演講者備忘稿，協助突顯重點，也請您不吝提供更多演講\"\n\"者備忘稿內容！分享螢幕畫面時，請務必在彈出式視窗中開啟演講者備忘稿 (按一下\"\n\"「Speaker Notes」旁小箭頭的連結)。如此一來，您就能在課堂上分享簡潔的螢幕畫\"\n\"面。\"\n\n#: src/running-the-course.md\n#, fuzzy\nmsgid \"\"\n\"Decide on the dates. Since the course takes four days, we recommend that you \"\n\"schedule the days over two weeks. Course participants have said that they \"\n\"find it helpful to have a gap in the course since it helps them process all \"\n\"the information we give them.\"\nmsgstr \"\"\n\"請決定授課日期。由於課程長度至少為三個整天，建議您將授課日分散安排在兩週內。\"\n\"課程參與者曾表示，如果課程中間有間隔，可協助他們消化我們提供的所有資訊，對學\"\n\"習效果有助益。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Find a room large enough for your in-person participants. We recommend a \"\n\"class size of 15-25 people. That's small enough that people are comfortable \"\n\"asking questions --- it's also small enough that one instructor will have \"\n\"time to answer the questions. Make sure the room has _desks_ for yourself \"\n\"and for the students: you will all need to be able to sit and work with your \"\n\"laptops. In particular, you will be doing a lot of live-coding as an \"\n\"instructor, so a lectern won't be very helpful for you.\"\nmsgstr \"\"\n\"找到可容納現場參與者的場地。建議的開班人數為 15 至 25 人。這樣的小班制教學可\"\n\"讓學員自在地提問，講師也有時間可以回答問題。請確認上課場地有_書桌\\\\_，可供講\"\n\"師和學員使用：您們都會需要能坐著使用筆電。 講師尤其會需要現場編寫許多程式碼，\"\n\"因此使用講台可能會造成不便。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"On the day of your course, show up to the room a little early to set things \"\n\"up. We recommend presenting directly using `mdbook serve` running on your \"\n\"laptop (see the [installation instructions](https://github.com/google/\"\n\"comprehensive-rust#building)). This ensures optimal performance with no lag \"\n\"as you change pages. Using your laptop will also allow you to fix typos as \"\n\"you or the course participants spot them.\"\nmsgstr \"\"\n\"在講課當天提早到上課場地完成設定。建議您直接在筆電上執行 `mdbook serve` 分享\"\n\"螢幕畫面 (請參閱[安裝操作說明](https://github.com/google/comprehensive-\"\n\"rust#building))。這可確保提供最佳效能，不會在您切換頁面時發生延遲。使用筆電也\"\n\"可讓您修正自己或課程參與者發現的錯字。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Let people solve the exercises by themselves or in small groups. We \"\n\"typically spend 30-45 minutes on exercises in the morning and in the \"\n\"afternoon (including time to review the solutions). Make sure to ask people \"\n\"if they're stuck or if there is anything you can help with. When you see \"\n\"that several people have the same problem, call it out to the class and \"\n\"offer a solution, e.g., by showing people where to find the relevant \"\n\"information in the standard library.\"\nmsgstr \"\"\n\"讓學員獨自或分成小組做習題。我們通常會在早上和下午各安排 30 至 45 分鐘的時間\"\n\"做習題，這包含檢討解題方式的時間。請務必詢問學員是否遇到難題，或需要您的協\"\n\"助。如果發現多位學員遇到相同問題，請向全班說明該問題，並提供解決方式：例如示\"\n\"範如何在標準程式庫 (The Rust Standard Library) 找到相關資訊。\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"That is all, good luck running the course! We hope it will be as much fun \"\n\"for you as it has been for us!\"\nmsgstr \"以上為所有注意事項，祝您授課順利，並和我們一樣樂在其中！\"\n\n#: src/running-the-course.md\nmsgid \"\"\n\"Please [provide feedback](https://github.com/google/comprehensive-rust/\"\n\"discussions/86) afterwards so that we can keep improving the course. We \"\n\"would love to hear what worked well for you and what can be made better. \"\n\"Your students are also very welcome to [send us feedback](https://github.com/\"\n\"google/comprehensive-rust/discussions/100)!\"\nmsgstr \"\"\n\"請在授課後[提供意見回饋](https://github.com/google/comprehensive-rust/\"\n\"discussions/86)，協助我們持續改善課程。您可以與我們分享您滿意的部分，以及值得\"\n\"改善的地方。也歡迎您的學生[提供意見回饋](https://github.com/google/\"\n\"comprehensive-rust/discussions/100)！\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Rust Fundamentals\"\nmsgstr \"Rust 基礎知識\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The first four days make up [Rust Fundamentals](../welcome-day-1.md). The \"\n\"days are fast paced and we cover a lot of ground!\"\nmsgstr \"\"\n\"我們會在前三天介紹 [Rust 基礎知識](../welcome-day-1.md)。這幾天的步調會稍快，\"\n\"因為要探討許多層面：\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Course schedule:\"\nmsgstr \"課程架構\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Morning (2 hours and 10 minutes, including breaks)\"\nmsgstr \"第 1 天上午 (2 小時 10 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-1.md) (5 minutes)\"\nmsgstr \"[歡迎](../welcome-day-1.md) (5 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Hello, World](../hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](../hello-world.md) (15 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Types and Values](../types-and-values.md) (45 minutes)\"\nmsgstr \"[型別和值](../types-and-values.md) (5 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Control Flow Basics](../control-flow-basics.md) (40 minutes)\"\nmsgstr \"[基本的控制流程概念](../control-flow-basics.md) (40 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 1 Afternoon (2 hours and 15 minutes, including breaks)\"\nmsgstr \"第 1 天下午 (2 小時 15 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[元組和陣列](../tuples-and-arrays.md) (35 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[References](../references.md) (35 minutes)\"\nmsgstr \"[參照](../references.md) (35 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[User-Defined Types](../user-defined-types.md) (50 minutes)\"\nmsgstr \"[使用者定義的型別](../user-defined-types.md) (50 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Morning (2 hours and 50 minutes, including breaks)\"\nmsgstr \"第 2 天上午 (2 小時 50 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-2.md) (3 minutes)\"\nmsgstr \"[歡迎](../welcome-day-2.md) (3 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Pattern Matching](../pattern-matching.md) (1 hour)\"\nmsgstr \"[模式比對](../pattern-matching.md) (1 小時)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Methods and Traits](../methods-and-traits.md) (45 minutes)\"\nmsgstr \"[方法 (methods) 和特徵 (traits)](../methods-and-traits.md) (45 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Generics](../generics.md) (40 minutes)\"\nmsgstr \"[泛型 (generics)](../generics.md) (40 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 2 Afternoon (3 hours and 10 minutes, including breaks)\"\nmsgstr \"第 2 天下午 (3 小時 10 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Types](../std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[標準程式庫型別](../std-types.md) (1 小時 20 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"[標準程式庫特徵](../std-traits.md) (1 小時 40 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Morning (2 hours and 20 minutes, including breaks)\"\nmsgstr \"第 3 天上午 (2 小時 20 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-3.md) (3 minutes)\"\nmsgstr \"[歡迎](../welcome-day-3.md) (3 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Memory Management](../memory-management.md) (1 hour)\"\nmsgstr \"[記憶體管理](../memory-management.md) (1 小時)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Smart Pointers](../smart-pointers.md) (55 minutes)\"\nmsgstr \"[智慧指標](../smart-pointers.md) (55 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 3 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"第 3 天下午 (2 小時 10 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Borrowing](../borrowing.md) (50 minutes)\"\nmsgstr \"[借用](../borrowing.md) (50 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"[切片 (slice) 和生命週期](../slices-and-lifetimes.md) (1 小時 10 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Morning (2 hours and 40 minutes, including breaks)\"\nmsgstr \"第 4 天上午 (2 小時 40 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Welcome](../welcome-day-4.md) (3 minutes)\"\nmsgstr \"[歡迎](../welcome-day-4.md) (3 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Iterators](../iterators.md) (45 minutes)\"\nmsgstr \"[疊代器](../iterators.md) (45 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Modules](../modules.md) (40 minutes)\"\nmsgstr \"[模組](../modules.md) (40 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Testing](../testing.md) (45 minutes)\"\nmsgstr \"[測試](../testing.md) (45 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Day 4 Afternoon (2 hours and 10 minutes, including breaks)\"\nmsgstr \"第 4 天下午 (2 小時 10 分鐘，含休息)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Error Handling](../error-handling.md) (55 minutes)\"\nmsgstr \"[錯誤處理](../error-handling.md) (55 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[不安全的 Rust](../unsafe-rust.md) (1 小時 5 分鐘)\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Deep Dives\"\nmsgstr \"深入探索\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"In addition to the 4-day class on Rust Fundamentals, we cover some more \"\n\"specialized topics:\"\nmsgstr \"除了為期 3 天的 Rust 基礎知識課程，我們也涵蓋更多專門主題：\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Android\"\nmsgstr \"Android 中的 Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Android](../android.md) deep dive is a half-day course on using \"\n\"Rust for Android platform development. This includes interoperability with \"\n\"C, C++, and Java.\"\nmsgstr \"\"\n\"[Android 中的 Rust](../android.md)是半天的課程，會說明如何針對 Android 平台開\"\n\"發作業使用 Rust，以及與 C、C++ 和 Java 的互通性。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need an [AOSP checkout](https://source.android.com/docs/setup/\"\n\"download/downloading). Make a checkout of the [course repository](https://\"\n\"github.com/google/comprehensive-rust) on the same machine and move the `src/\"\n\"android/` directory into the root of your AOSP checkout. This will ensure \"\n\"that the Android build system sees the `Android.bp` files in `src/android/`.\"\nmsgstr \"\"\n\"您會需要檢出 (checkout) [AOSP (Android 開放原始碼專案)](https://source.\"\n\"android.com/docs/setup/download/downloading)。請檢查[課程存放區](https://\"\n\"comprehensive-rust)上相同的機器，並將 `src/android/` 目錄移至檢出的 AOSP 根目\"\n\"錄下。這可確保 Android 建構系統能夠在 `src/android/` 中看到 `Android.bp` 的檔\"\n\"案。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"Ensure that `adb sync` works with your emulator or real device and pre-build \"\n\"all Android examples using `src/android/build_all.sh`. Read the script to \"\n\"see the commands it runs and make sure they work when you run them by hand.\"\nmsgstr \"\"\n\"請確保 `adb sync` 可與模擬器或實際裝置搭配使用，並運用 `src/android/\"\n\"build_all.sh` 預先建構所有 Android 範例。請閱讀指令碼，瞭解指令碼執行的指令，\"\n\"並確保可以手動執行指令。\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Rust in Chromium\"\nmsgstr \"在 Chromium 中的 Rust\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The [Rust in Chromium](../chromium.md) deep dive is a half-day course on \"\n\"using Rust as part of the Chromium browser. It includes using Rust in \"\n\"Chromium's `gn` build system, bringing in third-party libraries (\\\"crates\\\") \"\n\"and C++ interoperability.\"\nmsgstr \"\"\n\"[Chromium 中的 Rust](../chromium.md) 是半天的深入探索課程，會說明如何在 \"\n\"Chromium 瀏覽器中使用 Rust。這包括在 Chromium 的 `gn` 建構系統中使用 Rust，以\"\n\"提供與第三方程式庫 (「Crate」) 和 C++ 的互通性。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need to be able to build Chromium --- a debug, component build is \"\n\"[recommended](../chromium/setup.md) for speed but any build will work. \"\n\"Ensure that you can run the Chromium browser that you've built.\"\nmsgstr \"\"\n\"您需具備 Chromium 的建構知識。我們[建議](../chromium/setup.md)使用偵錯元件版\"\n\"本來加快執行速度，但其他版本也適用。請確保您能夠執行所建構的 Chromium 瀏覽\"\n\"器。\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Bare-Metal Rust\"\nmsgstr \"裸機\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on \"\n\"using Rust for bare-metal (embedded) development. Both microcontrollers and \"\n\"application processors are covered.\"\nmsgstr \"\"\n\"[裸機深入探索](../bare-metal.md)是一整天的課程，會說明如何使用 Rust 進行裸機 \"\n\"(嵌入式) 開發作業，也會介紹微控制器和應用程式處理器。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"For the microcontroller part, you will need to buy the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 development board ahead of time. Everybody will \"\n\"need to install a number of packages as described on the [welcome page](../\"\n\"bare-metal.md).\"\nmsgstr \"\"\n\"針對微控制器，您會需要預先購買 [BBC micro:bit](https://microbit.org/) 第 2 版\"\n\"開發板。此外，所有人都需要按照[歡迎頁面](../bare-metal.md)上的指示安裝多種套\"\n\"件。\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"Concurrency in Rust\"\nmsgstr \"歡迎使用 Rust 的並行程式設計\"\n\n#: src/running-the-course/course-structure.md\n#, fuzzy\nmsgid \"\"\n\"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class \"\n\"on classical as well as `async`/`await` concurrency.\"\nmsgstr \"\"\n\"[並行深入探索](../concurrency.md)是一整天的課程，會說明傳統並行與 `async`/\"\n\"`await` 並行。\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"You will need a fresh crate set up and the dependencies downloaded and ready \"\n\"to go. You can then copy/paste the examples into `src/main.rs` to experiment \"\n\"with them:\"\nmsgstr \"\"\n\"您會需要設定新的 Crate，然後下載並準備執行依附元件。接著就能將範例複製貼上至 \"\n\"`src/main.rs`，使用這些範例進行實驗：\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"Format\"\nmsgstr \"形式\"\n\n#: src/running-the-course/course-structure.md\nmsgid \"\"\n\"The course is meant to be very interactive and we recommend letting the \"\n\"questions drive the exploration of Rust!\"\nmsgstr \"本課程極具互動性，因此建議您根據各項疑問，帶領學員瞭解 Rust！\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"There are several useful keyboard shortcuts in mdBook:\"\nmsgstr \"以下為 mdBook 中實用的鍵盤快速鍵：\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Left\"\nmsgstr \"向左鍵\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the previous page.\"\nmsgstr \"：前往上一頁。\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"Arrow-Right\"\nmsgstr \"向右鍵\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Navigate to the next page.\"\nmsgstr \"：前往下一頁。\"\n\n#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md\nmsgid \"Ctrl + Enter\"\nmsgstr \"Ctrl + Enter\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Execute the code sample that has focus.\"\nmsgstr \"：執行具有焦點的程式碼範例。\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \"s\"\nmsgstr \"s\"\n\n#: src/running-the-course/keyboard-shortcuts.md\nmsgid \": Activate the search bar.\"\nmsgstr \"：啟用搜尋列。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"The course has been translated into other languages by a set of wonderful \"\n\"volunteers:\"\nmsgstr \"本課程已由一群優秀的志工翻譯成其他語言：\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) \"\n\"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github.\"\n\"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes), and \"\n\"[@henrif75](https://github.com/henrif75).\"\nmsgstr \"\"\n\"\\\\[巴西葡萄牙文\\\\]\\\\][pt-BR](https://google.github.io/comprehensive-rust/pt-\"\n\"BR/)譯者：[@rastringer](https://github.com/rastringer) 和 [@hugojacob]\"\n\"(https://github.com/hugojacob)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) \"\n\"by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/\"\n\"wnghl), [@anlunx](https://github.com/anlunx), [@kongy](https://github.com/\"\n\"kongy), [@noahdragon](https://github.com/noahdragon), [@superwhd](https://\"\n\"github.com/superwhd), [@SketchK](https://github.com/SketchK), and [@nodmp]\"\n\"(https://github.com/nodmp).\"\nmsgstr \"\"\n\"[中文 (簡體)](https://google.github.io/comprehensive-rust/zh-CN/)譯者：\"\n\"[@suetfei](https://github.com/suetfei)、[@wnghl](https://github.com/wnghl)、\"\n\"[@anlunx](https://github.com/anlunx)、[@kongy](https://github.com/kongy)、\"\n\"[@noahdragon](https://github.com/noahdragon、[@superwhd](https://github.com/\"\n\"superwhd)、[@SketchK](https://github.com/SketchK) 和 [@nodmp](https://\"\n\"github) .com/nodmp)。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) \"\n\"by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/\"\n\"victorhsieh), [@mingyc](https://github.com/mingyc), [@kuanhungchen](https://\"\n\"github.com/kuanhungchen), and [@johnathan79717](https://github.com/\"\n\"johnathan79717).\"\nmsgstr \"\"\n\"[中文 (簡體)](https://google.github.io/comprehensive-rust/zh-CN/)譯者：\"\n\"[@suetfei](https://github.com/suetfei)、[@wnghl](https://github.com/wnghl)、\"\n\"[@anlunx](https://github.com/anlunx)、[@kongy](https://github.com/kongy)、\"\n\"[@noahdragon](https://github.com/noahdragon、[@superwhd](https://github.com/\"\n\"superwhd)、[@SketchK](https://github.com/SketchK) 和 [@nodmp](https://\"\n\"github) .com/nodmp)。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]\"\n\"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), \"\n\"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github.\"\n\"com/namhyung).\"\nmsgstr \"\"\n\"[韓文](https://google.github.io/comprehensive-rust/ko/)譯者：[@keispace]\"\n\"(https://github.com/keispace)、[@jiyongp](https://github.com/jiyongp) 和 \"\n\"[@jooyunghan](https://github.com/jooyunghan)。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]\"\n\"(https://github.com/deavid).\"\nmsgstr \"\"\n\"[法文](https://google.github.io/comprehensive-rust/fr/)譯者：[@KookaS]\"\n\"(https://github.com/KookaS) 和 [@vcaen](https://github.com/vcaen)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"Use the language picker in the top-right corner to switch between languages.\"\nmsgstr \"使用右上角的語言選單即可切換語言。\"\n\n#: src/running-the-course/translations.md\nmsgid \"Incomplete Translations\"\nmsgstr \"不完整翻譯\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"There is a large number of in-progress translations. We link to the most \"\n\"recently updated translations:\"\nmsgstr \"目前有許多正在翻譯的語言版本。以下連結為最近更新的翻譯：\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]\"\n\"(https://github.com/raselmandol).\"\nmsgstr \"\"\n\"[德文](https://google.github.io/comprehensive-rust/de/)譯者：[@Throvn]\"\n\"(https://github.com/Throvn)和 [@ronaldfw](https://github.com/ronaldfw)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]\"\n\"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen).\"\nmsgstr \"\"\n\"[法文](https://google.github.io/comprehensive-rust/fr/)譯者：[@KookaS]\"\n\"(https://github.com/KookaS) 和 [@vcaen](https://github.com/vcaen)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]\"\n\"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw).\"\nmsgstr \"\"\n\"[德文](https://google.github.io/comprehensive-rust/de/)譯者：[@Throvn]\"\n\"(https://github.com/Throvn)和 [@ronaldfw](https://github.com/ronaldfw)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]\"\n\"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/\"\n\"momotaro1105).\"\nmsgstr \"\"\n\"[日文](https://google.github.io/comprehensive-rust/ja/)譯者：\\\\[@\\\\] CoinEZ-\"\n\"JPN\\\\] 和 [@momotaro1105](https://github.com/momotaro1105)。\"\n\n#: src/running-the-course/translations.md\n#, fuzzy\nmsgid \"\"\n\"[Italian](https://google.github.io/comprehensive-rust/it/) by \"\n\"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://\"\n\"github.com/detro).\"\nmsgstr \"\"\n\"[德文](https://google.github.io/comprehensive-rust/de/)譯者：[@Throvn]\"\n\"(https://github.com/Throvn)和 [@ronaldfw](https://github.com/ronaldfw)。\"\n\n#: src/running-the-course/translations.md\nmsgid \"\"\n\"If you want to help with this effort, please see [our instructions](https://\"\n\"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to \"\n\"get going. Translations are coordinated on the [issue tracker](https://\"\n\"github.com/google/comprehensive-rust/issues/282).\"\nmsgstr \"\"\n\"如果想協助翻譯，請參閱\\\\[操作說明\\\\]，瞭解如何開始翻譯。譯者可以在\\\\[問題追蹤\"\n\"工具\\\\]上討論及統整翻譯。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"When you start reading about Rust, you will soon meet [Cargo](https://doc.\"\n\"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build \"\n\"and run Rust applications. Here we want to give a brief overview of what \"\n\"Cargo is and how it fits into the wider ecosystem and how it fits into this \"\n\"training.\"\nmsgstr \"\"\n\"您開始閱讀 Rust 內容後，很快就會認識 [Cargo](https://doc.rust-lang.org/\"\n\"cargo/)，這是在 Rust 生態系統中使用的標準工具，用於建構及執行 Rust 應用程式。\"\n\"以下簡要介紹 Cargo，以及如何在更廣大的生態系統和本訓練課程中運用 Cargo。\"\n\n#: src/cargo.md\nmsgid \"Installation\"\nmsgstr \"安裝\"\n\n#: src/cargo.md\nmsgid \"**Please follow the instructions on <https://rustup.rs/>.**\"\nmsgstr \"**請按照 <https://rustup.rs/> 中的指示操作。**\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"This will give you the Cargo build tool (`cargo`) and the Rust compiler \"\n\"(`rustc`). You will also get `rustup`, a command line utility that you can \"\n\"use to install to different compiler versions.\"\nmsgstr \"\"\n\"除了安裝 Cargo 和 rustc 之外，Rustup 還會將自己安裝為指令列公用程式，方便您安\"\n\"裝/切換工具鏈、設定跨平台程式碼編譯等。\"\n\n#: src/cargo.md\nmsgid \"\"\n\"After installing Rust, you should configure your editor or IDE to work with \"\n\"Rust. Most editors do this by talking to [rust-analyzer](https://rust-\"\n\"analyzer.github.io/), which provides auto-completion and jump-to-definition \"\n\"functionality for [VS Code](https://code.visualstudio.com/), [Emacs](https://\"\n\"rust-analyzer.github.io/manual.html#emacs), [Vim/Neovim](https://rust-\"\n\"analyzer.github.io/manual.html#vimneovim), and many others. There is also a \"\n\"different IDE available called [RustRover](https://www.jetbrains.com/rust/).\"\nmsgstr \"\"\n\"安裝 Rust 後，您應設定編輯器或 IDE，以便與 Rust 搭配使用。為此，大多數編輯器\"\n\"會與 [rust-analyzer](https://rust-analyzer.github.io/) 通訊，後者提供適用於 \"\n\"[VS Code](https://code.visualstudio.com/)、[Emacs](https://rust-analyzer.\"\n\"github.io/manual.html#emacs)、[Vim/Neovim](https://rust-analyzer.github.io/\"\n\"manual.html#vimneovim) 等的自動完成和跳至定義功能。此外，您也可以使用稱做 \"\n\"[RustRover](https://www.jetbrains.com/rust/) 的不同 IDE。\"\n\n#: src/cargo.md\n#, fuzzy\nmsgid \"\"\n\"On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust \"\n\"formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this \"\n\"gets you an outdated rust version and may lead to unexpected behavior. The \"\n\"command would be:\"\nmsgstr \"\"\n\"您可以在 Debian/Ubuntu 上使用下列程式碼，安裝 Cargo、Rust 原始碼和 [Rust 格式\"\n\"設定工具](https://github.com/rust-lang/rustfmt)：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"The Rust Ecosystem\"\nmsgstr \"Rust 生態系統\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The Rust ecosystem consists of a number of tools, of which the main ones are:\"\nmsgstr \"Rust 生態系統包含多項工具，以下列出主要工具：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"`rustc`: the Rust compiler which turns `.rs` files into binaries and other \"\n\"intermediate formats.\"\nmsgstr \"`rustc`：Rust 編譯器，可將 `.rs` 檔案轉換成二進位檔和其他中繼格式。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`cargo`: the Rust dependency manager and build tool. Cargo knows how to \"\n\"download dependencies, usually hosted on <https://crates.io>, and it will \"\n\"pass them to `rustc` when building your project. Cargo also comes with a \"\n\"built-in test runner which is used to execute unit tests.\"\nmsgstr \"\"\n\"`cargo`：Rust 依附元件管理工具和建構工具。Cargo 知道如何下載 <https://crates.\"\n\"io> 上代管的依附元件，且會在建構您的專案時，將這些依附元件傳送至 `rustc`。\"\n\"Cargo 也提供內建測試執行元件，可用於執行單元測試。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"`rustup`: the Rust toolchain installer and updater. This tool is used to \"\n\"install and update `rustc` and `cargo` when new versions of Rust are \"\n\"released. In addition, `rustup` can also download documentation for the \"\n\"standard library. You can have multiple versions of Rust installed at once \"\n\"and `rustup` will let you switch between them as needed.\"\nmsgstr \"\"\n\"`rustup`：Rust 工具鍊安裝程式和更新程式。新版 Rust 推出時，這項工具可用來安裝\"\n\"及更新 `rustc` 和 `cargo`。此外，`rustup` 也可以下載標準程式庫的說明文件。您\"\n\"可以一次安裝多個 Rust 版本，並視需要使用 `rustup` 切換版本。\"\n\n#: src/cargo/rust-ecosystem.md src/types-and-values/hello-world.md\n#: src/references/exclusive.md src/pattern-matching/destructuring.md\n#: src/memory-management/move.md src/error-handling/try.md src/android/setup.md\n#: src/async/async-await.md\nmsgid \"Key points:\"\nmsgstr \"重要須知：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust has a rapid release schedule with a new release coming out every six \"\n\"weeks. New releases maintain backwards compatibility with old releases --- \"\n\"plus they enable new functionality.\"\nmsgstr \"\"\n\"Rust 的發布時程相當緊湊，每六週就會推出新版本。新版本可與舊版本回溯相容，且會\"\n\"啟用新功能。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"There are three release channels: \\\"stable\\\", \\\"beta\\\", and \\\"nightly\\\".\"\nmsgstr \"\"\n\"發布版本 (release channel) 分為三種：「穩定版」、「Beta 版」和「Nightly \"\n\"版」。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"New features are being tested on \\\"nightly\\\", \\\"beta\\\" is what becomes \"\n\"\\\"stable\\\" every six weeks.\"\nmsgstr \"「Nightly 版」會用於測試新功能，「Beta 版」則會每六週成為「穩定版」。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Dependencies can also be resolved from alternative [registries](https://doc.\"\n\"rust-lang.org/cargo/reference/registries.html), git, folders, and more.\"\nmsgstr \"\"\n\"您也可以透過其他[註冊資料庫](https://doc.rust-lang.org/cargo/reference/\"\n\"registries.html)、git、資料夾等管道解析依附元件。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the \"\n\"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018.\"\nmsgstr \"\"\n\"Rust 還具有\\\\[版本\\\\] (edition)：目前版本為 Rust 2021。先前版本為 Rust 2015 \"\n\"和 Rust 2018。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"The editions are allowed to make backwards incompatible changes to the \"\n\"language.\"\nmsgstr \"這些版本可針對語言進行回溯不相容的變更。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To prevent breaking code, editions are opt-in: you select the edition for \"\n\"your crate via the `Cargo.toml` file.\"\nmsgstr \"\"\n\"為避免破壞程式碼，版本皆為自行選擇採用：您可以透過 `Cargo.toml` 檔案選擇所需\"\n\"版本。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"To avoid splitting the ecosystem, Rust compilers can mix code written for \"\n\"different editions.\"\nmsgstr \"為避免分割生態系統，Rust 編譯器可混合寫給不同版本的程式碼。\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Mention that it is quite rare to ever use the compiler directly not through \"\n\"`cargo` (most users never do).\"\nmsgstr \"請說明很少會略過 `cargo` 直接使用編譯器，大部分使用者都不會這麼做。\"\n\n#: src/cargo/rust-ecosystem.md\n#, fuzzy\nmsgid \"\"\n\"It might be worth alluding that Cargo itself is an extremely powerful and \"\n\"comprehensive tool. It is capable of many advanced features including but \"\n\"not limited to:\"\nmsgstr \"\"\n\"可以考慮暗示 Cargo 本身是極其強大且功能全面的工具，具有許多進階功能，包括但不\"\n\"限於：\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Project/package structure\"\nmsgstr \"專案/套件結構\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)\"\nmsgstr \"\\\\[工作區\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"Dev Dependencies and Runtime Dependency management/caching\"\nmsgstr \"開發人員依附元件和執行階段依附元件管理/快取\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts.\"\n\"html)\"\nmsgstr \"\\\\[建構指令碼\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install.\"\n\"html)\"\nmsgstr \"\\\\[全域安裝\\\\]\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"It is also extensible with sub command plugins as well (such as [cargo \"\n\"clippy](https://github.com/rust-lang/rust-clippy)).\"\nmsgstr \"\"\n\"此外，還可以擴充使用子指令外掛程式，例如 [cargo clippy](https://github.com/\"\n\"rust-lang/rust-clippy)\"\n\n#: src/cargo/rust-ecosystem.md\nmsgid \"\"\n\"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)\"\nmsgstr \"詳情請參閱\\\\[官方的 Cargo 手冊\\\\]。\"\n\n#: src/cargo/code-samples.md\nmsgid \"Code Samples in This Training\"\nmsgstr \"本訓練課程的程式碼範例\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"For this training, we will mostly explore the Rust language through examples \"\n\"which can be executed through your browser. This makes the setup much easier \"\n\"and ensures a consistent experience for everyone.\"\nmsgstr \"\"\n\"在本訓練課程中，我們主要會透過範例瞭解 Rust 語言，這些範例可在瀏覽器中執行。\"\n\"這麼做可讓設定程序更輕鬆，並確保所有人獲得一致的體驗。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Installing Cargo is still encouraged: it will make it easier for you to do \"\n\"the exercises. On the last day, we will do a larger exercise which shows you \"\n\"how to work with dependencies and for that you need Cargo.\"\nmsgstr \"\"\n\"我們仍建議安裝 Cargo，方便您更輕鬆做習題。在最後一天，我們會做規模較大的習\"\n\"題，讓您瞭解如何使用依附元件，而這需要使用 Cargo。\"\n\n#: src/cargo/code-samples.md\nmsgid \"The code blocks in this course are fully interactive:\"\nmsgstr \"本課程的程式碼區塊皆完全為互動式：\"\n\n#: src/cargo/code-samples.md src/cargo/running-locally.md\nmsgid \"\\\"Edit me!\\\"\"\nmsgstr \"\\\"Edit me!\\\"\"\n\n#: src/cargo/code-samples.md\nmsgid \"You can use \"\nmsgstr \"當焦點位於文字方塊時，按下 \"\n\n#: src/cargo/code-samples.md\nmsgid \" to execute the code when focus is in the text box.\"\nmsgstr \" 鍵即可執行程式碼。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"Most code samples are editable like shown above. A few code samples are not \"\n\"editable for various reasons:\"\nmsgstr \"\"\n\"大部分程式碼範例都可供編輯，如上所示。有些程式碼範例無法編輯，原因如下：\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds cannot execute unit tests. Copy-paste the code and \"\n\"open it in the real Playground to demonstrate unit tests.\"\nmsgstr \"\"\n\"嵌入式遊樂場無法執行單元測試。請複製貼上程式碼，然後在實際的 Playground 中開\"\n\"啟，即可示範單元測試。\"\n\n#: src/cargo/code-samples.md\nmsgid \"\"\n\"The embedded playgrounds lose their state the moment you navigate away from \"\n\"the page! This is the reason that the students should solve the exercises \"\n\"using a local Rust installation or via the Playground.\"\nmsgstr \"\"\n\"當您一離開頁面，嵌入式遊樂場就會失去目前狀態！因此，學生應使用本機 Rust 安裝\"\n\"項目或透過 Playground 來做習題。\"\n\n#: src/cargo/running-locally.md\nmsgid \"Running Code Locally with Cargo\"\nmsgstr \"使用 Cargo 在本機執行程式碼\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"If you want to experiment with the code on your own system, then you will \"\n\"need to first install Rust. Do this by following the [instructions in the \"\n\"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This \"\n\"should give you a working `rustc` and `cargo`. At the time of writing, the \"\n\"latest stable Rust release has these version numbers:\"\nmsgstr \"\"\n\"如果想在自己的系統上進行程式碼實驗，您會需要先安裝 Rust。請按照 [Rust 手冊中\"\n\"的指示](https://doc.rust-lang.org/book/ch01-01-installation.html)操作。您應會\"\n\"獲得正常運作的 `rustc` 和 `cargo`。截至本文撰寫時間，最新的 Rust 穩定版具有下\"\n\"列版本編號：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can use any later version too since Rust maintains backwards \"\n\"compatibility.\"\nmsgstr \"由於 Rust 保有回溯相容性，您也可以使用任何後續版本。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"With this in place, follow these steps to build a Rust binary from one of \"\n\"the examples in this training:\"\nmsgstr \"\"\n\"完成上述步驟後，請按照下列步驟操作，在本訓練課程的任一範例中建構 Rust 二進位\"\n\"檔：\"\n\n#: src/cargo/running-locally.md\nmsgid \"Click the \\\"Copy to clipboard\\\" button on the example you want to copy.\"\nmsgstr \"在要複製的範例中，按一下「Copy to clipboard」按鈕。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo new exercise` to create a new `exercise/` directory for your code:\"\nmsgstr \"使用 `cargo new exercise`，為程式碼建立新的 `exercise/` 目錄：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Navigate into `exercise/` and use `cargo run` to build and run your binary:\"\nmsgstr \"前往 `exercise/`，使用 `cargo run` 建構並執行二進位檔：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Replace the boiler-plate code in `src/main.rs` with your own code. For \"\n\"example, using the example on the previous page, make `src/main.rs` look like\"\nmsgstr \"\"\n\"將 `src/main.rs` 中的樣板程式碼替換為自己的程式碼。以上一頁的範例為例，替換後\"\n\"的 `src/main.rs` 會類似如下：\"\n\n#: src/cargo/running-locally.md\nmsgid \"Use `cargo run` to build and run your updated binary:\"\nmsgstr \"使用 `cargo run` 建構並執行更新版二進位檔：\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Use `cargo check` to quickly check your project for errors, use `cargo \"\n\"build` to compile it without running it. You will find the output in `target/\"\n\"debug/` for a normal debug build. Use `cargo build --release` to produce an \"\n\"optimized release build in `target/release/`.\"\nmsgstr \"\"\n\"使用 `cargo check` 快速檢查專案中是否有錯誤，並使用 `cargo build` 在不執行的\"\n\"情況下編譯專案。您會在 `target/debug/` 中看到一般偵錯版本的輸出內容。使用 \"\n\"`cargo build --release`，在 `target/release/` 中產生經過最佳化的發布子版本。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"You can add dependencies for your project by editing `Cargo.toml`. When you \"\n\"run `cargo` commands, it will automatically download and compile missing \"\n\"dependencies for you.\"\nmsgstr \"\"\n\"只要編輯 `Cargo.toml`，即可為專案新增依附元件。執行 `cargo` 指令時，系統會自\"\n\"動下載及編譯缺少的依附元件。\"\n\n#: src/cargo/running-locally.md\nmsgid \"\"\n\"Try to encourage the class participants to install Cargo and use a local \"\n\"editor. It will make their life easier since they will have a normal \"\n\"development environment.\"\nmsgstr \"\"\n\"建議您鼓勵課程參與者安裝 Cargo 及使用本機編輯器。這麼做能提供正常的開發環境，\"\n\"降低操作難度。\"\n\n#: src/welcome-day-1.md\nmsgid \"Welcome to Day 1\"\nmsgstr \"歡迎參加第 1 天課程\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is the first day of Rust Fundamentals. We will cover a lot of ground \"\n\"today:\"\nmsgstr \"今天是學習 Rust 基礎知識的第一天，我們會探討許多內容：\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"Basic Rust syntax: variables, scalar and compound types, enums, structs, \"\n\"references, functions, and methods.\"\nmsgstr \"\"\n\"基本的 Rust 語法：變數、純量和複合型別、列舉、結構體、參照、函式和方法。\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"Types and type inference.\"\nmsgstr \"型別推斷\"\n\n#: src/welcome-day-1.md\nmsgid \"Control flow constructs: loops, conditionals, and so on.\"\nmsgstr \"控制流程結構：迴圈、條件式等。\"\n\n#: src/welcome-day-1.md\nmsgid \"User-defined types: structs and enums.\"\nmsgstr \"使用者定義的型別：結構體和列舉。\"\n\n#: src/welcome-day-1.md\nmsgid \"Pattern matching: destructuring enums, structs, and arrays.\"\nmsgstr \"模式配對：解構列舉、結構和陣列。\"\n\n#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md\n#: src/welcome-day-4.md\nmsgid \"Schedule\"\nmsgstr \"課程時間表\"\n\n#: src/welcome-day-1.md src/welcome-day-1-afternoon.md src/welcome-day-2.md\n#: src/welcome-day-2-afternoon.md src/welcome-day-3.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"In this session:\"\nmsgstr \"課程內容：\"\n\n#: src/welcome-day-1.md\nmsgid \"[Welcome](./welcome-day-1.md) (5 minutes)\"\nmsgstr \"[歡迎](./welcome-day-1.md) (5 分鐘)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Hello, World](./hello-world.md) (15 minutes)\"\nmsgstr \"[Hello, World](./hello-world.md) (15 分鐘)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Types and Values](./types-and-values.md) (45 minutes)\"\nmsgstr \"[型別和值](./types-and-values.md) (45 分鐘)\"\n\n#: src/welcome-day-1.md\nmsgid \"[Control Flow Basics](./control-flow-basics.md) (40 minutes)\"\nmsgstr \"[基本的控制流程概念](./control-flow-basics.md) (40 分鐘)\"\n\n#: src/welcome-day-1.md src/welcome-day-3-afternoon.md\n#: src/welcome-day-4-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 10 \"\n\"minutes\"\nmsgstr \"加上 10 分鐘的休息時間，這個課程大約需要 2 小時 10 分鐘\"\n\n#: src/welcome-day-1.md\nmsgid \"Please remind the students that:\"\nmsgstr \"請提醒學生以下事項：\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"They should ask questions when they get them, don't save them to the end.\"\nmsgstr \"應該一有問題就提問，不要留到最後。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The class is meant to be interactive and discussions are very much \"\n\"encouraged!\"\nmsgstr \"本課程的宗旨是互動，非常鼓勵大家討論！\"\n\n#: src/welcome-day-1.md\n#, fuzzy\nmsgid \"\"\n\"As an instructor, you should try to keep the discussions relevant, i.e., \"\n\"keep the discussions related to how Rust does things vs some other language. \"\n\"It can be hard to find the right balance, but err on the side of allowing \"\n\"discussions since they engage people much more than one-way communication.\"\nmsgstr \"\"\n\"老師應設法讓討論不要離題，例如確保討論的主題在於比較 Rust 和其他語言的運作方\"\n\"式。要找到適當的平衡點並不容易，但我們還是寧可讓學員討論，因為這比老師單向授\"\n\"課更能引起學生興趣。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The questions will likely mean that we talk about things ahead of the slides.\"\nmsgstr \"我們討論的議題，可能會超前投影片進度。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"This is perfectly okay! Repetition is an important part of learning. \"\n\"Remember that the slides are just a support and you are free to skip them as \"\n\"you like.\"\nmsgstr \"\"\n\"這完全沒問題！複習是學習的重要一環。請記得，投影片只是輔助，您可以視情況略過\"\n\"不需要的部分。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"The idea for the first day is to show the \\\"basic\\\" things in Rust that \"\n\"should have immediate parallels in other languages. The more advanced parts \"\n\"of Rust come on the subsequent days.\"\nmsgstr \"\"\n\"第一天的規畫是說明 Rust 中能夠直接對應到其他語言的「基礎」概念。後續幾天則會\"\n\"介紹更進階的部分。\"\n\n#: src/welcome-day-1.md\nmsgid \"\"\n\"If you're teaching this in a classroom, this is a good place to go over the \"\n\"schedule. Note that there is an exercise at the end of each segment, \"\n\"followed by a break. Plan to cover the exercise solution after the break. \"\n\"The times listed here are a suggestion in order to keep the course on \"\n\"schedule. Feel free to be flexible and adjust as necessary!\"\nmsgstr \"\"\n\"如果您是在教室授課，就很適合參考這裡的時間表。請注意，每個主題結束後都有練\"\n\"習，然後才是休息時間。請規劃在休息後講解練習的解決方案。此處列出的時程建議是\"\n\"要確保課程進度。您可以視需要彈性調整！\"\n\n#: src/hello-world.md src/types-and-values.md src/control-flow-basics.md\n#: src/tuples-and-arrays.md src/references.md src/user-defined-types.md\n#: src/pattern-matching.md src/methods-and-traits.md src/generics.md\n#: src/std-types.md src/std-traits.md src/memory-management.md\n#: src/smart-pointers.md src/borrowing.md src/slices-and-lifetimes.md\n#: src/iterators.md src/modules.md src/testing.md src/error-handling.md\n#: src/unsafe-rust.md\nmsgid \"In this segment:\"\nmsgstr \"主題內容：\"\n\n#: src/hello-world.md\nmsgid \"[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)\"\nmsgstr \"[什麼是 Rust？](./hello-world/what-is-rust.md) (10 分鐘)\"\n\n#: src/hello-world.md\nmsgid \"[Benefits of Rust](./hello-world/benefits.md) (3 minutes)\"\nmsgstr \"[Rust 的優點](./hello-world/benefits.md) (3 分鐘)\"\n\n#: src/hello-world.md\nmsgid \"[Playground](./hello-world/playground.md) (2 minutes)\"\nmsgstr \"[Playground](./hello-world/playground.md) (2 分鐘)\"\n\n#: src/hello-world.md\nmsgid \"This segment should take about 15 minutes\"\nmsgstr \"講解這個主題大約需要 15 分鐘\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust is a new programming language which had its [1.0 release in 2015]\"\n\"(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):\"\nmsgstr \"\"\n\"Rust 是一款新的程式設計語言，[在 2015 年推出 1.0 版](https://blog.rust-lang.\"\n\"org/2015/05/15/Rust-1.0.html)：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is a statically compiled language in a similar role as C++\"\nmsgstr \"Rust 是靜態編譯的程式語言，功能與 C++ 類似\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"`rustc` uses LLVM as its backend.\"\nmsgstr \"`rustc` 使用 LLVM 做為後端。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Rust supports many [platforms and architectures](https://doc.rust-lang.org/\"\n\"nightly/rustc/platform-support.html):\"\nmsgstr \"\"\n\"Rust 支援許多[平台和架構](https://doc.rust-lang.org/nightly/rustc/platform-\"\n\"support.html)：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"x86, ARM, WebAssembly, ...\"\nmsgstr \"x86、ARM、WebAssembly...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Linux, Mac, Windows, ...\"\nmsgstr \"Linux、Mac、Windows...\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust is used for a wide range of devices:\"\nmsgstr \"Rust 適用於多種裝置：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"firmware and boot loaders,\"\nmsgstr \"韌體和啟動載入器\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"smart displays,\"\nmsgstr \"智慧螢幕、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"mobile phones,\"\nmsgstr \"手機、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"desktops,\"\nmsgstr \"電腦、\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"servers.\"\nmsgstr \"伺服器。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Rust fits in the same area as C++:\"\nmsgstr \"Rust 適合用於與 C++ 同樣的領域，且具有以下特色：\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High flexibility.\"\nmsgstr \"高靈活性。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"High level of control.\"\nmsgstr \"提供高度主控權。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"\"\n\"Can be scaled down to very constrained devices such as microcontrollers.\"\nmsgstr \"可縮減到十分受限的裝置規模，例如微控制器。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Has no runtime or garbage collection.\"\nmsgstr \"沒有執行階段，也不使用垃圾收集機制。\"\n\n#: src/hello-world/what-is-rust.md\nmsgid \"Focuses on reliability and safety without sacrificing performance.\"\nmsgstr \"著重可靠性和安全性，但不犧牲效能。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Some unique selling points of Rust:\"\nmsgstr \"Rust 的幾個獨特賣點如下：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Compile time memory safety_ - whole classes of memory bugs are prevented at \"\n\"compile time\"\nmsgstr \"「編譯期的記憶體安全性」 - 在編譯期間就能避免各類記憶體錯誤\"\n\n#: src/hello-world/benefits.md\nmsgid \"No uninitialized variables.\"\nmsgstr \"不會產生未初始化的變數。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No double-frees.\"\nmsgstr \"不會導致重複釋放記憶體。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No use-after-free.\"\nmsgstr \"不會使用已釋放的記憶體。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No `NULL` pointers.\"\nmsgstr \"不會產生 `NULL` 指標。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No forgotten locked mutexes.\"\nmsgstr \"不會產生忘記鎖定的互斥鎖。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No data races between threads.\"\nmsgstr \"執行緒之間不會發生資料競爭。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No iterator invalidation.\"\nmsgstr \"不會發生疊代器無效的情形。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_No undefined runtime behavior_ - what a Rust statement does is never left \"\n\"unspecified\"\nmsgstr \"\"\n\"「不會出現未定義的執行階段行為 (undefined runtime behavior)」 - Rust 陳述式的\"\n\"行為一律會有定義\"\n\n#: src/hello-world/benefits.md\nmsgid \"Array access is bounds checked.\"\nmsgstr \"陣列存取行為會經過邊界檢查。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Integer overflow is defined (panic or wrap-around).\"\nmsgstr \"整數溢位的行為是明確的 (恐慌或迴繞)。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"_Modern language features_ - as expressive and ergonomic as higher-level \"\n\"languages\"\nmsgstr \"「現代化的語言特徵」 - 具表現力且符合人因工程學的高階語言\"\n\n#: src/hello-world/benefits.md\nmsgid \"Enums and pattern matching.\"\nmsgstr \"列舉和模式配對。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Generics.\"\nmsgstr \"泛型。\"\n\n#: src/hello-world/benefits.md\nmsgid \"No overhead FFI.\"\nmsgstr \"沒有 FFI 負擔。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Zero-cost abstractions.\"\nmsgstr \"零成本的抽象化機制。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Great compiler errors.\"\nmsgstr \"更好的編譯錯誤描述。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in dependency manager.\"\nmsgstr \"內建依附元件管理工具。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Built-in support for testing.\"\nmsgstr \"內建測試支援。\"\n\n#: src/hello-world/benefits.md\nmsgid \"Excellent Language Server Protocol support.\"\nmsgstr \"卓越的語言伺服器通訊協定支援。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Do not spend much time here. All of these points will be covered in more \"\n\"depth later.\"\nmsgstr \"這裡不要花太多時間。這幾點稍後全都會深入介紹。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Make sure to ask the class which languages they have experience with. \"\n\"Depending on the answer you can highlight different features of Rust:\"\nmsgstr \"\"\n\"請務必詢問全班同學，瞭解他們具備哪些語言的使用經驗。根據學生答覆，您可以強調\"\n\"不同的 Rust 功能：\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ \"\n\"via the borrow checker. You get performance like in C and C++, but you don't \"\n\"have the memory unsafety issues. In addition, you get a modern language with \"\n\"constructs like pattern matching and built-in dependency management.\"\nmsgstr \"\"\n\"具備 C 或 C++ 經驗：Rust 會透過借用檢查器，徹底刪除一整類的「執行階段錯誤」。\"\n\"這不僅可讓您獲得像是 C 和 C++ 的效能，也不會造成記憶體安全問題。此外，您還能\"\n\"取得具備模式配對、內建依附元件管理機制等結構的新型語言。\"\n\n#: src/hello-world/benefits.md\nmsgid \"\"\n\"Experience with Java, Go, Python, JavaScript...: You get the same memory \"\n\"safety as in those languages, plus a similar high-level language feeling. In \"\n\"addition you get fast and predictable performance like C and C++ (no garbage \"\n\"collector) as well as access to low-level hardware (should you need it)\"\nmsgstr \"\"\n\"具備 Java、Go、Python、JavaScript...經驗：Rust 能讓您享有與這些語言相同的記憶\"\n\"體安全性，而且還可帶來使用類似高階語言的感受。此外，您也能獲得像 C 和 C++ 一\"\n\"樣快速可預期的成效 (無垃圾收集器)，以及低階硬體的存取權限 (如有需要)。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to \"\n\"run short Rust programs, and is the basis for the examples and exercises in \"\n\"this course. Try running the \\\"hello-world\\\" program it starts with. It \"\n\"comes with a few handy features:\"\nmsgstr \"\"\n\"[Rust Playground](https://play.rust-lang.org/) 支援以簡便方式執行精簡的 Rust \"\n\"程式，也是本課程中範例和練習的基礎。不妨試著執行 Rust Playground 開頭的\"\n\"「hello-world」程式。Playground 兼具以下幾項便利功能：\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Under \\\"Tools\\\", use the `rustfmt` option to format your code in the \"\n\"\\\"standard\\\" way.\"\nmsgstr \"在「Tools」下方點選「`rustfmt`」選項，以「標準」方式設定程式碼格式。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"Rust has two main \\\"profiles\\\" for generating code: Debug (extra runtime \"\n\"checks, less optimization) and Release (fewer runtime checks, lots of \"\n\"optimization). These are accessible under \\\"Debug\\\" at the top.\"\nmsgstr \"\"\n\"Rust 有兩個主要的「設定檔」可產生程式碼，分別是「Debug」(加強執行階段檢查，最\"\n\"佳化程度較低) 和「Release」(減少執行階段檢查，大規模最佳化)。這些設定檔位於頂\"\n\"端的「Debug」下方。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"If you're interested, use \\\"ASM\\\" under \\\"...\\\" to see the generated \"\n\"assembly code.\"\nmsgstr \"感興趣的話，不妨點選「...」下的「ASM」查看產生的組語程式碼。\"\n\n#: src/hello-world/playground.md\nmsgid \"\"\n\"As students head into the break, encourage them to open up the playground \"\n\"and experiment a little. Encourage them to keep the tab open and try things \"\n\"out during the rest of the course. This is particularly helpful for advanced \"\n\"students who want to know more about Rust's optimizations or generated \"\n\"assembly.\"\nmsgstr \"\"\n\"學員準備休息時，請鼓勵他們開啟 Playground 略微試驗一下。在剩餘的課堂時間，建\"\n\"議他們持續開啟 Playground 分頁嘗試操作。如果學生程度較高，想進一步瞭解 Rust \"\n\"的最佳化作業或產生的組語，就特別適合採用這個授課方式。\"\n\n#: src/types-and-values.md\nmsgid \"[Hello, World](./types-and-values/hello-world.md) (5 minutes)\"\nmsgstr \"[Hello, World](./types-and-values/hello-world.md) (5 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Variables](./types-and-values/variables.md) (5 minutes)\"\nmsgstr \"[變數](./types-and-values/variables.md) (5 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Values](./types-and-values/values.md) (5 minutes)\"\nmsgstr \"[值](./types-and-values/values.md) (5 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)\"\nmsgstr \"[算術](./types-and-values/arithmetic.md) (3 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Strings](./types-and-values/strings.md) (5 minutes)\"\nmsgstr \"[字串](./types-and-values/strings.md) (5 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Type Inference](./types-and-values/inference.md) (3 minutes)\"\nmsgstr \"[型別推斷](./types-and-values/inference.md) (3 分鐘)\"\n\n#: src/types-and-values.md\nmsgid \"[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)\"\nmsgstr \"[練習：費波那契數列](./types-and-values/exercise.md) (15 分鐘)\"\n\n#: src/types-and-values.md src/methods-and-traits.md src/iterators.md\n#: src/testing.md\nmsgid \"This segment should take about 45 minutes\"\nmsgstr \"講解這個主題大約需要 45 分鐘\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Let us jump into the simplest possible Rust program, a classic Hello World \"\n\"program:\"\nmsgstr \"我們直接來看看最簡單的 Rust 程式吧，也就是經典的 Hello World 程式：\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\\\"Hello 🌍!\\\"\"\nmsgstr \"\\\"Hello 🌍!\\\"\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"What you see:\"\nmsgstr \"您會看到：\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Functions are introduced with `fn`.\"\nmsgstr \"函式是以 `fn` 導入。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Blocks are delimited by curly braces like in C and C++.\"\nmsgstr \"區塊會用大括號分隔，這跟在 C 和 C++ 一樣。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"The `main` function is the entry point of the program.\"\nmsgstr \"`main` 函式是程式的進入點。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust has hygienic macros, `println!` is an example of this.\"\nmsgstr \"Rust 含有衛生巨集，例如 `println!`。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust strings are UTF-8 encoded and can contain any Unicode character.\"\nmsgstr \"Rust 字串採用 UTF-8 編碼，可包含任何萬國碼字元。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"This slide tries to make the students comfortable with Rust code. They will \"\n\"see a ton of it over the next four days so we start small with something \"\n\"familiar.\"\nmsgstr \"\"\n\"我們會藉由這張投影片，試著讓學生熟悉 Rust 程式碼。在接下來的四天裡，他們會大\"\n\"量接觸到這些內容，所以我們得從他們熟悉的小地方著手。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is very much like other languages in the C/C++/Java tradition. It is \"\n\"imperative and it doesn't try to reinvent things unless absolutely necessary.\"\nmsgstr \"\"\n\"Rust 與 C/C++/Java 傳統中的其他語言非常相似。它是指令式的程式語言，除非絕對必\"\n\"要，否則不會嘗試改編任何內容。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"Rust is modern with full support for things like Unicode.\"\nmsgstr \"Rust 是現代的程式語言，可完整支援萬國碼等等。\"\n\n#: src/types-and-values/hello-world.md\n#, fuzzy\nmsgid \"\"\n\"Rust uses macros for situations where you want to have a variable number of \"\n\"arguments (no function [overloading](../control-flow-basics/functions.md)).\"\nmsgstr \"\"\n\"當您想使用可變數量的引數時 (亦即無任何函式[超載](basic-syntax/functions-\"\n\"interlude.md))，可使用 Rust 的巨集。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Macros being 'hygienic' means they don't accidentally capture identifiers \"\n\"from the scope they are used in. Rust macros are actually only [partially \"\n\"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.\"\n\"html).\"\nmsgstr \"\"\n\"所謂「衛生」巨集，是指這類巨集不會誤從自身所用於的範圍內擷取 ID。Rust 巨集實\"\n\"際上只能算是[部分衛生](https://veykril.github.io/tlborm/decl-macros/minutiae/\"\n\"hygiene.html)的巨集。\"\n\n#: src/types-and-values/hello-world.md\nmsgid \"\"\n\"Rust is multi-paradigm. For example, it has powerful [object-oriented \"\n\"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, \"\n\"while it is not a functional language, it includes a range of [functional \"\n\"concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html).\"\nmsgstr \"\"\n\"Rust 是多範式的語言。舉例來說，它具備強大的[物件導向程式設計功能](https://\"\n\"doc.rust-lang.org/book/ch17-00-oop.html)，雖然並非函式語言，卻涉及各式各樣的\"\n\"[函式概念](https://doc.rust-lang.org/book/ch13-00-functional-features.html)。\"\n\n#: src/types-and-values/variables.md\n#, fuzzy\nmsgid \"\"\n\"Rust provides type safety via static typing. Variable bindings are made with \"\n\"`let`:\"\nmsgstr \"Rust 可透過靜態型別確保型別安全。根據預設，變數綁定不可變動：\"\n\n#: src/types-and-values/variables.md src/control-flow-basics/loops/for.md\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"x: {x}\\\"\"\nmsgstr \"\\\"x: {x}\\\"\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\nmsgstr \"\"\n\"// x = 20;\\n\"\n\"    // println!(\\\"x: {x}\\\");\\n\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"Uncomment the `x = 20` to demonstrate that variables are immutable by \"\n\"default. Add the `mut` keyword to allow changes.\"\nmsgstr \"\"\n\"取消註解 `x = 20`，證明變數預設為不可變動。如要允許變更，請加入 `mut` 關鍵\"\n\"字。\"\n\n#: src/types-and-values/variables.md\nmsgid \"\"\n\"The `i32` here is the type of the variable. This must be known at compile \"\n\"time, but type inference (covered later) allows the programmer to omit it in \"\n\"many cases.\"\nmsgstr \"\"\n\"這裡的 `i32` 是變數型別。這是編譯器必須在編譯期間掌握的資訊，但透過型別推斷 \"\n\"(稍後會說明)，程式設計師在許多情況下都能省略其型別宣告。\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"Here are some basic built-in types, and the syntax for literal values of \"\n\"each type.\"\nmsgstr \"以下列出一些基本的內建型別，以及適用於各型的字面常量的語法。\"\n\n#: src/types-and-values/values.md src/unsafe-rust/exercise.md\nmsgid \"Types\"\nmsgstr \"類型\"\n\n#: src/types-and-values/values.md\nmsgid \"Literals\"\nmsgstr \"常值\"\n\n#: src/types-and-values/values.md\nmsgid \"Signed integers\"\nmsgstr \"帶號整數\"\n\n#: src/types-and-values/values.md\nmsgid \"`i8`, `i16`, `i32`, `i64`, `i128`, `isize`\"\nmsgstr \"`i8`、`i16`、`i32`、`i64`、`i128`、`isize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`-10`, `0`, `1_000`, `123_i64`\"\nmsgstr \"`-10`、`0`、`1_000`、`123_i64`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unsigned integers\"\nmsgstr \"非帶號整數\"\n\n#: src/types-and-values/values.md\nmsgid \"`u8`, `u16`, `u32`, `u64`, `u128`, `usize`\"\nmsgstr \"`u8`、`u16`、`u32`、`u64`、`u128`、`usize`\"\n\n#: src/types-and-values/values.md\nmsgid \"`0`, `123`, `10_u16`\"\nmsgstr \"`0`、`123`、`10_u16`\"\n\n#: src/types-and-values/values.md\nmsgid \"Floating point numbers\"\nmsgstr \"浮點數\"\n\n#: src/types-and-values/values.md\nmsgid \"`f32`, `f64`\"\nmsgstr \"`f32`、`f64`\"\n\n#: src/types-and-values/values.md\nmsgid \"`3.14`, `-10.0e20`, `2_f32`\"\nmsgstr \"`3.14`、`-10.0e20`、`2_f32`\"\n\n#: src/types-and-values/values.md\nmsgid \"Unicode scalar values\"\nmsgstr \"萬國碼純量值\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`char`\"\nmsgstr \"`char`\"\n\n#: src/types-and-values/values.md\nmsgid \"`'a'`, `'α'`, `'∞'`\"\nmsgstr \"`'a'`、`'α'`、`'∞'`\"\n\n#: src/types-and-values/values.md\nmsgid \"Booleans\"\nmsgstr \"布林值\"\n\n#: src/types-and-values/values.md src/android/aidl/types/primitives.md\nmsgid \"`bool`\"\nmsgstr \"`bool`\"\n\n#: src/types-and-values/values.md\nmsgid \"`true`, `false`\"\nmsgstr \"`true`、`false`\"\n\n#: src/types-and-values/values.md\nmsgid \"The types have widths as follows:\"\nmsgstr \"型別的寬度如下：\"\n\n#: src/types-and-values/values.md\nmsgid \"`iN`, `uN`, and `fN` are _N_ bits wide,\"\nmsgstr \"`iN`、`uN` 和 `fN` 的寬度為 _N_ 位元\"\n\n#: src/types-and-values/values.md\nmsgid \"`isize` and `usize` are the width of a pointer,\"\nmsgstr \"`isize` 和 `usize` 等同於指標的寬度\"\n\n#: src/types-and-values/values.md\nmsgid \"`char` is 32 bits wide,\"\nmsgstr \"`char` 寬度為 32 位元\"\n\n#: src/types-and-values/values.md\nmsgid \"`bool` is 8 bits wide.\"\nmsgstr \"`bool` 寬度為 8 位元\"\n\n#: src/types-and-values/values.md\nmsgid \"There are a few syntaxes which are not shown above:\"\nmsgstr \"除此之外，還有一些其他語法：\"\n\n#: src/types-and-values/values.md\nmsgid \"\"\n\"All underscores in numbers can be left out, they are for legibility only. So \"\n\"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written \"\n\"as `123i64`.\"\nmsgstr \"\"\n\"數字中的底線全都可以省略，寫出來只是為了方便閱讀。換句話說，`1_000` 可以寫成 \"\n\"`1000` (或 `10_00`)，而 `123_i64` 則可寫成 `123i64`。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\\\"result: {}\\\"\"\nmsgstr \"\\\"result: {}\\\"\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"This is the first time we've seen a function other than `main`, but the \"\n\"meaning should be clear: it takes three integers, and returns an integer. \"\n\"Functions will be covered in more detail later.\"\nmsgstr \"\"\n\"這是我們第一次看到 `main` 以外的函式，但此函式的含意應該很清楚，那就是它需要\"\n\"三個整數，且會傳回整數。我們稍後會詳細說明函式的細節。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"Arithmetic is very similar to other languages, with similar precedence.\"\nmsgstr \"在其他語言中，算數的方法非常相似，運算的優先順序也雷同。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"What about integer overflow? In C and C++ overflow of _signed_ integers is \"\n\"actually undefined, and might do different things on different platforms or \"\n\"compilers. In Rust, it's defined.\"\nmsgstr \"\"\n\"那麼整數溢位現象呢？在 C 和 C++ 中，「有號」整數的溢位現象實際上並未定義，而\"\n\"且在不同的平台或編譯器上可能有不同行為。但在 Rust 中，整數溢位會經過定義。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"Change the `i32`'s to `i16` to see an integer overflow, which panics \"\n\"(checked) in a debug build and wraps in a release build. There are other \"\n\"options, such as overflowing, saturating, and carrying. These are accessed \"\n\"with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`.\"\nmsgstr \"\"\n\"將 `i32` 變更為 `i16`，即可查看整數溢位現象，這在偵錯版本中會造成恐慌 \"\n\"(checked)，並納入發布子版本中。此外，Rust 還提供溢位、飽和與進位等其他選項，\"\n\"可透過方法語法存取，例如 `(a * b).saturating_add(b * c).saturating_add(c * \"\n\"a)`。\"\n\n#: src/types-and-values/arithmetic.md\nmsgid \"\"\n\"In fact, the compiler will detect overflow of constant expressions, which is \"\n\"why the example requires a separate function.\"\nmsgstr \"\"\n\"事實上，編譯器會偵測常數運算式的溢位，這也是本例中需要另一個函式的原因。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Rust has two types to represent strings, both of which will be covered in \"\n\"more depth later. Both _always_ store UTF-8 encoded strings.\"\nmsgstr \"\"\n\"Rust 用來代表字串的型別有兩種，稍後會深入介紹。兩者「一律」都儲存 UTF-8 編碼\"\n\"字串。\"\n\n#: src/types-and-values/strings.md\n#, fuzzy\nmsgid \"`String` - a modifiable, owned string.\"\nmsgstr \"`String` 是可變動的字串緩衝區。\"\n\n#: src/types-and-values/strings.md\nmsgid \"`&str` - a read-only string. String literals have this type.\"\nmsgstr \"`&str` - 這是唯讀字串。字串常量會採用此型別。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"Greetings\\\"\"\nmsgstr \"\\\"Greetings\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"🪐\\\"\"\nmsgstr \"\\\"🪐\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\", \\\"\"\nmsgstr \"\\\", \\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"\\\"final sentence: {}\\\"\"\nmsgstr \"\\\"final sentence: {}\\\"\"\n\n#: src/types-and-values/strings.md\n#: src/methods-and-traits/traits/associated-types.md\n#: src/async/control-flow/join.md\nmsgid \"\\\"{:?}\\\"\"\nmsgstr \"\\\"{:?}\\\"\"\n\n#: src/types-and-values/strings.md\nmsgid \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\nmsgstr \"//println!(\\\"{:?}\\\", &sentence[12..13]);\\n\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"This slide introduces strings. Everything here will be covered in more depth \"\n\"later, but this is enough for subsequent slides and exercises to use strings.\"\nmsgstr \"\"\n\"這張投影片用於介紹字串。我們稍後會深入介紹此處提及的所有內容，但目前這些就已\"\n\"足夠用於後續的投影片和使用字串的練習題中。\"\n\n#: src/types-and-values/strings.md\nmsgid \"Invalid UTF-8 in a string is UB, and this not allowed in safe Rust.\"\nmsgstr \"字串中的無效 UTF-8 屬於 UB，而安全的 Rust 環境不允許此行為。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"`String` is a user-defined type with a constructor (`::new()`) and methods \"\n\"like `s.push_str(..)`.\"\nmsgstr \"\"\n\"`String` 是使用者定義的型別，具備建構函式 (`::new()`) 和 `s.push_str(..)` 等\"\n\"方法。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The `&` in `&str` indicates that this is a reference. We will cover \"\n\"references later, so for now just think of `&str` as a unit meaning \\\"a read-\"\n\"only string\\\".\"\nmsgstr \"\"\n\"`&str` 中的 `&` 表示這是參照。我們稍後會講解何謂參照，因此現在只需將 `&str` \"\n\"視為代表「唯讀字串」的單位就行了。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"The commented-out line is indexing into the string by byte position. \"\n\"`12..13` does not end on a character boundary, so the program panics. Adjust \"\n\"it to a range that does, based on the error message.\"\nmsgstr \"\"\n\"被註解掉的那行程式碼會按照位元組位置建立索引到字串中。`12..13` 的結尾不是字元\"\n\"邊界，因此程式會發生恐慌。請根據錯誤訊息，將其調整至結尾為字元邊界的範圍。\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Raw strings allow you to create a `&str` value with escapes disabled: \"\n\"`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`. You can embed double-quotes by using an equal \"\n\"amount of `#` on either side of the quotes:\"\nmsgstr \"\"\n\"原形字串可讓您建立停用逸出功能的 `&str` 值：`r\\\"\\\\n\\\" == \\\"\\\\\\\\n\\\"`。只要在引\"\n\"號兩側使用等量的 `#`，即可嵌入雙引號：\"\n\n#: src/types-and-values/strings.md\nmsgid \"\"\n\"Using `{:?}` is a convenient way to print array/vector/struct of values for \"\n\"debugging purposes, and it's commonly used in code.\"\nmsgstr \"\"\n\n#: src/types-and-values/inference.md\nmsgid \"Rust will look at how the variable is _used_ to determine the type:\"\nmsgstr \"Rust 會觀察變數的「使用」方式，藉此判斷型別：\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"This slide demonstrates how the Rust compiler infers types based on \"\n\"constraints given by variable declarations and usages.\"\nmsgstr \"\"\n\"這張投影片展示了 Rust 編譯器如何根據變數宣告和用法設下的限制來推斷型別。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"It is very important to emphasize that variables declared like this are not \"\n\"of some sort of dynamic \\\"any type\\\" that can hold any data. The machine \"\n\"code generated by such declaration is identical to the explicit declaration \"\n\"of a type. The compiler does the job for us and helps us write more concise \"\n\"code.\"\nmsgstr \"\"\n\"請務必強調，以這種方式宣告的變數，並非「任一型別」這類可存放任何資料的動態型\"\n\"別。此類宣告產生的機器碼與型別的明確宣告相同。編譯器會替我們執行工作，並協助\"\n\"編寫更精簡的程式碼。\"\n\n#: src/types-and-values/inference.md\nmsgid \"\"\n\"When nothing constrains the type of an integer literal, Rust defaults to \"\n\"`i32`. This sometimes appears as `{integer}` in error messages. Similarly, \"\n\"floating-point literals default to `f64`.\"\nmsgstr \"\"\n\"當整數常量的型別無任何限制時，Rust 會預設使用 `i32`。這有時會在錯誤訊息中顯示\"\n\"為「{integer}」。同樣地，浮點常量會預設為 `f64`。\"\n\n#: src/types-and-values/inference.md\nmsgid \"// ERROR: no implementation for `{float} == {integer}`\\n\"\nmsgstr \"// ERROR: no implementation for `{float} == {integer}`\\n\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"The first and second Fibonacci numbers are both `1`. For n>2, the n'th \"\n\"Fibonacci number is calculated recursively as the sum of the n-1'th and \"\n\"n-2'th Fibonacci numbers.\"\nmsgstr \"\"\n\"第一和第二個費波那契數都是 `1`。當 n>2 時，第 n 個費波那契數會以遞迴方式計算\"\n\"為第 n-1 和第 n-2 個費波那契數的和。\"\n\n#: src/types-and-values/exercise.md\nmsgid \"\"\n\"Write a function `fib(n)` that calculates the n'th Fibonacci number. When \"\n\"will this function panic?\"\nmsgstr \"\"\n\"編寫用於計算第 n 個費波那契數的 `fib(n)` 函式。這個函式何時會發生恐慌？\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The base case.\\n\"\nmsgstr \"// The base case.\\n\"\n\n#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md\n#, fuzzy\nmsgid \"\\\"Implement this\\\"\"\nmsgstr \"實作\"\n\n#: src/types-and-values/exercise.md\nmsgid \"// The recursive case.\\n\"\nmsgstr \"// The recursive case.\\n\"\n\n#: src/types-and-values/exercise.md src/types-and-values/solution.md\nmsgid \"\\\"fib(n) = {}\\\"\"\nmsgstr \"\\\"fib(n) = {}\\\"\"\n\n#: src/control-flow-basics.md\n#, fuzzy\nmsgid \"[if Expressions](./control-flow-basics/if.md) (4 minutes)\"\nmsgstr \"[巨集](./control-flow-basics/macros.md) (2 分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Loops](./control-flow-basics/loops.md) (5 minutes)\"\nmsgstr \"[迴圈](./control-flow-basics/loops.md) (5 分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)\"\nmsgstr \"[break 和 continue](./control-flow-basics/break-continue.md) (4 分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)\"\nmsgstr \"\"\n\"[區塊 (block) 和範疇 (scope)](./control-flow-basics/blocks-and-scopes.md) (5 \"\n\"分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Functions](./control-flow-basics/functions.md) (3 minutes)\"\nmsgstr \"[函式](./control-flow-basics/functions.md) (3 分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"[Macros](./control-flow-basics/macros.md) (2 minutes)\"\nmsgstr \"[巨集](./control-flow-basics/macros.md) (2 分鐘)\"\n\n#: src/control-flow-basics.md\nmsgid \"\"\n\"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)\"\nmsgstr \"[練習：考拉茲序列](./control-flow-basics/exercise.md) (15 分鐘)\"\n\n#: src/control-flow-basics.md src/generics.md src/modules.md\nmsgid \"This segment should take about 40 minutes\"\nmsgstr \"講解這個主題大約需要 40 分鐘\"\n\n#: src/control-flow-basics/if.md\nmsgid \"`if` expressions\"\nmsgstr \"`if` 表達式\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"You use [`if` expressions](https://doc.rust-lang.org/reference/expressions/\"\n\"if-expr.html#if-expressions) exactly like `if` statements in other languages:\"\nmsgstr \"\"\n\"你可以像在其他語言中使用 `if` 陳述式那樣地使用 [`if` 表達式](https://doc.\"\n\"rust-lang.org/reference/expressions/if-expr.html#if-expressions)：\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"zero!\\\"\"\nmsgstr \"\\\"zero!\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"biggish\\\"\"\nmsgstr \"\\\"biggish\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"huge\\\"\"\nmsgstr \"\\\"huge\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"In addition, you can use `if` as an expression. The last expression of each \"\n\"block becomes the value of the `if` expression:\"\nmsgstr \"\"\n\"此外，你也可以將 `if` 當作表達式使用。每個區塊中的最後一行式子將成為 `if` 表\"\n\"達式的賦值：\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"small\\\"\"\nmsgstr \"\\\"small\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"large\\\"\"\nmsgstr \"\\\"large\\\"\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\\\"number size: {}\\\"\"\nmsgstr \"\\\"number size: {}\\\"\"\n\n#: src/control-flow-basics/if.md\n#, fuzzy\nmsgid \"\"\n\"Because `if` is an expression and must have a particular type, both of its \"\n\"branch blocks must have the same type. Show what happens if you add `;` \"\n\"after `\\\"small\\\"` in the second example.\"\nmsgstr \"\"\n\"因為 `if` 被當作表達式使用，它必須擁有一個特定的型別，因此兩個分支區塊必須擁\"\n\"有同樣的型別。試著在第二個範例中的 `x / 2` 之後加上 `;`，並觀察其結果。\"\n\n#: src/control-flow-basics/if.md\nmsgid \"\"\n\"When `if` is used in an expression, the expression must have a `;` to \"\n\"separate it from the next statement. Remove the `;` before `println!` to see \"\n\"the compiler error.\"\nmsgstr \"\"\n\"在運算式中使用 `if` 時，運算式須有 `;`，才能與下一個陳述式分隔。移除 \"\n\"`println!` 前的 `;` 即可查看編譯器錯誤。\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"There are three looping keywords in Rust: `while`, `loop`, and `for`:\"\nmsgstr \"Rust 中有三個迴圈關鍵字：`while`、`loop` 和 `for`：\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"`while`\"\nmsgstr \"`while`\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\"\n\"The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-\"\n\"expr.html#predicate-loops) works much like in other languages, executing the \"\n\"loop body as long as the condition is true.\"\nmsgstr \"\"\n\"[`while` 關鍵字](https://doc.rust-lang.org/reference/expressions/loop-expr.\"\n\"html#predicate-loops)的運作方式與其他語言非常相似：\"\n\n#: src/control-flow-basics/loops.md\nmsgid \"\\\"Final x: {x}\\\"\"\nmsgstr \"\\\"Final x: {x}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\n#, fuzzy\nmsgid \"\"\n\"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates \"\n\"over ranges of values or the items in a collection:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) 是具有所有權的指\"\n\"向堆積上的資料的指標：\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\\\"elem: {elem}\\\"\"\nmsgstr \"\\\"elem: {elem}\\\"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Under the hood `for` loops use a concept called \\\"iterators\\\" to handle \"\n\"iterating over different kinds of ranges/collections. Iterators will be \"\n\"discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/control-flow-basics/loops/for.md\nmsgid \"\"\n\"Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for \"\n\"an inclusive range.\"\nmsgstr \"\"\n\"請注意，`for` 迴圈只會疊代至 `4`。您可以示範 `1..=5` 語法，這代表含頭尾的範\"\n\"圍。\"\n\n#: src/control-flow-basics/loops/loop.md\n#, fuzzy\nmsgid \"\"\n\"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just \"\n\"loops forever, until a `break`.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 用於定義解構函\"\n\"式。\"\n\n#: src/control-flow-basics/loops/loop.md\nmsgid \"\\\"{i}\\\"\"\nmsgstr \"\\\"{i}\\\"\"\n\n#: src/control-flow-basics/break-continue.md\nmsgid \"\"\n\"If you want to immediately start the next iteration use [`continue`](https://\"\n\"doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions).\"\nmsgstr \"\"\n\"如果你想立即進入下一次迭代，可以使用 [`continue`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#continue-expressions)。\"\n\n#: src/control-flow-basics/break-continue.md\n#, fuzzy\nmsgid \"\"\n\"If you want to exit any kind of loop early, use [`break`](https://doc.rust-\"\n\"lang.org/reference/expressions/loop-expr.html#break-expressions). For \"\n\"`loop`, this can take an optional expression that becomes the value of the \"\n\"`loop` expression.\"\nmsgstr \"\"\n\"如果你想提早跳出迴圈，可以使用 [`break`]((https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions))，\"\n\n#: src/control-flow-basics/break-continue.md src/std-traits/exercise.md\n#: src/std-traits/solution.md src/smart-pointers/trait-objects.md\n#: src/modules/exercise.md src/modules/solution.md\n#: src/android/build-rules/library.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"{}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Both `continue` and `break` can optionally take a label argument which is \"\n\"used to break out of nested loops:\"\nmsgstr \"\"\n\"`continue` 以及 `break` 都可以選擇性地接收一個迴圈標籤，用來跳出巢狀迴圈中的\"\n\"某一層：\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\\\"elements searched: {elements_searched}\\\"\"\nmsgstr \"\"\n\n#: src/control-flow-basics/break-continue/labels.md\nmsgid \"\"\n\"Note that `loop` is the only looping construct which returns a non-trivial \"\n\"value. This is because it's guaranteed to be entered at least once (unlike \"\n\"`while` and `for` loops).\"\nmsgstr \"\"\n\"請注意，`loop` 是唯一會傳回重要值的迴圈結構。這是因為系統保證至少會輸入一次此\"\n\"迴圈結構，這一點不同於 `while` 和 `for` 迴圈。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"Blocks\"\nmsgstr \"區塊\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"A block in Rust contains a sequence of expressions, enclosed by braces `{}`. \"\n\"Each block has a value and a type, which are those of the last expression of \"\n\"the block:\"\nmsgstr \"\"\n\"Rust 中的區塊 (Block) 包含一個數值以及一個型別：數值即為該區塊中的最後一行表\"\n\"達式：\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\\\"y: {y}\\\"\"\nmsgstr \"\\\"y: {y}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\n#, fuzzy\nmsgid \"\"\n\"If the last expression ends with `;`, then the resulting value and type is \"\n\"`()`.\"\nmsgstr \"然而，如果最後一行表達式的結尾為 `;`，則最後的數值及型別皆為 `()`。\"\n\n#: src/control-flow-basics/blocks-and-scopes.md\nmsgid \"\"\n\"You can show how the value of the block changes by changing the last line in \"\n\"the block. For instance, adding/removing a semicolon or using a `return`.\"\nmsgstr \"\"\n\"你可以藉由改變區塊中的最後一行來觀察區塊數值的變化。舉例來說，新增或刪除一個\"\n\"分號，或者使用 `return`。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"A variable's scope is limited to the enclosing block.\"\nmsgstr \"變數的有效範疇受限於封閉其變數的區塊。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"You can shadow variables, both those from outer scopes and variables from \"\n\"the same scope:\"\nmsgstr \"您可以遮蔽變量，包括來自外部範圍以及來自同一範圍的變量：\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"before: {a}\\\"\"\nmsgstr \"\\\"before: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#: src/std-traits/from-and-into.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"hello\\\"\"\nmsgstr \"\\\"hello\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"inner scope: {a}\\\"\"\nmsgstr \"\\\"inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"shadowed in inner scope: {a}\\\"\"\nmsgstr \"\\\"shadowed in inner scope: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\\\"after: {a}\\\"\"\nmsgstr \"\\\"after: {a}\\\"\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Show that a variable's scope is limited by adding a `b` in the inner block \"\n\"in the last example, and then trying to access it outside that block.\"\nmsgstr \"\"\n\"請說明變數的範疇受到限制，做法是在最後一個範例的內部區塊中新增 `b`，然後嘗試\"\n\"在該區塊外部存取 `b`。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"\"\n\"Shadowing is different from mutation, because after shadowing both \"\n\"variable's memory locations exist at the same time. Both are available under \"\n\"the same name, depending where you use it in the code.\"\nmsgstr \"\"\n\"定義：遮蔽與可變數不同，因為在遮蔽之後，兩個變數的記憶體位置會同時存在。這兩\"\n\"者可以使用同一個名稱，具體取決於您在程式碼中使用的位置。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\n#, fuzzy\nmsgid \"A shadowing variable can have a different type.\"\nmsgstr \"遮蔽變數可以有不同的型別。\"\n\n#: src/control-flow-basics/blocks-and-scopes/scopes.md\nmsgid \"\"\n\"Shadowing looks obscure at first, but is convenient for holding on to values \"\n\"after `.unwrap()`.\"\nmsgstr \"遮蔽一開始看起來模糊不清，但對於保留 `.unwrap()` 之後的值很方便。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Declaration parameters are followed by a type (the reverse of some \"\n\"programming languages), then a return type.\"\nmsgstr \"宣告參數後面接有型別 (與某些程式設計語言相反)，然後才是傳回型別。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"The last expression in a function body (or any block) becomes the return \"\n\"value. Simply omit the `;` at the end of the expression. The `return` \"\n\"keyword can be used for early return, but the \\\"bare value\\\" form is \"\n\"idiomatic at the end of a function (refactor `gcd` to use a `return`).\"\nmsgstr \"\"\n\"函式主體 (或任何區塊) 中的最後一個運算式會成為回傳值。您只要省略運算式結尾的 \"\n\"`;` 即可。\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Some functions have no return value, and return the 'unit type', `()`. The \"\n\"compiler will infer this if the `-> ()` return type is omitted.\"\nmsgstr \"\"\n\"某些函式沒有回傳值，會傳回 `()` 這個「單位型別」。如果省略 `-> ()` 傳回型別，\"\n\"編譯器則會推斷出這點。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Overloading is not supported -- each function has a single implementation.\"\nmsgstr \"每個函式都有單一實作項目：\"\n\n#: src/control-flow-basics/functions.md\nmsgid \"\"\n\"Always takes a fixed number of parameters. Default arguments are not \"\n\"supported. Macros can be used to support variadic functions.\"\nmsgstr \"\"\n\"請一律採用定量參數。系統不支援預設引數。如要支援可變參數函式，請使用巨集。\"\n\n#: src/control-flow-basics/functions.md\n#, fuzzy\nmsgid \"\"\n\"Always takes a single set of parameter types. These types can be generic, \"\n\"which will be covered later.\"\nmsgstr \"一律採用單組參數型別。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"Macros are expanded into Rust code during compilation, and can take a \"\n\"variable number of arguments. They are distinguished by a `!` at the end. \"\n\"The Rust standard library includes an assortment of useful macros.\"\nmsgstr \"\"\n\"巨集會在編譯期間展開為 Rust 程式碼，並可接受可變數量的引數。我們可透過結尾的 \"\n\"`!` 來辨別巨集。Rust 標準程式庫包含各式實用巨集。\"\n\n#: src/control-flow-basics/macros.md\n#, fuzzy\nmsgid \"\"\n\"`println!(format, ..)` prints a line to standard output, applying formatting \"\n\"described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html).\"\nmsgstr \"\"\n\"運算子超載會透過 [`std::ops`](https://doc.rust-lang.org/std/ops/index.html): \"\n\"內的特徵實作：\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`format!(format, ..)` works just like `println!` but returns the result as a \"\n\"string.\"\nmsgstr \"\"\n\"`format!(format, ..)` 的運作方式與 `println!` 類似，但會以字串形式傳回結果。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"`dbg!(expression)` logs the value of the expression and returns it.\"\nmsgstr \"`dbg!(expression)` 會記錄並傳回運算式的值。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`todo!()` marks a bit of code as not-yet-implemented. If executed, it will \"\n\"panic.\"\nmsgstr \"`todo!()` 可將一小段程式碼標示為尚未實作，但執行後會發生恐慌。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"`unreachable!()` marks a bit of code as unreachable. If executed, it will \"\n\"panic.\"\nmsgstr \"`unavailable!()` 可將一小段程式碼標示為無法存取，但執行後會發生恐慌。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\\\"{n}! = {}\\\"\"\nmsgstr \"\\\"{n}! = {}\\\"\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The takeaway from this section is that these common conveniences exist, and \"\n\"how to use them. Why they are defined as macros, and what they expand to, is \"\n\"not especially critical.\"\nmsgstr \"\"\n\"本節的重點在於，上述的便利性不僅常見，而且確實存在，學員需瞭解如何運用。至於\"\n\"為何將便利性定義為巨集，以及巨集展開後會變成什麼內容，則沒有那麼重要。\"\n\n#: src/control-flow-basics/macros.md\nmsgid \"\"\n\"The course does not cover defining macros, but a later section will describe \"\n\"use of derive macros.\"\nmsgstr \"本課程不會探討如何定義巨集，但後續章節將說明衍生巨集的用法。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is \"\n\"defined as follows, for an arbitrary n\"\nmsgstr \"\"\n\"[考拉茲序列](https://zh.wikipedia.org/wiki/\"\n\"%E8%80%83%E6%8B%89%E5%85%B9%E7%8C%9C%E6%83%B3)的定義如下，對於任意大於零的數 \"\n\"n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"1\"\nmsgstr \"1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" greater than zero:\"\nmsgstr \" 大於零：\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"If _n\"\nmsgstr \"如果 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i\"\nmsgstr \"i\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is 1, then the sequence terminates at _n\"\nmsgstr \"_ 是 1，那麼序列會終止在 _n \"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_.\"\nmsgstr \"_。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is even, then _n\"\nmsgstr \"_ 是偶數，那麼 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"i+1\"\nmsgstr \"i+1\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = n\"\nmsgstr \" = n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" / 2_.\"\nmsgstr \" / 2_。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ is odd, then _n\"\nmsgstr \"_ 是奇數，那麼 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" = 3 * n\"\nmsgstr \" = 3 * n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \" + 1_.\"\nmsgstr \" + 1_。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"For example, beginning with _n\"\nmsgstr \"假設我們從 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3:\"\nmsgstr \"_ = 3 開始：\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"3 is odd, so _n\"\nmsgstr \"3 是奇數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2\"\nmsgstr \"2\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 3 + 1 = 10;\"\nmsgstr \"_ = 3 * 3 + 1 = 10；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"10 is even, so _n\"\nmsgstr \"10 是偶數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"3\"\nmsgstr \"3\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 10 / 2 = 5;\"\nmsgstr \"_ = 10 / 2 = 5；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5 is odd, so _n\"\nmsgstr \"5 是奇數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"4\"\nmsgstr \"4\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 3 * 5 + 1 = 16;\"\nmsgstr \"_ = 3 * 5 + 1 = 16；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"16 is even, so _n\"\nmsgstr \"16 是偶數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"5\"\nmsgstr \"5\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 16 / 2 = 8;\"\nmsgstr \"_ = 16 / 2 = 8；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"8 is even, so _n\"\nmsgstr \"8 是偶數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"6\"\nmsgstr \"6\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 8 / 2 = 4;\"\nmsgstr \"_ = 8 / 2 = 4；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"4 is even, so _n\"\nmsgstr \"4 是偶數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"7\"\nmsgstr \"7\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 4 / 2 = 2;\"\nmsgstr \"_ = 4 / 2 = 2；\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"2 is even, so _n\"\nmsgstr \"2 是偶數，所以 _n\"\n\n#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md\nmsgid \"8\"\nmsgstr \"8\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"_ = 1; and\"\nmsgstr \"_ = 1；之後\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"the sequence terminates.\"\nmsgstr \"序列就會終止。\"\n\n#: src/control-flow-basics/exercise.md\nmsgid \"\"\n\"Write a function to calculate the length of the collatz sequence for a given \"\n\"initial `n`.\"\nmsgstr \"給定初始 `n`，請編寫一個函式來計算考拉茲序列的長度。\"\n\n#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md\nmsgid \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\nmsgstr \"/// Determine the length of the collatz sequence beginning at `n`.\\n\"\n\n#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md\nmsgid \"\\\"Length: {}\\\"\"\nmsgstr \"\\\"Length: {}\\\"\"\n\n#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md\n#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md\n#, fuzzy\nmsgid \"Welcome Back\"\nmsgstr \"歡迎\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)\"\nmsgstr \"[元組和陣列](./tuples-and-arrays.md) (35 分鐘)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[References](./references.md) (35 minutes)\"\nmsgstr \"[參照](./references.md) (35 分鐘)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"[User-Defined Types](./user-defined-types.md) (50 minutes)\"\nmsgstr \"[使用者定義的型別](./user-defined-types.md) (50 分鐘)\"\n\n#: src/welcome-day-1-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 15 \"\n\"minutes\"\nmsgstr \"加上 10 分鐘的休息時間，這個課程大約需要 2 小時 15 分鐘\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)\"\nmsgstr \"[元組和陣列](./tuples-and-arrays/tuples-and-arrays.md) (5 分鐘)\"\n\n#: src/tuples-and-arrays.md\n#, fuzzy\nmsgid \"[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)\"\nmsgstr \"[元組和陣列](./tuples-and-arrays/tuples-and-arrays.md) (10 分鐘)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)\"\nmsgstr \"[陣列疊代](./tuples-and-arrays/iteration.md) (3 分鐘)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"\"\n\"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 \"\n\"minutes)\"\nmsgstr \"[解構](./tuples-and-arrays/destructuring.md) (5 分鐘)\"\n\n#: src/tuples-and-arrays.md\nmsgid \"[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)\"\nmsgstr \"[練習：巢狀陣列](./tuples-and-arrays/exercise.md) (15 分鐘)\"\n\n#: src/tuples-and-arrays.md src/references.md\nmsgid \"This segment should take about 35 minutes\"\nmsgstr \"講解這個主題大約需要 35 分鐘\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"A value of the array type `[T; N]` holds `N` (a compile-time constant) \"\n\"elements of the same type `T`. Note that the length of the array is _part of \"\n\"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two \"\n\"different types. Slices, which have a size determined at runtime, are \"\n\"covered later.\"\nmsgstr \"\"\n\"陣列型別 `[T; N]` 的值會保留同樣屬於 `T` 型別的 `N` (編譯時間常數) 元素。請注\"\n\"意，陣列的長度是「其型別的一部分」，也就是說 `[u8; 3]` 和 `[u8; 4]` 視為兩種\"\n\"不同型別。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Try accessing an out-of-bounds array element. Array accesses are checked at \"\n\"runtime. Rust can usually optimize these checks away, and they can be \"\n\"avoided using unsafe Rust.\"\nmsgstr \"\"\n\"請嘗試存取超出範圍的陣列元素。系統會在執行階段檢查存取陣列的行為。Rust 通常可\"\n\"對這類檢查進行最佳化處理，避免使用不安全的 Rust 執行這些檢查。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"We can use literals to assign values to arrays.\"\nmsgstr \"我們可以使用常值將值指派給陣列。\"\n\n#: src/tuples-and-arrays/arrays.md\n#, fuzzy\nmsgid \"\"\n\"The `println!` macro asks for the debug implementation with the `?` format \"\n\"parameter: `{}` gives the default output, `{:?}` gives the debug output. \"\n\"Types such as integers and strings implement the default output, but arrays \"\n\"only implement the debug output. This means that we must use debug output \"\n\"here.\"\nmsgstr \"\"\n\"在主函式中，輸出陳述式會使用 `?` 格式參數要求偵錯實作：`{}` 提供預設輸出內\"\n\"容，`{:?}` 則提供偵錯輸出內容。我們也可以使用 `{a}` 和 `{a:?}` 而不需指定格式\"\n\"字串後方的值。\"\n\n#: src/tuples-and-arrays/arrays.md\nmsgid \"\"\n\"Adding `#`, eg `{a:#?}`, invokes a \\\"pretty printing\\\" format, which can be \"\n\"easier to read.\"\nmsgstr \"加入 `#` (例如 `{a:#?}`) 可叫用方便閱讀的「美化排版」格式。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Like arrays, tuples have a fixed length.\"\nmsgstr \"和陣列一樣，元組有固定的長度。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"Tuples group together values of different types into a compound type.\"\nmsgstr \"元組會將不同型別的值組成複合型別。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"Fields of a tuple can be accessed by the period and the index of the value, \"\n\"e.g. `t.0`, `t.1`.\"\nmsgstr \"元組的欄位可透過點號和值的索引存取，例如 `t.0`、`t.1`。\"\n\n#: src/tuples-and-arrays/tuples.md\nmsgid \"\"\n\"The empty tuple `()` is referred to as the \\\"unit type\\\" and signifies \"\n\"absence of a return value, akin to `void` in other languages.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"The `for` statement supports iterating over arrays (but not tuples).\"\nmsgstr \"`for` 陳述式支援對陣列進行疊代 (對元組則不支援)。\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"This functionality uses the `IntoIterator` trait, but we haven't covered \"\n\"that yet.\"\nmsgstr \"這項功能使用 `IntoIterator` 特徵，但這部分我們尚未介紹。\"\n\n#: src/tuples-and-arrays/iteration.md\nmsgid \"\"\n\"The `assert_ne!` macro is new here. There are also `assert_eq!` and `assert!\"\n\"` macros. These are always checked while, debug-only variants like \"\n\"`debug_assert!` compile to nothing in release builds.\"\nmsgstr \"\"\n\"`assert_ne!` 是這裡的新巨集。此外還有 `assert_eq!` 和 `assert!` 巨集。系統一\"\n\"律會檢查這些巨集，但如果是 `debug_assert!` 這類僅供偵錯的變體，在發布子版本中\"\n\"會編譯為空白內容。\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"When working with tuples and other structured values it's common to want to \"\n\"extract the inner values into local variables. This can be done manually by \"\n\"directly accessing the inner values:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"left: {left}, right: {right}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"However, Rust also supports using pattern matching to destructure a larger \"\n\"value into its constituent parts:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"This works with any kind of structured value:\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\\\"a: {a}, b: {b}\\\"\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"The patterns used here are \\\"irrefutable\\\", meaning that the compiler can \"\n\"statically verify that the value on the right of `=` has the same structure \"\n\"as the pattern.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"A variable name is an irrefutable pattern that always matches any value, \"\n\"hence why we can also use `let` to declare a single variable.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Rust also supports using patterns in conditionals, allowing for equality \"\n\"comparison and destructuring to happen at the same time. This form of \"\n\"pattern matching will be discussed in more detail later.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/destructuring.md\nmsgid \"\"\n\"Edit the examples above to show the compiler error when the pattern doesn't \"\n\"match the value being matched on.\"\nmsgstr \"\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Arrays can contain other arrays:\"\nmsgstr \"陣列可包含其他陣列：\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"What is the type of this variable?\"\nmsgstr \"思考一下，每個迴圈中的 `word` 型別為何？\"\n\n#: src/tuples-and-arrays/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Use an array such as the above to write a function `transpose` which will \"\n\"transpose a matrix (turn rows into columns):\"\nmsgstr \"\"\n\"使用上述程式碼編寫可用用於美化矩陣排版的 `pretty_print` 函式，以及用於轉置矩\"\n\"陣 (將列轉換為欄) 的 `transpose` 函式：\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"Hard-code both functions to operate on 3 × 3 matrices.\"\nmsgstr \"為這兩個函式進行硬式編碼，以便在 3 × 3 矩陣上執行。\"\n\n#: src/tuples-and-arrays/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n\"functions:\"\nmsgstr \"將下方程式碼複製到 <https://play.rust-lang.org/>，並實作函式：\"\n\n#: src/tuples-and-arrays/exercise.md src/borrowing/exercise.md\n#: src/unsafe-rust/exercise.md\nmsgid \"// TODO: remove this when you're done with your implementation.\\n\"\nmsgstr \"// TODO: remove this when you're done with your implementation.\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"//\\n\"\nmsgstr \"//\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"// <-- the comment makes rustfmt add a newline\\n\"\nmsgstr \"// <-- the comment makes rustfmt add a newline\\n\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"matrix: {:#?}\\\"\"\nmsgstr \"\\\"matrix: {:#?}\\\"\"\n\n#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md\nmsgid \"\\\"transposed: {:#?}\\\"\"\nmsgstr \"\\\"transposed: {:#?}\\\"\"\n\n#: src/references.md\nmsgid \"[Shared References](./references/shared.md) (10 minutes)\"\nmsgstr \"[共用參照](./references/shared.md) (10 分鐘)\"\n\n#: src/references.md\nmsgid \"[Exclusive References](./references/exclusive.md) (10 minutes)\"\nmsgstr \"[專屬參照](./references/Exclusive.md) (10 分鐘)\"\n\n#: src/references.md\nmsgid \"[Exercise: Geometry](./references/exercise.md) (15 minutes)\"\nmsgstr \"[練習：幾何圖形](./references/exercise.md) (15 分鐘)\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference provides a way to access another value without taking \"\n\"responsibility for the value, and is also called \\\"borrowing\\\". Shared \"\n\"references are read-only, and the referenced data cannot change.\"\nmsgstr \"\"\n\"所謂參照，是一種可存取另一值而不對該值負責的方法，也稱為「借用 \"\n\"(borrowing)」。共用的參照僅供唯讀，且其參照的資料無法變更。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference to a type `T` has type `&T`. A reference value is made \"\n\"with the `&` operator. The `*` operator \\\"dereferences\\\" a reference, \"\n\"yielding its value.\"\nmsgstr \"\"\n\"如果是對 `T` 型別的共用參照，就屬於 `&T` 型別。系統會使用 `&` 運算子建立參照\"\n\"值。`*` 運算子則用於將參照「解除參照」，產生參照的值。\"\n\n#: src/references/shared.md\nmsgid \"Rust will statically forbid dangling references:\"\nmsgstr \"Rust 會以靜態方式禁止迷途參照：\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A reference is said to \\\"borrow\\\" the value it refers to, and this is a good \"\n\"model for students not familiar with pointers: code can use the reference to \"\n\"access the value, but is still \\\"owned\\\" by the original variable. The \"\n\"course will get into more detail on ownership in day 3.\"\nmsgstr \"\"\n\"參照可說是「借用」自身參照的值，對不熟悉指標的學生而言，這是不錯的模型，因為\"\n\"程式碼可以使用參照來存取值，但仍歸原始的變數所「擁有」。本課程將在第 3 天進一\"\n\"步說明擁有權。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"References are implemented as pointers, and a key advantage is that they can \"\n\"be much smaller than the thing they point to. Students familiar with C or C+\"\n\"+ will recognize references as pointers. Later parts of the course will \"\n\"cover how Rust prevents the memory-safety bugs that come from using raw \"\n\"pointers.\"\nmsgstr \"\"\n\"參照需以指標的形式實作，主要優點是大小會比指向的目標小得多。熟悉 C 或 C++ 的\"\n\"學生會覺得參照很像指標。在稍後的課程中，我們將介紹 Rust 如何避免使用原始指標\"\n\"導致的記憶體安全錯誤。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust does not automatically create references for you - the `&` is always \"\n\"required.\"\nmsgstr \"Rust 不會自動為您建立參照，一律須使用 `&`。\"\n\n#: src/references/shared.md\n#, fuzzy\nmsgid \"\"\n\"Rust will auto-dereference in some cases, in particular when invoking \"\n\"methods (try `r.is_ascii()`). There is no need for an `->` operator like in \"\n\"C++.\"\nmsgstr \"\"\n\"在某些情況下，尤其是在叫用方法時，Rust 會自動解除參照 (請嘗試使用 `ref_x.\"\n\"count_ones()`)。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"In this example, `r` is mutable so that it can be reassigned (`r = &b`). \"\n\"Note that this re-binds `r`, so that it refers to something else. This is \"\n\"different from C++, where assignment to a reference changes the referenced \"\n\"value.\"\nmsgstr \"\"\n\"這個範例中的 `r` 可變動，因此可以重新指派 (`r = &b`)。請注意，這會重新繫結 \"\n\"`r`，因此會參照其他內容。此方式與 C++ 不同，在 C++ 中，對參照的賦值會變更參照\"\n\"的值。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"A shared reference does not allow modifying the value it refers to, even if \"\n\"that value was mutable. Try `*r = 'X'`.\"\nmsgstr \"\"\n\"共用參照不允許修改其參照的值，即使該值可變動也一樣。請嘗試使用 `*r = 'X'`。\"\n\n#: src/references/shared.md\nmsgid \"\"\n\"Rust is tracking the lifetimes of all references to ensure they live long \"\n\"enough. Dangling references cannot occur in safe Rust. `x_axis` would return \"\n\"a reference to `point`, but `point` will be deallocated when the function \"\n\"returns, so this will not compile.\"\nmsgstr \"\"\n\"Rust 會追蹤所有參照的生命週期，確保其存留時間夠長。在安全的 Rust 中不會發生迷\"\n\"途參照。`x_axis` 會傳回對 `point` 的參照，但在函式傳回時會釋放 `point` ，因此\"\n\"不會編譯。\"\n\n#: src/references/shared.md\nmsgid \"We will talk more about borrowing when we get to ownership.\"\nmsgstr \"我們會在講到擁有權時進一步探討「借用」。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"Exclusive references, also known as mutable references, allow changing the \"\n\"value they refer to. They have type `&mut T`.\"\nmsgstr \"\"\n\"專屬參照 (也稱做可變動參照) 允許變更自身參照的值。這類參照屬於 `&mut T` 型\"\n\"別。\"\n\n#: src/references/exclusive.md\nmsgid \"\"\n\"\\\"Exclusive\\\" means that only this reference can be used to access the \"\n\"value. No other references (shared or exclusive) can exist at the same time, \"\n\"and the referenced value cannot be accessed while the exclusive reference \"\n\"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is \"\n\"alive.\"\nmsgstr \"\"\n\"「專屬」表示只有這個參照可用來存取值。任何其他參照 (不論是共用或專屬參照) 都\"\n\"不可以同時存在，此外，在專屬參照存在的情況下，就無法存取參照的值。請嘗試在 \"\n\"`x_coord` 運作時建立 `&point.0` 或變更 `point.0`。\"\n\n#: src/references/exclusive.md\n#, fuzzy\nmsgid \"\"\n\"Be sure to note the difference between `let mut x_coord: &i32` and `let \"\n\"x_coord: &mut i32`. The first one represents a shared reference which can be \"\n\"bound to different values, while the second represents an exclusive \"\n\"reference to a mutable value.\"\nmsgstr \"\"\n\"請務必留意 `let mut ref_x: &i32` 和 `let ref_x: &mut i32` 的差異。前者代表可\"\n\"變動的參照，可綁定至不同的值；後者則代表可變動值的參照。\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"We will create a few utility functions for 3-dimensional geometry, \"\n\"representing a point as `[f64;3]`. It is up to you to determine the function \"\n\"signatures.\"\nmsgstr \"\"\n\"我們會建立幾個 3D 幾何圖形的公用函式，將點表示為 `[f64;3]`。函式簽章則由您自\"\n\"行決定。\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\nmsgstr \"\"\n\"// Calculate the magnitude of a vector by summing the squares of its \"\n\"coordinates\\n\"\n\"// and taking the square root. Use the `sqrt()` method to calculate the \"\n\"square\\n\"\n\"// root, like `v.sqrt()`.\\n\"\n\n#: src/references/exercise.md\nmsgid \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\nmsgstr \"\"\n\"// Normalize a vector by calculating its magnitude and dividing all of its\\n\"\n\"// coordinates by that magnitude.\\n\"\n\n#: src/references/exercise.md\nmsgid \"// Use the following `main` to test your work.\\n\"\nmsgstr \"// Use the following `main` to test your work.\\n\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of a unit vector: {}\\\"\"\nmsgstr \"\\\"Magnitude of a unit vector: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?}: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?}: {}\\\"\"\n\n#: src/references/exercise.md src/references/solution.md\nmsgid \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\nmsgstr \"\\\"Magnitude of {v:?} after normalization: {}\\\"\"\n\n#: src/references/solution.md\nmsgid \"/// Calculate the magnitude of the given vector.\\n\"\nmsgstr \"/// Calculate the magnitude of the given vector.\\n\"\n\n#: src/references/solution.md\nmsgid \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\nmsgstr \"\"\n\"/// Change the magnitude of the vector to 1.0 without changing its \"\n\"direction.\\n\"\n\n#: src/user-defined-types.md\nmsgid \"[Named Structs](./user-defined-types/named-structs.md) (10 minutes)\"\nmsgstr \"[已命名的結構體](./user-defined-types/named-structs.md) (10 分鐘)\"\n\n#: src/user-defined-types.md\nmsgid \"[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)\"\nmsgstr \"[元組結構體](./user-defined-types/tuple-structs.md) (10 分鐘)\"\n\n#: src/user-defined-types.md\nmsgid \"[Enums](./user-defined-types/enums.md) (5 minutes)\"\nmsgstr \"[列舉](./user-defined-types/enums.md) (5 分鐘)\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)\"\nmsgstr \"[靜態和常數](./user-defined-types/static-and-const.md) (5 分鐘)\"\n\n#: src/user-defined-types.md\nmsgid \"[Type Aliases](./user-defined-types/aliases.md) (2 minutes)\"\nmsgstr \"[型別別名](./user-defined-types/aliases.md) (2 分鐘)\"\n\n#: src/user-defined-types.md\nmsgid \"\"\n\"[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)\"\nmsgstr \"[練習：電梯事件](./user-defined-types/exercise.md) (15 分鐘)\"\n\n#: src/user-defined-types.md src/borrowing.md\nmsgid \"This segment should take about 50 minutes\"\nmsgstr \"講解這個主題大約需要 50 分鐘\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like C and C++, Rust has support for custom structs:\"\nmsgstr \"與 C 和 C++ 一樣，Rust 支援自訂結構體：\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"{} is {} years old\\\"\"\nmsgstr \"\\\"{} is {} years old\\\"\"\n\n#: src/user-defined-types/named-structs.md\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"Peter\\\"\"\nmsgstr \"\\\"Peter\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Avery\\\"\"\nmsgstr \"\\\"Avery\\\"\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\\\"Jackie\\\"\"\nmsgstr \"\\\"Jackie\\\"\"\n\n#: src/user-defined-types/named-structs.md src/user-defined-types/enums.md\n#: src/pattern-matching/match.md src/methods-and-traits/methods.md\nmsgid \"Key Points:\"\nmsgstr \"重點：\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Structs work like in C or C++.\"\nmsgstr \"結構體的運作方式與在 C 或 C++ 中類似。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Like in C++, and unlike in C, no typedef is needed to define a type.\"\nmsgstr \"不需要 typedef 即可定義型別。這與 C++ 類似，但與 C 不同。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"Unlike in C++, there is no inheritance between structs.\"\nmsgstr \"與 C++ 不同的是，結構體之間沒有繼承關係。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"This may be a good time to let people know there are different types of \"\n\"structs.\"\nmsgstr \"不妨趁此機會讓學員瞭解還有幾種不同的結構體。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a \"\n\"trait on some type but don’t have any data that you want to store in the \"\n\"value itself.\"\nmsgstr \"\"\n\"針對某些型別實作特徵時，可能會使用大小為零的結構體 `e.g., struct Foo;`，但其\"\n\"中沒有任何需要儲存在值本身的資料。\"\n\n#: src/user-defined-types/named-structs.md\nmsgid \"\"\n\"The next slide will introduce Tuple structs, used when the field names are \"\n\"not important.\"\nmsgstr \"在下一張投影片中，我們會介紹元組結構體，可於欄位名稱不重要時使用。\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"If you already have variables with the right names, then you can create the \"\n\"struct using a shorthand.\"\nmsgstr \"如果您已有名稱相同的變數，可以透過簡寫 建立結構體：\"\n\n#: src/user-defined-types/named-structs.md\n#, fuzzy\nmsgid \"\"\n\"The syntax `..avery` allows us to copy the majority of the fields from the \"\n\"old struct without having to explicitly type it all out. It must always be \"\n\"the last element.\"\nmsgstr \"\"\n\"`..peter` 語法可讓我們從舊的結構體中複製大部分欄位，而不必明確輸入所有欄位。\"\n\"此元素一律須位於最後。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"If the field names are unimportant, you can use a tuple struct:\"\nmsgstr \"如果欄位名稱不重要，您可以使用元組結構體：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"({}, {})\\\"\"\nmsgstr \"\\\"({}, {})\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"This is often used for single-field wrappers (called newtypes):\"\nmsgstr \"這通常用於單一欄位的包裝函式 (稱為 newtypes)：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\\\"Ask a rocket scientist at NASA\\\"\"\nmsgstr \"\\\"Ask a rocket scientist at NASA\\\"\"\n\n#: src/user-defined-types/tuple-structs.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/bare-metal/microcontrollers/type-state.md\n#: src/async/pitfalls/cancellation.md\nmsgid \"// ...\\n\"\nmsgstr \"// ...\\n\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Newtypes are a great way to encode additional information about the value in \"\n\"a primitive type, for example:\"\nmsgstr \"\"\n\"如要對原始型別中值的額外資訊進行編碼，Newtypes 是絕佳的方式，舉例來說：\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"The number is measured in some units: `Newtons` in the example above.\"\nmsgstr \"此數字會採用某些測量單位：在上例中為 `Newtons`。\"\n\n#: src/user-defined-types/tuple-structs.md\n#, fuzzy\nmsgid \"\"\n\"The value passed some validation when it was created, so you no longer have \"\n\"to validate it again at every use: `PhoneNumber(String)` or `OddNumber(u32)`.\"\nmsgstr \"\"\n\"此值在建立時已通過某些驗證，因此往後不必在每次使用時再次驗證。例\"\n\"如：'PhoneNumber(String)`或`OddNumber(u32)\\\\` 。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Demonstrate how to add a `f64` value to a `Newtons` type by accessing the \"\n\"single field in the newtype.\"\nmsgstr \"\"\n\"示範如何透過存取 newtype 中的單一欄位，將 “f64” 值新增至 `Newtons` 類型。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"Rust generally doesn’t like inexplicit things, like automatic unwrapping or \"\n\"for instance using booleans as integers.\"\nmsgstr \"Rust 通常不太能接受不明確的內容，例如自動展開或使用布林值做為整數。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"Operator overloading is discussed on Day 3 (generics).\"\nmsgstr \"運算子超載會在第 3 天 (泛型) 討論。\"\n\n#: src/user-defined-types/tuple-structs.md\nmsgid \"\"\n\"The example is a subtle reference to the [Mars Climate Orbiter](https://en.\"\n\"wikipedia.org/wiki/Mars_Climate_Orbiter) failure.\"\nmsgstr \"\"\n\"此範例巧妙地以 [Mars Climate Orbiter](https://en.wikipedia.org/wiki/\"\n\"Mars_Climate_Orbiter) 的失敗經驗做為參照。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"The `enum` keyword allows the creation of a type which has a few different \"\n\"variants:\"\nmsgstr \"`enum` 關鍵字可建立具有幾個不同變體的型別：\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Simple variant\\n\"\nmsgstr \"// Simple variant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Tuple variant\\n\"\nmsgstr \"// Tuple variant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"// Struct variant\\n\"\nmsgstr \"// Struct variant\\n\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\\\"On this turn: {:?}\\\"\"\nmsgstr \"\\\"On this turn: {:?}\\\"\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"Enumerations allow you to collect a set of values under one type.\"\nmsgstr \"列舉可讓您在單一類別中收集一組值。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`Direction` is a type with variants. There are two values of `Direction`: \"\n\"`Direction::Left` and `Direction::Right`.\"\nmsgstr \"\"\n\"`Direction` 是含變體的型別，有`Direction::Left` 和 `Direction::Right` 這兩個\"\n\"值。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"`PlayerMove` is a type with three variants. In addition to the payloads, \"\n\"Rust will store a discriminant so that it knows at runtime which variant is \"\n\"in a `PlayerMove` value.\"\nmsgstr \"\"\n\"`PlayerMove` 是含三種變體的型別。除了酬載之外，Rust 還會儲存判別值，以便在執\"\n\"行階段瞭解哪個變體屬於 `PlayerMove` 值。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"This might be a good time to compare structs and enums:\"\nmsgstr \"這或許是比較結構體和列舉的好時機：\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"In both, you can have a simple version without fields (unit struct) or one \"\n\"with different types of fields (variant payloads).\"\nmsgstr \"\"\n\"無論使用何者，都能取得沒有欄位的簡易版本 (單元結構體)，或是具有不同欄位型別的\"\n\"版本 (變體負載)。\"\n\n#: src/user-defined-types/enums.md\n#, fuzzy\nmsgid \"\"\n\"You could even implement the different variants of an enum with separate \"\n\"structs but then they wouldn’t be the same type as they would if they were \"\n\"all defined in an enum.\"\nmsgstr \"\"\n\"您甚至可以使用獨立的結構體實作列舉的不同變體，但比起在列舉中定義全部變體的情\"\n\"況，這麼做會讓變體的型別有所不同。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"Rust uses minimal space to store the discriminant.\"\nmsgstr \"Rust 會以最少的空間來儲存判別值。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"If necessary, it stores an integer of the smallest required size\"\nmsgstr \"如有需要，Rust 會儲存最小所需大小的整數\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"If the allowed variant values do not cover all bit patterns, it will use \"\n\"invalid bit patterns to encode the discriminant (the \\\"niche \"\n\"optimization\\\"). For example, `Option<&u8>` stores either a pointer to an \"\n\"integer or `NULL` for the `None` variant.\"\nmsgstr \"\"\n\"如果允許的變體值未涵蓋所有位元模式，Rust 會使用無效的位元模式來編碼判別值 (即\"\n\"「區位最佳化」)。舉例來說，`Option<&u8>` 可儲存指向整數的指標，也可儲存 \"\n\"`None` 變體適用的 `NULL`。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"You can control the discriminant if needed (e.g., for compatibility with C):\"\nmsgstr \"您可以視需要控制判別值，例如為了與 C 相容：\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 \"\n\"bytes.\"\nmsgstr \"\"\n\"如果沒有 `repr`，判別值型別會需要 2 個位元組，因為 10001 適合 2 個位元組。\"\n\n#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md\n#: src/memory-management/review.md src/memory-management/move.md\n#: src/smart-pointers/box.md src/borrowing/shared.md\nmsgid \"More to Explore\"\nmsgstr \"探索更多內容\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Rust has several optimizations it can employ to make enums take up less \"\n\"space.\"\nmsgstr \"Rust 支援多種最佳化做法，可用於縮減列舉占用的空間。\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/\"\n\"option/#representation), Rust guarantees that `size_of::<T>()` equals \"\n\"`size_of::<Option<T>>()`.\"\nmsgstr \"\"\n\"空值指標最佳化：針對[部分型別](https://doc.rust-lang.org/std/option/\"\n\"#representation)，Rust 保證 `size_of::<T>()` 等於 `size_of::<Option<T>>()`.\"\n\n#: src/user-defined-types/enums.md\nmsgid \"\"\n\"Example code if you want to show how the bitwise representation _may_ look \"\n\"like in practice. It's important to note that the compiler provides no \"\n\"guarantees regarding this representation, therefore this is totally unsafe.\"\nmsgstr \"\"\n\"如果想示範位元表示法實際運作時「可能」的樣子，可以使用下列範例程式碼。請務必\"\n\"注意，編譯器並無對這個表示法提供保證，因此這完全不安全。\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"Static and constant variables are two different ways to create globally-\"\n\"scoped values that cannot be moved or reallocated during the execution of \"\n\"the program.\"\nmsgstr \"\"\n\"靜態和常數變數是建立全域範圍值的兩種不同方式，這個值無法在程式執行期間移動或\"\n\"重新分配。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`const`\"\nmsgstr \"`const`\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Constant variables are evaluated at compile time and their values are \"\n\"inlined wherever they are used:\"\nmsgstr \"常數變數會在編譯期間評估，且無論用於何處，其值都會內嵌：\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html) these are inlined upon use.\"\nmsgstr \"\"\n\"根據《[Rust RFC 手冊](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html)》所述，這類值會在使用時內嵌。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Only functions marked `const` can be called at compile time to generate \"\n\"`const` values. `const` functions can however be called at runtime.\"\nmsgstr \"\"\n\"您只能在編譯期間呼叫標示為 `const` 的函式，以便產生 `const` 值，但可以在執行\"\n\"階段呼叫 `const` 函式。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"`static`\"\nmsgstr \"`static`\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"Static variables will live during the whole execution of the program, and \"\n\"therefore will not move:\"\nmsgstr \"靜態變數會在程式的整個執行過程中持續運作，因此不會移動：\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\\\"Welcome to RustOS 3.14\\\"\"\nmsgstr \"歡迎參加第 1 天課程\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\\\"{BANNER}\\\"\"\nmsgstr \"\\\"{BANNER}\\\"\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-\"\n\"vs-static.html), these are not inlined upon use and have an actual \"\n\"associated memory location. This is useful for unsafe and embedded code, and \"\n\"the variable lives through the entirety of the program execution. When a \"\n\"globally-scoped value does not have a reason to need object identity, \"\n\"`const` is generally preferred.\"\nmsgstr \"\"\n\"如《[Rust RFC 手冊](https://rust-lang.github.io/rfcs/0246-const-vs-static.\"\n\"html)》所述，這類值在使用時不會內嵌，且具備實際相關聯的記憶體位置。這對不安全\"\n\"和嵌入的程式碼很有幫助，且變數在程式執行全程都會持續運作。當全域範圍值沒有需\"\n\"要物件識別子的理由時，通常首選會是使用 `const`。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Mention that `const` behaves semantically similar to C++'s `constexpr`.\"\nmsgstr \"別忘了提到 `const` 的行為在語意上與 C++ 的 `constexpr` 相似。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static`, on the other hand, is much more similar to a `const` or mutable \"\n\"global variable in C++.\"\nmsgstr \"另一方面，`static` 則更類似於 C++ 中的 `const` 或可變動的全域變數。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"`static` provides object identity: an address in memory and state as \"\n\"required by types with interior mutability such as `Mutex<T>`.\"\nmsgstr \"\"\n\"`static` 提供物件識別子，也就是記憶體中的位址，和具有內部可變動性型別 (例如 \"\n\"`Mutex<T>`) 所需的狀態。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"\"\n\"It isn't super common that one would need a runtime evaluated constant, but \"\n\"it is helpful and safer than using a static.\"\nmsgstr \"\"\n\"需要在執行階段評估常數的情況雖不常見，但這會比使用靜態項目更有用且安全。\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Properties table:\"\nmsgstr \"屬性表：\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Property\"\nmsgstr \"資源\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Static\"\nmsgstr \"靜態\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Constant\"\nmsgstr \"常數\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Has an address in memory\"\nmsgstr \"具備記憶體中的位址\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes\"\nmsgstr \"是\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"No (inlined)\"\nmsgstr \"否 (已內嵌)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Lives for the entire duration of the program\"\nmsgstr \"在整個程式執行期間持續存在\"\n\n#: src/user-defined-types/static-and-const.md\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"No\"\nmsgstr \"否\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Can be mutable\"\nmsgstr \"可變動\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (unsafe)\"\nmsgstr \"是 (不安全)\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Evaluated at compile time\"\nmsgstr \"是 (已在編譯時初始化)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Yes (initialised at compile time)\"\nmsgstr \"是 (已在編譯時初始化)\"\n\n#: src/user-defined-types/static-and-const.md\nmsgid \"Inlined wherever it is used\"\nmsgstr \"無論在何處使用都會內嵌\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"\"\n\"Because `static` variables are accessible from any thread, they must be \"\n\"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html), atomic or similar.\"\nmsgstr \"\"\n\"由於 `static` 變數可從任何執行緒存取，因此必須是 `Sync`。內部可變動性則可透過\"\n\"原子或類似的 [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) \"\n\"實現。也可能有可變動的靜態項目，但這些需要手動同步，因此每當存取這類項目時就\"\n\"需要動用 `unsafe` 程式碼。我們會在「不安全的 Rust」章節中探討[可變動的靜態項\"\n\"目](../unsafe/mutable-static-variables.md)。\"\n\n#: src/user-defined-types/static-and-const.md\n#, fuzzy\nmsgid \"Thread-local data can be created with the macro `std::thread_local`.\"\nmsgstr \"您可以使用 `std::thread_local` 巨集來建立 `thread_local` 資料。\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"\"\n\"A type alias creates a name for another type. The two types can be used \"\n\"interchangeably.\"\nmsgstr \"型別別名會為另一型別建立名稱。這兩種型別可以交替使用。\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"// Aliases are more useful with long, complex types:\\n\"\nmsgstr \"// Aliases are more useful with long, complex types:\\n\"\n\n#: src/user-defined-types/aliases.md\nmsgid \"C programmers will recognize this as similar to a `typedef`.\"\nmsgstr \"別名在 C 語言的程式設計師眼中類似於 `typedef`。\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"We will create a data structure to represent an event in an elevator control \"\n\"system. It is up to you to define the types and functions to construct \"\n\"various events. Use `#[derive(Debug)]` to allow the types to be formatted \"\n\"with `{:?}`.\"\nmsgstr \"\"\n\"我們會建立資料結構，用來代表電梯控制系統中的事件。您可以自行定義類型和函式，\"\n\"建構各種事件。請使用 `#[derive(Debug)]` 來允許型別採用 `{:?}` 的格式。\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"\"\n\"This exercise only requires creating and populating data structures so that \"\n\"`main` runs without errors. The next part of the course will cover getting \"\n\"data out of these structures.\"\nmsgstr \"\"\n\"這項練習只需建立及填入資料結構，`main` 就能在不發生錯誤的情況下執行。本課程的\"\n\"下一部分將介紹如何從這些結構中取得資料。\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\nmsgstr \"\"\n\"/// An event in the elevator system that the controller must react to.\\n\"\n\n#: src/user-defined-types/exercise.md\nmsgid \"// TODO: add required variants\\n\"\nmsgstr \"// TODO: add required variants\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A direction of travel.\\n\"\nmsgstr \"/// A direction of travel.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car has arrived on the given floor.\\n\"\nmsgstr \"/// The car has arrived on the given floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have opened.\\n\"\nmsgstr \"/// The car doors have opened.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// The car doors have closed.\\n\"\nmsgstr \"/// The car doors have closed.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\nmsgstr \"\"\n\"/// A directional button was pressed in an elevator lobby on the given \"\n\"floor.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"/// A floor button was pressed in the elevator car.\\n\"\nmsgstr \"/// A floor button was pressed in the elevator car.\\n\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\nmsgstr \"\\\"A ground floor passenger has pressed the up button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the ground floor: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door opened: {:?}\\\"\"\nmsgstr \"\\\"The car door opened: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\nmsgstr \"\\\"A passenger has pressed the 3rd floor button: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car door closed: {:?}\\\"\"\nmsgstr \"\\\"The car door closed: {:?}\\\"\"\n\n#: src/user-defined-types/exercise.md src/user-defined-types/solution.md\nmsgid \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\nmsgstr \"\\\"The car has arrived on the 3rd floor: {:?}\\\"\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button was pressed.\\n\"\nmsgstr \"/// A button was pressed.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car has arrived at the given floor.\\n\"\nmsgstr \"/// The car has arrived at the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have opened.\\n\"\nmsgstr \"/// The car's doors have opened.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// The car's doors have closed.\\n\"\nmsgstr \"/// The car's doors have closed.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor is represented as an integer.\\n\"\nmsgstr \"/// A floor is represented as an integer.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A user-accessible button.\\n\"\nmsgstr \"/// A user-accessible button.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A button in the elevator lobby on the given floor.\\n\"\nmsgstr \"/// A button in the elevator lobby on the given floor.\\n\"\n\n#: src/user-defined-types/solution.md\nmsgid \"/// A floor button within the car.\\n\"\nmsgstr \"/// A floor button within the car.\\n\"\n\n#: src/welcome-day-2.md\nmsgid \"Welcome to Day 2\"\nmsgstr \"歡迎參加第 2 天課程\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"\"\n\"Now that we have seen a fair amount of Rust, today will focus on Rust's type \"\n\"system:\"\nmsgstr \"您目前對 Rust 已有相當程度的認識，接下來我們將繼續講解以下概念：\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"Pattern matching: extracting data from structures.\"\nmsgstr \"模式配對：解構列舉、結構和陣列。\"\n\n#: src/welcome-day-2.md\nmsgid \"Methods: associating functions with types.\"\nmsgstr \"方法：將函式與型別建立關聯。\"\n\n#: src/welcome-day-2.md\nmsgid \"Traits: behaviors shared by multiple types.\"\nmsgstr \"特徵：由多種型別共用的行為。\"\n\n#: src/welcome-day-2.md\nmsgid \"Generics: parameterizing types on other types.\"\nmsgstr \"泛型：在其他型別上將型別參數化。\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Standard library types and traits: a tour of Rust's rich standard library.\"\nmsgstr \"標準程式庫的型別和特徵：一覽 Rust 豐富的標準程式庫。\"\n\n#: src/welcome-day-2.md\nmsgid \"[Welcome](./welcome-day-2.md) (3 minutes)\"\nmsgstr \"[歡迎](./welcome-day-2.md) (3 分鐘)\"\n\n#: src/welcome-day-2.md\n#, fuzzy\nmsgid \"[Pattern Matching](./pattern-matching.md) (1 hour)\"\nmsgstr \"[模式配對](./pattern-matching.md) (10 分鐘)\"\n\n#: src/welcome-day-2.md\nmsgid \"[Methods and Traits](./methods-and-traits.md) (45 minutes)\"\nmsgstr \"[方法和特徵](./methods-and-traits.md) (45 分鐘)\"\n\n#: src/welcome-day-2.md\nmsgid \"[Generics](./generics.md) (40 minutes)\"\nmsgstr \"[泛型](./generics.md) (40 分鐘)\"\n\n#: src/welcome-day-2.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 50 \"\n\"minutes\"\nmsgstr \"講解這個主題大約需要 2 小時 50 分鐘\"\n\n#: src/pattern-matching.md\n#, fuzzy\nmsgid \"[Matching Values](./pattern-matching/match.md) (10 minutes)\"\nmsgstr \"[配對](./pattern-matching/match.md) (10 分鐘)\"\n\n#: src/pattern-matching.md\nmsgid \"[Destructuring](./pattern-matching/destructuring.md) (10 minutes)\"\nmsgstr \"[解構](./pattern-matching/destructuring.md) (10 分鐘)\"\n\n#: src/pattern-matching.md\nmsgid \"[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)\"\nmsgstr \"[Let 控制流程](./pattern-matching/let-control-flow.md) (10 分鐘)\"\n\n#: src/pattern-matching.md\nmsgid \"\"\n\"[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 \"\n\"minutes)\"\nmsgstr \"[練習：運算式求值](./pattern-matching/exercise.md) (30 分鐘)\"\n\n#: src/pattern-matching.md src/memory-management.md\nmsgid \"This segment should take about 1 hour\"\nmsgstr \"講解這個主題大約需要 1 小時\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"The `match` keyword lets you match a value against one or more _patterns_. \"\n\"The comparisons are done from top to bottom and the first match wins.\"\nmsgstr \"\"\n\"您可以使用 `match` 關鍵字，將值與一或多個「模式」配對。系統會從最上方往下依序\"\n\"比對，並套用第一個比對成功的模式。\"\n\n#: src/pattern-matching/match.md\nmsgid \"The patterns can be simple values, similarly to `switch` in C and C++:\"\nmsgstr \"模式可以是簡單的值，類似 C 和 C++ 中的 `switch`：\"\n\n#: src/pattern-matching/match.md\nmsgid \"'x'\"\nmsgstr \"'x'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'q'\"\nmsgstr \"'q'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Quitting\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/std-traits/solution.md\n#: src/error-handling/exercise.md src/error-handling/solution.md\n#, fuzzy\nmsgid \"'a'\"\nmsgstr \"'a'\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"'s'\"\nmsgstr \"'s'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'w'\"\nmsgstr \"'w'\"\n\n#: src/pattern-matching/match.md\nmsgid \"'d'\"\nmsgstr \"'d'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Moving around\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'0'\"\nmsgstr \"'0'\"\n\n#: src/pattern-matching/match.md src/error-handling/exercise.md\n#: src/error-handling/solution.md\nmsgid \"'9'\"\nmsgstr \"'9'\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Number input\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Lowercase: {key}\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\\\"Something else\\\"\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The `_` pattern is a wildcard pattern which matches any value. The \"\n\"expressions _must_ be exhaustive, meaning that it covers every possibility, \"\n\"so `_` is often used as the final catch-all case.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\n#, fuzzy\nmsgid \"\"\n\"Match can be used as an expression. Just like `if`, each match arm must have \"\n\"the same type. The type is the last expression of the block, if any. In the \"\n\"example above, the type is `()`.\"\nmsgstr \"\"\n\"和 `if let` 一樣，每個比對臂都必須具有相同型別。型別是區塊的最後一個運算式 \"\n\"(如有)。在上述範例中，型別為 `()`。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"A variable in the pattern (`key` in this example) will create a binding that \"\n\"can be used within the match arm.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"A match guard causes the arm to match only if the condition is true.\"\nmsgstr \"\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"You might point out how some specific characters are being used when in a \"\n\"pattern\"\nmsgstr \"建議您特別指出某些特定字元在模式中的使用方式\"\n\n#: src/pattern-matching/match.md\nmsgid \"`|` as an `or`\"\nmsgstr \"`|` 可做為 `or`\"\n\n#: src/pattern-matching/match.md\nmsgid \"`..` can expand as much as it needs to be\"\nmsgstr \"`..` 可以視需要展開\"\n\n#: src/pattern-matching/match.md\nmsgid \"`1..=5` represents an inclusive range\"\nmsgstr \"`1..=5` 代表含頭尾的範圍\"\n\n#: src/pattern-matching/match.md\nmsgid \"`_` is a wild card\"\nmsgstr \"`_` 是萬用字元\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"Match guards as a separate syntax feature are important and necessary when \"\n\"we wish to concisely express more complex ideas than patterns alone would \"\n\"allow.\"\nmsgstr \"\"\n\"有些概念比模式本身所允許的更加複雜，如果我們希望簡要地表達這些想法，就必須把\"\n\"配對守衛視為獨立的語法功能。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"They are not the same as separate `if` expression inside of the match arm. \"\n\"An `if` expression inside of the branch block (after `=>`) happens after the \"\n\"match arm is selected. Failing the `if` condition inside of that block won't \"\n\"result in other arms of the original `match` expression being considered.\"\nmsgstr \"\"\n\"這與配對分支內的個別 `if` 運算式不同。分支區塊中的 `if` 運算式 (位於 `=>` 之\"\n\"後) 會在選取配對分支後發生。即使該區塊內的 `if` 條件失敗，系統也不會考量原始 \"\n\"`match` 運算式的其他分支。\"\n\n#: src/pattern-matching/match.md\nmsgid \"\"\n\"The condition defined in the guard applies to every expression in a pattern \"\n\"with an `|`.\"\nmsgstr \"只要運算式隸屬於具備 `|` 的模式之中，就會套用守衛定義的條件。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Like tuples, structs and enums can also be destructured by matching:\"\nmsgstr \"就像元組，結構體和列舉也可透過配對來解構：\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Structs\"\nmsgstr \"結構體\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\nmsgstr \"\\\"x.0 = 1, b = {b}, y = {y}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = 2, x = {i:?}\\\"\"\nmsgstr \"\\\"y = 2, x = {i:?}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"y = {y}, other fields were ignored\\\"\"\nmsgstr \"\\\"y = {y}, other fields were ignored\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Patterns can also be used to bind variables to parts of your values. This is \"\n\"how you inspect the structure of your types. Let us start with a simple \"\n\"`enum` type:\"\nmsgstr \"\"\n\"模式也可用來將變數綁定至值的某些部分。您可以透過這個方式檢查型別的結構。首先\"\n\"從簡單的 `enum` 型別開始吧：\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"cannot divide {n} into two equal parts\\\"\"\nmsgstr \"\\\"cannot divide {n} into two equal parts\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"{n} divided in two is {half}\\\"\"\nmsgstr \"\\\"{n} divided in two is {half}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\\\"sorry, an error happened: {msg}\\\"\"\nmsgstr \"\\\"sorry, an error happened: {msg}\\\"\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Here we have used the arms to _destructure_ the `Result` value. In the first \"\n\"arm, `half` is bound to the value inside the `Ok` variant. In the second \"\n\"arm, `msg` is bound to the error message.\"\nmsgstr \"\"\n\"這裡我們利用分支來「解構」`Result` 值。在第一個分支中，`half` 會與 `Ok` 變體\"\n\"中的值綁定。在第二個分支中，`msg` 會綁定至錯誤訊息。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Change the literal values in `foo` to match with the other patterns.\"\nmsgstr \"請變更 `foo` 中的常值，與其他模式配對。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"Add a new field to `Foo` and make changes to the pattern as needed.\"\nmsgstr \"在 `Foo` 中新增一個欄位，並視需要變更模式。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The distinction between a capture and a constant expression can be hard to \"\n\"spot. Try changing the `2` in the second arm to a variable, and see that it \"\n\"subtly doesn't work. Change it to a `const` and see it working again.\"\nmsgstr \"\"\n\"捕獲和常數運算式之間的區別可能不容易發現。請嘗試將第二個分支的 `2` 變更為變\"\n\"數，您會發現它幾乎無法運作。現在將其變更為 `const`，您會看到它再次運作。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"The `if`/`else` expression is returning an enum that is later unpacked with \"\n\"a `match`.\"\nmsgstr \"`if`/`else` 運算式會傳回列舉，之後列舉會透過 `match` 解除封裝。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"You can try adding a third variant to the enum definition and displaying the \"\n\"errors when running the code. Point out the places where your code is now \"\n\"inexhaustive and how the compiler tries to give you hints.\"\nmsgstr \"\"\n\"您可以嘗試在列舉定義中加入第三個變體，並在執行程式碼時顯示錯誤。請向學員指出\"\n\"程式碼現在有哪些地方還不詳盡，並說明編譯器會如何嘗試給予提示。\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"The values in the enum variants can only be accessed after being pattern \"\n\"matched.\"\nmsgstr \"\"\n\"只有在與模式配對相符後，才能存取列舉變數中的值。此模式會將參照繫結至 `=>` 後\"\n\"方「配對分支」中的欄位。\"\n\n#: src/pattern-matching/destructuring.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate what happens when the search is inexhaustive. Note the advantage \"\n\"the Rust compiler provides by confirming when all cases are handled.\"\nmsgstr \"\"\n\"請示範非窮舉搜尋的情況。請確認系統處理所有案例的時間，指出 Rust 編譯器提供的\"\n\"優勢。\"\n\n#: src/pattern-matching/destructuring.md\nmsgid \"\"\n\"Save the result of `divide_in_two` in the `result` variable and `match` it \"\n\"in a loop. That won't compile because `msg` is consumed when matched. To fix \"\n\"it, match `&result` instead of `result`. That will make `msg` a reference so \"\n\"it won't be consumed. This [\\\"match ergonomics\\\"](https://rust-lang.github.\"\n\"io/rfcs/2005-match-ergonomics.html) appeared in Rust 2018. If you want to \"\n\"support older Rust, replace `msg` with `ref msg` in the pattern.\"\nmsgstr \"\"\n\"將 `divide_in_two` 的結果儲存在 `result` 變數中，並在迴圈中 `match` 結果。由\"\n\"於配對符合時會耗用 `msg`，因此這麼做並不會執行編譯。如要修正此問題，請配對 \"\n\"`&result`，而非 `result`。這會讓 `msg` 成為參照，因此就不會遭到耗用。這個\"\n\"[「人因工程學的配對」](https://rust-lang.github.io/rfcs/2005-match-\"\n\"ergonomics.html)功能已於 Rust 2018 推出。如要支援舊版 Rust，請在模式中將 \"\n\"`msg` 替換成 `ref msg`。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Rust has a few control flow constructs which differ from other languages. \"\n\"They are used for pattern matching:\"\nmsgstr \"Rust 的某些控制流程結構與其他程式語言不同。這些結構會用於模式配對：\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`if let` expressions\"\nmsgstr \"`if let` 運算式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`while let` expressions\"\nmsgstr \"`while let` 運算式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`match` expressions\"\nmsgstr \"`match` 運算式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"The [`if let` expression](https://doc.rust-lang.org/reference/expressions/if-\"\n\"expr.html#if-let-expressions) lets you execute different code depending on \"\n\"whether a value matches a pattern:\"\nmsgstr \"\"\n\"[`if let` 運算式](https://doc.rust-lang.org/reference/expressions/if-expr.\"\n\"html#if-let-expressions)可讓您根據值是否符合模式，執行不同的程式碼：\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"slept for {:?}\\\"\"\nmsgstr \"\\\"slept for {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"`let else` expressions\"\nmsgstr \"`let else` 運算式\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"For the common case of matching a pattern and returning from the function, \"\n\"use [`let else`](https://doc.rust-lang.org/rust-by-example/flow_control/\"\n\"let_else.html). The \\\"else\\\" case must diverge (`return`, `break`, or panic \"\n\"- anything but falling off the end of the block).\"\nmsgstr \"\"\n\"如果是要配對模式並從函式傳回的常見情況，請使用 [`let else`](https://doc.rust-\"\n\"lang.org/rust-by-example/flow_control/let_else.html)。如果是「其他」情況，則\"\n\"必須發散 (`return`、`break` 或恐慌，也就是落在區塊結尾之外的任何情況)。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got None\\\"\"\nmsgstr \"\\\"got None\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"got empty string\\\"\"\nmsgstr \"\\\"got empty string\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\\\"not a hex digit\\\"\"\nmsgstr \"\\\"not a hex digit\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md\nmsgid \"\\\"result: {:?}\\\"\"\nmsgstr \"\\\"result: {:?}\\\"\"\n\n#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md\n#: src/smart-pointers/solution.md src/testing/solution.md\n#: src/android/testing.md src/android/testing/googletest.md\nmsgid \"\\\"foo\\\"\"\nmsgstr \"\\\"foo\\\"\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) variant which \"\n\"repeatedly tests a value against a pattern:\"\nmsgstr \"\"\n\"和 `if let` 的情況一樣，有一個 [`while let`](https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#predicate-pattern-loops) 變數可針對模式\"\n\"重複測試值：\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct.\"\n\"String.html#method.pop) returns `Some(c)` until the string is empty, after \"\n\"which it will return `None`. The `while let` lets us keep iterating through \"\n\"all items.\"\nmsgstr \"\"\n\"`v.iter()` 傳回的疊代器會在每次呼叫 `next()` 時傳回 `Option<i32>`。疊代器會在\"\n\"完成後才傳回 `Some(x)`，之後則會傳回 `None`。`while let` 可讓我們持續疊代所有\"\n\"項目。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"if-let\"\nmsgstr \"if-let\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"Unlike `match`, `if let` does not have to cover all branches. This can make \"\n\"it more concise than `match`.\"\nmsgstr \"與 `match` 不同，`if let` 不會為模式比對支援成立條件子句。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"A common usage is handling `Some` values when working with `Option`.\"\nmsgstr \"常見用途是在使用 `Option` 時處理 `Some` 值。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Unlike `match`, `if let` does not support guard clauses for pattern matching.\"\nmsgstr \"與 `match` 不同，`if let` 不會為模式比對支援成立條件子句。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"let-else\"\nmsgstr \"let-else\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"`if-let`s can pile up, as shown. The `let-else` construct supports \"\n\"flattening this nested code. Rewrite the awkward version for students, so \"\n\"they can see the transformation.\"\nmsgstr \"\"\n\"如上所示，`if-let` 可能會越加越多。`let-else` 結構支援壓平合併這個巢狀程式\"\n\"碼。請為學生重新編寫這個冗長的版本，讓他們見識改寫的效果。\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"The rewritten version is:\"\nmsgstr \"重新編寫的版本如下：\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"while-let\"\nmsgstr \"while-let\"\n\n#: src/pattern-matching/let-control-flow.md\nmsgid \"\"\n\"Point out that the `while let` loop will keep going as long as the value \"\n\"matches the pattern.\"\nmsgstr \"請指出只要值符合模式，`while let` 迴圈就會持續運作。\"\n\n#: src/pattern-matching/let-control-flow.md\n#, fuzzy\nmsgid \"\"\n\"You could rewrite the `while let` loop as an infinite loop with an if \"\n\"statement that breaks when there is no value to unwrap for `name.pop()`. The \"\n\"`while let` provides syntactic sugar for the above scenario.\"\nmsgstr \"\"\n\"您可以將 `while let` 迴圈重寫為無限迴圈，並加上會在無法為 `iter.next()` 取消\"\n\"包裝值的情況下結束的 if 陳述式。`while let` 可為上述情況提供語法糖。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"Let's write a simple recursive evaluator for arithmetic expressions.\"\nmsgstr \"我們現在要為算術運算式編寫簡單的遞迴評估器。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"The `Box` type here is a smart pointer, and will be covered in detail later \"\n\"in the course. An expression can be \\\"boxed\\\" with `Box::new` as seen in the \"\n\"tests. To evaluate a boxed expression, use the deref operator (`*`) to \"\n\"\\\"unbox\\\" it: `eval(*boxed_expr)`.\"\nmsgstr \"\"\n\"這裡的 `Box` 型別是一種智慧指標，我們會在本課程的後續部分詳細說明。如測試中所\"\n\"示，運算式可被 `Box::new`「裝箱」。如要求裝箱運算式的值，請使用 deref 運算子 \"\n\"(`*`) 來「開箱」：`eval(*boxed_expr)`。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Some expressions cannot be evaluated and will return an error. The standard \"\n\"[`Result<Value, String>`](https://doc.rust-lang.org/std/result/enum.Result.\"\n\"html) type is an enum that represents either a successful value \"\n\"(`Ok(Value)`) or an error (`Err(String)`). We will cover this type in detail \"\n\"later.\"\nmsgstr \"\"\n\"部分運算式無法求值，且會傳回錯誤。標準 [`Result<Value, String>`](https://doc.\"\n\"rust-lang.org/std/result/enum.Result.html) 型別是一種列舉，用於表示成功值 \"\n\"(`Ok(Value) )`) 或錯誤 (`Err(String)`)。我們稍後會詳細說明這種型別。\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"Copy and paste the code into the Rust playground, and begin implementing \"\n\"`eval`. The final product should pass the tests. It may be helpful to use \"\n\"`todo!()` and get the tests to pass one-by-one. You can also skip a test \"\n\"temporarily with `#[ignore]`:\"\nmsgstr \"\"\n\"請複製程式碼並貼到 Rust Playground，然後開始實作 `eval`。最終成品應會通過測\"\n\"試。使用 `todo!()` 讓測試逐一通過可能有所幫助，但您也可以使用 `#[ignore]` 暫\"\n\"時略過測試：\"\n\n#: src/pattern-matching/exercise.md\nmsgid \"\"\n\"If you finish early, try writing a test that results in division by zero or \"\n\"integer overflow. How could you handle this with `Result` instead of a panic?\"\nmsgstr \"\"\n\"如果您提前完成操作，不妨試著編寫一個以零為除數或會整數溢位的測試。該如何利用 \"\n\"`Result` (而非恐慌) 處理這種情況？\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation to perform on two subexpressions.\\n\"\nmsgstr \"/// An operation to perform on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An expression, in tree form.\\n\"\nmsgstr \"/// An expression, in tree form.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// An operation on two subexpressions.\\n\"\nmsgstr \"/// An operation on two subexpressions.\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"/// A literal value\\n\"\nmsgstr \"/// A literal value\\n\"\n\n#: src/pattern-matching/exercise.md src/pattern-matching/solution.md\nmsgid \"\\\"division by zero\\\"\"\nmsgstr \"\\\"division by zero\\\"\"\n\n#: src/pattern-matching/solution.md\nmsgid \"\\\"expr: {:?}\\\"\"\nmsgstr \"\\\"expr: {:?}\\\"\"\n\n#: src/methods-and-traits.md\nmsgid \"[Methods](./methods-and-traits/methods.md) (10 minutes)\"\nmsgstr \"[方法](./methods-and-traits/methods.md) (10 分鐘)\"\n\n#: src/methods-and-traits.md\nmsgid \"[Traits](./methods-and-traits/traits.md) (10 minutes)\"\nmsgstr \"[特徵](./methods-and-traits/traits.md) (10 分鐘)\"\n\n#: src/methods-and-traits.md\nmsgid \"[Deriving](./methods-and-traits/deriving.md) (3 minutes)\"\nmsgstr \"[衍生](./methods-and-traits/deriving.md) (3 分鐘)\"\n\n#: src/methods-and-traits.md\nmsgid \"\"\n\"[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)\"\nmsgstr \"[練習：泛型 Logger](./methods-and-traits/exercise.md) (20 分鐘)\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Rust allows you to associate functions with your new types. You do this with \"\n\"an `impl` block:\"\nmsgstr \"\"\n\"Rust 可讓您將函式與新型別建立關聯。您可以使用 `impl` 區塊來執行這項操作：\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// No receiver, a static method\\n\"\nmsgstr \"// No receiver, a static method\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive borrowed read-write access to self\\n\"\nmsgstr \"// Exclusive borrowed read-write access to self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Shared and read-only borrowed access to self\\n\"\nmsgstr \"// Shared and read-only borrowed access to self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Recorded {} laps for {}:\\\"\"\nmsgstr \"\\\"Recorded {} laps for {}:\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Lap {idx}: {lap} sec\\\"\"\nmsgstr \"\\\"Lap {idx}: {lap} sec\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// Exclusive ownership of self\\n\"\nmsgstr \"// Exclusive ownership of self\\n\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Race {} is finished, total lap time: {}\\\"\"\nmsgstr \"\\\"Race {} is finished, total lap time: {}\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\\\"Monaco Grand Prix\\\"\"\nmsgstr \"\\\"Monaco Grand Prix\\\"\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"// race.add_lap(42);\\n\"\nmsgstr \"// race.add_lap(42);\\n\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"The `self` arguments specify the \\\"receiver\\\" - the object the method acts \"\n\"on. There are several common receivers for a method:\"\nmsgstr \"\"\n\"上述的 `&self` 表示方法會以不可變的方式借用物件。以下是其他可能的方法接收器：\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&self`: borrows the object from the caller using a shared and immutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&self`：使用共用且不可變動的參照，從呼叫端借用物件。之後可以再次使用該物件。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`&mut self`: borrows the object from the caller using a unique and mutable \"\n\"reference. The object can be used again afterwards.\"\nmsgstr \"\"\n\"`&mut self`：使用不重複且可變動的參照，從呼叫端借用物件。之後可以再次使用該物\"\n\"件。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"`self`: takes ownership of the object and moves it away from the caller. The \"\n\"method becomes the owner of the object. The object will be dropped \"\n\"(deallocated) when the method returns, unless its ownership is explicitly \"\n\"transmitted. Complete ownership does not automatically mean mutability.\"\nmsgstr \"\"\n\"`self`：取得物件擁有權，並將其移出呼叫端。方法會成為物件的擁有者。系統會在方\"\n\"法傳回時捨棄物件 (取消分配)，但如果其擁有權已明確傳送的情況例外。具備完整擁有\"\n\"權，不自動等同於具備可變動性。\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"`mut self`: same as above, but the method can mutate the object.\"\nmsgstr \"`mut self`：同上，但方法可以變動物件。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"No receiver: this becomes a static method on the struct. Typically used to \"\n\"create constructors which are called `new` by convention.\"\nmsgstr \"\"\n\"沒有接收器：這會成為結構體上的靜態方法，通常用於建立依慣例稱為 `new` 的建構函\"\n\"式。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"It can be helpful to introduce methods by comparing them to functions.\"\nmsgstr \"導入方法時，若將方法比做函式，會很有幫助。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Methods are called on an instance of a type (such as a struct or enum), the \"\n\"first parameter represents the instance as `self`.\"\nmsgstr \"\"\n\"系統會在型別的執行個體 (例如結構體或列舉) 上呼叫方法，第一個參數以 `self` 代\"\n\"表執行個體。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Developers may choose to use methods to take advantage of method receiver \"\n\"syntax and to help keep them more organized. By using methods we can keep \"\n\"all the implementation code in one predictable place.\"\nmsgstr \"\"\n\"開發人員可以選擇透過方法來充分利用方法接收器語法，以更有條理的方式進行整理。\"\n\"藉由使用方法，我們可以將所有實作程式碼存放在可預測的位置。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"Point out the use of the keyword `self`, a method receiver.\"\nmsgstr \"指出我們會使用關鍵字 `self`，也就是方法接收器。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Show that it is an abbreviated term for `self: Self` and perhaps show how \"\n\"the struct name could also be used.\"\nmsgstr \"說明 `self` 是 `self: Self` 的縮寫，或許也能示範結構體名稱的可能用法。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Explain that `Self` is a type alias for the type the `impl` block is in and \"\n\"can be used elsewhere in the block.\"\nmsgstr \"講解 `Self` 是 `impl` 區塊所屬型別的型別別名，可用於該區塊的其他位置。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Note how `self` is used like other structs and dot notation can be used to \"\n\"refer to individual fields.\"\nmsgstr \"\"\n\"提醒學員如何以類似於其他結構體的方式來使用 `self`，並指出點標記法可用來參照個\"\n\"別欄位，\"\n\n#: src/methods-and-traits/methods.md\n#, fuzzy\nmsgid \"\"\n\"This might be a good time to demonstrate how the `&self` differs from `self` \"\n\"by trying to run `finish` twice.\"\nmsgstr \"\"\n\"這可能是示範 `&self` 和 `self` 差異的好時機，您只要修改程式碼並嘗試執行 \"\n\"say_hello 兩次即可。\"\n\n#: src/methods-and-traits/methods.md\nmsgid \"\"\n\"Beyond variants on `self`, there are also [special wrapper types](https://\"\n\"doc.rust-lang.org/reference/special-types-and-traits.html) allowed to be \"\n\"receiver types, such as `Box<Self>`.\"\nmsgstr \"\"\n\"除了 `self` 的變體以外，您還可以使用[特殊的包裝函式型別](https://doc.rust-\"\n\"lang.org/reference/special-types-and-traits.html)做為接收器型別，例如 \"\n\"`Box<Self>`。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"Rust lets you abstract over types with traits. They're similar to interfaces:\"\nmsgstr \"Rust 可讓您依據特徵對型別進行抽象化處理，這與介面相似：\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Return a sentence from this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"/// Print a string to the terminal greeting this pet.\\n\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"A trait defines a number of methods that types must have in order to \"\n\"implement the trait.\"\nmsgstr \"特徵用於定義型別必須具有哪幾個方法，才能實作該特徵。\"\n\n#: src/methods-and-traits/traits.md\nmsgid \"\"\n\"In the \\\"Generics\\\" segment, next, we will see how to build functionality \"\n\"that is generic over all types implementing a trait.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"Implementing Traits\"\nmsgstr \"實作不安全的特徵\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\nmsgstr \"\\\"Oh you're a cutie! What's your name? {}\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Woof, my name is {}!\\\"\"\nmsgstr \"\\\"Woof, my name is {}!\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Fido\\\"\"\nmsgstr \"\\\"Fido\\\"\"\n\n#: src/methods-and-traits/traits/implementing.md\n#, fuzzy\nmsgid \"\"\n\"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` \"\n\"block.\"\nmsgstr \"特徵會在 `impl <trait> for <type> { .. }` 區塊中實作。\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Unlike Go interfaces, just having matching methods is not enough: a `Cat` \"\n\"type with a `talk()` method would not automatically satisfy `Pet` unless it \"\n\"is in an `impl Pet` block.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/implementing.md\nmsgid \"\"\n\"Traits may provide default implementations of some methods. Default \"\n\"implementations can rely on all the methods of the trait. In this case, \"\n\"`greet` is provided, and relies on `talk`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types allow are placeholder types which are filled in by the \"\n\"trait implementation.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Associated types are sometimes also called \\\"output types\\\". The key \"\n\"observation is that the implementer, not the caller, chooses this type.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/traits/associated-types.md\nmsgid \"\"\n\"Many standard library traits have associated types, including arithmetic \"\n\"operators and `Iterator`.\"\nmsgstr \"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Supported traits can be automatically implemented for your custom types, as \"\n\"follows:\"\nmsgstr \"系統會自動為您的自訂型別實作支援的特徵，如下所示：\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Default trait adds `default` constructor.\\n\"\nmsgstr \"// Default trait adds `default` constructor.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Clone trait adds `clone` method.\\n\"\nmsgstr \"// Clone trait adds `clone` method.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"EldurScrollz\\\"\"\nmsgstr \"\\\"EldurScrollz\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"// Debug trait adds support for printing with `{:?}`.\\n\"\nmsgstr \"// Debug trait adds support for printing with `{:?}`.\\n\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\\\"{:?} vs. {:?}\\\"\"\nmsgstr \"\\\"{:?} vs. {:?}\\\"\"\n\n#: src/methods-and-traits/deriving.md\nmsgid \"\"\n\"Derivation is implemented with macros, and many crates provide useful derive \"\n\"macros to add useful functionality. For example, `serde` can derive \"\n\"serialization support for a struct using `#[derive(Serialize)]`.\"\nmsgstr \"\"\n\"衍生會透過巨集實作，許多 Crate 都提供實用的衍生巨集，以便新增實用功能。例如，\"\n\"`serde` 可以使用 `#[derive(Serialize)]`，為結構體衍生序列化支援。\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"Let's design a simple logging utility, using a trait `Logger` with a `log` \"\n\"method. Code which might log its progress can then take an `&impl Logger`. \"\n\"In testing, this might put messages in the test logfile, while in a \"\n\"production build it would send messages to a log server.\"\nmsgstr \"\"\n\"我們來設計一個簡單的記錄公用程式，使用 `Logger` 特徵搭配 `log` 方法。如果程式\"\n\"碼可能會記錄相關進度，就可以採用 `&impl Logger`。在測試過程中，這可能會將訊息\"\n\"置於測試記錄檔中；而在實際版本中，則會將訊息傳送至記錄伺服器。\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"However, the `StderrLogger` given below logs all messages, regardless of \"\n\"verbosity. Your task is to write a `VerbosityFilter` type that will ignore \"\n\"messages above a maximum verbosity.\"\nmsgstr \"\"\n\"不過，下方的 `StderrLogger` 會記錄詳細程度不限的所有訊息。您的任務是編寫 \"\n\"`VerbosityFilter` 型別，忽略超出詳細程度上限的訊息。\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"\"\n\"This is a common pattern: a struct wrapping a trait implementation and \"\n\"implementing that same trait, adding behavior in the process. What other \"\n\"kinds of wrappers might be useful in a logging utility?\"\nmsgstr \"\"\n\"以下是常見模式：結構體包裝一個特徵實作項目，並實作該相同特徵，在程序中加入行\"\n\"為。想一想，還有哪些其他類型的包裝函式可能在記錄公用程式中派上用場？\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"/// Log a message at the given verbosity level.\\n\"\nmsgstr \"/// Log a message at the given verbosity level.\\n\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"verbosity={verbosity}: {message}\\\"\"\nmsgstr \"\\\"verbosity={verbosity}: {message}\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"FYI\\\"\"\nmsgstr \"\\\"FYI\\\"\"\n\n#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md\nmsgid \"\\\"Uhoh\\\"\"\nmsgstr \"\\\"Uhoh\\\"\"\n\n#: src/methods-and-traits/exercise.md\nmsgid \"// TODO: Define and implement `VerbosityFilter`.\\n\"\nmsgstr \"// TODO: Define and implement `VerbosityFilter`.\\n\"\n\n#: src/methods-and-traits/solution.md\nmsgid \"/// Only log messages up to the given verbosity level.\\n\"\nmsgstr \"/// Only log messages up to the given verbosity level.\\n\"\n\n#: src/generics.md\nmsgid \"[Generic Functions](./generics/generic-functions.md) (5 minutes)\"\nmsgstr \"[泛型函式](./generics/generic-functions.md) (5 分鐘)\"\n\n#: src/generics.md\nmsgid \"[Generic Data Types](./generics/generic-data.md) (10 minutes)\"\nmsgstr \"[泛型資料型別](./generics/generic-data.md) (10 分鐘)\"\n\n#: src/generics.md\nmsgid \"[Trait Bounds](./generics/trait-bounds.md) (10 minutes)\"\nmsgstr \"[特徵界線](./generics/trait-bounds.md) (10 分鐘)\"\n\n#: src/generics.md\nmsgid \"[impl Trait](./generics/impl-trait.md) (5 minutes)\"\nmsgstr \"[impl 特徵](./generics/impl-trait.md) (5 分鐘)\"\n\n#: src/generics.md\nmsgid \"[Exercise: Generic min](./generics/exercise.md) (10 minutes)\"\nmsgstr \"[練習：泛型 min](./generics/exercise.md) (10 分鐘)\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Rust supports generics, which lets you abstract algorithms or data \"\n\"structures (such as sorting or a binary tree) over the types used or stored.\"\nmsgstr \"\"\n\"Rust 支援泛型 (Generics)，因此可以將一個演算法 (例如：排序) 抽象化而不需要依\"\n\"賴特定型別。\"\n\n#: src/generics/generic-functions.md\nmsgid \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\nmsgstr \"/// Pick `even` or `odd` depending on the value of `n`.\\n\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a number: {:?}\\\"\"\nmsgstr \"\\\"picked a number: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"picked a tuple: {:?}\\\"\"\nmsgstr \"\\\"picked a tuple: {:?}\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"dog\\\"\"\nmsgstr \"\\\"dog\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\\\"cat\\\"\"\nmsgstr \"\\\"cat\\\"\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"Rust infers a type for T based on the types of the arguments and return \"\n\"value.\"\nmsgstr \"Rust 會根據引數型別和傳回的值來推斷 T 的型別。\"\n\n#: src/generics/generic-functions.md\nmsgid \"\"\n\"This is similar to C++ templates, but Rust partially compiles the generic \"\n\"function immediately, so that function must be valid for all types matching \"\n\"the constraints. For example, try modifying `pick` to return `even + odd` if \"\n\"`n == 0`. Even if only the `pick` instantiation with integers is used, Rust \"\n\"still considers it invalid. C++ would let you do this.\"\nmsgstr \"\"\n\"這與 C++ 模板 (template) 類似，但 Rust 會立即對泛型函式進行部分編譯，因此函式\"\n\"必須適用於所有符合限制條件的型別。舉例來說，如果 `n == 0`，請嘗試修改 `pick` \"\n\"以傳回 `even + odd`。即使只使用具有整數的 `pick` 建立例項，Rust 仍會將其視為\"\n\"無效。但 C++ 就能讓您這麼做。\"\n\n#: src/generics/generic-functions.md\n#, fuzzy\nmsgid \"\"\n\"Generic code is turned into non-generic code based on the call sites. This \"\n\"is a zero-cost abstraction: you get exactly the same result as if you had \"\n\"hand-coded the data structures without the abstraction.\"\nmsgstr \"\"\n\"這是一種零成本抽象：單型化的結果，等同於不使用抽象化並手動寫出資料結構的實際\"\n\"型別。\"\n\n#: src/generics/generic-data.md\nmsgid \"You can use generics to abstract over the concrete field type:\"\nmsgstr \"你可以使用泛型將具體的欄位型別抽象化：\"\n\n#: src/generics/generic-data.md\nmsgid \"// fn set_x(&mut self, x: T)\\n\"\nmsgstr \"// fn set_x(&mut self, x: T)\\n\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"{integer:?} and {float:?}\\\"\"\nmsgstr \"\\\"{integer:?} and {float:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\\\"coords: {:?}\\\"\"\nmsgstr \"\\\"coords: {:?}\\\"\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"_Q:_ Why `T` is specified twice in `impl<T> Point<T> {}`? Isn't that \"\n\"redundant?\"\nmsgstr \"_問題：_ 為什麼 `T` 在 `impl<T> Point<T> {}` 中重複出現了兩次？\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"This is because it is a generic implementation section for generic type. \"\n\"They are independently generic.\"\nmsgstr \"\"\n\"因為這是一個泛型型別 `T` 的 `Point` 實作，而 `Point` 的型別為泛型 `T`。它們是\"\n\"各自獨立的泛型。\"\n\n#: src/generics/generic-data.md\nmsgid \"It means these methods are defined for any `T`.\"\nmsgstr \"這表示這個方法是為了任意型別 `T` 而定義的。\"\n\n#: src/generics/generic-data.md\n#, fuzzy\nmsgid \"It is possible to write `impl Point<u32> { .. }`.\"\nmsgstr \"你可以寫成 `impl Point<u32> { .. }`。\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"`Point` is still generic and you can use `Point<f64>`, but methods in this \"\n\"block will only be available for `Point<u32>`.\"\nmsgstr \"\"\n\"由於 `Point` 仍然是泛型型別，你可以使用 `Point<f64>`，但這個方法將只適用於 \"\n\"`Point<u32>`。\"\n\n#: src/generics/generic-data.md\nmsgid \"\"\n\"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`. Update the \"\n\"code to allow points that have elements of different types, by using two \"\n\"type variables, e.g., `T` and `U`.\"\nmsgstr \"\"\n\"請嘗試宣告新變數 `let p = Point { x: 5, y: 10.0 };`。您可以使用兩種型別變數來\"\n\"更新程式碼，允許含有不同型別元素的點，例如：`T` 和 `U`。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"When working with generics, you often want to require the types to implement \"\n\"some trait, so that you can call this trait's methods.\"\nmsgstr \"\"\n\"使用泛型時，您通常會需要該型別實作 某些特徵，這樣才能呼叫該特徵的方法。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"You can do this with `T: Trait` or `impl Trait`:\"\nmsgstr \"您可以使用 `T: Trait` 或 `impl Trait` 執行此操作：\"\n\n#: src/generics/trait-bounds.md\nmsgid \"// struct NotClonable;\\n\"\nmsgstr \"// struct NotClonable;\\n\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\\\"{pair:?}\\\"\"\nmsgstr \"\\\"{pair:?}\\\"\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Try making a `NonClonable` and passing it to `duplicate`.\"\nmsgstr \"請嘗試建立 `NonClonable` 並將其傳送至 `duplicate`。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"When multiple traits are necessary, use `+` to join them.\"\nmsgstr \"如果需要多個特徵，請使用 `+` 彙整特徵。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"Show a `where` clause, students will encounter it when reading code.\"\nmsgstr \"顯示 `where` 子句，學生在閱讀程式碼時會看到此內容。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It declutters the function signature if you have many parameters.\"\nmsgstr \"如果您有多個參數，這個子句可以整理函式簽名。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"It has additional features making it more powerful.\"\nmsgstr \"這個子句具有額外功能，因此效能也更強大。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"If someone asks, the extra feature is that the type on the left of \\\":\\\" can \"\n\"be arbitrary, like `Option<T>`.\"\nmsgstr \"\"\n\"如果有人提問，請說明額外功能是指 \\\":\\\" 左側的類別可為任意值，例如 \"\n\"`Option<T>`。\"\n\n#: src/generics/trait-bounds.md\nmsgid \"\"\n\"Note that Rust does not (yet) support specialization. For example, given the \"\n\"original `duplicate`, it is invalid to add a specialized `duplicate(a: u32)`.\"\nmsgstr \"\"\n\"請注意，Rust 尚不支援特化。舉例來說，對於原始的 `duplicate`，您無法新增特化\"\n\"的 `duplicate(a: u32)`。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Similar to trait bounds, an `impl Trait` syntax can be used in function \"\n\"arguments and return values:\"\nmsgstr \"與特徵界限類似，`impl Trait` 語法可用於 函式引數和回傳值中：\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\nmsgstr \"\"\n\"// Syntactic sugar for:\\n\"\n\"//   fn add_42_millions<T: Into<i32>>(x: T) -> i32 {\\n\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many}\\\"\"\nmsgstr \"\\\"{many}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"{many_more}\\\"\"\nmsgstr \"\\\"{many_more}\\\"\"\n\n#: src/generics/impl-trait.md\nmsgid \"\\\"debuggable: {debuggable:?}\\\"\"\nmsgstr \"\\\"debuggable: {debuggable:?}\\\"\"\n\n#: src/generics/impl-trait.md\n#, fuzzy\nmsgid \"\"\n\"`impl Trait` allows you to work with types which you cannot name. The \"\n\"meaning of `impl Trait` is a bit different in the different positions.\"\nmsgstr \"`impl Trait` 的涵義會因使用位置而有些微不同。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a parameter, `impl Trait` is like an anonymous generic parameter with a \"\n\"trait bound.\"\nmsgstr \"對參數來說，`impl Trait` 就像是具有特徵界限的匿名泛型參數。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"For a return type, it means that the return type is some concrete type that \"\n\"implements the trait, without naming the type. This can be useful when you \"\n\"don't want to expose the concrete type in a public API.\"\nmsgstr \"\"\n\"對回傳型別來說，`impl Trait` 代表回傳型別就是實作特徵的 某些具體型別，因而不\"\n\"必指名特定型別。如果您不想在公用 API 中公開具體型別， 這就非常有用。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"Inference is hard in return position. A function returning `impl Foo` picks \"\n\"the concrete type it returns, without writing it out in the source. A \"\n\"function returning a generic type like `collect<B>() -> B` can return any \"\n\"type satisfying `B`, and the caller may need to choose one, such as with \"\n\"`let x: Vec<_> = foo.collect()` or with the turbofish, `foo.collect::\"\n\"<Vec<_>>()`.\"\nmsgstr \"\"\n\"在回傳位置進行推論並不容易。回傳 `impl Foo` 的函式 會挑選自身回傳的具體型別，\"\n\"而不必在來源中寫出此資訊。回傳泛型型別 (例如 `collect<B>() -> B`) 的函式則可\"\n\"回傳 符合 `B` 的任何型別 ，而呼叫端可能需要選擇一個型別，例如使用 `let x: \"\n\"Vec<_> = foo.collect()` 或 Turbofish：`foo.collect::<Vec<_>>()`。\"\n\n#: src/generics/impl-trait.md\nmsgid \"\"\n\"What is the type of `debuggable`? Try `let debuggable: () = ..` to see what \"\n\"the error message shows.\"\nmsgstr \"\"\n\"思考一下，`debuggable` 的型別為何？您可以嘗試使用 `let debuggable: () = ..` \"\n\"查看錯誤訊息顯示的內容。\"\n\n#: src/generics/exercise.md\nmsgid \"\"\n\"In this short exercise, you will implement a generic `min` function that \"\n\"determines the minimum of two values, using a `LessThan` trait.\"\nmsgstr \"\"\n\"在這個簡短練習中，您將使用 `LessThan` 特徵實作泛型 `min` 函式，藉此判定兩個值\"\n\"中的最小值。\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"/// Return true if self is less than other.\\n\"\nmsgstr \"/// Return true if self is less than other.\\n\"\n\n#: src/generics/exercise.md\nmsgid \"// TODO: implement the `min` function used in `main`.\\n\"\nmsgstr \"// TODO: implement the `min` function used in `main`.\\n\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Shapiro\\\"\"\nmsgstr \"\\\"Shapiro\\\"\"\n\n#: src/generics/exercise.md src/generics/solution.md\nmsgid \"\\\"Baumann\\\"\"\nmsgstr \"\\\"Baumann\\\"\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Types](./std-types.md) (1 hour and 20 minutes)\"\nmsgstr \"[標準程式庫型別](./std-types.md) (1 小時 20 分鐘)\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)\"\nmsgstr \"[標準程式庫特徵](./std-traits.md) (1 小時 40 分鐘)\"\n\n#: src/welcome-day-2-afternoon.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 3 hours and 10 \"\n\"minutes\"\nmsgstr \"講解這個主題大約需要 3 小時 10 分鐘\"\n\n#: src/std-types.md\nmsgid \"[Standard Library](./std-types/std.md) (3 minutes)\"\nmsgstr \"[標準程式庫](./std-types/std.md) (3 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[Documentation](./std-types/docs.md) (5 minutes)\"\nmsgstr \"[說明文件](./std-types/docs.md) (5 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[Option](./std-types/option.md) (10 minutes)\"\nmsgstr \"[選項](./std-types/option.md) (10 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[Result](./std-types/result.md) (10 minutes)\"\nmsgstr \"[結果](./std-types/result.md) (10 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[String](./std-types/string.md) (10 minutes)\"\nmsgstr \"[字串](./std-types/string.md) (10 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[Vec](./std-types/vec.md) (10 minutes)\"\nmsgstr \"[Vec](./std-types/vec.md) (10 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[HashMap](./std-types/hashmap.md) (10 minutes)\"\nmsgstr \"[HashMap](./std-types/hashmap.md) (10 分鐘)\"\n\n#: src/std-types.md\nmsgid \"[Exercise: Counter](./std-types/exercise.md) (20 minutes)\"\nmsgstr \"[練習：計數器](./std-types/exercise.md) (20 分鐘)\"\n\n#: src/std-types.md\nmsgid \"This segment should take about 1 hour and 20 minutes\"\nmsgstr \"講解這個主題大約需要 1 小時 20 分鐘\"\n\n#: src/std-types.md\nmsgid \"\"\n\"For each of the slides in this section, spend some time reviewing the \"\n\"documentation pages, highlighting some of the more common methods.\"\nmsgstr \"\"\n\"請針對這節的每張投影片，花點時間帶學員詳讀說明文件頁面，並向他們強調一些較常\"\n\"見的方法。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"Rust comes with a standard library which helps establish a set of common \"\n\"types used by Rust libraries and programs. This way, two libraries can work \"\n\"together smoothly because they both use the same `String` type.\"\nmsgstr \"\"\n\"Rust 提供標準函式庫，可用於建立供 Rust 函式庫和程式使用的常用型別集。如此一\"\n\"來，兩個函式庫會使用相同的 `String` 型別，因此能夠順暢搭配運作。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"In fact, Rust contains several layers of the Standard Library: `core`, \"\n\"`alloc` and `std`.\"\nmsgstr \"Rust 實際上含有多種層級的標準函式庫，分別是 `core`、`alloc` 和 `std`。\"\n\n#: src/std-types/std.md\n#, fuzzy\nmsgid \"\"\n\"`core` includes the most basic types and functions that don't depend on \"\n\"`libc`, allocator or even the presence of an operating system.\"\nmsgstr \"\"\n\"`core` 包括最基本的型別與函式，這些型別與函式不依附於 `libc`、配置器或作業系\"\n\"統。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"`alloc` includes types which require a global heap allocator, such as `Vec`, \"\n\"`Box` and `Arc`.\"\nmsgstr \"`alloc` 包括需要全域堆積配置器的型別，例如 `Vec`、`Box` 和 `Arc`。\"\n\n#: src/std-types/std.md\nmsgid \"\"\n\"Embedded Rust applications often only use `core`, and sometimes `alloc`.\"\nmsgstr \"嵌入式 Rust 應用程式通常只使用 `core`，偶爾會使用 `alloc`。\"\n\n#: src/std-types/docs.md\nmsgid \"Rust comes with extensive documentation. For example:\"\nmsgstr \"Rust 說明文件的主題涵蓋甚廣，包括：\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"All of the details about [loops](https://doc.rust-lang.org/stable/reference/\"\n\"expressions/loop-expr.html).\"\nmsgstr \"\"\n\"如果你想提早跳出迴圈，可以使用 [`break`]((https://doc.rust-lang.org/\"\n\"reference/expressions/loop-expr.html#break-expressions))，\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive.\"\n\"u8.html).\"\nmsgstr \"\"\n\"基本型別，例如 [`u8`](https://doc.rust-lang.org/stable/std/primitive.u8.\"\n\"html)。\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/\"\n\"option/enum.Option.html) or [`BinaryHeap`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.BinaryHeap.html).\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) 和 [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/std-types/docs.md\nmsgid \"In fact, you can document your own code:\"\nmsgstr \"您其實可以將程式碼記錄下來：\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\nmsgstr \"\"\n\"/// Determine whether the first argument is divisible by the second \"\n\"argument.\\n\"\n\"///\\n\"\n\"/// If the second argument is zero, the result is false.\\n\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"The contents are treated as Markdown. All published Rust library crates are \"\n\"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) tool. It is \"\n\"idiomatic to document all public items in an API using this pattern.\"\nmsgstr \"\"\n\"系統會將內容視為 Markdown。所有已發布的 Rust 程式庫 Crate，都會使用 [rustdoc]\"\n\"(https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) 工具自動記錄於 \"\n\"[`docs.rs`](https://docs.rs) 中。這種記錄 API 中所有公開項目的模式是慣用做\"\n\"法。\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"To document an item from inside the item (such as inside a module), use `//!\"\n\"` or `/*! .. */`, called \\\"inner doc comments\\\":\"\nmsgstr \"\"\n\"如要從項目內部 (例如在模組內) 記錄項目，請使用 `//!` 或 `/*! .. */`，這也稱做\"\n\"「內部文件註解」：\"\n\n#: src/std-types/docs.md\nmsgid \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\nmsgstr \"\"\n\"//! This module contains functionality relating to divisibility of \"\n\"integers.\\n\"\n\n#: src/std-types/docs.md\n#, fuzzy\nmsgid \"\"\n\"Show students the generated docs for the `rand` crate at <https://docs.rs/\"\n\"rand>.\"\nmsgstr \"\"\n\"向學生展示針對 `rand` Crate 產生的文件，路徑如下：[`docs.rs/rand`](https://\"\n\"docs.rs/rand)。\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"Option\"\nmsgstr \"例外狀況\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"We have already seen some use of `Option<T>`. It stores either a value of \"\n\"type `T` or nothing. For example, [`String::find`](https://doc.rust-lang.org/\"\n\"stable/std/string/struct.String.html#method.find) returns an `Option<usize>`.\"\nmsgstr \"\"\n\"我們已看過 `Option<T>` 的某些用法，包括儲存型別為 `T` 的值，或不儲存任何東\"\n\"西。舉例來說，[`String::find`](https://doc.rust-lang.org/stable/std/string/\"\n\"struct.String.html#method.find) 會傳回 `Option<usize>`。\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\nmsgstr \"\\\"Löwe 老虎 Léopard Gepardi\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'é'\"\nmsgstr \"'é'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"find returned {position:?}\\\"\"\nmsgstr \"\\\"find returned {position:?}\\\"\"\n\n#: src/std-types/option.md\nmsgid \"'Z'\"\nmsgstr \"'Z'\"\n\n#: src/std-types/option.md\nmsgid \"\\\"Character not found\\\"\"\nmsgstr \"\\\"Character not found\\\"\"\n\n#: src/std-types/option.md\n#, fuzzy\nmsgid \"`Option` is widely used, not just in the standard library.\"\nmsgstr \"`Option` 和 `Result` 這兩種型別的使用範圍很廣，不侷限於標準函式庫。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"`unwrap` will return the value in an `Option`, or panic. `expect` is similar \"\n\"but takes an error message.\"\nmsgstr \"\"\n\"`unwrap` 會在 `Option` 或恐慌中傳回值。`expect` 也類似，但會收到錯誤訊息。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"You can panic on None, but you can't \\\"accidentally\\\" forget to check for \"\n\"None.\"\nmsgstr \"您可以讓程式在 None 發生恐慌，但不能「因錯而」忘記檢查 None。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"It's common to `unwrap`/`expect` all over the place when hacking something \"\n\"together, but production code typically handles `None` in a nicer fashion.\"\nmsgstr \"\"\n\"如果是要設計某些臨時程式，通常會在各處 `unwrap`/`expect`，但實際運作的程式碼\"\n\"一般會以較好的方式處理 `None`。\"\n\n#: src/std-types/option.md\nmsgid \"\"\n\"The niche optimization means that `Option<T>` often has the same size in \"\n\"memory as `T`.\"\nmsgstr \"所謂區位最佳化，代表 `Option<T>` 的記憶體大小通常與 `T` 相同。\"\n\n#: src/std-types/result.md\nmsgid \"Result\"\nmsgstr \"結果\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is similar to `Option`, but indicates the success or failure of an \"\n\"operation, each with a different type. This is similar to the `Res` defined \"\n\"in the expression exercise, but generic: `Result<T, E>` where `T` is used in \"\n\"the `Ok` variant and `E` appears in the `Err` variant.\"\nmsgstr \"\"\n\"`Result` 和 `Option` 類似，但會指出作業成功或失敗，且各自都有不同的型別。雖然\"\n\"和運算式練習中定義的 `Res` 很像，但這屬於泛型，也就是 `Result<T, E>`，其中 \"\n\"`T` 用於 `Ok` 變體，而 `E` 則會出現在 `Err` 變數中。\"\n\n#: src/std-types/result.md\nmsgid \"\\\"diary.txt\\\"\"\nmsgstr \"\\\"diary.txt\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\nmsgstr \"\\\"Dear diary: {contents} ({bytes} bytes)\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"Could not read file content\\\"\"\nmsgstr \"\\\"Could not read file content\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\\\"The diary could not be opened: {err}\\\"\"\nmsgstr \"\\\"The diary could not be opened: {err}\\\"\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"As with `Option`, the successful value sits inside of `Result`, forcing the \"\n\"developer to explicitly extract it. This encourages error checking. In the \"\n\"case where an error should never happen, `unwrap()` or `expect()` can be \"\n\"called, and this is a signal of the developer intent too.\"\nmsgstr \"\"\n\"就跟使用 `Option` 一樣，成功的值會在 Result 內部，這會強制開發人員明確擷取該\"\n\"值，進而有利於檢查錯誤。在應該絕對不會發生錯誤的情況下，可以呼叫 `unwrap()` \"\n\"或 `expect()`，這也是開發人員意圖的訊號。\"\n\n#: src/std-types/result.md\n#, fuzzy\nmsgid \"\"\n\"`Result` documentation is a recommended read. Not during the course, but it \"\n\"is worth mentioning. It contains a lot of convenience methods and functions \"\n\"that help functional-style programming.\"\nmsgstr \"\"\n\"建議您參閱 `Result` 說明文件。這不涵蓋在課程內，但值得一提。這份文件收錄許多\"\n\"方便的方法和函式，有助於您進行函式程式設計。\"\n\n#: src/std-types/result.md\nmsgid \"\"\n\"`Result` is the standard type to implement error handling as we will see on \"\n\"Day 3.\"\nmsgstr \"`Result` 是實作錯誤處理的標準型別，我們將在第 3 天的課程中介紹。\"\n\n#: src/std-types/string.md\nmsgid \"String\"\nmsgstr \"String\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the \"\n\"standard heap-allocated growable UTF-8 string buffer:\"\nmsgstr \"\"\n\"[`String`](https://doc.rust-lang.org/std/string/struct.String.html) 是標準堆\"\n\"積配置的可成長 UTF-8 字串緩衝區：\"\n\n#: src/std-types/string.md src/std-traits/read-and-write.md\n#: src/memory-management/review.md src/testing/unit-tests.md\n#: src/concurrency/scoped-threads.md\nmsgid \"\\\"Hello\\\"\"\nmsgstr \"\\\"Hello\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"'!'\"\nmsgstr \"'!'\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"s2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"🇨🇭\\\"\"\nmsgstr \"\\\"🇨🇭\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\\\"s3: len = {}, number of chars = {}\\\"\"\nmsgstr \"\\\"s3: len = {}, number of chars = {}\\\"\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements [`Deref<Target = str>`](https://doc.rust-lang.org/std/\"\n\"string/struct.String.html#deref-methods-str), which means that you can call \"\n\"all `str` methods on a `String`.\"\nmsgstr \"\"\n\"`String` 會實作 [`Deref<Target = str>`](https://doc.rust-lang.org/std/string/\"\n\"struct.String.html#deref-methods-str)。也就是說，您可以在 `String` 上呼叫所\"\n\"有 `str` 方法。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::new` returns a new empty string, use `String::with_capacity` when \"\n\"you know how much data you want to push to the string.\"\nmsgstr \"\"\n\"`String::new` 會傳回新的空白字串，如果您知道要向字串推送多少資料，請使用 \"\n\"`String::with_capacity`。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::len` returns the size of the `String` in bytes (which can be \"\n\"different from its length in characters).\"\nmsgstr \"\"\n\"`String::len` 會傳回 `String` 的大小 (以位元組為單位，可能與以字元為單位的長\"\n\"度不同)。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String::chars` returns an iterator over the actual characters. Note that a \"\n\"`char` can be different from what a human will consider a \\\"character\\\" due \"\n\"to [grapheme clusters](https://docs.rs/unicode-segmentation/latest/\"\n\"unicode_segmentation/struct.Graphemes.html).\"\nmsgstr \"\"\n\"`String::chars` 會傳回實際字元的疊代器。請注意，由於[字形叢集](https://docs.\"\n\"rs/unicode-segmentation/latest/unicode_segmentation/struct.Graphemes.html)的\"\n\"關係，`char` 和一般人所認為的「字元」可能不同。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When people refer to strings they could either be talking about `&str` or \"\n\"`String`.\"\nmsgstr \"提到字串時，一般人可能是指 `&str` 或 `String`。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"When a type implements `Deref<Target = T>`, the compiler will let you \"\n\"transparently call methods from `T`.\"\nmsgstr \"\"\n\"當型別實作 `Deref<Target = T>` 時，編譯器可讓您以公開透明的方式呼叫 `T` 中的\"\n\"方法。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"We haven't discussed the `Deref` trait yet, so at this point this mostly \"\n\"explains the structure of the sidebar in the documentation.\"\nmsgstr \"我們尚未討論 `Deref` 特徵，因此目前主要會講解說明文件中的側欄結構。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` implements `Deref<Target = str>` which transparently gives it \"\n\"access to `str`'s methods.\"\nmsgstr \"\"\n\"`String` 會實作 `Deref<Target = str>`，後者能以公開透明的方式授予前者 `str` \"\n\"方法的存取權。\"\n\n#: src/std-types/string.md\n#, fuzzy\nmsgid \"Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`.\"\nmsgstr \"編寫及比較 `let s3 = s1.deref();` 和 `let s3 = &*s1`;。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"`String` is implemented as a wrapper around a vector of bytes, many of the \"\n\"operations you see supported on vectors are also supported on `String`, but \"\n\"with some extra guarantees.\"\nmsgstr \"\"\n\"`String` 是以包裝函式的形式在位元組向量的四周實作，許多在向量上支援的作業也適\"\n\"用於 `String`，但需要某些額外保證。\"\n\n#: src/std-types/string.md\nmsgid \"Compare the different ways to index a `String`:\"\nmsgstr \"請比較各種為 `String` 建立索引的方法：\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, \"\n\"out-of-bounds.\"\nmsgstr \"使用 `s3.chars().nth(i).unwrap()` 變為字元，其中 `i` 代表是否出界。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"To a substring by using `s3[0..4]`, where that slice is on character \"\n\"boundaries or not.\"\nmsgstr \"使用 `s3[0..4]` 變為子字串，其中該切片會位於字元邊界上，也可能不會。\"\n\n#: src/std-types/string.md\nmsgid \"\"\n\"Many types can be converted to a string with the [`to_string`](https://doc.\"\n\"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. \"\n\"This trait is automatically implemented for all types that implement \"\n\"`Display`, so anything that can be formatted can also be converted to a \"\n\"string.\"\nmsgstr \"\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard \"\n\"resizable heap-allocated buffer:\"\nmsgstr \"\"\n\"[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) 是可調整大小的標準\"\n\"堆積配置緩衝區：\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v1: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v1: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"v2: len = {}, capacity = {}\\\"\"\nmsgstr \"\\\"v2: len = {}, capacity = {}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Canonical macro to initialize a vector with elements.\\n\"\nmsgstr \"// Canonical macro to initialize a vector with elements.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"// Retain only the even elements.\\n\"\nmsgstr \"// Retain only the even elements.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\\\"{v3:?}\\\"\"\nmsgstr \"\\\"{v3:?}\\\"\"\n\n#: src/std-types/vec.md\nmsgid \"// Remove consecutive duplicates.\\n\"\nmsgstr \"// Remove consecutive duplicates.\\n\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`Vec` implements [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D), which means that you can call slice \"\n\"methods on a `Vec`.\"\nmsgstr \"\"\n\"`Vec` 會實作 [`Deref<Target = [T]>`](https://doc.rust-lang.org/std/vec/\"\n\"struct.Vec.html#deref-methods-%5BT%5D)。也就是說，您可以在 `Vec` 上呼叫切片方\"\n\"法。\"\n\n#: src/std-types/vec.md\n#, fuzzy\nmsgid \"\"\n\"`Vec` is a type of collection, along with `String` and `HashMap`. The data \"\n\"it contains is stored on the heap. This means the amount of data doesn't \"\n\"need to be known at compile time. It can grow or shrink at runtime.\"\nmsgstr \"\"\n\"`Vec` 是一種集合型別，與 `String` 和 `HashMap` 都一樣。`Vec` 內含的資料會儲存\"\n\"在堆積上。這表示在編譯期間無需得知資料量，可在執行階段増量或減量。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Notice how `Vec<T>` is a generic type too, but you don't have to specify `T` \"\n\"explicitly. As always with Rust type inference, the `T` was established \"\n\"during the first `push` call.\"\nmsgstr \"\"\n\"請留意 `Vec<T>` 也能做為泛型型別，但您不必明確指定 `T`。和往常的 Rust 型別推\"\n\"論一樣，系統會在第一次 `push` 呼叫期間建立 `T`。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"`vec![...]` is a canonical macro to use instead of `Vec::new()` and it \"\n\"supports adding initial elements to the vector.\"\nmsgstr \"\"\n\"`vec![...]` 是用於取代 `Vec::new()` 的標準巨集，且支援在向量中加入初始元素。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"To index the vector you use `[` `]`, but they will panic if out of bounds. \"\n\"Alternatively, using `get` will return an `Option`. The `pop` function will \"\n\"remove the last element.\"\nmsgstr \"\"\n\"如要為向量建立索引，請使用 `[` `]`，但如果超出範圍會引發恐慌。或者，使用 \"\n\"`get` 則可傳回 `Option`。`pop` 函式會移除最後一個元素。\"\n\n#: src/std-types/vec.md\nmsgid \"\"\n\"Slices are covered on day 3. For now, students only need to know that a \"\n\"value of type `Vec` gives access to all of the documented slice methods, too.\"\nmsgstr \"\"\n\"我們會在第 3 天談到切片。現階段，學生只需知道 `Vec` 型別的值也能存取所有記錄\"\n\"下來的切片方法。\"\n\n#: src/std-types/hashmap.md\nmsgid \"Standard hash map with protection against HashDoS attacks:\"\nmsgstr \"標準雜湊映射，可防範 HashDoS 攻擊：\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Adventures of Huckleberry Finn\\\"\"\nmsgstr \"\\\"Adventures of Huckleberry Finn\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Grimms' Fairy Tales\\\"\"\nmsgstr \"\\\"Grimms' Fairy Tales\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Pride and Prejudice\\\"\"\nmsgstr \"\\\"Pride and Prejudice\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Les Misérables\\\"\"\nmsgstr \"\\\"Les Misérables\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"We know about {} books, but not Les Misérables.\\\"\"\nmsgstr \"\\\"We know about {} books, but not Les Misérables.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Alice's Adventure in Wonderland\\\"\"\nmsgstr \"\\\"Alice's Adventure in Wonderland\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book}: {count} pages\\\"\"\nmsgstr \"\\\"{book}: {count} pages\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{book} is unknown.\\\"\"\nmsgstr \"\\\"{book} is unknown.\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"// Use the .entry() method to insert a value if nothing is found.\\n\"\nmsgstr \"// Use the .entry() method to insert a value if nothing is found.\\n\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"{page_counts:#?}\\\"\"\nmsgstr \"\\\"{page_counts:#?}\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"`HashMap` is not defined in the prelude and needs to be brought into scope.\"\nmsgstr \"我們一開始並未定義 `HashMap`，因此現在需要將其納入課程範圍。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try the following lines of code. The first line will see if a book is in the \"\n\"hashmap and if not return an alternative value. The second line will insert \"\n\"the alternative value in the hashmap if the book is not found.\"\nmsgstr \"\"\n\"請嘗試使用以下幾行程式碼。第一行會查看書籍是否在雜湊表中，如果不在，系統會傳\"\n\"回替代值。如果系統找不到書籍，第二行會在雜湊表中插入替代值。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\nmsgstr \"\\\"Harry Potter and the Sorcerer's Stone\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"\\\"The Hunger Games\\\"\"\nmsgstr \"\\\"The Hunger Games\\\"\"\n\n#: src/std-types/hashmap.md\nmsgid \"Unlike `vec!`, there is unfortunately no standard `hashmap!` macro.\"\nmsgstr \"可惜的是，並沒有所謂標準的 `hashmap!` 巨集。這點與 `vec!` 不同。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://\"\n\"doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#impl-\"\n\"From%3C%5B(K,+V);+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E), which allows \"\n\"us to easily initialize a hash map from a literal array:\"\nmsgstr \"\"\n\"不過，自 Rust 1.56 起，HashMap 會實作 [`From<[(K, V); N]>`](https://doc.rust-\"\n\"lang.org/std/collections/hash_map/struct.HashMap.html#impl-From%3C%5B(K,+V);\"\n\"+N%5D%3E-for-HashMap%3CK,+V,+RandomState%3E)，以便讓我們能從常值陣列初始化雜\"\n\"湊映射：\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Alternatively HashMap can be built from any `Iterator` which yields key-\"\n\"value tuples.\"\nmsgstr \"或者，您也可以透過任何能產生鍵/值元組的 `Iterator` 建立 HashMap。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"We are showing `HashMap<String, i32>`, and avoid using `&str` as key to make \"\n\"examples easier. Using references in collections can, of course, be done, \"\n\"but it can lead into complications with the borrow checker.\"\nmsgstr \"\"\n\"我們示範的是 `HashMap<String, i32>`，請避免使用 `&str 做為鍵，讓範例變得更簡\"\n\"單。當然，也可以在集合中使用參照，但這可能會使借用檢查器變得複雜。\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"Try removing `to_string()` from the example above and see if it still \"\n\"compiles. Where do you think we might run into issues?\"\nmsgstr \"\"\n\"請嘗試從上述範例中移除 `to_string()`，看看是否仍可編譯。您認為我們可能會在哪\"\n\"裡遇到問題？\"\n\n#: src/std-types/hashmap.md\nmsgid \"\"\n\"This type has several \\\"method-specific\\\" return types, such as `std::\"\n\"collections::hash_map::Keys`. These types often appear in searches of the \"\n\"Rust docs. Show students the docs for this type, and the helpful link back \"\n\"to the `keys` method.\"\nmsgstr \"\"\n\"這個型別有多個「方法專屬」的傳回型別，例如 `std::collections::hash_map::\"\n\"Keys`。這些型別經常會在 Rust 文件的搜尋結果中出現。請向學生展示這個型別的文\"\n\"件，以及可返回 `keys` 方法的實用連結。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"In this exercise you will take a very simple data structure and make it \"\n\"generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html) to keep track of which values \"\n\"have been seen and how many times each one has appeared.\"\nmsgstr \"\"\n\"在本練習中，您要使用非常簡單的資料結構並將其設為泛型。此結構會使用 [`std::\"\n\"collections::HashMap`](https://doc.rust-lang.org/stable/std/collections/\"\n\"struct.HashMap.html) 追蹤出現過的值和出現次數。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"The initial version of `Counter` is hard coded to only work for `u32` \"\n\"values. Make the struct and its methods generic over the type of value being \"\n\"tracked, that way `Counter` can track any type of value.\"\nmsgstr \"\"\n\"`Counter` 的初始版本經過硬式編碼，僅適用於 `u32` 值。請設法讓結構體和相應的方\"\n\"法成為泛型，而非所追蹤值的型別，這樣 `Counter` 就可以追蹤任何型別的值。\"\n\n#: src/std-types/exercise.md\nmsgid \"\"\n\"If you finish early, try using the [`entry`](https://doc.rust-lang.org/\"\n\"stable/std/collections/struct.HashMap.html#method.entry) method to halve the \"\n\"number of hash lookups required to implement the `count` method.\"\nmsgstr \"\"\n\"如果您提前完成操作，不妨試著使用 [`entry`](https://doc.rust-lang.org/stable/\"\n\"std/collections/struct.HashMap.html#method.entry) 方法將實作 `count` 方法所需\"\n\"的雜湊查詢數量減半。\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\nmsgstr \"\"\n\"/// Counter counts the number of times each value of type T has been seen.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Create a new Counter.\\n\"\nmsgstr \"/// Create a new Counter.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Count an occurrence of the given value.\\n\"\nmsgstr \"/// Count an occurrence of the given value.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"/// Return the number of times the given value has been seen.\\n\"\nmsgstr \"/// Return the number of times the given value has been seen.\\n\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"saw {} values equal to {}\\\"\"\nmsgstr \"\\\"saw {} values equal to {}\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"apple\\\"\"\nmsgstr \"\\\"apple\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"orange\\\"\"\nmsgstr \"\\\"orange\\\"\"\n\n#: src/std-types/exercise.md src/std-types/solution.md\nmsgid \"\\\"got {} apples\\\"\"\nmsgstr \"\\\"got {} apples\\\"\"\n\n#: src/std-traits.md\nmsgid \"[Comparisons](./std-traits/comparisons.md) (10 minutes)\"\nmsgstr \"[比較](./std-traits/comparisons.md) (10 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Operators](./std-traits/operators.md) (10 minutes)\"\nmsgstr \"[運算子](./std-traits/operators.md) (10 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[From and Into](./std-traits/from-and-into.md) (10 minutes)\"\nmsgstr \"[From 和 Into](./std-traits/from-and-into.md) (10 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Casting](./std-traits/casting.md) (5 minutes)\"\nmsgstr \"[轉換](./std-traits/casting.md) (5 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Read and Write](./std-traits/read-and-write.md) (10 minutes)\"\nmsgstr \"[Read 和 Write](./std-traits/read-and-write.md) (10 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Default, struct update syntax](./std-traits/default.md) (5 minutes)\"\nmsgstr \"[Default (結構體更新語法)](./std-traits/default.md) (5 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Closures](./std-traits/closures.md) (20 minutes)\"\nmsgstr \"[閉包](./std-traits/closures.md) (20 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)\"\nmsgstr \"[練習：ROT13](./std-traits/exercise.md) (30 分鐘)\"\n\n#: src/std-traits.md\nmsgid \"This segment should take about 1 hour and 40 minutes\"\nmsgstr \"講解這個主題大約需要 1 小時 40 分鐘\"\n\n#: src/std-traits.md\nmsgid \"\"\n\"As with the standard-library types, spend time reviewing the documentation \"\n\"for each trait.\"\nmsgstr \"和標準程式庫型別一樣，請花時間詳閱每種特徵的說明文件。\"\n\n#: src/std-traits.md\nmsgid \"This section is long. Take a break midway through.\"\nmsgstr \"這節課時間很長，在中間休息片刻吧。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"These traits support comparisons between values. All traits can be derived \"\n\"for types containing fields that implement these traits.\"\nmsgstr \"\"\n\"以下特徵可用於比較不同的值。如果欄位會實作這些特徵，您可以針對含有這類欄位的\"\n\"型別衍生所有特徵。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialEq` and `Eq`\"\nmsgstr \"`PartialEq` 和 `Eq`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` is a partial equivalence relation, with required method `eq` and \"\n\"provided method `ne`. The `==` and `!=` operators will call these methods.\"\nmsgstr \"\"\n\"`PartialEq` 代表部分對等關係，具有必要方法 `eq` 和提供的方法 `ne`。`==` 和 `!\"\n\"=` 運算子會呼叫這些方法。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) \"\n\"and implies `PartialEq`. Functions that require full equivalence will use \"\n\"`Eq` as a trait bound.\"\nmsgstr \"\"\n\"`Eq` 代表完整對等關係 (自反、對稱和傳遞性)，並且隱含 `PartialEq`。需要完整對\"\n\"等關係的函式會使用 `Eq` 做為特徵界線。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`PartialOrd` and `Ord`\"\nmsgstr \"`PartialOrd` 和 `Ord`\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is \"\n\"used to implement the `<`, `<=`, `>=`, and `>` operators.\"\nmsgstr \"\"\n\"`PartialOrd` 會透過 `partial_cmp` 方法定義偏序，可用於實作 `<`、`<=`、`>=` \"\n\"和 `>` 運算子。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"`Ord` is a total ordering, with `cmp` returning `Ordering`.\"\nmsgstr \"`Ord` 是全序，其中 `cmp` 會傳回 `Ordering`。\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"`PartialEq` can be implemented between different types, but `Eq` cannot, \"\n\"because it is reflexive:\"\nmsgstr \"`PartialEq` 可以在不同的型別之間實作，但具有自反性的 `Eq` 無法：\"\n\n#: src/std-traits/comparisons.md\nmsgid \"\"\n\"In practice, it's common to derive these traits, but uncommon to implement \"\n\"them.\"\nmsgstr \"實務上一般會衍生這些特徵，但鮮少會實作這些特徵。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Operator overloading is implemented via traits in [`std::ops`](https://doc.\"\n\"rust-lang.org/std/ops/index.html):\"\nmsgstr \"\"\n\"運算子超載會透過 [`std::ops`](https://doc.rust-lang.org/std/ops/index.html): \"\n\"內的特徵實作：\"\n\n#: src/std-traits/operators.md\nmsgid \"\\\"{:?} + {:?} = {:?}\\\"\"\nmsgstr \"\\\"{:?} + {:?} = {:?}\\\"\"\n\n#: src/std-traits/operators.md src/memory-management/drop.md\nmsgid \"Discussion points:\"\nmsgstr \"討論要點：\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"You could implement `Add` for `&Point`. In which situations is that useful?\"\nmsgstr \"您可以針對 `&Point` 實作 `Add`。但這能在哪些情況派上用場？\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Answer: `Add:add` consumes `self`. If type `T` for which you are overloading \"\n\"the operator is not `Copy`, you should consider overloading the operator for \"\n\"`&T` as well. This avoids unnecessary cloning on the call site.\"\nmsgstr \"\"\n\"回答：`Add:add` 會耗用 `self`。如果您要超載運算子的型別 `T` 不是         \"\n\"`Copy`，建議您一併為 `&T` 超載運算子。這可避免呼叫點中出現不必要        的複\"\n\"製作業。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"Why is `Output` an associated type? Could it be made a type parameter of the \"\n\"method?\"\nmsgstr \"為什麼 `Output` 是關聯型別？可將其用做方法的型別參數嗎？\"\n\n#: src/std-traits/operators.md\n#, fuzzy\nmsgid \"\"\n\"Short answer: Function type parameters are controlled by the caller, but \"\n\"associated types (like `Output`) are controlled by the implementer of a \"\n\"trait.\"\nmsgstr \"\"\n\"簡答：函式型別參數是由呼叫端控管，但 `Output` 這類關聯型別則由特徵        實\"\n\"作者控管。\"\n\n#: src/std-traits/operators.md\nmsgid \"\"\n\"You could implement `Add` for two different types, e.g. `impl Add<(i32, \"\n\"i32)> for Point` would add a tuple to a `Point`.\"\nmsgstr \"\"\n\"您可以針對兩種不同型別實作 `Add`，舉例來說，  `impl Add<(i32, i32)> for \"\n\"Point` 會將元組新增至 `Point`。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From.\"\n\"html) and [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) to \"\n\"facilitate type conversions:\"\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\"換作業執行：\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\nmsgstr \"\\\"{s}, {addr}, {one}, {bigger}\\\"\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is \"\n\"automatically implemented when [`From`](https://doc.rust-lang.org/std/\"\n\"convert/trait.From.html) is implemented:\"\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\"作：\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"That's why it is common to only implement `From`, as your type will get \"\n\"`Into` implementation too.\"\nmsgstr \"這就是為什麼通常只需實作 `From`，因為型別也會實作 `Into`。\"\n\n#: src/std-traits/from-and-into.md\nmsgid \"\"\n\"When declaring a function argument input type like \\\"anything that can be \"\n\"converted into a `String`\\\", the rule is opposite, you should use `Into`. \"\n\"Your function will accept types that implement `From` and those that _only_ \"\n\"implement `Into`.\"\nmsgstr \"\"\n\"如要宣告函式引數輸入型別 (例如「任何可轉換成 `String` 的型別」)，規則便會相\"\n\"反，此時請使用 `Into`。 您的函式會接受實作 `From` 的型別，以及「僅」實作 \"\n\"`Into` 的型別。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Rust has no _implicit_ type conversions, but does support explicit casts \"\n\"with `as`. These generally follow C semantics where those are defined.\"\nmsgstr \"\"\n\"Rust 沒有「隱含」型別的轉換，但支援使用 `as` 明確轉換。後者通常會遵循定義前者\"\n\"時所用的 C 語意。\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u16: {}\\\"\"\nmsgstr \"\\\"as u16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as i16: {}\\\"\"\nmsgstr \"\\\"as i16: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\\\"as u8: {}\\\"\"\nmsgstr \"\\\"as u8: {}\\\"\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"The results of `as` are _always_ defined in Rust and consistent across \"\n\"platforms. This might not match your intuition for changing sign or casting \"\n\"to a smaller type -- check the docs, and comment for clarity.\"\nmsgstr \"\"\n\"在 Rust 中，`as` 的結果「一律」會經過定義，且在不同平台間保持一致。這可能不符\"\n\"合您變更符號或轉換到較小型別時的直觀做法，請檢查文件並加註說明內容。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"Casting with `as` is a relatively sharp tool that is easy to use \"\n\"incorrectly, and can be a source of subtle bugs as future maintenance work \"\n\"changes the types that are used or the ranges of values in types. Casts are \"\n\"best used only when the intent is to indicate unconditional truncation (e.g. \"\n\"selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what \"\n\"was in the high bits).\"\nmsgstr \"\"\n\"雖然使用 `as` 進行型別相當簡單，但是非常容易出錯；舉例來說，如果往後的維護作\"\n\"業改變了所用型別或型別中值的範圍，這常常就是某些細微錯誤的來源。只有在意圖用\"\n\"於指明無條件截斷時，我們才建議使用型別轉換。舉例來說，如果無論高位元中的內容\"\n\"為何，您都只需要 `u64` 的底部 32 位元，就可以使用 `as u32`。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` \"\n\"over `as` to confirm that the cast is in fact infallible. For fallible \"\n\"casts, `TryFrom` and `TryInto` are available when you want to handle casts \"\n\"that fit differently from those that don't.\"\nmsgstr \"\"\n\"如果是 `u32` 到 `u64` 這類絕對無誤的型別轉換，適合先使用 `From` 或 `Into` (而\"\n\"非 `as`) 確認轉換確實無誤。對於容易出錯的轉換，如果您想以不同的方式處理，可以\"\n\"使用 `TryFrom` 和 `TryInto`。\"\n\n#: src/std-traits/casting.md\nmsgid \"Consider taking a break after this slide.\"\nmsgstr \"建議在講解完這張投影片後休息片刻。\"\n\n#: src/std-traits/casting.md\nmsgid \"\"\n\"`as` is similar to a C++ static cast. Use of `as` in cases where data might \"\n\"be lost is generally discouraged, or at least deserves an explanatory \"\n\"comment.\"\nmsgstr \"\"\n\"`as` 類似於 C++ 的靜態轉換。一般不建議在資料可能遺失的情況下使用 `as`，如果要\"\n\"用，也至少要提供說明註解。\"\n\n#: src/std-traits/casting.md\nmsgid \"This is common in casting integers to `usize` for use as an index.\"\nmsgstr \"這在將整數轉換為 `usize` 以用做索引時很常見。\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), you can \"\n\"abstract over `u8` sources:\"\nmsgstr \"\"\n\"使用 [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) 和 \"\n\"[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html) 即可對 `u8` \"\n\"來源進行抽象化處理：\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\nmsgstr \"b\\\"foo\\\\nbar\\\\nbaz\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in slice: {}\\\"\"\nmsgstr \"\\\"lines in slice: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"lines in file: {}\\\"\"\nmsgstr \"\\\"lines in file: {}\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\"\n\"Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets \"\n\"you abstract over `u8` sinks:\"\nmsgstr \"\"\n\"同樣地，[`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) 則可讓您\"\n\"將 `u8` 接收器抽象化：\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"\\\\n\\\"\"\nmsgstr \"\\\"\\\\n\\\"\"\n\n#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"World\\\"\"\nmsgstr \"\\\"World\\\"\"\n\n#: src/std-traits/read-and-write.md\nmsgid \"\\\"Logged: {:?}\\\"\"\nmsgstr \"\\\"Logged: {:?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"The `Default` Trait\"\nmsgstr \"`Default` 特徵\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait \"\n\"produces a default value for a type.\"\nmsgstr \"\"\n\"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) 特徵會\"\n\"產生型別的預設值。\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"John Smith\\\"\"\nmsgstr \"\\\"John Smith\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{default_struct:#?}\\\"\"\nmsgstr \"\\\"{default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"Y is set!\\\"\"\nmsgstr \"\\\"Y is set!\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\\\"{almost_default_struct:#?}\\\"\"\nmsgstr \"\\\"{almost_default_struct:#?}\\\"\"\n\n#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md\n#: src/slices-and-lifetimes/solution.md\nmsgid \"\\\"{:#?}\\\"\"\nmsgstr \"\\\"{:#?}\\\"\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"It can be implemented directly or it can be derived via `#[derive(Default)]`.\"\nmsgstr \"這可以直接實作，也可以透過 `#[derive(Default)]` 衍生得出。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"A derived implementation will produce a value where all fields are set to \"\n\"their default values.\"\nmsgstr \"衍生的實作項目會產生一個執行個體，其中欄位全都設為預設值。\"\n\n#: src/std-traits/default.md\nmsgid \"This means all types in the struct must implement `Default` too.\"\nmsgstr \"也就是說，該結構體中的所有型別也都必須實作 `Default`。\"\n\n#: src/std-traits/default.md\nmsgid \"\"\n\"Standard Rust types often implement `Default` with reasonable values (e.g. \"\n\"`0`, `\\\"\\\"`, etc).\"\nmsgstr \"\"\n\"標準的 Rust 型別通常會以合理的值 (例如 `0`、`\\\"\\\"` 等等) 實作 `Default`。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"The partial struct initialization works nicely with default.\"\nmsgstr \"部分結構體副本可與預設值完美搭配運作。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The Rust standard library is aware that types can implement `Default` and \"\n\"provides convenience methods that use it.\"\nmsgstr \"\"\n\"Rust 標準程式庫瞭解型別可能會實作 `Default`，因此提供了便利的使用方式。\"\n\n#: src/std-traits/default.md\n#, fuzzy\nmsgid \"\"\n\"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/\"\n\"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-\"\n\"with-struct-update-syntax).\"\nmsgstr \"\"\n\"`..` 語法稱為[結構體更新語法](https://doc.rust-lang.org/book/ch05-01-\"\n\"defining-structs.html#creating-instances-from-other-instances-with-struct-\"\n\"update-syntax)。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"Closures or lambda expressions have types which cannot be named. However, \"\n\"they implement special [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.\"\n\"html), [`FnMut`](https://doc.rust-lang.org/std/ops/trait.FnMut.html), and \"\n\"[`FnOnce`](https://doc.rust-lang.org/std/ops/trait.FnOnce.html) traits:\"\nmsgstr \"\"\n\"無論是閉包還是 lambda 運算式，都含有無法命名的型別。不過，這兩者 都會實作特殊\"\n\"的 [`Fn`](https://doc.rust-lang.org/std/ops/trait.Fn.html)、 [`FnMut`]\"\n\"(https://doc.rust-lang.org/std/ops/trait.FnMut.html) 和 [`FnOnce`](https://\"\n\"doc.rust-lang.org/std/ops/trait.FnOnce.html) 特徵：\"\n\n#: src/std-traits/closures.md\n#, fuzzy\nmsgid \"\\\"Calling function on {input}\\\"\"\nmsgstr \"呼叫不安全的函式\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"add_3: {}\\\"\"\nmsgstr \"\\\"add_3: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"accumulate: {}\\\"\"\nmsgstr \"\\\"accumulate: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"multiply_sum: {}\\\"\"\nmsgstr \"\\\"multiply_sum: {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or \"\n\"perhaps captures nothing at all. It can be called multiple times \"\n\"concurrently.\"\nmsgstr \"\"\n\"`Fn` (例如 `add_3`) 既不會耗用也不會修改擷取的值，或許 也可說是不會擷取任何\"\n\"值，因此可以多次並行呼叫。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it \"\n\"multiple times, but not concurrently.\"\nmsgstr \"\"\n\"`FnMut` (例如 `accumulate`) 可能會修改擷取的值，因此可以多次呼叫 (但不得並行\"\n\"呼叫)。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It \"\n\"might consume captured values.\"\nmsgstr \"\"\n\"如果是 `FnOnce` (例如`multiply_sum`)，也許就只能呼叫一次，因為這可能會耗用 擷\"\n\"取的值。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. \"\n\"I.e. you can use an `FnMut` wherever an `FnOnce` is called for, and you can \"\n\"use an `Fn` wherever an `FnMut` or `FnOnce` is called for.\"\nmsgstr \"\"\n\"`FnMut` 是 `FnOnce` 的子型別，而 `Fn` 是 `FnMut` 和 `FnOnce` 的子型別。換句話\"\n\"說，您可以在任何需要呼叫 `FnOnce` 的地方使用 `FnMut`，而在任何需要呼叫 \"\n\"`FnMut` 或 `FnOnce` 的地方 使用 `Fn`。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"When you define a function that takes a closure, you should take `FnOnce` if \"\n\"you can (i.e. you call it once), or `FnMut` else, and last `Fn`. This allows \"\n\"the most flexibility for the caller.\"\nmsgstr \"\"\n\"定義可接受閉包的函式時，您應盡量採用 `FnOnce` (也就是只呼叫一次)，其次是 \"\n\"`FnMut`，最後則是 `Fn`。這種做法可讓呼叫端享有最大彈性。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"In contrast, when you have a closure, the most flexible you can have is `Fn` \"\n\"(it can be passed everywhere), then `FnMut`, and lastly `FnOnce`.\"\nmsgstr \"\"\n\"相反地，當有閉包時，最有彈性的就是 `Fn` (可以在任何地方傳遞)、其次是 \"\n\"`FnMut`，最後是 `FnOnce`。\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. \"\n\"`multiply_sum`), depending on what the closure captures.\"\nmsgstr \"\"\n\"編譯器也會根據閉包擷取到的內容來推論 `Copy` (例如針對 `add_3`) 和 `Clone` (例\"\n\"如 `multiply_sum`).\"\n\n#: src/std-traits/closures.md\nmsgid \"\"\n\"By default, closures will capture by reference if they can. The `move` \"\n\"keyword makes them capture by value.\"\nmsgstr \"\"\n\"根據預設，閉包會依據參照來擷取內容 (如果可行的話)。`move` 關鍵字則可讓閉包根\"\n\"據值 來擷取內容。\"\n\n#: src/std-traits/closures.md src/smart-pointers/trait-objects.md\nmsgid \"\\\"{} {}\\\"\"\nmsgstr \"\\\"{} {}\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Hi\\\"\"\nmsgstr \"\\\"Hi\\\"\"\n\n#: src/std-traits/closures.md\nmsgid \"\\\"Greg\\\"\"\nmsgstr \"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"In this example, you will implement the classic [\\\"ROT13\\\" cipher](https://\"\n\"en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and \"\n\"implement the missing bits. Only rotate ASCII alphabetic characters, to \"\n\"ensure the result is still valid UTF-8.\"\nmsgstr \"\"\n\"在這個範例中，您將實作傳統的[「ROT13」加密方式](https://zh.wikipedia.org/\"\n\"wiki/ROT13)。請將此程式碼複製到 Playground，並實作缺少的位元。記得僅能旋轉 \"\n\"ASCII 字母字元，確保結果仍為有效的 UTF-8。\"\n\n#: src/std-traits/exercise.md\nmsgid \"// Implement the `Read` trait for `RotDecoder`.\\n\"\nmsgstr \"// Implement the `Read` trait for `RotDecoder`.\\n\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\nmsgstr \"\\\"Gb trg gb gur bgure fvqr!\\\"\"\n\n#: src/std-traits/exercise.md src/std-traits/solution.md\nmsgid \"\\\"To get to the other side!\\\"\"\nmsgstr \"\\\"To get to the other side!\\\"\"\n\n#: src/std-traits/exercise.md\nmsgid \"\"\n\"What happens if you chain two `RotDecoder` instances together, each rotating \"\n\"by 13 characters?\"\nmsgstr \"\"\n\"如果將兩個 `RotDecoder` 例項鏈結在一起，每個都以 13 個字元旋轉，會怎麼樣？\"\n\n#: src/std-traits/solution.md\nmsgid \"'A'\"\nmsgstr \"'A'\"\n\n#: src/welcome-day-3.md\nmsgid \"Welcome to Day 3\"\nmsgstr \"歡迎參加第 3 天課程\"\n\n#: src/welcome-day-3.md\nmsgid \"Today, we will cover:\"\nmsgstr \"今天我們將講解以下內容：\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Memory management, lifetimes, and the borrow checker: how Rust ensures \"\n\"memory safety.\"\nmsgstr \"記憶體管理、生命週期和借用檢查器：Rust 如何確保記憶體安全。\"\n\n#: src/welcome-day-3.md\nmsgid \"Smart pointers: standard library pointer types.\"\nmsgstr \"智慧指標：標準程式庫指標型別。\"\n\n#: src/welcome-day-3.md\nmsgid \"[Welcome](./welcome-day-3.md) (3 minutes)\"\nmsgstr \"[歡迎](./welcome-day-3.md) (3 分鐘)\"\n\n#: src/welcome-day-3.md\nmsgid \"[Memory Management](./memory-management.md) (1 hour)\"\nmsgstr \"[記憶體管理](./memory-management.md) (1 小時)\"\n\n#: src/welcome-day-3.md\nmsgid \"[Smart Pointers](./smart-pointers.md) (55 minutes)\"\nmsgstr \"[智慧指標](./smart-pointers.md) (55 分鐘)\"\n\n#: src/welcome-day-3.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 20 \"\n\"minutes\"\nmsgstr \"加上 10 分鐘的休息時間，這個課程大約需要 2 小時 20 分鐘\"\n\n#: src/memory-management.md\nmsgid \"[Review of Program Memory](./memory-management/review.md) (5 minutes)\"\nmsgstr \"[檢查程式記憶體](./memory-management/review.md) (5 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"\"\n\"[Approaches to Memory Management](./memory-management/approaches.md) (10 \"\n\"minutes)\"\nmsgstr \"[管理記憶體的方法](./memory-management/approaches.md) (10 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Ownership](./memory-management/ownership.md) (5 minutes)\"\nmsgstr \"[擁有權](./memory-management/ownership.md) (5 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Move Semantics](./memory-management/move.md) (5 minutes)\"\nmsgstr \"[轉移語意](./memory-management/move.md) (5 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Clone](./memory-management/clone.md) (2 minutes)\"\nmsgstr \"[複製](./memory-management/clone.md) (2 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Copy Types](./memory-management/copy-types.md) (5 minutes)\"\nmsgstr \"[拷貝 (Copy) 型別](./memory-management/copy-types.md) (5 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Drop](./memory-management/drop.md) (10 minutes)\"\nmsgstr \"[拖放](./memory-management/drop.md) (10 分鐘)\"\n\n#: src/memory-management.md\nmsgid \"[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)\"\nmsgstr \"[練習：建構工具型別](./memory-management/exercise.md) (20 分鐘)\"\n\n#: src/memory-management/review.md\nmsgid \"Programs allocate memory in two ways:\"\nmsgstr \"程式分配記憶體的方式有兩種：\"\n\n#: src/memory-management/review.md\nmsgid \"Stack: Continuous area of memory for local variables.\"\nmsgstr \"堆疊 (Stack)：本機變數的連續記憶體區域。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have fixed sizes known at compile time.\"\nmsgstr \"值在編譯期間具有已知的固定大小。\"\n\n#: src/memory-management/review.md\nmsgid \"Extremely fast: just move a stack pointer.\"\nmsgstr \"相當快速：只需移動堆疊指標。\"\n\n#: src/memory-management/review.md\nmsgid \"Easy to manage: follows function calls.\"\nmsgstr \"易於管理：追蹤函式呼叫。\"\n\n#: src/memory-management/review.md\nmsgid \"Great memory locality.\"\nmsgstr \"良好的記憶體區域性。\"\n\n#: src/memory-management/review.md\nmsgid \"Heap: Storage of values outside of function calls.\"\nmsgstr \"堆積 (Heap)：函式呼叫外的值儲存空間。\"\n\n#: src/memory-management/review.md\nmsgid \"Values have dynamic sizes determined at runtime.\"\nmsgstr \"值在執行階段中以動態方式判斷大小。\"\n\n#: src/memory-management/review.md\nmsgid \"Slightly slower than the stack: some book-keeping needed.\"\nmsgstr \"速度稍慢於堆疊：需要作一些記錄。\"\n\n#: src/memory-management/review.md\nmsgid \"No guarantee of memory locality.\"\nmsgstr \"不保證記憶體區域性。\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"Creating a `String` puts fixed-sized metadata on the stack and dynamically \"\n\"sized data, the actual string, on the heap:\"\nmsgstr \"\"\n\"建立 `String` 時，系統會在堆疊上放置固定大小的資料，並在堆積上放置動態調整大\"\n\"小的資料：\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"Mention that a `String` is backed by a `Vec`, so it has a capacity and \"\n\"length and can grow if mutable via reallocation on the heap.\"\nmsgstr \"\"\n\"請說明 `String` 是由 `Vec` 支援，因此具有容量和長度，而且還能成長 (前提是可透\"\n\"過堆積上的重新配置作業進行變動)。\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"If students ask about it, you can mention that the underlying memory is heap \"\n\"allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/\"\n\"struct.System.html) and custom allocators can be implemented using the \"\n\"[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)\"\nmsgstr \"\"\n\"如有學員問起，您可以說明基礎記憶體是使用\\\\[系統配置器\\\\]配置的堆積，而自訂配\"\n\"置器可以使用\\\\[配置器 API\\\\] 實作。\"\n\n#: src/memory-management/review.md\n#, fuzzy\nmsgid \"\"\n\"We can inspect the memory layout with `unsafe` Rust. However, you should \"\n\"point out that this is rightfully unsafe!\"\nmsgstr \"\"\n\"我們可以使用 `unsafe` 程式碼檢查記憶體配置。不過，您應指出這麼做非常不安全！\"\n\n#: src/memory-management/review.md src/testing/unit-tests.md\nmsgid \"' '\"\nmsgstr \"' '\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"world\\\"\"\nmsgstr \"\\\"world\\\"\"\n\n#: src/memory-management/review.md\nmsgid \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\nmsgstr \"\"\n\"// DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n\"    // String provides no guarantees about its layout, so this could lead \"\n\"to\\n\"\n\"    // undefined behavior.\\n\"\n\n#: src/memory-management/review.md\nmsgid \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\nmsgstr \"\\\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\\\"\"\n\n#: src/memory-management/approaches.md\nmsgid \"Traditionally, languages have fallen into two broad categories:\"\nmsgstr \"傳統上，語言大致可分為兩種：\"\n\n#: src/memory-management/approaches.md\nmsgid \"Full control via manual memory management: C, C++, Pascal, ...\"\nmsgstr \"透過手動管理記憶體，取得完整掌控權：C、C++、Pascal...\"\n\n#: src/memory-management/approaches.md\nmsgid \"Programmer decides when to allocate or free heap memory.\"\nmsgstr \"程式設計師會決定何時分配或釋出堆積記憶體。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Programmer must determine whether a pointer still points to valid memory.\"\nmsgstr \"程式設計師必須判斷指標是否仍指向有效記憶體。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Studies show, programmers make mistakes.\"\nmsgstr \"研究顯示，程式設計師難免會出錯。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full safety via automatic memory management at runtime: Java, Python, Go, \"\n\"Haskell, ...\"\nmsgstr \"\"\n\"透過在執行階段中自動管理記憶體，取得完整安全性：Java、Python、Go、Haskell...\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"A runtime system ensures that memory is not freed until it can no longer be \"\n\"referenced.\"\nmsgstr \"執行階段系統會確保在可以參照記憶體之後，才釋出記憶體。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Typically implemented with reference counting, garbage collection, or RAII.\"\nmsgstr \"通常透過參照計算、垃圾收集或 RAII 的方式實作。\"\n\n#: src/memory-management/approaches.md\nmsgid \"Rust offers a new mix:\"\nmsgstr \"Rust 則融合這兩種做法：\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Full control _and_ safety via compile time enforcement of correct memory \"\n\"management.\"\nmsgstr \"\"\n\"透過正確的記憶體管理編譯時間強制執行措施，「同時」取得完整的掌控權和安全性。\"\n\n#: src/memory-management/approaches.md\nmsgid \"It does this with an explicit ownership concept.\"\nmsgstr \"Rust 運用明確所有權的概念實現這一點。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"This slide is intended to help students coming from other languages to put \"\n\"Rust in context.\"\nmsgstr \"這張投影片的目的，在於協助其他語言的學員瞭解 Rust。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C must manage heap manually with `malloc` and `free`. Common errors include \"\n\"forgetting to call `free`, calling it multiple times for the same pointer, \"\n\"or dereferencing a pointer after the memory it points to has been freed.\"\nmsgstr \"\"\n\"如果是 C 語言，必須透過 `malloc` 和 `free` 手動管理堆積。常見的錯誤包括忘記呼\"\n\"叫 `free`、針對同一指標多次呼叫 `free`，或在其指向的記憶體釋出後取消參照指\"\n\"標。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take \"\n\"advantage of language guarantees about calling destructors to ensure memory \"\n\"is freed when a function returns. It is still quite easy to mis-use these \"\n\"tools and create similar bugs to C.\"\nmsgstr \"\"\n\"C++ 提供智慧指標 (`unique_ptr`、`shared_ptr`) 等工具，可利用有關呼叫解構函式\"\n\"的語言保證，確保在函式傳回時釋出記憶體。但這些工具仍很容易遭到濫用，並且會產\"\n\"生類似 C 語言中的那些錯誤。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Java, Go, and Python rely on the garbage collector to identify memory that \"\n\"is no longer reachable and discard it. This guarantees that any pointer can \"\n\"be dereferenced, eliminating use-after-free and other classes of bugs. But, \"\n\"GC has a runtime cost and is difficult to tune properly.\"\nmsgstr \"\"\n\"Java、Go 和 Python 會利用垃圾收集器來識別並捨棄無法再存取的記憶體。這能確保任\"\n\"何指標都可以取消參照，進而消除 UAF (使用已釋放記憶體)和其他類別的錯誤。不過，\"\n\"GC 會耗費執行階段成本，且很難正確調整。\"\n\n#: src/memory-management/approaches.md\nmsgid \"\"\n\"Rust's ownership and borrowing model can, in many cases, get the performance \"\n\"of C, with alloc and free operations precisely where they are required -- \"\n\"zero cost. It also provides tools similar to C++'s smart pointers. When \"\n\"required, other options such as reference counting are available, and there \"\n\"are even third-party crates available to support runtime garbage collection \"\n\"(not covered in this class).\"\nmsgstr \"\"\n\"在許多情況下，Rust 的擁有權和借用模型效能都能媲美 C 語言，並在必要處精準分配\"\n\"及釋放，達成零成本作業。Rust 也提供類似 C++ 智慧指標的工具。如有需要，您還可\"\n\"以使用參照計數等其他選項，而且甚至還有第三方 Crate，可支援執行階段的垃圾收集\"\n\"作業 (本課程不會討論這部分)。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"All variable bindings have a _scope_ where they are valid and it is an error \"\n\"to use a variable outside its scope:\"\nmsgstr \"所有變數繫結都會在特定「範圍」內有效，在範圍外使用變數會是錯誤：\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"We say that the variable _owns_ the value. Every Rust value has precisely \"\n\"one owner at all times.\"\nmsgstr \"我們會說變數「擁有」值。\"\n\n#: src/memory-management/ownership.md\n#, fuzzy\nmsgid \"\"\n\"At the end of the scope, the variable is _dropped_ and the data is freed. A \"\n\"destructor can run here to free up resources.\"\nmsgstr \"範圍結束時，變數會遭到「捨棄」，資料也會釋放。\"\n\n#: src/memory-management/ownership.md\nmsgid \"\"\n\"Students familiar with garbage-collection implementations will know that a \"\n\"garbage collector starts with a set of \\\"roots\\\" to find all reachable \"\n\"memory. Rust's \\\"single owner\\\" principle is a similar idea.\"\nmsgstr \"\"\n\"熟悉垃圾回收實作的學員會知道，垃圾回收器是從一組「根」開始尋找所有可存取的記\"\n\"憶體。Rust 的「單一擁有者」原則也是類似的概念。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"An assignment will transfer _ownership_ between variables:\"\nmsgstr \"指派會在變數之間轉移所有權：\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello!\\\"\"\nmsgstr \"\\\"Hello!\\\"\"\n\n#: src/memory-management/move.md src/slices-and-lifetimes/str.md\nmsgid \"\\\"s2: {s2}\\\"\"\nmsgstr \"\\\"s2: {s2}\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// println!(\\\"s1: {s1}\\\");\\n\"\nmsgstr \"// println!(\\\"s1: {s1}\\\");\\n\"\n\n#: src/memory-management/move.md\nmsgid \"The assignment of `s1` to `s2` transfers ownership.\"\nmsgstr \"將 `s1` 指派給 `s2` 會轉移所有權。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"When `s1` goes out of scope, nothing happens: it does not own anything.\"\nmsgstr \"當 `s1` 超出範圍時，系統不會執行任何動作，因為 `s1` 沒有所有權。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s2` goes out of scope, the string data is freed.\"\nmsgstr \"當 `s2` 超出範圍時，系統會釋放字串資料。\"\n\n#: src/memory-management/move.md\nmsgid \"Before move to `s2`:\"\nmsgstr \"移至 `s2` 前：\"\n\n#: src/memory-management/move.md\nmsgid \"After move to `s2`:\"\nmsgstr \"移至 `s2` 後：\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                                     :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                                     :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| H  | e  | l  | l  | o  | !  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                                     :\\n\"\n\":   +-----------+-------+   :  |  :                                     :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 堆疊                             堆積\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n\":                           :     :                           :\\n\"\n\":    s1 \\\"(inaccessible)\\\"    :     :                           :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n\":   | ptr       |   o---+---+--+--+-->| R  | u  | s  | t  |   :\\n\"\n\":   | len       |     4 |   :  |  :   +----+----+----+----+   :\\n\"\n\":   | capacity  |     4 |   :  |  :                           :\\n\"\n\":   +-----------+-------+   :  |  :                           :\\n\"\n\":                           :  |  `- - - - - - - - - - - - - -'\\n\"\n\":    s2                     :  |\\n\"\n\":   +-----------+-------+   :  |\\n\"\n\":   | ptr       |   o---+---+--'\\n\"\n\":   | len       |     4 |   :\\n\"\n\":   | capacity  |     4 |   :\\n\"\n\":   +-----------+-------+   :\\n\"\n\":                           :\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"When you pass a value to a function, the value is assigned to the function \"\n\"parameter. This transfers ownership:\"\nmsgstr \"將值傳遞至函式時，該值會指派給函式參數。這麼做會轉移所有權：\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Hello {name}\\\"\"\nmsgstr \"\\\"Hello {name}\\\"\"\n\n#: src/memory-management/move.md src/android/interoperability/java.md\nmsgid \"\\\"Alice\\\"\"\nmsgstr \"\\\"Alice\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// say_hello(name);\\n\"\nmsgstr \"// say_hello(name);\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Mention that this is the opposite of the defaults in C++, which copies by \"\n\"value unless you use `std::move` (and the move constructor is defined!).\"\nmsgstr \"\"\n\"請說明這與 C++ 中的預設情形相反：您必須使用 `std::move`，且已定義移動建構函\"\n\"式，系統才會根據值進行複製。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"It is only the ownership that moves. Whether any machine code is generated \"\n\"to manipulate the data itself is a matter of optimization, and such copies \"\n\"are aggressively optimized away.\"\nmsgstr \"\"\n\"只有擁有權才會轉移。是否產生任何機器碼來操控資料本身是一個最優化問題，而系統\"\n\"會主動將這些副本最優化。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Simple values (such as integers) can be marked `Copy` (see later slides).\"\nmsgstr \"簡單的值 (例如整數) 可標示為 `Copy` (請參閱後續投影片)。\"\n\n#: src/memory-management/move.md\nmsgid \"In Rust, clones are explicit (by using `clone`).\"\nmsgstr \"在 Rust 中，克隆作業皆為明確設定，方法為使用 `clone`。\"\n\n#: src/memory-management/move.md\nmsgid \"In the `say_hello` example:\"\nmsgstr \"在 `say_hello` 範例中：\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"With the first call to `say_hello`, `main` gives up ownership of `name`. \"\n\"Afterwards, `name` cannot be used anymore within `main`.\"\nmsgstr \"\"\n\"首次呼叫 `say_hello` 時，`main` 會放棄 `name` 的所有權。之後，`name` 就無法\"\n\"在 `main` 內使用。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap memory allocated for `name` will be freed at the end of the \"\n\"`say_hello` function.\"\nmsgstr \"為 `name` 配置的堆積記憶體會在 `say_hello` 函式結束時釋放。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"`main` can retain ownership if it passes `name` as a reference (`&name`) and \"\n\"if `say_hello` accepts a reference as a parameter.\"\nmsgstr \"\"\n\"如果 `main` 以參照的形式傳送 `name` (`&name`)，且 `say_hello` 能以參數的形式\"\n\"接受參照，`main` 就可以保留所有權。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Alternatively, `main` can pass a clone of `name` in the first call (`name.\"\n\"clone()`).\"\nmsgstr \"另外，`main` 可在首次呼叫 (`name.clone()`) 中傳遞 `name` 的克隆。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Rust makes it harder than C++ to inadvertently create copies by making move \"\n\"semantics the default, and by forcing programmers to make clones explicit.\"\nmsgstr \"\"\n\"在 Rust 中，移動語意為預設做法，且強制規定程式設計師必須明確設定克隆，因此不\"\n\"小心建立副本的可能性就會低於在 C++ 中。\"\n\n#: src/memory-management/move.md\n#, fuzzy\nmsgid \"Defensive Copies in Modern C++\"\nmsgstr \"現代 C++ 中的雙重釋放\"\n\n#: src/memory-management/move.md\nmsgid \"Modern C++ solves this differently:\"\nmsgstr \"現代 C++ 可使用不同方式解決這個問題：\"\n\n#: src/memory-management/move.md\nmsgid \"\\\"Cpp\\\"\"\nmsgstr \"\\\"Cpp\\\"\"\n\n#: src/memory-management/move.md\nmsgid \"// Duplicate the data in s1.\\n\"\nmsgstr \"// Duplicate the data in s1.\\n\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"The heap data from `s1` is duplicated and `s2` gets its own independent copy.\"\nmsgstr \"`s1` 的堆積資料會重複，`s2` 會取得專屬的獨立副本。\"\n\n#: src/memory-management/move.md\nmsgid \"When `s1` and `s2` go out of scope, they each free their own memory.\"\nmsgstr \"當 `s1` 和 `s2` 超出範圍時，皆會釋放自己的記憶體。\"\n\n#: src/memory-management/move.md\nmsgid \"Before copy-assignment:\"\nmsgstr \"複製指派前：\"\n\n#: src/memory-management/move.md\nmsgid \"After copy-assignment:\"\nmsgstr \"複製指派後：\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ has made a slightly different choice than Rust. Because `=` copies data, \"\n\"the string data has to be cloned. Otherwise we would get a double-free when \"\n\"either string goes out of scope.\"\nmsgstr \"\"\n\"C++ 提供的選擇與 Rust 略有不同。由於 `=` 會複製資料，所以字串資料一定要完成複\"\n\"製。否則，假如其中任一字串超出範圍，就會導致重複釋放的結果。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), \"\n\"which is used to indicate when a value may be moved from. If the example had \"\n\"been `s2 = std::move(s1)`, no heap allocation would take place. After the \"\n\"move, `s1` would be in a valid but unspecified state. Unlike Rust, the \"\n\"programmer is allowed to keep using `s1`.\"\nmsgstr \"\"\n\"C++ 也提供 [`std::move`](https://en.cppreference.com/w/cpp/utility/move)，用\"\n\"於指出何時可以轉移特定值。例如假設是 `s2 = std::move(s1)`，就不會發生堆積分配\"\n\"的情形。轉移之後，`s1` 會處於有效但未指定的狀態。與 Rust 不同的是，程式設計師\"\n\"可以繼續使用 `s1`。\"\n\n#: src/memory-management/move.md\nmsgid \"\"\n\"Unlike Rust, `=` in C++ can run arbitrary code as determined by the type \"\n\"which is being copied or moved.\"\nmsgstr \"\"\n\"C++ 中的 `=` 可以依照要複製或轉移的型別來執行任何程式碼，這點與 Rust 不同。\"\n\n#: src/memory-management/clone.md\nmsgid \"Clone\"\nmsgstr \"`Clone` 複製\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"Sometimes you _want_ to make a copy of a value. The `Clone` trait \"\n\"accomplishes this.\"\nmsgstr \"有時候，您可能會「想要」複製一個值。`Clone` 特徵可完成這項作業。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"The idea of `Clone` is to make it easy to spot where heap allocations are \"\n\"occurring. Look for `.clone()` and a few others like `Vec::new` or `Box::\"\n\"new`.\"\nmsgstr \"\"\n\"`Clone` 的概念是要輕鬆找出堆積分配量的發生位置。請尋找 `.clone()` 和 `Vec::\"\n\"new` 或 `Box::new` 等其他字詞。\"\n\n#: src/memory-management/clone.md\nmsgid \"\"\n\"It's common to \\\"clone your way out\\\" of problems with the borrow checker, \"\n\"and return later to try to optimize those clones away.\"\nmsgstr \"\"\n\"我們往往會使用借用檢查器「複製解決問題的方法」，稍後再回來試著將這些複製內容\"\n\"最佳化。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"While move semantics are the default, certain types are copied by default:\"\nmsgstr \"雖然移動語意是預設做法，但某些型別的預設做法為複製：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"These types implement the `Copy` trait.\"\nmsgstr \"這些型別會實作 `Copy` 特徵。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"You can opt-in your own types to use copy semantics:\"\nmsgstr \"您可以自行選擇加入型別，使用複製語意的做法：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"After the assignment, both `p1` and `p2` own their own data.\"\nmsgstr \"指派後，`p1` 和 `p2` 都會擁有自己的資料。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"We can also use `p1.clone()` to explicitly copy the data.\"\nmsgstr \"我們也能使用 `p1.clone()` 明確複製資料。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying and cloning are not the same thing:\"\nmsgstr \"複製和克隆並不相同：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying refers to bitwise copies of memory regions and does not work on \"\n\"arbitrary objects.\"\nmsgstr \"複製是指記憶體區域的按位元複製作業，不適用於任意物件。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Copying does not allow for custom logic (unlike copy constructors in C++).\"\nmsgstr \"複製不允許用於自訂邏輯，這與 C++ 中的複製建構函式不同。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Cloning is a more general operation and also allows for custom behavior by \"\n\"implementing the `Clone` trait.\"\nmsgstr \"克隆是較廣泛的作業，而且只要實作 `Clone` 特徵，即允許用於自訂行為。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Copying does not work on types that implement the `Drop` trait.\"\nmsgstr \"複製不適用於實作 `Drop` 特徵的型別。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"In the above example, try the following:\"\nmsgstr \"在上述範例中，請嘗試下列操作：\"\n\n#: src/memory-management/copy-types.md\nmsgid \"\"\n\"Add a `String` field to `struct Point`. It will not compile because `String` \"\n\"is not a `Copy` type.\"\nmsgstr \"\"\n\"將 `String` 欄位新增至 `struct Point`。由於 `String` 不屬於 `Copy` 型別，因此\"\n\"不會編譯。\"\n\n#: src/memory-management/copy-types.md\n#, fuzzy\nmsgid \"\"\n\"Remove `Copy` from the `derive` attribute. The compiler error is now in the \"\n\"`println!` for `p1`.\"\nmsgstr \"\"\n\"從 `derive` 屬性中移除 `Copy`。編譯器錯誤現在位於 `p1` 的 `println!` 中。\"\n\n#: src/memory-management/copy-types.md\nmsgid \"Show that it works if you clone `p1` instead.\"\nmsgstr \"示範如果改為克隆 `p1`，就能正常運作。\"\n\n#: src/memory-management/drop.md\nmsgid \"The `Drop` Trait\"\nmsgstr \"`Drop` 特徵\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.\"\n\"html) can specify code to run when they go out of scope:\"\nmsgstr \"\"\n\"如果值實作了 [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html)，即\"\n\"可在超出範圍時指定要執行哪個程式碼：\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Dropping {}\\\"\"\nmsgstr \"\\\"Dropping {}\\\"\"\n\n#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"a\\\"\"\nmsgstr \"\\\"a\\\"\"\n\n#: src/memory-management/drop.md src/android/testing/googletest.md\nmsgid \"\\\"b\\\"\"\nmsgstr \"\\\"b\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"c\\\"\"\nmsgstr \"\\\"c\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"d\\\"\"\nmsgstr \"\\\"d\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block B\\\"\"\nmsgstr \"\\\"Exiting block B\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting block A\\\"\"\nmsgstr \"\\\"Exiting block A\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"\\\"Exiting main\\\"\"\nmsgstr \"\\\"Exiting main\\\"\"\n\n#: src/memory-management/drop.md\nmsgid \"Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`.\"\nmsgstr \"請注意，`std::mem::drop` 和 `std::ops::Drop::drop` 不同。\"\n\n#: src/memory-management/drop.md\nmsgid \"Values are automatically dropped when they go out of scope.\"\nmsgstr \"值超出範圍時，系統會自動捨棄。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"When a value is dropped, if it implements `std::ops::Drop` then its `Drop::\"\n\"drop` implementation will be called.\"\nmsgstr \"\"\n\"捨棄值時，如果值實作的是 `std::ops::Drop`，系統會呼叫值的 `Drop::drop` 實作。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"All its fields will then be dropped too, whether or not it implements `Drop`.\"\nmsgstr \"如此一來，無論值是否實作 `Drop`，系統都會一併捨棄值的所有欄位。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"`std::mem::drop` is just an empty function that takes any value. The \"\n\"significance is that it takes ownership of the value, so at the end of its \"\n\"scope it gets dropped. This makes it a convenient way to explicitly drop \"\n\"values earlier than they would otherwise go out of scope.\"\nmsgstr \"\"\n\"`std::mem::drop` 只是一個可接受任何值的空白函式。此函式之所以重要，是能夠取得\"\n\"值的擁有權，因此在其範圍結束時會遭到捨棄。這有利於在值超出範圍之前，明確捨棄\"\n\"這些值。\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"This can be useful for objects that do some work on `drop`: releasing locks, \"\n\"closing files, etc.\"\nmsgstr \"\"\n\"如果物件會對 `drop` 執行某些工作 (例如釋放鎖、關閉檔案等)，這就相當實用。\"\n\n#: src/memory-management/drop.md\nmsgid \"Why doesn't `Drop::drop` take `self`?\"\nmsgstr \"為什麼 `Drop::drop` 不使用 `self`？\"\n\n#: src/memory-management/drop.md\nmsgid \"\"\n\"Short-answer: If it did, `std::mem::drop` would be called at the end of the \"\n\"block, resulting in another call to `Drop::drop`, and a stack overflow!\"\nmsgstr \"\"\n\"簡答：如果這樣的話，系統會在 區塊結尾呼叫 `std::mem::drop`，進而觸發另一個對 \"\n\"`Drop::drop` 的呼叫並造成堆疊 溢位！\"\n\n#: src/memory-management/drop.md\nmsgid \"Try replacing `drop(a)` with `a.drop()`.\"\nmsgstr \"請嘗試將 `drop(a)` 替換為 `a.drop()`。\"\n\n#: src/memory-management/exercise.md\nmsgid \"\"\n\"In this example, we will implement a complex data type that owns all of its \"\n\"data. We will use the \\\"builder pattern\\\" to support building a new value \"\n\"piece-by-piece, using convenience functions.\"\nmsgstr \"\"\n\"在本範例中，我們將實作一個包含自身所有資料的複雜資料型別。透過「建構工具模\"\n\"式」，我們會以便利函式逐段建構新值。\"\n\n#: src/memory-management/exercise.md\nmsgid \"Fill in the missing pieces.\"\nmsgstr \"請填補缺漏的片段。\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// A representation of a software package.\\n\"\nmsgstr \"/// A representation of a software package.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\nmsgstr \"\"\n\"/// Return a representation of this package as a dependency, for use in\\n\"\n\"    /// building other packages.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"1\\\"\"\nmsgstr \"\\\"1\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\nmsgstr \"\"\n\"/// A builder for a Package. Use `build()` to create the `Package` itself.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"2\\\"\"\nmsgstr \"\\\"2\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package version.\\n\"\nmsgstr \"/// Set the package version.\\n\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the package authors.\\n\"\nmsgstr \"/// Set the package authors.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"3\\\"\"\nmsgstr \"\\\"3\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Add an additional dependency.\\n\"\nmsgstr \"/// Add an additional dependency.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"4\\\"\"\nmsgstr \"\\\"4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"/// Set the language. If not set, language defaults to None.\\n\"\nmsgstr \"/// Set the language. If not set, language defaults to None.\\n\"\n\n#: src/memory-management/exercise.md\nmsgid \"\\\"5\\\"\"\nmsgstr \"\\\"5\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64\\\"\"\nmsgstr \"\\\"base64\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.13\\\"\"\nmsgstr \"\\\"0.13\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"base64: {base64:?}\\\"\"\nmsgstr \"\\\"base64: {base64:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log\\\"\"\nmsgstr \"\\\"log\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"0.4\\\"\"\nmsgstr \"\\\"0.4\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"log: {log:?}\\\"\"\nmsgstr \"\\\"log: {log:?}\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde\\\"\"\nmsgstr \"\\\"serde\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"djmitche\\\"\"\nmsgstr \"\\\"djmitche\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"4.0\\\"\"\nmsgstr \"\\\"4.0\\\"\"\n\n#: src/memory-management/exercise.md src/memory-management/solution.md\nmsgid \"\\\"serde: {serde:?}\\\"\"\nmsgstr \"\\\"serde: {serde:?}\\\"\"\n\n#: src/memory-management/solution.md\nmsgid \"\\\"0.1\\\"\"\nmsgstr \"\\\"0.1\\\"\"\n\n#: src/smart-pointers.md\nmsgid \"[Box\"\nmsgstr \"[Box\"\n\n#: src/smart-pointers.md\nmsgid \"](./smart-pointers/box.md) (10 minutes)\"\nmsgstr \"](./smart-pointers/box.md) (10 分鐘)\"\n\n#: src/smart-pointers.md\nmsgid \"[Rc](./smart-pointers/rc.md) (5 minutes)\"\nmsgstr \"[Rc](./smart-pointers/rc.md) (5 分鐘)\"\n\n#: src/smart-pointers.md\nmsgid \"[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)\"\nmsgstr \"[特徵物件](./smart-pointers/trait-objects.md) (10 分鐘)\"\n\n#: src/smart-pointers.md\nmsgid \"[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)\"\nmsgstr \"[練習：二元樹](./smart-pointers/exercise.md) (30 分鐘)\"\n\n#: src/smart-pointers.md src/error-handling.md\nmsgid \"This segment should take about 55 minutes\"\nmsgstr \"講解這個主題大約需要 55 分鐘\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned \"\n\"pointer to data on the heap:\"\nmsgstr \"\"\n\"[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) 是具有所有權的指\"\n\"向堆積上的資料的指標：\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"five: {}\\\"\"\nmsgstr \"\\\"five: {}\\\"\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box<T>` implements `Deref<Target = T>`, which means that you can [call \"\n\"methods from `T` directly on a `Box<T>`](https://doc.rust-lang.org/std/ops/\"\n\"trait.Deref.html#more-on-deref-coercion).\"\nmsgstr \"\"\n\"`Box<T>` 會實作 `Deref<Target = T>`。也就是說，您可以[直接在 `Box<T>` 上透過 \"\n\"`T` 呼叫方法](https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-\"\n\"deref-coercion)。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"Recursive data types or data types with dynamic sizes need to use a `Box`:\"\nmsgstr \"遞迴資料型別或含有動態大小的資料型別必須使用 `Box`：\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// A non-empty list: first element and the rest of the list.\\n\"\nmsgstr \"/// A non-empty list: first element and the rest of the list.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"/// An empty list.\\n\"\nmsgstr \"/// An empty list.\\n\"\n\n#: src/smart-pointers/box.md\nmsgid \"\\\"{list:?}\\\"\"\nmsgstr \"\\\"{list:?}\\\"\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -.\\n\"\n\":                            :     :                                                 :\\n\"\n\":    \"\n\"list                    :     :                                                 :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | o--+--->| Nil  | // \"\n\"| // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+    +------+----\"\n\"+----+  :\\n\"\n\":                            :     :                                                 :\\n\"\n\":                            :     :                                                 :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - - - - - - - - \"\n\"- - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 堆疊                             堆積\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be \"\n\"not null.\"\nmsgstr \"\"\n\"`Box` 就像是 C++ 中的 `std::unique_ptr`，兩者的差別在於 `Box` 不會是空值。\"\n\n#: src/smart-pointers/box.md\nmsgid \"A `Box` can be useful when you:\"\nmsgstr \"在以下情況下，您可以使用 `Box`：\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"have a type whose size that can't be known at compile time, but the Rust \"\n\"compiler wants to know an exact size.\"\nmsgstr \"編譯時遇到不知道大小為何的型別，但 Rust 編譯器需要知道確切大小。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"want to transfer ownership of a large amount of data. To avoid copying large \"\n\"amounts of data on the stack, instead store the data on the heap in a `Box` \"\n\"so only the pointer is moved.\"\nmsgstr \"\"\n\"想要轉移大量資料的所有權。為避免在堆疊上複製大量資料，請改將資料儲存在 `Box` \"\n\"的堆積上，這樣系統就只會移動指標。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"If `Box` was not used and we attempted to embed a `List` directly into the \"\n\"`List`, the compiler would not be able to compute a fixed size for the \"\n\"struct in memory (the `List` would be of infinite size).\"\nmsgstr \"\"\n\"如果這裡未使用 `Box`，且我們要將 `List` 直接嵌入 `List`，編譯器就不會計算出固\"\n\"定的結構體記憶體大小，結構體看起來會像是無限大。\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"`Box` solves this problem as it has the same size as a regular pointer and \"\n\"just points at the next element of the `List` in the heap.\"\nmsgstr \"\"\n\"`Box` 大小與一般指標相同，並且只會指向堆積中的下一個 `List` 元素，因此可以解\"\n\"決這個問題。\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"Remove the `Box` in the List definition and show the compiler error. We get \"\n\"the message \\\"recursive without indirection\\\", because for data recursion, \"\n\"we have to use indirection, a `Box` or reference of some kind, instead of \"\n\"storing the value directly.\"\nmsgstr \"\"\n\"將 `Box` 從 List 定義中移除後，畫面上會顯示編譯器錯誤。如果您看到「Recursive \"\n\"with indirection」錯誤訊息，建議您使用 Box 或其他種類的參考，而不是直接儲存\"\n\"值。\"\n\n#: src/smart-pointers/box.md\nmsgid \"Niche Optimization\"\nmsgstr \"區位最佳化\"\n\n#: src/smart-pointers/box.md\nmsgid \"\"\n\"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This \"\n\"allows the compiler to optimize the memory layout:\"\nmsgstr \"\"\n\"`Box` 不能空白，因此指標會一律有效，而且不會是 `null`。這樣一來，編譯器可以將\"\n\"記憶體配置最佳化：\"\n\n#: src/smart-pointers/box.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                           Heap\\n\"\n\".- - - - - - - - - - - - - - .     .- - - - - - - - - - - - - -.\\n\"\n\":                            :     :                           :\\n\"\n\":    list                    :     :                           :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":   | Element | 1  | o--+----+-----+--->| Element | 2  | // |  :\\n\"\n\":   +---------+----+----+    :     :    +---------+----+----+  :\\n\"\n\":                            :     :                           :\\n\"\n\":                            :     :                           :\\n\"\n\"'- - - - - - - - - - - - - - '     '- - - - - - - - - - - - - -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 堆疊                             堆積\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-\"\n\"counted shared pointer. Use this when you need to refer to the same data \"\n\"from multiple places:\"\nmsgstr \"\"\n\"[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) 是參考計數的共用指\"\n\"標。如要在多個位置參考相同的資料，可以使用這個指標：\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"a: {a}\\\"\"\nmsgstr \"\\\"a: {a}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\\\"b: {b}\\\"\"\nmsgstr \"\\\"b: {b}\\\"\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc.\"\n\"rust-lang.org/std/sync/struct.Mutex.html) if you are in a multi-threaded \"\n\"context.\"\nmsgstr \"\"\n\"如果您處於多執行緒的環境，請參閱 [`Arc`](../concurrency/shared_state/arc.md) \"\n\"和 [`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html)。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang.\"\n\"org/std/rc/struct.Weak.html) pointer to create cycles that will get dropped.\"\nmsgstr \"\"\n\"您可以將共用指標「降級」為 [`Weak`](https://doc.rust-lang.org/std/rc/struct.\"\n\"Weak.html) 指標，以便建立之後會捨棄的循環。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc`'s count ensures that its contained value is valid for as long as there \"\n\"are references.\"\nmsgstr \"`Rc` 的計數可確保只要有參考，內含的值就會保持有效。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"`Rc` in Rust is like `std::shared_ptr` in C++.\"\nmsgstr \"Rust 中的 `Rc` 就像 C++ 中的 `std::shared_ptr` 一樣。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::clone` is cheap: it creates a pointer to the same allocation and \"\n\"increases the reference count. Does not make a deep clone and can generally \"\n\"be ignored when looking for performance issues in code.\"\nmsgstr \"\"\n\"`Rc::clone` 的成本很低：這個做法會建立指向相同配置的指標，並增加參考計數，而\"\n\"不會產生深克隆，尋找程式碼效能問題時通常可以忽略。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`make_mut` actually clones the inner value if necessary (\\\"clone-on-write\\\") \"\n\"and returns a mutable reference.\"\nmsgstr \"\"\n\"`make_mut` 實際上會在必要時克隆內部值 (「clone-on-write」)，並回傳可變動的參\"\n\"考。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"Use `Rc::strong_count` to check the reference count.\"\nmsgstr \"使用 `Rc::strong_count` 可查看參考計數。\"\n\n#: src/smart-pointers/rc.md\nmsgid \"\"\n\"`Rc::downgrade` gives you a _weakly reference-counted_ object to create \"\n\"cycles that will be dropped properly (likely in combination with `RefCell`).\"\nmsgstr \"\"\n\"`Rc::downgrade` 提供的「弱參考計數」物件，建立之後會適當捨棄的循環 (可能會搭\"\n\"配 `RefCell`)。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"Trait objects allow for values of different types, for instance in a \"\n\"collection:\"\nmsgstr \"特徵物件可接受不同型別的值，舉例來說，在集合中會是這樣：\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Miau!\\\"\"\nmsgstr \"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\\\"Hello, who are you? {}\\\"\"\nmsgstr \"\\\"Hello, who are you? {}\\\"\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Memory layout after allocating `pets`:\"\nmsgstr \"以下是配置 `pets` 後的記憶體配置：\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\" Stack                             Heap\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    \\\"pets: Vec<dyn Pet>\\\"   :     :   \\\"data: Cat\\\"         +----+----+----\"\n\"+----+ :\\n\"\n\":   +-----------+-------+   :     :  +-------+-------+    | F  | i  | d  | \"\n\"o  | :\\n\"\n\":   | ptr       |   o---+---+--.  :  | lives |     9 |    +----+----+----\"\n\"+----+ :\\n\"\n\":   | len       |     2 |   :  |  :  +-------+-------+      \"\n\"^                   :\\n\"\n\":   | capacity  |     2 |   :  |  :       ^                 \"\n\"|                   :\\n\"\n\":   +-----------+-------+   :  |  :       |                 \"\n\"'-------.           :\\n\"\n\":                           :  |  :       |               data:\"\n\"\\\"Dog\\\"|           :\\n\"\n\":                           :  |  :       |              +-------+--|-------\"\n\"+   :\\n\"\n\"`- - - - - - - - - - - - - -'  |  :   +---|-+-----+      | name  |  o, 4, 4 \"\n\"|   :\\n\"\n\"                               `--+-->| o o | o o-|----->| age   |        5 \"\n\"|   :\\n\"\n\"                                  :   +-|---+-|---+      +-------+----------\"\n\"+   :\\n\"\n\"                                  :     |     \"\n\"|                                 :\\n\"\n\"                                  `- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"                                        |     |\\n\"\n\"                                        |     |                      \"\n\"\\\"Program text\\\"\\n\"\n\"                                  .- - -| - - |- - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\"                                  :     |     |       \"\n\"vtable                    :\\n\"\n\"                                  :     |     |      +----------------------\"\n\"+   :\\n\"\n\"                                  :     |     `----->| \\\"<Dog as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     |             \"\n\"vtable                    :\\n\"\n\"                                  :     |            +----------------------\"\n\"+   :\\n\"\n\"                                  :     '----------->| \\\"<Cat as Pet>::\"\n\"talk\\\" |   :\\n\"\n\"                                  :                  +----------------------\"\n\"+   :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 堆疊                             堆積\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - - - - - - - \"\n\"- -.\\n\"\n\":                           :     :                                             :\\n\"\n\":    pets                   :     :                     +----+----+----+----\"\n\"+   :\\n\"\n\":   +-----------+-------+   :     :   +-----+-----+  .->| F  | i  | d  | o  \"\n\"|   :\\n\"\n\":   | ptr       |   o---+---+-----+-->| o o | o o |  |  +----+----+----+----\"\n\"+   :\\n\"\n\":   | len       |     2 |   :     :   +-|-|-+-|-|-+  \"\n\"`---------.                :\\n\"\n\":   | capacity  |     2 |   :     :     | |   | |    data      \"\n\"|                :\\n\"\n\":   +-----------+-------+   :     :     | |   | |   +-------+--|-------\"\n\"+        :\\n\"\n\":                           :     :     | |   | '-->| name  |  o, 4, 4 \"\n\"|        :\\n\"\n\":                           :     :     | |   |     | age   |        5 \"\n\"|        :\\n\"\n\"`- - - - - - - - - - - - - -'     :     | |   |     +-------+----------\"\n\"+        :\\n\"\n\"                                  :     | |   \"\n\"|                                 :\\n\"\n\"                                  :     | |   |      \"\n\"vtable                     :\\n\"\n\"                                  :     | |   |     +----------------------\"\n\"+    :\\n\"\n\"                                  :     | |   '---->| \\\"<Dog as Pet>::talk\\\" \"\n\"|    :\\n\"\n\"                                  :     | |         +----------------------\"\n\"+    :\\n\"\n\"                                  :     | \"\n\"|                                     :\\n\"\n\"                                  :     | |    \"\n\"data                             :\\n\"\n\"                                  :     | |   +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     | '-->| lives |     9 \"\n\"|                 :\\n\"\n\"                                  :     |     +-------+-------\"\n\"+                 :\\n\"\n\"                                  :     \"\n\"|                                       :\\n\"\n\"                                  :     |      \"\n\"vtable                           :\\n\"\n\"                                  :     |     +----------------------\"\n\"+          :\\n\"\n\"                                  :     '---->| \\\"<Cat as Pet>::talk\\\" \"\n\"|          :\\n\"\n\"                                  :           +----------------------\"\n\"+          :\\n\"\n\"                                  :                                             :\\n\"\n\"                                  '- - - - - - - - - - - - - - - - - - - - - \"\n\"- -'\\n\"\n\"```\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"Types that implement a given trait may be of different sizes. This makes it \"\n\"impossible to have things like `Vec<dyn Pet>` in the example above.\"\nmsgstr \"\"\n\"如果型別會實作特定特徵，大小可能會不同。因此在上例中就不可能出現 `Vec<Pet>` \"\n\"這類項目。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"`dyn Pet` is a way to tell the compiler about a dynamically sized type that \"\n\"implements `Pet`.\"\nmsgstr \"可透過 `dyn Pet` 這個方法向編譯器告知實作 `Pet` 的動態大小型別。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"In the example, `pets` is allocated on the stack and the vector data is on \"\n\"the heap. The two vector elements are _fat pointers_:\"\nmsgstr \"\"\n\"在本例中，`pets` 和向量資料分別在堆疊和堆積上分配。這兩個向量元素都是「虛指\"\n\"標」：\"\n\n#: src/smart-pointers/trait-objects.md\n#, fuzzy\nmsgid \"\"\n\"A fat pointer is a double-width pointer. It has two components: a pointer to \"\n\"the actual object and a pointer to the [virtual method table](https://en.\"\n\"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` \"\n\"implementation of that particular object.\"\nmsgstr \"\"\n\"在本例中，`pets` 會保留指向物件的「虛指標」__，而物件會實作 `Pet`。虛指標包含\"\n\"兩個元件，指向實際物件的指標，以及指向該特定物件中 `Pet` 實作項目的虛擬方法表\"\n\"格。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"\"\n\"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` \"\n\"has a `lives` field.\"\nmsgstr \"\"\n\"名為 Fido 的 `Dog` 資料是 `name` 和 `age` 欄位。`Cat` 則有 `lives` 欄位。\"\n\n#: src/smart-pointers/trait-objects.md\nmsgid \"Compare these outputs in the above example:\"\nmsgstr \"比較上述範例的輸出內容：\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"A binary tree is a tree-type data structure where every node has two \"\n\"children (left and right). We will create a tree where each node stores a \"\n\"value. For a given node N, all nodes in a N's left subtree contain smaller \"\n\"values, and all nodes in N's right subtree will contain larger values.\"\nmsgstr \"\"\n\"二元樹是一種樹狀資料結構，其中每個節點都有左右兩個子節點。我們會建立每個節點\"\n\"都儲存一個值的樹狀結構。以指定節點 N 來說，N 左側子樹狀結構中的所有節點都包含\"\n\"較小的值，而 N 右側子樹狀結構中的所有節點都含有較大的值。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"Implement the following types, so that the given tests pass.\"\nmsgstr \"請實作以下型別，讓指定的測試通過。\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"\"\n\"Extra Credit: implement an iterator over a binary tree that returns the \"\n\"values in order.\"\nmsgstr \"加分題：在二元數上實作疊代器，依序傳回值。\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A node in the binary tree.\\n\"\nmsgstr \"/// A node in the binary tree.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"/// A possibly-empty subtree.\\n\"\nmsgstr \"/// A possibly-empty subtree.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\nmsgstr \"\"\n\"/// A container storing a set of values, using a binary tree.\\n\"\n\"///\\n\"\n\"/// If the same value is added multiple times, it is only stored once.\\n\"\n\n#: src/smart-pointers/exercise.md\nmsgid \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\nmsgstr \"// Implement `new`, `insert`, `len`, and `has`.\\n\"\n\n#: src/smart-pointers/exercise.md src/smart-pointers/solution.md\nmsgid \"// not a unique item\\n\"\nmsgstr \"// not a unique item\\n\"\n\n#: src/smart-pointers/solution.md src/android/testing/googletest.md\nmsgid \"\\\"bar\\\"\"\nmsgstr \"\\\"bar\\\"\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"[Borrowing](./borrowing.md) (50 minutes)\"\nmsgstr \"[借用](./borrowing.md) (50 分鐘)\"\n\n#: src/welcome-day-3-afternoon.md\nmsgid \"\"\n\"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)\"\nmsgstr \"[切片和生命週期](./slices-and-lifetimes.md) (1 小時 10 分鐘)\"\n\n#: src/borrowing.md\nmsgid \"[Borrowing a Value](./borrowing/shared.md) (10 minutes)\"\nmsgstr \"[如何借用值](./borrowing/shared.md) (10 分鐘)\"\n\n#: src/borrowing.md\nmsgid \"[Borrow Checking](./borrowing/borrowck.md) (10 minutes)\"\nmsgstr \"[借用檢查](./borrowing/borrowck.md) (10 分鐘)\"\n\n#: src/borrowing.md\nmsgid \"[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)\"\nmsgstr \"[內部可變動性](./borrowing/interior-mutability.md) (10 分鐘)\"\n\n#: src/borrowing.md\nmsgid \"[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)\"\nmsgstr \"[練習：健康統計資料](./borrowing/exercise.md) (20 分鐘)\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"As we saw before, instead of transferring ownership when calling a function, \"\n\"you can let a function _borrow_ the value:\"\nmsgstr \"您可以不必在呼叫函式時轉移所有權，而是讓函式「借用」值：\"\n\n#: src/borrowing/shared.md\nmsgid \"The `add` function _borrows_ two points and returns a new point.\"\nmsgstr \"`add` 函式會「借用」兩個點，並傳回新的點。\"\n\n#: src/borrowing/shared.md\nmsgid \"The caller retains ownership of the inputs.\"\nmsgstr \"呼叫端會保留輸入內容的所有權。\"\n\n#: src/borrowing/shared.md\nmsgid \"\"\n\"This slide is a review of the material on references from day 1, expanding \"\n\"slightly to include function arguments and return values.\"\nmsgstr \"\"\n\"這張投影片會複習第 1 天講解過的參照，並略微延伸討論何謂函式引數和回傳值。\"\n\n#: src/borrowing/shared.md\nmsgid \"Notes on stack returns:\"\nmsgstr \"有關堆疊回傳的注意事項：\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that the return from `add` is cheap because the compiler can \"\n\"eliminate the copy operation. Change the above code to print stack addresses \"\n\"and run it on the [Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=release&edition=2021&gist=0cb13be1c05d7e3446686ad9947c4671) \"\n\"or look at the assembly in [Godbolt](https://rust.godbolt.org/). In the \"\n\"\\\"DEBUG\\\" optimization level, the addresses should change, while they stay \"\n\"the same when changing to the \\\"RELEASE\\\" setting:\"\nmsgstr \"\"\n\"示範因為編譯器可刪除複製操作，所以 `add` 回傳的成本較低。變更上述程式碼來顯示\"\n\"堆疊位址，並在 [Playground](https://play.rust-lang.org/) 上執行。在「DEBUG」\"\n\"最佳化等級中，位址應變更，但在變更為「RELEASE」設定時，位址應維持不變：\"\n\n#: src/borrowing/shared.md\nmsgid \"The Rust compiler can do return value optimization (RVO).\"\nmsgstr \"Rust 編譯器可以執行回傳值最佳化 (RVO)。\"\n\n#: src/borrowing/shared.md\n#, fuzzy\nmsgid \"\"\n\"In C++, copy elision has to be defined in the language specification because \"\n\"constructors can have side effects. In Rust, this is not an issue at all. If \"\n\"RVO did not happen, Rust will always perform a simple and efficient `memcpy` \"\n\"copy.\"\nmsgstr \"\"\n\"在 C++ 中，複製省略必須定義在語言規格內，因為建構函式可能有連帶效果。在 Rust \"\n\"中，這完全不是問題。如未發生 RVO，Rust 一律會執行簡單有效的 `memcpy` 複製作\"\n\"業。\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"\"\n\"Rust's _borrow checker_ puts constraints on the ways you can borrow values. \"\n\"For a given value, at any time:\"\nmsgstr \"Rust 會限制借用值的方式：\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have one or more shared references to the value, _or_\"\nmsgstr \"隨時擁有一或多個 `&T` 值，「或是」\"\n\n#: src/borrowing/borrowck.md\n#, fuzzy\nmsgid \"You can have exactly one exclusive reference to the value.\"\nmsgstr \"只擁有一個 `&mut T` 值。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Note that the requirement is that conflicting references not _exist_ at the \"\n\"same point. It does not matter where the reference is dereferenced.\"\nmsgstr \"\"\n\"請注意，這裡的規定是同一點上不得「存在」衝突的參照，在何處解除參照並不重要。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The above code does not compile because `a` is borrowed as mutable (through \"\n\"`c`) and as immutable (through `b`) at the same time.\"\nmsgstr \"\"\n\"上述程式碼不會編譯，因為系統會同時透過 `c` 和 `b`，以可變動項和不可變動項的格\"\n\"式借用 `a`。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"Move the `println!` statement for `b` before the scope that introduces `c` \"\n\"to make the code compile.\"\nmsgstr \"請將 `b` 的 `println!` 陳述式移到導入 `c` 的範圍前，即可編譯程式碼。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"After that change, the compiler realizes that `b` is only ever used before \"\n\"the new mutable borrow of `a` through `c`. This is a feature of the borrow \"\n\"checker called \\\"non-lexical lifetimes\\\".\"\nmsgstr \"\"\n\"經過該變更後，編譯器會發現系統使用 `b` 的時間，只會在新可變動項透過 `c` 借用 \"\n\"`a` 之前。這是借用檢查器中的功能，稱為「非詞彙生命週期」(non-lexical \"\n\"lifetimes)。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The exclusive reference constraint is quite strong. Rust uses it to ensure \"\n\"that data races do not occur. Rust also _relies_ on this constraint to \"\n\"optimize code. For example, a value behind a shared reference can be safely \"\n\"cached in a register for the lifetime of that reference.\"\nmsgstr \"\"\n\"專屬參照的約束力很強。Rust 會利用這類參照，確保資料競爭的情形不會發生；此外，\"\n\"也會「透過」這項約束，將程式碼最佳化。舉例來說，共用參照背後的值可以在該參照\"\n\"的生命週期內，安全地快取到暫存器中。\"\n\n#: src/borrowing/borrowck.md\nmsgid \"\"\n\"The borrow checker is designed to accommodate many common patterns, such as \"\n\"taking exclusive references to different fields in a struct at the same \"\n\"time. But, there are some situations where it doesn't quite \\\"get it\\\" and \"\n\"this often results in \\\"fighting with the borrow checker.\\\"\"\nmsgstr \"\"\n\"借用檢查器在設計上考量了許多常見模式，例如同時對結構體中的不同欄位進行專屬參\"\n\"照。但檢查器也可能無法完全「理解」某些的情況，這通常會導致「與借用檢查器衝\"\n\"突」。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"In some situations, it's necessary to modify data behind a shared (read-\"\n\"only) reference. For example, a shared data structure might have an internal \"\n\"cache, and wish to update that cache from read-only methods.\"\nmsgstr \"\"\n\"在某些情況下，您必須修改共用 (唯讀) 參照背後的資料：比方說，共用的資料結構可\"\n\"能含有內部快取，並想透過唯讀方法更新該快取。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The \\\"interior mutability\\\" pattern allows exclusive (mutable) access behind \"\n\"a shared reference. The standard library provides several ways to do this, \"\n\"all while still ensuring safety, typically by performing a runtime check.\"\nmsgstr \"\"\n\"「內部可變動性」模式可以在共用參照背後提供專屬 (可變動的) 存取權。標準程式庫\"\n\"支援以多種方式執行此操作，同時仍可確保安全，做法通常是執行執行階段檢查。\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"`RefCell`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph: {root:#?}\\\"\"\nmsgstr \"\\\"graph: {root:#?}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\\\"graph sum: {}\\\"\"\nmsgstr \"\\\"graph sum: {}\\\"\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"`Cell`\"\nmsgstr \"`Cell`\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` wraps a value and allows getting or setting the value, even with a \"\n\"shared reference to the `Cell`. However, it does not allow any references to \"\n\"the value. Since there are no references, borrowing rules cannot be broken.\"\nmsgstr \"\"\n\"`Cell` 會納入值，並允許取得或設定該值，即使具有對 `Cell` 的共用參照也一樣。但\"\n\"是，它不允許對該值進行任何參照。由於沒有參照，因此借用規則不得違反。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"The main thing to take away from this slide is that Rust provides _safe_ \"\n\"ways to modify data behind a shared reference. There are a variety of ways \"\n\"to ensure that safety, and `RefCell` and `Cell` are two of them.\"\nmsgstr \"\"\n\"這張投影片的重點是 Rust 提供「安全的」方法，可讓您修改共用參照背後的資料。要\"\n\"確保安全性有許多方式，而 `RefCell` 和 `Cell` 是其中兩種方法。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`RefCell` enforces Rust's usual borrowing rules (either multiple shared \"\n\"references or a single exclusive reference) with a runtime check. In this \"\n\"case, all borrows are very short and never overlap, so the checks always \"\n\"succeed.\"\nmsgstr \"\"\n\"`RefCell` 會透過執行階段檢查，強制使用 Rust 的一般借用規則 (多個共用參照或單\"\n\"一專屬參照)。在本例中，所有借用都非常短暫且永遠不會重疊，因此檢查一律會成功。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Rc` only allows shared (read-only) access to its contents, since its \"\n\"purpose is to allow (and count) many references. But we want to modify the \"\n\"value, so we need interior mutability.\"\nmsgstr \"\"\n\"`Rc` 只允許對自身內容的共用 (唯讀) 存取行為，因為允許 (並計算) 多個參照才是它\"\n\"的用途。但是，由於我們要修改這個值，因此內部可變動性不可或缺。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"`Cell` is a simpler means to ensure safety: it has a `set` method that takes \"\n\"`&self`. This needs no runtime check, but requires moving values, which can \"\n\"have its own cost.\"\nmsgstr \"\"\n\"如要確保安全，`Cell` 是較簡單的做法，因為其中的 `set` 方法可接受 `&self`。這\"\n\"無需動用執行階段檢查，但需要移動值，因此可能有其相應成本。\"\n\n#: src/borrowing/interior-mutability.md\n#, fuzzy\nmsgid \"\"\n\"Demonstrate that reference loops can be created by adding `root` to `subtree.\"\n\"children`.\"\nmsgstr \"\"\n\"示範可以將 `root` 新增至 `subtree.children` (請勿嘗試輸出！) 來建立參照迴圈。\"\n\n#: src/borrowing/interior-mutability.md\nmsgid \"\"\n\"To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments \"\n\"`self.value` and calls the same method on its children. This will panic in \"\n\"the presence of the reference loop, with `thread 'main' panicked at 'already \"\n\"borrowed: BorrowMutError'`.\"\nmsgstr \"\"\n\"如要演示執行階段發生的恐慌情形，請新增 `fn inc(&mut self)`，這可讓 `self.\"\n\"value` 遞增，並在其子項呼叫相同的方法。在有參照迴圈的情況下，這會引發恐慌，其\"\n\"中的 `thread 'main' 會因 'already borrowed: BorrowMutError'` 而恐慌。\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"You're working on implementing a health-monitoring system. As part of that, \"\n\"you need to keep track of users' health statistics.\"\nmsgstr \"您正在實作健康監控系統，因此須追蹤使用者的健康統計資料。\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"You'll start with a stubbed function in an `impl` block as well as a `User` \"\n\"struct definition. Your goal is to implement the stubbed out method on the \"\n\"`User` `struct` defined in the `impl` block.\"\nmsgstr \"\"\n\"您將從 `impl` 區塊中的部分虛設函式，以及 `User` 結構體定義著手，目標是在 \"\n\"`impl` 區塊中定義的 `User` `struct` 上導入虛設常式方法。\"\n\n#: src/borrowing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"method:\"\nmsgstr \"請將以下程式碼複製到 <https://play.rust-lang.org/>，並填入缺少的方法：\"\n\n#: src/borrowing/exercise.md\nmsgid \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\nmsgstr \"\"\n\"\\\"Update a user's statistics based on measurements from a visit to the \"\n\"doctor\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"Bob\\\"\"\nmsgstr \"\\\"Bob\\\"\"\n\n#: src/borrowing/exercise.md src/borrowing/solution.md\nmsgid \"\\\"I'm {} and my age is {}\\\"\"\nmsgstr \"\\\"I'm {} and my age is {}\\\"\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[Slices: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 minutes)\"\nmsgstr \"[切片: &\\\\[T\\\\]](./slices-and-lifetimes/slices.md) (10 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"[String References](./slices-and-lifetimes/str.md) (10 minutes)\"\nmsgstr \"[字串參照](./slices-and-lifetimes/str.md) (10 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 \"\n\"minutes)\"\nmsgstr \"\"\n\"[生命週期註解](./slices-and-lifetimes/lifetime-annotations.md) (10 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)\"\nmsgstr \"[生命週期省略](./slices-and-lifetimes/lifetime-elision.md) (5 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)\"\nmsgstr \"[結構體生命週期](./slices-and-lifetimes/struct-lifetimes.md) (5 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"\"\n\"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)\"\nmsgstr \"[練習：Protobuf 剖析](./slices-and-lifetimes/exercise.md) (30 分鐘)\"\n\n#: src/slices-and-lifetimes.md\nmsgid \"This segment should take about 1 hour and 10 minutes\"\nmsgstr \"講解這個主題大約需要 1 小時 10 分鐘\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices\"\nmsgstr \"切片\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"A slice gives you a view into a larger collection:\"\nmsgstr \"切片能讓您查看更大的集合：\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Slices borrow data from the sliced type.\"\nmsgstr \"切片會從切片型別借用資料。\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"Question: What happens if you modify `a[3]` right before printing `s`?\"\nmsgstr \"問題：如果在輸出 `s` 前修改 `a[3]`，會有什麼影響？\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"We create a slice by borrowing `a` and specifying the starting and ending \"\n\"indexes in brackets.\"\nmsgstr \"我們會建立一個切片，方法是先借用 `a`，然後在括號中指定起始和結束索引。\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"If the slice starts at index 0, Rust’s range syntax allows us to drop the \"\n\"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are \"\n\"identical.\"\nmsgstr \"\"\n\"如果切片從索引 0 開始，Rust 的範圍語法可允許我們捨棄起始索引，也就是說，\"\n\"`&a[0..a.len()]` 和 `&a[..a.len()]` 意思相同。\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are \"\n\"identical.\"\nmsgstr \"\"\n\"同理，最後一個索引也是如此，因此 `&a[2..a.len()]` 和 `&a[2..]` 意思相同。\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"To easily create a slice of the full array, we can therefore use `&a[..]`.\"\nmsgstr \"因此，為了輕鬆建立完整陣列的切片，我們可以使用 `&a[..]`。\"\n\n#: src/slices-and-lifetimes/slices.md\nmsgid \"\"\n\"`s` is a reference to a slice of `i32`s. Notice that the type of `s` \"\n\"(`&[i32]`) no longer mentions the array length. This allows us to perform \"\n\"computation on slices of different sizes.\"\nmsgstr \"\"\n\"`s` 是對 `i32`s 切片的參照。請注意，`s` (`&[i32]`) 的型別不再提及陣列長度，這\"\n\"有利於我們對不同大小的切片執行運算。\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"Slices always borrow from another object. In this example, `a` has to remain \"\n\"'alive' (in scope) for at least as long as our slice.\"\nmsgstr \"\"\n\"切片一律會從其他物件借用。在本例中，`a` 必須持續「運作」(在範圍內)，時間至少\"\n\"要和切片一樣長。\"\n\n#: src/slices-and-lifetimes/slices.md\n#, fuzzy\nmsgid \"\"\n\"The question about modifying `a[3]` can spark an interesting discussion, but \"\n\"the answer is that for memory safety reasons you cannot do it through `a` at \"\n\"this point in the execution, but you can read the data from both `a` and `s` \"\n\"safely. It works before you created the slice, and again after the \"\n\"`println`, when the slice is no longer used.\"\nmsgstr \"\"\n\"有關修改 `a[3]` 的問題可能引發有趣的討論，但正解是，基於記憶體安全因素，您無\"\n\"法在執行作業的這個時間點，透過 `a` 修改 `a[3]`，但可以放心從 `a` 和 `s` 讀取\"\n\"資料。此項目會在您建立切片前運作，並在 `println` 之後，也就是切片不再使用時再\"\n\"次運作。更多細節會在借用檢查器的章節說明。\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"We can now understand the two string types in Rust: `&str` is almost like \"\n\"`&[char]`, but with its data stored in a variable-length encoding (UTF-8).\"\nmsgstr \"\"\n\"我們現在可以瞭解 Rust 中有兩種字串型別，`&str` 幾近於 `&[char]`，但其資料是以\"\n\"可變長度編碼 (UTF-8) 儲存。\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s1: {s1}\\\"\"\nmsgstr \"\\\"s1: {s1}\\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"Hello \\\"\"\nmsgstr \"\\\"Hello \\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\\\"s3: {s3}\\\"\"\nmsgstr \"\\\"s3: {s3}\\\"\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"Rust terminology:\"\nmsgstr \"以 Rust 術語來說會是這樣：\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`&str` an immutable reference to a string slice.\"\nmsgstr \"`&str` 是對字串切片的不可變參照。\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"`String` a mutable string buffer.\"\nmsgstr \"`String` 是可變動的字串緩衝區。\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"`&str` introduces a string slice, which is an immutable reference to UTF-8 \"\n\"encoded string data stored in a block of memory. String literals \"\n\"(`”Hello”`), are stored in the program’s binary.\"\nmsgstr \"\"\n\"`&str` 可引進字串切片，這是對 UTF-8 編碼字串的不可變參照；該編碼字串儲存在記\"\n\"憶體區塊中，字串常值 (`”Hello”`) 則儲存在程式的二進位檔中。\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"Rust’s `String` type is a wrapper around a vector of bytes. As with a \"\n\"`Vec<T>`, it is owned.\"\nmsgstr \"\"\n\"Rust 的 `String` 型別是位元組向量的包裝函式。就像使用 `Vec<T>` 一樣，該型別有\"\n\"專屬的擁有者。\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"As with many other types `String::from()` creates a string from a string \"\n\"literal; `String::new()` creates a new empty string, to which string data \"\n\"can be added using the `push()` and `push_str()` methods.\"\nmsgstr \"\"\n\"就像使用其他許多型別一樣，`String::from()` 會透過字串常值建立字串；`String::\"\n\"new()` 則建立新的空白字串，您可以使用 `push()` 和 `push_str()` 方法將字串資料\"\n\"加到該字串。\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"The `format!()` macro is a convenient way to generate an owned string from \"\n\"dynamic values. It accepts the same format specification as `println!()`.\"\nmsgstr \"\"\n\"如要從動態值產生自有字串，使用 `format!()` 巨集是便捷的方法。該巨集接受與 \"\n\"`println!()` 相同的格式規格。\"\n\n#: src/slices-and-lifetimes/str.md\nmsgid \"\"\n\"You can borrow `&str` slices from `String` via `&` and optionally range \"\n\"selection. If you select a byte range that is not aligned to character \"\n\"boundaries, the expression will panic. The `chars` iterator iterates over \"\n\"characters and is preferred over trying to get character boundaries right.\"\nmsgstr \"\"\n\"您可以透過 `&str` 和可選的範圍選項，從 `String` 借用 `&str` 切片。如果所選位\"\n\"元組範圍未與字元邊界對齊，運算式會發生恐慌。比起嘗試設定正確的字元邊界，建議\"\n\"優先使用會對字元進行疊代的 `chars` 疊代器。\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"\"\n\"For C++ programmers: think of `&str` as `std::string_view` from C++, but the \"\n\"one that always points to a valid string in memory. Rust `String` is a rough \"\n\"equivalent of `std::string` from C++ (main difference: it can only contain \"\n\"UTF-8 encoded bytes and will never use a small-string optimization).\"\nmsgstr \"\"\n\"C++ 程式設計師請注意：您可以將 `&str` 想成 C++ 的 `const char*`，但這個 \"\n\"`&str` 將一律指向記憶體中的有效字串。Rust 的 `String` 大致等同於 C++ 的 \"\n\"`std::string`，主要差別是前者只能包含 UTF-8 編碼的位元組，且絕不會進行小字串\"\n\"最佳化。\"\n\n#: src/slices-and-lifetimes/str.md\n#, fuzzy\nmsgid \"Byte strings literals allow you to create a `&[u8]` value directly:\"\nmsgstr \"位元組字串可讓您直接建立 `&[u8]` 值：\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"A reference has a _lifetime_, which must not \\\"outlive\\\" the value it refers \"\n\"to. This is verified by the borrow checker.\"\nmsgstr \"參照的「生命週期」不得「超過」其所參照的值。此由借用檢查器負責驗證。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"The lifetime can be implicit - this is what we have seen so far. Lifetimes \"\n\"can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with \"\n\"`'` and `'a` is a typical default name. Read `&'a Point` as \\\"a borrowed \"\n\"`Point` which is valid for at least the lifetime `a`\\\".\"\nmsgstr \"\"\n\"按照我們目前所見，生命週期可以隱晦表示。不過，`&'a Point`、`&'document str` \"\n\"也可以明確表示生命週期。生命週期的開頭為 `'`，一般預設名稱為 `'a``。請將 \"\n\"`&'a Point` 讀做「至少對生命週期 `a` 有效的借用 `Point`」。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes are always inferred by the compiler: you cannot assign a lifetime \"\n\"yourself. Explicit lifetime annotations create constraints where there is \"\n\"ambiguity; the compiler verifies that there is a valid solution.\"\nmsgstr \"生命週期註解會建立限制；編譯器會驗證是否有有效的解決方案。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"Lifetimes become more complicated when considering passing values to and \"\n\"returning values from functions.\"\nmsgstr \"在考慮與函式間傳遞值時，生命週期會變得比較複雜。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"// What is the lifetime of p3?\\n\"\nmsgstr \"// What is the lifetime of p3?\\n\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\\\"p3: {p3:?}\\\"\"\nmsgstr \"\\\"p3: {p3:?}\\\"\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In this example, the compiler does not know what lifetime to infer for `p3`. \"\n\"Looking inside the function body shows that it can only safely assume that \"\n\"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust \"\n\"requires explicit annotations of lifetimes on function arguments and return \"\n\"values.\"\nmsgstr \"\"\n\"在本例中，編譯器無法堆論出 `p3` 到底有多長的生命週期。查看函式主體內部後顯\"\n\"示，編譯器只有把握假設 `p3` 的生命週期是 `p1` 和 `p2` 中的較短那個。但就像型\"\n\"別一樣，Rust 規定要對函式引數和回傳值的生命週期加上明確註解。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"Add `'a` appropriately to `left_most`:\"\nmsgstr \"請將 `'a` 妥善新增至 `left_most`：\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"This says, \\\"given p1 and p2 which both outlive `'a`, the return value lives \"\n\"for at least `'a`.\"\nmsgstr \"\"\n\"這表示，「假設 p1 和 p2 都比 `'a` 長」，回傳值的生命週期至少會為 `'a`。\"\n\n#: src/slices-and-lifetimes/lifetime-annotations.md\nmsgid \"\"\n\"In common cases, lifetimes can be elided, as described on the next slide.\"\nmsgstr \"一般情況下可以省略生命週期，詳情請見下一張投影片。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Lifetimes in Function Calls\"\nmsgstr \"函式呼叫中的生命週期\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\n#, fuzzy\nmsgid \"\"\n\"Lifetimes for function arguments and return values must be fully specified, \"\n\"but Rust allows lifetimes to be elided in most cases with [a few simple \"\n\"rules](https://doc.rust-lang.org/nomicon/lifetime-elision.html). This is not \"\n\"inference -- it is just a syntactic shorthand.\"\nmsgstr \"\"\n\"請務必完整指定函式引數和回傳值的生命週期，不過在大部分情況下，Rust 允許使用 \"\n\"[一些簡單規則](https://doc.rust-lang.org/nomicon/lifetime-elision.html) 省略\"\n\"這些生命週期。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Each argument which does not have a lifetime annotation is given one.\"\nmsgstr \"凡是沒有生命週期註解的引數都會獲得一個註解。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there is only one argument lifetime, it is given to all un-annotated \"\n\"return values.\"\nmsgstr \"如果只有一個引數生命週期，則會提供給所有未加註的回傳值。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"If there are multiple argument lifetimes, but the first one is for `self`, \"\n\"that lifetime is given to all un-annotated return values.\"\nmsgstr \"\"\n\"如果有多個引數生命週期，但第一個是要給 `self`，這個生命週期會提供給所有未加註\"\n\"的回傳值。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"In this example, `cab_distance` is trivially elided.\"\nmsgstr \"您可看到本例中隨意省略了 `cab_distance`。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"The `nearest` function provides another example of a function with multiple \"\n\"references in its arguments that requires explicit annotation.\"\nmsgstr \"`nearest` 函式提供另一個函式範例，其引數具有多個需要明確註解的參照。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"Try adjusting the signature to \\\"lie\\\" about the lifetimes returned:\"\nmsgstr \"請試著調整簽章，「謊報」傳回的生命週期：\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"This won't compile, demonstrating that the annotations are checked for \"\n\"validity by the compiler. Note that this is not the case for raw pointers \"\n\"(unsafe), and this is a common source of errors with unsafe Rust.\"\nmsgstr \"\"\n\"由於這不會執行編譯，表示編譯器已檢查註解是否有效。請注意，原始指標 (不安全) \"\n\"的情況並非如此，這是不安全 Rust 的常見錯誤來源。\"\n\n#: src/slices-and-lifetimes/lifetime-elision.md\nmsgid \"\"\n\"Students may ask when to use lifetimes. Rust borrows _always_ have \"\n\"lifetimes. Most of the time, elision and type inference mean these don't \"\n\"need to be written out. In more complicated cases, lifetime annotations can \"\n\"help resolve ambiguity. Often, especially when prototyping, it's easier to \"\n\"just work with owned data by cloning values where necessary.\"\nmsgstr \"\"\n\"學生可能會詢問何時該使用生命週期。Rust 的借用「一律」具有生命週期。在大多數情\"\n\"況下，如果採取省略和型別推論的方式，表示您不必編寫這些內容。但在較複雜的情況\"\n\"下，生命週期註解可以協助解決模稜兩可的情況。一般而言，只要在有必要時複製值，\"\n\"即可輕鬆處理所擁有的資料，特別是在原型設計階段更是如此。\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"Lifetimes in Data Structures\"\nmsgstr \"資料結構中的生命週期\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If a data type stores borrowed data, it must be annotated with a lifetime:\"\nmsgstr \"如果資料型別會儲存借用的資料，則必須使用生命週期註解：\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"Bye {text}!\\\"\"\nmsgstr \"\\\"Bye {text}!\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\nmsgstr \"\\\"The quick brown fox jumps over the lazy dog.\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"// erase(text);\\n\"\nmsgstr \"// erase(text);\\n\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{fox:?}\\\"\"\nmsgstr \"\\\"{fox:?}\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\\\"{dog:?}\\\"\"\nmsgstr \"\\\"{dog:?}\\\"\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"In the above example, the annotation on `Highlight` enforces that the data \"\n\"underlying the contained `&str` lives at least as long as any instance of \"\n\"`Highlight` that uses that data.\"\nmsgstr \"\"\n\"在上述範例中，`Highlight` 的註解會強制執行以下規定：若是包含在內的 `&str` 的\"\n\"基礎資料，留存時間應至少和使用該資料的所有 `Highlight` 例項一樣長。\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"If `text` is consumed before the end of the lifetime of `fox` (or `dog`), \"\n\"the borrow checker throws an error.\"\nmsgstr \"\"\n\"如果在 `fox` (或 `dog`) 的生命週期結束前消耗 `text`，借用檢查器會擲回錯誤。\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Types with borrowed data force users to hold on to the original data. This \"\n\"can be useful for creating lightweight views, but it generally makes them \"\n\"somewhat harder to use.\"\nmsgstr \"\"\n\"含有借用資料的型別會強制要求使用者保留原始資料。這在建立輕量檢視畫面可能很實\"\n\"用，但通常也會增加使用難度。\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"When possible, make data structures own their data directly.\"\nmsgstr \"請盡可能讓資料結構直接擁有資料。\"\n\n#: src/slices-and-lifetimes/struct-lifetimes.md\nmsgid \"\"\n\"Some structs with multiple references inside can have more than one lifetime \"\n\"annotation. This can be necessary if there is a need to describe lifetime \"\n\"relationships between the references themselves, in addition to the lifetime \"\n\"of the struct itself. Those are very advanced use cases.\"\nmsgstr \"\"\n\"某些內含多個參照的結構體可擁有多個生命週期註解。如果除了結構體的生命週期之\"\n\"外，還需要描述參照之間的生命週期關係，就可能有必要擁有多個生命週期註解。那些\"\n\"是相當進階的用途。\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"In this exercise, you will build a parser for the [protobuf binary encoding]\"\n\"(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's \"\n\"simpler than it seems! This illustrates a common parsing pattern, passing \"\n\"slices of data. The underlying data itself is never copied.\"\nmsgstr \"\"\n\"在本練習中，您將建構 [protobuf 二進位編碼](https://protobuf.dev/programming-\"\n\"guides/encoding/)的剖析器。請放心，這比看起來容易！這個練習也會舉例說明常見的\"\n\"剖析模式，也就是傳遞資料切片。基礎資料本身一律不會複製。\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Fully parsing a protobuf message requires knowing the types of the fields, \"\n\"indexed by their field numbers. That is typically provided in a `proto` \"\n\"file. In this exercise, we'll encode that information into `match` \"\n\"statements in functions that get called for each field.\"\nmsgstr \"\"\n\"如要完整剖析 protobuf 訊息，您必須瞭解欄位型別，這會依欄位編號建立索引，通常\"\n\"位於 `proto` 檔案內。在本練習中，我們會在針對各欄位呼叫的函式中，將該資訊編碼\"\n\"為 `match` 陳述式。\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"We'll use the following proto:\"\nmsgstr \"我們將使用以下 proto：\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"A proto message is encoded as a series of fields, one after the next. Each \"\n\"is implemented as a \\\"tag\\\" followed by the value. The tag contains a field \"\n\"number (e.g., `2` for the `id` field of a `Person` message) and a wire type \"\n\"defining how the payload should be determined from the byte stream.\"\nmsgstr \"\"\n\"proto 訊息會編碼為一系列的欄位，一個接著一個。每個欄位都以後方加上值的「標\"\n\"記」形式實作。此標記含有欄位編號 (例如 `Person` 訊息的 `id` 欄位編號是 `2`) \"\n\"以及有線型別，後者負責定義應如何從位元組資料流中決定酬載。\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"Integers, including the tag, are represented with a variable-length encoding \"\n\"called VARINT. Luckily, `parse_varint` is defined for you below. The given \"\n\"code also defines callbacks to handle `Person` and `PhoneNumber` fields, and \"\n\"to parse a message into a series of calls to those callbacks.\"\nmsgstr \"\"\n\"整數 (包含標記) 會以稱為 VARINT 的可變長度編碼表示。好消息是，以下程式碼已為\"\n\"您定義 `parse_varint`。該程式碼也定義了回呼，藉此處理 `Person` 和 \"\n\"`PhoneNumber` 欄位，並將訊息剖析為對這些回呼的一系列呼叫。\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"What remains for you is to implement the `parse_field` function and the \"\n\"`ProtoMessage` trait for `Person` and `PhoneNumber`.\"\nmsgstr \"\"\n\"您剩下的就只是為 `Person` 和 `PhoneNumber` 實作 `parse_field` 函式和 \"\n\"`ProtoMessage` 特徵即可。\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid varint\\\"\"\nmsgstr \"\\\"Invalid varint\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid wire-type\\\"\"\nmsgstr \"\\\"Invalid wire-type\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected EOF\\\"\"\nmsgstr \"\\\"Unexpected EOF\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid length\\\"\"\nmsgstr \"\\\"Invalid length\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Unexpected wire-type)\\\"\"\nmsgstr \"\\\"Unexpected wire-type)\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\\\"Invalid string (not UTF-8)\\\"\"\nmsgstr \"\\\"Invalid string (not UTF-8)\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A wire type as seen on the wire.\\n\"\nmsgstr \"/// A wire type as seen on the wire.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\nmsgstr \"/// The Varint WireType indicates the value is a single VARINT.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\nmsgstr \"\"\n\"//I64,  -- not needed for this exercise\\n\"\n\"    /// The Len WireType indicates that the value is a length represented as \"\n\"a\\n\"\n\"    /// VARINT followed by exactly that number of bytes.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\nmsgstr \"\"\n\"/// The I32 WireType indicates that the value is precisely 4 bytes in\\n\"\n\"    /// little-endian order containing a 32-bit signed integer.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field's value, typed based on the wire type.\\n\"\nmsgstr \"/// A field's value, typed based on the wire type.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//I64(i64),  -- not needed for this exercise\\n\"\nmsgstr \"//I64(i64),  -- not needed for this exercise\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// A field, containing the field number and its value.\\n\"\nmsgstr \"/// A field, containing the field number and its value.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\nmsgstr \"//1 => WireType::I64,  -- not needed for this exercise\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\nmsgstr \"\"\n\"/// Parse a VARINT, returning the parsed value and the remaining bytes.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\nmsgstr \"\"\n\"// This is the last byte of the VARINT, so convert it to\\n\"\n\"            // a u64 and return it.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"// More than 7 bytes is invalid.\\n\"\nmsgstr \"// More than 7 bytes is invalid.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Convert a tag into a field number and a WireType.\\n\"\nmsgstr \"/// Convert a tag into a field number and a WireType.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"/// Parse a field, returning the remaining bytes\\n\"\nmsgstr \"/// Parse a field, returning the remaining bytes\\n\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\nmsgstr \"\"\n\"\\\"Based on the wire type, build a Field, consuming as many bytes as \"\n\"necessary.\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"\\\"Return the field, and any un-consumed bytes.\\\"\"\nmsgstr \"\\\"Return the field, and any un-consumed bytes.\\\"\"\n\n#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md\nmsgid \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\nmsgstr \"\"\n\"/// Parse a message in the given data, calling `T::add_field` for each field \"\n\"in\\n\"\n\"/// the message.\\n\"\n\"///\\n\"\n\"/// The entire input is consumed.\\n\"\n\n#: src/slices-and-lifetimes/exercise.md\nmsgid \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\nmsgstr \"// TODO: Implement ProtoMessage for Person and PhoneNumber.\\n\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\nmsgstr \"// Unwrap error because `value` is definitely 4 bytes long.\\n\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"// skip everything else\\n\"\nmsgstr \"// skip everything else\\n\"\n\n#: src/slices-and-lifetimes/solution.md\nmsgid \"b\\\"hello\\\"\"\nmsgstr \"b\\\"hello\\\"\"\n\n#: src/welcome-day-4.md\nmsgid \"Welcome to Day 4\"\nmsgstr \"歡迎參加第 4 天課程\"\n\n#: src/welcome-day-4.md\n#, fuzzy\nmsgid \"\"\n\"Today we will cover topics relating to building large-scale software in Rust:\"\nmsgstr \"今天我們會探討一些有關 Rust 的進階主題：\"\n\n#: src/welcome-day-4.md\nmsgid \"Iterators: a deep dive on the `Iterator` trait.\"\nmsgstr \"疊代器：深入探討 `Iterator` 特徵。\"\n\n#: src/welcome-day-4.md\nmsgid \"Modules and visibility.\"\nmsgstr \"模組和可見性。\"\n\n#: src/welcome-day-4.md\nmsgid \"Testing.\"\nmsgstr \"測試。\"\n\n#: src/welcome-day-4.md\nmsgid \"Error handling: panics, `Result`, and the try operator `?`.\"\nmsgstr \"錯誤處理：恐慌、`Result`，以及 try 運算子 `?`。\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Unsafe Rust: the escape hatch when you can't express yourself in safe Rust.\"\nmsgstr \"不安全的 Rust：不能寫出安全的 Rust 時的應急方法。\"\n\n#: src/welcome-day-4.md\nmsgid \"[Welcome](./welcome-day-4.md) (3 minutes)\"\nmsgstr \"[歡迎](./welcome-day-4.md) (3 分鐘)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Iterators](./iterators.md) (45 minutes)\"\nmsgstr \"[疊代器](./iterators.md) (45 分鐘)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Modules](./modules.md) (40 minutes)\"\nmsgstr \"[模組](./modules.md) (40 分鐘)\"\n\n#: src/welcome-day-4.md\nmsgid \"[Testing](./testing.md) (45 minutes)\"\nmsgstr \"[測試](./testing.md) (45 分鐘)\"\n\n#: src/welcome-day-4.md\nmsgid \"\"\n\"Including 10 minute breaks, this session should take about 2 hours and 40 \"\n\"minutes\"\nmsgstr \"加上 10 分鐘的休息時間，這個課程大約需要 2 小時 40 分鐘\"\n\n#: src/iterators.md\nmsgid \"[Iterator](./iterators/iterator.md) (5 minutes)\"\nmsgstr \"[疊代器](./iterators/iterator.md) (5 分鐘)\"\n\n#: src/iterators.md\nmsgid \"[IntoIterator](./iterators/intoiterator.md) (5 minutes)\"\nmsgstr \"[IntoIterator](./iterators/intoiterator.md) (5 分鐘)\"\n\n#: src/iterators.md\nmsgid \"[FromIterator](./iterators/fromiterator.md) (5 minutes)\"\nmsgstr \"[FromIterator](./iterators/fromiterator.md) (5 分鐘)\"\n\n#: src/iterators.md\nmsgid \"\"\n\"[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)\"\nmsgstr \"[練習：疊代器方法鏈結](./iterators/exercise.md) (30 分鐘)\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"The [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait supports iterating over values in a collection. It requires a `next` \"\n\"method and provides lots of methods. Many standard library types implement \"\n\"`Iterator`, and you can implement it yourself, too:\"\nmsgstr \"\"\n\"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) 特徵可讓\"\n\"您對集合中的值進行疊代作業。這需要用到 `next` 方法，且會提供大量方法。許多標\"\n\"準程式庫型別都能實作 `Iterator`，而您也可以自行實作：\"\n\n#: src/iterators/iterator.md\nmsgid \"\\\"fib({i}): {n}\\\"\"\nmsgstr \"\\\"fib({i}): {n}\\\"\"\n\n#: src/iterators/iterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait implements many common functional programming \"\n\"operations over collections (e.g. `map`, `filter`, `reduce`, etc). This is \"\n\"the trait where you can find all the documentation about them. In Rust these \"\n\"functions should produce the code as efficient as equivalent imperative \"\n\"implementations.\"\nmsgstr \"\"\n\"`Iterator` 特徵會對集合實作許多常見的函式程式操作，例如 `map`、`filter`、  \"\n\"`reduce` 等等。您可以藉由此特徵找出所有相關的說明文件。在 Rust 中，這些  函式\"\n\"會產生程式碼，且應與對應的命令式實作項目一樣有效率。\"\n\n#: src/iterators/iterator.md\nmsgid \"\"\n\"`IntoIterator` is the trait that makes for loops work. It is implemented by \"\n\"collection types such as `Vec<T>` and references to them such as `&Vec<T>` \"\n\"and `&[T]`. Ranges also implement it. This is why you can iterate over a \"\n\"vector with `for i in some_vec { .. }` but `some_vec.next()` doesn't exist.\"\nmsgstr \"\"\n\"`IntoIterator` 是迫使 for 迴圈運作的特徵。此特徵由集合型別(例如 `Vec<T>`)   \"\n\"和相關參照 (`&Vec<T>` 與 `&[T]`) 實作而成。此外，範圍也會實作這項特徵。  這就\"\n\"說明了您為何可以透過 `for i in some_vec { .. }` 對向量進行疊代，即使沒有 \"\n\"`some_vec.next()` 也無妨。\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"The `Iterator` trait tells you how to _iterate_ once you have created an \"\n\"iterator. The related trait [`IntoIterator`](https://doc.rust-lang.org/std/\"\n\"iter/trait.IntoIterator.html) defines how to create an iterator for a type. \"\n\"It is used automatically by the `for` loop.\"\nmsgstr \"\"\n\"`Iterator` 特徵會告訴您如何在建立疊代器後進行「疊代」。相關特徵 \"\n\"`IntoIterator` 則會說明如何建立疊代器：\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\\\"point = {x}, {y}\\\"\"\nmsgstr \"\\\"point = {x}, {y}\\\"\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"\"\n\"Click through to the docs for `IntoIterator`. Every implementation of \"\n\"`IntoIterator` must declare two types:\"\nmsgstr \"這裡的語法表示每個 `IntoIterator` 的實作都必須宣告兩種型別：\"\n\n#: src/iterators/intoiterator.md\n#, fuzzy\nmsgid \"`Item`: the type to iterate over, such as `i8`,\"\nmsgstr \"`Item`：進行疊代的型別，例如 `i8`。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"`IntoIter`: the `Iterator` type returned by the `into_iter` method.\"\nmsgstr \"`IntoIter`：`into_iter` 方法傳回的 `Iterator` 型別。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Note that `IntoIter` and `Item` are linked: the iterator must have the same \"\n\"`Item` type, which means that it returns `Option<Item>`\"\nmsgstr \"\"\n\"請注意，`IntoIter` 和 `Item` 已建立連結：疊代器必須具有相同的 `Item` 型別，表\"\n\"示會傳回 `Option<Item>`。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"The example iterates over all combinations of x and y coordinates.\"\nmsgstr \"此範例會對 x 和 y 座標的所有組合進行疊代。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Try iterating over the grid twice in `main`. Why does this fail? Note that \"\n\"`IntoIterator::into_iter` takes ownership of `self`.\"\nmsgstr \"\"\n\"請嘗試在 `main` 中對格線疊代兩次。想想為什麼這樣會失敗？請注意，\"\n\"`IntoIterator::into_iter` 會取得 `self` 的擁有權。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"Fix this issue by implementing `IntoIterator` for `&Grid` and storing a \"\n\"reference to the `Grid` in `GridIter`.\"\nmsgstr \"\"\n\"如要修正此問題，請針對 `&Grid` 實作 `IntoIterator`，並將 `Grid` 的參照儲存在 \"\n\"`GridIter` 中。\"\n\n#: src/iterators/intoiterator.md\nmsgid \"\"\n\"The same problem can occur for standard library types: `for e in \"\n\"some_vector` will take ownership of `some_vector` and iterate over owned \"\n\"elements from that vector. Use `for e in &some_vector` instead, to iterate \"\n\"over references to elements of `some_vector`.\"\nmsgstr \"\"\n\"標準程式庫型別可能會發生同樣的問題，也就是 `for e in some_vector` 會取得 \"\n\"`some_vector` 的擁有權，並對該向量內擁有的元素進行疊代。因此，請改用 `for e \"\n\"in &some_vector` 疊代處理對 `some_vector` 元素的參照。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"FromIterator\"\nmsgstr \"FromIterator\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"lets you build a collection from an [`Iterator`](https://doc.rust-lang.org/\"\n\"std/iter/trait.Iterator.html).\"\nmsgstr \"\"\n\"[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) \"\n\"可讓您透過 [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.\"\n\"html) 建構集合。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\\\"prime_squares: {prime_squares:?}\\\"\"\nmsgstr \"\\\"prime_squares: {prime_squares:?}\\\"\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"`Iterator` implements\"\nmsgstr \"`Iterator`\"\n\n#: src/iterators/fromiterator.md\nmsgid \"There are two ways to specify `B` for this method:\"\nmsgstr \"您可以透過兩種方式為這個方法指定 `B`：\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With the \\\"turbofish\\\": `some_iterator.collect::<COLLECTION_TYPE>()`, as \"\n\"shown. The `_` shorthand used here lets Rust infer the type of the `Vec` \"\n\"elements.\"\nmsgstr \"\"\n\"依指示使用「turbofish」：`some_iterator.collect::<COLLECTION_TYPE>()`。在這裡\"\n\"使用 `_` 簡寫，可讓 Rust 推論 `Vec` 元素的型別。\"\n\n#: src/iterators/fromiterator.md\nmsgid \"\"\n\"With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. \"\n\"Rewrite the example to use this form.\"\nmsgstr \"\"\n\"使用型別推論：`let prime_squares: Vec<_> = some_iterator.collect()`。請重新編\"\n\"寫這個例子，採用這個形式。\"\n\n#: src/iterators/fromiterator.md\n#, fuzzy\nmsgid \"\"\n\"There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. \"\n\"There are also more specialized implementations which let you do cool things \"\n\"like convert an `Iterator<Item = Result<V, E>>` into a `Result<Vec<V>, E>`.\"\nmsgstr \"\"\n\"您也可以利用部分實作項目完成某些酷炫操作，例如將 `Iterator<Item = Result<V, \"\n\"E>>` 轉換成 `Result<Vec<V>, E>`。\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"In this exercise, you will need to find and use some of the provided methods \"\n\"in the [`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) \"\n\"trait to implement a complex calculation.\"\nmsgstr \"\"\n\"您可以自行在型別上實作 [`Iterator`](https://doc.rust-lang.org/std/iter/trait.\"\n\"Iterator.html) 特徵：\"\n\n#: src/iterators/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the following code to <https://play.rust-lang.org/> and make the tests \"\n\"pass. Use an iterator expression and `collect` the result to construct the \"\n\"return value.\"\nmsgstr \"\"\n\"將下列程式碼複製到 <https://play.rust-lang.org/>，然後設法通過測試。請盡量避\"\n\"免為中繼結果分配 `Vec`：\"\n\n#: src/iterators/exercise.md src/iterators/solution.md\nmsgid \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\nmsgstr \"\"\n\"/// Calculate the differences between elements of `values` offset by \"\n\"`offset`,\\n\"\n\"/// wrapping around from the end of `values` to the beginning.\\n\"\n\"///\\n\"\n\"/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\\n\"\n\n#: src/modules.md\nmsgid \"[Modules](./modules/modules.md) (3 minutes)\"\nmsgstr \"[模組](./modules/modules.md) (3 分鐘)\"\n\n#: src/modules.md\nmsgid \"[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)\"\nmsgstr \"[檔案系統階層](./modules/filesystem.md) (5 分鐘)\"\n\n#: src/modules.md\nmsgid \"[Visibility](./modules/visibility.md) (5 minutes)\"\nmsgstr \"[可見性](./modules/visibility.md) (5 分鐘)\"\n\n#: src/modules.md\nmsgid \"[use, super, self](./modules/paths.md) (10 minutes)\"\nmsgstr \"[use、super、self](./modules/paths.md) (10 分鐘)\"\n\n#: src/modules.md\nmsgid \"\"\n\"[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)\"\nmsgstr \"[練習：GUI 程式庫的模組](./modules/exercise.md) (15 分鐘)\"\n\n#: src/modules/modules.md\nmsgid \"We have seen how `impl` blocks let us namespace functions to a type.\"\nmsgstr \"我們已介紹 `impl` 區塊如何讓我們將函式的命名空間建立為型別。\"\n\n#: src/modules/modules.md\nmsgid \"Similarly, `mod` lets us namespace types and functions:\"\nmsgstr \"同樣地，`mod` 可讓我們建立型別和函式的命名空間：\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the foo module\\\"\"\nmsgstr \"\\\"In the foo module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\\\"In the bar module\\\"\"\nmsgstr \"\\\"In the bar module\\\"\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Packages provide functionality and include a `Cargo.toml` file that \"\n\"describes how to build a bundle of 1+ crates.\"\nmsgstr \"\"\n\"套件會提供功能，並收錄 `Cargo.toml` 檔案，用於說明如何建構含有超過 1 個 \"\n\"Crate 的組合。\"\n\n#: src/modules/modules.md\nmsgid \"\"\n\"Crates are a tree of modules, where a binary crate creates an executable and \"\n\"a library crate compiles to a library.\"\nmsgstr \"\"\n\"Crate 是模組的樹狀結構，其中二進位檔 Crate 會建立執行檔，而程式庫 Crate 則會\"\n\"編譯至程式庫。\"\n\n#: src/modules/modules.md\nmsgid \"Modules define organization, scope, and are the focus of this section.\"\nmsgstr \"模組不僅會定義組織、範圍，同時也是本節重點。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Omitting the module content will tell Rust to look for it in another file:\"\nmsgstr \"如果您省略模組內容，系統會指示 Rust 在其他檔案中尋找該內容：\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This tells rust that the `garden` module content is found at `src/garden.\"\n\"rs`. Similarly, a `garden::vegetables` module can be found at `src/garden/\"\n\"vegetables.rs`.\"\nmsgstr \"\"\n\"這會讓 Rust 知道 `garden` 模組內容是在 `src/garden.rs` 中找到的。同樣地，\"\n\"`garden::vegetables` 模組可在 `src/garden/vegetables.rs` 中找到。\"\n\n#: src/modules/filesystem.md\nmsgid \"The `crate` root is in:\"\nmsgstr \"`crate` 根層級位於：\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/lib.rs` (for a library crate)\"\nmsgstr \"`src/lib.rs` (適用於程式庫 Crate)\"\n\n#: src/modules/filesystem.md\nmsgid \"`src/main.rs` (for a binary crate)\"\nmsgstr \"`src/main.rs` (適用於二進位檔 Crate)\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Modules defined in files can be documented, too, using \\\"inner doc \"\n\"comments\\\". These document the item that contains them -- in this case, a \"\n\"module.\"\nmsgstr \"\"\n\"您也可以使用 \\\"inner doc comments\\\" 記錄檔案中定義的模組。這些會記錄包含它們\"\n\"的項目，在本例中就是模組。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\nmsgstr \"\"\n\"//! This module implements the garden, including a highly performant \"\n\"germination\\n\"\n\"//! implementation.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"// Re-export types from this module.\\n\"\nmsgstr \"// Re-export types from this module.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Sow the given seed packets.\\n\"\nmsgstr \"/// Sow the given seed packets.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"/// Harvest the produce in the garden that is ready.\\n\"\nmsgstr \"/// Harvest the produce in the garden that is ready.\\n\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"Before Rust 2018, modules needed to be located at `module/mod.rs` instead of \"\n\"`module.rs`, and this is still a working alternative for editions after 2018.\"\nmsgstr \"\"\n\"在 Rust 2018 之前，模組需位於 `module/mod.rs` 而非 `module.rs` 中，這仍然是 \"\n\"2018 後續版本的可行替代方案。\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The main reason to introduce `filename.rs` as alternative to `filename/mod.\"\n\"rs` was because many files named `mod.rs` can be hard to distinguish in IDEs.\"\nmsgstr \"\"\n\"導入 `filename.rs` 做為 `filename/mod.rs` 的替代方案，主要是因為許多名為 \"\n\"`mod.rs` 的檔案在 IDE 中很難區分。\"\n\n#: src/modules/filesystem.md\nmsgid \"Deeper nesting can use folders, even if the main module is a file:\"\nmsgstr \"更深層的巢狀結構可以使用資料夾，即使主要模組為檔案也一樣：\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"The place rust will look for modules can be changed with a compiler \"\n\"directive:\"\nmsgstr \"Rust 尋找模組的位置可透過編譯器指令變更：\"\n\n#: src/modules/filesystem.md\nmsgid \"\\\"some/path.rs\\\"\"\nmsgstr \"\\\"some/path.rs\\\"\"\n\n#: src/modules/filesystem.md\nmsgid \"\"\n\"This is useful, for example, if you would like to place tests for a module \"\n\"in a file named `some_module_test.rs`, similar to the convention in Go.\"\nmsgstr \"\"\n\"舉例來說，如果您想將模組的測試放在名為 `some_module_test.rs` 的檔案中 (類似 \"\n\"Go 中的慣例)，這就會很實用。\"\n\n#: src/modules/visibility.md\nmsgid \"Modules are a privacy boundary:\"\nmsgstr \"我們可將模組視為隱私邊界：\"\n\n#: src/modules/visibility.md\nmsgid \"Module items are private by default (hides implementation details).\"\nmsgstr \"模組項目預設為不公開 (會隱藏實作詳細資料)。\"\n\n#: src/modules/visibility.md\nmsgid \"Parent and sibling items are always visible.\"\nmsgstr \"父項和同層項目一律會顯示。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In other words, if an item is visible in module `foo`, it's visible in all \"\n\"the descendants of `foo`.\"\nmsgstr \"換句話說，如果項目顯示在 `foo` 模組中，則會出現在 `foo` 的所有子系中。\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::private\\\"\"\nmsgstr \"\\\"outer::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::public\\\"\"\nmsgstr \"\\\"outer::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::private\\\"\"\nmsgstr \"\\\"outer::inner::private\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"\\\"outer::inner::public\\\"\"\nmsgstr \"\\\"outer::inner::public\\\"\"\n\n#: src/modules/visibility.md\nmsgid \"Use the `pub` keyword to make modules public.\"\nmsgstr \"使用 `pub` 關鍵字將模組設為公開。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"Additionally, there are advanced `pub(...)` specifiers to restrict the scope \"\n\"of public visibility.\"\nmsgstr \"此外，您也可以使用進階的 `pub(...)` 指定碼來限制公開的瀏覽權限範圍。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself).\"\nmsgstr \"\"\n\"請參閱 [Rust 參考資料](https://doc.rust-lang.org/reference/visibility-and-\"\n\"privacy.html#pubin-path-pubcrate-pubsuper-and-pubself)。\"\n\n#: src/modules/visibility.md\nmsgid \"Configuring `pub(crate)` visibility is a common pattern.\"\nmsgstr \"設定 `pub(crate)` 瀏覽權限是一種常見模式。\"\n\n#: src/modules/visibility.md\nmsgid \"Less commonly, you can give visibility to a specific path.\"\nmsgstr \"您也可以授予特定路徑的瀏覽權限，但這較不常見。\"\n\n#: src/modules/visibility.md\nmsgid \"\"\n\"In any case, visibility must be granted to an ancestor module (and all of \"\n\"its descendants).\"\nmsgstr \"無論如何，都請務必將瀏覽權限授予祖系模組 (及其所有子系)。\"\n\n#: src/modules/paths.md\nmsgid \"use, super, self\"\nmsgstr \"use、super、self\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"A module can bring symbols from another module into scope with `use`. You \"\n\"will typically see something like this at the top of each module:\"\nmsgstr \"\"\n\"模組可以使用 `use` 將其他模組的符號帶進範圍內。您通常會在每個模組的頂端看到類\"\n\"似下方的內容：\"\n\n#: src/modules/paths.md\nmsgid \"Paths\"\nmsgstr \"路徑\"\n\n#: src/modules/paths.md\nmsgid \"Paths are resolved as follows:\"\nmsgstr \"路徑的解析方式包括：\"\n\n#: src/modules/paths.md\nmsgid \"As a relative path:\"\nmsgstr \"做為相對路徑：\"\n\n#: src/modules/paths.md\nmsgid \"`foo` or `self::foo` refers to `foo` in the current module,\"\nmsgstr \"`foo` 或 `self::foo` 是指目前模組中的 `foo`。\"\n\n#: src/modules/paths.md\nmsgid \"`super::foo` refers to `foo` in the parent module.\"\nmsgstr \"`super::foo` 是指父項模組中的 `foo`。\"\n\n#: src/modules/paths.md\nmsgid \"As an absolute path:\"\nmsgstr \"做為絕對路徑：\"\n\n#: src/modules/paths.md\nmsgid \"`crate::foo` refers to `foo` in the root of the current crate,\"\nmsgstr \"`crate::foo` 是指目前 Crate 根目錄中的 `foo`。\"\n\n#: src/modules/paths.md\nmsgid \"`bar::foo` refers to `foo` in the `bar` crate.\"\nmsgstr \"`bar::foo` 是指 `bar` Crate 中的 `foo`。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"It is common to \\\"re-export\\\" symbols at a shorter path. For example, the \"\n\"top-level `lib.rs` in a crate might have\"\nmsgstr \"\"\n\"常見的方式是在較短的路徑上「重新導出」符號。舉例來說，Crate 中的頂層 `lib.\"\n\"rs` 可能有\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"making `DiskStorage` and `NetworkStorage` available to other crates with a \"\n\"convenient, short path.\"\nmsgstr \"透過便捷的短路徑，向其他 Crate 提供 `DiskStorage` 和`NetworkStorage`。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"For the most part, only items that appear in a module need to be `use`'d. \"\n\"However, a trait must be in scope to call any methods on that trait, even if \"\n\"a type implementing that trait is already in scope. For example, to use the \"\n\"`read_to_string` method on a type implementing the `Read` trait, you need to \"\n\"`use std::io::Read`.\"\nmsgstr \"\"\n\"在大部分情況下，只有顯示在模組中的項目需要 `use`。但是，如要呼叫特徵的任何方\"\n\"法，該特徵必須處於範圍之內，即使實作該特徵的型別已在範圍內也一樣。舉例來說，\"\n\"如要在實作 `Read` 特徵的型別上使用 `read_to_string` 方法，您需要 `use std::\"\n\"io::Read`。\"\n\n#: src/modules/paths.md\nmsgid \"\"\n\"The `use` statement can have a wildcard: `use std::io::*`. This is \"\n\"discouraged because it is not clear which items are imported, and those \"\n\"might change over time.\"\nmsgstr \"\"\n\"`use` 陳述式可能包含萬用字元，例如 `use std::io::*`。不過，這不是建議的做法，\"\n\"因為我們無法確定匯入了哪些項目，而且這些項目可能隨著時間改變。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"In this exercise, you will reorganize a small GUI Library implementation. \"\n\"This library defines a `Widget` trait and a few implementations of that \"\n\"trait, as well as a `main` function.\"\nmsgstr \"\"\n\"在本練習中，您將重新編排小型的 GUI 程式庫實作項目。這個程式庫定義了 `Widget` \"\n\"特徵、該特徵的幾個實作項目，以及 `main` 函式。\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"It is typical to put each type or set of closely-related types into its own \"\n\"module, so each widget type should get its own module.\"\nmsgstr \"\"\n\"通常，每種型別 (或一組密切相關的型別) 會放入各自的模組中，因此每個小工具型別\"\n\"應該都有自己的模組。\"\n\n#: src/modules/exercise.md\n#, fuzzy\nmsgid \"Cargo Setup\"\nmsgstr \"設定\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"The Rust playground only supports one file, so you will need to make a Cargo \"\n\"project on your local filesystem:\"\nmsgstr \"\"\n\"Rust Playground 僅支援一個檔案，因此您需要在本機檔案系統中建立 Cargo 專案：\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Edit the resulting `src/main.rs` to add `mod` statements, and add additional \"\n\"files in the `src` directory.\"\nmsgstr \"\"\n\"請編輯產生的 `src/main.rs`，新增 `mod` 陳述式並在 `src` 目錄中新增其他檔案。\"\n\n#: src/modules/exercise.md\nmsgid \"Source\"\nmsgstr \"來源\"\n\n#: src/modules/exercise.md\nmsgid \"Here's the single-module implementation of the GUI library:\"\nmsgstr \"以下是 GUI 程式庫的單一模組實作項目：\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Natural width of `self`.\\n\"\nmsgstr \"/// Natural width of `self`.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget into a buffer.\\n\"\nmsgstr \"/// Draw the widget into a buffer.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"/// Draw the widget on standard output.\\n\"\nmsgstr \"/// Draw the widget on standard output.\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"{buffer}\\\"\"\nmsgstr \"\\\"{buffer}\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"// Add 4 paddings for borders\\n\"\nmsgstr \"// Add 4 paddings for borders\\n\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use \"\n\"the\\n\"\n\"        // ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+-{:-<inner_width$}-+\\\"\"\nmsgstr \"\\\"+-{:-<inner_width$}-+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md src/testing/unit-tests.md\n#: src/testing/solution.md\nmsgid \"\\\"\\\"\"\nmsgstr \"\\\"\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:^inner_width$} |\\\"\"\nmsgstr \"\\\"| {:^inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+={:=<inner_width$}=+\\\"\"\nmsgstr \"\\\"+={:=<inner_width$}=+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"| {:inner_width$} |\\\"\"\nmsgstr \"\\\"| {:inner_width$} |\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"// add a bit of padding\\n\"\nmsgstr \"// add a bit of padding\\n\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"+{:-<width$}+\\\"\"\nmsgstr \"\\\"+{:-<width$}+\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"|{:^width$}|\\\"\"\nmsgstr \"\\\"|{:^width$}|\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Rust GUI Demo 1.23\\\"\"\nmsgstr \"\\\"Rust GUI Demo 1.23\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"This is a small text GUI demo.\\\"\"\nmsgstr \"\\\"This is a small text GUI demo.\\\"\"\n\n#: src/modules/exercise.md src/modules/solution.md\nmsgid \"\\\"Click me!\\\"\"\nmsgstr \"\\\"Click me!\\\"\"\n\n#: src/modules/exercise.md\nmsgid \"\"\n\"Encourage students to divide the code in a way that feels natural for them, \"\n\"and get accustomed to the required `mod`, `use`, and `pub` declarations. \"\n\"Afterward, discuss what organizations are most idiomatic.\"\nmsgstr \"\"\n\"請鼓勵學生以自在的方式分割程式碼，習慣必要的 `mod`、`use` 和 `pub` 宣告。之\"\n\"後，討論哪些組織結構最為慣用。\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets.rs ----\\n\"\nmsgstr \"// ---- src/widgets.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/label.rs ----\\n\"\nmsgstr \"// ---- src/widgets/label.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-width\\n\"\nmsgstr \"// ANCHOR_END: Label-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Label-draw_into\\n\"\nmsgstr \"// ANCHOR: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Label-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Label-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/button.rs ----\\n\"\nmsgstr \"// ---- src/widgets/button.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-width\\n\"\nmsgstr \"// ANCHOR_END: Button-width\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Button-draw_into\\n\"\nmsgstr \"// ANCHOR: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Button-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Button-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/widgets/window.rs ----\\n\"\nmsgstr \"// ---- src/widgets/window.rs ----\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\nmsgstr \"\"\n\"// ANCHOR_END: Window-width\\n\"\n\"        // Add 4 paddings for borders\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR: Window-draw_into\\n\"\nmsgstr \"// ANCHOR: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ANCHOR_END: Window-draw_into\\n\"\nmsgstr \"// ANCHOR_END: Window-draw_into\\n\"\n\n#: src/modules/solution.md\nmsgid \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\nmsgstr \"\"\n\"// TODO: after learning about error handling, you can change\\n\"\n\"        // draw_into to return Result<(), std::fmt::Error>. Then use\\n\"\n\"        // the ?-operator here instead of .unwrap().\\n\"\n\n#: src/modules/solution.md\nmsgid \"// ---- src/main.rs ----\\n\"\nmsgstr \"// ---- src/main.rs ----\\n\"\n\n#: src/testing.md\nmsgid \"[Test Modules](./testing/unit-tests.md) (5 minutes)\"\nmsgstr \"[測試模組](./testing/unit-tests.md) (5 分鐘)\"\n\n#: src/testing.md\nmsgid \"[Other Types of Tests](./testing/other.md) (5 minutes)\"\nmsgstr \"[其他測試類型](./testing/other.md) (5 分鐘)\"\n\n#: src/testing.md\nmsgid \"[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)\"\nmsgstr \"[編譯器 Lint 和 Clippy](./testing/lints.md) (3 分鐘)\"\n\n#: src/testing.md\nmsgid \"[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)\"\nmsgstr \"[練習：盧恩 (Luhn) 演算法](./testing/exercise.md) (30 分鐘)\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit Tests\"\nmsgstr \"單元測試\"\n\n#: src/testing/unit-tests.md\nmsgid \"Rust and Cargo come with a simple unit test framework:\"\nmsgstr \"Rust 和 Cargo 提供了一個簡單的單元測試 (unit test) 框架：\"\n\n#: src/testing/unit-tests.md\nmsgid \"Unit tests are supported throughout your code.\"\nmsgstr \"在你的程式碼的任何地方都可添加單元測試。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Integration tests are supported via the `tests/` directory.\"\nmsgstr \"整合測試 (integration test) 則可放置在 `tests/` 資料夾下。\"\n\n#: src/testing/unit-tests.md\nmsgid \"\"\n\"Tests are marked with `#[test]`. Unit tests are often put in a nested \"\n\"`tests` module, using `#[cfg(test)]` to conditionally compile them only when \"\n\"building tests.\"\nmsgstr \"\"\n\"測試會以 `#[test]` 標示。單元測試通常會位於巢狀的 `tests` 模組中，使用 \"\n\"`#[cfg(test)]` 可有條件地編譯測試 (僅限在建構測試時)。\"\n\n#: src/testing/unit-tests.md\n#, fuzzy\nmsgid \"\\\"Hello World\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/testing/unit-tests.md\nmsgid \"This lets you unit test private helpers.\"\nmsgstr \"這有助於您對私人輔助程式進行單元測試。\"\n\n#: src/testing/unit-tests.md\nmsgid \"The `#[cfg(test)]` attribute is only active when you run `cargo test`.\"\nmsgstr \"只有在執行 `cargo test` 時，`#[cfg(test)]` 屬性才會生效。\"\n\n#: src/testing/unit-tests.md\nmsgid \"Run the tests in the playground in order to show their results.\"\nmsgstr \"請在 Playground 中執行測試以顯示結果。\"\n\n#: src/testing/other.md\nmsgid \"Integration Tests\"\nmsgstr \"整合測試\"\n\n#: src/testing/other.md\nmsgid \"If you want to test your library as a client, use an integration test.\"\nmsgstr \"如果您要以用戶端身分測試程式庫，請採用整合測試。\"\n\n#: src/testing/other.md\nmsgid \"Create a `.rs` file under `tests/`:\"\nmsgstr \"在 `tests/` 之下建立一個 `.rs` 檔案：\"\n\n#: src/testing/other.md\nmsgid \"// tests/my_library.rs\\n\"\nmsgstr \"// tests/my_library.rs\\n\"\n\n#: src/testing/other.md\nmsgid \"These tests only have access to the public API of your crate.\"\nmsgstr \"這些測試只能存取 crate 的公用 API。\"\n\n#: src/testing/other.md\nmsgid \"Documentation Tests\"\nmsgstr \"說明文件測試\"\n\n#: src/testing/other.md\nmsgid \"Rust has built-in support for documentation tests:\"\nmsgstr \"Rust 內建說明文件測試相關支援：\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\nmsgstr \"\"\n\"/// Shortens a string to the given length.\\n\"\n\"///\\n\"\n\"/// ```\\n\"\n\"/// # use playground::shorten_string;\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 5), \\\"Hello\\\");\\n\"\n\"/// assert_eq!(shorten_string(\\\"Hello World\\\", 20), \\\"Hello World\\\");\\n\"\n\"/// ```\\n\"\n\n#: src/testing/other.md\nmsgid \"Code blocks in `///` comments are automatically seen as Rust code.\"\nmsgstr \"系統會自動將 `///` 註解中的程式碼區塊視為 Rust 程式碼。\"\n\n#: src/testing/other.md\nmsgid \"The code will be compiled and executed as part of `cargo test`.\"\nmsgstr \"系統會編譯程式碼，執行 `cargo test` 時會一併執行這些程式碼。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Adding `#` in the code will hide it from the docs, but will still compile/\"\n\"run it.\"\nmsgstr \"程式碼中新增 `#` 後，即可從文件中隱藏，但仍會編譯/執行。\"\n\n#: src/testing/other.md\nmsgid \"\"\n\"Test the above code on the [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0).\"\nmsgstr \"\"\n\"請在 [Rust Playground](https://play.rust-lang.org/?\"\n\"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) \"\n\"上測試上述程式碼。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"The Rust compiler produces fantastic error messages, as well as helpful \"\n\"built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even \"\n\"more lints, organized into groups that can be enabled per-project.\"\nmsgstr \"\"\n\"Rust 編譯器會產生高品質的錯誤訊息，以及實用的內建 Lint。[Clippy](https://doc.\"\n\"rust-lang.org/clippy/) 則提供更多 Lint，且會整理成可供每個專案啟用的群組。\"\n\n#: src/testing/lints.md\nmsgid \"\\\"X probably fits in a u16, right? {}\\\"\"\nmsgstr \"\\\"X probably fits in a u16, right? {}\\\"\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Run the code sample and examine the error message. There are also lints \"\n\"visible here, but those will not be shown once the code compiles. Switch to \"\n\"the Playground site to show those lints.\"\nmsgstr \"\"\n\"請執行程式碼範例並查看錯誤訊息。雖然這裡也能看到 Lint，但程式碼開始編譯後，\"\n\"Lint 就不會再顯示。因此若要查看這些 Lint，請改用 Playground 網站。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"After resolving the lints, run `clippy` on the playground site to show \"\n\"clippy warnings. Clippy has extensive documentation of its lints, and adds \"\n\"new lints (including default-deny lints) all the time.\"\nmsgstr \"\"\n\"解析 Lint 後，請在 Playground 網站上執行 `clippy`，顯示 clippy 警告。Clippy \"\n\"提供大量 Lint 說明文件，且會一直添加新的 Lint (包括預設拒絕的 Lint)。\"\n\n#: src/testing/lints.md\nmsgid \"\"\n\"Note that errors or warnings with `help: ...` can be fixed with `cargo fix` \"\n\"or via your editor.\"\nmsgstr \"\"\n\"請注意，您可以使用 `cargo fix` 或編輯器，修正含有 `help: ...` 的錯誤或警告。\"\n\n#: src/testing/exercise.md\nmsgid \"Luhn Algorithm\"\nmsgstr \"盧恩演算法\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used \"\n\"to validate credit card numbers. The algorithm takes a string as input and \"\n\"does the following to validate the credit card number:\"\nmsgstr \"\"\n\"[盧恩演算法](https://en.wikipedia.org/wiki/Luhn_algorithm)可用於驗證信用卡號\"\n\"碼。這個演算法會將字串做為輸入內容，並執行下列操作來驗證信用卡號碼：\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"Ignore all spaces. Reject number with fewer than two digits.\"\nmsgstr \"忽略所有空格。拒絕少於兩位數的號碼。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"Moving from **right to left**, double every second digit: for the number \"\n\"`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`.\"\nmsgstr \"\"\n\"從**右到左**，將偶數位的數字乘二。以數字 `1234` 為例，請將 `3` 和 `1` 乘二；\"\n\"若為數字 `98765`，請將 `6` 和 `8` 乘二。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"After doubling a digit, sum the digits if the result is greater than 9. So \"\n\"doubling `7` becomes `14` which becomes `1 + 4 = 5`.\"\nmsgstr \"\"\n\"將數字乘二後，如果結果大於 9，請將每位數字相加。所以，`7` 乘二等於 `14`，那麼\"\n\"也就是 `1 + 4 = 5`。\"\n\n#: src/testing/exercise.md\nmsgid \"Sum all the undoubled and doubled digits.\"\nmsgstr \"將所有數字 (無論是否已乘二) 相加。\"\n\n#: src/testing/exercise.md\nmsgid \"The credit card number is valid if the sum ends with `0`.\"\nmsgstr \"如果加總所得數字的末位是 `0`，代表信用卡卡號有效。\"\n\n#: src/testing/exercise.md\nmsgid \"\"\n\"The provided code provides a buggy implementation of the luhn algorithm, \"\n\"along with two basic unit tests that confirm that most the algorithm is \"\n\"implemented correctly.\"\nmsgstr \"\"\n\"這裡提供的程式碼是盧恩演算法的錯誤實作示例，另外還有兩個基本單元測試，用於確\"\n\"認大部分演算法已正確實作。\"\n\n#: src/testing/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and write additional \"\n\"tests to uncover bugs in the provided implementation, fixing any bugs you \"\n\"find.\"\nmsgstr \"\"\n\"請將以下程式碼複製到 <https://play.rust-lang.org/>，並填入缺少的函式和方法：\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4263 9826 4026 9299\\\"\"\nmsgstr \"\\\"4263 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6467\\\"\"\nmsgstr \"\\\"4539 3195 0343 6467\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"7992 7398 713\\\"\"\nmsgstr \"\\\"7992 7398 713\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4223 9826 4026 9299\\\"\"\nmsgstr \"\\\"4223 9826 4026 9299\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"4539 3195 0343 6476\\\"\"\nmsgstr \"\\\"4539 3195 0343 6476\\\"\"\n\n#: src/testing/exercise.md src/testing/solution.md\nmsgid \"\\\"8273 1232 7352 0569\\\"\"\nmsgstr \"\\\"8273 1232 7352 0569\\\"\"\n\n#: src/testing/solution.md\nmsgid \"// This is the buggy version that appears in the problem.\\n\"\nmsgstr \"// This is the buggy version that appears in the problem.\\n\"\n\n#: src/testing/solution.md\nmsgid \"// This is the solution and passes all of the tests below.\\n\"\nmsgstr \"// This is the solution and passes all of the tests below.\\n\"\n\n#: src/testing/solution.md\nmsgid \"\\\"1234 5678 1234 5670\\\"\"\nmsgstr \"\\\"1234 5678 1234 5670\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\nmsgstr \"\\\"Is {cc_number} a valid credit card number? {}\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"yes\\\"\"\nmsgstr \"\\\"yes\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"no\\\"\"\nmsgstr \"\\\"no\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"foo 0 0\\\"\"\nmsgstr \"\\\"foo 0 0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" \\\"\"\nmsgstr \"\\\" \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"  \\\"\"\nmsgstr \"\\\"  \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"    \\\"\"\nmsgstr \"\\\"    \\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\"0\\\"\"\nmsgstr \"\\\"0\\\"\"\n\n#: src/testing/solution.md\nmsgid \"\\\" 0 0 \\\"\"\nmsgstr \"\\\" 0 0 \\\"\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Error Handling](./error-handling.md) (55 minutes)\"\nmsgstr \"[錯誤處理](./error-handling.md) (55 分鐘)\"\n\n#: src/welcome-day-4-afternoon.md\nmsgid \"[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)\"\nmsgstr \"[不安全的 Rust](./unsafe-rust.md) (1 小時 5 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"[Panics](./error-handling/panics.md) (3 minutes)\"\nmsgstr \"[恐慌](./error-handling/panics.md) (3 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"[Try Operator](./error-handling/try.md) (5 minutes)\"\nmsgstr \"[嘗試運算子](./error-handling/try.md) (5 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"[Try Conversions](./error-handling/try-conversions.md) (5 minutes)\"\nmsgstr \"[嘗試轉換](./error-handling/try-conversions.md) (5 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"[Error Trait](./error-handling/error.md) (5 minutes)\"\nmsgstr \"[錯誤特徵](./error-handling/error.md) (5 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)\"\nmsgstr \"\"\n\"[thiserror 和 anyhow](./error-handling/thiserror-and-anyhow.md) (5 分鐘)\"\n\n#: src/error-handling.md\nmsgid \"\"\n\"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)\"\nmsgstr \"[練習：根據結果重新編寫](./error-handling/exercise.md) (30 分鐘)\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust handles fatal errors with a \\\"panic\\\".\"\nmsgstr \"Rust 會透過「恐慌」來處理嚴重錯誤。\"\n\n#: src/error-handling/panics.md\nmsgid \"Rust will trigger a panic if a fatal error happens at runtime:\"\nmsgstr \"如果執行階段發生重大錯誤，Rust 就會觸發恐慌：\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"v[100]: {}\\\"\"\nmsgstr \"\\\"v[100]: {}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are for unrecoverable and unexpected errors.\"\nmsgstr \"恐慌代表發生無法復原的非預期錯誤。\"\n\n#: src/error-handling/panics.md\nmsgid \"Panics are symptoms of bugs in the program.\"\nmsgstr \"恐慌可以反映程式中的錯誤。\"\n\n#: src/error-handling/panics.md\nmsgid \"Runtime failures like failed bounds checks can panic\"\nmsgstr \"執行階段失敗 (例如失敗的邊界檢查) 可能會觸發恐慌\"\n\n#: src/error-handling/panics.md\nmsgid \"Assertions (such as `assert!`) panic on failure\"\nmsgstr \"斷言 (例如 `assert!`) 會在失敗時發生恐慌\"\n\n#: src/error-handling/panics.md\nmsgid \"Purpose-specific panics can use the `panic!` macro.\"\nmsgstr \"針對特定用途的恐慌可以使用 `panic!` 巨集。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"A panic will \\\"unwind\\\" the stack, dropping values just as if the functions \"\n\"had returned.\"\nmsgstr \"恐慌會「解開」堆疊，此行為捨棄值的方式就像函式已傳回一樣。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable.\"\nmsgstr \"如果無法接受程式崩潰，請使用不會觸發恐慌的 API，例如 `Vec::get`。\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"By default, a panic will cause the stack to unwind. The unwinding can be \"\n\"caught:\"\nmsgstr \"根據預設，恐慌會造成解開堆疊。您可以擷取這類動作：\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"No problem here!\\\"\"\nmsgstr \"\\\"No problem here!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"{result:?}\\\"\"\nmsgstr \"\\\"{result:?}\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\\\"oh no!\\\"\"\nmsgstr \"\\\"oh no!\\\"\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"Catching is unusual; do not attempt to implement exceptions with \"\n\"`catch_unwind`!\"\nmsgstr \"捕獲是異常行為；請勿嘗試以 `catch_unwind` 實作例外狀況！\"\n\n#: src/error-handling/panics.md\nmsgid \"\"\n\"This can be useful in servers which should keep running even if a single \"\n\"request crashes.\"\nmsgstr \"\"\n\"如果伺服器需要持續運作 (即使有單一要求崩潰也不例外)，這種做法就能派上用場。\"\n\n#: src/error-handling/panics.md\nmsgid \"This does not work if `panic = 'abort'` is set in your `Cargo.toml`.\"\nmsgstr \"如果您在 `Cargo.toml` 中設定 `panic = 'abort'`，就無法採取此做法。\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Runtime errors like connection-refused or file-not-found are handled with \"\n\"the `Result` type, but matching this type on every call can be cumbersome. \"\n\"The try-operator `?` is used to return errors to the caller. It lets you \"\n\"turn the common\"\nmsgstr \"\"\n\"連線遭拒或找不到檔案等執行階段錯誤，都是透過 `Result` 型別來處理，但每次呼叫\"\n\"時都比對此類型可能相當麻煩。try 運算子 `?` 的用途是將錯誤傳回呼叫端，可讓您將\"\n\"下列常見的程式碼\"\n\n#: src/error-handling/try.md\nmsgid \"into the much simpler\"\nmsgstr \"轉換成以下較簡潔的程式碼：\"\n\n#: src/error-handling/try.md\n#, fuzzy\nmsgid \"We can use this to simplify our error handling code:\"\nmsgstr \"我們可以使用這個運算子，簡化錯誤處理程式碼：\"\n\n#: src/error-handling/try.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"config.dat\\\"\"\nmsgstr \"\\\"config.dat\\\"\"\n\n#: src/error-handling/try.md src/error-handling/try-conversions.md\nmsgid \"\\\"username or error: {username:?}\\\"\"\nmsgstr \"\\\"username or error: {username:?}\\\"\"\n\n#: src/error-handling/try.md\nmsgid \"Simplify the `read_username` function to use `?`.\"\nmsgstr \"請簡化 `read_username` 函式，以便使用 `?`。\"\n\n#: src/error-handling/try.md\nmsgid \"The `username` variable can be either `Ok(string)` or `Err(error)`.\"\nmsgstr \"`username` 變數可以是 `Ok(string)` 或 `Err(error)`。\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Use the `fs::write` call to test out the different scenarios: no file, empty \"\n\"file, file with username.\"\nmsgstr \"\"\n\"請使用 `fs::write` 呼叫來測試以下不同情況：沒有檔案、空白檔案、含使用者名稱的\"\n\"檔案。\"\n\n#: src/error-handling/try.md\nmsgid \"\"\n\"Note that `main` can return a `Result<(), E>` as long as it implements `std::\"\n\"process::Termination`. In practice, this means that `E` implements `Debug`. \"\n\"The executable will print the `Err` variant and return a nonzero exit status \"\n\"on error.\"\nmsgstr \"\"\n\"請注意，只要 `main` 實作 `std::process:Termination`，便可傳回 `Result<(), \"\n\"E>`。實務上，這表示 `E` 會實作 `Debug`。執行檔將顯示 `Err` 變體，並在發生錯誤\"\n\"時傳回非零的結束狀態。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The effective expansion of `?` is a little more complicated than previously \"\n\"indicated:\"\nmsgstr \"比起先前提到的下列程式碼，`?` 的有效擴展稍微更複雜一點：\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"works the same as\"\nmsgstr \"運作方式與以下程式碼相同：\"\n\n#: src/error-handling/try-conversions.md\n#, fuzzy\nmsgid \"\"\n\"The `From::from` call here means we attempt to convert the error type to the \"\n\"type returned by the function. This makes it easy to encapsulate errors into \"\n\"higher-level errors.\"\nmsgstr \"\"\n\"這裡的 `From::from` 呼叫意味著，我們嘗試將錯誤型別轉換成函式回傳的型別：\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"IO error: {e}\\\"\"\nmsgstr \"\\\"IO error: {e}\\\"\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\\\"Found no username in {path}\\\"\"\nmsgstr \"\\\"Found no username in {path}\\\"\"\n\n#: src/error-handling/try-conversions.md\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\nmsgstr \"//fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"The `?` operator must return a value compatible with the return type of the \"\n\"function. For `Result`, it means that the error types have to be compatible. \"\n\"A function that returns `Result<T, ErrorOuter>` can only use `?` on a value \"\n\"of type `Result<U, ErrorInner>` if `ErrorOuter` and `ErrorInner` are the \"\n\"same type or if `ErrorOuter` implements `From<ErrorInner>`.\"\nmsgstr \"\"\n\"`?` 運算子必須傳回與函式傳回類型相容的值。如果是 `Result`，表示錯誤類型必須相\"\n\"容。如果是傳回 `Result<T, ErrorOuter>` 的函式，當 `ErrorOuter` 和 \"\n\"`ErrorInner` 的型別相同、或者 `ErrorOuter` 實作 `From<ErrorInner>` 時，就只能\"\n\"在 `Result<U, ErrorInner>` 型別的值上使用 `?`。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A common alternative to a `From` implementation is `Result::map_err`, \"\n\"especially when the conversion only happens in one place.\"\nmsgstr \"\"\n\"`From` 實作的常見的替代方案是 `Result::map_err`，特別是當轉換只在單一位置發生\"\n\"時更是如此。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"There is no compatibility requirement for `Option`. A function returning \"\n\"`Option<T>` can use the `?` operator on `Option<U>` for arbitrary `T` and \"\n\"`U` types.\"\nmsgstr \"\"\n\"`Option` 並沒有相容性規定。如果函式會傳回 `Option<T>`，可以在 `Option<U>` 上\"\n\"將 `?` 運算子用於任意的 `T` 和 `U` 型別。\"\n\n#: src/error-handling/try-conversions.md\nmsgid \"\"\n\"A function that returns `Result` cannot use `?` on `Option` and vice versa. \"\n\"However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` \"\n\"turns `Result` into `Option`.\"\nmsgstr \"\"\n\"傳回 `Result` 的函式無法在 `Option` 上使用 `?`，反之亦然。不過，`Option::\"\n\"ok_or` 會將 `Option` 轉換為 `Result`，而 `Result::ok` 則將 `Result` 轉換為 \"\n\"`Option`。\"\n\n#: src/error-handling/error.md\nmsgid \"Dynamic Error Types\"\nmsgstr \"動態錯誤型別\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Sometimes we want to allow any type of error to be returned without writing \"\n\"our own enum covering all the different possibilities. The `std::error::\"\n\"Error` trait makes it easy to create a trait object that can contain any \"\n\"error.\"\nmsgstr \"\"\n\"我們有時會想允許傳回任何型別的錯誤，而不是自行編寫涵蓋所有不同可能性的列舉。\"\n\"`std::error::Error` 可讓這項工作更輕鬆。\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"count.dat\\\"\"\nmsgstr \"\\\"count.dat\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"1i3\\\"\"\nmsgstr \"\\\"1i3\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Count: {count}\\\"\"\nmsgstr \"\\\"Count: {count}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\\\"Error: {err}\\\"\"\nmsgstr \"\\\"Error: {err}\\\"\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"The `read_count` function can return `std::io::Error` (from file operations) \"\n\"or `std::num::ParseIntError` (from `String::parse`).\"\nmsgstr \"\"\n\"`read_count` 函式可以傳回 `std::io::Error` (透過檔案作業) 或 `std::num::\"\n\"ParseIntError` (透過 `String::parse`)。\"\n\n#: src/error-handling/error.md\n#, fuzzy\nmsgid \"\"\n\"Boxing errors saves on code, but gives up the ability to cleanly handle \"\n\"different error cases differently in the program. As such it's generally not \"\n\"a good idea to use `Box<dyn Error>` in the public API of a library, but it \"\n\"can be a good option in a program where you just want to display the error \"\n\"message somewhere.\"\nmsgstr \"\"\n\"這可少用一些程式碼，但犧牲掉的是無法在程式中以不同方式乾淨地處理各種錯誤情\"\n\"況。因此，在程式庫的公用 API 中使用 `Box<dyn Error>`，通常不是一個理想方式，\"\n\"但如果您只想在程式中的某處顯示錯誤訊息，它可能是不錯的選擇。\"\n\n#: src/error-handling/error.md\nmsgid \"\"\n\"Make sure to implement the `std::error::Error` trait when defining a custom \"\n\"error type so it can be boxed. But if you need to support the `no_std` \"\n\"attribute, keep in mind that the `std::error::Error` trait is currently \"\n\"compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/\"\n\"issues/103765) only.\"\nmsgstr \"\"\n\"定義自訂錯誤型別時，請務必實作 `std::error::Error` 特徵，這樣才能裝箱。不過，\"\n\"如果您需要支援 `no_std` 屬性，請留意 `std::error::Error` 特徵目前僅與[每夜版]\"\n\"(https://github.com/rust-lang/rust/issues/103765)中的 `no_std` 相容。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\n#, fuzzy\nmsgid \"\"\n\"The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/\"\n\"anyhow/) crates are widely used to simplify error handling.\"\nmsgstr \"\"\n\"[thiserror](https://docs.rs/thiserror/) crate 很常用來建立錯誤列舉，我們在上\"\n\"一頁就曾這麼做：\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`thiserror` is often used in libraries to create custom error types that \"\n\"implement `From<T>`.\"\nmsgstr \"\"\n\"`thiserror` 經常在程式庫中使用，目的是建立可實作 `From<T>` 的自訂錯誤型別。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow` is often used by applications to help with error handling in \"\n\"functions, including adding contextual information to your errors.\"\nmsgstr \"\"\n\"`anyhow` 經常由應用程式使用，目的是協助函式中的錯誤處理機制，包括為錯誤加上背\"\n\"景資訊。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Found no username in {0}\\\"\"\nmsgstr \"\\\"Found no username in {0}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to open {path}\\\"\"\nmsgstr \"\\\"Failed to open {path}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Failed to read\\\"\"\nmsgstr \"\\\"Failed to read\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Username: {username}\\\"\"\nmsgstr \"\\\"Username: {username}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\\\"Error: {err:?}\\\"\"\nmsgstr \"\\\"Error: {err:?}\\\"\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`thiserror`\"\nmsgstr \"`thiserror`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"The `Error` derive macro is provided by `thiserror`, and has lots of useful \"\n\"attributes to help define error types in a compact way.\"\nmsgstr \"\"\n\"`Error` 衍生巨集是由 `thiserror` 提供，附有許多實用的屬性，有助於以精簡方式定\"\n\"義錯誤型別。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The `std::error::Error` trait is derived automatically.\"\nmsgstr \"`std::error::Error` 特徵會自動衍生。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"The message from `#[error]` is used to derive the `Display` trait.\"\nmsgstr \"`#[error]` 的訊息則用於衍生 `Display` 特徵。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow`\"\nmsgstr \"`anyhow`\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Error` is essentially a wrapper around `Box<dyn Error>`. As such \"\n\"it's again generally not a good choice for the public API of a library, but \"\n\"is widely used in applications.\"\nmsgstr \"\"\n\"`anyhow::Error` 基本上是 `Box<dyn Error>` 周遭的包裝函式。因此，通常也是不建\"\n\"議程式庫的公用 API 使用，但可在應用程式中廣泛使用。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"`anyhow::Result<V>` is a type alias for `Result<V, anyhow::Error>`.\"\nmsgstr \"`anyhow::Result<V>` 是 `Result<V, anyhow::Error>` 的型別別名。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Actual error type inside of it can be extracted for examination if necessary.\"\nmsgstr \"必要時，可以擷取其中的實際錯誤類型進行檢查。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"Functionality provided by `anyhow::Result<T>` may be familiar to Go \"\n\"developers, as it provides similar usage patterns and ergonomics to `(T, \"\n\"error)` from Go.\"\nmsgstr \"\"\n\"Go 開發人員可能會覺得 `anyhow::Result<T>` 提供的功能似曾相識，因為該功能提供\"\n\"了與 Go 中的 `(T, error)` 類似的使用模式和人體工學。\"\n\n#: src/error-handling/thiserror-and-anyhow.md\nmsgid \"\"\n\"`anyhow::Context` is a trait implemented for the standard `Result` and \"\n\"`Option` types. `use anyhow::Context` is necessary to enable `.context()` \"\n\"and `.with_context()` on those types.\"\nmsgstr \"\"\n\"`anyhow::Context` 是針對標準 `Result` 和 `Option` 型別實作的特徵。如要啟用這\"\n\"些型別的 `.context()` 和 `.with_context()`，就必須使用 anyhow::Context。\"\n\n#: src/error-handling/exercise.md\nmsgid \"Exercise: Rewriting with Result\"\nmsgstr \"練習：根據結果重新編寫\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"The following implements a very simple parser for an expression language. \"\n\"However, it handles errors by panicking. Rewrite it to instead use idiomatic \"\n\"error handling and propagate errors to a return from `main`. Feel free to \"\n\"use `thiserror` and `anyhow`.\"\nmsgstr \"\"\n\"以下程式碼實作一個非常簡單的運算式語言剖析器，但會藉由恐慌來處理錯誤。請重新\"\n\"編寫，改用慣用的錯誤處理機制，並將錯誤傳播至 `main` 的回傳陳述式。您可以自由\"\n\"使用 `thiserror` 和 `anyhow`。\"\n\n#: src/error-handling/exercise.md\nmsgid \"\"\n\"HINT: start by fixing error handling in the `parse` function. Once that is \"\n\"working correctly, update `Tokenizer` to implement \"\n\"`Iterator<Item=Result<Token, TokenizerError>>` and handle that in the parser.\"\nmsgstr \"\"\n\"提示：首先請修正 `parse` 函式中的錯誤處理機制。確認一切正常運作後，更新 \"\n\"`Tokenizer` 即可實作 `Iterator<Item=Result<Token, TokenizerError>>`，並在剖析\"\n\"器中處理。\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An arithmetic operator.\\n\"\nmsgstr \"/// An arithmetic operator.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A token in the expression language.\\n\"\nmsgstr \"/// A token in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// An expression in the expression language.\\n\"\nmsgstr \"/// An expression in the expression language.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A reference to a variable.\\n\"\nmsgstr \"/// A reference to a variable.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A literal number.\\n\"\nmsgstr \"/// A literal number.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"/// A binary operation.\\n\"\nmsgstr \"/// A binary operation.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'z'\"\nmsgstr \"'z'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'_'\"\nmsgstr \"'_'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'+'\"\nmsgstr \"'+'\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"'-'\"\nmsgstr \"'-'\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected character {c}\\\"\"\nmsgstr \"\\\"Unexpected character {c}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"Unexpected end of input\\\"\"\nmsgstr \"\\\"Unexpected end of input\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Invalid 32-bit integer'\\\"\"\nmsgstr \"\\\"Invalid 32-bit integer'\\\"\"\n\n#: src/error-handling/exercise.md\nmsgid \"\\\"Unexpected token {tok:?}\\\"\"\nmsgstr \"\\\"Unexpected token {tok:?}\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"// Look ahead to parse a binary operation if present.\\n\"\nmsgstr \"// Look ahead to parse a binary operation if present.\\n\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"10+foo+20-30\\\"\"\nmsgstr \"\\\"10+foo+20-30\\\"\"\n\n#: src/error-handling/exercise.md src/error-handling/solution.md\nmsgid \"\\\"{expr:?}\\\"\"\nmsgstr \"\\\"{expr:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected character '{0}' in input\\\"\"\nmsgstr \"\\\"Unexpected character '{0}' in input\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Tokenizer error: {0}\\\"\"\nmsgstr \"\\\"Tokenizer error: {0}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Unexpected token {0:?}\\\"\"\nmsgstr \"\\\"Unexpected token {0:?}\\\"\"\n\n#: src/error-handling/solution.md\nmsgid \"\\\"Invalid number\\\"\"\nmsgstr \"\\\"Invalid number\\\"\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)\"\nmsgstr \"[不安全](./unsafe-rust/unsafe.md) (5 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"\"\n\"[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)\"\nmsgstr \"[將原始指標解除參照](./unsafe-rust/dereferencing.md) (10 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)\"\nmsgstr \"[可變動的靜態變數](./unsafe-rust/mutable-static.md) (5 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unions](./unsafe-rust/unions.md) (5 minutes)\"\nmsgstr \"[聯集](./unsafe-rust/unions.md) (5 minutes)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)\"\nmsgstr \"[不安全的函式](./unsafe-rust/unsafe-functions.md) (5 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)\"\nmsgstr \"[不安全的特徵](./unsafe-rust/unsafe-traits.md) (5 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)\"\nmsgstr \"[練習：FFI 包裝函式](./unsafe-rust/exercise.md) (30 分鐘)\"\n\n#: src/unsafe-rust.md\nmsgid \"This segment should take about 1 hour and 5 minutes\"\nmsgstr \"講解這個主題大約需要 1 小時  5 分鐘\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"The Rust language has two parts:\"\nmsgstr \"Rust 語言包含兩個部分：\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"**Safe Rust:** memory safe, no undefined behavior possible.\"\nmsgstr \"\\\\*\\\\*安全的 Rust：\\\\*\\\\*可確保記憶體安全，無法觸發未定義的行為。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"**Unsafe Rust:** can trigger undefined behavior if preconditions are \"\n\"violated.\"\nmsgstr \"\\\\*\\\\*不安全的 Rust：\\\\*\\\\*如果違反先決條件，便可能觸發未定義的行為。\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"We saw mostly safe Rust in this course, but it's important to know what \"\n\"Unsafe Rust is.\"\nmsgstr \"雖然本課程中出現的大多都是安全的 Rust，但瞭解不安全的 Rust 也很重要。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"Unsafe code is usually small and isolated, and its correctness should be \"\n\"carefully documented. It is usually wrapped in a safe abstraction layer.\"\nmsgstr \"\"\n\"不安全的程式碼通常都很簡短、受到隔離，而且封裝在安全的抽象層中。您應該仔細記\"\n\"錄這類程式碼的正確性。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Unsafe Rust gives you access to five new capabilities:\"\nmsgstr \"透過不安全的 Rust，可以使用五項新功能：\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Dereference raw pointers.\"\nmsgstr \"對裸指標解參考。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access or modify mutable static variables.\"\nmsgstr \"存取或修改可變的靜態變數。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Access `union` fields.\"\nmsgstr \"存取 `union` 欄位。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Call `unsafe` functions, including `extern` functions.\"\nmsgstr \"呼叫 `unsafe` 函式 (包括 `extern` 函式)。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"Implement `unsafe` traits.\"\nmsgstr \"實作 `unsafe` 特徵。\"\n\n#: src/unsafe-rust/unsafe.md\nmsgid \"\"\n\"We will briefly cover unsafe capabilities next. For full details, please see \"\n\"[Chapter 19.1 in the Rust Book](https://doc.rust-lang.org/book/ch19-01-\"\n\"unsafe-rust.html) and the [Rustonomicon](https://doc.rust-lang.org/nomicon/).\"\nmsgstr \"\"\n\"接下來將簡單介紹不安全的功能。如需瞭解詳情，請參閱 [Rust Book 的第 19.1 章]\"\n\"(https://rust-lang.tw/book-tw/ch19-01-unsafe-rust.html)，以及 [Rustonomicon]\"\n\"(https://doc.rust-lang.org/nomicon/)。\"\n\n#: src/unsafe-rust/unsafe.md\n#, fuzzy\nmsgid \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off some compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\nmsgstr \"\"\n\"Unsafe Rust does not mean the code is incorrect. It means that developers \"\n\"have turned off the compiler safety features and have to write correct code \"\n\"by themselves. It means the compiler no longer enforces Rust's memory-safety \"\n\"rules.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"Creating pointers is safe, but dereferencing them requires `unsafe`:\"\nmsgstr \"建立指標相當安全，不過對指標解參考就需要使用 `unsafe`：\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"careful!\\\"\"\nmsgstr \"\\\"careful!\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\nmsgstr \"\"\n\"// Safe because r1 and r2 were obtained from references and so are\\n\"\n\"    // guaranteed to be non-null and properly aligned, the objects \"\n\"underlying\\n\"\n\"    // the references from which they were obtained are live throughout the\\n\"\n\"    // whole unsafe block, and they are not accessed either through the\\n\"\n\"    // references or concurrently through any other pointers.\\n\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r1 is: {}\\\"\"\nmsgstr \"\\\"r1 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"uhoh\\\"\"\nmsgstr \"\\\"uhoh\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\\\"r2 is: {}\\\"\"\nmsgstr \"\\\"r2 is: {}\\\"\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\nmsgstr \"\"\n\"// NOT SAFE. DO NOT DO THIS.\\n\"\n\"    /*\\n\"\n\"    let r3: &String = unsafe { &*r1 };\\n\"\n\"    drop(s);\\n\"\n\"    println!(\\\"r3 is: {}\\\", *r3);\\n\"\n\"    */\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\nmsgstr \"\"\n\"It is good practice (and required by the Android Rust style guide) to write \"\n\"a comment for each `unsafe` block explaining how the code inside it \"\n\"satisfies the safety requirements of the unsafe operations it is doing.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\nmsgstr \"\"\n\"In the case of pointer dereferences, this means that the pointers must be \"\n\"[_valid_](https://doc.rust-lang.org/std/ptr/index.html#safety), i.e.:\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The pointer must be non-null.\"\nmsgstr \"The pointer must be non-null.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\nmsgstr \"\"\n\"The pointer must be _dereferenceable_ (within the bounds of a single \"\n\"allocated object).\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"The object must not have been deallocated.\"\nmsgstr \"The object must not have been deallocated.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"There must not be concurrent accesses to the same location.\"\nmsgstr \"There must not be concurrent accesses to the same location.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\nmsgstr \"\"\n\"If the pointer was obtained by casting a reference, the underlying object \"\n\"must be live and no reference may be used to access the memory.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"In most cases the pointer must also be properly aligned.\"\nmsgstr \"In most cases the pointer must also be properly aligned.\"\n\n#: src/unsafe-rust/dereferencing.md\nmsgid \"\"\n\"The \\\"NOT SAFE\\\" section gives an example of a common kind of UB bug: `*r1` \"\n\"has the `'static` lifetime, so `r3` has type `&'static String`, and thus \"\n\"outlives `s`. Creating a reference from a pointer requires _great care_.\"\nmsgstr \"\"\n\"「NOT SAFE」部分提供了常見的 UB 錯誤示例：`*r1` 具有 `'static` 生命週期，因\"\n\"此 `r3` 具有 `&'static String` 這個型別，從而會超過 `s`。從指標建立參照需要\"\n\"「格外謹慎」__。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"It is safe to read an immutable static variable:\"\nmsgstr \"您可以放心讀取不可變的靜態變數：\"\n\n#: src/unsafe-rust/mutable-static.md\n#, fuzzy\nmsgid \"\\\"Hello, world!\\\"\"\nmsgstr \"Hello World!\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\nmsgstr \"\\\"HELLO_WORLD: {HELLO_WORLD}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"However, since data races can occur, it is unsafe to read and write mutable \"\n\"static variables:\"\nmsgstr \"不過，讀取並寫入可變的靜態變數並不安全，因為可能發生資料競爭：\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\\\"COUNTER: {COUNTER}\\\"\"\nmsgstr \"\\\"COUNTER: {COUNTER}\\\"\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"The program here is safe because it is single-threaded. However, the Rust \"\n\"compiler is conservative and will assume the worst. Try removing the \"\n\"`unsafe` and see how the compiler explains that it is undefined behavior to \"\n\"mutate a static from multiple threads.\"\nmsgstr \"\"\n\"這裡的程式採用單一執行緒，因此安全無虞。不過，Rust 編譯器較為保守，會設想最糟\"\n\"的情況。請嘗試移除 `unsafe`，看看編譯器如何解釋為什麼從多個執行緒變更 \"\n\"static，屬於未定義的行為。\"\n\n#: src/unsafe-rust/mutable-static.md\nmsgid \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\nmsgstr \"\"\n\"Using a mutable static is generally a bad idea, but there are some cases \"\n\"where it might make sense in low-level `no_std` code, such as implementing a \"\n\"heap allocator or working with some C APIs.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"Unions are like enums, but you need to track the active field yourself:\"\nmsgstr \"聯合體和列舉很像，但您需要自行追蹤可用欄位：\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"int: {}\\\"\"\nmsgstr \"\\\"int: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\\\"bool: {}\\\"\"\nmsgstr \"\\\"bool: {}\\\"\"\n\n#: src/unsafe-rust/unions.md\n#, fuzzy\nmsgid \"// Undefined behavior!\\n\"\nmsgstr \"在執行階段不會產生未定義的行為，好處如下：\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\nmsgstr \"\"\n\"Unions are very rarely needed in Rust as you can usually use an enum. They \"\n\"are occasionally needed for interacting with C library APIs.\"\n\n#: src/unsafe-rust/unions.md\nmsgid \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\nmsgstr \"\"\n\"If you just want to reinterpret bytes as a different type, you probably want \"\n\"[`std::mem::transmute`](https://doc.rust-lang.org/stable/std/mem/fn.\"\n\"transmute.html) or a safe wrapper such as the [`zerocopy`](https://crates.io/\"\n\"crates/zerocopy) crate.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Calling Unsafe Functions\"\nmsgstr \"呼叫不安全的函式\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"A function or method can be marked `unsafe` if it has extra preconditions \"\n\"you must uphold to avoid undefined behaviour:\"\nmsgstr \"\"\n\"如果函式或方法具有額外先決條件，而您必須遵循這些條件才能避免未定義的行為，那\"\n\"麼就可以將該函式或方法標示為 `unsafe`：\"\n\n#: src/unsafe-rust/unsafe-functions.md src/unsafe-rust/exercise.md\n#: src/unsafe-rust/solution.md src/android/interoperability/with-c.md\n#: src/android/interoperability/with-c/rust.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/exercises/chromium/build-rules.md src/bare-metal/aps/inline-assembly.md\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"C\\\"\"\nmsgstr \"\\\"C\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"🗻∈🌏\\\"\"\nmsgstr \"\\\"🗻∈🌏\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\nmsgstr \"\"\n\"// Safe because the indices are in the correct order, within the bounds of\\n\"\n\"    // the string slice, and lie on UTF-8 sequence boundaries.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"emoji: {}\\\"\"\nmsgstr \"\\\"emoji: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"char count: {}\\\"\"\nmsgstr \"\\\"char count: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"// Undefined behavior if abs misbehaves.\\n\"\nmsgstr \"在執行階段不會產生未定義的行為，好處如下：\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"Absolute value of -3 according to C: {}\\\"\"\nmsgstr \"\\\"Absolute value of -3 according to C: {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\nmsgstr \"\"\n\"// Not upholding the UTF-8 encoding requirement breaks memory safety!\\n\"\n\"    // println!(\\\"emoji: {}\\\", unsafe { emojis.get_unchecked(0..3) });\\n\"\n\"    // println!(\\\"char count: {}\\\", count_chars(unsafe {\\n\"\n\"    // emojis.get_unchecked(0..3) }));\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"Writing Unsafe Functions\"\nmsgstr \"編寫不安全的函式\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"You can mark your own functions as `unsafe` if they require particular \"\n\"conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"如果您的函式必須滿足特定條件才能避免未定義的行為，您可以將其標示為 `unsafe`。\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\nmsgstr \"\"\n\"/// Swaps the values pointed to by the given pointers.\\n\"\n\"///\\n\"\n\"/// # Safety\\n\"\n\"///\\n\"\n\"/// The pointers must be valid and properly aligned.\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"// Safe because ...\\n\"\nmsgstr \"// Safe because ...\\n\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\\\"a = {}, b = {}\\\"\"\nmsgstr \"\\\"a = {}, b = {}\\\"\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can \"\n\"create UB if the range is incorrect. `abs` is incorrect for a different \"\n\"reason: it is an external function (FFI). Calling external functions is \"\n\"usually only a problem when those functions do things with pointers which \"\n\"might violate Rust's memory model, but in general any C function might have \"\n\"undefined behaviour under any arbitrary circumstances.\"\nmsgstr \"\"\n\"This is usually only a problem for extern functions which do things with \"\n\"pointers which might violate Rust's memory model, but in general any C \"\n\"function might have undefined behaviour under any arbitrary circumstances.\"\n\n#: src/unsafe-rust/unsafe-functions.md\nmsgid \"\"\n\"The `\\\"C\\\"` in this example is the ABI; [other ABIs are available too]\"\n\"(https://doc.rust-lang.org/reference/items/external-blocks.html).\"\nmsgstr \"\"\n\"此例中的 `\\\"C\\\"` 為 ABI；[您也可以使用其他 ABI](https://doc.rust-lang.org/\"\n\"reference/items/external-blocks.html)。\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"We wouldn't actually use pointers for a `swap` function - it can be done \"\n\"safely with references.\"\nmsgstr \"\"\n\"We wouldn't actually use pointers for this because it can be done safely \"\n\"with references.\"\n\n#: src/unsafe-rust/unsafe-functions.md\n#, fuzzy\nmsgid \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens. This will likely change in a future Rust \"\n\"edition.\"\nmsgstr \"\"\n\"Note that unsafe code is allowed within an unsafe function without an \"\n\"`unsafe` block. We can prohibit this with `#[deny(unsafe_op_in_unsafe_fn)]`. \"\n\"Try adding it and see what happens.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"Implementing Unsafe Traits\"\nmsgstr \"實作不安全的特徵\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"Like with functions, you can mark a trait as `unsafe` if the implementation \"\n\"must guarantee particular conditions to avoid undefined behaviour.\"\nmsgstr \"\"\n\"與函式類似，如果實作程序必須保證符合特定條件才能避免未定義的行為，您可以將特\"\n\"徵標示為 `unsafe`。\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"For example, the `zerocopy` crate has an unsafe trait that looks [something \"\n\"like this](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes.html):\"\nmsgstr \"\"\n\"舉例來說，`zerocopy` crate 就具有不安全的特徵，如[這個頁面](https://docs.rs/\"\n\"zerocopy/latest/zerocopy/trait.AsBytes.html)所示：\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\nmsgstr \"\"\n\"/// ...\\n\"\n\"/// # Safety\\n\"\n\"/// The type must have a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"// Safe because u32 has a defined representation and no padding.\\n\"\nmsgstr \"// Safe because u32 has a defined representation and no padding.\\n\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\nmsgstr \"\"\n\"There should be a `# Safety` section on the Rustdoc for the trait explaining \"\n\"the requirements for the trait to be safely implemented.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\nmsgstr \"\"\n\"The actual safety section for `AsBytes` is rather longer and more \"\n\"complicated.\"\n\n#: src/unsafe-rust/unsafe-traits.md\nmsgid \"The built-in `Send` and `Sync` traits are unsafe.\"\nmsgstr \"The built-in `Send` and `Sync` traits are unsafe.\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Safe FFI Wrapper\"\nmsgstr \"安全的 FFI 包裝函式\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"Rust has great support for calling functions through a _foreign function \"\n\"interface_ (FFI). We will use this to build a safe wrapper for the `libc` \"\n\"functions you would use from C to read the names of files in a directory.\"\nmsgstr \"\"\n\"Rust 對透過「外部函式介面」__(FFI) 呼叫函式的做法提供強大支援。我們會利用這點\"\n\"來為 `libc` 函式建立安全的包裝函式，這是您在 C 語言中用來讀取目錄檔案名稱的函\"\n\"式。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will want to consult the manual pages:\"\nmsgstr \"建議您參閱以下手冊頁面：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\nmsgstr \"[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\nmsgstr \"[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\nmsgstr \"[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/\"\n\"ffi/) module. There you find a number of string types which you need for the \"\n\"exercise:\"\nmsgstr \"\"\n\"建議您一併瀏覽 [`std::ffi`](https://doc.rust-lang.org/std/ffi/) 模組。其中會\"\n\"有練習需用到的幾個字串型別：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Encoding\"\nmsgstr \"編碼\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Use\"\nmsgstr \"使用\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\nmsgstr \"\"\n\"[`str`](https://doc.rust-lang.org/std/primitive.str.html) 和 [`String`]\"\n\"(https://doc.rust-lang.org/std/string/struct.String.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"UTF-8\"\nmsgstr \"UTF-8\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Text processing in Rust\"\nmsgstr \"在 Rust 中處理文字\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\nmsgstr \"\"\n\"[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) 和 [`CString`]\"\n\"(https://doc.rust-lang.org/std/ffi/struct.CString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"NUL-terminated\"\nmsgstr \"空字串結尾\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with C functions\"\nmsgstr \"與 C 函式通訊\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\nmsgstr \"\"\n\"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) 和 \"\n\"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"OS-specific\"\nmsgstr \"特定 OS\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"Communicating with the OS\"\nmsgstr \"與 OS 通訊\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"You will convert between all these types:\"\nmsgstr \"您將在以下所有型別之間轉換：\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&str` to `CString`: you need to allocate space for a trailing `\\\\0` \"\n\"character,\"\nmsgstr \"`&str` 到 `CString`：您需要為結尾的 `\\\\0` 字元分配空間。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"`CString` to `*const i8`: you need a pointer to call C functions,\"\nmsgstr \"`CString` 到 `*const i8`：您需要指標才能呼叫 C 函式。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`*const i8` to `&CStr`: you need something which can find the trailing `\\\\0` \"\n\"character,\"\nmsgstr \"`*const i8` 到 `&CStr`：您需要一些可以找到結尾 `\\\\0` 字元的內容。\"\n\n#: src/unsafe-rust/exercise.md\n#, fuzzy\nmsgid \"\"\n\"`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \\\"some \"\n\"unknown data\\\",\"\nmsgstr \"`&CStr` 到 `&[u8]`：位元組切片是「某些未知資料」的通用介面。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) to create it,\"\nmsgstr \"\"\n\"`&[u8]` 到 `&OsStr`：`&OsStr` 是通往 `OsString` 的一步，請以 [`OsStrExt`]\"\n\"(https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) 建立。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to \"\n\"return it and call `readdir` again.\"\nmsgstr \"\"\n\"`&OsStr` 到 `OsString`：您需複製 `&OsStr` 中的資料，才能傳回資料並再次呼叫 \"\n\"`readdir`。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very \"\n\"useful chapter about FFI.\"\nmsgstr \"\"\n\"[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) 也有關於 FFI 的實用章節\"\n\"可供參閱。\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"\"\n\"Copy the code below to <https://play.rust-lang.org/> and fill in the missing \"\n\"functions and methods:\"\nmsgstr \"\"\n\"請將以下程式碼複製到 <https://play.rust-lang.org/>，並填入缺少的函式和方法：\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"macos\\\"\"\nmsgstr \"\\\"macos\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\nmsgstr \"// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\nmsgstr \"\"\n\"// Layout according to the Linux man page for readdir(3), where ino_t and\\n\"\n\"    // off_t are resolved according to the definitions in\\n\"\n\"    // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Layout according to the macOS man page for dir(5).\\n\"\nmsgstr \"// Layout according to the macOS man page for dir(5).\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"x86_64\\\"\"\nmsgstr \"\\\"x86_64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\nmsgstr \"\"\n\"// See https://github.com/rust-lang/libc/issues/414 and the section on\\n\"\n\"        // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\\n\"\n\"        //\\n\"\n\"        // \\\"Platforms that existed before these updates were available\\\" \"\n\"refers\\n\"\n\"        // to macOS (as opposed to iOS / wearOS / etc.) on Intel and \"\n\"PowerPC.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"readdir$INODE64\\\"\"\nmsgstr \"\\\"readdir$INODE64\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\nmsgstr \"\"\n\"// Call opendir and return a Ok value if that worked,\\n\"\n\"        // otherwise return Err with a message.\\n\"\n\n#: src/unsafe-rust/exercise.md\nmsgid \"// Keep calling readdir until we get a NULL pointer back.\\n\"\nmsgstr \"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"// Call closedir as needed.\\n\"\nmsgstr \"// Call closedir as needed.\\n\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\".\\\"\"\nmsgstr \"\\\".\\\"\"\n\n#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md\nmsgid \"\\\"files: {:#?}\\\"\"\nmsgstr \"\\\"files: {:#?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Invalid path: {err}\\\"\"\nmsgstr \"\\\"Invalid path: {err}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\nmsgstr \"// SAFETY: path.as_ptr() cannot be NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not open {:?}\\\"\"\nmsgstr \"\\\"Could not open {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\nmsgstr \"\"\n\"// Keep calling readdir until we get a NULL pointer back.\\n\"\n\"        // SAFETY: self.dir is never NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// We have reached the end of the directory.\\n\"\nmsgstr \"// We have reached the end of the directory.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\nmsgstr \"\"\n\"// SAFETY: dirent is not NULL and dirent.d_name is NUL\\n\"\n\"        // terminated.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"// SAFETY: self.dir is not NULL.\\n\"\nmsgstr \"// SAFETY: self.dir is not NULL.\\n\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Could not close {:?}\\\"\"\nmsgstr \"\\\"Could not close {:?}\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"no-such-directory\\\"\"\nmsgstr \"\\\"no-such-directory\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"Non UTF-8 character in path\\\"\"\nmsgstr \"\\\"Non UTF-8 character in path\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"..\\\"\"\nmsgstr \"\\\"..\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"foo.txt\\\"\"\nmsgstr \"\\\"foo.txt\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"The Foo Diaries\\\\n\\\"\"\nmsgstr \"\\\"The Foo Diaries\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"bar.png\\\"\"\nmsgstr \"\\\"bar.png\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"<PNG>\\\\n\\\"\"\nmsgstr \"\\\"<PNG>\\\\n\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"crab.rs\\\"\"\nmsgstr \"\\\"crab.rs\\\"\"\n\n#: src/unsafe-rust/solution.md\nmsgid \"\\\"//! Crab\\\\n\\\"\"\nmsgstr \"\\\"//! Crab\\\\n\\\"\"\n\n#: src/android.md\nmsgid \"Welcome to Rust in Android\"\nmsgstr \"歡迎在 Android 中使用 Rust\"\n\n#: src/android.md\nmsgid \"\"\n\"Rust is supported for system software on Android. This means that you can \"\n\"write new services, libraries, drivers or even firmware in Rust (or improve \"\n\"existing code as needed).\"\nmsgstr \"\"\n\"Android 的系統軟體支援 Rust。也就是說，您可以在 Rust 中編寫新的服務、程式庫、\"\n\"驅動程式，甚至是韌體，也可以視需要強化現有程式碼。\"\n\n#: src/android.md\nmsgid \"\"\n\"We will attempt to call Rust from one of your own projects today. So try to \"\n\"find a little corner of your code base where we can move some lines of code \"\n\"to Rust. The fewer dependencies and \\\"exotic\\\" types the better. Something \"\n\"that parses some raw bytes would be ideal.\"\nmsgstr \"\"\n\"今天我們會嘗試在您擁有的其中一項專案中呼叫 Rust。因此，請盡量在程式碼集中找出\"\n\"一小段來改寫成 Rust。請注意，依附元件和「獨特」型別越少越好。理想情況是確保程\"\n\"式碼能剖析部分原始位元組。\"\n\n#: src/android.md\nmsgid \"\"\n\"The speaker may mention any of the following given the increased use of Rust \"\n\"in Android:\"\nmsgstr \"由於 Rust 在 Android 中越來越廣為使用，講者可能可以提到以下議題：\"\n\n#: src/android.md\nmsgid \"\"\n\"Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-\"\n\"over-http3-in-android.html)\"\nmsgstr \"\"\n\"服務範例：[DNS_over_HTTP](https://security.googleblog.com/2022/07/dns-over-\"\n\"http3-in-android.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/\"\n\"appendix/rutabaga_gfx.html)\"\nmsgstr \"\"\n\"程式庫：[Rutabaga 虛擬繪圖介面](https://crosvm.dev/book/appendix/\"\n\"rutabaga_gfx.html)\"\n\n#: src/android.md\nmsgid \"\"\n\"Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-\"\n\"rust-binder-v1-0-08ba9197f637@google.com/)\"\nmsgstr \"\"\n\"核心驅動程式：[Binder](https://lore.kernel.org/rust-for-linux/20231101-rust-\"\n\"binder-v1-0-08ba9197f637@google.com/)\"\n\n#: src/android.md\nmsgid \"\"\n\"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-\"\n\"rust-in-android.html)\"\nmsgstr \"\"\n\"韌體：[pKVM 韌體](https://security.googleblog.com/2023/10/bare-metal-rust-in-\"\n\"android.html)\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"We will be using a Cuttlefish Android Virtual Device to test our code. Make \"\n\"sure you have access to one or create a new one with:\"\nmsgstr \"\"\n\"我們會使用 Cuttlefish Android 虛擬裝置來測試程式碼。請確認您可以存取這項裝\"\n\"置，或是使用下方程式碼建立新裝置：\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Please see the [Android Developer Codelab](https://source.android.com/docs/\"\n\"setup/start) for details.\"\nmsgstr \"\"\n\"詳情請參閱 [Android 開發人員程式碼研究室](https://source.android.com/docs/\"\n\"setup/start)。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"Cuttlefish is a reference Android device designed to work on generic Linux \"\n\"desktops. MacOS support is also planned.\"\nmsgstr \"\"\n\"Cuttlefish 是參考用的 Android 裝置，可在一般 Linux 電腦上運作。日後也計劃支\"\n\"援 MacOS。\"\n\n#: src/android/setup.md\nmsgid \"\"\n\"The Cuttlefish system image maintains high fidelity to real devices, and is \"\n\"the ideal emulator to run many Rust use cases.\"\nmsgstr \"\"\n\"Cuttlefish 系統映像檔能維持媲美實體裝置的高保真度，是可用於許多 Rust 用途的理\"\n\"想模擬器。\"\n\n#: src/android/build-rules.md\nmsgid \"The Android build system (Soong) supports Rust via a number of modules:\"\nmsgstr \"Android 的建構系統 (Soong) 透過以下模組支援 Rust：\"\n\n#: src/android/build-rules.md\nmsgid \"Module Type\"\nmsgstr \"模組型態\"\n\n#: src/android/build-rules.md\nmsgid \"Description\"\nmsgstr \"敘述\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_binary`\"\nmsgstr \"`rust_binary`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust binary.\"\nmsgstr \"生成一個 Rust 執行檔。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_library`\"\nmsgstr \"`rust_library`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust library, and provides both `rlib` and `dylib` variants.\"\nmsgstr \"生成一個 Rust 函式庫，及其對應的 `rlib` 和 `dylib` 變體。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_ffi`\"\nmsgstr \"`rust_ffi`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a Rust C library usable by `cc` modules, and provides both static \"\n\"and shared variants.\"\nmsgstr \"生成一個可被 `cc` 模組使用的 Rust C 函式庫，及其對應的靜態和共享變體。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_proc_macro`\"\nmsgstr \"`rust_proc_macro`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Produces a `proc-macro` Rust library. These are analogous to compiler \"\n\"plugins.\"\nmsgstr \"生成一個 `proc-macro` Rust 函式庫，類似於編譯器 擴充。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_test`\"\nmsgstr \"`rust_test`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust test binary that uses the standard Rust test harness.\"\nmsgstr \"使用Rust自動化測試框架，生成一個 Rust 測試檔。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_fuzz`\"\nmsgstr \"`rust_fuzz`\"\n\n#: src/android/build-rules.md\nmsgid \"Produces a Rust fuzz binary leveraging `libfuzzer`.\"\nmsgstr \"生成一個使用 `libfuzzer` 的 Rust 模糊測試執行檔。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_protobuf`\"\nmsgstr \"`rust_protobuf`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library that provides an interface for \"\n\"a particular protobuf.\"\nmsgstr \"生成對應 protobuf 介面的 Rust 原始碼及函式庫。\"\n\n#: src/android/build-rules.md\nmsgid \"`rust_bindgen`\"\nmsgstr \"`rust_bindgen`\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Generates source and produces a Rust library containing Rust bindings to C \"\n\"libraries.\"\nmsgstr \"生成用於連接 C 函式庫的 Rust 原始碼及函式庫。\"\n\n#: src/android/build-rules.md\nmsgid \"We will look at `rust_binary` and `rust_library` next.\"\nmsgstr \"接下來我們會探討 `rust_binary` 及 `rust_library`。\"\n\n#: src/android/build-rules.md\nmsgid \"Additional items speaker may mention:\"\nmsgstr \"講者可以提及以下其他事項：\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Cargo is not optimized for multi-language repos, and also downloads packages \"\n\"from the internet.\"\nmsgstr \"\"\n\"Cargo 未針對使用多種程式語言的倉儲進行最佳化調整，並且會從網際網路下載套件。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"For compliance and performance, Android must have crates in-tree. It must \"\n\"also interop with C/C++/Java code. Soong fills that gap.\"\nmsgstr \"\"\n\"為了遵循常規並確保效能，Android 必須在自身專案內提供 Crate。此外，也必須保有\"\n\"與 C/C++/Java 程式碼的互通性。Soong 可以彌補這中間的落差。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"Soong has many similarities to Bazel, which is the open-source variant of \"\n\"Blaze (used in google3).\"\nmsgstr \"\"\n\"Soong 與 Bazel 有許多相似之處，後者是 Blaze 的開放原始碼變化版本 (用於 \"\n\"google3)。\"\n\n#: src/android/build-rules.md\nmsgid \"\"\n\"There is a plan to transition [Android](https://source.android.com/docs/\"\n\"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource.\"\n\"com/chromiumos/bazel/), and [Fuchsia](https://source.android.com/docs/setup/\"\n\"build/bazel/introduction) to Bazel.\"\nmsgstr \"\"\n\"Google 有將 [Android](https://source.android.com/docs/setup/build/bazel/\"\n\"introduction)、[ChromeOS](https://chromium.googlesource.com/chromiumos/\"\n\"bazel/) 和 [Fuchsia](https://source.android.com/docs/setup/build/bazel/\"\n\"introduction) 轉移到 Bazel 的規畫。\"\n\n#: src/android/build-rules.md\nmsgid \"Learning Bazel-like build rules is useful for all Rust OS developers.\"\nmsgstr \"對所有 Rust OS 開發人員來說，學習類似 Bazel 的建構規則都能派上用場。\"\n\n#: src/android/build-rules.md\nmsgid \"Fun fact: Data from Star Trek is a Soong-type Android.\"\nmsgstr \"\"\n\"趣味小知識：《星艦迷航記》中的「百科 (Data)」是 Soong 型的仿生機器人 \"\n\"(android)。\"\n\n#: src/android/build-rules/binary.md\nmsgid \"Rust Binaries\"\nmsgstr \"Rust 二進位檔\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"Let us start with a simple application. At the root of an AOSP checkout, \"\n\"create the following files:\"\nmsgstr \"\"\n\"我們從一個簡單的應用程式開始著手。請在 Android 開放原始碼計畫程式庫的根層級，\"\n\"建立下列檔案：\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/Android.bp_:\"\nmsgstr \"_hello_rust/Android.bp_：\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\\\"hello_rust\\\"\"\nmsgstr \"\\\"hello_rust\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\n#: src/android/logging.md\nmsgid \"\\\"src/main.rs\\\"\"\nmsgstr \"\\\"src/main.rs\\\"\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"_hello_rust/src/main.rs_:\"\nmsgstr \"_hello_rust/src/main.rs_：\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"//! Rust demo.\\n\"\nmsgstr \"//! Rust demo.\\n\"\n\n#: src/android/build-rules/binary.md src/android/build-rules/library.md\nmsgid \"/// Prints a greeting to standard output.\\n\"\nmsgstr \"/// Prints a greeting to standard output.\\n\"\n\n#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md\nmsgid \"\\\"Hello from Rust!\\\"\"\nmsgstr \"\\\"Hello from Rust!\\\"\"\n\n#: src/android/build-rules/binary.md\nmsgid \"You can now build, push, and run the binary:\"\nmsgstr \"您現在可以建構、推送及執行二進位檔：\"\n\n#: src/android/build-rules/binary.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\\\" /data/local/tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust\\n\"\n\"```\"\n\n#: src/android/build-rules/library.md\nmsgid \"Rust Libraries\"\nmsgstr \"Rust 程式庫\"\n\n#: src/android/build-rules/library.md\nmsgid \"You use `rust_library` to create a new Rust library for Android.\"\nmsgstr \"您可以使用 `rust_library` 為 Android 建立一個新的 Rust 程式庫。\"\n\n#: src/android/build-rules/library.md\nmsgid \"Here we declare a dependency on two libraries:\"\nmsgstr \"這裡，我們會宣告兩個需要依附的程式庫：\"\n\n#: src/android/build-rules/library.md\nmsgid \"`libgreeting`, which we define below,\"\nmsgstr \"`libgreeting` (定義如下)\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]\"\n\"(https://cs.android.com/android/platform/superproject/+/master:external/rust/\"\n\"crates/).\"\nmsgstr \"\"\n\"`libtextwrap` (隨附於 [`external/rust/crates/`](https://cs.android.com/\"\n\"android/platform/superproject/+/master:external/rust/crates/) 的 Crate 中)\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"hello_rust_with_dep\\\"\"\nmsgstr \"\\\"hello_rust_with_dep\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libgreetings\\\"\"\nmsgstr \"\\\"libgreetings\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"libtextwrap\\\"\"\nmsgstr \"\\\"libtextwrap\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"// Need this to avoid dynamic link error.\\n\"\nmsgstr \"// Need this to avoid dynamic link error.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"greetings\\\"\"\nmsgstr \"\\\"greetings\\\"\"\n\n#: src/android/build-rules/library.md\n#: src/android/aidl/example-service/service.md src/android/testing.md\n#: src/android/interoperability/java.md\nmsgid \"\\\"src/lib.rs\\\"\"\nmsgstr \"\\\"src/lib.rs\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"_hello_rust/src/lib.rs_:\"\nmsgstr \"_hello_rust/src/lib.rs_：\"\n\n#: src/android/build-rules/library.md\nmsgid \"//! Greeting library.\\n\"\nmsgstr \"//! Greeting library.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"/// Greet `name`.\\n\"\nmsgstr \"/// Greet `name`.\\n\"\n\n#: src/android/build-rules/library.md\nmsgid \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\nmsgstr \"\\\"Hello {name}, it is very nice to meet you!\\\"\"\n\n#: src/android/build-rules/library.md\nmsgid \"You build, push, and run the binary like before:\"\nmsgstr \"請按照之前的方式，建構、推送及執行二進位檔：\"\n\n#: src/android/build-rules/library.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_with_dep\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_with_dep\\n\"\n\"```\"\n\n#: src/android/aidl.md\nmsgid \"\"\n\"The [Android Interface Definition Language (AIDL)](https://developer.android.\"\n\"com/guide/components/aidl) is supported in Rust:\"\nmsgstr \"\"\n\"Rust 支援 [Android 介面定義語言 (AIDL)](https://developer.android.com/guide/\"\n\"components/aidl)：\"\n\n#: src/android/aidl.md\nmsgid \"Rust code can call existing AIDL servers,\"\nmsgstr \"Rust 程式碼可以呼叫現有的 AIDL 服務。\"\n\n#: src/android/aidl.md\nmsgid \"You can create new AIDL servers in Rust.\"\nmsgstr \"您可以在 Rust 中建立新的 AIDL 服務。\"\n\n#: src/android/aidl/birthday-service.md\nmsgid \"\"\n\"To illustrate how to use Rust with Binder, we're going to walk through the \"\n\"process of creating a Binder interface. We're then going to both implement \"\n\"the described service and write client code that talks to that service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"AIDL Interfaces\"\nmsgstr \"AIDL 介面\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"You declare the API of your service using an AIDL interface:\"\nmsgstr \"您可以使用 AIDL 介面宣告服務的 API：\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:\"\nmsgstr \"\"\n\"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_：\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Birthday service interface. */\"\nmsgstr \"/** Birthday service interface. */\"\n\n#: src/android/aidl/example-service/interface.md\n#: src/android/aidl/example-service/service-bindings.md\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"/** Generate a Happy Birthday message. */\"\nmsgstr \"/** Generate a Happy Birthday message. */\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"_birthday_service/aidl/Android.bp_:\"\nmsgstr \"_birthday_service/aidl/Android.bp_：\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com.example.birthdayservice\\\"\"\nmsgstr \"\\\"com.example.birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\\\"com/example/birthdayservice/*.aidl\\\"\"\nmsgstr \"\\\"com/example/birthdayservice/*.aidl\\\"\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"// Rust is not enabled by default\\n\"\nmsgstr \"// Rust is not enabled by default\\n\"\n\n#: src/android/aidl/example-service/interface.md\nmsgid \"\"\n\"Note that the directory structure under the `aidl/` directory needs to match \"\n\"the package name used in the AIDL file, i.e. the package is `com.example.\"\n\"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"Generated Service API\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Binder generates a trait corresponding to the interface definition. trait to \"\n\"talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\n#, fuzzy\nmsgid \"_Generated trait_:\"\nmsgstr \"生成的特徵：\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Your service will need to implement this trait, and your client will use \"\n\"this trait to talk to the service.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"The generated bindings can be found at `out/soong/.intermediates/<path to \"\n\"module>/`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"Point out how the generated function signature, specifically the argument \"\n\"and return types, correspond the interface definition.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service-bindings.md\nmsgid \"\"\n\"`String` for an argument results in a different Rust type than `String` as a \"\n\"return type.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"Service Implementation\"\nmsgstr \"服務實作\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"We can now implement the AIDL service:\"\nmsgstr \"我們現在可以實作 AIDL 服務了：\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/lib.rs_:\"\nmsgstr \"_birthday_service/src/lib.rs_：\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"/// The `IBirthdayService` implementation.\\n\"\nmsgstr \"/// The `IBirthdayService` implementation.\\n\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/changing-implementation.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\nmsgstr \"\\\"Happy Birthday {name}, congratulations with the {years} years!\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"_birthday_service/Android.bp_:\"\nmsgstr \"_birthday_service/Android.bp_：\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"libbirthdayservice\\\"\"\nmsgstr \"\\\"libbirthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthdayservice\\\"\"\nmsgstr \"\\\"birthdayservice\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"com.example.birthdayservice-rust\\\"\"\nmsgstr \"\\\"com.example.birthdayservice-rust\\\"\"\n\n#: src/android/aidl/example-service/service.md\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"libbinder_rs\\\"\"\nmsgstr \"\\\"libbinder_rs\\\"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"Point out the path to the generated `IBirthdayService` trait, and explain \"\n\"why each of the segments is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/service.md\nmsgid \"\"\n\"TODO: What does the `binder::Interface` trait do? Are there methods to \"\n\"override? Where source?\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"AIDL Server\"\nmsgstr \"AIDL 伺服器\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Finally, we can create a server which exposes the service:\"\nmsgstr \"最後，我們可以建立伺服器來公開服務：\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"_birthday_service/src/server.rs_:\"\nmsgstr \"_birthday_service/src/server.rs_：\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"//! Birthday service.\\n\"\nmsgstr \"//! Birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"/// Entry point for birthday service.\\n\"\nmsgstr \"/// Entry point for birthday service.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"Failed to register service\\\"\"\nmsgstr \"\\\"Failed to register service\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"birthday_server\\\"\"\nmsgstr \"\\\"birthday_server\\\"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\\\"src/server.rs\\\"\"\nmsgstr \"\\\"src/server.rs\\\"\"\n\n#: src/android/aidl/example-service/server.md\n#: src/android/aidl/example-service/client.md\nmsgid \"// To avoid dynamic link error.\\n\"\nmsgstr \"// To avoid dynamic link error.\\n\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"The process for taking a user-defined service implementation (in this case \"\n\"the `BirthdayService` type, which implements the `IBirthdayService`) and \"\n\"starting it as a Binder service has multiple steps, and may appear more \"\n\"complicated than students are used to if they've used Binder from C++ or \"\n\"another language. Explain to students why each step is necessary.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"Create an instance of your service type (`BirthdayService`).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in \"\n\"this case). This type is generated by Binder and provides the common Binder \"\n\"functionality that would be provided by the `BnBinder` base class in C++. We \"\n\"don't have inheritance in Rust, so instead we use composition, putting our \"\n\"`BirthdayService` within the generated `BnBinderService`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `add_service`, giving it a service identifier and your service object \"\n\"(the `BnBirthdayService` object in the example).\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/server.md\nmsgid \"\"\n\"Call `join_thread_pool` to add the current thread to Binder's thread pool \"\n\"and start listening for connections.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"We can now build, push, and start the service:\"\nmsgstr \"現在我們可以建構、推送及啟動服務：\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_server\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\\\" /data/local/\"\n\"tmp\\n\"\n\"adb root\\n\"\n\"adb shell /data/local/tmp/birthday_server\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"In another terminal, check that the service runs:\"\nmsgstr \"在另一個終端機中，檢查服務是否能執行：\"\n\n#: src/android/aidl/example-service/deploy.md\nmsgid \"You can also call the service with `service call`:\"\nmsgstr \"藉由 `service call` 呼叫，您也可以呼叫服務：\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"AIDL Client\"\nmsgstr \"AIDL 用戶端\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Finally, we can create a Rust client for our new service.\"\nmsgstr \"最後，我們可以為新服務建立 Rust 用戶端。\"\n\n#: src/android/aidl/example-service/client.md\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"_birthday_service/src/client.rs_:\"\nmsgstr \"_birthday_service/src/client.rs_：\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"/// Call the birthday service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/example-service/client.md src/android/aidl/types/objects.md\n#: src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Failed to connect to BirthdayService\\\"\"\nmsgstr \"\\\"Failed to connect to BirthdayService\\\"\"\n\n#: src/android/aidl/example-service/client.md\n#, fuzzy\nmsgid \"// Call the service.\\n\"\nmsgstr \"/// Call the birthday service.\\n\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"{msg}\\\"\"\nmsgstr \"\\\"{msg}\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"birthday_client\\\"\"\nmsgstr \"\\\"birthday_client\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\\\"src/client.rs\\\"\"\nmsgstr \"\\\"src/client.rs\\\"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Notice that the client does not depend on `libbirthdayservice`.\"\nmsgstr \"請注意，用戶端並不依賴 `libbirthdayservice`。\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"Build, push, and run the client on your device:\"\nmsgstr \"建構、推送及在裝置裡執行用戶端程式：\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m birthday_client\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/birthday_client Charlie 60\\n\"\n\"```\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong<dyn IBirthdayService>` is the trait object representing the service \"\n\"that the client has connected to.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"`Strong` is a custom smart pointer type for Binder. It handles both an in-\"\n\"process ref count for the service trait object, and the global Binder ref \"\n\"count that tracks how many processes have a reference to the object.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Note that the trait object that the client uses to talk to the service uses \"\n\"the exact same trait that the server implements. For a given Binder \"\n\"interface, there is a single Rust trait generated that both client and \"\n\"server use.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/client.md\nmsgid \"\"\n\"Use the same service identifier used when registering the service. This \"\n\"should ideally be defined in a common crate that both the client and server \"\n\"can depend on.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Let us extend the API with more functionality: we want to let clients \"\n\"specify a list of lines for the birthday card:\"\nmsgstr \"讓我們為這個 API 擴充更多功能：我們想要讓用戶能在生日卡上指定幾行字：\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"This results in an updated trait definition for `IBirthdayService`:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"\"\n\"Note how the `String[]` in the AIDL definition is translated as a \"\n\"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the \"\n\"generated bindings wherever possible:\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`in` array arguments are translated to slices.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"`out` and `inout` args are translated to `&mut Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-definition.md\nmsgid \"Return values are translated to returning a `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Updating Client and Service\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"Update the client and server code to account for the new API.\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"'\\\\n'\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"Habby birfday to yuuuuu\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\\\"And also: many more\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/example-service/changing-implementation.md\nmsgid \"\"\n\"TODO: Move code snippets into project files where they'll actually be built?\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Working With AIDL Types\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"AIDL types translate into the appropriate idiomatic Rust type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Primitive types map (mostly) to idiomatic Rust types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"Collection types like slices, `Vec`s and string types are supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"\"\n\"References to AIDL objects and file handles can be sent between clients and \"\n\"services.\"\nmsgstr \"\"\n\n#: src/android/aidl/types.md\nmsgid \"File handles and parcelables are fully supported.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Primitive types map (mostly) idiomatically:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"AIDL Type\"\nmsgstr \"AIDL 型別\"\n\n#: src/android/aidl/types/primitives.md src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"Rust Type\"\nmsgstr \"Rust 型別\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`boolean`\"\nmsgstr \"`boolean`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`byte`\"\nmsgstr \"`byte`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i8`\"\nmsgstr \"`i8`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note that bytes are signed.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`u16`\"\nmsgstr \"`u16`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"Note the usage of `u16`, NOT `u32`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`int`\"\nmsgstr \"`int`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i32`\"\nmsgstr \"`i32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`long`\"\nmsgstr \"`long`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`i64`\"\nmsgstr \"`i64`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`float`\"\nmsgstr \"`float`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f32`\"\nmsgstr \"`f32`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`double`\"\nmsgstr \"`double`\"\n\n#: src/android/aidl/types/primitives.md\nmsgid \"`f64`\"\nmsgstr \"`f64`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"The array types (`T[]`, `byte[]`, and `List<T>`) get translated to the \"\n\"appropriate Rust array type depending on how they are used in the function \"\n\"signature:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#, fuzzy\nmsgid \"Position\"\nmsgstr \"敘述\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`in` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&[T]`\"\nmsgstr \"`&[T]`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`out`/`inout` argument\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"`&mut Vec<T>`\"\nmsgstr \"`&mut Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Return\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`Vec<T>`\"\nmsgstr \"`Vec<T>`\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"\"\n\"In Android 13 or higher, fixed-size arrays are supported, i.e. `T[N]` \"\n\"becomes `[T; N]`. Fixed-size arrays can have multiple dimensions (e.g. \"\n\"int\\\\[3\\\\]\\\\[4\\\\]). In the Java backend, fixed-size arrays are represented \"\n\"as array types.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/arrays.md\nmsgid \"Arrays in parcelable fields always get translated to `Vec<T>`.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"AIDL objects can be sent either as a concrete AIDL type or as the type-\"\n\"erased `IBinder` interface:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.\"\n\"aidl**:\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using a binder object. */\"\nmsgstr \"/** The same thing, but using a binder object. */\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/** The same thing, but using `IBinder`. */\"\nmsgstr \"/** The same thing, but using `IBinder`. */\"\n\n#: src/android/aidl/types/objects.md src/android/aidl/types/parcelables.md\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/client.rs**:\"\nmsgstr \"**birthday_service/src/client.rs**:\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"/// Rust struct implementing the `IBirthdayInfoProvider` interface.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\nmsgstr \"// Create a binder object for the `IBirthdayInfoProvider` interface.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"// Send the binder object to the service.\\n\"\nmsgstr \"// Send the binder object to the service.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\nmsgstr \"\"\n\"// Perform the same operation but passing the provider as an `SpIBinder`.\\n\"\n\n#: src/android/aidl/types/objects.md\nmsgid \"\"\n\"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as \"\n\"`BnBirthdayService` that we saw previously.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"Binder for Rust supports sending parcelables directly:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\nmsgstr \"\"\n\"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:\"\n\n#: src/android/aidl/types/parcelables.md\nmsgid \"/** The same thing, but with a parcelable. */\"\nmsgstr \"/** The same thing, but with a parcelable. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Files can be sent between Binder clients/servers using the \"\n\"`ParcelFileDescriptor` type:\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"/** The same thing, but loads info from a file. */\"\nmsgstr \"/** The same thing, but loads info from a file. */\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Open a file and put the birthday info in it.\\n\"\nmsgstr \"// Open a file and put the birthday info in it.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"/data/local/tmp/birthday.info\\\"\"\nmsgstr \"\\\"/data/local/tmp/birthday.info\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{name}\\\"\"\nmsgstr \"\\\"{name}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"{years}\\\"\"\nmsgstr \"\\\"{years}\\\"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\nmsgstr \"// Create a `ParcelFileDescriptor` from the file and send it.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"**birthday_service/src/lib.rs**:\"\nmsgstr \"**birthday_service/src/lib.rs**:\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\nmsgstr \"\"\n\"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\\n\"\n\"        // an `OwnedFd`, which can be cloned and then used to create a \"\n\"`File`\\n\"\n\"        // object.\\n\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\\\"Invalid file handle\\\"\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a \"\n\"`File` (or any other type that wraps an `OwnedFd`), and can be used to \"\n\"create a new `File` handle on the other side.\"\nmsgstr \"\"\n\n#: src/android/aidl/types/file-descriptor.md\nmsgid \"\"\n\"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and \"\n\"UNIX sockets.\"\nmsgstr \"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"Testing in Android\"\nmsgstr \"在 Android 中的測試\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Building on [Testing](../testing.md), we will now look at how unit tests \"\n\"work in AOSP. Use the `rust_test` module for your unit tests:\"\nmsgstr \"\"\n\n#: src/android/testing.md\nmsgid \"_testing/Android.bp_:\"\nmsgstr \"_testing/Android.bp_:\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad\\\"\"\nmsgstr \"\\\"libleftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad\\\"\"\nmsgstr \"\\\"leftpad\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"libleftpad_test\\\"\"\nmsgstr \"\\\"libleftpad_test\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"leftpad_test\\\"\"\nmsgstr \"\\\"leftpad_test\\\"\"\n\n#: src/android/testing.md src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"general-tests\\\"\"\nmsgstr \"\\\"general-tests\\\"\"\n\n#: src/android/testing.md\nmsgid \"_testing/src/lib.rs_:\"\nmsgstr \"_testing/src/lib.rs_:\"\n\n#: src/android/testing.md\nmsgid \"//! Left-padding library.\\n\"\nmsgstr \"//! Left-padding library.\\n\"\n\n#: src/android/testing.md\nmsgid \"/// Left-pad `s` to `width`.\\n\"\nmsgstr \"/// Left-pad `s` to `width`.\\n\"\n\n#: src/android/testing.md\nmsgid \"\\\"{s:>width$}\\\"\"\nmsgstr \"\\\"{s:>width$}\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"  foo\\\"\"\nmsgstr \"\\\"  foo\\\"\"\n\n#: src/android/testing.md\nmsgid \"\\\"foobar\\\"\"\nmsgstr \"\\\"foobar\\\"\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"You can now run the test with\"\nmsgstr \"您現在可以執行測試：\"\n\n#: src/android/testing.md\n#, fuzzy\nmsgid \"The output looks like this:\"\nmsgstr \"整體方法大致如下：\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\nmsgstr \"\"\n\"```text\\n\"\n\"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\\n\"\n\"INFO: 3 processes: 2 internal, 1 linux-sandbox.\\n\"\n\"INFO: Build completed successfully, 3 total actions\\n\"\n\"//comprehensive-rust-android/testing:libleftpad_test_host            PASSED \"\n\"in 2.3s\\n\"\n\"    PASSED  libleftpad_test.tests::long_string (0.0s)\\n\"\n\"    PASSED  libleftpad_test.tests::short_string (0.0s)\\n\"\n\"Test cases: finished with 2 passing and 0 failing out of 2 test cases\\n\"\n\"```\"\n\n#: src/android/testing.md\nmsgid \"\"\n\"Notice how you only mention the root of the library crate. Tests are found \"\n\"recursively in nested modules.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\n#, fuzzy\nmsgid \"\"\n\"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test \"\n\"assertions using _matchers_:\"\nmsgstr \"\"\n\"[googletest](https://docs.rs/googletest)：這是全面性的測試斷言程式庫，沿用了 \"\n\"GoogleTest (適用於 C++) 的傳統運作方式。\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"baz\\\"\"\nmsgstr \"\\\"baz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\\\"xyz\\\"\"\nmsgstr \"\\\"xyz\\\"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"If we change the last element to `\\\"!\\\"`, the test fails with a structured \"\n\"error message pin-pointing the error:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"GoogleTest is not part of the Rust Playground, so you need to run this \"\n\"example in a local environment. Use `cargo add googletest` to quickly add it \"\n\"to an existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The `use googletest::prelude::*;` line imports a number of [commonly used \"\n\"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index.\"\n\"html).\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"This just scratches the surface, there are many builtin matchers.\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"A particularly nice feature is that mismatches in multi-line strings are \"\n\"shown as a diff:\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"                 Rust's strong typing guides the way,\\\\n\\\\\\n\"\n\"                 Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"\\\"Memory safety found,\\\\n\\\\\\n\"\n\"            Rust's silly humor guides the way,\\\\n\\\\\\n\"\n\"            Secure code you'll write.\\\"\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"shows a color-coded diff (colors not shown here):\"\nmsgstr \"\"\n\n#: src/android/testing/googletest.md\nmsgid \"\"\n\"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/\"\n\"googletest/).\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. \"\n\"You need to refactor your code to use traits, which you can then quickly \"\n\"mock:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is the recommended mocking library in Android (AOSP). There are \"\n\"other [mocking libraries available on crates.io](https://crates.io/keywords/\"\n\"mock), in particular in the area of mocking HTTP services. The other mocking \"\n\"libraries work in a similar fashion as Mockall, meaning that they make it \"\n\"easy to get a mock implementation of a given trait.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Note that mocking is somewhat _controversial_: mocks allow you to completely \"\n\"isolate a test from its dependencies. The immediate result is faster and \"\n\"more stable test execution. On the other hand, the mocks can be configured \"\n\"wrongly and return output different from what the real dependencies would do.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"If at all possible, it is recommended that you use the real dependencies. As \"\n\"an example, many databases allow you to configure an in-memory backend. This \"\n\"means that you get the correct behavior in your tests, plus they are fast \"\n\"and will automatically clean up after themselves.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Similarly, many web frameworks allow you to start an in-process server which \"\n\"binds to a random port on `localhost`. Always prefer this over mocking away \"\n\"the framework since it helps you test your code in the real environment.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall is not part of the Rust Playground, so you need to run this example \"\n\"in a local environment. Use `cargo add mockall` to quickly add Mockall to an \"\n\"existing Cargo project.\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"Mockall has a lot more functionality. In particular, you can set up \"\n\"expectations which depend on the arguments passed. Here we use this to mock \"\n\"a cat which becomes hungry 3 hours after the last time it was fed:\"\nmsgstr \"\"\n\n#: src/android/testing/mocking.md\nmsgid \"\"\n\"You can use `.times(n)` to limit the number of times a mock method can be \"\n\"called to `n` --- the mock will automatically panic when dropped if this \"\n\"isn't satisfied.\"\nmsgstr \"\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"You should use the `log` crate to automatically log to `logcat` (on-device) \"\n\"or `stdout` (on-host):\"\nmsgstr \"\"\n\"您應使用 `log` Crate，自動將記錄印出到 `logcat` (裝置端) 或 `stdout` (主機\"\n\"端)：\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/Android.bp_:\"\nmsgstr \"_hello_rust_logs/Android.bp_：\"\n\n#: src/android/logging.md\nmsgid \"\\\"hello_rust_logs\\\"\"\nmsgstr \"\\\"hello_rust_logs\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblog_rust\\\"\"\nmsgstr \"\\\"liblog_rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"liblogger\\\"\"\nmsgstr \"\\\"liblogger\\\"\"\n\n#: src/android/logging.md\nmsgid \"_hello_rust_logs/src/main.rs_:\"\nmsgstr \"_hello_rust_logs/src/main.rs_：\"\n\n#: src/android/logging.md\nmsgid \"//! Rust logging demo.\\n\"\nmsgstr \"//! Rust logging demo.\\n\"\n\n#: src/android/logging.md\nmsgid \"/// Logs a greeting.\\n\"\nmsgstr \"/// Logs a greeting.\\n\"\n\n#: src/android/logging.md\nmsgid \"\\\"rust\\\"\"\nmsgstr \"\\\"rust\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Starting program.\\\"\"\nmsgstr \"\\\"Starting program.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Things are going fine.\\\"\"\nmsgstr \"\\\"Things are going fine.\\\"\"\n\n#: src/android/logging.md\nmsgid \"\\\"Something went wrong!\\\"\"\nmsgstr \"\\\"Something went wrong!\\\"\"\n\n#: src/android/logging.md src/android/interoperability/with-c/bindgen.md\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Build, push, and run the binary on your device:\"\nmsgstr \"建構、推送及在裝置上執行二進位檔：\"\n\n#: src/android/logging.md\nmsgid \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m hello_rust_logs\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/hello_rust_logs\\n\"\n\"```\"\n\n#: src/android/logging.md\nmsgid \"The logs show up in `adb logcat`:\"\nmsgstr \"記錄會顯示在 `adb logcat` 中：\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"Rust has excellent support for interoperability with other languages. This \"\n\"means that you can:\"\nmsgstr \"Rust 能充分支援與其他程式語言互通。也就是說，您可以：\"\n\n#: src/android/interoperability.md\nmsgid \"Call Rust functions from other languages.\"\nmsgstr \"透過其他語言呼叫 Rust 函式。\"\n\n#: src/android/interoperability.md\nmsgid \"Call functions written in other languages from Rust.\"\nmsgstr \"透過 Rust 呼叫以其他語言編寫的函式。\"\n\n#: src/android/interoperability.md\nmsgid \"\"\n\"When you call functions in a foreign language we say that you're using a \"\n\"_foreign function interface_, also known as FFI.\"\nmsgstr \"\"\n\"當您以其他語言呼叫函式時，我們稱之為使用「_外部函式介面_」，亦稱 FFI \"\n\"(Foreign Function Interface)。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"Interoperability with C\"\nmsgstr \"與 C 的互通性\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"Rust has full support for linking object files with a C calling convention. \"\n\"Similarly, you can export Rust functions and call them from C.\"\nmsgstr \"\"\n\"Rust 能完整支援以 C 語言的呼叫慣例來連結物件檔案。同樣地，您可以匯出 Rust 函\"\n\"式，然後透過 C 語言呼叫這些函式。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"You can do it by hand if you want:\"\nmsgstr \"您可以視需要手動完成操作：\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\\\"{x}, {abs_x}\\\"\"\nmsgstr \"\\\"{x}, {abs_x}\\\"\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/\"\n\"safe-ffi-wrapper.md).\"\nmsgstr \"\"\n\"我們已在[「安全的 FFI 包裝函式」練習](../../exercises/day-3/safe-ffi-wrapper.\"\n\"md)中看過此例。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"\"\n\"This assumes full knowledge of the target platform. Not recommended for \"\n\"production.\"\nmsgstr \"執行這項操作的前提是要充分瞭解目標平台。此法不建議用於正式環境。\"\n\n#: src/android/interoperability/with-c.md\nmsgid \"We will look at better options next.\"\nmsgstr \"我們接下來會討論更好的選項。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Using Bindgen\"\nmsgstr \"使用 Bindgen\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) \"\n\"tool can auto-generate bindings from a C header file.\"\nmsgstr \"\"\n\"[bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) 工具可\"\n\"從 C 標頭檔案自動產生繫結。\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"First create a small C library:\"\nmsgstr \"首先，請建立小型 C 程式庫：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.h_:\"\nmsgstr \"__interoperability/bindgen/libbirthday.h：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday.c_:\"\nmsgstr \"__interoperability/bindgen/libbirthday.c：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"<stdio.h>\"\nmsgstr \"<stdio.h>\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.h\\\"\"\nmsgstr \"\\\"libbirthday.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"+--------------\\\\n\\\"\"\nmsgstr \"\\\"+--------------\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Happy Birthday %s!\\\\n\\\"\"\nmsgstr \"\\\"| Happy Birthday %s!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\nmsgstr \"\\\"| Congratulations with the %i years!\\\\n\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Add this to your `Android.bp` file:\"\nmsgstr \"請將以下內容加入 `Android.bp` 檔案：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/Android.bp_:\"\nmsgstr \"__interoperability/bindgen/Android.bp：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday\\\"\"\nmsgstr \"\\\"libbirthday\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday.c\\\"\"\nmsgstr \"\\\"libbirthday.c\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"Create a wrapper header file for the library (not strictly needed in this \"\n\"example):\"\nmsgstr \"為程式庫建立包裝函式標頭檔案 (在此範例中不一定需要)：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/libbirthday_wrapper.h_:\"\nmsgstr \"__interoperability/bindgen/libbirthday_wrapper.h：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"You can now auto-generate the bindings:\"\nmsgstr \"您現在可以自動產生繫結：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\n#, fuzzy\nmsgid \"\\\"birthday_bindgen\\\"\"\nmsgstr \"\\\"libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_wrapper.h\\\"\"\nmsgstr \"\\\"libbirthday_wrapper.h\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"bindings\\\"\"\nmsgstr \"\\\"bindings\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can use the bindings in our Rust program:\"\nmsgstr \"最後，我們可以在 Rust 程式中使用繫結：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"print_birthday_card\\\"\"\nmsgstr \"\\\"print_birthday_card\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"main.rs\\\"\"\nmsgstr \"\\\"main.rs\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"_interoperability/bindgen/main.rs_:\"\nmsgstr \"__interoperability/bindgen/main.rs：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"//! Bindgen demo.\\n\"\nmsgstr \"//! Bindgen demo.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\nmsgstr \"// SAFETY: `print_card` is safe to call with a valid `card` pointer.\\n\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m print_birthday_card\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/print_birthday_card\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"Finally, we can run auto-generated tests to ensure the bindings work:\"\nmsgstr \"最後，我們可以執行自動產生的測試，確保繫結正常運作：\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"libbirthday_bindgen_test\\\"\"\nmsgstr \"\\\"libbirthday_bindgen_test\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\":libbirthday_bindgen\\\"\"\nmsgstr \"\\\":libbirthday_bindgen\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"\\\"none\\\"\"\nmsgstr \"\\\"none\\\"\"\n\n#: src/android/interoperability/with-c/bindgen.md\nmsgid \"// Generated file, skip linting\\n\"\nmsgstr \"// Generated file, skip linting\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Calling Rust\"\nmsgstr \"呼叫 Rust\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"Exporting Rust functions and types to C is easy:\"\nmsgstr \"您可以輕鬆將 Rust 函式和型別匯出至 C：\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.rs_\"\nmsgstr \"__interoperability/rust/libanalyze/analyze.rs\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"//! Rust FFI demo.\\n\"\nmsgstr \"//! Rust FFI demo.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"/// Analyze the numbers.\\n\"\nmsgstr \"/// Analyze the numbers.\\n\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"x ({x}) is smallest!\\\"\"\nmsgstr \"\\\"x ({x}) is smallest!\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\nmsgstr \"\\\"y ({y}) is probably larger than x ({x})\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/analyze.h_\"\nmsgstr \"__interoperability/rust/libanalyze/analyze.h\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/libanalyze/Android.bp_\"\nmsgstr \"__interoperability/rust/libanalyze/Android.bp\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"libanalyze_ffi\\\"\"\nmsgstr \"\\\"libanalyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_ffi\\\"\"\nmsgstr \"\\\"analyze_ffi\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.rs\\\"\"\nmsgstr \"\\\"analyze.rs\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"We can now call this from a C binary:\"\nmsgstr \"我們現在可以從 C 二進位檔呼叫此介面：\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/main.c_\"\nmsgstr \"__interoperability/rust/analyze/main.c\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze.h\\\"\"\nmsgstr \"\\\"analyze.h\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"_interoperability/rust/analyze/Android.bp_\"\nmsgstr \"__interoperability/rust/analyze/Android.bp\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"analyze_numbers\\\"\"\nmsgstr \"\\\"analyze_numbers\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\\\"main.c\\\"\"\nmsgstr \"\\\"main.c\\\"\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\nmsgstr \"\"\n\"```shell\\n\"\n\"m analyze_numbers\\n\"\n\"adb push \\\"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers\\\" /data/local/\"\n\"tmp\\n\"\n\"adb shell /data/local/tmp/analyze_numbers\\n\"\n\"```\"\n\n#: src/android/interoperability/with-c/rust.md\nmsgid \"\"\n\"`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol \"\n\"will just be the name of the function. You can also use `#[export_name = \"\n\"\\\"some_name\\\"]` to specify whatever name you want.\"\nmsgstr \"\"\n\"`#[no_mangle]` 會停用 Rust 的一般名稱改編功能，因此匯出的符號將只是函式名稱。\"\n\"您也可以使用 `#[export_name = \\\"some_name\\\"]` 指定任何名稱。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"\"\n\"The [CXX crate](https://cxx.rs/) makes it possible to do safe \"\n\"interoperability between Rust and C++.\"\nmsgstr \"\"\n\"透過 [CXX Crate](https://cxx.rs/)，您可以在 Rust 和 C++ 之間實現安全的互通\"\n\"性。\"\n\n#: src/android/interoperability/cpp.md\nmsgid \"The overall approach looks like this:\"\nmsgstr \"整體方法大致如下：\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"CXX relies on a description of the function signatures that will be exposed \"\n\"from each language to the other. You provide this description using extern \"\n\"blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro.\"\nmsgstr \"\"\n\"CXX 的運作需要依照函式的型別敘述。這些敘述定義了從一種語言公開至另一種語言的\"\n\"介面。您會在具有 `#[cxx::bridge]` 屬性巨集註解的 Rust 模組中，使用外部區塊提\"\n\"供這項說明。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\\\"org::blobstore\\\"\"\nmsgstr \"\\\"org::blobstore\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"// Shared structs with fields visible to both languages.\\n\"\nmsgstr \"// Shared structs with fields visible to both languages.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"// Rust types and signatures exposed to C++.\\n\"\nmsgstr \"// Rust types and signatures exposed to C++.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/rust-bridge.md\n#: src/android/interoperability/cpp/generated-cpp.md\n#: src/android/interoperability/cpp/rust-result.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"Rust\\\"\"\nmsgstr \"\\\"Rust\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"// C++ types and signatures exposed to Rust.\\n\"\nmsgstr \"// C++ types and signatures exposed to Rust.\\n\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\n#: src/android/interoperability/cpp/cpp-exception.md\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"C++\\\"\"\nmsgstr \"\\\"C++\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"include/blobstore.h\\\"\"\nmsgstr \"\\\"include/blobstore.h\\\"\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"The bridge is generally declared in an `ffi` module within your crate.\"\nmsgstr \"橋接器通常是在 Crate 中的 `ffi` 模組中宣告。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"From the declarations made in the bridge module, CXX will generate matching \"\n\"Rust and C++ type/function definitions in order to expose those items to \"\n\"both languages.\"\nmsgstr \"\"\n\"透過在橋接模組中建立宣告，CXX 會產生相符的 Rust 和 C++ 型別/函式定義，以便向\"\n\"這兩種語言公開這些項目。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"\"\n\"To view the generated Rust code, use [cargo-expand](https://github.com/\"\n\"dtolnay/cargo-expand) to view the expanded proc macro. For most of the \"\n\"examples you would use `cargo expand ::ffi` to expand just the `ffi` module \"\n\"(though this doesn't apply for Android projects).\"\nmsgstr \"\"\n\"如要查看產生的 Rust 程式碼，請使用 [cargo-expand](https://github.com/dtolnay/\"\n\"cargo-expand) 檢視已展開的程序巨集。在大多數範例中，您都會使用 `cargo \"\n\"expand ::ffi`，這樣就能只展開 `ffi` 模組 (但這不適用於 Android 專案)。\"\n\n#: src/android/interoperability/cpp/bridge.md\nmsgid \"To view the generated C++ code, look in `target/cxxbridge`.\"\nmsgstr \"如要檢視產生的 C++ 程式碼，請查看 `target/cxxbridge`。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"Rust Bridge Declarations\"\nmsgstr \"Rust 橋接器宣告\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Opaque type\\n\"\nmsgstr \"// Opaque type\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Method on `MyType`\\n\"\nmsgstr \"// Method on `MyType`\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"// Free function\\n\"\nmsgstr \"// Free function\\n\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"Items declared in the `extern \\\"Rust\\\"` reference items that are in scope in \"\n\"the parent module.\"\nmsgstr \"在 `extern \\\"Rust\\\"` 參照項目中宣告的項目皆位於上層模組的範圍。\"\n\n#: src/android/interoperability/cpp/rust-bridge.md\nmsgid \"\"\n\"The CXX code generator uses your `extern \\\"Rust\\\"` section(s) to produce a C+\"\n\"+ header file containing the corresponding C++ declarations. The generated \"\n\"header has the same path as the Rust source file containing the bridge, \"\n\"except with a .rs.h file extension.\"\nmsgstr \"\"\n\"CXX 程式碼產生器會使用您的 `extern \\\"Rust\\\"` 區段，產生含有相對應 C++ 宣告的 \"\n\"C++ 標頭檔案。產生的標頭與包含橋接器的 Rust 來源檔案具有相同路徑，但副檔名\"\n\"為 .rs.h。\"\n\n#: src/android/interoperability/cpp/generated-cpp.md\nmsgid \"Results in (roughly) the following C++:\"\nmsgstr \"(大致) 產生下列 C++：\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"C++ Bridge Declarations\"\nmsgstr \"C++ 橋接器宣告\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"Results in (roughly) the following Rust:\"\nmsgstr \"(大致) 產生下列 Rust：\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$new_blobstore_client\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\nmsgstr \"\\\"org$blobstore$cxxbridge1$BlobstoreClient$put\\\"\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"The programmer does not need to promise that the signatures they have typed \"\n\"in are accurate. CXX performs static assertions that the signatures exactly \"\n\"correspond with what is declared in C++.\"\nmsgstr \"\"\n\"程式設計師不需要保證已輸入的簽章正確無誤。CXX 會執行靜態斷言，保證簽章與 C++ \"\n\"中宣告的內容完全相符。\"\n\n#: src/android/interoperability/cpp/cpp-bridge.md\nmsgid \"\"\n\"`unsafe extern` blocks allow you to declare C++ functions that are safe to \"\n\"call from Rust.\"\nmsgstr \"`unsafe extern` 區塊可用來宣告能從 Rust 安全呼叫的 C++ 函式。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"// A=1, J=11, Q=12, K=13\\n\"\nmsgstr \"// A=1, J=11, Q=12, K=13\\n\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"Only C-like (unit) enums are supported.\"\nmsgstr \"只支援與 C 類似的 (單元) 列舉。\"\n\n#: src/android/interoperability/cpp/shared-types.md\nmsgid \"\"\n\"A limited number of traits are supported for `#[derive()]` on shared types. \"\n\"Corresponding functionality is also generated for the C++ code, e.g. if you \"\n\"derive `Hash` also generates an implementation of `std::hash` for the \"\n\"corresponding C++ type.\"\nmsgstr \"\"\n\"共用型別上的 `#[derive()]` 只支援部分特徵。系統也會為 C++ 程式碼產生相對應的\"\n\"功能。舉例來說，如果衍生出 `Hash`，也會為相應的 C++ 型別產生 `std::hash` 的實\"\n\"作項目。\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated Rust:\"\nmsgstr \"產生的 Rust：\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"Generated C++:\"\nmsgstr \"產生的 C++：\"\n\n#: src/android/interoperability/cpp/shared-enums.md\nmsgid \"\"\n\"On the Rust side, the code generated for shared enums is actually a struct \"\n\"wrapping a numeric value. This is because it is not UB in C++ for an enum \"\n\"class to hold a value different from all of the listed variants, and our \"\n\"Rust representation needs to have the same behavior.\"\nmsgstr \"\"\n\"在 Rust 端，為共用列舉產生的程式碼其實是包裝數值的結構體。這是因為在 C++ 中，\"\n\"列舉類別保留與所有所列變數不同的值並不屬於 UB，而 Rust 表示法需具有相同行為。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"fallible1 requires depth > 0\\\"\"\nmsgstr \"\\\"fallible1 requires depth > 0\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\\\"Success!\\\"\"\nmsgstr \"\\\"Success!\\\"\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"Rust functions that return `Result` are translated to exceptions on the C++ \"\n\"side.\"\nmsgstr \"傳回 `Result` 的 Rust 函式會轉譯為 C++ 端的例外狀況。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"The exception thrown will always be of type `rust::Error`, which primarily \"\n\"exposes a way to get the error message string. The error message will come \"\n\"from the error type's `Display` impl.\"\nmsgstr \"\"\n\"擲回的例外狀況一律屬於 `rust::Error` 類型，這主要用來公開取得錯誤訊息字串的方\"\n\"法。錯誤訊息會來自錯誤類型的 `Display` 實作項目。\"\n\n#: src/android/interoperability/cpp/rust-result.md\nmsgid \"\"\n\"A panic unwinding from Rust to C++ will always cause the process to \"\n\"immediately terminate.\"\nmsgstr \"從 Rust 恐慌解開至 C++ 一律會導致程序立即終止。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"example/include/example.h\\\"\"\nmsgstr \"\\\"example/include/example.h\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\\\"Error: {}\\\"\"\nmsgstr \"\\\"Error: {}\\\"\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"C++ functions declared to return a `Result` will catch any thrown exception \"\n\"on the C++ side and return it as an `Err` value to the calling Rust function.\"\nmsgstr \"\"\n\"所宣告用來傳回 `Result` 的 C++ 函式會擷取 C++ 端的任何擲回例外狀況，並將其當\"\n\"做 `Err` 值傳回至發出呼叫的 Rust 函式。\"\n\n#: src/android/interoperability/cpp/cpp-exception.md\nmsgid \"\"\n\"If an exception is thrown from an extern \\\"C++\\\" function that is not \"\n\"declared by the CXX bridge to return `Result`, the program calls C++'s `std::\"\n\"terminate`. The behavior is equivalent to the same exception being thrown \"\n\"through a `noexcept` C++ function.\"\nmsgstr \"\"\n\"假使例外狀況是從 CXX 橋接器未宣告的外部「C++」函式擲回，藉此傳回 `Result`，則\"\n\"程式會呼叫 C++ 的 `std::terminate`。此行為等同於透過 `noexcept` C++ 函式擲回\"\n\"的相同例外狀況。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\n#, fuzzy\nmsgid \"C++ Type\"\nmsgstr \"C++ 範例\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::String`\"\nmsgstr \"`rust::String`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&str`\"\nmsgstr \"`&str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Str`\"\nmsgstr \"`rust::Str`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxString`\"\nmsgstr \"`CxxString`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::string`\"\nmsgstr \"`std::string`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`&[T]`/`&mut [T]`\"\nmsgstr \"`&[T]`/`&mut [T]`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Slice`\"\nmsgstr \"`rust::Slice`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Box<T>`\"\nmsgstr \"`rust::Box<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`UniquePtr<T>`\"\nmsgstr \"`UniquePtr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::unique_ptr<T>`\"\nmsgstr \"`std::unique_ptr<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`rust::Vec<T>`\"\nmsgstr \"`rust::Vec<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`CxxVector<T>`\"\nmsgstr \"`CxxVector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"`std::vector<T>`\"\nmsgstr \"`std::vector<T>`\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"These types can be used in the fields of shared structs and the arguments \"\n\"and returns of extern functions.\"\nmsgstr \"這些型別可用於共用結構體的欄位，以及外部函式的引數和回傳內容。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"Note that Rust's `String` does not map directly to `std::string`. There are \"\n\"a few reasons for this:\"\nmsgstr \"\"\n\"請注意，Rust 的 `String` 不會直接對應至 `std::string`。以下列舉幾個原因：\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` does not uphold the UTF-8 invariant that `String` requires.\"\nmsgstr \"`std::string` 不會維護 `String` 所需的 UTF-8 不變體。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"The two types have different layouts in memory and so can't be passed \"\n\"directly between languages.\"\nmsgstr \"這兩種型別的內部記憶體結構不同，因此無法在語言之間直接傳遞。\"\n\n#: src/android/interoperability/cpp/type-mapping.md\nmsgid \"\"\n\"`std::string` requires move constructors that don't match Rust's move \"\n\"semantics, so a `std::string` can't be passed by value to Rust.\"\nmsgstr \"\"\n\"`std::string` 需要的移動建構函式與 Rust 的移動語意不相符，因此 `std::string` \"\n\"無法透過值傳遞至 Rust。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"Building in Android\"\nmsgstr \"在 Android 中建構\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Create a `cc_library_static` to build the C++ library, including the CXX \"\n\"generated header and source file.\"\nmsgstr \"\"\n\"建立 `cc_library_static` 來建構 C++ 程式庫，包括 CXX 產生的標頭檔案和來源檔\"\n\"案。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx_test_cpp\\\"\"\nmsgstr \"\\\"libcxx_test_cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx_test.cpp\\\"\"\nmsgstr \"\\\"cxx_test.cpp\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\\\"cxx-bridge-header\\\"\"\nmsgstr \"\\\"cxx-bridge-header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_header\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_header\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"libcxx_test_bridge_code\\\"\"\nmsgstr \"\\\"libcxx_test_bridge_code\\\"\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Point out that `libcxx_test_bridge_header` and `libcxx_test_bridge_code` are \"\n\"the dependencies for the CXX-generated C++ bindings. We'll show how these \"\n\"are setup on the next slide.\"\nmsgstr \"\"\n\"指出 `libcxx_test_bridge_header 和 `libcxx_test_bridge_code` 是 CXX 產生的 C+\"\n\"+ 繫結依附元件。下一張投影片將說明相關設定方法。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Note that you also need to depend on the `cxx-bridge-header` library in \"\n\"order to pull in common CXX definitions.\"\nmsgstr \"\"\n\"請注意，您也需要依賴 `cxx-bridge-header` 程式庫，才能提取常見的 CXX 定義。\"\n\n#: src/android/interoperability/cpp/android-build-cpp.md\nmsgid \"\"\n\"Full docs for using CXX in Android can be found in [the Android docs]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx). You may want to share \"\n\"that link with the class so that students know where they can find these \"\n\"instructions again in the future.\"\nmsgstr \"\"\n\"如需介紹如何在 Android 中使用 CXX 的完整文件，請參閱 [Android 說明文件]\"\n\"(https://source.android.com/docs/setup/build/rust/building-rust-modules/\"\n\"android-rust-patterns#rust-cpp-interop-using-cxx)。您可以與全班分享該連結，這\"\n\"樣學生就知道以後能在哪裡找到這些說明。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"Create two genrules: One to generate the CXX header, and one to generate the \"\n\"CXX source file. These are then used as inputs to the `cc_library_static`.\"\nmsgstr \"\"\n\"建立兩項 genrule，分別用來產生 CXX 標頭和 CXX 來源檔案。這些項目之後會用做 \"\n\"`cc_library_static` 的輸入內容。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\nmsgstr \"\"\n\"// Generate a C++ header containing the C++ bindings\\n\"\n\"// to the Rust exported functions in lib.rs.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"cxxbridge\\\"\"\nmsgstr \"\\\"cxxbridge\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) --header > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"lib.rs\\\"\"\nmsgstr \"\\\"lib.rs\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.h\\\"\"\nmsgstr \"\\\"lib.rs.h\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"// Generate the C++ code that Rust calls into.\\n\"\nmsgstr \"// Generate the C++ code that Rust calls into.\\n\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\nmsgstr \"\\\"$(location cxxbridge) $(in) > $(out)\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\\\"lib.rs.cc\\\"\"\nmsgstr \"\\\"lib.rs.cc\\\"\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"The `cxxbridge` tool is a standalone tool that generates the C++ side of the \"\n\"bridge module. It is included in Android and available as a Soong tool.\"\nmsgstr \"\"\n\"`cxxbridge` 是用來產生 C++ 端橋接模組的獨立工具，屬於 Android 的一部分，並以 \"\n\"Soong 工具的形式提供。\"\n\n#: src/android/interoperability/cpp/android-cpp-genrules.md\nmsgid \"\"\n\"By convention, if your Rust source file is `lib.rs` your header file will be \"\n\"named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming \"\n\"convention isn't enforced, though.\"\nmsgstr \"\"\n\"按照慣例，如果 Rust 來源檔案是 `lib.rs`，標頭檔案會命名為 `lib.rs.h`，來源檔\"\n\"案的名稱則是 `lib.rs.cc`。不過，系統不會強制執行這項命名慣例。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\"\n\"Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`.\"\nmsgstr \"建立依附於 `libcxx` 和 `cc_library_static` 的 rust_binary`。\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"cxx_test\\\"\"\nmsgstr \"\\\"cxx_test\\\"\"\n\n#: src/android/interoperability/cpp/android-build-rust.md\nmsgid \"\\\"libcxx\\\"\"\nmsgstr \"\\\"libcxx\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Interoperability with Java\"\nmsgstr \"與 Java 的互通性\"\n\n#: src/android/interoperability/java.md\nmsgid \"\"\n\"Java can load shared objects via [Java Native Interface (JNI)](https://en.\"\n\"wikipedia.org/wiki/Java_Native_Interface). The [`jni` crate](https://docs.rs/\"\n\"jni/) allows you to create a compatible library.\"\nmsgstr \"\"\n\"Java 可透過 [Java 原生介面 (JNI)](https://en.wikipedia.org/wiki/\"\n\"Java_Native_Interface) 載入共用物件。[`jni` Crate](https://docs.rs/jni/) 可用\"\n\"來建立相容的程式庫。\"\n\n#: src/android/interoperability/java.md\nmsgid \"First, we create a Rust function to export to Java:\"\nmsgstr \"首先，要建立用來匯出至 Java 的 Rust 函式：\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/src/lib.rs_:\"\nmsgstr \"__interoperability/java/src/lib.rs：\"\n\n#: src/android/interoperability/java.md\nmsgid \"//! Rust <-> Java FFI demo.\\n\"\nmsgstr \"//! Rust <-> Java FFI demo.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"/// HelloWorld::hello method implementation.\\n\"\nmsgstr \"/// HelloWorld::hello method implementation.\\n\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"system\\\"\"\nmsgstr \"\\\"system\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"Hello, {input}!\\\"\"\nmsgstr \"\\\"Hello, {input}!\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/Android.bp_:\"\nmsgstr \"__interoperability/java/Android.bp：\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libhello_jni\\\"\"\nmsgstr \"\\\"libhello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"hello_jni\\\"\"\nmsgstr \"\\\"hello_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"libjni\\\"\"\nmsgstr \"\\\"libjni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"We then call this function from Java:\"\nmsgstr \"接著，我們會從 Java 呼叫這個函式：\"\n\n#: src/android/interoperability/java.md\nmsgid \"_interoperability/java/HelloWorld.java_:\"\nmsgstr \"__interoperability/java/HelloWorld.java：\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"helloworld_jni\\\"\"\nmsgstr \"\\\"helloworld_jni\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld.java\\\"\"\nmsgstr \"\\\"HelloWorld.java\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"\\\"HelloWorld\\\"\"\nmsgstr \"\\\"HelloWorld\\\"\"\n\n#: src/android/interoperability/java.md\nmsgid \"Finally, you can build, sync, and run the binary:\"\nmsgstr \"最後，您可以建構、同步處理及執行二進位檔：\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"This is a group exercise: We will look at one of the projects you work with \"\n\"and try to integrate some Rust into it. Some suggestions:\"\nmsgstr \"\"\n\"這是小組練習：我們會查看您的其中一項專案，嘗試將一些 Rust 整合至該專案。建議\"\n\"事項：\"\n\n#: src/exercises/android/morning.md\nmsgid \"Call your AIDL service with a client written in Rust.\"\nmsgstr \"使用以 Rust 編寫的用戶端呼叫 AIDL 服務。\"\n\n#: src/exercises/android/morning.md\nmsgid \"Move a function from your project to Rust and call it.\"\nmsgstr \"將函式從專案移至 Rust，並呼叫該函式。\"\n\n#: src/exercises/android/morning.md\nmsgid \"\"\n\"No solution is provided here since this is open-ended: it relies on someone \"\n\"in the class having a piece of code which you can turn in to Rust on the fly.\"\nmsgstr \"\"\n\"這裡未提供解決方案，因為這是開放式練習：您需要使用班上同學的程式碼當場轉換為 \"\n\"Rust。\"\n\n#: src/chromium.md\nmsgid \"Welcome to Rust in Chromium\"\nmsgstr \"歡迎瞭解 Chromium 中的 Rust\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Rust is supported for third-party libraries in Chromium, with first-party \"\n\"glue code to connect between Rust and existing Chromium C++ code.\"\nmsgstr \"\"\n\"Chromium 中的第三方程式庫支援 Rust，且有第一方黏合程式碼可連結 Rust 和現有的 \"\n\"Chromium C++ 程式碼。\"\n\n#: src/chromium.md\nmsgid \"\"\n\"Today, we'll call into Rust to do something silly with strings. If you've \"\n\"got a corner of the code where you're displaying a UTF8 string to the user, \"\n\"feel free to follow this recipe in your part of the codebase instead of the \"\n\"exact part we talk about.\"\nmsgstr \"\"\n\"今天我們會在 Rust 中用字串做些小事。如果您有一小部份的程式碼要向使用者顯示 \"\n\"UTF8 字串，您可以在自己的程式碼集內採用這個方案，不必採用我們所介紹的該部分程\"\n\"式碼集。\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"Make sure you can build and run Chromium. Any platform and set of build \"\n\"flags is OK, so long as your code is relatively recent (commit position \"\n\"1223636 onwards, corresponding to November 2023):\"\nmsgstr \"\"\n\"請確認您可以建構並執行 Chromium。任何平台和建構標記組合都可以，只要程式碼相對\"\n\"較新即可 (提交位置在 1223636 之後，日期對應到 2023 年 11 月)：\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"(A component, debug build is recommended for quickest iteration time. This \"\n\"is the default!)\"\nmsgstr \"(如要達到最快的疊代速度，建議使用元件式及偵錯版本。這是預設情形！)\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-\"\n\"the-code/) if you aren't already at that point. Be warned: setting up to \"\n\"build Chromium takes time.\"\nmsgstr \"\"\n\"如果尚未這麼做，請查看[建構 Chromium 的方法](https://www.chromium.org/\"\n\"developers/how-tos/get-the-code/)。提醒您，設定 Chromium 建構作業需要一段時\"\n\"間。\"\n\n#: src/chromium/setup.md\nmsgid \"It's also recommended that you have Visual Studio code installed.\"\nmsgstr \"此外，也建議您安裝 Visual Studio Code。\"\n\n#: src/chromium/setup.md\nmsgid \"About the exercises\"\nmsgstr \"關於練習\"\n\n#: src/chromium/setup.md\nmsgid \"\"\n\"This part of the course has a series of exercises which build on each other. \"\n\"We'll be doing them spread throughout the course instead of just at the end. \"\n\"If you don't have time to complete a certain part, don't worry: you can \"\n\"catch up in the next slot.\"\nmsgstr \"\"\n\"這部分的課程包含一系列連貫的練習。我們會在課程中穿插練習，而不是放到最後。如\"\n\"果沒時間完成某個部分也不必擔心，下次補上即可。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"The Rust community typically uses `cargo` and libraries from [crates.io]\"\n\"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated \"\n\"set of dependencies.\"\nmsgstr \"\"\n\"Rust 社群一般使用 `cargo` 和 [crates.io](https://crates.io/) 的程式庫。\"\n\"Chromium 是以 `gn` 和 `ninja` 技術和一組精選的依附元件建構而成。\"\n\n#: src/chromium/cargo.md\nmsgid \"When writing code in Rust, your choices are:\"\nmsgstr \"在 Rust 中編寫程式碼時，您有以下選擇：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `gn` and `ninja` with the help of the templates from `//build/rust/*.\"\n\"gni` (e.g. `rust_static_library` that we'll meet later). This uses \"\n\"Chromium's audited toolchain and crates.\"\nmsgstr \"\"\n\"藉助 `//build/rust/*.gni` 中的範本 (例如 `rust_static_library`，稍後會介紹)，\"\n\"使用 `gn` 和 `ninja`。這麼做會使用 Chromium 經稽核的工具鏈和 Crate。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, but [restrict yourself to Chromium's audited toolchain and \"\n\"crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/\"\n\"docs/rust.md#Using-cargo)\"\nmsgstr \"\"\n\"使用 `cargo`，但[限制自己使用 Chromium 經稽核的工具鏈和 Crate](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.md#Using-\"\n\"cargo)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates \"\n\"downloaded from the internet](https://crates.io/)\"\nmsgstr \"\"\n\"使用 `cargo`，信任[工具鏈](https://rustup.rs/)和/或[從網際網路下載的 Crate]\"\n\"(https://crates.io/)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"From here on we'll be focusing on `gn` and `ninja`, because this is how Rust \"\n\"code can be built into the Chromium browser. At the same time, Cargo is an \"\n\"important part of the Rust ecosystem and you should keep it in your toolbox.\"\nmsgstr \"\"\n\"接下來的重點將放在 `gn` 和 `ninja`，因為這就是將 Rust 程式碼建構至 Chromium \"\n\"瀏覽器中的方式。同時，Cargo 是 Rust 生態系統中重要的一環，因此您應該學會使用\"\n\"這項工具。\"\n\n#: src/chromium/cargo.md\n#, fuzzy\nmsgid \"Mini exercise\"\nmsgstr \"練習\"\n\n#: src/chromium/cargo.md\nmsgid \"Split into small groups and:\"\nmsgstr \"請分成小組，按照下列指示開始練習：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Brainstorm scenarios where `cargo` may offer an advantage and assess the \"\n\"risk profile of these scenarios.\"\nmsgstr \"發想各種 `cargo` 可帶來優勢的情境，然後評估這些情境的風險狀況。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Discuss which tools, libraries, and groups of people need to be trusted when \"\n\"using `gn` and `ninja`, offline `cargo`, etc.\"\nmsgstr \"\"\n\"討論使用 `gn` 和 `ninja`、離線 `cargo` 等技術時，需要信任哪些工具、程式庫和人\"\n\"員。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Ask students to avoid peeking at the speaker notes before completing the \"\n\"exercise. Assuming folks taking the course are physically together, ask them \"\n\"to discuss in small groups of 3-4 people.\"\nmsgstr \"\"\n\"請要求學生不要在完成練習前偷看演講者備忘稿。如果學生在彼此身邊，請要求他們分\"\n\"為 3 到 4 人一組一起討論。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Notes/hints related to the first part of the exercise (\\\"scenarios where \"\n\"Cargo may offer an advantage\\\"):\"\nmsgstr \"與第一部分練習 (「Cargo 可帶來優勢的情境」) 相關的附註/提示：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It's fantastic that when writing a tool, or prototyping a part of Chromium, \"\n\"one has access to the rich ecosystem of crates.io libraries. There is a \"\n\"crate for almost anything and they are usually quite pleasant to use. \"\n\"(`clap` for command-line parsing, `serde` for serializing/deserializing to/\"\n\"from various formats, `itertools` for working with iterators, etc.).\"\nmsgstr \"\"\n\"很棒的是，在編寫工具或設計 Chromium 中某部分的原型時，開發人員可以存取 \"\n\"crates.io 程式庫豐富的生態系統。幾乎所有東西都有 Crate，而且使用方法通常很簡\"\n\"便 (用於指令列剖析的 `clap`、用於將各種格式序列化/反序列化的 `serde`，以及與\"\n\"疊代器搭配使用的 `itertools` 等)。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to try a library (just add a single line to `Cargo.\"\n\"toml` and start writing code)\"\nmsgstr \"\"\n\"您可以透過 `cargo` 輕鬆試用程式庫 (在 `Cargo.toml` 中新增一行程式碼，然後開始\"\n\"編寫程式碼即可)\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"It may be worth comparing how CPAN helped make `perl` a popular choice. Or \"\n\"comparing with `python` + `pip`.\"\nmsgstr \"\"\n\"可考慮比較 CPAN 如何讓 `perl` 成為熱門選擇，或是與 `python` + `pip` 比較。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Development experience is made really nice not only by core Rust tools (e.g. \"\n\"using `rustup` to switch to a different `rustc` version when testing a crate \"\n\"that needs to work on nightly, current stable, and older stable) but also by \"\n\"an ecosystem of third-party tools (e.g. Mozilla provides `cargo vet` for \"\n\"streamlining and sharing security audits; `criterion` crate gives a \"\n\"streamlined way to run benchmarks).\"\nmsgstr \"\"\n\"之所以能實現優異的開發體驗，一來是因為有核心 Rust 工具，例如想測試的 Crate 需\"\n\"在每夜版、目前穩定版和較舊穩定版執行時，可使用 `rustup` 切換至其他 `rustc` 版\"\n\"本。二來是因為有第三方工具的生態系統，例如 Mozilla 提供的 `cargo vet` 可簡化\"\n\"及分享安全性稽核作業，`criterion` Crate 則能簡化執行基準測試的方式。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`.\"\nmsgstr \"\"\n\"有了 `cargo`，您可以輕鬆透過 `cargo install --locked cargo-vet` 新增工具。\"\n\n#: src/chromium/cargo.md\nmsgid \"It may be worth comparing with Chrome Extensions or VScode extensions.\"\nmsgstr \"可考慮與 Chrome 擴充功能或 VScode 擴充功能比較。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Broad, generic examples of projects where `cargo` may be the right choice:\"\nmsgstr \"以下列出廣泛通用的專案範例，皆可能適合使用 `cargo`：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Perhaps surprisingly, Rust is becoming increasingly popular in the industry \"\n\"for writing command line tools. The breadth and ergonomics of libraries is \"\n\"comparable to Python, while being more robust (thanks to the rich \"\n\"typesystem) and running faster (as a compiled, rather than interpreted \"\n\"language).\"\nmsgstr \"\"\n\"或許令人意外的是，業界越來越廣泛使用 Rust 編寫指令列工具。Rust 程式庫在廣度和\"\n\"人因工程學方面與 Python 不相上下，又因為豐富的型別系統而更強健，就以編譯語言 \"\n\"(而非解譯語言) 來說，執行速度也更快。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Participating in the Rust ecosystem requires using standard Rust tools like \"\n\"Cargo. Libraries that want to get external contributions, and want to be \"\n\"used outside of Chromium (e.g. in Bazel or Android/Soong build environments) \"\n\"should probably use Cargo.\"\nmsgstr \"\"\n\"如要參與 Rust 生態系統，必須使用 Cargo 等標準 Rust 工具。如果程式庫要取得外部\"\n\"貢獻，並用於 Chromium 以外的地方 (例如 Bazel 或 Android/Soong 建構環境)，則大\"\n\"概應使用 Cargo。\"\n\n#: src/chromium/cargo.md\nmsgid \"Examples of Chromium-related projects that are `cargo`\\\\-based:\"\nmsgstr \"`cargo`\\\\ 式的 Chromium 相關專案範例：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`serde_json_lenient` (experimented with in other parts of Google which \"\n\"resulted in PRs with performance improvements)\"\nmsgstr \"\"\n\"`serde_json_lenient` (在 Google 的其他部分中經過實驗，產生了一些可提升效能的 \"\n\"PR (Pull Request))\"\n\n#: src/chromium/cargo.md\nmsgid \"Fontations libraries like `font-types`\"\nmsgstr \"`font-types` 等字型程式庫\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`gnrt` tool (we will meet it later in the course) which depends on `clap` \"\n\"for command-line parsing and on `toml` for configuration files.\"\nmsgstr \"\"\n\"`gnrt` 工具 (課程稍後會介紹)，這個工具需使用 `clap` 執行指令列剖析，並需使用 \"\n\"`toml` 處理設定檔。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Disclaimer: a unique reason for using `cargo` was unavailability of `gn` \"\n\"when building and bootstrapping Rust standard library when building Rust \"\n\"toolchain.\"\nmsgstr \"\"\n\"免責事項：使用 `cargo` 的特別理由之一，是因為建構 Rust 工具鏈時，系統無法在建\"\n\"構和啟動 Rust 標準程式庫期間使用 `gn`。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on \"\n\"third-party libraries downloaded from the internet, but `run_gnrt.py` asks \"\n\"`cargo` that only `--locked` content is allowed via `Cargo.lock`.)\"\nmsgstr \"\"\n\"`run_gnrt.py` 使用 Chromium 的 `cargo` 和 `rustc` 副本。`gnrt` 依附於從網際網\"\n\"路下載的第三方程式庫，但 `run_gnrt.py` 透過 `Cargo.lock` 要求 `cargo` 只允許 \"\n\"`--locked` 內容。\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Students may identify the following items as being implicitly or explicitly \"\n\"trusted:\"\nmsgstr \"學生可能會認為下列項目隱含或明確受信任：\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the \"\n\"Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust \"\n\"compiler team), binary Rust compiler downloaded for bootstrapping\"\nmsgstr \"\"\n\"`rustc` (Rust 編譯器) 依序依附於 LLVM 程式庫、Clang 編譯器、`rustc` 原始碼 \"\n\"(從 GitHub 擷取，由 Rust 編譯器團隊審查)、為自舉而下載的二進位檔 Rust 編譯器\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"`rustup` (it may be worth pointing out that `rustup` is developed under the \"\n\"umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)\"\nmsgstr \"\"\n\"`rustup` (可考慮告知學生 `rustup` 是 https://github.com/rust-lang/ 組織所開發\"\n\"的一系列項目之一，與 `rustc` 相同)\"\n\n#: src/chromium/cargo.md\nmsgid \"`cargo`, `rustfmt`, etc.\"\nmsgstr \"`cargo`、`rustfmt` 等\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Various internal infrastructure (bots that build `rustc`, system for \"\n\"distributing the prebuilt toolchain to Chromium engineers, etc.)\"\nmsgstr \"\"\n\"各種內部基礎架構 (建構 `rustc` 的機器人、將預建工具鏈發布給 Chromium 工程師的\"\n\"系統等)\"\n\n#: src/chromium/cargo.md\nmsgid \"Cargo tools like `cargo audit`, `cargo vet`, etc.\"\nmsgstr \"Cargo 工具，例如 `cargo audit`、`cargo vet` 等\"\n\n#: src/chromium/cargo.md\nmsgid \"\"\n\"Rust libraries vendored into `//third_party/rust` (audited by \"\n\"security@chromium.org)\"\nmsgstr \"\"\n\"供應至 `//third_party/rust` 的 Rust 程式庫 (由 security@chromium.org 稽核)\"\n\n#: src/chromium/cargo.md\nmsgid \"Other Rust libraries (some niche, some quite popular and commonly used)\"\nmsgstr \"其他 Rust 程式庫 (有些很小眾，有些相當受歡迎也常用)\"\n\n#: src/chromium/policy.md\nmsgid \"Chromium Rust policy\"\nmsgstr \"Chromium Rust 政策\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium does not yet allow first-party Rust except in rare cases as \"\n\"approved by Chromium's [Area Tech Leads](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:ATL_OWNERS).\"\nmsgstr \"\"\n\"Chromium 目前不支援第一方 Rust，除非是 Chromium [領域技術主管](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:ATL_OWNERS)核准的少數情況。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Chromium's policy on third party libraries is outlined [here](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.\"\n\"md#rust) - Rust is allowed for third party libraries under various \"\n\"circumstances, including if they're the best option for performance or for \"\n\"security.\"\nmsgstr \"\"\n\"Chromium 的第三方程式庫政策列載於[這個頁面](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#rust) - 第三方程式庫可\"\n\"在各種情況下使用 Rust，包括這些程式庫是效能或安全方面的最佳選擇時。\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"Very few Rust libraries directly expose a C/C++ API, so that means that \"\n\"nearly all such libraries will require a small amount of first-party glue \"\n\"code.\"\nmsgstr \"\"\n\"只有極少數的 Rust 程式庫會直接公開 C/C++ API，這表示幾乎所有這類程式庫都需要\"\n\"少量的第一方黏合程式碼。\"\n\n#: src/chromium/policy.md\n#, fuzzy\nmsgid \"\"\n\"```bob\\n\"\n\"\\\"C++\\\"                           Rust\\n\"\n\".- - - - - - - - - -.           .- - - - - - - - - - - - - - - - - - - - - - \"\n\"-.\\n\"\n\":                   :           :                                             :\\n\"\n\": Existing Chromium :           :  Chromium Rust              Existing \"\n\"Rust   :\\n\"\n\": \\\"C++\\\"             :           :  \\\"wrapper\\\"                  \"\n\"crate           :\\n\"\n\": +---------------+ :           : +----------------+          +-------------\"\n\"+ :\\n\"\n\": |               | :           : |                |          |             \"\n\"| :\\n\"\n\": |         o-----+-+-----------+-+->            o-+----------+-->          \"\n\"| :\\n\"\n\": |               | : Language  : |                | Crate    |             \"\n\"| :\\n\"\n\": +---------------+ : boundary  : +----------------+ API      +-------------\"\n\"+ :\\n\"\n\":                   :           :                                             :\\n\"\n\"`- - - - - - - - - -'           `- - - - - - - - - - - - - - - - - - - - - - \"\n\"-'\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\" 堆疊                             堆積\\n\"\n\".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - - - -.\\n\"\n\":                           :     :                               :\\n\"\n\":    s1                     :     :                               :\\n\"\n\":   +-----------+-------+   :     :   +----+----+----+----+----+  :\\n\"\n\":   | ptr       |   o---+---+-----+-->| H  | e  | l  | l  | o  |  :\\n\"\n\":   | len       |     5 |   :     :   +----+----+----+----+----+  :\\n\"\n\":   | capacity  |     5 |   :     :                               :\\n\"\n\":   +-----------+-------+   :     :                               :\\n\"\n\":                           :     `- - - - - - - - - - - - - - - -'\\n\"\n\"`- - - - - - - - - - - - - -'\\n\"\n\"```\"\n\n#: src/chromium/policy.md\nmsgid \"\"\n\"First-party Rust glue code for a particular third-party crate should \"\n\"normally be kept in `third_party/rust/<crate>/<version>/wrapper`.\"\nmsgstr \"\"\n\"特定第三方 Crate 的第一方 Rust 黏合程式碼通常應儲存在 `third_party/rust/\"\n\"<crate>/<version>/wrapper`。\"\n\n#: src/chromium/policy.md\nmsgid \"Because of this, today's course will be heavily focused on:\"\nmsgstr \"因此，今天的課程會著重在以下層面：\"\n\n#: src/chromium/policy.md\nmsgid \"Bringing in third-party Rust libraries (\\\"crates\\\")\"\nmsgstr \"導入第三方 Rust 程式庫 (「Crates」)\"\n\n#: src/chromium/policy.md\nmsgid \"Writing glue code to be able to use those crates from Chromium C++.\"\nmsgstr \"編寫黏合程式碼，以使用 Chromium C++ 中的 Crate。\"\n\n#: src/chromium/policy.md\nmsgid \"If this policy changes over time, the course will evolve to keep up.\"\nmsgstr \"如果本政策有所異動，課程內容也會隨之更新。\"\n\n#: src/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules\"\nmsgstr \"建構規則\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Rust code is usually built using `cargo`. Chromium builds with `gn` and \"\n\"`ninja` for efficiency --- its static rules allow maximum parallelism. Rust \"\n\"is no exception.\"\nmsgstr \"\"\n\"Rust 程式碼通常是以 `cargo` 建構。為提升建構效率，Chromium 會使用 `gn` 和 \"\n\"`ninja`，因為 Chromium 的靜態規則允許最大程度的平行處理。Rust 也不例外。\"\n\n#: src/chromium/build-rules.md\nmsgid \"Adding Rust code to Chromium\"\nmsgstr \"將 Rust 程式碼新增至 Chromium\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:\"\nmsgstr \"在某個現有的 Chromium `BUILD.gn` 檔案中，宣告 `rust_static_library`：\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You can also add `deps` on other Rust targets. Later we'll use this to \"\n\"depend upon third party code.\"\nmsgstr \"\"\n\"您也可以在其他 Rust 目標中新增 `deps`。稍後我們會使用此程式碼，依附於第三方程\"\n\"式碼。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"You must specify _both_ the crate root, _and_ a full list of sources. The \"\n\"`crate_root` is the file given to the Rust compiler representing the root \"\n\"file of the compilation unit --- typically `lib.rs`. `sources` is a complete \"\n\"list of all source files which `ninja` needs in order to determine when \"\n\"rebuilds are necessary.\"\nmsgstr \"\"\n\"您必須「同時」指定 Crate 根層級「以及」完整的來源清單。`crate_root` 是提供給 \"\n\"Rust 編譯器的檔案，代表編譯單元的根檔案 (通常是 `lib.rs`)。`sources` 是列出所\"\n\"有來源檔案的完整清單，`ninja` 判斷何時必須重建時，就需要使用此清單。\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"(There's no such thing as a Rust `source_set`, because in Rust, an entire \"\n\"crate is a compilation unit. A `static_library` is the smallest unit.)\"\nmsgstr \"\"\n\"(並不存在 Rust 的 `source_set` 這種東西，因為在 Rust 中，整個 Crate 就是編譯\"\n\"單元。`static_library` 是最小單元。)\"\n\n#: src/chromium/build-rules.md\nmsgid \"\"\n\"Students might be wondering why we need a gn template, rather than using \"\n\"[gn's built-in support for Rust static libraries](https://gn.googlesource.\"\n\"com/gn/+/main/docs/reference.md#func_static_library). The answer is that \"\n\"this template provides support for CXX interop, Rust features, and unit \"\n\"tests, some of which we'll use later.\"\nmsgstr \"\"\n\"學生可能會想知道為何需要 gn 範本，而不是使用 [gn 內建的 Rust 靜態程式庫支援功\"\n\"能](https://gn.googlesource.com/gn/+/main/docs/reference.\"\n\"md#func_static_library)。答案是這個範本可支援 CXX 互通性、Rust 功能和單元測\"\n\"試，其中一些項目稍後會用到。\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"Including `unsafe` Rust Code\"\nmsgstr \"包含 `unsafe` Rust 程式碼\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"Unsafe Rust code is forbidden in `rust_static_library` by default --- it \"\n\"won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to \"\n\"the gn target. (Later in the course we'll see circumstances where this is \"\n\"necessary.)\"\nmsgstr \"\"\n\"根據預設，`rust_static_library` 中禁止使用不安全的 Rust 程式碼，系統也不會編\"\n\"譯這類程式碼。如果需要不安全的 Rust 程式碼，請在 gn 目標中加入 `allow_unsafe \"\n\"= true` (本課程稍後會說明必須這麼做的情況)。\"\n\n#: src/chromium/build-rules/unsafe.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [\\n\"\n\"    \\\"lib.rs\\\",\\n\"\n\"    \\\"hippopotamus.rs\\\"\\n\"\n\"  ]\\n\"\n\"  allow_unsafe = true\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"Simply add the above target to the `deps` of some Chromium C++ target.\"\nmsgstr \"將上述目標新增至某個 Chromium C++ 目標的 `deps` 即可。\"\n\n#: src/chromium/build-rules/depending.md\nmsgid \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# or source_set, static_library etc.\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"import(\\\"//build/rust/rust_static_library.gni\\\")\\n\"\n\"\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"# 或 source_set， static_library 等等。\\n\"\n\"component(\\\"preexisting_cpp\\\") {\\n\"\n\"  deps = [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Types are elided in Rust code, which makes a good IDE even more useful than \"\n\"for C++. Visual Studio code works well for Rust in Chromium. To use it,\"\nmsgstr \"\"\n\"Rust 程式碼中省略了型別，因此相較於 C++ 而言，使用優質的 IDE 會更加有效。\"\n\"Visual Studio Code 很適合 Chromium 中的 Rust。使用方法：\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of \"\n\"Rust support\"\nmsgstr \"確認 VSCode 具有 `rust-analyzer` 擴充功能，而非舊版 Rust 支援功能\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"`gn gen out/Debug --export-rust-project` (or equivalent for your output \"\n\"directory)\"\nmsgstr \"`gn gen out/Debug --export-rust-project` (或換成您的輸出目錄)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"`ln -s out/Debug/rust-project.json rust-project.json`\"\nmsgstr \"`ln -s out/Debug/rust-project.json rust-project.json`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"A demo of some of the code annotation and exploration features of rust-\"\n\"analyzer might be beneficial if the audience are naturally skeptical of IDEs.\"\nmsgstr \"\"\n\"如果大家對 IDE 自然產生懷疑，示範 rust-analyzer 的一些程式碼註解和探索功能或\"\n\"許會有幫助。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"The following steps may help with the demo (but feel free to instead use a \"\n\"piece of Chromium-related Rust that you are most familiar with):\"\nmsgstr \"\"\n\"下列步驟或許有助於示範 (不過您可以改用自己最熟悉的 Chromium 相關 Rust 程式\"\n\"碼)：\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\nmsgstr \"開啟 `components/qr_code_generator/qr_code_generator_ffi_glue.rs`\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Place the cursor over the `QrCode::new` call (around line 26) in \"\n\"\\\\`qr_code_generator_ffi_glue.rs\"\nmsgstr \"\"\n\"將游標移到 \\\\`qr_code_generator_ffi_glue.rs 中的 `QrCode::new` 呼叫 (約在第 \"\n\"26 行)。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = \"\n\"K).\"\nmsgstr \"示範「顯示說明文件」(一般繫結：vscode = ctrl k i; vim/CoC = K)。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). \"\n\"(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)\"\nmsgstr \"\"\n\"示範「前往定義」(一般繫結：vscode = F12; vim/CoC = g d)。(您將前往 `//\"\n\"third_party/rust/.../qr_code-.../src/lib.rs`)。\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **outline** and navigate to the `QrCode::with_bits` method (around line \"\n\"164; the outline is in the file explorer pane in vscode; typical vim/CoC \"\n\"bindings = space o)\"\nmsgstr \"\"\n\"示範「大綱」，並前往 `QrCode::with_bits` 方法 (約在 164 行；大綱位於 vscode \"\n\"的檔案總管窗格；一般 vim/CoC 繫結 = 空格 o)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"Demo **type annotations** (there are quote a few nice examples in the \"\n\"`QrCode::with_bits` method)\"\nmsgstr \"示範「型別註解」(`QrCode::with_bits` 方法中引用了幾個不錯的範例)\"\n\n#: src/chromium/build-rules/vscode.md\nmsgid \"\"\n\"It may be worth pointing out that `gn gen ... --export-rust-project` will \"\n\"need to be rerun after editing `BUILD.gn` files (which we will do a few \"\n\"times throughout the exercises in this session).\"\nmsgstr \"\"\n\"可考慮指出在編輯 `BUILD.gn` 檔案之後，需要重新執行 `gn gen ... --export-rust-\"\n\"project` (我們會在本課程的練習中多次執行此操作)。\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"Build rules exercise\"\nmsgstr \"建構規則練習\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` \"\n\"containing:\"\nmsgstr \"\"\n\"在您的 Chromium 版本中，將新的 Rust 目標加至 `//ui/base/BUILD.gn`，其中包含以\"\n\"下內容：\"\n\n#: src/exercises/chromium/build-rules.md\n#, fuzzy\nmsgid \"\"\n\"**Important**: note that `no_mangle` here is considered a type of unsafety \"\n\"by the Rust compiler, so you'll need to allow unsafe code in your `gn` \"\n\"target.\"\nmsgstr \"\"\n\"**重要事項**：請注意，Rust 編譯器會將此處的 `no_mangle` 視為不安全型別，因此\"\n\"您需要在 `gn` 目標中允許不安全的程式碼。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Add this new Rust target as a dependency of `//ui/base:base`. Declare this \"\n\"function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll \"\n\"see how this can be automated by bindings generation tools):\"\nmsgstr \"\"\n\"將這個新的 Rust 目標新增為 `//ui/base:base` 的依附元件。在 `ui/base/resource/\"\n\"resource_bundle.cc` 頂端宣告此函式 (稍後會說明如何使用繫結產生工具自動執行此\"\n\"操作)：\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - \"\n\"we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build \"\n\"and run Chromium, and ensure that \\\"Hello from Rust!\\\" is printed lots of \"\n\"times.\"\nmsgstr \"\"\n\"從 `ui/base/resource/resource_bundle.cc` 的某處呼叫此函式，建議位置是 \"\n\"`ResourceBundle::MaybeMangleLocalizedString` 的頂端。建構及執行 Chromium，確\"\n\"認系統多次顯示「Hello from Rust!」。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you use VSCode, now set up Rust to work well in VSCode. It will be useful \"\n\"in subsequent exercises. If you've succeeded, you will be able to use right-\"\n\"click \\\"Go to definition\\\" on `println!`.\"\nmsgstr \"\"\n\"如果使用 VSCode，現在請設定 Rust，讓 Rust 在 VSCode 中順利運作。這在後續練習\"\n\"中會很實用。如果您成功完成，就能在 `println!` 中以滑鼠右鍵按一下「Go to \"\n\"definition」。\"\n\n#: src/exercises/chromium/build-rules.md\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Where to find help\"\nmsgstr \"如何找到說明\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"The options available to the [`rust_static_library` gn template](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` gn 範本](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)提供的選項\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/\"\n\"abi.html#the-no_mangle-attribute)\"\nmsgstr \"\"\n\"[`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/abi.html#the-\"\n\"no_mangle-attribute) 相關資訊\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about [`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.\"\n\"extern.html)\"\nmsgstr \"\"\n\"[`extern \\\"C\\\"`](https://doc.rust-lang.org/std/keyword.extern.html) 相關資訊\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"Information about gn's [`--export-rust-project`](https://gn.googlesource.com/\"\n\"gn/+/main/docs/reference.md#compilation-database) switch\"\nmsgstr \"\"\n\"gn 的 [`--export-rust-project`](https://gn.googlesource.com/gn/+/main/docs/\"\n\"reference.md#compilation-database) switch 相關資訊\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\nmsgstr \"\"\n\"[如何在 VSCode 中安裝 rust-analyzer](https://code.visualstudio.com/docs/\"\n\"languages/rust)\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"This example is unusual because it boils down to the lowest-common-\"\n\"denominator interop language, C. Both C++ and Rust can natively declare and \"\n\"call C ABI functions. Later in the course, we'll connect C++ directly to \"\n\"Rust.\"\nmsgstr \"\"\n\"此範例會探究做為最小公因數的互通語言 C，因此很特別。C++ 和 Rust 都能以原生方\"\n\"式宣告及呼叫 C ABI 函式。本課程稍後會將 C++ 直接連結至 Rust。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"`allow_unsafe = true` is required here because `#[no_mangle]` might allow \"\n\"Rust to generate two functions with the same name, and Rust can no longer \"\n\"guarantee that the right one is called.\"\nmsgstr \"\"\n\"這裡需要 `allow_unsafe = true`，因為 `#[no_mangle]` 可能會允許 Rust 產生兩個\"\n\"名稱相同的函式，Rust 就不再能保證系統會呼叫正確的函式。\"\n\n#: src/exercises/chromium/build-rules.md\nmsgid \"\"\n\"If you need a pure Rust executable, you can also do that using the \"\n\"`rust_executable` gn template.\"\nmsgstr \"\"\n\"如果需要純 Rust 執行檔，也可以使用 `rust_executable` gn 範本執行這項操作。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Rust community typically authors unit tests in a module placed in the same \"\n\"source file as the code being tested. This was covered [earlier](../testing.\"\n\"md) in the course and looks like this:\"\nmsgstr \"\"\n\"Rust 社群撰寫單元測試的模組，通常會位在與所測試程式碼相同的來源檔案中。這種做\"\n\"法已在[先前課程](../testing.md)中介紹，如下所示：\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"In Chromium we place unit tests in a separate source file and we continue to \"\n\"follow this practice for Rust --- this makes tests consistently discoverable \"\n\"and helps to avoid rebuilding `.rs` files a second time (in the `test` \"\n\"configuration).\"\nmsgstr \"\"\n\"在 Chromium 中，我們將單元測試放在獨立的來源檔案中，而對 Rust 也繼續採取這項\"\n\"做法，這樣不僅能較一致地找到測試，也有助於避免在 `test` 設定中再次重新建構 `.\"\n\"rs` 檔案。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"This results in the following options for testing Rust code in Chromium:\"\nmsgstr \"因此 Chromium 中有以下 Rust 程式碼測試選項：\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/\"\n\"rust`.\"\nmsgstr \"\"\n\"原生 Rust 測試 (即 `#[test]`)。不建議在 `//third_party/rust` 之外使用。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient \"\n\"when Rust code is just a thin FFI layer and the existing unit tests provide \"\n\"sufficient coverage for the feature.\"\nmsgstr \"\"\n\"在 C++ 中編寫的 `gtest` 測試，並透過 FFI 呼叫並執行 Rust。如果 Rust 程式碼只\"\n\"是精簡的 FFI 層，這麼做就夠充分，而現有的單元測試可為這項功能提供足夠的涵蓋\"\n\"率。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"`gtest` tests authored in Rust and using the crate under test through its \"\n\"public API (using `pub mod for_testing { ... }` if needed). This is the \"\n\"subject of the next few slides.\"\nmsgstr \"\"\n\"在 Rust 中編寫的 `gtest` 測試，並透過公用 API 使用受測試的 Crate (視需要使用 \"\n\"`pub mod for_testing { ... }`)。這是接下來幾張投影片的主題。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Mention that native Rust tests of third-party crates should eventually be \"\n\"exercised by Chromium bots. (Such testing is needed rarely --- only after \"\n\"adding or updating third-party crates.)\"\nmsgstr \"\"\n\"請提及第三方 Crate 的原生 Rust 測試最終應由 Chromium 機器人執行 (這類測試極少\"\n\"需要執行，只有在新增或更新第三方 Crate 後才需要)。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be \"\n\"used:\"\nmsgstr \"以下範例或許有助說明 C++ `gtest` 和 Rust `gtest` 各自的使用時機：\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"QR has very little functionality in the first-party Rust layer (it's just a \"\n\"thin FFI glue) and therefore uses the existing C++ unit tests for testing \"\n\"both the C++ and the Rust implementation (parameterizing the tests so they \"\n\"enable or disable Rust using a `ScopedFeatureList`).\"\nmsgstr \"\"\n\"QR 在第一方 Rust 層中的功用很少 (只是精簡的 FFI 黏合工具)，因此會使用現有的 \"\n\"C++ 單元測試，測試 C++ 和 Rust 的實作項目 (將測試參數化，方便以 \"\n\"`ScopedFeatureList` 啟用或停用 Rust)。\"\n\n#: src/chromium/testing.md\nmsgid \"\"\n\"Hypothetical/WIP PNG integration may need to implement memory-safe \"\n\"implementation of pixel transformations that are provided by `libpng` but \"\n\"missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such \"\n\"functionality may benefit from separate tests authored in Rust.\"\nmsgstr \"\"\n\"假設性/WIP PNG 整合可能需實作記憶體安全地像素轉換，這類像素轉換是由 `libpng` \"\n\"提供，但 `png` Crate 中缺少 (例如 RGBA => BGRA 或伽馬校正)。這類功能可能受益\"\n\"於在 Rust 中編寫的獨立測試。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/\"\n\"main/testing/rust_gtest_interop/README.md) library provides a way to:\"\nmsgstr \"\"\n\"[`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/main/\"\n\"testing/rust_gtest_interop/README.md) 程式庫提供以下功能：\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` \"\n\"attribute)\"\nmsgstr \"使用 Rust 函式做為 `gtest` 測試案例 (使用 `#[gtest(...)]` 屬性)\"\n\n#: src/chromium/testing/rust-gtest-interop.md\nmsgid \"\"\n\"Use `expect_eq!` and similar macros (similar to `assert_eq!` but not \"\n\"panicking and not terminating the test when the assertion fails).\"\nmsgstr \"\"\n\"使用 `expect_eq!` 和類似的巨集 (類似於 `assert_eq!`，但不會導致恐慌，斷言失敗\"\n\"時也不會終止測試)。\"\n\n#: src/chromium/testing/rust-gtest-interop.md\n#, fuzzy\nmsgid \"Example:\"\nmsgstr \"範例\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"The simplest way to build Rust `gtest` tests is to add them to an existing \"\n\"test binary that already contains tests authored in C++. For example:\"\nmsgstr \"\"\n\"如要建構 Rust `gtest` 測試，最簡單的方法就是將這些測試新增至已包含 C++ 測試的\"\n\"現有測試二進位檔，例如：\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  sources += [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps += [ \\\":my_rust_lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"Authoring Rust tests in a separate `static_library` also works, but requires \"\n\"manually declaring the dependency on the support libraries:\"\nmsgstr \"\"\n\"也可以在單獨的 `static_library` 中編寫 Rust 測試，但必須手動宣告支援程式庫的\"\n\"依附元件：\"\n\n#: src/chromium/testing/build-gn.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib_unittests\\\") {\\n\"\n\"  testonly = true\\n\"\n\"  is_gtest_unittests = true\\n\"\n\"  crate_root = \\\"my_rust_lib_unittest.rs\\\"\\n\"\n\"  sources = [ \\\"my_rust_lib_unittest.rs\\\" ]\\n\"\n\"  deps = [\\n\"\n\"    \\\":my_rust_lib\\\",\\n\"\n\"    \\\"//testing/rust_gtest_interop\\\",\\n\"\n\"  ]\\n\"\n\"}\\n\"\n\"\\n\"\n\"test(\\\"ui_base_unittests\\\") {\\n\"\n\"  ...\\n\"\n\"  deps += [ \\\":my_rust_lib_unittests\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"After adding `:my_rust_lib` to GN `deps`, we still need to learn how to \"\n\"import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't \"\n\"provided an explicit `crate_name` for `my_rust_lib` so its crate name is \"\n\"computed based on the full target path and name. Fortunately we can avoid \"\n\"working with such an unwieldy name by using the `chromium::import!` macro \"\n\"from the automatically-imported `chromium` crate:\"\nmsgstr \"\"\n\"將 `:my_rust_lib` 新增至 GN `deps` 之後，我們仍需瞭解如何從 \"\n\"`my_rust_lib_unittest.rs` 匯入及使用 `my_rust_lib`。我們尚未為 `my_rust_lib` \"\n\"提供明確的 `crate_name`，因此系統會依據完整目標路徑和名稱來運算出 Crate 名\"\n\"稱。幸好，我們可從自動匯入的 `chromium` Crate 中使用 `chromium::import!` 巨\"\n\"集，避免採用這類不方便的名稱：\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\\\"//ui/base:my_rust_lib\\\"\"\nmsgstr \"\\\"//ui/base:my_rust_lib\\\"\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"Under the covers the macro expands to something similar to:\"\nmsgstr \"在掩蓋之下，巨集會展開為類似如下的內容：\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"More information can be found in [the doc comment](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:build/rust/chromium_prelude/\"\n\"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro.\"\nmsgstr \"\"\n\"詳情請參閱 `chromium::import` 巨集的[文件註解](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:build/rust/chromium_prelude/chromium_prelude.rs?\"\n\"q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:\"\n\"third_party&ss=chromium%2Fchromium%2Fsrc)。\"\n\n#: src/chromium/testing/chromium-import-macro.md\nmsgid \"\"\n\"`rust_static_library` supports specifying an explicit name via `crate_name` \"\n\"property, but doing this is discouraged. And it is discouraged because the \"\n\"crate name has to be globally unique. crates.io guarantees uniqueness of its \"\n\"crate names so `cargo_crate` GN targets (generated by the `gnrt` tool \"\n\"covered in a later section) use short crate names.\"\nmsgstr \"\"\n\"`rust_static_library` 支援透過 `crate_name` 屬性指定明確名稱，但不建議這麼\"\n\"做。不建議的原因是 Crate 名稱在全域範圍內不得重複。crates.io 可保證其 Crate \"\n\"名稱不重複，因此 `cargo_crate` GN 目標會使用簡短的 Crate 名稱。此目標是由後續\"\n\"章節介紹的 `gnrt` 工具所產生。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Testing exercise\"\nmsgstr \"測試練習\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Time for another exercise!\"\nmsgstr \"又到了練習時間！\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"In your Chromium build:\"\nmsgstr \"在您的 Chromium 版本中：\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"\"\n\"Add a testable function next to `hello_from_rust`. Some suggestions: adding \"\n\"two integers received as arguments, computing the nth Fibonacci number, \"\n\"summing integers in a slice, etc.\"\nmsgstr \"\"\n\"在 `hello_from_rust` 旁邊新增可測試的函式。建議措施：新增兩個以引數形式接收的\"\n\"整數、計算第 n 個費波那契數、加總切片中的整數等。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add a separate `..._unittest.rs` file with a test for the new function.\"\nmsgstr \"新增獨立的 `..._unittest.rs` 檔案，內含新函式的測試。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Add the new tests to `BUILD.gn`.\"\nmsgstr \"將新測試新增至 `BUILD.gn`。\"\n\n#: src/exercises/chromium/testing.md\nmsgid \"Build the tests, run them, and verify that the new test works.\"\nmsgstr \"建構並執行測試，確認新測試能正常運作。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The Rust community offers multiple options for C++/Rust interop, with new \"\n\"tools being developed all the time. At the moment, Chromium uses a tool \"\n\"called CXX.\"\nmsgstr \"\"\n\"Rust 社群提供多個 C++/Rust 互通性選項，並且會持續開發新工具。目前 Chromium 使\"\n\"用的工具稱為 CXX。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You describe your whole language boundary in an interface definition \"\n\"language (which looks a lot like Rust) and then CXX tools generate \"\n\"declarations for functions and types in both Rust and C++.\"\nmsgstr \"\"\n\"您可以透過介面定義語言 (很類似 Rust) 描述整個語言邊界，然後 CXX 工具會為 \"\n\"Rust 和 C++ 中的函式和型別產生宣告。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of \"\n\"using this.\"\nmsgstr \"\"\n\"如需完整的使用範例，請參閱 [CXX 教學課程](https://cxx.rs/tutorial.html)。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Talk through the diagram. Explain that behind the scenes, this is doing just \"\n\"the same as you previously did. Point out that automating the process has \"\n\"the following benefits:\"\nmsgstr \"\"\n\"請完整講解圖表，說明背後的原理和先前的操作相同。請指出將程序自動化有以下優\"\n\"點：\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool guarantees that the C++ and Rust sides match (e.g. you get compile \"\n\"errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust \"\n\"definitions, but with out-of-sync manual bindings you'd get Undefined \"\n\"Behavior)\"\nmsgstr \"\"\n\"這項工具會保證 C++ 和 Rust 端相符。舉例來說，當 `#[cxx::bridge]` 與實際的 C+\"\n\"+ 或 Rust 定義不相符，就會發生「編譯錯誤」，但如有未同步的手動繫結，則會發生\"\n\"「未定義的行為」\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The tool automates generation of FFI thunks (small, C-ABI-compatible, free \"\n\"functions) for non-C features (e.g. enabling FFI calls into Rust or C++ \"\n\"methods; manual bindings would require authoring such top-level, free \"\n\"functions manually)\"\nmsgstr \"\"\n\"這項工具會自動為非 C 功能產生 FFI 替換程式 (與 C-ABI 相容的小型、可自由使用的\"\n\"函式)，例如讓 FFI 呼叫 Rust 或 C++ 方法；手動繫結會需要手動編寫這類頂層的、可\"\n\"自由使用的函式\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"The tool and the library can handle a set of core types - for example:\"\nmsgstr \"這項工具和程式庫可處理一組核心型別，例如：\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`&[T]` can be passed across the FFI boundary, even though it doesn't \"\n\"guarantee any particular ABI or memory layout. With manual bindings `std::\"\n\"span<T>` / `&[T]` have to be manually destructured and rebuilt out of a \"\n\"pointer and length - this is error-prone given that each language represents \"\n\"empty slices slightly differently)\"\nmsgstr \"\"\n\"`&[T]` 傳遞時可以跨越 FFI 邊界，但無法保證任何特定 ABI 或記憶體布局。使用手動\"\n\"繫結時，`std::span<T>`/`&[T]` 必須從一個指標和長度去手動解構並重新建構。這麼\"\n\"做很容易出錯，因為每種語言各以略微不同的方式表示空切片\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Smart pointers like `std::unique_ptr<T>`, `std::shared_ptr<T>`, and/or `Box` \"\n\"are natively supported. With manual bindings, one would have to pass C-ABI-\"\n\"compatible raw pointers, which would increase lifetime and memory-safety \"\n\"risks.\"\nmsgstr \"\"\n\"`std::unique_ptr<T>`、`std::shared_ptr<T>` 和/或 `Box` 等智慧指標均可原生支\"\n\"援。使用手動繫結時，必須傳遞與 C-ABI 相容的原始指標，這可能會增加生命週期和記\"\n\"憶體安全風險。\"\n\n#: src/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"`rust::String` and `CxxString` types understand and maintain differences in \"\n\"string representation across the languages (e.g. `rust::String::lossy` can \"\n\"build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-\"\n\"terminate a string).\"\nmsgstr \"\"\n\"`rust::String` 和 `CxxString` 型別可理解並維持各語言字串表示法的差異，例如 \"\n\"`rust::String::lossy` 可透過非 UTF8 輸入內容建構 Rust 字串，而 `rust::\"\n\"String::c_str` 可以空終止字串。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` \"\n\"modules inside `.rs` source code.\"\nmsgstr \"CXX 要求在 `.rs` 原始碼的 `cxx::bridge` 模組中宣告整個 C++/Rust 邊界。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\\\"example/include/blobstore.h\\\"\"\nmsgstr \"\\\"example/include/blobstore.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"// Definitions of Rust types and functions go here\\n\"\nmsgstr \"// 這裡放 Rust 型別和函式的定義\\n\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Point out:\"\nmsgstr \"請說明以下事項：\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` \"\n\"procedural macro does complex things to it. The generated code is quite a \"\n\"bit more sophisticated - though this does still result in a `mod` called \"\n\"`ffi` in your code.\"\nmsgstr \"\"\n\"雖然這看起來像一般的 Rust `mod`，但 `#[cxx::bridge]` 程序巨集會對其執行複雜作\"\n\"業。產生的程式碼較為複雜，但仍會導致程式碼中出現名為 `ffi` 的 `mod`。\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for C++'s `std::unique_ptr` in Rust\"\nmsgstr \"Rust 中對 C++ `std::unique_ptr` 的原生支援\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Native support for Rust slices in C++\"\nmsgstr \"C++ 中對 Rust 切片的原生支援\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from C++ to Rust, and Rust types (in the top part)\"\nmsgstr \"從 C++ 到 Rust 的呼叫，以及 Rust 型別 (頂部)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"Calls from Rust to C++, and C++ types (in the bottom part)\"\nmsgstr \"從 Rust 到 C++ 的呼叫，以及 C++ 型別 (底部)\"\n\n#: src/chromium/interoperability-with-cpp/example-bindings.md\nmsgid \"\"\n\"**Common misconception**: It _looks_ like a C++ header is being parsed by \"\n\"Rust, but this is misleading. This header is never interpreted by Rust, but \"\n\"simply `#include`d in the generated C++ code for the benefit of C++ \"\n\"compilers.\"\nmsgstr \"\"\n\"**常見誤解**：它「看似」是由 Rust 剖析的 C++ 標頭，但這會造成誤導。這種標頭一\"\n\"律不會由 Rust 解譯，只是為了 C++ 編譯器的好處，而在產生的 C++ 程式碼中設為 \"\n\"`#include`。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"By far the most useful page when using CXX is the [type reference](https://\"\n\"cxx.rs/bindings.html).\"\nmsgstr \"使用 CXX 時，最實用的頁面是[型別參照](https://cxx.rs/bindings.html)。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"CXX fundamentally suits cases where:\"\nmsgstr \"CXX 基本上適用下列情況：\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Your Rust-C++ interface is sufficiently simple that you can declare all of \"\n\"it.\"\nmsgstr \"您的 Rust-C++ 介面非常簡單，您可以宣告其中所有項目。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You're using only the types natively supported by CXX already, for example \"\n\"`std::unique_ptr`, `std::string`, `&[u8]` etc.\"\nmsgstr \"\"\n\"您只使用 CXX 已原生支援的型別，例如 `std::unique_ptr`、`std::string`、\"\n\"`&[u8]` 等。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"It has many limitations --- for example lack of support for Rust's `Option` \"\n\"type.\"\nmsgstr \"它有許多限制，例如不支援 Rust 的 `Option` 型別。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"These limitations constrain us to using Rust in Chromium only for well \"\n\"isolated \\\"leaf nodes\\\" rather than for arbitrary Rust-C++ interop. When \"\n\"considering a use-case for Rust in Chromium, a good starting point is to \"\n\"draft the CXX bindings for the language boundary to see if it appears simple \"\n\"enough.\"\nmsgstr \"\"\n\"這些限制會導致我們只能在 Chromium 中將 Rust 用於妥善隔離的「葉節點」，而非用\"\n\"於任意 Rust-C++ 互通情形。考慮 Chromium 中 Rust 的用途時，建議先草擬語言邊界\"\n\"的 CXX 繫結，瞭解是否足夠簡單。\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"You should also discuss some of the other sticky points with CXX, for \"\n\"example:\"\nmsgstr \"您也應討論一些 CXX 的其他棘手問題，例如：\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"\"\n\"Its error handling is based around C++ exceptions (given on the next slide)\"\nmsgstr \"其錯誤處理方式是以 C++ 例外狀況為根據 (請見下一張投影片)\"\n\n#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md\nmsgid \"Function pointers are awkward to use.\"\nmsgstr \"函式指標不容易使用。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"CXX's [support for `Result<T,E>`](https://cxx.rs/binding/result.html) relies \"\n\"on C++ exceptions, so we can't use that in Chromium. Alternatives:\"\nmsgstr \"\"\n\"CXX 的 [`Result<T,E>` 支援](https://cxx.rs/binding/result.html)功能依賴 C++ \"\n\"例外狀況，因此無法用於 Chromium。替代方案：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `T` part of `Result<T, E>` can be:\"\nmsgstr \"`Result<T, E>` 的 `T` 部分可以是以下情形之一：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned via out parameters (e.g. via `&mut T`). This requires that `T` can \"\n\"be passed across the FFI boundary - for example `T` has to be:\"\nmsgstr \"\"\n\"可透過傳出參數傳回，例如透過 `&mut T`。也就是說，`T` 必須能跨越 FFI 界線傳\"\n\"遞，例如 `T` 必須符合下列條件：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"A primitive type (like `u32` or `usize`)\"\nmsgstr \"是基本型別 (例如 `u32` 或 `usize`)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"A type natively supported by `cxx` (like `UniquePtr<T>`) that has a suitable \"\n\"default value to use in a failure case (_unlike_ `Box<T>`).\"\nmsgstr \"\"\n\"是 `cxx` 原生支援的型別 (就像 `UniquePtr<T>`)，具有可在失敗情況下使用的適當預\"\n\"設值 (「不像」`Box<T>`)。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Retained on the Rust side, and exposed via reference. This may be needed \"\n\"when `T` is a Rust type, which cannot be passed across the FFI boundary, and \"\n\"cannot be stored in `UniquePtr<T>`.\"\nmsgstr \"\"\n\"在 Rust 端保留，並透過參照公開。當 `T` 是 Rust 型別，無法跨越 FFI 邊界傳遞，\"\n\"且無法儲存在 `UniquePtr<T>` 時，這就可能有必要。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"The `E` part of `Result<T, E>` can be:\"\nmsgstr \"`Result<T, E>` 的 `E` 部分可以是以下情形之一：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Returned as a boolean (e.g. `true` representing success, and `false` \"\n\"representing failure)\"\nmsgstr \"傳回為布林值 (例如 `true` 代表成功，`false` 代表失敗)\"\n\n#: src/chromium/interoperability-with-cpp/error-handling.md\nmsgid \"\"\n\"Preserving error details is in theory possible, but so far hasn't been \"\n\"needed in practice.\"\nmsgstr \"理論上可保留錯誤詳細資料，但目前在實際情況中並不需要。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"CXX Error Handling: QR Example\"\nmsgstr \"CXX 錯誤處理：QR Code 範例\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"The QR code generator is [an example](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.\"\n\"rs;l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca) where a boolean is \"\n\"used to communicate success vs failure, and where the successful result can \"\n\"be passed across the FFI boundary:\"\nmsgstr \"\"\n\"在 QR code 產生器這個[範例](https://source.chromium.org/chromium/chromium/\"\n\"src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue.rs;\"\n\"l=13-18;drc=7bf1b75b910ca430501b9c6a74c1d18a0223ecca)中，布林值是用來表示成功\"\n\"與失敗，且成功結果可跨越 FFI 邊界傳遞：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\\\"qr_code_generator\\\"\"\nmsgstr \"\\\"qr_code_generator\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"Students may be curious about the semantics of the `out_qr_size` output. \"\n\"This is not the size of the vector, but the size of the QR code (and \"\n\"admittedly it is a bit redundant - this is the square root of the size of \"\n\"the vector).\"\nmsgstr \"\"\n\"學生可能會想瞭解 `out_qr_size` 輸出內容的語意。這不是向量大小，而是 QR code \"\n\"的大小 (誠然有點多餘，因為這是向量大小的平方根)。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"It may be worth pointing out the importance of initializing `out_qr_size` \"\n\"before calling into the Rust function. Creation of a Rust reference that \"\n\"points to uninitialized memory results in Undefined Behavior (unlike in C++, \"\n\"when only the act of dereferencing such memory results in UB).\"\nmsgstr \"\"\n\"可考慮說明先初始化 `out_qr_size` 再呼叫 Rust 函式的重要性。建立指向未初始化記\"\n\"憶體的 Rust 參照時，會導致「未定義的行為」(不同的是，在 C++ 中只有解除參照這\"\n\"類記憶體時才會導致「未定義的行為」)。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-qr.md\nmsgid \"\"\n\"If students ask about `Pin`, then explain why CXX needs it for mutable \"\n\"references to C++ data: the answer is that C++ data can’t be moved around \"\n\"like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"如有學生詢問 `Pin`，請說明為何 CXX 需要這個項目來處理 C++ 資料的可變動參照：\"\n\"答案是因為 C++ 資料可能包含自我參照指標，無法像 Rust 資料一樣移動。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"CXX Error Handling: PNG Example\"\nmsgstr \"CXX 錯誤處理：PNG 範例\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"A prototype of a PNG decoder illustrates what can be done when the \"\n\"successful result cannot be passed across the FFI boundary:\"\nmsgstr \"\"\n\"PNG 解碼器的原型可說明當成功的結果無法跨越 FFI 邊界時，可以執行哪些操作：\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\\\"gfx::rust_bindings\\\"\"\nmsgstr \"\\\"gfx::rust_bindings\\\"\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"/// This returns an FFI-friendly equivalent of `Result<PngReader<'a>,\\n\"\n\"        /// ()>`.\\n\"\nmsgstr \"/// 這回傳一個 FFI 友好的型別，等同於 `Result<PngReader<'a>, ()>`.\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::ResultOfPngReader` type.\\n\"\nmsgstr \"/// `crate::png::ResultOfPngReader` 型別的 C++ 繫結：\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"/// C++ bindings for the `crate::png::PngReader` type.\\n\"\nmsgstr \"/// `crate::png::PngReader` 型別的 C++ 繫結：\\n\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"`PngReader` and `ResultOfPngReader` are Rust types --- objects of these \"\n\"types cannot cross the FFI boundary without indirection of a `Box<T>`. We \"\n\"can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ \"\n\"to store Rust objects by value.\"\nmsgstr \"\"\n\"`PngReader` 和 `ResultOfPngReader` 是 Rust 型別，這些型別的物件必須採用 \"\n\"`Box<T>` 的間接機制，才能跨越 FFI 邊界。我們無法使用 `out_parameter: &mut \"\n\"PngReader`，因為 CXX 不允許 C++ 依據值儲存 Rust 物件。\"\n\n#: src/chromium/interoperability-with-cpp/error-handling-png.md\nmsgid \"\"\n\"This example illustrates that even though CXX doesn't support arbitrary \"\n\"generics nor templates, we can still pass them across the FFI boundary by \"\n\"manually specializing / monomorphizing them into a non-generic type. In the \"\n\"example `ResultOfPngReader` is a non-generic type that forwards into \"\n\"appropriate methods of `Result<T, E>` (e.g. into `is_err`, `unwrap`, and/or \"\n\"`as_mut`).\"\nmsgstr \"\"\n\"本範例說明即使 CXX 不支援任意泛型和範本，我們還是可以手動將這些範本特化/單型\"\n\"化為非泛型型別，傳遞到 FFI 邊界。在範例中，`ResultOfPngReader` 屬於非泛型型\"\n\"別，會轉送至適當的 `Result<T, E>` 方法，例如 `is_err`、`unwrap` 和/或 \"\n\"`as_mut`。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Using cxx in Chromium\"\nmsgstr \"在 Chromium 中使用 CXX\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-\"\n\"node where we want to use Rust. You'd typically have one for each \"\n\"`rust_static_library`. Just add\"\nmsgstr \"\"\n\"在 Chromium 中，我們會為每個要使用 Rust 的葉節點定義獨立的 `#[cxx::bridge] \"\n\"mod`。每個 `rust_static_library` 通常都需要一個值。只要將下列項目\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # list of files containing #[cxx::bridge], not all source files\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"cxx_bindings = [ \\\"my_rust_file.rs\\\" ]\\n\"\n\"   # 含有 #[cxx::bridge] 的檔案列表，而非所有原始碼檔案\\n\"\n\"allow_unsafe = true\\n\"\n\"```\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"to your existing `rust_static_library` target alongside `crate_root` and \"\n\"`sources`.\"\nmsgstr \"\"\n\"新增至現有的 `rust_static_library` 目標，並搭配 `crate_root` 和 `sources`。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"C++ headers will be generated at a sensible location, so you can just\"\nmsgstr \"C++ 標頭會在合理位置產生，因此您只需採用下列程式碼：\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\\\"ui/base/my_rust_file.rs.h\\\"\"\nmsgstr \"\\\"ui/base/my_rust_file.rs.h\\\"\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"You will find some utility functions in `//base` to convert to/from Chromium \"\n\"C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;\"\n\"l=21).\"\nmsgstr \"\"\n\"您會在 `//base` 中發現一些公用函式，可將 Chromium C++ 型別轉換成 CXX Rust 型\"\n\"別，逆向轉換也可以，例如 [`SpanToRustSlice`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:base/containers/span_rust.h;l=21)。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"Students may ask --- why do we still need `allow_unsafe = true`?\"\nmsgstr \"學生可能會問：為何仍需要 `allow_unsafe = true`？\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The broad answer is that no C/C++ code is \\\"safe\\\" by the normal Rust \"\n\"standards. Calling back and forth to C/C++ from Rust may do arbitrary things \"\n\"to memory, and compromise the safety of Rust's own data layouts. Presence of \"\n\"_too many_ `unsafe` keywords in C/C++ interop can harm the signal-to-noise \"\n\"ratio of such a keyword, and is [controversial](https://steveklabnik.com/\"\n\"writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust \"\n\"binary can cause unexpected behavior from Rust's perspective.\"\nmsgstr \"\"\n\"籠統的答案是根據一般 Rust 標準，任何 C/C++ 程式碼都不「安全」。從 Rust 來回呼\"\n\"叫 C/C++ 可能會對記憶體執行任何作業，進而破壞 Rust 本身資料布局的安全性。在 \"\n\"C/C++ 互通性中如果出現「過多」`unsafe` 關鍵字，可能會傷害這類關鍵字的訊噪比，\"\n\"且[具有爭議性](https://steveklabnik.com/writing/the-cxx-debate)，但嚴格來說，\"\n\"在 Rust 二進位檔中導入任何外來程式碼，都可能對 Rust 造成非預期行為。\"\n\n#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md\nmsgid \"\"\n\"The narrow answer lies in the diagram at the top of [this page](../\"\n\"interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust \"\n\"`unsafe` and `extern \\\"C\\\"` functions just like we did manually in the \"\n\"previous section.\"\nmsgstr \"\"\n\"詳細答案位於[這個頁面](../interoperability-with-cpp.md)頂端的圖表中：CXX 會在\"\n\"幕後產生 Rust `unsafe` 和 `extern \\\"C\\\"` 函式，如同前一節中的手動操作。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Exercise: Interoperability with C++\"\nmsgstr \"練習：與 C++ 的互通性\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part one\"\nmsgstr \"第一部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In the Rust file you previously created, add a `#[cxx::bridge]` which \"\n\"specifies a single function, to be called from C++, called \"\n\"`hello_from_rust`, taking no parameters and returning no value.\"\nmsgstr \"\"\n\"在您先前建立的 Rust 檔案中新增 `#[cxx::bridge]`，指定要從 C++ 呼叫的單一函式 \"\n\"(名為 `hello_from_rust`)，但不採用任何參數，也不會傳回值。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Modify your previous `hello_from_rust` function to remove `extern \\\"C\\\"` and \"\n\"`#[no_mangle]`. This is now just a standard Rust function.\"\nmsgstr \"\"\n\"修改先前的 `hello_from_rust` 函式，移除 `extern \\\"C\\\"` 和 `#[no_mangle]`。現\"\n\"在這樣就只是標準的 Rust 函式。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Modify your `gn` target to build these bindings.\"\nmsgstr \"修改 `gn` 目標，建構這些繫結。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"In your C++ code, remove the forward-declaration of `hello_from_rust`. \"\n\"Instead, include the generated header file.\"\nmsgstr \"\"\n\"在 C++ 程式碼中，移除 `hello_from_rust` 的前向宣告，改為納入產生的標頭檔案。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Build and run!\"\nmsgstr \"建構並執行！\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part two\"\nmsgstr \"第二部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"It's a good idea to play with CXX a little. It helps you think about how \"\n\"flexible Rust in Chromium actually is.\"\nmsgstr \"您可以試著玩玩 CXX，這有助於瞭解 Chromium 中的 Rust 有多靈活。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some things to try:\"\nmsgstr \"可嘗試的事項：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Call back into C++ from Rust. You will need:\"\nmsgstr \"從 Rust 呼叫 C++。您會需要以下項目：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An additional header file which you can `include!` from your `cxx::bridge`. \"\n\"You'll need to declare your C++ function in that new header file.\"\nmsgstr \"\"\n\"額外的標頭檔案，可從 `cxx::bridge` 中 `include!`。您會需要在新標頭檔案中宣告 \"\n\"C++ 函式。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"An `unsafe` block to call such a function, or alternatively specify the \"\n\"`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/\"\n\"extern-c++.html#functions-and-member-functions).\"\nmsgstr \"\"\n\"用於呼叫這類函式的 `unsafe` 區塊，或者可在 `#[cxx::bridge]` 中指定 `unsafe` \"\n\"關鍵字，[如這個頁面所述](https://cxx.rs/extern-c++.html#functions-and-member-\"\n\"functions)。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"You may also need to `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.\"\n\"h\\\"`\"\nmsgstr \"\"\n\"您可能也需要 `#include \\\"third_party/rust/cxx/v1/crate/include/cxx.h\\\"`\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a C++ string from C++ into Rust.\"\nmsgstr \"將 C++ 字串從 C++ 傳遞至 Rust。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Pass a reference to a C++ object into Rust.\"\nmsgstr \"將 C++ 物件的參照傳遞至 Rust。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the Rust function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"刻意從 `#[cxx::bridge]` 中，取得不相符的 Rust 函式簽章，並熟悉看到的錯誤。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Intentionally get the C++ function signatures mismatched from the `#[cxx::\"\n\"bridge]`, and get used to the errors you see.\"\nmsgstr \"\"\n\"刻意從 `#[cxx::bridge]` 中取得不相符的 C++ 函式簽章，並熟悉看到的錯誤。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can \"\n\"own some C++ object.\"\nmsgstr \"\"\n\"將某些型別的 `std::unique_ptr` 從 C++ 傳遞至 Rust，這樣 Rust 就能擁有某些 C+\"\n\"+ 物件。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you \"\n\"need a `Box`).\"\nmsgstr \"\"\n\"建立 Rust 物件並傳遞至 C++ 中，讓 C++ 擁有該物件 (提示：您需要 `Box`)。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a C++ type. Call them from Rust.\"\nmsgstr \"在 C++ 型別上宣告一些方法，然後從 Rust 呼叫。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Declare some methods on a Rust type. Call them from C++.\"\nmsgstr \"在 Rust 型別上宣告一些方法，然後從 C++ 呼叫。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Part three\"\nmsgstr \"第三部分\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"Now you understand the strengths and limitations of CXX interop, think of a \"\n\"couple of use-cases for Rust in Chromium where the interface would be \"\n\"sufficiently simple. Sketch how you might define that interface.\"\nmsgstr \"\"\n\"現在您已瞭解 CXX 互通性的優勢和限制，不妨思考一些 Chromium 中介面相當簡單的 \"\n\"Rust 用途。草擬定義該介面的方式。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"The [`cxx` binding reference](https://cxx.rs/bindings.html)\"\nmsgstr \"[`cxx` 繫結參照](https://cxx.rs/bindings.html)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"The [`rust_static_library` gn template](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\nmsgstr \"\"\n\"[`rust_static_library` gn 範本](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:build/rust/rust_static_library.gni;l=16)\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"Some of the questions you may encounter:\"\nmsgstr \"您可能會遇到以下問題：\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I'm seeing a problem initializing a variable of type X with type Y, where X \"\n\"and Y are both function types. This is because your C++ function doesn't \"\n\"quite match the declaration in your `cxx::bridge`.\"\nmsgstr \"\"\n\"當 X 和 Y 都是函式型別，初始化型別 X 的變數和型別 Y 時會發生問題。這是因為 C+\"\n\"+ 函式與 `cxx::bridge` 中的宣告不太相符。\"\n\n#: src/exercises/chromium/interoperability-with-cpp.md\nmsgid \"\"\n\"I seem to be able to freely convert C++ references into Rust references. \"\n\"Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-\"\n\"sized. For CXX trivial types yes, it's _possible_ to cause UB, although \"\n\"CXX's design makes it quite difficult to craft such an example.\"\nmsgstr \"\"\n\"我似乎可將 C++ 參照任意轉換為 Rust 參照。這樣不就可能造成 UB 嗎？若是 CXX 的\"\n\"「opaque」型別就不會，因為這種型別的大小為零。CXX 中的 trivial 型別則「有可\"\n\"能」造成 UB，雖然 CXX 的設計讓撰寫這類範例相當困難。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"Rust libraries are called \\\"crates\\\" and are found at [crates.io](https://\"\n\"crates.io). It's _very easy_ for Rust crates to depend upon one another. So \"\n\"they do!\"\nmsgstr \"\"\n\"Rust 程式庫稱為「Crate」，位於 [crates.io](https://crates.io)。Rust Crate「非\"\n\"常容易」互相依附，所以它們也確實常常這麼做！\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"C++ library\"\nmsgstr \"C++ 函式庫\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Rust crate\"\nmsgstr \"Rust crate\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Build system\"\nmsgstr \"建構系統\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Lots\"\nmsgstr \"非常多\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Consistent: `Cargo.toml`\"\nmsgstr \"一致：`Cargo.toml`\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Typical library size\"\nmsgstr \"一般程式庫大小\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Large-ish\"\nmsgstr \"偏大\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Small\"\nmsgstr \"小\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Transitive dependencies\"\nmsgstr \"遞移依附元件\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"Few\"\nmsgstr \"很少\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"For a Chromium engineer, this has pros and cons:\"\nmsgstr \"對 Chromium 工程師來說，這有以下優缺點：\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"All crates use a common build system so we can automate their inclusion into \"\n\"Chromium...\"\nmsgstr \"所有 Crate 都使用通用的建構系統，因此我們可以自動將其納入 Chromium...\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"\"\n\"... but, crates typically have transitive dependencies, so you will likely \"\n\"have to bring in multiple libraries.\"\nmsgstr \"...但 Crate 通常具有遞移依附元件，因此可能需要導入多個程式庫。\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"We'll discuss:\"\nmsgstr \"我們將探討以下內容：\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to put a crate in the Chromium source code tree\"\nmsgstr \"如何在 Chromium 原始碼樹中加入 Crate\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to make `gn` build rules for it\"\nmsgstr \"如何為其建立 `gn` 建構規則\"\n\n#: src/chromium/adding-third-party-crates.md\nmsgid \"How to audit its source code for sufficient safety.\"\nmsgstr \"如何稽核原始碼，確保足夠安全\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"Configuring the `Cargo.toml` file to add crates\"\nmsgstr \"設定 `Cargo.toml` 檔案以新增 Crate\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"Chromium has a single set of centrally-managed direct crate dependencies. \"\n\"These are managed through a single [`Cargo.toml`](https://source.chromium.\"\n\"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo.\"\n\"toml):\"\nmsgstr \"\"\n\"Chromium 有一組集中管理的直接 Crate 依附元件。這些元件可透過單一 [`Cargo.\"\n\"toml`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/\"\n\"rust/chromium_crates_io/Cargo.toml) 管理：\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# lots more...\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[dependencies]\\n\"\n\"bitflags = \\\"1\\\"\\n\"\n\"cfg-if = \\\"1\\\"\\n\"\n\"cxx = \\\"1\\\"\\n\"\n\"# 還有更多...\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"As with any other `Cargo.toml`, you can specify [more details about the \"\n\"dependencies](https://doc.rust-lang.org/cargo/reference/specifying-\"\n\"dependencies.html) --- most commonly, you'll want to specify the `features` \"\n\"that you wish to enable in the crate.\"\nmsgstr \"\"\n\"與任何其他 `Cargo.toml` 一樣，您可以指定[依附元件的更多詳細資料](https://doc.\"\n\"rust-lang.org/cargo/reference/specifying-dependencies.html)。以最常見的情況來\"\n\"說，您會想在 Crate 中指定要啟用的 `features`。\"\n\n#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md\nmsgid \"\"\n\"When adding a crate to Chromium, you'll often need to provide some extra \"\n\"information in an additional file, `gnrt_config.toml`, which we'll meet next.\"\nmsgstr \"\"\n\"將 Crate 新增至 Chromium 時，您通常需要在 `gnrt_config.toml` 這個額外檔案中提\"\n\"供額外資訊，這接下來會介紹。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml). This contains Chromium-specific extensions to crate handling.\"\nmsgstr \"\"\n\"除了 `Cargo.toml`，還有 [`gnrt_config.toml`](https://source.chromium.org/\"\n\"chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config.\"\n\"toml)。這包含用來處理 Crate 的 Chromium 專屬擴充功能。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"If you add a new crate, you should specify at least the `group`. This is one \"\n\"of:\"\nmsgstr \"新增 Crate 時，應至少指定 `group`，可以是以下其中一個：\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"For instance,\"\nmsgstr \"舉例來說：\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Depending on the crate source code layout, you may also need to use this \"\n\"file to specify where its `LICENSE` file(s) can be found.\"\nmsgstr \"\"\n\"視 Crate 原始碼布局而定，您可能也需要使用這個檔案指定其 `LICENSE 檔案的位置。\"\n\n#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md\nmsgid \"\"\n\"Later, we'll see some other things you will need to configure in this file \"\n\"to resolve problems.\"\nmsgstr \"稍後我們會看到一些其他您需在這個檔案中設定的項目，才能解決問題。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"A tool called `gnrt` knows how to download crates and how to generate `BUILD.\"\n\"gn` rules.\"\nmsgstr \"`gnrt` 這項工具瞭解如何下載 Crate，以及如何產生 `BUILD.gn` 規則。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"To start, download the crate you want like this:\"\nmsgstr \"首先，請按照以下方式下載任何你想要的 Crate：\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Although the `gnrt` tool is part of the Chromium source code, by running \"\n\"this command you will be downloading and running its dependencies from \"\n\"`crates.io`. See [the earlier section](../cargo.md) discussing this security \"\n\"decision.\"\nmsgstr \"\"\n\"雖然 `gnrt` 工具屬於 Chromium 原始碼的一部分，但透過執行這項指令，您可以從 \"\n\"`crates.io` 下載並執行其依附元件。請參閱[前面的章節](../cargo.md)中有關這項安\"\n\"全性決策的討論。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"This `vendor` command may download:\"\nmsgstr \"這項 `vendor` 指令可能會下載以下項目：\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Your crate\"\nmsgstr \"您的 Crate\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"Direct and transitive dependencies\"\nmsgstr \"直接依附元件和遞移依附元件\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"New versions of other crates, as required by `cargo` to resolve the complete \"\n\"set of crates required by Chromium.\"\nmsgstr \"\"\n\"其他 Crate 的新版本。這是 `cargo` 的要求，以便解析 Chromium 所需的完整 Crate \"\n\"組合。\"\n\n#: src/chromium/adding-third-party-crates/downloading-crates.md\nmsgid \"\"\n\"Chromium maintains patches for some crates, kept in `//third_party/rust/\"\n\"chromium_crates_io/patches`. These will be reapplied automatically, but if \"\n\"patching fails you may need to take manual action.\"\nmsgstr \"\"\n\"Chromium 會維護部分 Crate 的修補程式，保留在 `//third_party/rust/\"\n\"chromium_crates_io/patches` 中。系統會自動重新套用這些設定，但如果修補失敗，\"\n\"就可能需要手動操作。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Once you've downloaded the crate, generate the `BUILD.gn` files like this:\"\nmsgstr \"下載 Crate 後，請如下產生 `BUILD.gn` 檔案：\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"Now run `git status`. You should find:\"\nmsgstr \"現在請執行 `git status`，您應會看到以下情形：\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new crate source code in `third_party/rust/chromium_crates_io/\"\n\"vendor`\"\nmsgstr \"\"\n\"在 `third_party/rust/chromium_crates_io/vendor` 中，至少有一個新的 Crate 原始\"\n\"碼\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"At least one new `BUILD.gn` in `third_party/rust/<crate name>/v<major semver \"\n\"version>`\"\nmsgstr \"\"\n\"在 `third_party/rust/<crate name>/v<major semver version>` 中，至少有一個新\"\n\"的 `BUILD.gn`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"An appropriate `README.chromium`\"\nmsgstr \"適當的 `README.chromium`\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"The \\\"major semver version\\\" is a [Rust \\\"semver\\\" version number](https://\"\n\"doc.rust-lang.org/cargo/reference/semver.html).\"\nmsgstr \"\"\n\"「major semver version」是 [Rust「Semver」版本號碼](https://doc.rust-lang.\"\n\"org/cargo/reference/semver.html).\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Take a close look, especially at the things generated in `third_party/rust`.\"\nmsgstr \"請仔細查看，尤其是 `third_party/rust` 中產生的內容。\"\n\n#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md\nmsgid \"\"\n\"Talk a little about semver --- and specifically the way that in Chromium \"\n\"it's to allow multiple incompatible versions of a crate, which is \"\n\"discouraged but sometimes necessary in the Cargo ecosystem.\"\nmsgstr \"\"\n\"請稍微介紹一下 Semver，並具體說明在 Chromium 中，Semver 可允許多種不相容的 \"\n\"Crate 版本。這不是建議做法，但在 Cargo 生態系統中有時是必要的。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"If your build fails, it may be because of a `build.rs`: programs which do \"\n\"arbitrary things at build time. This is fundamentally at odds with the \"\n\"design of `gn` and `ninja` which aim for static, deterministic, build rules \"\n\"to maximize parallelism and repeatability of builds.\"\nmsgstr \"\"\n\"如果建構失敗，可能是因為 `build.rs`，這類程式會在建構期間執行任意操作。根本而\"\n\"言，這不符合 `gn` 和 `ninja` 的設計，後者的目標是達成靜態的確定性建構規則，盡\"\n\"可能提高建構作業的平行處理程度和重複性。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Some `build.rs` actions are automatically supported; others require action:\"\nmsgstr \"有些 `build.rs` 動作可自動支援，有些則需要進一步操作：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"build script effect\"\nmsgstr \"建構指令碼效果\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Supported by our gn templates\"\nmsgstr \"gn 範本是否支援\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Work required by you\"\nmsgstr \"您需要做的\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking rustc version to configure features on and off\"\nmsgstr \"檢查 rustc 版本，將功能設為開啟/關閉\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"None\"\nmsgstr \"無\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Checking platform or CPU to configure features on and off\"\nmsgstr \"檢查平台或 CPU，將功能設為開啟/關閉\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Generating code\"\nmsgstr \"產生程式碼\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Yes - specify in `gnrt_config.toml`\"\nmsgstr \"是 - 在 `gnrt_config.toml` 中指定\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Building C/C++\"\nmsgstr \"建構 C/C++\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Patch around it\"\nmsgstr \"撰寫修補程式\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"Arbitrary other actions\"\nmsgstr \"任意其他動作\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems.md\nmsgid \"\"\n\"Fortunately, most crates don't contain a build script, and fortunately, most \"\n\"build scripts only do the top two actions.\"\nmsgstr \"\"\n\"幸運的是，大部分 Crate 均不包含建構指令碼，而大部分建構指令碼只會執行前兩項動\"\n\"作。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If `ninja` complains about missing files, check the `build.rs` to see if it \"\n\"writes source code files.\"\nmsgstr \"如果 `ninja` 抱怨缺少檔案，請查看 `build.rs`，確認是否寫入原始碼檔案。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to \"\n\"add `build-script-outputs` to the crate. If this is a transitive dependency, \"\n\"that is, one on which Chromium code should not directly depend, also add \"\n\"`allow-first-party-usage=false`. There are several examples already in that \"\n\"file:\"\nmsgstr \"\"\n\"如果是，請修改 [`gnrt_config.toml`](../configuring-gnrt-config-toml.md)，將 \"\n\"`build-script-outputs` 新增至 Crate。若是遞移依附元件，也就是 Chromium 程式\"\n\"碼 不應直接依附的依附元件，請一併加上 `allow-first-party-usage=false`。該檔案\"\n\"中已有幾個範例：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[crate.unicode-linebreak]\\n\"\n\"allow-first-party-usage = false\\n\"\n\"build-script-outputs = [\\\"tables.rs\\\"]\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md\nmsgid \"\"\n\"Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate \"\n\"`BUILD.gn` files to inform ninja that this particular output file is input \"\n\"to subsequent build steps.\"\nmsgstr \"\"\n\"現在請重新執行 [`gnrt.py -- gen`](../generating-gn-build-rules.md)，重新產生 \"\n\"`BUILD.gn` 檔案以通知 ninja 這個輸出檔案會輸入至後續建構步驟。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and \"\n\"link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://\"\n\"crates.io/crates/bindgen) within their build scripts. These actions can't be \"\n\"supported in a Chromium context --- our gn, ninja and LLVM build system is \"\n\"very specific in expressing relationships between build actions.\"\nmsgstr \"\"\n\"部分 Crate 使用 [`cc`](https://crates.io/crates/cc) Crate 建構和連結 C/C++ 程\"\n\"式庫。其他 Crate 在建構指令碼中使用 [`bindgen`](https://crates.io/crates/\"\n\"bindgen) 剖析 C/C++。Chromium 環境無法支援這些動作，因為我們的 gn、ninja 和 \"\n\"LLVM 建構系統特別要求明確表達建構動作之間的關係。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"So, your options are:\"\nmsgstr \"因此，您有以下選擇：\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Avoid these crates\"\nmsgstr \"避開這類 Crate\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"Apply a patch to the crate.\"\nmsgstr \"將修補程式套用至 Crate。\"\n\n#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md\nmsgid \"\"\n\"Patches should be kept in `third_party/rust/chromium_crates_io/patches/\"\n\"<crate>` - see for example the [patches against the `cxx` crate](https://\"\n\"source.chromium.org/chromium/chromium/src/+/main:third_party/rust/\"\n\"chromium_crates_io/patches/cxx/) - and will be applied automatically by \"\n\"`gnrt` each time it upgrades the crate.\"\nmsgstr \"\"\n\"修補程式應保留在 `third_party/rust/chromium_crates_io/patches/<crate>` 中，範\"\n\"例請見 [`cxx` Crate 的修補程式](https://source.chromium.org/chromium/\"\n\"chromium/src/+/main:third_party/rust/chromium_crates_io/patches/cxx。此外，在\"\n\"每次升級 Crate 時，修補補程式會由 `gnrt` 自動套用。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"Once you've added a third-party crate and generated build rules, depending \"\n\"on a crate is simple. Find your `rust_static_library` target, and add a \"\n\"`dep` on the `:lib` target within your crate.\"\nmsgstr \"\"\n\"新增第三方 Crate 並產生建構規則後，依附 Crate 就很簡單。請找出 \"\n\"`rust_static_library` 目標，然後在 Crate 的 `:lib` 目標中新增 `dep`。\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\n#, fuzzy\nmsgid \"Specifically,\"\nmsgstr \"特定 OS\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\nmsgstr \"\"\n\"```bob\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"\\\"//third_party/rust\\\" | crate name | \\\"/v\\\" | major semver version | \\\":\"\n\"lib\\\"\\n\"\n\"                     +------------+      +----------------------+\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/depending-on-a-crate.md\nmsgid \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\nmsgstr \"\"\n\"```gn\\n\"\n\"rust_static_library(\\\"my_rust_lib\\\") {\\n\"\n\"  crate_root = \\\"lib.rs\\\"\\n\"\n\"  sources = [ \\\"lib.rs\\\" ]\\n\"\n\"  deps = [ \\\"//third_party/rust/example_rust_crate/v1:lib\\\" ]\\n\"\n\"}\\n\"\n\"```\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Auditing Third Party Crates\"\nmsgstr \"稽核第三方 Crate\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Adding new libraries is subject to Chromium's standard [policies](https://\"\n\"chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.\"\n\"md#Third_party-review), but of course also subject to security review. As \"\n\"you may be bringing in not just a single crate but also transitive \"\n\"dependencies, there may be a lot of code to review. On the other hand, safe \"\n\"Rust code can have limited negative side effects. How should you review it?\"\nmsgstr \"\"\n\"新增程式庫時必須遵守 Chromium 的標準[政策](https://chromium.googlesource.com/\"\n\"chromium/src/+/refs/heads/main/docs/rust.md#Third_party-review)，不過當然也須\"\n\"接受安全性審查。您可能不只引入一個 Crate，還會傳入遞移依附元件，因此可能有許\"\n\"多程式碼需要審查。另一方面，安全的 Rust 程式碼不會產生多少負面副作用。應如何\"\n\"審查呢？\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Over time Chromium aims to move to a process based around [cargo vet]\"\n\"(https://mozilla.github.io/cargo-vet/).\"\nmsgstr \"\"\n\"隨著時間推移，Chromium 的目標是移至以 [cargo vet](https://mozilla.github.io/\"\n\"cargo-vet/) 為基礎的程序。\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Meanwhile, for each new crate addition, we are checking for the following:\"\nmsgstr \"同時，我們會針對每個新增的 Crate 檢查以下項目：\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Understand why each crate is used. What's the relationship between crates? \"\n\"If the build system for each crate contains a `build.rs` or procedural \"\n\"macros, work out what they're for. Are they compatible with the way Chromium \"\n\"is normally built?\"\nmsgstr \"\"\n\"瞭解使用各個 Crate 的原因。Crate 之間的關係為何？如果每個 Crate 的建構系統都\"\n\"包含 `build.rs` 或程序巨集，請思考 Crate 的用途。這些 Crate 是否與 Chromium \"\n\"平常的建構方式相容？\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check each crate seems to be reasonably well maintained\"\nmsgstr \"檢查每個 Crate 的維護情況是否合理良好\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known \"\n\"vulnerabilities (first you'll need to `cargo install cargo-audit`, which \"\n\"ironically involves downloading lots of dependencies from the internet[2](../\"\n\"cargo.md))\"\nmsgstr \"\"\n\"使用 `cd third-party/rust/chromium_crates_io; cargo audit` 檢查是否有已知的安\"\n\"全漏洞 (您首先需要執行 `cargo install cargo-audit`，諷刺的是，這麼做需要從網\"\n\"際網路下載大量依附元件[2](../cargo.md))\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Ensure any `unsafe` code is good enough for the [Rule of Two](https://\"\n\"chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2.\"\n\"md#unsafe-code-in-safe-languages)\"\nmsgstr \"\"\n\"確保所有 `unsafe` 程式碼都妥善符合[兩個項目的規則](https://chromium.\"\n\"googlesource.com/chromium/src/+/main/docs/security/rule-of-2.md#unsafe-code-\"\n\"in-safe-languages)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"Check for any use of `fs` or `net` APIs\"\nmsgstr \"檢查是否使用 `fs` 或 `net` API\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"Read all the code at a sufficient level to look for anything out of place \"\n\"that might have been maliciously inserted. (You can't realistically aim for \"\n\"100% perfection here: there's often just too much code.)\"\nmsgstr \"\"\n\"請在足夠的層級閱讀所有程式碼，檢查是否出現任何可能是惡意插入的錯誤內容 (實務\"\n\"上很難達到 100% 完美的成果，畢竟通常會有太多程式碼。)\"\n\n#: src/chromium/adding-third-party-crates/reviews-and-audits.md\nmsgid \"\"\n\"These are just guidelines --- work with reviewers from `security@chromium.\"\n\"org` to work out the right way to become confident of the crate.\"\nmsgstr \"\"\n\"上述內容只是指南，請與 `security@chromium.org` 的審查人員合作，瞭解如何正確地\"\n\"確保 Crate 是可信的。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Checking Crates into Chromium Source Code\"\nmsgstr \"將 Crate 登錄為 Chromium 原始碼\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"`git status` should reveal:\"\nmsgstr \"`git status` 應會顯示以下內容：\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Crate code in `//third_party/rust/chromium_crates_io`\"\nmsgstr \"`//third_party/rust/chromium_crates_io` 中的 Crate 程式碼\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust/<crate>/\"\n\"<version>`\"\nmsgstr \"\"\n\"`//third_party/rust/<crate>/<version>` 中的中繼資料 (`BUILD.gn` 和 `README.\"\n\"chromium`)\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"Please also add an `OWNERS` file in the latter location.\"\nmsgstr \"請一併在後者的位置中新增 `OWNERS` 檔案。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"You should land all this, along with your `Cargo.toml` and `gnrt_config.\"\n\"toml` changes, into the Chromium repo.\"\nmsgstr \"\"\n\"請務必在 Chromium 存放區中放入所有這些項目，以及 `Cargo.toml` 和 \"\n\"`gnrt_config.toml` 變更內容。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"**Important**: you need to use `git add -f` because otherwise `.gitignore` \"\n\"files may result in some files being skipped.\"\nmsgstr \"\"\n\"**重要事項**：請務必使用 `git add -f`，否則 `.gitignore` 檔案可能會導致某些檔\"\n\"案遭到略過。\"\n\n#: src/chromium/adding-third-party-crates/checking-in.md\nmsgid \"\"\n\"As you do so, you might find presubmit checks fail because of non-inclusive \"\n\"language. This is because Rust crate data tends to include names of git \"\n\"branches, and many projects still use non-inclusive terminology there. So \"\n\"you may need to run:\"\nmsgstr \"\"\n\"這時，預先提交的檢查作業可能會因使用非包容性的語言而失敗。這是因為 Rust \"\n\"Crate 資料通常會包含 Git 分支版本的名稱，而許多專案仍使用非包容性的術語。因\"\n\"此，您可能需要執行以下項目：\"\n\n#: src/chromium/adding-third-party-crates/keeping-up-to-date.md\nmsgid \"\"\n\"As the OWNER of any third party Chromium dependency, you are [expected to \"\n\"keep it up to date with any security fixes](https://chromium.googlesource.\"\n\"com/chromium/src/+/main/docs/adding_to_third_party.md#add-owners). It is \"\n\"hoped that we will soon automate this for Rust crates, but for now, it's \"\n\"still your responsibility just as it is for any other third party dependency.\"\nmsgstr \"\"\n\"身為第三方 Chromium 依附元件的擁有者，您應[確保該元件已採用任何最新的安全性修\"\n\"正項目](https://chromium.googlesource.com/chromium/src/+/main/docs/\"\n\"adding_to_third_party.md#add-owners)。我們希望很快就能針對 Rust Crate 將這項\"\n\"作業自動化，但您目前仍須負責處理此事，如同使用其他第三方依附元件時一樣。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the \"\n\"crate's [default features](https://doc.rust-lang.org/cargo/reference/\"\n\"features.html#the-default-feature). Assume that the crate will be used in \"\n\"shipping Chromium, but won't be used to handle untrustworthy input.\"\nmsgstr \"\"\n\"在 Chromium 中新增 [uwuify](https://crates.io/crates/uwuify)，關閉 Crate 的\"\n\"[預設功能](https://doc.rust-lang.org/cargo/reference/features.html#the-\"\n\"default-feature)。假設提交 Chromium 時會使用這個 Crate，但不會用於處理不可靠\"\n\"的輸入資料。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"(In the next exercise we'll use uwuify from Chromium, but feel free to skip \"\n\"ahead and do that now if you like. Or, you could create a new \"\n\"[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/\"\n\"+/main:build/rust/rust_executable.gni) which uses `uwuify`).\"\nmsgstr \"\"\n\"(在下一項練習中，我們將使用 Chromium 的 uwuify，但您現在就可以跳過這部分，直\"\n\"接開始練習。或者，您可以建立使用 `uwuify` 的新 [`rust_executable` 目標]\"\n\"(https://source.chromium.org/chromium/chromium/src/+/main:build/rust/\"\n\"rust_executable.gni)。)\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"Students will need to download lots of transitive dependencies.\"\nmsgstr \"學生需下載許多遞移依附元件。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"The total crates needed are:\"\nmsgstr \"以下為所有需要的 Crate：\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`instant`,\"\nmsgstr \"`instant`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`lock_api`,\"\nmsgstr \"`lock_api`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot`,\"\nmsgstr \"`parking_lot`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`parking_lot_core`,\"\nmsgstr \"`parking_lot_core`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`redox_syscall`,\"\nmsgstr \"`redox_syscall`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`scopeguard`,\"\nmsgstr \"`scopeguard`，\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`smallvec`, and\"\nmsgstr \"`smallvec`，以及\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"`uwuify`.\"\nmsgstr \"`uwuify`。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"If students are downloading even more than that, they probably forgot to \"\n\"turn off the default features.\"\nmsgstr \"如果學生下載的項目不只這些，可能是因為忘了關閉預設功能。\"\n\n#: src/exercises/chromium/third-party.md\nmsgid \"\"\n\"Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!\"\nmsgstr \"\"\n\"感謝 [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) 提供這個 Crate！\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Bringing It Together --- Exercise\"\nmsgstr \"融會貫通 - 練習\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In this exercise, you're going to add a whole new Chromium feature, bringing \"\n\"together everything you already learned.\"\nmsgstr \"在本練習中，您會加入全新的 Chromium 功能，一併應用目前學到的所有內容。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"The Brief from Product Management\"\nmsgstr \"產品管理提要\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"A community of pixies has been discovered living in a remote rainforest. \"\n\"It's important that we get Chromium for Pixies delivered to them as soon as \"\n\"possible.\"\nmsgstr \"\"\n\"我們在偏遠的雨林中發現一群精靈，務必盡快將精靈專用 Chromium 提供給他們。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The requirement is to translate all Chromium's UI strings into Pixie \"\n\"language.\"\nmsgstr \"目前要求是將所有 Chromium 的 UI 字串翻譯成精靈語。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"There's not time to wait for proper translations, but fortunately pixie \"\n\"language is very close to English, and it turns out there's a Rust crate \"\n\"which does the translation.\"\nmsgstr \"\"\n\"現在沒時間取得適當的翻譯，但幸好精靈語非常接近英文，也找到能負責翻譯的 Rust \"\n\"Crate。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"In fact, you already [imported that crate in the previous exercise](https://\"\n\"crates.io/crates/uwuify).\"\nmsgstr \"\"\n\"其實，您已經[在先前的練習中匯入這個 Crate](https://crates.io/crates/uwuify)。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"(Obviously, real translations of Chrome require incredible care and \"\n\"diligence. Don't ship this!)\"\nmsgstr \"(想當然耳，實際翻譯 Chrome 時必須非常審慎認真。千萬別發布這些內容！)\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"Steps\"\nmsgstr \"步驟\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all \"\n\"strings before display. In this special build of Chromium, it should always \"\n\"do this irrespective of the setting of `mangle_localized_strings_`.\"\nmsgstr \"\"\n\"修改 `ResourceBundle::MaybeMangleLocalizedString`，讓所有字串在顯示前 uwu \"\n\"化。在這個特殊版本的 Chromium 中，無論 `mangle_localized_strings_` 的設定為\"\n\"何，一律應執行這項轉換。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If you've done everything right across all these exercises, congratulations, \"\n\"you should have created Chrome for pixies!\"\nmsgstr \"如果您順利完成所有練習，那麼恭喜您成功為精靈打造了 Chrome！\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, \"\n\"and will probably decide that it's better to do the conversion on the C++ \"\n\"side using `base::UTF16ToUTF8` and back again.\"\nmsgstr \"\"\n\"UTF16 與 UTF8：學生應瞭解 Rust 字串一律為 UTF8，且可能判斷出較適合在 C++ 端使\"\n\"用 `base::UTF16ToUTF8` 完成轉換再返回。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"If students decide to do the conversion on the Rust side, they'll need to \"\n\"consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct.\"\n\"String.html#method.from_utf16), consider error handling, and consider which \"\n\"[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/\"\n\"slice.html).\"\nmsgstr \"\"\n\"如果學生決定在 Rust 端完成轉換，就需考慮 [`String::from_utf16`](https://doc.\"\n\"rust-lang.org/std/string/struct.String.html#method.from_utf16)、錯誤處理方\"\n\"式，以及哪些 [CXX 支援的型別可傳輸大量 u16](https://cxx.rs/binding/slice.\"\n\"html)。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"Students may design the C++/Rust boundary in several different ways, e.g. \"\n\"taking and returning strings by value, or taking a mutable reference to a \"\n\"string. If a mutable reference is used, CXX will likely tell the student \"\n\"that they need to use [`Pin`](https://doc.rust-lang.org/std/pin/). You may \"\n\"need to explain what `Pin` does, and then explain why CXX needs it for \"\n\"mutable references to C++ data: the answer is that C++ data can't be moved \"\n\"around like Rust data, because it may contain self-referential pointers.\"\nmsgstr \"\"\n\"學生可透過多種不同的方式設計 C++/Rust 界線，例如依值擷取及傳回字串，或是對字\"\n\"串採用可變動參照。如果使用可變動參照，CXX 可能會告知學生需使用 [`Pin`]\"\n\"(https://doc.rust-lang.org/std/pin/)。您可能需要說明 `Pin` 的功用，並解釋為\"\n\"何 CXX 需要它來處理 C++ 資料的可變動參照：答案是 C++ 資料無法像 Rust 資料一樣\"\n\"移動，因為該資料可能包含自我參照指標。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will \"\n\"need to depend on a `rust_static_library` target. The student probably \"\n\"already did this.\"\nmsgstr \"\"\n\"包含 `ResourceBundle::MaybeMangleLocalizedString` 的 C++ 目標需依附於 \"\n\"`rust_static_library` 目標。學生可能已經這麼做。\"\n\n#: src/exercises/chromium/bringing-it-together.md\nmsgid \"\"\n\"The `rust_static_library` target will need to depend on `//third_party/rust/\"\n\"uwuify/v0_2:lib`.\"\nmsgstr \"\"\n\"`rust_static_library` 目標需依附於 `//third_party/rust/uwuify/v0_2:lib`。\"\n\n#: src/exercises/chromium/solutions.md\nmsgid \"\"\n\"Solutions to the Chromium exercises can be found in [this series of CLs]\"\n\"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560).\"\nmsgstr \"\"\n\"如需 Chromium 練習的解決方案，請參閱[這個 CL 系列](https://chromium-review.\"\n\"googlesource.com/c/chromium/src/+/5096560)。\"\n\n#: src/bare-metal.md\nmsgid \"Welcome to Bare Metal Rust\"\nmsgstr \"歡迎瞭解 Rust 裸機開發\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"This is a standalone one-day course about bare-metal Rust, aimed at people \"\n\"who are familiar with the basics of Rust (perhaps from completing the \"\n\"Comprehensive Rust course), and ideally also have some experience with bare-\"\n\"metal programming in some other language such as C.\"\nmsgstr \"\"\n\"這個為期一天的獨立課程會介紹 Rust 裸機開發，適合熟悉 Rust 基本概念的開發人員 \"\n\"(或許是完成 Comprehensive Rust 課程的學生)，且最好具備一些 C 等其他語言的裸機\"\n\"程式設計經驗。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"Today we will talk about 'bare-metal' Rust: running Rust code without an OS \"\n\"underneath us. This will be divided into several parts:\"\nmsgstr \"\"\n\"今天我們要介紹 Rust「裸機開發」：在執行 Rust 程式碼時不使用作業系統。這會分為\"\n\"以下幾個部分：\"\n\n#: src/bare-metal.md\nmsgid \"What is `no_std` Rust?\"\nmsgstr \"什麼是 `no_std` Rust？\"\n\n#: src/bare-metal.md\nmsgid \"Writing firmware for microcontrollers.\"\nmsgstr \"編寫微控制器的韌體。\"\n\n#: src/bare-metal.md\nmsgid \"Writing bootloader / kernel code for application processors.\"\nmsgstr \"編寫應用程式處理器的系統啟動載入程式/核心程式碼。\"\n\n#: src/bare-metal.md\nmsgid \"Some useful crates for bare-metal Rust development.\"\nmsgstr \"一些適用於 Rust 裸機開發的實用 Crate。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"For the microcontroller part of the course we will use the [BBC micro:bit]\"\n\"(https://microbit.org/) v2 as an example. It's a [development board](https://\"\n\"tech.microbit.org/hardware/) based on the Nordic nRF51822 microcontroller \"\n\"with some LEDs and buttons, an I2C-connected accelerometer and compass, and \"\n\"an on-board SWD debugger.\"\nmsgstr \"\"\n\"在本課程的微控制器部分，我們將使用 [BBC micro:bit](https://microbit.org/) 第 \"\n\"2 版當做範例。這是以 Nordic nRF51822 微控制器為基礎的[開發板](https://tech.\"\n\"microbit.org/hardware/)，具備一些 LED 和按鈕、連接 I2C 的加速計和羅盤，以及內\"\n\"建的 SWD 偵錯工具。\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"To get started, install some tools we'll need later. On gLinux or Debian:\"\nmsgstr \"如要開始使用，請先安裝稍後需使用的工具。使用 gLinux 或 Debian：\"\n\n#: src/bare-metal.md\nmsgid \"\"\n\"And give users in the `plugdev` group access to the micro:bit programmer:\"\nmsgstr \"為 `plugdev` 群組中的使用者授予 micro:bit 程式工具的存取權：\"\n\n#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md\nmsgid \"On MacOS:\"\nmsgstr \"使用 MacOS：\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`core`\"\nmsgstr \"`core`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std`\"\nmsgstr \"`std`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"Slices, `&str`, `CStr`\"\nmsgstr \"切片、`&str`、`CStr`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonZeroU8`...\"\nmsgstr \"`NonZeroU8`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Option`, `Result`\"\nmsgstr \"`Option`、`Result`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Display`, `Debug`, `write!`...\"\nmsgstr \"`Display`、`Debug`、`write!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`panic!`, `assert_eq!`...\"\nmsgstr \"`panic!`、`assert_eq!`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`NonNull` and all the usual pointer-related functions\"\nmsgstr \"`NonNull` 和所有一般指標相關函式\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Future` and `async`/`await`\"\nmsgstr \"`Future` 和 `async`/`await`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`...\"\nmsgstr \"`fence`、`AtomicBool`、`AtomicPtr`、`AtomicU32`...\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Duration`\"\nmsgstr \"`Duration`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Box`, `Cow`, `Arc`, `Rc`\"\nmsgstr \"`Box`、`Cow`、`Arc`、`Rc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`\"\nmsgstr \"`Vec`、`BinaryHeap`、`BtreeMap`、`LinkedList`、`VecDeque`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`String`, `CString`, `format!`\"\nmsgstr \"`String`、`CString`、`format!`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Error`\"\nmsgstr \"`Error`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`\"\nmsgstr \"`Mutex`、`Condvar`、`Barrier`、`Once`、`RwLock`、`mpsc`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`File` and the rest of `fs`\"\nmsgstr \"`File` 和 `fs` 其餘部分\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`\"\nmsgstr \"`println!`、`Read`、`Write`、`Stdin`、`Stdout` 和 `io` 其餘部分\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Path`, `OsString`\"\nmsgstr \"`Path`、`OsString`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`net`\"\nmsgstr \"`net`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`Command`, `Child`, `ExitCode`\"\nmsgstr \"`Command`、`Child`、`ExitCode`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`spawn`, `sleep` and the rest of `thread`\"\nmsgstr \"`spawn`、`sleep` 和 `thread` 其餘部分\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`SystemTime`, `Instant`\"\nmsgstr \"`SystemTime`、`Instant`\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`HashMap` depends on RNG.\"\nmsgstr \"`HashMap` 依附於 RNG。\"\n\n#: src/bare-metal/no_std.md\nmsgid \"`std` re-exports the contents of both `core` and `alloc`.\"\nmsgstr \"`std` 會重新匯出 `core` 和 `alloc` 的內容。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"A minimal `no_std` program\"\nmsgstr \"最簡單的 `no_std` 程式\"\n\n#: src/bare-metal/minimal.md\nmsgid \"This will compile to an empty binary.\"\nmsgstr \"這會編譯為空白的二進位檔。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"`std` provides a panic handler; without it we must provide our own.\"\nmsgstr \"`std` 提供恐慌處理常式。如果沒有，我們就須自行提供。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"It can also be provided by another crate, such as `panic-halt`.\"\nmsgstr \"也可以由其他 Crate 提供，例如 `panic-halt`。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Depending on the target, you may need to compile with `panic = \\\"abort\\\"` to \"\n\"avoid an error about `eh_personality`.\"\nmsgstr \"\"\n\"視目標而定，編譯時可能需要使用 `panic = \\\"abort\\\"`，以免發生 \"\n\"`eh_personality` 相關錯誤。\"\n\n#: src/bare-metal/minimal.md\nmsgid \"\"\n\"Note that there is no `main` or any other entry point; it's up to you to \"\n\"define your own entry point. This will typically involve a linker script and \"\n\"some assembly code to set things up ready for Rust code to run.\"\nmsgstr \"\"\n\"請注意，並沒有 `main` 或任何其他進入點。您可以自行定義進入點。這通常涉及連結\"\n\"器指令碼和一些組語程式碼，以便準備好執行 Rust 程式碼。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"To use `alloc` you must implement a [global (heap) allocator](https://doc.\"\n\"rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html).\"\nmsgstr \"\"\n\"如要使用 `alloc`，您必須實作[全域 (堆積) 分配器](https://doc.rust-lang.org/\"\n\"stable/std/alloc/trait.GlobalAlloc.html)。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\nmsgstr \"\"\n\"// Safe because `HEAP` is only used here and `entry` is only called once.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Give the allocator some memory to allocate.\\n\"\nmsgstr \"// Give the allocator some memory to allocate.\\n\"\n\n#: src/bare-metal/alloc.md\nmsgid \"// Now we can do things that require heap allocation.\\n\"\nmsgstr \"// Now we can do things that require heap allocation.\\n\"\n\n#: src/bare-metal/alloc.md\n#, fuzzy\nmsgid \"\\\"A string\\\"\"\nmsgstr \"String\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`buddy_system_allocator` is a third-party crate implementing a basic buddy \"\n\"system allocator. Other crates are available, or you can write your own or \"\n\"hook into your existing allocator.\"\nmsgstr \"\"\n\"`buddy_system_allocator` 是實作基本夥伴系統分配器的第三方 Crate。也可以使用其\"\n\"他 Crate，或是自行撰寫或連結至現有分配器。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"The const parameter of `LockedHeap` is the max order of the allocator; i.e. \"\n\"in this case it can allocate regions of up to 2\\\\*\\\\*32 bytes.\"\nmsgstr \"\"\n\"`LockedHeap` 的 const 參數是分配器最高的階，意即在本例中，它最多可分配 \"\n\"2\\\\*\\\\*32 個位元組的區域。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"If any crate in your dependency tree depends on `alloc` then you must have \"\n\"exactly one global allocator defined in your binary. Usually this is done in \"\n\"the top-level binary crate.\"\nmsgstr \"\"\n\"如果依附元件樹狀結構中有任何 Crate 依附於 `alloc`，您就必須在二進位檔中只定義\"\n\"一個全域分配器。通常是在頂層二進位檔 Crate 中定義。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"\"\n\"`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` \"\n\"crate is linked in so we get its panic handler.\"\nmsgstr \"\"\n\"務必使用 `extern crate panic_halt as _`，確保 `panic_halt` Crate 已連結，讓我\"\n\"們能取得其恐慌處理常式。\"\n\n#: src/bare-metal/alloc.md\nmsgid \"This example will build but not run, as it doesn't have an entry point.\"\nmsgstr \"這個範例將建構但不執行，因為沒有進入點。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt` crate provides (among other things) a reset handler for \"\n\"Cortex M microcontrollers.\"\nmsgstr \"\"\n\"`cortex_m_rt` Crate 提供 Cortex M 微控制器的重設處理常式 (和其他項目)。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"Next we'll look at how to access peripherals, with increasing levels of \"\n\"abstraction.\"\nmsgstr \"接下來，我們要探討如何存取周邊裝置，會有愈來愈多層的抽象化。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"\"\n\"The `cortex_m_rt::entry` macro requires that the function have type `fn() -\"\n\"> !`, because returning to the reset handler doesn't make sense.\"\nmsgstr \"\"\n\"`cortex_m_rt::entry` 巨集規定函式必須具有 `fn() -> !` 型別，因為返回重設處理\"\n\"常式並不合理。\"\n\n#: src/bare-metal/microcontrollers.md\nmsgid \"Run the example with `cargo embed --bin minimal`\"\nmsgstr \"使用 `cargo embed --bin minimal` 執行範例\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"Most microcontrollers access peripherals via memory-mapped IO. Let's try \"\n\"turning on an LED on our micro:bit:\"\nmsgstr \"\"\n\"大多數微控制器會透過記憶體對映 IO 存取周邊裝置。請嘗試在 micro:bit 上開啟 \"\n\"LED：\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"/// GPIO port 0 peripheral address\\n\"\nmsgstr \"/// GPIO port 0 peripheral address\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// GPIO peripheral offsets\\n\"\nmsgstr \"// GPIO peripheral offsets\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"// PIN_CNF fields\\n\"\nmsgstr \"// PIN_CNF fields\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\nmsgstr \"// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\nmsgstr \"\"\n\"// Safe because the pointers are to valid peripheral control registers, and\\n\"\n\"    // no aliases exist.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\nmsgstr \"// Set pin 28 low and pin 21 high to turn the LED on.\\n\"\n\n#: src/bare-metal/microcontrollers/mmio.md\nmsgid \"\"\n\"GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 \"\n\"to the first row.\"\nmsgstr \"GPIO 0 接腳 21 連接至 LED 矩陣的第一欄，接腳 28 則連接至第一列。\"\n\n#: src/bare-metal/microcontrollers/mmio.md\n#: src/bare-metal/microcontrollers/pacs.md\n#: src/bare-metal/microcontrollers/hals.md\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Run the example with:\"\nmsgstr \"使用下列指令執行範例：\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"Peripheral Access Crates\"\nmsgstr \"周邊裝置存取 Crate\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust \"\n\"wrappers for memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/\"\n\"pack/doc/CMSIS/SVD/html/index.html) files.\"\nmsgstr \"\"\n\"[`svd2rust`](https://crates.io/crates/svd2rust) 會針對 [CMSIS-SVD](https://\"\n\"www.keil.com/pack/doc/CMSIS/SVD/html/index.html) 檔案中記憶體對映周邊裝置，產\"\n\"生大多是安全的 Rust 包裝函式。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD (System View Description) files are XML files typically provided by \"\n\"silicon vendors which describe the memory map of the device.\"\nmsgstr \"\"\n\"SVD (系統視圖說明) 檔案通常是晶片供應商提供的 XML 檔案，描述裝置的記憶體對\"\n\"映。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"They are organised by peripheral, register, field and value, with names, \"\n\"descriptions, addresses and so on.\"\nmsgstr \"\"\n\"這種檔案的分類依據為周邊裝置、暫存器、欄位和值，具有名稱、說明、位址等資訊。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"SVD files are often buggy and incomplete, so there are various projects \"\n\"which patch the mistakes, add missing details, and publish the generated \"\n\"crates.\"\nmsgstr \"\"\n\"SVD 檔案通常有很多錯誤且不完整，因此會使用各種專案修補錯誤、新增缺少的詳細資\"\n\"料，以及發布產生的 Crate。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"`cortex-m-rt` provides the vector table, among other things.\"\nmsgstr \"`cortex-m-rt` 提供向量表等內容。\"\n\n#: src/bare-metal/microcontrollers/pacs.md\nmsgid \"\"\n\"If you `cargo install cargo-binutils` then you can run `cargo objdump --bin \"\n\"pac -- -d --no-show-raw-insn` to see the resulting binary.\"\nmsgstr \"\"\n\"如果使用 `cargo install cargo-binutils`，則可以執行 `cargo objdump --bin pac \"\n\"-- -d --no-show-raw-insn`，查看產生的二進位檔。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"HAL crates\"\nmsgstr \"HAL Crate\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-\"\n\"implementation-crates) for many microcontrollers provide wrappers around \"\n\"various peripherals. These generally implement traits from [`embedded-hal`]\"\n\"(https://crates.io/crates/embedded-hal).\"\nmsgstr \"\"\n\"許多微控制器的 [HAL Crate](https://github.com/rust-embedded/awesome-embedded-\"\n\"rust#hal-implementation-crates) 能為各種周邊裝置提供包裝函式。這些項目通常會\"\n\"實作 [`embedded-hal`](https://crates.io/crates/embedded-hal) 的特徵。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"// Create HAL wrapper for GPIO port 0.\\n\"\nmsgstr \"// Create HAL wrapper for GPIO port 0.\\n\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait.\"\nmsgstr \"`set_low` 和 `set_high` 是 `embedded_hal` `OutputPin` 特徵上的方法。\"\n\n#: src/bare-metal/microcontrollers/hals.md\nmsgid \"\"\n\"HAL crates exist for many Cortex-M and RISC-V devices, including various \"\n\"STM32, GD32, nRF, NXP, MSP430, AVR and PIC microcontrollers.\"\nmsgstr \"\"\n\"許多 Cortex-M 和 RISC-V 裝置都有 HAL Crate，包括各種 STM32、GD32、nRF、NXP、\"\n\"MSP430、AVR 和 PIC 微控制器。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"Board support crates\"\nmsgstr \"開發板支援 Crate\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"Board support crates provide a further level of wrapping for a specific \"\n\"board for convenience.\"\nmsgstr \"為方便起見，開發板支援 Crate 可針對特定開發板提供進一步包裝。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"In this case the board support crate is just providing more useful names, \"\n\"and a bit of initialisation.\"\nmsgstr \"在本例中，開發板支援 Crate 只會提供更多實用名稱，以及一些初始化作業。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"\"\n\"The crate may also include drivers for some on-board devices outside of the \"\n\"microcontroller itself.\"\nmsgstr \"除了微控制器本身，Crate 或許也包含部分內建裝置的驅動程式。\"\n\n#: src/bare-metal/microcontrollers/board-support.md\nmsgid \"`microbit-v2` includes a simple driver for the LED matrix.\"\nmsgstr \"`microbit-v2` 包含 LED 矩陣的簡易驅動程式。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"The type state pattern\"\nmsgstr \"型別狀態模式\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\nmsgstr \"// let gpio0_01_again = gpio0.p0_01; // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"// pin_input.is_high(); // Error, moved.\\n\"\nmsgstr \"// pin_input.is_high(); // Error, moved.\\n\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Pins don't implement `Copy` or `Clone`, so only one instance of each can \"\n\"exist. Once a pin is moved out of the port struct nobody else can take it.\"\nmsgstr \"\"\n\"接腳不會實作 `Copy` 或 `Clone`，因此每個項目只能有一個實例。一旦接腳從連接埠\"\n\"結構中移出，就無法再供使用。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"Changing the configuration of a pin consumes the old pin instance, so you \"\n\"can’t keep use the old instance afterwards.\"\nmsgstr \"變更接腳設定時會耗用舊的接腳例項，因此之後無法繼續使用舊的例項。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"The type of a value indicates the state that it is in: e.g. in this case, \"\n\"the configuration state of a GPIO pin. This encodes the state machine into \"\n\"the type system, and ensures that you don't try to use a pin in a certain \"\n\"way without properly configuring it first. Illegal state transitions are \"\n\"caught at compile time.\"\nmsgstr \"\"\n\"值的型別會指出其所處狀態，例如本例中 GPIO 接腳的設定狀態。這可將狀態機器編碼\"\n\"至型別系統，確保您不會在未事先適當設定時嘗試使用接腳。在編譯期間，系統會偵測\"\n\"非法的狀態轉換作業。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"\"\n\"You can call `is_high` on an input pin and `set_high` on an output pin, but \"\n\"not vice-versa.\"\nmsgstr \"\"\n\"您可以對輸入接腳呼叫 `is_high`、對輸出接腳呼叫`set_high`，但不得反過來呼叫。\"\n\n#: src/bare-metal/microcontrollers/type-state.md\nmsgid \"Many HAL crates follow this pattern.\"\nmsgstr \"許多 HAL Crate 都遵循這個模式。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a \"\n\"number of traits covering common microcontroller peripherals.\"\nmsgstr \"\"\n\"[`embedded-hal`](https://crates.io/crates/embedded-hal) Crate 提供多個特徵，\"\n\"涵蓋常見的微控制器周邊裝置。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"GPIO\"\nmsgstr \"GPIO\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"ADC\"\nmsgstr \"ADC\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"I2C, SPI, UART, CAN\"\nmsgstr \"I2C、SPI、UART、CAN\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"RNG\"\nmsgstr \"RNG\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Timers\"\nmsgstr \"計時器\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"Watchdogs\"\nmsgstr \"看門狗計時器\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"Other crates then implement [drivers](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates) in terms of these traits, e.g. an \"\n\"accelerometer driver might need an I2C or SPI bus implementation.\"\nmsgstr \"\"\n\"其他 Crate 隨後會根據這些特徵實作[驅動程式](https://github.com/rust-embedded/\"\n\"awesome-embedded-rust#driver-crates)，例如加速計驅動程式可能需要實作 I2C 或 \"\n\"SPI 匯流排。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There are implementations for many microcontrollers, as well as other \"\n\"platforms such as Linux on Raspberry Pi.\"\nmsgstr \"\"\n\"許多微控制器和其他平台 (例如 Raspberry Pi 上的 Linux) 都有相應的實作項目。\"\n\n#: src/bare-metal/microcontrollers/embedded-hal.md\nmsgid \"\"\n\"There is work in progress on an `async` version of `embedded-hal`, but it \"\n\"isn't stable yet.\"\nmsgstr \"`embedded-hal` 的 `async` 版本已在開發中，但尚未推出穩定版。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, \"\n\"like OpenOCD but better integrated.\"\nmsgstr \"\"\n\"[probe-rs](https://probe.rs/) 是適用於嵌入式偵錯的實用工具組，就像 OpenOCD，\"\n\"但整合效果更好。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes\"\nmsgstr \"透過 CMSIS-DAP、ST-Link 和 J-Link 探測器執行 SWD (序列線偵錯) 和 JTAG\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"GDB stub and Microsoft DAP (Debug Adapter Protocol) server\"\nmsgstr \"GDB 虛設常式和 Microsoft DAP (偵錯轉接程式通訊協定) 伺服器\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"Cargo integration\"\nmsgstr \"Cargo 整合\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT \"\n\"(Real Time Transfers) output and connect GDB. It's configured by an `Embed.\"\n\"toml` file in your project directory.\"\nmsgstr \"\"\n\"`cargo-embed` 是 Cargo 子指令，用於建構和刷新二進位檔、記錄 RTT (即時傳輸)輸\"\n\"出內容，以及連結 GDB。這個指令是由專案目錄中的 `Embed.toml` 檔案來設定。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is \"\n\"an Arm standard protocol over USB for an in-circuit debugger to access the \"\n\"CoreSight Debug Access Port of various Arm Cortex processors. It's what the \"\n\"on-board debugger on the BBC micro:bit uses.\"\nmsgstr \"\"\n\"[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) 是針\"\n\"對 USB 的 Arm 標準通訊協定，供電路內偵錯工具存取各種 Arm Cortex 處理器的 \"\n\"CoreSight 偵錯存取埠。這就是 BBC micro:bit 內建偵錯工具所使用的通訊協定。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link \"\n\"is a range from SEGGER.\"\nmsgstr \"\"\n\"ST-Link 是 ST Microelectronics 推出的一系列電路內偵錯工具，J-Link 系列則來自 \"\n\"SEGGER。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin \"\n\"Serial Wire Debug.\"\nmsgstr \"偵錯存取埠通常是 5 接腳的 JTAG 介面或 2 接腳的序列線偵錯介面。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"probe-rs is a library which you can integrate into your own tools if you \"\n\"want to.\"\nmsgstr \"您可以視需要將 probe-rs 程式庫整合至自己的工具。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-\"\n\"adapter-protocol/) lets VSCode and other IDEs debug code running on any \"\n\"supported microcontroller.\"\nmsgstr \"\"\n\"[Microsoft 偵錯轉接程式通訊協定](https://microsoft.github.io/debug-adapter-\"\n\"protocol/)允許在任何支援的微控制器上執行 VSCode 及其他 IDE 偵錯程式碼。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"cargo-embed is a binary built using the probe-rs library.\"\nmsgstr \"cargo-embed 是使用 probe-rs 程式庫建構的二進位檔。\"\n\n#: src/bare-metal/microcontrollers/probe-rs.md\nmsgid \"\"\n\"RTT (Real Time Transfers) is a mechanism to transfer data between the debug \"\n\"host and the target through a number of ringbuffers.\"\nmsgstr \"\"\n\"RTT (即時傳輸) 這種機制是透過多個環形緩衝區，在偵錯主機和目標之間傳輸資料。\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"_Embed.toml_:\"\nmsgstr \"Embed.toml：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In one terminal under `src/bare-metal/microcontrollers/examples/`:\"\nmsgstr \"在 `src/bare-metal/microcontrollers/examples/` 底下的一個終端機中：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In another terminal in the same directory:\"\nmsgstr \"在相同目錄的另一個終端機中：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"On gLinux or Debian:\"\nmsgstr \"使用 gLinux 或 Debian：\"\n\n#: src/bare-metal/microcontrollers/debugging.md\nmsgid \"In GDB, try running:\"\nmsgstr \"在 GDB 中，嘗試執行下列指令：\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Other projects\"\nmsgstr \"其他專案\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[RTIC](https://rtic.rs/)\"\nmsgstr \"[RTIC](https://rtic.rs/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\\\"Real-Time Interrupt-driven Concurrency\\\"\"\nmsgstr \"「即時中斷驅動並行」\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Shared resource management, message passing, task scheduling, timer queue\"\nmsgstr \"共用資源管理、訊息傳遞、工作排程、計時器佇列\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Embassy](https://embassy.dev/)\"\nmsgstr \"[Embassy](https://embassy.dev/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"`async` executors with priorities, timers, networking, USB\"\nmsgstr \"具有優先順序、計時器、網路、USB 功能的 `async` 執行器\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\nmsgstr \"[TockOS](https://www.tockos.org/documentation/getting-started)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Security-focused RTOS with preemptive scheduling and Memory Protection Unit \"\n\"support\"\nmsgstr \"注重安全性的 RTOS，提供先占式排程功能，並支援記憶體保護單元\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Hubris](https://hubris.oxide.computer/)\"\nmsgstr \"[Hubris](https://hubris.oxide.computer/)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Microkernel RTOS from Oxide Computer Company with memory protection, \"\n\"unprivileged drivers, IPC\"\nmsgstr \"\"\n\"Oxide Computer Company 的微核心 RTOS，提供記憶體防護、未具有特權的驅動程式、\"\n\"IPC\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)\"\nmsgstr \"[FreeRTOS 繫結](https://github.com/lobaro/FreeRTOS-rust)\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs.\"\n\"github.io/book/overview/using-the-standard-library.html).\"\nmsgstr \"\"\n\"部分平台提供 `std` 實作項目，例如 [esp-idf](https://esp-rs.github.io/book/\"\n\"overview/using-the-standard-library.html)。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"RTIC can be considered either an RTOS or a concurrency framework.\"\nmsgstr \"RTIC 可視為 RTOS 或並行架構。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"It doesn't include any HALs.\"\nmsgstr \"其中不包含任何 HAL。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for \"\n\"scheduling rather than a proper kernel.\"\nmsgstr \"\"\n\"排程時會使用 Cortex-M NVIC (巢狀虛擬中斷控制器)，而不是使用適當的核心。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"Cortex-M only.\"\nmsgstr \"僅限 Cortex-M。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"Google uses TockOS on the Haven microcontroller for Titan security keys.\"\nmsgstr \"Google 會針對 Titan 安全金鑰，在 Haven 微控制器上使用 TockOS。\"\n\n#: src/bare-metal/microcontrollers/other-projects.md\nmsgid \"\"\n\"FreeRTOS is mostly written in C, but there are Rust bindings for writing \"\n\"applications.\"\nmsgstr \"FreeRTOS 大部分以 C 語言編寫，但也有適合編寫應用程式的 Rust 繫結。\"\n\n#: src/exercises/bare-metal/morning.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port.\"\nmsgstr \"我們將讀取 I2C 羅盤中的方向，並將讀數記錄到序列埠。\"\n\n#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"morning.md) provided.\"\nmsgstr \"完成練習後，您可以看看我們提供的[解決方案](solutions-morning.md)。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"We will read the direction from an I2C compass, and log the readings to a \"\n\"serial port. If you have time, try displaying it on the LEDs somehow too, or \"\n\"use the buttons somehow.\"\nmsgstr \"\"\n\"我們將讀取 I2C 羅盤上的方向，並將讀數記錄到序列埠。如有時間，可以試著顯示在 \"\n\"LED 上，或以某種方法使用按鈕。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Hints:\"\nmsgstr \"提示：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/\"\n\"latest/lsm303agr/) and [`microbit-v2`](https://docs.rs/microbit-v2/latest/\"\n\"microbit/) crates, as well as the [micro:bit hardware](https://tech.microbit.\"\n\"org/hardware/).\"\nmsgstr \"\"\n\"參閱 [`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) 和 \"\n\"[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) Crate 的說明文\"\n\"件，並瞭解 [micro:bit 硬體](https://tech.microbit.org/hardware/)。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.\"\nmsgstr \"LSM303AGR 慣性測量單元已連接至內部 I2C 匯流排。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"TWI is another name for I2C, so the I2C master peripheral is called TWIM.\"\nmsgstr \"TWI 是 I2C 的別名，所以 I2C 主周邊裝置的名稱是 TWIM。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"The LSM303AGR driver needs something implementing the `embedded_hal::\"\n\"blocking::i2c::WriteRead` trait. The [`microbit::hal::Twim`](https://docs.rs/\"\n\"microbit-v2/latest/microbit/hal/struct.Twim.html) struct implements this.\"\nmsgstr \"\"\n\"LSM303AGR 驅動程式需要某個實作 `embedded_hal::blocking::i2c::WriteRead` 特徵\"\n\"的項目。[`microbit::hal::Twim`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"hal/struct.Twim.html) 結構體實作此特徵。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/\"\n\"struct.Board.html) struct with fields for the various pins and peripherals.\"\nmsgstr \"\"\n\"您有 [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/struct.\"\n\"Board.html) 結構體，其中包含各種接腳和周邊裝置的欄位。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi.\"\n\"com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it shouldn't be necessary for \"\n\"this exercise.\"\nmsgstr \"\"\n\"您也可以視需要查看 [nRF52833 規格書](https://infocenter.nordicsemi.com/pdf/\"\n\"nRF52833_PS_v1.5.pdf)，但在這項練習中並非必要。\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `compass` directory for the following files.\"\nmsgstr \"\"\n\"請下載[練習範本](../../comprehensive-rust-exercises.zip)，並在 `compass` 目錄\"\n\"中查看下列檔案。\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_src/main.rs_:\"\nmsgstr \"_src/main.rs_:\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_Cargo.toml_ (you shouldn't need to change this):\"\nmsgstr \"Cargo.toml (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"_Embed.toml_ (you shouldn't need to change this):\"\nmsgstr \"Embed.toml (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md\nmsgid \"_.cargo/config.toml_ (you shouldn't need to change this):\"\nmsgstr \".cargo/config.toml (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"See the serial output on Linux with:\"\nmsgstr \"使用下列指令在 Linux 查看序列輸出內容：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"\"\n\"Or on Mac OS something like (the device name may be slightly different):\"\nmsgstr \"或在 macOS 上使用類似如下的指令 (裝置名稱可能略有不同)：\"\n\n#: src/exercises/bare-metal/compass.md\nmsgid \"Use Ctrl+A Ctrl+Q to quit picocom.\"\nmsgstr \"按下 Ctrl + A、Ctrl + Q 鍵即可退出 picocom。\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"Bare Metal Rust Morning Exercise\"\nmsgstr \"Rust 裸機開發：上午練習\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"([back to exercise](compass.md))\"\nmsgstr \"([返回練習](compass.md))\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Configure serial port.\\n\"\nmsgstr \"// Configure serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Use the system timer as a delay provider.\\n\"\nmsgstr \"// Use the system timer as a delay provider.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\nmsgstr \"// Set up the I2C controller and Inertial Measurement Unit.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Setting up IMU...\\\"\"\nmsgstr \"\\\"Setting up IMU...\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Set up display and timer.\\n\"\nmsgstr \"// Set up display and timer.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"Ready.\\\"\"\nmsgstr \"\\\"Ready.\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"// Read compass data and log it to the serial port.\\n\"\nmsgstr \"// Read compass data and log it to the serial port.\\n\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\nmsgstr \"\\\"{},{},{}\\\\t{},{},{}\\\"\"\n\n#: src/exercises/bare-metal/solutions-morning.md\nmsgid \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\nmsgstr \"\"\n\"// If button A is pressed, switch to the next mode and briefly blink all \"\n\"LEDs\\n\"\n\"        // on.\\n\"\n\n#: src/bare-metal/aps.md\nmsgid \"Application processors\"\nmsgstr \"應用程式處理器\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"So far we've talked about microcontrollers, such as the Arm Cortex-M series. \"\n\"Now let's try writing something for Cortex-A. For simplicity we'll just work \"\n\"with QEMU's aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/system/arm/\"\n\"virt.html) board.\"\nmsgstr \"\"\n\"目前我們已介紹過微控制器，例如 Arm Cortex-M 系列產品，現在來試著為 Cortex-A \"\n\"撰寫一些內容。為求簡單，我們會使用 QEMU 的 aarch64 ['virt'](https://qemu-\"\n\"project.gitlab.io/qemu/system/arm/virt.html) 開發板。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"Broadly speaking, microcontrollers don't have an MMU or multiple levels of \"\n\"privilege (exception levels on Arm CPUs, rings on x86), while application \"\n\"processors do.\"\nmsgstr \"\"\n\"普遍來說，微控制器並沒有 MMU 或多個權限層級 (Arm CPU 上的例外狀況層級、x86 上\"\n\"的環)，但應用程式處理器有。\"\n\n#: src/bare-metal/aps.md\nmsgid \"\"\n\"QEMU supports emulating various different machines or board models for each \"\n\"architecture. The 'virt' board doesn't correspond to any particular real \"\n\"hardware, but is designed purely for virtual machines.\"\nmsgstr \"\"\n\"QEMU 可針對每個架構模擬不同的機器或開發板模型。'virt' 開發板並無對應至任何特\"\n\"定的真實硬體，而是專為虛擬機器設計。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Before we can start running Rust code, we need to do some initialisation.\"\nmsgstr \"我們需要先完成一些初始化作業，才能開始執行 Rust 程式碼。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\nmsgstr \"\"\n\"```armasm\\n\"\n\".section .init.entry, \\\"ax\\\"\\n\"\n\".global entry\\n\"\n\"entry:\\n\"\n\"    /*\\n\"\n\"     * Load and apply the memory management configuration, ready to enable \"\n\"MMU and\\n\"\n\"     * caches.\\n\"\n\"     */\\n\"\n\"    adrp x30, idmap\\n\"\n\"    msr ttbr0_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lmairval\\n\"\n\"    msr mair_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Ltcrval\\n\"\n\"    /* Copy the supported PA range into TCR_EL1.IPS. */\\n\"\n\"    mrs x29, id_aa64mmfr0_el1\\n\"\n\"    bfi x30, x29, #32, #4\\n\"\n\"\\n\"\n\"    msr tcr_el1, x30\\n\"\n\"\\n\"\n\"    mov_i x30, .Lsctlrval\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Ensure everything before this point has completed, then invalidate \"\n\"any\\n\"\n\"     * potentially stale local TLB entries before they start being used.\\n\"\n\"     */\\n\"\n\"    isb\\n\"\n\"    tlbi vmalle1\\n\"\n\"    ic iallu\\n\"\n\"    dsb nsh\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /*\\n\"\n\"     * Configure sctlr_el1 to enable MMU and cache and don't proceed until \"\n\"this\\n\"\n\"     * has completed.\\n\"\n\"     */\\n\"\n\"    msr sctlr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Disable trapping floating point access in EL1. */\\n\"\n\"    mrs x30, cpacr_el1\\n\"\n\"    orr x30, x30, #(0x3 << 20)\\n\"\n\"    msr cpacr_el1, x30\\n\"\n\"    isb\\n\"\n\"\\n\"\n\"    /* Zero out the bss section. */\\n\"\n\"    adr_l x29, bss_begin\\n\"\n\"    adr_l x30, bss_end\\n\"\n\"0:  cmp x29, x30\\n\"\n\"    b.hs 1f\\n\"\n\"    stp xzr, xzr, [x29], #16\\n\"\n\"    b 0b\\n\"\n\"\\n\"\n\"1:  /* Prepare the stack. */\\n\"\n\"    adr_l x30, boot_stack_end\\n\"\n\"    mov sp, x30\\n\"\n\"\\n\"\n\"    /* Set up exception vector. */\\n\"\n\"    adr x30, vector_table_el1\\n\"\n\"    msr vbar_el1, x30\\n\"\n\"\\n\"\n\"    /* Call into Rust code. */\\n\"\n\"    bl main\\n\"\n\"\\n\"\n\"    /* Loop forever waiting for interrupts. */\\n\"\n\"2:  wfi\\n\"\n\"    b 2b\\n\"\n\"```\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"This is the same as it would be for C: initialising the processor state, \"\n\"zeroing the BSS, and setting up the stack pointer.\"\nmsgstr \"\"\n\"這與使用 C 時相同：將處理器狀態初始化、將 BSS 設為零，以及設定堆疊指標。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS (block starting symbol, for historical reasons) is the part of the \"\n\"object file which containing statically allocated variables which are \"\n\"initialised to zero. They are omitted from the image, to avoid wasting space \"\n\"on zeroes. The compiler assumes that the loader will take care of zeroing \"\n\"them.\"\nmsgstr \"\"\n\"BSS (區塊起始符號，因歷史因素而存在) 是物件檔案的一部分，含有初始化為零的靜態\"\n\"分配變數。映像檔會省略這些變數，以免浪費空間儲存零。編譯器會假設由載入器負責\"\n\"將變數初始化為零。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"The BSS may already be zeroed, depending on how memory is initialised and \"\n\"the image is loaded, but we zero it to be sure.\"\nmsgstr \"\"\n\"視記憶體初始化及映像檔載入方式而定，BSS 可能已為零，但為了確定，我們會將它設\"\n\"為零。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We need to enable the MMU and cache before reading or writing any memory. If \"\n\"we don't:\"\nmsgstr \"我們需要啟用 MMU 和快取，才能讀取或寫入任何記憶體。如果不這樣做：\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"Unaligned accesses will fault. We build the Rust code for the `aarch64-\"\n\"unknown-none` target which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses, so it should be fine in this case, but this \"\n\"is not necessarily the case in general.\"\nmsgstr \"\"\n\"未對齊的存取會發生錯誤。我們是為 `aarch64-unknown-none` 目標建構 Rust 程式\"\n\"碼，這會設定 `+strict-align`，防止編譯器產生未對齊的存取，因此在本例中應該不\"\n\"會出錯，但這不一定是一般情況。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost when the cache \"\n\"is cleaned or the VM enables the cache. (Cache is keyed by physical address, \"\n\"not VA or IPA.)\"\nmsgstr \"\"\n\"如果是在 VM 中執行，可能會導致快取一致性問題。問題在於 VM 會在快取已停用時直\"\n\"接存取記憶體，而主機具有相同記憶體的可快取別名。即使主機未明確存取記憶體，推\"\n\"測存取行為仍可能導致快取填補，而當快取遭到清理或 VM 啟用快取時，存取之間的變\"\n\"更就會遺失 (快取是以實體位址做為索引鍵，並非使用 VA 或 IPA)。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which \"\n\"identity maps the first 1 GiB of address space for devices, the next 1 GiB \"\n\"for DRAM, and another 1 GiB higher up for more devices. This matches the \"\n\"memory layout that QEMU uses.\"\nmsgstr \"\"\n\"為求簡單，我們只使用寫死的分頁表 (見 `idmap.S`)，其中前 1 GiB 的位址空間是對\"\n\"應至裝置、接下來 1 GiB 是對應至 DRAM，另外 1 GiB 以上則適用更多裝置。這符合 \"\n\"QEMU 使用的記憶體布局。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"We also set up the exception vector (`vbar_el1`), which we'll see more about \"\n\"later.\"\nmsgstr \"我們也會設定例外狀況向量 (`vbar_el1`)，稍後將進一步說明。\"\n\n#: src/bare-metal/aps/entry-point.md\nmsgid \"\"\n\"All examples this afternoon assume we will be running at exception level 1 \"\n\"(EL1). If you need to run at a different exception level you'll need to \"\n\"modify `entry.S` accordingly.\"\nmsgstr \"\"\n\"今天下午的所有例子都假設我們會在例外狀況層級 1 (EL1) 執行。如要在不同的例外狀\"\n\"況層級執行，就需據以修改 `entry.S`。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"Inline assembly\"\nmsgstr \"行內組語\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Sometimes we need to use assembly to do things that aren't possible with \"\n\"Rust code. For example, to make an HVC (hypervisor call) to tell the \"\n\"firmware to power off the system:\"\nmsgstr \"\"\n\"有時候，我們需要使用組語，才能執行 Rust 程式碼無法執行的作業。舉例來說，如要\"\n\"發出 HVC (管理程序呼叫) 指示韌體關閉系統：\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\nmsgstr \"\"\n\"// Safe because this only uses the declared registers and doesn't do\\n\"\n\"    // anything with memory.\\n\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"hvc #0\\\"\"\nmsgstr \"\\\"hvc #0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w0\\\"\"\nmsgstr \"\\\"w0\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w1\\\"\"\nmsgstr \"\\\"w1\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w2\\\"\"\nmsgstr \"\\\"w2\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w3\\\"\"\nmsgstr \"\\\"w3\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w4\\\"\"\nmsgstr \"\\\"w4\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w5\\\"\"\nmsgstr \"\\\"w5\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w6\\\"\"\nmsgstr \"\\\"w6\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\\\"w7\\\"\"\nmsgstr \"\\\"w7\\\"\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"(If you actually want to do this, use the [`smccc`](https://crates.io/crates/\"\n\"smccc) crate which has wrappers for all these functions.)\"\nmsgstr \"\"\n\"(如果您確實想執行這項操作，請使用 [`smccc`](https://crates.io/crates/smccc) \"\n\"Crate，其中包含所有這些函式的包裝函式。)\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"PSCI is the Arm Power State Coordination Interface, a standard set of \"\n\"functions to manage system and CPU power states, among other things. It is \"\n\"implemented by EL3 firmware and hypervisors on many systems.\"\nmsgstr \"\"\n\"PSCI 是 Arm 電源狀態協調介面，這組標準函式可管理系統和 CPU 電源狀態及其他項\"\n\"目，是由 EL3 韌體和管理程序在許多系統上實作。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"The `0 => _` syntax means initialise the register to 0 before running the \"\n\"inline assembly code, and ignore its contents afterwards. We need to use \"\n\"`inout` rather than `in` because the call could potentially clobber the \"\n\"contents of the registers.\"\nmsgstr \"\"\n\"`0 => _` 語法是指在行內組語程式碼執行之前，將暫存器初始化為 0，之後就忽略其內\"\n\"容。我們需要使用 `inout` (而非 `in`)，因為呼叫可能會破壞暫存器的內容。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"This `main` function needs to be `#[no_mangle]` and `extern \\\"C\\\"` because \"\n\"it is called from our entry point in `entry.S`.\"\nmsgstr \"\"\n\"這個 `main` 函式需為 `#[no_mangle]` 和 `extern \\\"C\\\"`，因為此函式是從 `entry.\"\n\"S` 的進入點呼叫。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally \"\n\"used by the bootloader to pass things like a pointer to the device tree. \"\n\"According to the standard aarch64 calling convention (which is what `extern \"\n\"\\\"C\\\"` specifies to use), registers `x0`–`x7` are used for the first 8 \"\n\"arguments passed to a function, so `entry.S` doesn't need to do anything \"\n\"special except make sure it doesn't change these registers.\"\nmsgstr \"\"\n\"`_x0` 到 `_x3` 是暫存器 `x0` 到 `x3` 的值。按照慣例，系統啟動載入程式會使用這\"\n\"些值，將指標等項目傳遞給裝置樹狀結構。根據標準的 aarch64 呼叫慣例 (即 \"\n\"`extern \\\"C\\\"` 指定使用的項目)，前 8 個傳遞至函式的引數會使用暫存器 `x0` 到 \"\n\"`x7`，因此 `entry.S` 不需執行任何特殊操作，只要確保不會變更這些暫存器。\"\n\n#: src/bare-metal/aps/inline-assembly.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"使用 `src/bare-metal/aps/examples` 下的 `make qemu_psci`，在 QEMU 中執行範\"\n\"例。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Volatile memory access for MMIO\"\nmsgstr \"MMIO 揮發性記憶體存取\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Use `pointer::read_volatile` and `pointer::write_volatile`.\"\nmsgstr \"使用 `pointer::read_volatile` 和 `pointer::write_volatile`。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"Never hold a reference.\"\nmsgstr \"請勿保留參照。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"`addr_of!` lets you get fields of structs without creating an intermediate \"\n\"reference.\"\nmsgstr \"`addr_of!` 可用來取得結構體的欄位，而不必建立中繼參照。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Volatile access: read or write operations may have side-effects, so prevent \"\n\"the compiler or hardware from reordering, duplicating or eliding them.\"\nmsgstr \"\"\n\"揮發性存取：讀取或寫入作業可能會有副作用，因此請避免編譯器或硬體遭到重新排\"\n\"序、複製或省略。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Usually if you write and then read, e.g. via a mutable reference, the \"\n\"compiler may assume that the value read is the same as the value just \"\n\"written, and not bother actually reading memory.\"\nmsgstr \"\"\n\"通常，如果您在寫入後讀取 (例如透過可變動參照)，編譯器可能會假設讀取的值與剛寫\"\n\"入的值相同，而不實際讀取記憶體。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Some existing crates for volatile access to hardware do hold references, but \"\n\"this is unsound. Whenever a reference exist, the compiler may choose to \"\n\"dereference it.\"\nmsgstr \"\"\n\"有些用於硬體揮發性存取的現有 Crate 確實會保留參照，但這樣不安全。每當有參照存\"\n\"在時，編譯器可能會選擇解除參照。\"\n\n#: src/bare-metal/aps/mmio.md\nmsgid \"\"\n\"Use the `addr_of!` macro to get struct field pointers from a pointer to the \"\n\"struct.\"\nmsgstr \"使用 `addr_of!` 巨集，從結構體的指標取得結構體欄位指標。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"Let's write a UART driver\"\nmsgstr \"編寫 UART 驅動程式\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"The QEMU 'virt' machine has a [PL011](https://developer.arm.com/\"\n\"documentation/ddi0183/g) UART, so let's write a driver for that.\"\nmsgstr \"\"\n\"QEMU 'virt' 機器搭載 [PL011](https://developer.arm.com/documentation/ddi0183/\"\n\"g) UART，所以我們要為此編寫驅動程式。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"/// Minimal driver for a PL011 UART.\\n\"\nmsgstr \"/// Minimal driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the UART driver for a PL011 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the 8 MMIO control registers of \"\n\"a\\n\"\n\"    /// PL011 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Writes a single byte to the UART.\\n\"\nmsgstr \"/// Writes a single byte to the UART.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until there is room in the TX buffer.\\n\"\nmsgstr \"// Wait until there is room in the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that the base address points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Write to the TX buffer.\\n\"\nmsgstr \"// Write to the TX buffer.\\n\"\n\n#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md\nmsgid \"// Wait until the UART is no longer busy.\\n\"\nmsgstr \"// Wait until the UART is no longer busy.\\n\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"Note that `Uart::new` is unsafe while the other methods are safe. This is \"\n\"because as long as the caller of `Uart::new` guarantees that its safety \"\n\"requirements are met (i.e. that there is only ever one instance of the \"\n\"driver for a given UART, and nothing else aliasing its address space), then \"\n\"it is always safe to call `write_byte` later because we can assume the \"\n\"necessary preconditions.\"\nmsgstr \"\"\n\"請注意，`Uart::new` 並不安全，其他方法則是安全的。這是因為只要 `Uart::new` 的\"\n\"呼叫端保證能滿足安全規定，也就是特定 UART 只有一個驅動程式例項，沒有其他項目\"\n\"定義其位址空間的別名，那麼稍後呼叫 `write_byte` 一律是安全的，因為我們可以假\"\n\"設必要的先決條件。\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"We could have done it the other way around (making `new` safe but \"\n\"`write_byte` unsafe), but that would be much less convenient to use as every \"\n\"place that calls `write_byte` would need to reason about the safety\"\nmsgstr \"\"\n\"我們可以反過來操作，也就是讓 `new` 安全，而 `write_byte` 不安全，但這樣的使用\"\n\"便利度低許多，因為每個呼叫 `write_byte` 的位置都需要分析安全性\"\n\n#: src/bare-metal/aps/uart.md\nmsgid \"\"\n\"This is a common pattern for writing safe wrappers of unsafe code: moving \"\n\"the burden of proof for soundness from a large number of places to a smaller \"\n\"number of places.\"\nmsgstr \"\"\n\"這是為不安全程式碼撰寫安全包裝函式的常見模式：將證明安全性的負擔從大量位置移\"\n\"到少量位置。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"More traits\"\nmsgstr \"其他特徵\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"We derived the `Debug` trait. It would be useful to implement a few more \"\n\"traits too.\"\nmsgstr \"我們衍生了 `Debug` 特徵。實作多一點特徵也會有幫助。\"\n\n#: src/bare-metal/aps/uart/traits.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\nmsgstr \"\"\n\"// Safe because it just contains a pointer to device memory, which can be\\n\"\n\"// accessed from any context.\\n\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Implementing `Write` lets us use the `write!` and `writeln!` macros with our \"\n\"`Uart` type.\"\nmsgstr \"實作 `Write` 即可搭配 `Uart` 型別使用 `write!` 和 `writeln!` 巨集。\"\n\n#: src/bare-metal/aps/uart/traits.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"使用 `src/bare-metal/aps/examples` 下的 `make qemu_minimal`，在 QEMU 中執行範\"\n\"例。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"A better UART driver\"\nmsgstr \"經改良的 UART 驅動程式\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"\"\n\"The PL011 actually has [a bunch more registers](https://developer.arm.com/\"\n\"documentation/ddi0183/g/programmers-model/summary-of-registers), and adding \"\n\"offsets to construct pointers to access them is error-prone and hard to \"\n\"read. Plus, some of them are bit fields which would be nice to access in a \"\n\"structured way.\"\nmsgstr \"\"\n\"PL011 實際上還有[許多暫存器](https://developer.arm.com/documentation/ddi0183/\"\n\"g/programmers-model/summary-of-registers)，若為了存取這些暫存器而將偏移值新增\"\n\"至建構指標，不僅容易發生錯誤，還難以讀取。此外，部分暫存器是位元欄位，適合以\"\n\"結構化方式存取。\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Offset\"\nmsgstr \"偏移\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Register name\"\nmsgstr \"暫存器名稱\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"Width\"\nmsgstr \"寬度\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x00\"\nmsgstr \"0x00\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DR\"\nmsgstr \"DR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"12\"\nmsgstr \"12\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x04\"\nmsgstr \"0x04\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RSR\"\nmsgstr \"RSR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x18\"\nmsgstr \"0x18\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FR\"\nmsgstr \"FR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"9\"\nmsgstr \"9\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x20\"\nmsgstr \"0x20\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ILPR\"\nmsgstr \"ILPR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x24\"\nmsgstr \"0x24\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IBRD\"\nmsgstr \"IBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"16\"\nmsgstr \"16\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x28\"\nmsgstr \"0x28\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"FBRD\"\nmsgstr \"FBRD\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x2c\"\nmsgstr \"0x2c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"LCR_H\"\nmsgstr \"LCR_H\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x30\"\nmsgstr \"0x30\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"CR\"\nmsgstr \"CR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x34\"\nmsgstr \"0x34\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IFLS\"\nmsgstr \"IFLS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x38\"\nmsgstr \"0x38\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"IMSC\"\nmsgstr \"IMSC\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"11\"\nmsgstr \"11\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x3c\"\nmsgstr \"0x3c\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"RIS\"\nmsgstr \"RIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x40\"\nmsgstr \"0x40\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"MIS\"\nmsgstr \"MIS\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x44\"\nmsgstr \"0x44\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"ICR\"\nmsgstr \"ICR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"0x48\"\nmsgstr \"0x48\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"DMACR\"\nmsgstr \"DMACR\"\n\n#: src/bare-metal/aps/better-uart.md\nmsgid \"There are also some ID registers which have been omitted for brevity.\"\nmsgstr \"為求簡潔，還省略了一些 ID 暫存器。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for \"\n\"working with bitflags.\"\nmsgstr \"\"\n\"[`bitflags`](https://crates.io/crates/bitflags) Crate 適合用於 Bitflags。\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Flags from the UART flag register.\\n\"\nmsgstr \"/// Flags from the UART flag register.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Clear to send.\\n\"\nmsgstr \"/// Clear to send.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data set ready.\\n\"\nmsgstr \"/// Data set ready.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Data carrier detect.\\n\"\nmsgstr \"/// Data carrier detect.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// UART busy transmitting data.\\n\"\nmsgstr \"/// UART busy transmitting data.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is empty.\\n\"\nmsgstr \"/// Receive FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is full.\\n\"\nmsgstr \"/// Transmit FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Receive FIFO is full.\\n\"\nmsgstr \"/// Receive FIFO is full.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Transmit FIFO is empty.\\n\"\nmsgstr \"/// Transmit FIFO is empty.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"/// Ring indicator.\\n\"\nmsgstr \"/// Ring indicator.\\n\"\n\n#: src/bare-metal/aps/better-uart/bitflags.md\nmsgid \"\"\n\"The `bitflags!` macro creates a newtype something like `Flags(u16)`, along \"\n\"with a bunch of method implementations to get and set flags.\"\nmsgstr \"\"\n\"`bitflags!` 巨集會建立一個新型別 (例如 `Flags(u16)`)，以及一系列取得及設定標\"\n\"記的方法實作項目。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"Multiple registers\"\nmsgstr \"多個暫存器\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"We can use a struct to represent the memory layout of the UART's registers.\"\nmsgstr \"我們可以使用結構體來表示 UART 暫存器的記憶體布局。\"\n\n#: src/bare-metal/aps/better-uart/registers.md\nmsgid \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) tells the compiler to lay the struct fields out in order, \"\n\"following the same rules as C. This is necessary for our struct to have a \"\n\"predictable layout, as default Rust representation allows the compiler to \"\n\"(among other things) reorder fields however it sees fit.\"\nmsgstr \"\"\n\"[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-\"\n\"representation) 會指示編譯器依序排列結構體欄位，遵循與 C 相同的規則。以確保結\"\n\"構體具有可預測的布局，因為預設的 Rust 表示法允許編譯器依自身判斷重新排序欄位 \"\n\"(和執行其他操作)。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"Now let's use the new `Registers` struct in our driver.\"\nmsgstr \"現在讓我們在驅動程式中使用新的 `Registers` 結構體。\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"/// Driver for a PL011 UART.\\n\"\nmsgstr \"/// Driver for a PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL011 device which is appropriately mapped.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\nmsgstr \"\"\n\"/// Reads and returns a pending byte, or `None` if nothing has been\\n\"\n\"    /// received.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"// TODO: Check for error conditions in bits 8-11.\\n\"\nmsgstr \"// TODO: Check for error conditions in bits 8-11.\\n\"\n\n#: src/bare-metal/aps/better-uart/driver.md\nmsgid \"\"\n\"Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual \"\n\"fields without creating an intermediate reference, which would be unsound.\"\nmsgstr \"\"\n\"請注意，如果使用 `addr_of!`/`addr_of_mut!` 取得個別欄位的指標，而不建立中繼參\"\n\"照，這種做法並不安全。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"Using it\"\nmsgstr \"開始使用\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Let's write a small program using our driver to write to the serial console, \"\n\"and echo incoming bytes.\"\nmsgstr \"讓我們編寫一個小程式，使用驅動程式寫入序列控制台，並回應傳入的位元組。\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the primary PL011 UART.\\n\"\nmsgstr \"/// Base address of the primary PL011 UART.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\n\n#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md\nmsgid \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\nmsgstr \"\\\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'\\\\r'\"\nmsgstr \"b'\\\\r'\"\n\n#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md\nmsgid \"b'\\\\n'\"\nmsgstr \"b'\\\\n'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"b'q'\"\nmsgstr \"b'q'\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\\\"Bye!\\\"\"\nmsgstr \"\\\"Bye!\\\"\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"As in the [inline assembly](../inline-assembly.md) example, this `main` \"\n\"function is called from our entry point code in `entry.S`. See the speaker \"\n\"notes there for details.\"\nmsgstr \"\"\n\"就像在[行內組語](../inline-assembly.md)範例中，系統會從 `entry.S` 的進入點程\"\n\"式碼呼叫這個 `main` 函式。詳情請參閱演講者備忘稿。\"\n\n#: src/bare-metal/aps/better-uart/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`.\"\nmsgstr \"\"\n\"使用 `src/bare-metal/aps/examples` 下的 `make qemu`，在 QEMU 中執行範例。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"It would be nice to be able to use the logging macros from the [`log`]\"\n\"(https://crates.io/crates/log) crate. We can do this by implementing the \"\n\"`Log` trait.\"\nmsgstr \"\"\n\"建議使用 [`log`](https://crates.io/crates/log) Crate 中的記錄巨集。實作 \"\n\"`Log` 特徵即可使用該項目。\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\\\"[{}] {}\\\"\"\nmsgstr \"\\\"[{}] {}\\\"\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"/// Initialises UART logger.\\n\"\nmsgstr \"/// Initialises UART logger.\\n\"\n\n#: src/bare-metal/aps/logging.md\nmsgid \"\"\n\"The unwrap in `log` is safe because we initialise `LOGGER` before calling \"\n\"`set_logger`.\"\nmsgstr \"\"\n\"在 `log` 中取消包裝很安全，因為在呼叫 `set_logger` 之前，我們會將 `LOGGER` 初\"\n\"始化。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"We need to initialise the logger before we use it.\"\nmsgstr \"我們需要先初始化 Logger，才能使用 Logger。\"\n\n#: src/bare-metal/aps/logging/using.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"{info}\\\"\"\nmsgstr \"\\\"{info}\\\"\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"Note that our panic handler can now log details of panics.\"\nmsgstr \"請注意，恐慌處理常式現在可以記錄恐慌的詳細資料。\"\n\n#: src/bare-metal/aps/logging/using.md\nmsgid \"\"\n\"Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/\"\n\"examples`.\"\nmsgstr \"\"\n\"使用 `src/bare-metal/aps/examples` 下的 `make qemu_logger`。在 QEMU 中執行範\"\n\"例。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"AArch64 defines an exception vector table with 16 entries, for 4 types of \"\n\"exceptions (synchronous, IRQ, FIQ, SError) from 4 states (current EL with \"\n\"SP0, current EL with SPx, lower EL using AArch64, lower EL using AArch32). \"\n\"We implement this in assembly to save volatile registers to the stack before \"\n\"calling into Rust code:\"\nmsgstr \"\"\n\"AArch64 定義了包含 16 個項目的例外狀況向量表，適用於 4 種狀態的 4 種例外狀\"\n\"況，即同步、IRQ、FIQ、SError。4 種狀態則分別為目前 EL 搭配 SP0、目前 EL 搭配 \"\n\"SPx、較低 EL 使用 AArch64 和較低 EL 使用 AArch32。這是在組語中實作，以便在呼\"\n\"叫 Rust 程式碼之前，將揮發性暫存器儲存至堆疊：\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"EL is exception level; all our examples this afternoon run in EL1.\"\nmsgstr \"EL 是指例外狀況層級，今天下午的所有範例都是在 EL1 執行。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For simplicity we aren't distinguishing between SP0 and SPx for the current \"\n\"EL exceptions, or between AArch32 and AArch64 for the lower EL exceptions.\"\nmsgstr \"\"\n\"為求簡單，我們不會針對目前 EL 例外狀況區分 SP0 和 SPx，也不會針對較低 EL 例外\"\n\"狀況區分 AArch32 和 AArch64。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"For this example we just log the exception and power down, as we don't \"\n\"expect any of them to actually happen.\"\nmsgstr \"\"\n\"在此範例中，我們只需記錄例外狀況並關機，因為我們並不預期會實際發生任何例外狀\"\n\"況。\"\n\n#: src/bare-metal/aps/exceptions.md\nmsgid \"\"\n\"We can think of exception handlers and our main execution context more or \"\n\"less like different threads. [`Send` and `Sync`](../../concurrency/send-sync.\"\n\"md) will control what we can share between them, just like with threads. For \"\n\"example, if we want to share some value between exception handlers and the \"\n\"rest of the program, and it's `Send` but not `Sync`, then we'll need to wrap \"\n\"it in something like a `Mutex` and put it in a static.\"\nmsgstr \"\"\n\"例外狀況處理常式和主執行環境，其實可以約略視為不同執行緒。[`Send` 和 `Sync`]\"\n\"(../../concurrency/send-sync.md) 會控管可在它們之間分享的內容，就像執行緒一\"\n\"樣。舉例來說，如要在例外狀況處理常式與程式其餘部分之間分享某個值，而且是 \"\n\"`Send` (而非 `Sync`)，我們就需要將該值包裝在 `Mutex` 等項目中並放入靜態項目。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[oreboot](https://github.com/oreboot/oreboot)\"\nmsgstr \"[oreboot](https://github.com/oreboot/oreboot)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\\\"coreboot without the C\\\"\"\nmsgstr \"「沒有 C 的 coreboot」\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Supports x86, aarch64 and RISC-V.\"\nmsgstr \"支援 x86、aarch64 和 RISC-V。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Relies on LinuxBoot rather than having many drivers itself.\"\nmsgstr \"依賴 LinuxBoot，而非自身採用多個驅動程式。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\nmsgstr \"\"\n\"[Rust RaspberryPi OS 教學課程](https://github.com/rust-embedded/rust-\"\n\"raspberrypi-OS-tutorials)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Initialisation, UART driver, simple bootloader, JTAG, exception levels, \"\n\"exception handling, page tables\"\nmsgstr \"\"\n\"初始化、UART 驅動程式、簡易系統啟動載入程式、JTAG、例外狀況層級、例外狀況處\"\n\"理、分頁表\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Some dodginess around cache maintenance and initialisation in Rust, not \"\n\"necessarily a good example to copy for production code.\"\nmsgstr \"\"\n\"Rust 中的快取維護和初始化存在疑慮，就正式版程式碼而言，不一定是值得複製的好範\"\n\"例。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\nmsgstr \"[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"Static analysis to determine maximum stack usage.\"\nmsgstr \"靜態分析，用來判斷最大堆疊用量。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"The RaspberryPi OS tutorial runs Rust code before the MMU and caches are \"\n\"enabled. This will read and write memory (e.g. the stack). However:\"\nmsgstr \"\"\n\"RaspberryPi OS 教學課程會在啟用 MMU 和快取之前，執行 Rust 程式碼。這會讀取及\"\n\"寫入記憶體，例如堆疊。不過，請注意以下幾點：\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"Without the MMU and cache, unaligned accesses will fault. It builds with \"\n\"`aarch64-unknown-none` which sets `+strict-align` to prevent the compiler \"\n\"generating unaligned accesses so it should be alright, but this is not \"\n\"necessarily the case in general.\"\nmsgstr \"\"\n\"如果沒有 MMU 和快取，未對齊的存取會發生錯誤。建構時使用的是 `aarch64-unknown-\"\n\"none`，這會設定 `+strict-align`，防止編譯器產生未對齊的存取，因此應該不會出\"\n\"錯，但這不一定是一般情況。\"\n\n#: src/bare-metal/aps/other-projects.md\nmsgid \"\"\n\"If it were running in a VM, this can lead to cache coherency issues. The \"\n\"problem is that the VM is accessing memory directly with the cache disabled, \"\n\"while the host has cacheable aliases to the same memory. Even if the host \"\n\"doesn't explicitly access the memory, speculative accesses can lead to cache \"\n\"fills, and then changes from one or the other will get lost. Again this is \"\n\"alright in this particular case (running directly on the hardware with no \"\n\"hypervisor), but isn't a good pattern in general.\"\nmsgstr \"\"\n\"如果是在 VM 中執行，可能會導致快取一致性問題。問題在於 VM 會在快取已停用時直\"\n\"接存取記憶體，而主機具有相同記憶體的可快取別名。即使主機未明確存取記憶體，推\"\n\"測存取行為仍可能導致快取填補，而存取之間的變更就會遺失。同樣地，這在本例中不\"\n\"成問題 (直接在硬體上執行，沒有管理程序)，但一般不建議採用這種模式。\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"Useful crates\"\nmsgstr \"實用的 Crate\"\n\n#: src/bare-metal/useful-crates.md\nmsgid \"\"\n\"We'll go over a few crates which solve some common problems in bare-metal \"\n\"programming.\"\nmsgstr \"以下將介紹幾個 Crate，可用來解決一些裸機程式設計的常見問題。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides \"\n\"traits and macros for safely converting between byte sequences and other \"\n\"types.\"\nmsgstr \"\"\n\"[`zerocopy`](https://docs.rs/zerocopy/) Crate (來自 Fuchsia) 提供特徵和巨集，\"\n\"可在位元組序列和其他型別之間安全地轉換。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"This is not suitable for MMIO (as it doesn't use volatile reads and writes), \"\n\"but can be useful for working with structures shared with hardware e.g. by \"\n\"DMA, or sent over some external interface.\"\nmsgstr \"\"\n\"這不適合 MMIO (因為並非採用揮發性讀取和寫入方法)，但很適合搭配使用與硬體共用\"\n\"的結構 (例如藉由 DMA)，或透過外部介面傳送的結構。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`FromBytes` can be implemented for types for which any byte pattern is \"\n\"valid, and so can safely be converted from an untrusted sequence of bytes.\"\nmsgstr \"\"\n\"`FromBytes` 可針對任何位元組模式有效的型別實作，因此可從不受信任的位元組序列\"\n\"安全地完成轉換。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Attempting to derive `FromBytes` for these types would fail, because \"\n\"`RequestType` doesn't use all possible u32 values as discriminants, so not \"\n\"all byte patterns are valid.\"\nmsgstr \"\"\n\"嘗試衍生這些型別的 `FromBytes` 會失敗，因為 `RequestType` 不會使用所有可能的 \"\n\"u32 值做為判別值，所以並非所有位元組模式都有效。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"`zerocopy::byteorder` has types for byte-order aware numeric primitives.\"\nmsgstr \"`zerocopy::byteorder` 的型別適用於瞭解位元組順序的數值基元。\"\n\n#: src/bare-metal/useful-crates/zerocopy.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"zerocopy-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"使用 `src/bare-metal/useful-crates/zerocopy-example/` 下的 `cargo run` 執行範\"\n\"例 (在 Playground 中，範例會因為 Crate 依附元件而無法執行)。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets \"\n\"you create page tables according to the AArch64 Virtual Memory System \"\n\"Architecture.\"\nmsgstr \"\"\n\"[`aarch64-paging`](https://crates.io/crates/aarch64-paging) Crate 可用來根據 \"\n\"AArch64 虛擬記憶體系統架構，建立分頁表。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Create a new page table with identity mapping.\\n\"\nmsgstr \"// Create a new page table with identity mapping.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Map a 2 MiB region of memory as read-only.\\n\"\nmsgstr \"// Map a 2 MiB region of memory as read-only.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"// Set `TTBR0_EL1` to activate the page table.\\n\"\nmsgstr \"// Set `TTBR0_EL1` to activate the page table.\\n\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"For now it only supports EL1, but support for other exception levels should \"\n\"be straightforward to add.\"\nmsgstr \"目前僅支援 EL1，但應該很容易新增其他例外狀況層級的支援功能。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"This is used in Android for the [Protected VM Firmware](https://cs.android.\"\n\"com/android/platform/superproject/+/master:packages/modules/Virtualization/\"\n\"pvmfw/).\"\nmsgstr \"\"\n\"這是用於 Android 中的[受保護 VM 韌體](https://cs.android.com/android/\"\n\"platform/superproject/+/master:packages/modules/Virtualization/pvmfw/)。\"\n\n#: src/bare-metal/useful-crates/aarch64-paging.md\nmsgid \"\"\n\"There's no easy way to run this example, as it needs to run on real hardware \"\n\"or under QEMU.\"\nmsgstr \"執行這個範例並不容易，因為需要在實際硬體上執行，或是使用 QEMU。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"is a third-party crate implementing a basic buddy system allocator. It can \"\n\"be used both for [`LockedHeap`](https://docs.rs/buddy_system_allocator/0.9.0/\"\n\"buddy_system_allocator/struct.LockedHeap.html) implementing [`GlobalAlloc`]\"\n\"(https://doc.rust-lang.org/core/alloc/trait.GlobalAlloc.html) so you can use \"\n\"the standard `alloc` crate (as we saw [before](../alloc.md)), or for \"\n\"allocating other address space. For example, we might want to allocate MMIO \"\n\"space for PCI BARs:\"\nmsgstr \"\"\n\"[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) \"\n\"是實作基本夥伴系統分配器的第三方 Crate。這可供 [`LockedHeap`](https://docs.\"\n\"rs/buddy_system_allocator/0.9.0/buddy_system_allocator/struct.LockedHeap.\"\n\"html) 實作 [`GlobalAlloc`](https://doc.rust-lang.org/core/alloc/trait.\"\n\"GlobalAlloc.html)，以便使用標準 `alloc` Crate，如[先前](../alloc.md)所見，或\"\n\"用來分配其他位址空間。例如，我們可能會想針對 PCI BAR 分配 MMIO 空間：\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"PCI BARs always have alignment equal to their size.\"\nmsgstr \"PCI BAR 的對齊情形一律會等於其大小。\"\n\n#: src/bare-metal/useful-crates/buddy_system_allocator.md\nmsgid \"\"\n\"Run the example with `cargo run` under `src/bare-metal/useful-crates/\"\n\"allocator-example/`. (It won't run in the Playground because of the crate \"\n\"dependency.)\"\nmsgstr \"\"\n\"使用 `src/bare-metal/useful-crates/allocator-example/` 下的 `cargo run` 執行\"\n\"範例 (在 Playground 中，範例會因為 Crate 依附元件而無法執行)。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"Sometimes you want something which can be resized like a `Vec`, but without \"\n\"heap allocation. [`tinyvec`](https://crates.io/crates/tinyvec) provides \"\n\"this: a vector backed by an array or slice, which could be statically \"\n\"allocated or on the stack, which keeps track of how many elements are used \"\n\"and panics if you try to use more than are allocated.\"\nmsgstr \"\"\n\"有時候，您會希望有項目可以像 `Vec` 一樣調整大小，但沒有堆積分配量。\"\n\"[`tinyvec`](https://crates.io/crates/tinyvec) 提供這項機制：這個向量由陣列或\"\n\"切片支援，能以靜態方式分配或置於堆疊，進而追蹤元素用量，以及因您嘗試使用的量\"\n\"超出分配量所導致的恐慌。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"`tinyvec` requires that the element type implement `Default` for \"\n\"initialisation.\"\nmsgstr \"為初始化，`tinyvec` 規定元素型別須實作 `Default`。\"\n\n#: src/bare-metal/useful-crates/tinyvec.md\nmsgid \"\"\n\"The Rust Playground includes `tinyvec`, so this example will run fine inline.\"\nmsgstr \"Rust Playground 包含 `tinyvec`，因此這個範例可在行內執行。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`std::sync::Mutex` and the other synchronisation primitives from `std::sync` \"\n\"are not available in `core` or `alloc`. How can we manage synchronisation or \"\n\"interior mutability, such as for sharing state between different CPUs?\"\nmsgstr \"\"\n\"`std::sync::Mutex` 和其他來自 `std::sync` 的同步基元，都無法用於 `core` 或 \"\n\"`alloc`。我們能如何管理同步處理作業或內部可變動性 (例如為了在不同 CPU 之間共\"\n\"用狀態) 呢？\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based \"\n\"equivalents of many of these primitives.\"\nmsgstr \"\"\n\"[`spin`](https://crates.io/crates/spin) Crate 針對許多這類基元，提供以自旋鎖\"\n\"為基礎的同等項目。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"Be careful to avoid deadlock if you take locks in interrupt handlers.\"\nmsgstr \"如果在中斷處理常式使用了鎖，請務必小心避免死結。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, \"\n\"`Barrier` and `Once` from `std::sync`; and `Lazy` for lazy initialisation.\"\nmsgstr \"\"\n\"`spin` 也具備排號自旋鎖互斥實作項目；`std::sync` 中 `RwLock`、`Barrier` 和 \"\n\"`Once` 的同等項目；以及用於延遲初始化的 `Lazy`。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The [`once_cell`](https://crates.io/crates/once_cell) crate also has some \"\n\"useful types for late initialisation with a slightly different approach to \"\n\"`spin::once::Once`.\"\nmsgstr \"\"\n\"[`once_cell`](https://crates.io/crates/once_cell) Crate 也具備一些實用型別，\"\n\"適合用於晚期初始化，與 `spin::once::Once` 的做法略有不同。\"\n\n#: src/bare-metal/useful-crates/spin.md\nmsgid \"\"\n\"The Rust Playground includes `spin`, so this example will run fine inline.\"\nmsgstr \"Rust Playground 包含 `spin`，因此這個範例可在行內執行。\"\n\n#: src/bare-metal/android.md\nmsgid \"\"\n\"To build a bare-metal Rust binary in AOSP, you need to use a \"\n\"`rust_ffi_static` Soong rule to build your Rust code, then a `cc_binary` \"\n\"with a linker script to produce the binary itself, and then a `raw_binary` \"\n\"to convert the ELF to a raw binary ready to be run.\"\nmsgstr \"\"\n\"如要在 Android 開放原始碼計畫中建構 Rust 裸機開發二進位檔，您需要使用 \"\n\"`rust_ffi_static` Soong 規則建構 Rust 程式碼，接著使用具有連接器指令碼的 \"\n\"`cc_binary` 產生二進位檔，並以 `raw_binary` 將 ELF 轉換為準備好執行的原始二進\"\n\"位檔。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"vmbase\"\nmsgstr \"vmbase\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"For VMs running under crosvm on aarch64, the [vmbase](https://android.\"\n\"googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/\"\n\"master/vmbase/) library provides a linker script and useful defaults for the \"\n\"build rules, along with an entry point, UART console logging and more.\"\nmsgstr \"\"\n\"針對在 aarch64 的 crosvm 下運作的 VM，[vmbase](https://android.googlesource.\"\n\"com/platform/packages/modules/Virtualization/+/refs/heads/master/vmbase/) 程\"\n\"式庫提供連接器指令碼和實用的建構規則預設值，以及進入點、UART 控制台記錄等。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `main!` macro marks your main function, to be called from the `vmbase` \"\n\"entry point.\"\nmsgstr \"`main!` 巨集會標記主函式，方便從 `vmbase` 進入點呼叫。\"\n\n#: src/bare-metal/android/vmbase.md\nmsgid \"\"\n\"The `vmbase` entry point handles console initialisation, and issues a \"\n\"PSCI_SYSTEM_OFF to shutdown the VM if your main function returns.\"\nmsgstr \"\"\n\"`vmbase` 進入點會處理控制台初始化作業，並在主函式傳回時發出 PSCI_SYSTEM_OFF \"\n\"來關閉 VM。\"\n\n#: src/exercises/bare-metal/afternoon.md\nmsgid \"We will write a driver for the PL031 real-time clock device.\"\nmsgstr \"我們將為 PL031 即時時鐘裝置編寫驅動程式。\"\n\n#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"After looking at the exercises, you can look at the [solutions](solutions-\"\n\"afternoon.md) provided.\"\nmsgstr \"完成練習後，您可以看看我們提供的[解決方案](solutions-afternoon.md)。\"\n\n#: src/exercises/bare-metal/rtc.md\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"RTC driver\"\nmsgstr \"RTC 驅動程式\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/\"\n\"documentation/ddi0224/c) real-time clock at 0x9010000. For this exercise, \"\n\"you should write a driver for it.\"\nmsgstr \"\"\n\"QEMU aarch64 虛擬機器的 [PL031](https://developer.arm.com/documentation/\"\n\"ddi0224/c) 即時時鐘位於 0x9010000。在這個練習中，您應為該時鐘編寫驅動程式。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use it to print the current time to the serial console. You can use the \"\n\"[`chrono`](https://crates.io/crates/chrono) crate for date/time formatting.\"\nmsgstr \"\"\n\"使用該時鐘將目前時間顯示至序列控制台。您可以使用 [`chrono`](https://crates.\"\n\"io/crates/chrono) Crate 設定日期/時間格式。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Use the match register and raw interrupt status to busy-wait until a given \"\n\"time, e.g. 3 seconds in the future. (Call [`core::hint::spin_loop`](https://\"\n\"doc.rust-lang.org/core/hint/fn.spin_loop.html) inside the loop.)\"\nmsgstr \"\"\n\"使用比對暫存器和原始中斷狀態，忙碌等待至指定時間，例如未來 3 秒 (呼叫迴圈中\"\n\"的 [`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/fn.\"\n\"spin_loop.html))。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_Extension if you have time:_ Enable and handle the interrupt generated by \"\n\"the RTC match. You can use the driver provided in the [`arm-gic`](https://\"\n\"docs.rs/arm-gic/) crate to configure the Arm Generic Interrupt Controller.\"\nmsgstr \"\"\n\"擴充功能 (如有時間)：啟用並處理因 RTC 比對而產生的中斷情形。您可以使用 [`arm-\"\n\"gic`](https://docs.rs/arm-gic/) Crate 中提供的驅動程式，設定 Arm 泛型中斷控制\"\n\"器。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`.\"\nmsgstr \"使用做為 `IntId::spi(2)` 有線連結至 GIC 的 RTC 中斷。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Once the interrupt is enabled, you can put the core to sleep via `arm_gic::\"\n\"wfi()`, which will cause the core to sleep until it receives an interrupt.\"\nmsgstr \"\"\n\"啟用中斷功能後，您可以透過 `arm_gic::wfi()` 將核心設為休眠，這樣核心就會進入\"\n\"休眠狀態，直到遭中斷為止。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"Download the [exercise template](../../comprehensive-rust-exercises.zip) and \"\n\"look in the `rtc` directory for the following files.\"\nmsgstr \"\"\n\"請下載[練習範本](../../comprehensive-rust-exercises.zip)，並在 `rtc` 目錄中查\"\n\"看下列檔案。\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"\"\n\"_src/exceptions.rs_ (you should only need to change this for the 3rd part of \"\n\"the exercise):\"\nmsgstr \"src/exceptions.rs (您應該只需為練習的第 3 部分變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/logger.rs_ (you shouldn't need to change this):\"\nmsgstr \"src/logger.rs (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_src/pl011.rs_ (you shouldn't need to change this):\"\nmsgstr \"src/pl011.rs (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_build.rs_ (you shouldn't need to change this):\"\nmsgstr \"build.rs (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_entry.S_ (you shouldn't need to change this):\"\nmsgstr \"entry.S (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_exceptions.S_ (you shouldn't need to change this):\"\nmsgstr \"exceptions.S (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_idmap.S_ (you shouldn't need to change this):\"\nmsgstr \"idmap.S (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_image.ld_ (you shouldn't need to change this):\"\nmsgstr \"image.ld (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"_Makefile_ (you shouldn't need to change this):\"\nmsgstr \"Makefile (您應該不需要變更此項目)：\"\n\n#: src/exercises/bare-metal/rtc.md\nmsgid \"Run the code in QEMU with `make qemu`.\"\nmsgstr \"使用 `make qemu`，在 QEMU 中執行程式碼。\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"Bare Metal Rust Afternoon\"\nmsgstr \"Rust 裸機開發：下午\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"([back to exercise](rtc.md))\"\nmsgstr \"([返回練習](rtc.md))\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"_main.rs_:\"\nmsgstr \"_main.rs_:\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base addresses of the GICv3.\\n\"\nmsgstr \"/// Base addresses of the GICv3.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Base address of the PL031 RTC.\\n\"\nmsgstr \"/// Base address of the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// The IRQ used by the PL031 RTC.\\n\"\nmsgstr \"/// The IRQ used by the PL031 RTC.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\nmsgstr \"\\\"main({:#x}, {:#x}, {:#x}, {:#x})\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\nmsgstr \"\"\n\"// Safe because `GICD_BASE_ADDRESS` and `GICR_BASE_ADDRESS` are the base\\n\"\n\"    // addresses of a GICv3 distributor and redistributor respectively, and\\n\"\n\"    // nothing else accesses those address ranges.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\nmsgstr \"\"\n\"// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\\n\"\n\"    // and nothing else accesses that address range.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"RTC: {time}\\\"\"\nmsgstr \"\\\"RTC: {time}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait for 3 seconds, without interrupts.\\n\"\nmsgstr \"// Wait for 3 seconds, without interrupts.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Waiting for {}\\\"\"\nmsgstr \"\\\"Waiting for {}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"matched={}, interrupt_pending={}\\\"\"\nmsgstr \"\\\"matched={}, interrupt_pending={}\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\\\"Finished waiting\\\"\"\nmsgstr \"\\\"Finished waiting\\\"\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"// Wait another 3 seconds for an interrupt.\\n\"\nmsgstr \"// Wait another 3 seconds for an interrupt.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\n#, fuzzy\nmsgid \"_pl031.rs_:\"\nmsgstr \"_pl031.rs_：\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Data register\\n\"\nmsgstr \"/// Data register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Match register\\n\"\nmsgstr \"/// Match register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Load register\\n\"\nmsgstr \"/// Load register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Control register\\n\"\nmsgstr \"/// Control register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Mask Set or Clear register\\n\"\nmsgstr \"/// Interrupt Mask Set or Clear register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Raw Interrupt Status\\n\"\nmsgstr \"/// Raw Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Masked Interrupt Status\\n\"\nmsgstr \"/// Masked Interrupt Status\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Interrupt Clear Register\\n\"\nmsgstr \"/// Interrupt Clear Register\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Driver for a PL031 real-time clock.\\n\"\nmsgstr \"/// Driver for a PL031 real-time clock.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\nmsgstr \"\"\n\"/// Constructs a new instance of the RTC driver for a PL031 device at the\\n\"\n\"    /// given base address.\\n\"\n\"    ///\\n\"\n\"    /// # Safety\\n\"\n\"    ///\\n\"\n\"    /// The given base address must point to the MMIO control registers of \"\n\"a\\n\"\n\"    /// PL031 device, which must be mapped into the address space of the \"\n\"process\\n\"\n\"    /// as device memory and not have any other aliases.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Reads the current RTC value.\\n\"\nmsgstr \"/// Reads the current RTC value.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\nmsgstr \"\"\n\"// Safe because we know that self.registers points to the control\\n\"\n\"        // registers of a PL031 device which is appropriately mapped.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\nmsgstr \"\"\n\"/// Writes a match value. When the RTC value matches this then an interrupt\\n\"\n\"    /// will be generated (if it is enabled).\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\nmsgstr \"\"\n\"/// Returns whether the match register matches the RTC value, whether or \"\n\"not\\n\"\n\"    /// the interrupt is enabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\nmsgstr \"\"\n\"/// Returns whether there is currently an interrupt pending.\\n\"\n\"    ///\\n\"\n\"    /// This should be true if and only if `matched` returns true and the\\n\"\n\"    /// interrupt is masked.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\nmsgstr \"\"\n\"/// Sets or clears the interrupt mask.\\n\"\n\"    ///\\n\"\n\"    /// When the mask is true the interrupt is enabled; when it is false \"\n\"the\\n\"\n\"    /// interrupt is disabled.\\n\"\n\n#: src/exercises/bare-metal/solutions-afternoon.md\nmsgid \"/// Clears a pending interrupt, if any.\\n\"\nmsgstr \"/// Clears a pending interrupt, if any.\\n\"\n\n#: src/concurrency.md\nmsgid \"Welcome to Concurrency in Rust\"\nmsgstr \"歡迎使用 Rust 的並行程式設計\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust has full support for concurrency using OS threads with mutexes and \"\n\"channels.\"\nmsgstr \"Rust 使用 OS 執行緒搭配著互斥鎖和通道來完整支援並行處理。\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The Rust type system plays an important role in making many concurrency bugs \"\n\"compile time bugs. This is often referred to as _fearless concurrency_ since \"\n\"you can rely on the compiler to ensure correctness at runtime.\"\nmsgstr \"\"\n\"在將許多執行期並行錯誤轉換為編譯期錯誤的過程中，Rust 型別系統扮演了 重要角\"\n\"色。這通常稱為「無懼並行」，因為你可以依賴編譯器， 確保執行期能夠正確運作。\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The type system gives us safety for concurrency without any special features.\"\nmsgstr \"\"\n\n#: src/concurrency.md\nmsgid \"\"\n\"The same tools that help with \\\"concurrent\\\" access in a single thread (e.\"\n\"g., a called function that might mutate an argument or save references to it \"\n\"to read later) save us from multi-threading issues.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust threads work similarly to threads in other languages:\"\nmsgstr \"Rust 執行緒的運作方式與其他語言類似：\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Count in thread: {i}!\\\"\"\nmsgstr \"\\\"Count in thread: {i}!\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"\\\"Main thread: {i}\\\"\"\nmsgstr \"\\\"Main thread: {i}\\\"\"\n\n#: src/concurrency/threads.md\nmsgid \"Threads are all daemon threads, the main thread does not wait for them.\"\nmsgstr \"執行緒都是 daemon 執行緒，主執行緒不會等待這類執行緒完成運作。\"\n\n#: src/concurrency/threads.md\nmsgid \"Thread panics are independent of each other.\"\nmsgstr \"執行緒恐慌均為各自獨立，並非彼此相關。\"\n\n#: src/concurrency/threads.md\nmsgid \"Panics can carry a payload, which can be unpacked with `downcast_ref`.\"\nmsgstr \"如果恐慌附帶酬載，可使用 `downcast_ref` 解除封裝。\"\n\n#: src/concurrency/threads.md\nmsgid \"Rust thread APIs look not too different from e.g. C++ ones.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Run the example.\"\nmsgstr \"執行範例。\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"5ms timing is loose enough that main and spawned threads stay mostly in \"\n\"lockstep.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Notice that the program ends before the spawned thread reaches 10!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"This is because main ends the program and spawned threads do not make it \"\n\"persist.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Compare to pthreads/C++ std::thread/boost::thread if desired.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we wait around for the spawned thread to complete?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) \"\n\"returns a `JoinHandle`. Look at the docs.\"\nmsgstr \"\"\n\"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) 用於定義解構函\"\n\"式。\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` has a [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) method that blocks.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for \"\n\"the thread to finish and have the program count all the way to 10.\"\nmsgstr \"\"\n\"請依序使用 `let handle = thread::spawn(...)` 和 `handle.join()`，等待 執行緒\"\n\"完成運作。\"\n\n#: src/concurrency/threads.md\nmsgid \"Now what if we want to return a value?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Look at docs again:\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s \"\n\"closure returns `T`\"\nmsgstr \"\"\n\"但是，你可以使用[限定範圍執行緒](https://doc.rust-lang.org/std/thread/fn.\"\n\"scope.html)執行這項功能：\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct.\"\n\"JoinHandle.html#method.join) returns `thread::Result<T>`\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Use the `Result` return value from `handle.join()` to get access to the \"\n\"returned value.\"\nmsgstr \"\"\n\"使用 `handle.join()` 的 `Result` 傳回值，取得恐慌酬載的 存取權。這個階段是提\"\n\"起 [`Any`](https://doc.rust-lang.org/std/any/index.html) 的好時機。\"\n\n#: src/concurrency/threads.md\nmsgid \"Ok, what about the other case?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"Trigger a panic in the thread. Note that this doesn't panic `main`.\"\nmsgstr \"在執行緒中觸發恐慌，請注意，這不會影響 `main`。\"\n\n#: src/concurrency/threads.md\n#, fuzzy\nmsgid \"\"\n\"Access the panic payload. This is a good time to talk about [`Any`](https://\"\n\"doc.rust-lang.org/std/any/index.html).\"\nmsgstr \"\"\n\"使用 `handle.join()` 的 `Result` 傳回值，取得恐慌酬載的 存取權。這個階段是提\"\n\"起 [`Any`](https://doc.rust-lang.org/std/any/index.html) 的好時機。\"\n\n#: src/concurrency/threads.md\nmsgid \"Now we can return values from threads! What about taking inputs?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Capture something by reference in the thread closure.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"An error message indicates we must move it.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"Move it in, see we can compute and then return a derived value.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"If we want to borrow?\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"\"\n\"Main kills child threads when it returns, but another function would just \"\n\"return and leave them running.\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"That would be stack use-after-return, which violates memory safety!\"\nmsgstr \"\"\n\n#: src/concurrency/threads.md\nmsgid \"How do we avoid this? see next slide.\"\nmsgstr \"\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"Normal threads cannot borrow from their environment:\"\nmsgstr \"一般執行緒無法借用環境的資源：\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/\"\n\"fn.scope.html) for this:\"\nmsgstr \"\"\n\"但是，你可以使用[限定範圍執行緒](https://doc.rust-lang.org/std/thread/fn.\"\n\"scope.html)執行這項功能：\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"The reason for that is that when the `thread::scope` function completes, all \"\n\"the threads are guaranteed to be joined, so they can return borrowed data.\"\nmsgstr \"\"\n\"原因在於 `thread::scope` 函式完成時，能保證所有執行緒都已加入，因此能夠傳回借\"\n\"用的資料。\"\n\n#: src/concurrency/scoped-threads.md\nmsgid \"\"\n\"Normal Rust borrowing rules apply: you can either borrow mutably by one \"\n\"thread, or immutably by any number of threads.\"\nmsgstr \"\"\n\"適用 Rust 一般借用規則：可以由一個執行緒以可變方式借用，或者由任意數量的執行\"\n\"緒以不可變方式借用。\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"Rust channels have two parts: a `Sender<T>` and a `Receiver<T>`. The two \"\n\"parts are connected via the channel, but you only see the end-points.\"\nmsgstr \"\"\n\"Rust 通道分為兩個部分：`Sender<T>` 和 `Receiver<T>`。這兩個部分 透過通道相\"\n\"連，但你只能看到端點。\"\n\n#: src/concurrency/channels.md\nmsgid \"\\\"Received: {:?}\\\"\"\nmsgstr \"\\\"Received: {:?}\\\"\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` \"\n\"implement `Clone` (so you can make multiple producers) but `Receiver` does \"\n\"not.\"\nmsgstr \"\"\n\"`mpsc` 代表多重生產者、唯一消費者。`Sender` 和 `SyncSender` 會實作 `Clone` \"\n\"(用於製作多重生產者)，但 `Receiver` 不會。\"\n\n#: src/concurrency/channels.md\nmsgid \"\"\n\"`send()` and `recv()` return `Result`. If they return `Err`, it means the \"\n\"counterpart `Sender` or `Receiver` is dropped and the channel is closed.\"\nmsgstr \"\"\n\"`send()` 和 `recv()` 會傳回 `Result`。如果傳回的是 `Err`，表示對應的 \"\n\"`Sender` 或 `Receiver` 已釋放，且通道已關閉。\"\n\n#: src/concurrency/channels/unbounded.md\nmsgid \"You get an unbounded and asynchronous channel with `mpsc::channel()`:\"\nmsgstr \"你可以使用 `mpsc::channel()` 取得無界限的非同步通道：\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Message {i}\\\"\"\nmsgstr \"\\\"Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: sent Message {i}\\\"\"\nmsgstr \"\\\"{thread_id:?}: sent Message {i}\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"{thread_id:?}: done\\\"\"\nmsgstr \"\\\"{thread_id:?}: done\\\"\"\n\n#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md\nmsgid \"\\\"Main: got {msg}\\\"\"\nmsgstr \"\\\"Main: got {msg}\\\"\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"With bounded (synchronous) channels, `send` can block the current thread:\"\nmsgstr \"有界限的同步通道可讓 `send` 阻擋現行執行緒：\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"Calling `send` will block the current thread until there is space in the \"\n\"channel for the new message. The thread can be blocked indefinitely if there \"\n\"is nobody who reads from the channel.\"\nmsgstr \"\"\n\"呼叫 `send` 會阻塞目前執行緒，直到管道有空間接收新訊息為止。如果沒有東西讀取\"\n\"管道內容，執行緒可能會無限期遭到阻塞。\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A call to `send` will abort with an error (that is why it returns `Result`) \"\n\"if the channel is closed. A channel is closed when the receiver is dropped.\"\nmsgstr \"\"\n\"如果管道已關閉，對 `send` 的呼叫就會取消，並顯示錯誤 (所以會傳回 `Result`)。\"\n\"接收器遭捨棄時，管道就會關閉。\"\n\n#: src/concurrency/channels/bounded.md\nmsgid \"\"\n\"A bounded channel with a size of zero is called a \\\"rendezvous channel\\\". \"\n\"Every send will block the current thread until another thread calls `read`.\"\nmsgstr \"\"\n\"大小為零的受限管道稱為「會合管道」。每項傳送作業都會阻塞目前執行緒，直到其他\"\n\"執行緒呼叫 `read` 為止。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"How does Rust know to forbid shared access across threads? The answer is in \"\n\"two traits:\"\nmsgstr \"Rust 如何得知要禁止在執行緒間共享存取權？答案就在以下兩個特徵中：\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` \"\n\"is `Send` if it is safe to move a `T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html)：如果可以將 \"\n\"`T` 在執行緒界線間安全轉移，型別 `T` 就會是 `Send`。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` \"\n\"is `Sync` if it is safe to move a `&T` across a thread boundary.\"\nmsgstr \"\"\n\"[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html)：如果可以將 \"\n\"`&T` 在執行緒界線間安全轉移，型別 `T` 就會是 `Sync`。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The \"\n\"compiler will automatically derive them for your types as long as they only \"\n\"contain `Send` and `Sync` types. You can also implement them manually when \"\n\"you know it is valid.\"\nmsgstr \"\"\n\"`Send` 和 `Sync` 是 [不安全的特徵](../unsafe/unsafe-traits.md)。如果你的型別\"\n\"只包含其他有 `Send` 和 `Sync` 的型別， 編譯器就會自動根據型別為你產生 `Send` \"\n\"和 `Sync`。或許如果你知道你的型別是適用的， 也可以手動實作。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"\"\n\"One can think of these traits as markers that the type has certain thread-\"\n\"safety properties.\"\nmsgstr \"這些特徵可視為標記，表示該型別含有特定執行緒安全屬性。\"\n\n#: src/concurrency/send-sync.md\nmsgid \"They can be used in the generic constraints as normal traits.\"\nmsgstr \"這些特徵就像一般特徵，可用於泛型條件約束。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) \"\n\"if it is safe to move a `T` value to another thread.\"\nmsgstr \"\"\n\"如果可以將 `T` 值安全轉移至其他執行緒，型別 `T` 就會是 [`Send`](https://doc.\"\n\"rust-lang.org/std/marker/trait.Send.html)。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"The effect of moving ownership to another thread is that _destructors_ will \"\n\"run in that thread. So the question is when you can allocate a value in one \"\n\"thread and deallocate it in another.\"\nmsgstr \"\"\n\"將所有權轉移到其他執行緒的結果，就是「destructors」會在該執行緒中 執行。因此\"\n\"問題是，何時能在一個執行緒中配置一個值， 並在另一個執行緒中釋放這個值的記憶\"\n\"體。\"\n\n#: src/concurrency/send-sync/send.md\nmsgid \"\"\n\"As an example, a connection to the SQLite library must only be accessed from \"\n\"a single thread.\"\nmsgstr \"舉例來說，與 SQLite 資料庫的連線必須只能透過單一執行緒 存取。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) \"\n\"if it is safe to access a `T` value from multiple threads at the same time.\"\nmsgstr \"\"\n\"如果可以同時從多個執行緒存取 `T` 值， 型別 `T` 就會是 [`Sync`](https://doc.\"\n\"rust-lang.org/std/marker/trait.Sync.html)。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"More precisely, the definition is:\"\nmsgstr \"更精確的定義如下：\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"`T` is `Sync` if and only if `&T` is `Send`\"\nmsgstr \"`&T` 必須為 `Send`，`T` 才會是 `Sync`\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This statement is essentially a shorthand way of saying that if a type is \"\n\"thread-safe for shared use, it is also thread-safe to pass references of it \"\n\"across threads.\"\nmsgstr \"\"\n\"這定義簡單的表示，若一個型別可以在確保執行緒安全的情況下被共用，這型別的參考\"\n\"值也可以安全的被傳遞於其他的執行緒。\"\n\n#: src/concurrency/send-sync/sync.md\nmsgid \"\"\n\"This is because if a type is Sync it means that it can be shared across \"\n\"multiple threads without the risk of data races or other synchronization \"\n\"issues, so it is safe to move it to another thread. A reference to the type \"\n\"is also safe to move to another thread, because the data it references can \"\n\"be accessed from any thread safely.\"\nmsgstr \"\"\n\"原因在於如果型別為 Sync，表示能在多個執行緒之間共用，沒有資料競爭或其他同步問\"\n\"題的風險，因此可以安全轉移到其他執行緒。此外，由於可以從任何執行緒安全存取型\"\n\"別參考的資料，型別參考也能安全地轉移到其他執行緒。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + Sync`\"\nmsgstr \"`Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"Most types you come across are `Send + Sync`:\"\nmsgstr \"你遇到的多數型別會是 `Send + Sync`：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`i8`, `f32`, `bool`, `char`, `&str`, ...\"\nmsgstr \"`i8`、`f32`、`bool`、`char`、`&str`、...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ...\"\nmsgstr \"`(T1, T2)`、`[T; N]`、`&[T]`、`struct { x: T }`、...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`String`, `Option<T>`, `Vec<T>`, `Box<T>`, ...\"\nmsgstr \"`String`、`Option<T>`、`Vec<T>`、`Box<T>`、...\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Arc<T>`: Explicitly thread-safe via atomic reference count.\"\nmsgstr \"`Arc<T>`：透過原子參考計數明確防護執行緒安全。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Mutex<T>`: Explicitly thread-safe via internal locking.\"\nmsgstr \"`Mutex<T>`：透過內部鎖定系統明確防護執行緒安全。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions.\"\nmsgstr \"`AtomicBool`、`AtomicU8`、...：使用特殊原子性指示。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"The generic types are typically `Send + Sync` when the type parameters are \"\n\"`Send + Sync`.\"\nmsgstr \"如果型別參數是 `Send + Sync`， 一般型別通常就會是 `Send + Sync`。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Send + !Sync`\"\nmsgstr \"`Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types can be moved to other threads, but they're not thread-safe. \"\n\"Typically because of interior mutability:\"\nmsgstr \"\"\n\"以下型別可以轉移到其他執行緒，但不會防護執行緒安全。 原因通常在於內部可變性：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Sender<T>`\"\nmsgstr \"`mpsc::Sender<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`mpsc::Receiver<T>`\"\nmsgstr \"`mpsc::Receiver<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`Cell<T>`\"\nmsgstr \"`Cell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`RefCell<T>`\"\nmsgstr \"`RefCell<T>`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + Sync`\"\nmsgstr \"`!Send + Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"These types are thread-safe, but they cannot be moved to another thread:\"\nmsgstr \"以下型別會防護執行緒安全，但無法轉移至其他執行緒：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`MutexGuard<T: Sync>`: Uses OS level primitives which must be deallocated on \"\n\"the thread which created them.\"\nmsgstr \"\"\n\"`MutexGuard<T>`：使用 OS 層級的原始元件，這類元件必須在建立該元件的 執行緒上\"\n\"釋放記憶體。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"`!Send + !Sync`\"\nmsgstr \"`!Send + !Sync`\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"These types are not thread-safe and cannot be moved to other threads:\"\nmsgstr \"以下型別不會防護執行緒安全，也無法轉移至其他執行緒：\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`Rc<T>`: each `Rc<T>` has a reference to an `RcBox<T>`, which contains a non-\"\n\"atomic reference count.\"\nmsgstr \"\"\n\"`Rc<T>`：每個 `Rc<T>` 都有一個 `RcBox<T>` 參考，其中包含一個 非原子參考計數。\"\n\n#: src/concurrency/send-sync/examples.md\nmsgid \"\"\n\"`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency \"\n\"considerations.\"\nmsgstr \"`*const T`、`*mut T`：Rust 會假定原始指標可能有特殊的 並行考量。\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"Rust uses the type system to enforce synchronization of shared data. This is \"\n\"primarily done via two types:\"\nmsgstr \"Rust 會使用型別系統強制同步共享的資料，主要透過兩種型別 執行：\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic \"\n\"reference counted `T`: handles sharing between threads and takes care to \"\n\"deallocate `T` when the last reference is dropped,\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html)，原子參考計數\"\n\"為 `T`：處理執行緒間的共享狀態， 並且在最後參考被丟棄時負責釋放 `T` 的記憶\"\n\"體。\"\n\n#: src/concurrency/shared_state.md\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures \"\n\"mutually exclusive access to the `T` value.\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html)：確保能提\"\n\"供 `T` 值的可變專屬存取權。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared \"\n\"read-only access via `Arc::clone`:\"\nmsgstr \"\"\n\"[`Arc<T>`](https://doc.rust-lang.org/std/sync/struct.Arc.html) 可透過 `Arc::\"\n\"clone` 取得共享唯讀存取權：\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\\\"{thread_id:?}: {v:?}\\\"\"\nmsgstr \"\\\"{thread_id:?}: {v:?}\\\"\"\n\n#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md\nmsgid \"\\\"v: {v:?}\\\"\"\nmsgstr \"\\\"v: {v:?}\\\"\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc` stands for \\\"Atomic Reference Counted\\\", a thread safe version of `Rc` \"\n\"that uses atomic operations.\"\nmsgstr \"\"\n\"`Arc` 代表「原子參考計數」，這個 `Rc` 的執行緒安全版本會採用原子性 運算。\"\n\n#: src/concurrency/shared_state/arc.md\n#, fuzzy\nmsgid \"\"\n\"`Arc<T>` implements `Clone` whether or not `T` does. It implements `Send` \"\n\"and `Sync` if and only if `T` implements them both.\"\nmsgstr \"\"\n\"`Arc<T>` 會實作 `Clone`，與 `T` 無關。如果 `T` 同時實作 `Send` 和 `Sync`， \"\n\"`Arc<T>` 也會實作這兩者。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"`Arc::clone()` has the cost of atomic operations that get executed, but \"\n\"after that the use of the `T` is free.\"\nmsgstr \"\"\n\"`Arc::clone()` 會導致執行原子性運算的費用，但之後使用得到的 `T` 不需任何費\"\n\"用。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"\"\n\"Beware of reference cycles, `Arc` does not use a garbage collector to detect \"\n\"them.\"\nmsgstr \"留意參考循環，`Arc` 並不使用垃圾收集器進行偵測。\"\n\n#: src/concurrency/shared_state/arc.md\nmsgid \"`std::sync::Weak` can help.\"\nmsgstr \"`std::sync::Weak` 可協助執行這項功能。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures \"\n\"mutual exclusion _and_ allows mutable access to `T` behind a read-only \"\n\"interface (another form of [interior mutability](../../borrowing/interior-\"\n\"mutability)):\"\nmsgstr \"\"\n\"[`Mutex<T>`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) 可確保執行\"\n\"互斥功能，「並」在唯讀介面背後授予 `T` 的可變存取權：\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\\\"v: {:?}\\\"\"\nmsgstr \"\\\"v: {:?}\\\"\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"Notice how we have a [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-\"\n\"lang.org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) blanket \"\n\"implementation.\"\nmsgstr \"\"\n\"請留意我們如何進行 [`impl<T: Send> Sync for Mutex<T>`](https://doc.rust-lang.\"\n\"org/std/sync/struct.Mutex.html#impl-Sync-for-Mutex%3CT%3E) 的概括性 實作。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex` in Rust looks like a collection with just one element --- the \"\n\"protected data.\"\nmsgstr \"Rust 中的 `Mutex` 就像是只有一個元素的集合，也就是受保護的資料。\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"It is not possible to forget to acquire the mutex before accessing the \"\n\"protected data.\"\nmsgstr \"必須先取得互斥鎖，才能存取受保護的資料。\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The \"\n\"`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.\"\nmsgstr \"\"\n\"只要使用這個鎖，就能從 `&Mutex<T>` 取得 `&mut T`。`MutexGuard` 可確保 `&mut \"\n\"T` 的壽命不會超過所持有的鎖。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"\"\n\"`Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T` \"\n\"implements `Send`.\"\nmsgstr \"如果 `T` 實作 `Send`，`Mutex<T>` 才會實作 `Send` 和 `Sync`。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"A read-write lock counterpart: `RwLock`.\"\nmsgstr \"可讀寫的對應鎖 - `RwLock`。\"\n\n#: src/concurrency/shared_state/mutex.md\n#, fuzzy\nmsgid \"Why does `lock()` return a `Result`?\"\nmsgstr \"為何 `lock()` 會傳回 `Result`？\"\n\n#: src/concurrency/shared_state/mutex.md\nmsgid \"\"\n\"If the thread that held the `Mutex` panicked, the `Mutex` becomes \"\n\"\\\"poisoned\\\" to signal that the data it protected might be in an \"\n\"inconsistent state. Calling `lock()` on a poisoned mutex fails with a \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html). \"\n\"You can call `into_inner()` on the error to recover the data regardless.\"\nmsgstr \"\"\n\"如果持有 `Mutex` 的執行緒發生恐慌，`Mutex` 就會「中毒」，指出 其保護的資料可\"\n\"能處於不一致的狀態。如果對已中毒的互斥鎖呼叫 `lock()`， 會發生 \"\n\"[`PoisonError`](https://doc.rust-lang.org/std/sync/struct.PoisonError.html) \"\n\"錯誤。無論如何，你都可以對錯誤呼叫 `into_inner()` 來復原 資料。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Let us see `Arc` and `Mutex` in action:\"\nmsgstr \"我們來看看 `Arc` 和 `Mutex` 的實際應用情形：\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"// use std::sync::{Arc, Mutex};\\n\"\nmsgstr \"// use std::sync::{Arc, Mutex};\\n\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Possible solution:\"\nmsgstr \"可能的解決方案：\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"Notable parts:\"\nmsgstr \"重要部分：\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v` is wrapped in both `Arc` and `Mutex`, because their concerns are \"\n\"orthogonal.\"\nmsgstr \"`v` 已同時納入 `Arc` 和 `Mutex`，因為兩者的考量互不相關。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state \"\n\"between threads.\"\nmsgstr \"將 `Mutex` 納入 `Arc`，是在執行緒間共享可變狀態的常見模式。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another \"\n\"thread. Note `move` was added to the lambda signature.\"\nmsgstr \"\"\n\"`v: Arc<_>` 需要複製成 `v2`，才能轉移到其他執行緒。請注意，`move` 已新增至 \"\n\"lambda 簽章。\"\n\n#: src/concurrency/shared_state/example.md\nmsgid \"\"\n\"Blocks are introduced to narrow the scope of the `LockGuard` as much as \"\n\"possible.\"\nmsgstr \"采用區塊，盡量縮小 `LockGuard` 的範圍。\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Let us practice our new concurrency skills with\"\nmsgstr \"歡迎使用以下項目，練習新的並行技能：\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"Dining philosophers: a classic problem in concurrency.\"\nmsgstr \"哲學家就餐問題：經典的並行練習題。\"\n\n#: src/exercises/concurrency/morning.md\nmsgid \"\"\n\"Multi-threaded link checker: a larger project where you'll use Cargo to \"\n\"download dependencies and then check links in parallel.\"\nmsgstr \"\"\n\"多執行緒連結檢查工具：您可以在這項大型專案中使用 Cargo 下載依附元件，然後同時\"\n\"檢查連結。\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"The dining philosophers problem is a classic problem in concurrency:\"\nmsgstr \"哲學家就餐問題是經典的並行練習題：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"Five philosophers dine together at the same table. Each philosopher has \"\n\"their own place at the table. There is a fork between each plate. The dish \"\n\"served is a kind of spaghetti which has to be eaten with two forks. Each \"\n\"philosopher can only alternately think and eat. Moreover, a philosopher can \"\n\"only eat their spaghetti when they have both a left and right fork. Thus two \"\n\"forks will only be available when their two nearest neighbors are thinking, \"\n\"not eating. After an individual philosopher finishes eating, they will put \"\n\"down both forks.\"\nmsgstr \"\"\n\"五位哲學家要在同一張餐桌上一起用餐，他們各有自己的座位。每兩個餐盤之間有一支\"\n\"叉子。餐盤裡裝著某種義大利麵，必須使用兩支叉子才能享用。哲學家無法同時思考和\"\n\"進食，而且必須左右手都拿著叉子，才能吃到義大利麵。因此，只有身旁的兩位哲學家\"\n\"在思考 (而非進食) 時，才能取得兩支叉子。某個哲學家吃完後，會同時放下兩支叉\"\n\"子。\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"You will need a local [Cargo installation](../../cargo/running-locally.md) \"\n\"for this exercise. Copy the code below to a file called `src/main.rs`, fill \"\n\"out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"這項練習需要在本機[安裝 Cargo](../../cargo/running-locally.md)。請將以下程式\"\n\"碼複製到名為 `src/main.rs` 的檔案、填寫空白處，然後測試 `cargo run` 不會發生\"\n\"死結：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\nmsgstr \"\"\n\"// left_fork: ...\\n\"\n\"    // right_fork: ...\\n\"\n\"    // thoughts: ...\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Eureka! {} has a new idea!\\\"\"\nmsgstr \"\\\"Eureka! {} has a new idea!\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Pick up forks...\\n\"\nmsgstr \"// Pick up forks...\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"{} is eating...\\\"\"\nmsgstr \"\\\"{} is eating...\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Socrates\\\"\"\nmsgstr \"\\\"Socrates\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Hypatia\\\"\"\nmsgstr \"\\\"Hypatia\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Plato\\\"\"\nmsgstr \"\\\"Plato\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Aristotle\\\"\"\nmsgstr \"\\\"Aristotle\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/solutions-morning.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Pythagoras\\\"\"\nmsgstr \"\\\"Pythagoras\\\"\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create forks\\n\"\nmsgstr \"// Create forks\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Create philosophers\\n\"\nmsgstr \"// Create philosophers\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"// Make each of them think and eat 100 times\\n\"\nmsgstr \"// Make each of them think and eat 100 times\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Output their thoughts\\n\"\nmsgstr \"// Output their thoughts\\n\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"You can use the following `Cargo.toml`:\"\nmsgstr \"您可以使用下列 `Cargo.toml`：\"\n\n#: src/exercises/concurrency/dining-philosophers.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Let us use our new knowledge to create a multi-threaded link checker. It \"\n\"should start at a webpage and check that links on the page are valid. It \"\n\"should recursively check other pages on the same domain and keep doing this \"\n\"until all pages have been validated.\"\nmsgstr \"\"\n\"讓我們運用所學的新知識，建立多執行緒連結檢查工具。該工具應從網頁開始，檢查頁\"\n\"面上的連結是否有效，並應以遞迴方式檢查相同網域中的其他頁面，直到驗證完所有頁\"\n\"面為止。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/\"\n\"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:\"\nmsgstr \"\"\n\"為此，您需要使用 HTTP 用戶端，例如 [`reqwest`](https://docs.rs/reqwest/)。請\"\n\"建立新的 Cargo 專案，並使用以下指令，將 `reqwest` 設為依附元件：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"If `cargo add` fails with `error: no such subcommand`, then please edit the \"\n\"`Cargo.toml` file by hand. Add the dependencies listed below.\"\nmsgstr \"\"\n\"如果 `cargo add` 失敗並顯示 `error: no such subcommand`，請手動編輯 `Cargo.\"\n\"toml` 檔案。請新增下列依附元件。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You will also need a way to find links. We can use [`scraper`](https://docs.\"\n\"rs/scraper/) for that:\"\nmsgstr \"\"\n\"您也需要設法找出連結。為此，我們可以使用 [`scraper`](https://docs.rs/\"\n\"scraper/)：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Finally, we'll need some way of handling errors. We use [`thiserror`]\"\n\"(https://docs.rs/thiserror/) for that:\"\nmsgstr \"\"\n\"最後，我們需要處理錯誤的方法。為此，我們會使用 [`thiserror`](https://docs.rs/\"\n\"thiserror/)：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"The `cargo add` calls will update the `Cargo.toml` file to look like this:\"\nmsgstr \"`cargo add` 呼叫會更新 `Cargo.toml` 檔案，如下所示：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"link-checker\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"publish = false\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"reqwest = { version = \\\"0.11.12\\\", features = [\\\"blocking\\\", \\\"rustls-\"\n\"tls\\\"] }\\n\"\n\"scraper = \\\"0.13.0\\\"\\n\"\n\"thiserror = \\\"1.0.37\\\"\\n\"\n\"```\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"You can now download the start page. Try with a small site such as `https://\"\n\"www.google.org/`.\"\nmsgstr \"\"\n\"您現在可以下載起始網頁。請以小型網站嘗試這項操作，例如 `https://www.google.\"\n\"org/`。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Your `src/main.rs` file should look something like this:\"\nmsgstr \"`src/main.rs` 檔案應如下所示：\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"request error: {0}\\\"\"\nmsgstr \"\\\"request error: {0}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"bad http response: {0}\\\"\"\nmsgstr \"\\\"bad http response: {0}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Checking {:#}\\\"\"\nmsgstr \"\\\"Checking {:#}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"href\\\"\"\nmsgstr \"\\\"href\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\nmsgstr \"\\\"On {base_url:#}: ignored unparsable {href:?}: {err}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"https://www.google.org\\\"\"\nmsgstr \"\\\"https://www.google.org\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Links: {links:#?}\\\"\"\nmsgstr \"\\\"Links: {links:#?}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\\\"Could not extract links: {err:#}\\\"\"\nmsgstr \"\\\"Could not extract links: {err:#}\\\"\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"Run the code in `src/main.rs` with\"\nmsgstr \"使用以下指令，在 `src/main.rs` 中執行程式碼：\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Use threads to check the links in parallel: send the URLs to be checked to a \"\n\"channel and let a few threads check the URLs in parallel.\"\nmsgstr \"\"\n\"使用執行緒同時檢查連結：將要檢查的網址傳送到管道，讓幾個執行緒同時檢查網址。\"\n\n#: src/exercises/concurrency/link-checker.md\nmsgid \"\"\n\"Extend this to recursively extract links from all pages on the `www.google.\"\n\"org` domain. Put an upper limit of 100 pages or so so that you don't end up \"\n\"being blocked by the site.\"\nmsgstr \"\"\n\"拓展這項功能，以遞迴方式擷取 `www.google.org` 網域中所有頁面上的連結。將頁面\"\n\"上限設為 100 個左右，以免遭到網站封鎖。\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Concurrency Morning Exercise\"\nmsgstr \"並行：上午練習\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](dining-philosophers.md))\"\nmsgstr \"([返回練習](dining-philosophers.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{} is trying to eat\\\"\"\nmsgstr \"\\\"{} is trying to eat\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\nmsgstr \"\"\n\"// To avoid a deadlock, we have to break the symmetry\\n\"\n\"        // somewhere. This will swap the forks without deinitializing\\n\"\n\"        // either of them.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"{thought}\\\"\"\nmsgstr \"\\\"{thought}\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"Link Checker\"\nmsgstr \"連結檢查器\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"([back to exercise](link-checker.md))\"\nmsgstr \"([返回練習](link-checker.md))\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\nmsgstr \"\"\n\"/// Determine whether links within the given page should be extracted.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\nmsgstr \"\"\n\"/// Mark the given page as visited, returning false if it had already\\n\"\n\"    /// been visited.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"// The sender got dropped. No more commands coming in.\\n\"\nmsgstr \"// The sender got dropped. No more commands coming in.\\n\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Got crawling error: {:#}\\\"\"\nmsgstr \"\\\"Got crawling error: {:#}\\\"\"\n\n#: src/exercises/concurrency/solutions-morning.md\nmsgid \"\\\"Bad URLs: {:#?}\\\"\"\nmsgstr \"\\\"Bad URLs: {:#?}\\\"\"\n\n#: src/async.md\nmsgid \"Async Rust\"\nmsgstr \"非同步的 Rust\"\n\n#: src/async.md\nmsgid \"\"\n\"\\\"Async\\\" is a concurrency model where multiple tasks are executed \"\n\"concurrently by executing each task until it would block, then switching to \"\n\"another task that is ready to make progress. The model allows running a \"\n\"larger number of tasks on a limited number of threads. This is because the \"\n\"per-task overhead is typically very low and operating systems provide \"\n\"primitives for efficiently identifying I/O that is able to proceed.\"\nmsgstr \"\"\n\"「非同步（async）」是一種將多個任務併行執行的模式。在這樣的模式中，當其中一個\"\n\"任務進入阻塞狀態時，系統會去執行至另一個可執行的任務。這種模式允許在執行緒數\"\n\"量有限的環境下執行大量的任務，這是因為每個任務所造成的開銷通常都很低，而且作\"\n\"業系統提供的基本功能能夠有效地辨識可處理的 I/O。\"\n\n#: src/async.md\nmsgid \"\"\n\"Rust's asynchronous operation is based on \\\"futures\\\", which represent work \"\n\"that may be completed in the future. Futures are \\\"polled\\\" until they \"\n\"signal that they are complete.\"\nmsgstr \"\"\n\"Rust 的非同步操作是透過「future」來處理，代表可能在未來完成的工作。Future 會\"\n\"處在被「輪詢（poll）」的狀態，直到它送出信號來表示工作已經處理完成。\"\n\n#: src/async.md\nmsgid \"\"\n\"Futures are polled by an async runtime, and several different runtimes are \"\n\"available.\"\nmsgstr \"Future 會被非同步的執行環境（runtime）輪詢，而執行環境有許多種可選擇。\"\n\n#: src/async.md\nmsgid \"\"\n\"Python has a similar model in its `asyncio`. However, its `Future` type is \"\n\"callback-based, and not polled. Async Python programs require a \\\"loop\\\", \"\n\"similar to a runtime in Rust.\"\nmsgstr \"\"\n\"Python 有一個類似的模型 `asyncio`。不過 `asyncio` 的 `Future` 類型是根據回呼\"\n\"函數（callback）而非輪詢。非同步的 Python 程式需要「迴圈（loop）」來處理，類\"\n\"似於 Rust 的執行環境。\"\n\n#: src/async.md\nmsgid \"\"\n\"JavaScript's `Promise` is similar, but again callback-based. The language \"\n\"runtime implements the event loop, so many of the details of Promise \"\n\"resolution are hidden.\"\nmsgstr \"\"\n\"JavaScript 的 `Promise` 也是類似的概念，但仍是基於回呼函數。JavaScript 的語言\"\n\"執行環境實作了事件迴圈（event loop），所以隱藏了很多關於 Promise 的處理細節。\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"At a high level, async Rust code looks very much like \\\"normal\\\" sequential \"\n\"code:\"\nmsgstr \"\"\n\"從高層次的角度來看，非同步的 Rust 程式碼看起來很像「一般的」同步程式碼：\"\n\n#: src/async/async-await.md\nmsgid \"\\\"Count is: {i}!\\\"\"\nmsgstr \"\\\"Count is: {i}!\\\"\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"Note that this is a simplified example to show the syntax. There is no long \"\n\"running operation or any real concurrency in it!\"\nmsgstr \"\"\n\"注意這只是一個簡化過的程式碼，目的是要示範程式語法。這份範例程式碼當中並沒有\"\n\"需要長時間運行的操作，也沒有真正的併行處理！\"\n\n#: src/async/async-await.md\nmsgid \"What is the return type of an async call?\"\nmsgstr \"如何得知非同步函數的回傳型別？\"\n\n#: src/async/async-await.md\nmsgid \"Use `let future: () = async_main(10);` in `main` to see the type.\"\nmsgstr \"在 `main` 函數中使用 `let feature: () = async_main(10);` 以查看型態。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"The \\\"async\\\" keyword is syntactic sugar. The compiler replaces the return \"\n\"type with a future.\"\nmsgstr \"\"\n\"「async」這個關鍵字只是個程式碼語法糖。編譯器會將函數回傳型態以 future 取代。\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"You cannot make `main` async, without additional instructions to the \"\n\"compiler on how to use the returned future.\"\nmsgstr \"\"\n\"你不能把 `main` 函數標示成非同步函數，除非你對編譯器額外設定了如何處理回傳的 \"\n\"future 的方式。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"You need an executor to run async code. `block_on` blocks the current thread \"\n\"until the provided future has run to completion.\"\nmsgstr \"\"\n\"你需要處理器去執行非同步的程式碼。`block_on` 會阻塞當前的執行緒，直到 future \"\n\"已執行完畢。\"\n\n#: src/async/async-await.md\nmsgid \"\"\n\"`.await` asynchronously waits for the completion of another operation. \"\n\"Unlike `block_on`, `.await` doesn't block the current thread.\"\nmsgstr \"\"\n\"`.await` 會非同步地等待其他操作執行完畢。別於 `block_on`，`.await` 不會阻塞當\"\n\"前的執行緒。\"\n\n#: src/async/async-await.md\n#, fuzzy\nmsgid \"\"\n\"`.await` can only be used inside an `async` function (or block; these are \"\n\"introduced later).\"\nmsgstr \"`.await` 只能用在 `async` 函數（或程式碼區塊，之後會介紹）中。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a \"\n\"trait, implemented by objects that represent an operation that may not be \"\n\"complete yet. A future can be polled, and `poll` returns a [`Poll`](https://\"\n\"doc.rust-lang.org/std/task/enum.Poll.html).\"\nmsgstr \"\"\n\"[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) 是一種特\"\n\"徵，物件實作這種特徵時，代表作業或許尚未完成。Future 可供輪詢，而 `poll` 會傳\"\n\"回 [`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html)。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"An async function returns an `impl Future`. It's also possible (but \"\n\"uncommon) to implement `Future` for your own types. For example, the \"\n\"`JoinHandle` returned from `tokio::spawn` implements `Future` to allow \"\n\"joining to it.\"\nmsgstr \"\"\n\"非同步函式會傳回 `impl Future`。您也可以為自己的型別實作 `Future`，但不常見。\"\n\"舉例來說，從 `tokio::spawn` 傳回的 `JoinHandle` 會實作 `Future`，以便允許會\"\n\"合。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `.await` keyword, applied to a Future, causes the current async function \"\n\"to pause until that Future is ready, and then evaluates to its output.\"\nmsgstr \"\"\n\"套用至 Future 的 `.await` 關鍵字會暫停目前的非同步函式，直到 Future 準備就\"\n\"緒，接著則會計算其輸出內容。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"The `Future` and `Poll` types are implemented exactly as shown; click the \"\n\"links to show the implementations in the docs.\"\nmsgstr \"\"\n\"`Future` 和 `Poll` 型別的實作方式完全相同。點選連結即可在文件中查看實作方式。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"We will not get to `Pin` and `Context`, as we will focus on writing async \"\n\"code, rather than building new async primitives. Briefly:\"\nmsgstr \"\"\n\"我們不會探討 `Pin` 和 `Context`，因為我們會專注於編寫非同步程式碼，而非建立新\"\n\"的非同步基元。簡單來說：\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Context` allows a Future to schedule itself to be polled again when an \"\n\"event occurs.\"\nmsgstr \"`Context` 允許 Future 在事件發生時安排自身再次接受輪詢。\"\n\n#: src/async/futures.md\nmsgid \"\"\n\"`Pin` ensures that the Future isn't moved in memory, so that pointers into \"\n\"that future remain valid. This is required to allow references to remain \"\n\"valid after an `.await`.\"\nmsgstr \"\"\n\"`Pin` 可確保 Future 在記憶體中不被移動，這樣該 Future 的指標仍維持有效。如要\"\n\"允許參照在 `.await` 後持續有效，這麼做就有必要。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"A _runtime_ provides support for performing operations asynchronously (a \"\n\"_reactor_) and is responsible for executing futures (an _executor_). Rust \"\n\"does not have a \\\"built-in\\\" runtime, but several options are available:\"\nmsgstr \"\"\n\"「執行環境」支援以非同步方式執行作業 (「反應器」)，並負責執行 Future (「執行\"\n\"器」)。Rust 沒有「內建」執行階段，但提供多種選項：\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of \"\n\"functionality like [Hyper](https://hyper.rs/) for HTTP or [Tonic](https://\"\n\"github.com/hyperium/tonic) for gRPC.\"\nmsgstr \"\"\n\"[Tokio](https://tokio.rs/)：效能良好，具有完善的功能生態系統，例如適用於 \"\n\"HTTP 的 [Hyper](https://hyper.rs/)，或適用於 gRPC 的 [Tonic](https://github.\"\n\"com/hyperium/tonic)。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"[async-std](https://async.rs/): aims to be a \\\"std for async\\\", and includes \"\n\"a basic runtime in `async::task`.\"\nmsgstr \"\"\n\"[async-std](https://async.rs/)：目標是成為「async 的 std」，並在 `async::\"\n\"task` 中含有基本執行環境。\"\n\n#: src/async/runtimes.md\nmsgid \"[smol](https://docs.rs/smol/latest/smol/): simple and lightweight\"\nmsgstr \"[smol](https://docs.rs/smol/latest/smol/)：簡單輕量\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Several larger applications have their own runtimes. For example, [Fuchsia]\"\n\"(https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-\"\n\"async/src/lib.rs) already has one.\"\nmsgstr \"\"\n\"許多大型應用程式都有專屬的執行環境。例如，[Fuchsia](https://fuchsia.\"\n\"googlesource.com/fuchsia/+/refs/heads/main/src/lib/fuchsia-async/src/lib.rs) \"\n\"已有一個執行環境。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Note that of the listed runtimes, only Tokio is supported in the Rust \"\n\"playground. The playground also does not permit any I/O, so most interesting \"\n\"async things can't run in the playground.\"\nmsgstr \"\"\n\"請注意，在列出的執行環境中，Rust Playground 只支援 Tokio。Playground 也不允許\"\n\"任何 I/O，因此大部分有趣的非同步作業皆無法在 Playground 中執行。\"\n\n#: src/async/runtimes.md\nmsgid \"\"\n\"Futures are \\\"inert\\\" in that they do not do anything (not even start an I/O \"\n\"operation) unless there is an executor polling them. This differs from JS \"\n\"Promises, for example, which will run to completion even if they are never \"\n\"used.\"\nmsgstr \"\"\n\"除非接受執行器輪詢，否則 Future 不會執行任何作業 (甚至不會啟動 I/O 作業)，因\"\n\"此 Future 是「惰性」的。這一點與 JS Promise 不同。舉例來說，後者即使從未使用\"\n\"過，仍會執行至完成為止。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Tokio provides:\"\nmsgstr \"Tokio 提供以下項目：\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A multi-threaded runtime for executing asynchronous code.\"\nmsgstr \"執行非同步程式碼的多執行緒執行階段。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"An asynchronous version of the standard library.\"\nmsgstr \"標準程式庫的非同步版本。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"A large ecosystem of libraries.\"\nmsgstr \"龐大的程式庫生態系統。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Count in task: {i}!\\\"\"\nmsgstr \"\\\"Count in task: {i}!\\\"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\\\"Main task: {i}\\\"\"\nmsgstr \"\\\"Main task: {i}\\\"\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"With the `tokio::main` macro we can now make `main` async.\"\nmsgstr \"透過 `tokio::main` 巨集，我們現在可以使 `main` 非同步。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"The `spawn` function creates a new, concurrent \\\"task\\\".\"\nmsgstr \"`spawn` 函式會建立新的並行「工作」。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`.\"\nmsgstr \"注意：`spawn` 會採用 `Future`，您不會在 `count_to` 上呼叫 `.await`。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"**Further exploration:**\"\nmsgstr \"**進一步探究：**\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"\"\n\"Why does `count_to` not (usually) get to 10? This is an example of async \"\n\"cancellation. `tokio::spawn` returns a handle which can be awaited to wait \"\n\"until it finishes.\"\nmsgstr \"\"\n\"為什麼 `count_to` (通常) 不會達到 10？這是非同步取消的例子。直到 `tokio::\"\n\"spawn` 完成前，所傳回的控制代碼可以接受等待。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try `count_to(10).await` instead of spawning.\"\nmsgstr \"嘗試使用 `count_to(10).await`，而非採用產生狀態。\"\n\n#: src/async/runtimes/tokio.md\nmsgid \"Try awaiting the task returned from `tokio::spawn`.\"\nmsgstr \"嘗試等待從 `tokio::spawn` 傳回的工作。\"\n\n#: src/async/tasks.md\nmsgid \"Rust has a task system, which is a form of lightweight threading.\"\nmsgstr \"Rust 的工作系統是採用輕量執行緒的形式。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"A task has a single top-level future which the executor polls to make \"\n\"progress. That future may have one or more nested futures that its `poll` \"\n\"method polls, corresponding loosely to a call stack. Concurrency within a \"\n\"task is possible by polling multiple child futures, such as racing a timer \"\n\"and an I/O operation.\"\nmsgstr \"\"\n\"一項工作具有一個頂層 Future，執行器會輪詢該 Future 來推動進度。該 Future 可能\"\n\"有一或多個巢狀 Future，供其 `poll` 方法輪詢，可約略對應至呼叫堆疊。藉由輪詢多\"\n\"個子項 Future (例如競爭的計時器和 I/O 作業)，即可在工作內實現並行機制。\"\n\n#: src/async/tasks.md\nmsgid \"\\\"127.0.0.1:0\\\"\"\nmsgstr \"\\\"127.0.0.1:0\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"listening on port {}\\\"\"\nmsgstr \"\\\"listening on port {}\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"connection from {addr:?}\\\"\"\nmsgstr \"\\\"connection from {addr:?}\\\"\"\n\n#: src/async/tasks.md\nmsgid \"b\\\"Who are you?\\\\n\\\"\"\nmsgstr \"b\\\"Who are you?\\\\n\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"socket error\\\"\"\nmsgstr \"\\\"socket error\\\"\"\n\n#: src/async/tasks.md\nmsgid \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\nmsgstr \"\\\"Thanks for dialing in, {name}!\\\\n\\\"\"\n\n#: src/async/tasks.md src/async/control-flow/join.md\nmsgid \"\"\n\"Copy this example into your prepared `src/main.rs` and run it from there.\"\nmsgstr \"將這個範例複製到準備好的 `src/main.rs`，然後從中執行。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Try connecting to it with a TCP connection tool like [nc](https://www.unix.\"\n\"com/man-page/linux/1/nc/) or [telnet](https://www.unix.com/man-page/linux/1/\"\n\"telnet/).\"\nmsgstr \"\"\n\"請嘗試利用 TCP 連線工具來連線，例如 [nc](https://www.unix.com/man-page/\"\n\"linux/1/nc/) 或 [telnet](https://www.unix.com/man-page/linux/1/telnet/)。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Ask students to visualize what the state of the example server would be with \"\n\"a few connected clients. What tasks exist? What are their Futures?\"\nmsgstr \"\"\n\"請學生以圖像呈現範例伺服器具有幾個已連線用戶端時的狀態。會有哪些工作？Future \"\n\"為何？\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"This is the first time we've seen an `async` block. This is similar to a \"\n\"closure, but does not take any arguments. Its return value is a Future, \"\n\"similar to an `async fn`.\"\nmsgstr \"\"\n\"這是我們第一次看到 `async` 區塊，與閉包類似，但不接受任何引數。其回傳值為 \"\n\"Future，類似於 `async fn`。\"\n\n#: src/async/tasks.md\nmsgid \"\"\n\"Refactor the async block into a function, and improve the error handling \"\n\"using `?`.\"\nmsgstr \"將非同步區塊重構為函式，並使用 `?` 改善錯誤處理機制。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Several crates have support for asynchronous channels. For instance `tokio`:\"\nmsgstr \"有些 Crate 支援非同步管道。例如 `tokio`：\"\n\n#: src/async/channels.md\nmsgid \"\\\"Received {count} pings so far.\\\"\"\nmsgstr \"\\\"Received {count} pings so far.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"ping_handler complete\\\"\"\nmsgstr \"\\\"ping_handler complete\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Failed to send ping.\\\"\"\nmsgstr \"\\\"Failed to send ping.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Sent {} pings so far.\\\"\"\nmsgstr \"\\\"Sent {} pings so far.\\\"\"\n\n#: src/async/channels.md\nmsgid \"\\\"Something went wrong in ping handler task.\\\"\"\nmsgstr \"\\\"Something went wrong in ping handler task.\\\"\"\n\n#: src/async/channels.md\nmsgid \"Change the channel size to `3` and see how it affects the execution.\"\nmsgstr \"將管道大小變更為 `3`，瞭解這對執行作業的影響。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"Overall, the interface is similar to the `sync` channels as seen in the \"\n\"[morning class](concurrency/channels.md).\"\nmsgstr \"\"\n\"整體而言，這個介面類似於[早上課程](concurrency/channels.md)中看到的 `sync` 管\"\n\"道。\"\n\n#: src/async/channels.md\nmsgid \"Try removing the `std::mem::drop` call. What happens? Why?\"\nmsgstr \"請嘗試移除 `std::mem::drop` 呼叫。會發生什麼情況？為什麼？\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that \"\n\"implement both `sync` and `async` `send` and `recv`. This can be convenient \"\n\"for complex applications with both IO and heavy CPU processing tasks.\"\nmsgstr \"\"\n\"[Flume](https://docs.rs/flume/latest/flume/) Crate 具有同時實作 `sync` 和 \"\n\"`async` 的 `send` 和 `recv` 的管道。對於有 IO 和大量 CPU 處理工作的複雜應用程\"\n\"式，這相當便利。\"\n\n#: src/async/channels.md\nmsgid \"\"\n\"What makes working with `async` channels preferable is the ability to \"\n\"combine them with other `future`s to combine them and create complex control \"\n\"flow.\"\nmsgstr \"\"\n\"之所以較適合使用 `async` 管道，是因為這類管道能與其他 `future` 管道結合，進而\"\n\"建立複雜的控制流程。\"\n\n#: src/async/control-flow.md\nmsgid \"Futures Control Flow\"\nmsgstr \"Future 控制流程\"\n\n#: src/async/control-flow.md\nmsgid \"\"\n\"Futures can be combined together to produce concurrent compute flow graphs. \"\n\"We have already seen tasks, that function as independent threads of \"\n\"execution.\"\nmsgstr \"\"\n\"Future 可以合併，產生並行運算流程圖。我們已介紹過工作，工作的功能類似於獨立的\"\n\"執行作業執行緒。\"\n\n#: src/async/control-flow.md\nmsgid \"[Join](control-flow/join.md)\"\nmsgstr \"[會合](control-flow/join.md)\"\n\n#: src/async/control-flow.md\nmsgid \"[Select](control-flow/select.md)\"\nmsgstr \"[選取](control-flow/select.md)\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"A join operation waits until all of a set of futures are ready, and returns \"\n\"a collection of their results. This is similar to `Promise.all` in \"\n\"JavaScript or `asyncio.gather` in Python.\"\nmsgstr \"\"\n\"會合作業會等待整個 Future 集合準備就緒，然後蒐集多個結果一次回傳。這類似於 \"\n\"JavaScript 中的 `Promise.all` 或 Python 中的 `asyncio.gather`。\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://google.com\\\"\"\nmsgstr \"\\\"https://google.com\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://httpbin.org/ip\\\"\"\nmsgstr \"\\\"https://httpbin.org/ip\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"https://play.rust-lang.org/\\\"\"\nmsgstr \"\\\"https://play.rust-lang.org/\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\\\"BAD_URL\\\"\"\nmsgstr \"\\\"BAD_URL\\\"\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"For multiple futures of disjoint types, you can use `std::future::join!` but \"\n\"you must know how many futures you will have at compile time. This is \"\n\"currently in the `futures` crate, soon to be stabilised in `std::future`.\"\nmsgstr \"\"\n\"若是多個不同型別的 Future，您可以使用 `std::future::join!`，但必須知道編譯時\"\n\"會有多少 Future。這目前位於 `futures` Crate 中，不久後就會在 `std::future` 中\"\n\"推出穩定版。\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"The risk of `join` is that one of the futures may never resolve, this would \"\n\"cause your program to stall.\"\nmsgstr \"`join` 的風險是某個 Future 可能無法解決，導致程式停滯。\"\n\n#: src/async/control-flow/join.md\nmsgid \"\"\n\"You can also combine `join_all` with `join!` for instance to join all \"\n\"requests to an http service as well as a database query. Try adding a \"\n\"`tokio::time::sleep` to the future, using `futures::join!`. This is not a \"\n\"timeout (that requires `select!`, explained in the next chapter), but \"\n\"demonstrates `join!`.\"\nmsgstr \"\"\n\"舉例來說，您也可以併用 `join_all` 和 `join!`，讓所有要求會合至 HTTP 服務和資\"\n\"料庫查詢。請嘗試使用 `futures::join!`，將 `tokio::time::sleep` 新增至 \"\n\"Future。這並非逾時 (逾時需要 `select!`，下一章會說明)，而是示範 `join!`。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"A select operation waits until any of a set of futures is ready, and \"\n\"responds to that future's result. In JavaScript, this is similar to `Promise.\"\n\"race`. In Python, it compares to `asyncio.wait(task_set, return_when=asyncio.\"\n\"FIRST_COMPLETED)`.\"\nmsgstr \"\"\n\"選取作業會等到任何一組 Future 準備就緒，再針對該 Future 的結果提供回應。這類\"\n\"似於 JavaScript 中的 `Promise.race`。在 Python 中，則可與 `asyncio.\"\n\"wait(task_set, return_when=asyncio.FIRST_COMPLETED)` 比較。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Similar to a match statement, the body of `select!` has a number of arms, \"\n\"each of the form `pattern = future => statement`. When a `future` is ready, \"\n\"its return value is destructured by the `pattern`. The `statement` is then \"\n\"run with the resulting variables. The `statement` result becomes the result \"\n\"of the `select!` macro.\"\nmsgstr \"\"\n\"類似於比對陳述式，`select!` 的主體有多個分支，格式皆為 `pattern = future => \"\n\"statement`。當 `future` 準備就緒時，回傳值會由 `pattern` 解構。接著，\"\n\"`statement` 執行時會利用產生的變數。`statement` 結果會成為 `select!` 巨集的結\"\n\"果。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Felix\\\"\"\nmsgstr \"\\\"Felix\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send cat.\\\"\"\nmsgstr \"\\\"Failed to send cat.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Rex\\\"\"\nmsgstr \"\\\"Rex\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to send dog.\\\"\"\nmsgstr \"\\\"Failed to send dog.\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Failed to receive winner\\\"\"\nmsgstr \"\\\"Failed to receive winner\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\\\"Winner is {winner:?}\\\"\"\nmsgstr \"\\\"Winner is {winner:?}\\\"\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"In this example, we have a race between a cat and a dog. \"\n\"`first_animal_to_finish_race` listens to both channels and will pick \"\n\"whichever arrives first. Since the dog takes 50ms, it wins against the cat \"\n\"that take 500ms.\"\nmsgstr \"\"\n\"這個範例是貓狗賽跑。`first_animal_to_finish_race` 會監聽兩個管道，並挑選先抵\"\n\"達者。狗花了 50 毫秒，因此贏過花費 500 毫秒的貓。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"You can use `oneshot` channels in this example as the channels are supposed \"\n\"to receive only one `send`.\"\nmsgstr \"在這個範例中，您可以使用 `oneshot` 管道，因為管道只應接收一個 `send`。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Try adding a deadline to the race, demonstrating selecting different sorts \"\n\"of futures.\"\nmsgstr \"嘗試為賽跑加上期限，示範選擇各種 Future 的情形。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"Note that `select!` drops unmatched branches, which cancels their futures. \"\n\"It is easiest to use when every execution of `select!` creates new futures.\"\nmsgstr \"\"\n\"請注意，`select!` 會捨棄不相符的分支版本，這會取消 Future。若每次執行 \"\n\"`select!` 時都會建立新的 Future，就最容易使用這種做法。\"\n\n#: src/async/control-flow/select.md\nmsgid \"\"\n\"An alternative is to pass `&mut future` instead of the future itself, but \"\n\"this can lead to issues, further discussed in the pinning slide.\"\nmsgstr \"\"\n\"替代方法是傳遞 `&mut future`，而非傳遞 Future 本身，但這可能導致多項問題，詳\"\n\"細討論請見 pinning 投影片。\"\n\n#: src/async/pitfalls.md\nmsgid \"Pitfalls of async/await\"\nmsgstr \"async/await 的問題\"\n\n#: src/async/pitfalls.md\nmsgid \"\"\n\"Async / await provides convenient and efficient abstraction for concurrent \"\n\"asynchronous programming. However, the async/await model in Rust also comes \"\n\"with its share of pitfalls and footguns. We illustrate some of them in this \"\n\"chapter:\"\nmsgstr \"\"\n\"async/await 為並行非同步程式設計提供了便利有效率的抽象機制。不過，Rust 中的 \"\n\"async/await 模型也會造成問題和犯錯的機會。本章會說明其中幾種情形：\"\n\n#: src/async/pitfalls.md\nmsgid \"[Blocking the Executor](pitfalls/blocking-executor.md)\"\nmsgstr \"[阻塞執行器](pitfalls/blocking-executor.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Pin](pitfalls/pin.md)\"\nmsgstr \"[Pin](pitfalls/pin.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Async Traits](pitfalls/async-traits.md)\"\nmsgstr \"[非同步特徵](pitfalls/async-traits.md)\"\n\n#: src/async/pitfalls.md\nmsgid \"[Cancellation](pitfalls/cancellation.md)\"\nmsgstr \"[取消](pitfalls/cancellation.md)\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"Blocking the executor\"\nmsgstr \"阻塞執行器\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Most async runtimes only allow IO tasks to run concurrently. This means that \"\n\"CPU blocking tasks will block the executor and prevent other tasks from \"\n\"being executed. An easy workaround is to use async equivalent methods where \"\n\"possible.\"\nmsgstr \"\"\n\"大多數非同步執行環境只允許並行執行 IO 工作。這表示阻塞 CPU 的工作會阻塞執行\"\n\"器，不讓其他工作執行。一個簡單的解決方法，就是盡可能使用與非同步機制同等的方\"\n\"法。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\nmsgstr \"\\\"future {id} slept for {duration_ms}ms, finished after {}ms\\\"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\\\"current_thread\\\"\"\nmsgstr \"\\\"current_thread\\\"\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Run the code and see that the sleeps happen consecutively rather than \"\n\"concurrently.\"\nmsgstr \"執行程式碼，然後您會發現休眠狀態是連續發生，而非並行發生。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"The `\\\"current_thread\\\"` flavor puts all tasks on a single thread. This \"\n\"makes the effect more obvious, but the bug is still present in the multi-\"\n\"threaded flavor.\"\nmsgstr \"\"\n\"`\\\"current_thread\\\"` 變種版本會將所有工作放在單一執行緒。這樣的效果更加明顯，\"\n\"但多執行緒變種版本仍存在該錯誤。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result.\"\nmsgstr \"將 `std::thread::sleep` 改為 `tokio::time::sleep`，並等待結果。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Another fix would be to `tokio::task::spawn_blocking` which spawns an actual \"\n\"thread and transforms its handle into a future without blocking the executor.\"\nmsgstr \"\"\n\"另一個修正方式為 `tokio::task::spawn_blocking`，這可產生實際執行緒，並將控制\"\n\"代碼轉換為 Future，而不會阻塞執行器。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"You should not think of tasks as OS threads. They do not map 1 to 1 and most \"\n\"executors will allow many tasks to run on a single OS thread. This is \"\n\"particularly problematic when interacting with other libraries via FFI, \"\n\"where that library might depend on thread-local storage or map to specific \"\n\"OS threads (e.g., CUDA). Prefer `tokio::task::spawn_blocking` in such \"\n\"situations.\"\nmsgstr \"\"\n\"請勿將工作視為 OS 執行緒。工作不會 1 對 1 對應，且大部分執行器會允許在單一 \"\n\"OS 執行緒中執行多項工作。在透過 FFI 與其他程式庫互動時，這尤其會造成問題，因\"\n\"為程式庫可能會依附執行緒本機儲存空間，或對應至特定 OS 執行緒 (例如 CUDA)。在\"\n\"這種情況下，請優先使用 `tokio::task::spawn_blocking`。\"\n\n#: src/async/pitfalls/blocking-executor.md\nmsgid \"\"\n\"Use sync mutexes with care. Holding a mutex over an `.await` may cause \"\n\"another task to block, and that task may be running on the same thread.\"\nmsgstr \"\"\n\"請謹慎使用同步互斥鎖。將互斥鎖保留在 `.await` 上，可能會導致其他工作造成阻\"\n\"塞，且該工作可能在同一執行緒上執行。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Async blocks and functions return types implementing the `Future` trait. The \"\n\"type returned is the result of a compiler transformation which turns local \"\n\"variables into data stored inside the future.\"\nmsgstr \"\"\n\"非同步區塊和函式會傳回實作 `Future` 特徵的型別。傳回的型別是編譯器轉換的結\"\n\"果，會將本機變數轉換成在 Future 中儲存的資料。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Some of those variables can hold pointers to other local variables. Because \"\n\"of that, the future should never be moved to a different memory location, as \"\n\"it would invalidate those pointers.\"\nmsgstr \"\"\n\"其中一些變數可保留指向其他本機變數的指標。因此，Future 不應移至其他記憶體位\"\n\"置，以免這些指標失效。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"To prevent moving the future type in memory, it can only be polled through a \"\n\"pinned pointer. `Pin` is a wrapper around a reference that disallows all \"\n\"operations that would move the instance it points to into a different memory \"\n\"location.\"\nmsgstr \"\"\n\"為避免在記憶體中移動 Future 型別，此型別只能透過固定指標輪詢。`Pin` 是參照的\"\n\"包裝函式，會禁止所有將所指向例項移至不同記憶體位置的作業。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\nmsgstr \"\"\n\"// A work item. In this case, just sleep for the given time and respond\\n\"\n\"// with a message on the `respond_on` channel.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A worker which listens for work on a queue and performs it.\\n\"\nmsgstr \"// A worker which listens for work on a queue and performs it.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// Pretend to work.\\n\"\nmsgstr \"// Pretend to work.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send response\\\"\"\nmsgstr \"\\\"failed to send response\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// TODO: report number of iterations every 100ms\\n\"\nmsgstr \"// TODO: report number of iterations every 100ms\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"// A requester which requests work and waits for it to complete.\\n\"\nmsgstr \"// A requester which requests work and waits for it to complete.\\n\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed to send on work queue\\\"\"\nmsgstr \"\\\"failed to send on work queue\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"failed waiting for response\\\"\"\nmsgstr \"\\\"failed waiting for response\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\\\"work result for iteration {i}: {resp}\\\"\"\nmsgstr \"\\\"work result for iteration {i}: {resp}\\\"\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"You may recognize this as an example of the actor pattern. Actors typically \"\n\"call `select!` in a loop.\"\nmsgstr \"您可以將此視為演員模型的例子。演員通常會在迴圈中呼叫 `select!`。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This serves as a summation of a few of the previous lessons, so take your \"\n\"time with it.\"\nmsgstr \"這彙整了先前幾堂課的內容，您可以放鬆慢慢做。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to \"\n\"the `select!`. This will never execute. Why?\"\nmsgstr \"\"\n\"直接的將 `_ = sleep(Duration::from_millis(100)) => { println!(..) }` 新增至 \"\n\"`select!`。這永遠不會執行。為什麼？\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Instead, add a `timeout_fut` containing that future outside of the `loop`:\"\nmsgstr \"請改為在 `loop` 之外新增含有該 Future 的 `timeout_fut`：\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This still doesn't work. Follow the compiler errors, adding `&mut` to the \"\n\"`timeout_fut` in the `select!` to work around the move, then using `Box::\"\n\"pin`:\"\nmsgstr \"\"\n\"這樣還是無法運作。請根據編譯器錯誤，將 `&mut` 新增至 `select!` 中的 \"\n\"`timeout_fut` 來處理移動作業，然後使用 `Box::pin`：\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"This compiles, but once the timeout expires it is `Poll::Ready` on every \"\n\"iteration (a fused future would help with this). Update to reset \"\n\"`timeout_fut` every time it expires.\"\nmsgstr \"\"\n\"這樣可以編譯，但逾時到期後，每次疊代都會是 `Poll::Ready` (熔斷型 Future 有助\"\n\"解決這個問題)。更新即可在每次到期時重設 `timeout_fut`。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Box allocates on the heap. In some cases, `std::pin::pin!` (only recently \"\n\"stabilized, with older code often using `tokio::pin!`) is also an option, \"\n\"but that is difficult to use for a future that is reassigned.\"\nmsgstr \"\"\n\"Box 會在堆積上分配。在某些情況下，也可以採用 `std::pin::pin!` (最近才推出穩定\"\n\"版，舊版程式碼通常使用 `tokio::pin!`)，但這不容易用於已重新指派的 Future。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Another alternative is to not use `pin` at all but spawn another task that \"\n\"will send to a `oneshot` channel every 100ms.\"\nmsgstr \"\"\n\"另一個替代方案是完全不使用 `pin`，改為產生另一項工作，該工作每 100 毫秒就會傳\"\n\"送至 `oneshot` 管道。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"Data that contains pointers to itself is called self-referential. Normally, \"\n\"the Rust borrow checker would prevent self-referential data from being \"\n\"moved, as the references cannot outlive the data they point to. However, the \"\n\"code transformation for async blocks and functions is not verified by the \"\n\"borrow checker.\"\nmsgstr \"\"\n\"包含指向自己的指標的資料稱為自我參照。一般而言，Rust 借用檢查器會禁止移動自我\"\n\"參照資料，因為參照的留存時間不會超過其指向的資料。不過，非同步區塊和函式的程\"\n\"式碼轉換不會由借用檢查器驗證。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"`Pin` is a wrapper around a reference. An object cannot be moved from its \"\n\"place using a pinned pointer. However, it can still be moved through an \"\n\"unpinned pointer.\"\nmsgstr \"\"\n\"`Pin` 是參照的包裝函式。如要從現有位置移動物件，使用固定指標是行不通的。但若\"\n\"使用未固定的指標，則仍可以移動物件。\"\n\n#: src/async/pitfalls/pin.md\nmsgid \"\"\n\"The `poll` method of the `Future` trait uses `Pin<&mut Self>` instead of \"\n\"`&mut Self` to refer to the instance. That's why it can only be called on a \"\n\"pinned pointer.\"\nmsgstr \"\"\n\"`Future` 特徵的 `poll` 方法是使用 `Pin<&mut Self>` 參照例項，而非使用 `&mut \"\n\"Self`。因此，您只能在固定指標上呼叫這個方法。\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Async methods in traits are were stabilized only recently, in the 1.75 \"\n\"release. This required support for using return-position `impl Trait` (RPIT) \"\n\"in traits, as the desugaring for `async fn` includes `-> impl Future<Output \"\n\"= ...>`.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"However, even with the native support today there are some pitfalls around \"\n\"`async fn` and RPIT in traits:\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Return-position impl Trait captures all in-scope lifetimes (so some patterns \"\n\"of borrowing cannot be expressed)\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Traits whose methods use return-position `impl trait` or `async` are not \"\n\"`dyn` compatible.\"\nmsgstr \"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"If we do need `dyn` support, the crate [async_trait](https://docs.rs/async-\"\n\"trait/latest/async_trait/) provides a workaround through a macro, with some \"\n\"caveats:\"\nmsgstr \"\"\n\"如果需要 `dyn` 支援，Crate [async_trait](https://docs.rs/async-trait/latest/\"\n\"async_trait/) 提供採用巨集的解決方法（但有些要注意的地方）：\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"running all sleepers..\\\"\"\nmsgstr \"\\\"running all sleepers..\\\"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\\\"slept for {}ms\\\"\"\nmsgstr \"\\\"slept for {}ms\\\"\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"`async_trait` is easy to use, but note that it's using heap allocations to \"\n\"achieve this. This heap allocation has performance overhead.\"\nmsgstr \"\"\n\"`async_trait` 相當容易使用，但請注意，它是運用堆積分配來達成此效果。這種堆積\"\n\"分配會造成效能負擔。\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"The challenges in language support for `async trait` are deep Rust and \"\n\"probably not worth describing in-depth. Niko Matsakis did a good job of \"\n\"explaining them in [this post](https://smallcultfollowing.com/babysteps/\"\n\"blog/2019/10/26/async-fn-in-traits-are-hard/) if you are interested in \"\n\"digging deeper.\"\nmsgstr \"\"\n\"有關 `async trait` 語言支援的困難處涉及艱深的 Rust，可能不適合深入介紹。如有\"\n\"興趣深入探究，可以參閱 Niko Matsakis 的[這篇文章](https://smallcultfollowing.\"\n\"com/babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/)，說明得相當清楚。\"\n\n#: src/async/pitfalls/async-traits.md\nmsgid \"\"\n\"Try creating a new sleeper struct that will sleep for a random amount of \"\n\"time and adding it to the Vec.\"\nmsgstr \"\"\n\"嘗試建立新的休眠程式結構體，讓該結構體隨機決定休眠時間長度，然後將其新增至 \"\n\"Vec。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Dropping a future implies it can never be polled again. This is called \"\n\"_cancellation_ and it can occur at any `await` point. Care is needed to \"\n\"ensure the system works correctly even when futures are cancelled. For \"\n\"example, it shouldn't deadlock or lose data.\"\nmsgstr \"\"\n\"捨棄 Future 表示 Future 無法再供輪詢。這稱為「取消」，可能發生在任何 `await` \"\n\"時間點。即使 Future 遭到取消，也需審慎確保系統正常運作，例如不應出現死結或遺\"\n\"失資料。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"not UTF-8\\\"\"\nmsgstr \"\\\"非 UTF-8\\\"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"hi\\\\nthere\\\\n\\\"\"\nmsgstr \"\\\"hi\\\\nthere\\\\n\\\"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\\\"tick!\\\"\"\nmsgstr \"\\\"tick!\\\"\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"The compiler doesn't help with cancellation-safety. You need to read API \"\n\"documentation and consider what state your `async fn` holds.\"\nmsgstr \"\"\n\"編譯器無法確保安全的取消作業。您需要閱讀 API 說明文件，並考量 `async fn` 保留\"\n\"的狀態。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Unlike `panic` and `?`, cancellation is part of normal control flow (vs \"\n\"error-handling).\"\nmsgstr \"與 `panic` 和 `?` 不同，取消是正常控制流程的一部分 (相較於錯誤處理)。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"The example loses parts of the string.\"\nmsgstr \"此範例失去字串的某些部分。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"Whenever the `tick()` branch finishes first, `next()` and its `buf` are \"\n\"dropped.\"\nmsgstr \"每當 `tick()` 分支版本先完成時，`next()` 和其 `buf` 都會遭到捨棄。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"`LinesReader` can be made cancellation-safe by making `buf` part of the \"\n\"struct:\"\nmsgstr \"`LinesReader` 可讓 `buf` 成為結構體的一部分，確保安全的取消作業：\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"// prefix buf and bytes with self.\\n\"\nmsgstr \"// prefix buf and bytes with self.\\n\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) is cancellation-safe because it keeps track of whether a \"\n\"tick has been 'delivered'.\"\nmsgstr \"\"\n\"[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval.\"\n\"html#method.tick) 會追蹤滴答是否「已送達」，因此可確保安全的取消作業。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read) is cancellation-safe because it either \"\n\"returns or doesn't read data.\"\nmsgstr \"\"\n\"[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncReadExt.html#method.read)od.read) 只會傳回資料或不讀取資料，因此可確保安\"\n\"全的取消作業。\"\n\n#: src/async/pitfalls/cancellation.md\nmsgid \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) is similar to the example and _isn't_ \"\n\"cancellation-safe. See its documentation for details and alternatives.\"\nmsgstr \"\"\n\"[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait.\"\n\"AsyncBufReadExt.html#method.read_line) 與本範例相似，「無法」確保安全的取消作\"\n\"業。如要瞭解詳情和替代方案，請參閱說明文件。\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"To practice your Async Rust skills, we have again two exercises for you:\"\nmsgstr \"為幫助您練習非同步 Rust 技巧，我們再次提供了兩項練習：\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"Dining philosophers: we already saw this problem in the morning. This time \"\n\"you are going to implement it with Async Rust.\"\nmsgstr \"\"\n\"哲學家就餐問題：我們早上已看過這個練習題，這次要使用非同步 Rust 來實作。\"\n\n#: src/exercises/concurrency/afternoon.md\nmsgid \"\"\n\"A Broadcast Chat Application: this is a larger project that allows you \"\n\"experiment with more advanced Async Rust features.\"\nmsgstr \"\"\n\"廣播即時通訊應用程式：利用這項大型專案，您可以嘗試使用更進階的非同步 Rust 功\"\n\"能。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Dining Philosophers --- Async\"\nmsgstr \"哲學家就餐問題 --- 非同步\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"See [dining philosophers](dining-philosophers.md) for a description of the \"\n\"problem.\"\nmsgstr \"請參閱[哲學家就餐問題](dining-philosophers.md)，查看題目說明。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"As before, you will need a local [Cargo installation](../../cargo/running-\"\n\"locally.md) for this exercise. Copy the code below to a file called `src/\"\n\"main.rs`, fill out the blanks, and test that `cargo run` does not deadlock:\"\nmsgstr \"\"\n\"和之前一樣，這項練習需要在本機[安裝 Cargo](../../cargo/running-locally.md)。\"\n\"請將以下程式碼複製到名為 `src/main.rs` 的檔案、填寫空白處，然後測試 `cargo \"\n\"run` 不會發生死結：\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Keep trying until we have both forks\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Make them think and eat\\n\"\nmsgstr \"// Make them think and eat\\n\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Since this time you are using Async Rust, you'll need a `tokio` dependency. \"\n\"You can use the following `Cargo.toml`:\"\nmsgstr \"\"\n\"這次是使用非同步 Rust，因此會需要 `tokio` 依附元件。您可以使用下列 `Cargo.\"\n\"toml`：\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"dining-philosophers-async-dine\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"tokio = { version = \\\"1.26.0\\\", features = [\\\"sync\\\", \\\"time\\\", \\\"macros\\\", \"\n\"\\\"rt-multi-thread\\\"] }\\n\"\n\"```\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"\"\n\"Also note that this time you have to use the `Mutex` and the `mpsc` module \"\n\"from the `tokio` crate.\"\nmsgstr \"另請注意，這次必須使用 `tokio` Crate 中的 `Mutex` 和 `mpsc` 模組。\"\n\n#: src/exercises/concurrency/dining-philosophers-async.md\nmsgid \"Can you make your implementation single-threaded?\"\nmsgstr \"您的實作項目能否採用單一執行緒？\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"In this exercise, we want to use our new knowledge to implement a broadcast \"\n\"chat application. We have a chat server that the clients connect to and \"\n\"publish their messages. The client reads user messages from the standard \"\n\"input, and sends them to the server. The chat server broadcasts each message \"\n\"that it receives to all the clients.\"\nmsgstr \"\"\n\"在本練習中，我們要運用所學的新知識，實作廣播即時通訊應用程式。我們有一個即時\"\n\"通訊伺服器，供用戶端連線和發布訊息。用戶端會從標準輸入內容讀取使用者訊息，然\"\n\"後將訊息傳送至伺服器。即時通訊伺服器會將收到的每則訊息播送至所有用戶端。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/\"\n\"sync/broadcast/fn.channel.html) on the server, and [`tokio_websockets`]\"\n\"(https://docs.rs/tokio-websockets/) for the communication between the client \"\n\"and the server.\"\nmsgstr \"\"\n\"為此，我們會使用伺服器上的[廣播通道](https://docs.rs/tokio/latest/tokio/sync/\"\n\"broadcast/fn.channel.html) 和 [`tokio_websockets`](https://docs.rs/tokio-\"\n\"websockets/)，在用戶端和伺服器之間通訊。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Create a new Cargo project and add the following dependencies:\"\nmsgstr \"請建立新的 Cargo 專案，並新增下列依附元件：\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"_Cargo.toml_:\"\nmsgstr \"Cargo.toml：\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.36.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.7.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\nmsgstr \"\"\n\"```toml\\n\"\n\"[package]\\n\"\n\"name = \\\"chat-async\\\"\\n\"\n\"version = \\\"0.1.0\\\"\\n\"\n\"edition = \\\"2021\\\"\\n\"\n\"\\n\"\n\"[dependencies]\\n\"\n\"futures-util = { version = \\\"0.3.30\\\", features = [\\\"sink\\\"] }\\n\"\n\"http = \\\"1.0.0\\\"\\n\"\n\"tokio = { version = \\\"1.36.0\\\", features = [\\\"full\\\"] }\\n\"\n\"tokio-websockets = { version = \\\"0.7.0\\\", features = [\\\"client\\\", \"\n\"\\\"fastrand\\\", \\\"server\\\", \\\"sha1_smol\\\"] }\\n\"\n\"```\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"The required APIs\"\nmsgstr \"所需 API\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"You are going to need the following functions from `tokio` and \"\n\"[`tokio_websockets`](https://docs.rs/tokio-websockets/). Spend a few minutes \"\n\"to familiarize yourself with the API.\"\nmsgstr \"\"\n\"您會需要 `tokio` 和 [`tokio_websockets`](https://docs.rs/tokio-websockets/) \"\n\"中的以下函式。請花幾分鐘熟悉此 API。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/\"\n\"trait.StreamExt.html#method.next) implemented by `WebSocketStream`: for \"\n\"asynchronously reading messages from a Websocket Stream.\"\nmsgstr \"\"\n\"由 `WebSocketStream` 實作的 [StreamExt::next()](https://docs.rs/futures-\"\n\"util/0.3.28/futures_util/stream/trait.StreamExt.html#method.next)：用於非同步\"\n\"讀取 WebSocket 串流中的訊息。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/\"\n\"trait.SinkExt.html#method.send) implemented by `WebSocketStream`: for \"\n\"asynchronously sending messages on a Websocket Stream.\"\nmsgstr \"\"\n\"由 `WebSocketStream` 實作的 [SinkExt::send()](https://docs.rs/futures-\"\n\"util/0.3.28/futures_util/sink/trait.SinkExt.html#method.send)：用於在 \"\n\"WebSocket 串流中非同步傳送訊息。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line): for asynchronously reading user messages from the \"\n\"standard input.\"\nmsgstr \"\"\n\"[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines.\"\n\"html#method.next_line)：用於非同步讀取標準輸入內容中的使用者訊息。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe): for subscribing to a broadcast channel.\"\nmsgstr \"\"\n\"[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/\"\n\"struct.Sender.html#method.subscribe)：用於訂閱廣播管道。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Two binaries\"\nmsgstr \"兩個二進位檔\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Normally in a Cargo project, you can have only one binary, and one `src/main.\"\n\"rs` file. In this project, we need two binaries. One for the client, and one \"\n\"for the server. You could potentially make them two separate Cargo projects, \"\n\"but we are going to put them in a single Cargo project with two binaries. \"\n\"For this to work, the client and the server code should go under `src/bin` \"\n\"(see the [documentation](https://doc.rust-lang.org/cargo/reference/cargo-\"\n\"targets.html#binaries)).\"\nmsgstr \"\"\n\"在 Cargo 專案中，通常只能有一個二進位檔，以及一個 `src/main.rs` 檔案。這項專\"\n\"案需要兩個二進位檔，一個用於用戶端，另一個用於伺服器。您可以設為兩個不同的 \"\n\"Cargo 專案，但我們會放入包含兩個二進位檔的單一 Cargo 專案。為順利運作，用戶端\"\n\"和伺服器程式碼應位於 `src/bin` 下方 (請參閱[說明文件](https://doc.rust-lang.\"\n\"org/cargo/reference/cargo-targets.html#binaries))。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Copy the following server and client code into `src/bin/server.rs` and `src/\"\n\"bin/client.rs`, respectively. Your task is to complete these files as \"\n\"described below.\"\nmsgstr \"\"\n\"請將以下伺服器和用戶端程式碼分別複製到 `src/bin/server.rs` 和 `src/bin/\"\n\"client.rs` 中。請按照下方說明完成這些檔案。\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/server.rs_:\"\nmsgstr \"src/bin/server.rs：\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"// TODO: For a hint, see the description of the task below.\\n\"\nmsgstr \"// TODO: For a hint, see the description of the task below.\\n\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"127.0.0.1:2000\\\"\"\nmsgstr \"\\\"127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"listening on port 2000\\\"\"\nmsgstr \"\\\"listening on port 2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"New connection from {addr:?}\\\"\"\nmsgstr \"\\\"New connection from {addr:?}\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Wrap the raw TCP stream into a websocket.\\n\"\nmsgstr \"// Wrap the raw TCP stream into a websocket.\\n\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"_src/bin/client.rs_:\"\nmsgstr \"src/bin/client.rs：\"\n\n#: src/exercises/concurrency/chat-app.md\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"ws://127.0.0.1:2000\\\"\"\nmsgstr \"\\\"ws://127.0.0.1:2000\\\"\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Running the binaries\"\nmsgstr \"執行二進位檔\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Run the server with:\"\nmsgstr \"使用以下指令執行伺服器：\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"and the client with:\"\nmsgstr \"並使用以下指令執行用戶端：\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Implement the `handle_connection` function in `src/bin/server.rs`.\"\nmsgstr \"在 `src/bin/server.rs` 中實作 `handle_connection` 函式。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: Use `tokio::select!` for concurrently performing two tasks in a \"\n\"continuous loop. One task receives messages from the client and broadcasts \"\n\"them. The other sends messages received by the server to the client.\"\nmsgstr \"\"\n\"提示：使用 `tokio::select!` 即可在連續迴圈中並行執行兩項工作。一項工作會收到\"\n\"來自用戶端的訊息，然後播送訊息。另一項工作則是將伺服器收到的訊息傳送至用戶\"\n\"端。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"Complete the main function in `src/bin/client.rs`.\"\nmsgstr \"完成 `src/bin/client.rs` 中的主函式。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Hint: As before, use `tokio::select!` in a continuous loop for concurrently \"\n\"performing two tasks: (1) reading user messages from standard input and \"\n\"sending them to the server, and (2) receiving messages from the server, and \"\n\"displaying them for the user.\"\nmsgstr \"\"\n\"提示：和先前一樣，在連續迴圈中使用 `tokio::select!` 並行執行兩項工作：(1) 從\"\n\"標準輸入內容讀取使用者訊息，然後將訊息傳送至伺服器；(2) 接收來自伺服器的訊\"\n\"息，並向使用者顯示訊息。\"\n\n#: src/exercises/concurrency/chat-app.md\nmsgid \"\"\n\"Optional: Once you are done, change the code to broadcast messages to all \"\n\"clients, but the sender of the message.\"\nmsgstr \"\"\n\"選用步驟：完成後，將程式碼變更為播送訊息給所有用戶端，但不包括訊息發送端。\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"Concurrency Afternoon Exercise\"\nmsgstr \"並行：下午練習\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](dining-philosophers-async.md))\"\nmsgstr \"([返回練習](dining-philosophers-async.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the left fork, drop the right fork if we\\n\"\n\"                // have it and let other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// If we didn't get the right fork, drop the left fork and let\\n\"\n\"                // other tasks make progress.\\n\"\nmsgstr \"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// The locks are dropped here\\n\"\nmsgstr \"// The locks are dropped here\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\nmsgstr \"// tx is dropped here, so we don't need to explicitly drop it later\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Here is a thought: {thought}\\\"\"\nmsgstr \"\\\"Here is a thought: {thought}\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"([back to exercise](chat-app.md))\"\nmsgstr \"([返回練習](chat-app.md))\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"Welcome to chat! Type a message\\\"\"\nmsgstr \"\\\"Welcome to chat! Type a message\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\nmsgstr \"\"\n\"// A continuous loop for concurrently performing two tasks: (1) receiving\\n\"\n\"    // messages from `ws_stream` and broadcasting them, and (2) receiving\\n\"\n\"    // messages on `bcast_rx` and sending them to the client.\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From client {addr:?} {text:?}\\\"\"\nmsgstr \"\\\"From client {addr:?} {text:?}\\\"\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"// Continuous loop for concurrently sending and receiving messages.\\n\"\nmsgstr \"// Continuous loop for concurrently sending and receiving messages.\\n\"\n\n#: src/exercises/concurrency/solutions-afternoon.md\nmsgid \"\\\"From server: {}\\\"\"\nmsgstr \"\\\"From server: {}\\\"\"\n\n#: src/thanks.md\nmsgid \"\"\n\"_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and \"\n\"that it was useful.\"\nmsgstr \"\"\n\"感謝您參加 Comprehensive Rust 🦀 課程！__希望您喜歡這門課，並能學以致用。\"\n\n#: src/thanks.md\nmsgid \"\"\n\"We've had a lot of fun putting the course together. The course is not \"\n\"perfect, so if you spotted any mistakes or have ideas for improvements, \"\n\"please get in [contact with us on GitHub](https://github.com/google/\"\n\"comprehensive-rust/discussions). We would love to hear from you.\"\nmsgstr \"\"\n\"我們在整合課程時獲得許多樂趣。但這門課並非完美無缺，因此您若發現任何錯誤，或\"\n\"有改善的想法，歡迎[透過 GitHub 與我們聯絡](https://github.com/google/\"\n\"comprehensive-rust/discussions)。我們很樂於傾聽您的意見！\"\n\n#: src/glossary.md\nmsgid \"\"\n\"The following is a glossary which aims to give a short definition of many \"\n\"Rust terms. For translations, this also serves to connect the term back to \"\n\"the English original.\"\nmsgstr \"\"\n\"以下詞彙解釋的目標是提供許多 Rust 詞彙的簡短定義。對翻譯而言，也可以補充說明\"\n\"詞彙的英文原意。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"allocate:  \\n\"\n\"Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md).\"\nmsgstr \"\"\n\"分配：\\n\"\n\"[堆積](memory-management/stack-vs-heap.md)上的動態記憶體配置。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"argument:  \\n\"\n\"Information that is passed into a function or method.\"\nmsgstr \"\"\n\"引數：\\n\"\n\"傳遞至函式或方法的資訊。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Bare-metal Rust:  \\n\"\n\"Low-level Rust development, often deployed to a system without an operating \"\n\"system. See [Bare-metal Rust](bare-metal.md).\"\nmsgstr \"\"\n\"Rust 裸機開發：\\n\"\n\"低階 Rust 開發作業，通常是部署至沒有作業系統的系統。請參閱 [Rust 裸機開發]\"\n\"(bare-metal.md)相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"block:  \\n\"\n\"See [Blocks](control-flow/blocks.md) and _scope_.\"\nmsgstr \"\"\n\"區塊：\\n\"\n\"請參閱[區塊](control-flow/blocks.md)和「範圍」相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow:  \\n\"\n\"See [Borrowing](ownership/borrowing.md).\"\nmsgstr \"\"\n\"借用：\\n\"\n\"請參閱[借用](ownership/borrowing.md)相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"borrow checker:  \\n\"\n\"The part of the Rust compiler which checks that all borrows are valid.\"\nmsgstr \"\"\n\"借用檢查器：\\n\"\n\"Rust 編譯器的一部分，可檢查所有借用是否都有效。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"brace:  \\n\"\n\"`{` and `}`. Also called _curly brace_, they delimit _blocks_.\"\nmsgstr \"\"\n\"大括號：\\n\"\n\"`{` and `}`，用於分隔「區塊」。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"build:  \\n\"\n\"The process of converting source code into executable code or a usable \"\n\"program.\"\nmsgstr \"\"\n\"建構：\\n\"\n\"將原始碼轉換為可執行的程式碼或可使用的程式的程序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"call:  \\n\"\n\"To invoke or execute a function or method.\"\nmsgstr \"\"\n\"呼叫：\\n\"\n\"叫用/執行函式或方法。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"channel:  \\n\"\n\"Used to safely pass messages [between threads](concurrency/channels.md).\"\nmsgstr \"\"\n\"管道：\\n\"\n\"用於在[執行緒之間](concurrency/channels.md)安全地傳遞訊息。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Comprehensive Rust 🦀:  \\n\"\n\"The courses here are jointly called Comprehensive Rust 🦀.\"\nmsgstr \"\"\n\"Comprehensive Rust 🦀：\\n\"\n\" 此處的課程合稱為 Comprehensive Rust 🦀。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"concurrency:  \\n\"\n\"The execution of multiple tasks or processes at the same time.\"\nmsgstr \"\"\n\"並行：\\n\"\n\"同時執行多項工作或程序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Concurrency in Rust:  \\n\"\n\"See [Concurrency in Rust](concurrency.md).\"\nmsgstr \"\"\n\"Rust 中的並行：\\n\"\n\"請參閱 [Rust 中的並行](concurrency.md)相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"constant:  \\n\"\n\"A value that does not change during the execution of a program.\"\nmsgstr \"\"\n\"常數：\\n\"\n\"在程式執行期間不會變更的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"control flow:  \\n\"\n\"The order in which the individual statements or instructions are executed in \"\n\"a program.\"\nmsgstr \"\"\n\"控制流程：\\n\"\n\"個別陳述式或指示在程式中執行的順序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"crash:  \\n\"\n\"An unexpected and unhandled failure or termination of a program.\"\nmsgstr \"\"\n\"崩潰：\\n\"\n\"程式發生非預期且未處理的失敗或終止情形。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"enumeration:  \\n\"\n\"A data type that holds one of several named constants, possibly with an \"\n\"associated tuple or struct.\"\nmsgstr \"\"\n\"列舉：\\n\"\n\"儲存多個具名常數之一的資料型別，可能具有相關聯的元組或結構體。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error:  \\n\"\n\"An unexpected condition or result that deviates from the expected behavior.\"\nmsgstr \"\"\n\"錯誤：\\n\"\n\"偏離預期行為的意外狀況或結果。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"error handling:  \\n\"\n\"The process of managing and responding to errors that occur during program \"\n\"execution.\"\nmsgstr \"\"\n\"錯誤處理：\\n\"\n\"管理和回應程式執行錯誤的程序。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"exercise:  \\n\"\n\"A task or problem designed to practice and test programming skills.\"\nmsgstr \"\"\n\"練習：\\n\"\n\"專為磨練及測試程式設計技能而設計的工作或問題。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"function:  \\n\"\n\"A reusable block of code that performs a specific task.\"\nmsgstr \"\"\n\"函式：\\n\"\n\"執行特定工作的程式碼區塊，可重複使用。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"garbage collector:  \\n\"\n\"A mechanism that automatically frees up memory occupied by objects that are \"\n\"no longer in use.\"\nmsgstr \"\"\n\"垃圾收集器：\\n\"\n\"此機制會自動釋出不再使用的物件所占用的記憶體。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"generics:  \\n\"\n\"A feature that allows writing code with placeholders for types, enabling \"\n\"code reuse with different data types.\"\nmsgstr \"\"\n\"泛型：\\n\"\n\"這項功能允許為型別使用預留位置編寫程式碼，方便搭配不同資料型別重複使用程式\"\n\"碼。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"immutable:  \\n\"\n\"Unable to be changed after creation.\"\nmsgstr \"\"\n\"不可變動：\\n\"\n\"建立後即無法變更。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"integration test:  \\n\"\n\"A type of test that verifies the interactions between different parts or \"\n\"components of a system.\"\nmsgstr \"\"\n\"整合測試：\\n\"\n\"這種測試可驗證系統中不同部分或元件之間的互動。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"keyword:  \\n\"\n\"A reserved word in a programming language that has a specific meaning and \"\n\"cannot be used as an identifier.\"\nmsgstr \"\"\n\"關鍵字：\\n\"\n\"程式設計語言中具有特定意義的保留字，無法用於命名。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"library:  \\n\"\n\"A collection of precompiled routines or code that can be used by programs.\"\nmsgstr \"\"\n\"程式庫：\\n\"\n\"一系列預先編譯的常式或程式碼，可供程式使用。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"macro:  \\n\"\n\"Rust macros can be recognized by a `!` in the name. Macros are used when \"\n\"normal functions are not enough. A typical example is `format!`, which takes \"\n\"a variable number of arguments, which isn't supported by Rust functions.\"\nmsgstr \"\"\n\"巨集：\\n\"\n\"名稱中有 `!`，即為 Rust 巨集。當一般函式不夠用時，就會使用巨集。常見例子為 \"\n\"`format!`，可採用不固定數量的引數，但 Rust 函式不支援這項功能。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"`main` function:  \\n\"\n\"Rust programs start executing with the `main` function.\"\nmsgstr \"\"\n\"`main` 函式：\\n\"\n\"Rust 程式開始執行時會使用 `main` 函式。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"match:  \\n\"\n\"A control flow construct in Rust that allows for pattern matching on the \"\n\"value of an expression.\"\nmsgstr \"\"\n\"配對：\\n\"\n\"Rust 中的控制流程結構，允許對運算式的值執行模式配對作業。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"memory leak:  \\n\"\n\"A situation where a program fails to release memory that is no longer \"\n\"needed, leading to a gradual increase in memory usage.\"\nmsgstr \"\"\n\"記憶體流失：\\n\"\n\"程式無法釋放不再需要的記憶體，導致記憶體用量逐步增加。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"method:  \\n\"\n\"A function associated with an object or a type in Rust.\"\nmsgstr \"\"\n\"方法：\\n\"\n\"Rust 中與物件或型別相關聯的函式。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"module:  \\n\"\n\"A namespace that contains definitions, such as functions, types, or traits, \"\n\"to organize code in Rust.\"\nmsgstr \"\"\n\"模組：\\n\"\n\"包含函式、型別或特徵等定義的命名空間，用於整理 Rust 中的程式碼。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"move:  \\n\"\n\"The transfer of ownership of a value from one variable to another in Rust.\"\nmsgstr \"\"\n\"移動：\\n\"\n\"在 Rust 中將值的擁有權從某個變數轉移至另一個變數。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"mutable:  \\n\"\n\"A property in Rust that allows variables to be modified after they have been \"\n\"declared.\"\nmsgstr \"\"\n\"可變動：\\n\"\n\"Rust 中的屬性，允許在宣告變數後修改變數。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"ownership:  \\n\"\n\"The concept in Rust that defines which part of the code is responsible for \"\n\"managing the memory associated with a value.\"\nmsgstr \"\"\n\"擁有權：\\n\"\n\"Rust 中的概念，可定義由哪部分的程式碼負責管理與值相關聯的記憶體。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"panic:  \\n\"\n\"An unrecoverable error condition in Rust that results in the termination of \"\n\"the program.\"\nmsgstr \"\"\n\"恐慌：\\n\"\n\"Rust 中無法復原的錯誤狀況，導致程式終止。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"parameter:  \\n\"\n\"A value that is passed into a function or method when it is called.\"\nmsgstr \"\"\n\"參數：\\n\"\n\"在呼叫函式或方法時，傳遞至函式或方法的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"pattern:  \\n\"\n\"A combination of values, literals, or structures that can be matched against \"\n\"an expression in Rust.\"\nmsgstr \"\"\n\"模式：\\n\"\n\"值、常值或結構體的組合，可以與 Rust 中的運算式配對。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"payload:  \\n\"\n\"The data or information carried by a message, event, or data structure.\"\nmsgstr \"\"\n\"酬載：\\n\"\n\"訊息、事件或資料結構體攜帶的資料或資訊。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"program:  \\n\"\n\"A set of instructions that a computer can execute to perform a specific task \"\n\"or solve a particular problem.\"\nmsgstr \"\"\n\"程式：\\n\"\n\"可供電腦執行的一組指示，用來執行特定工作或解決特定問題。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"programming language:  \\n\"\n\"A formal system used to communicate instructions to a computer, such as Rust.\"\nmsgstr \"\"\n\"程式設計語言：\\n\"\n\"用來向電腦傳達指示的正式系統，例如 Rust。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"receiver:  \\n\"\n\"The first parameter in a Rust method that represents the instance on which \"\n\"the method is called.\"\nmsgstr \"\"\n\"接收器：\\n\"\n\"Rust 方法中的第一個參數，代表呼叫該方法的例項。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"reference counting:  \\n\"\n\"A memory management technique in which the number of references to an object \"\n\"is tracked, and the object is deallocated when the count reaches zero.\"\nmsgstr \"\"\n\"參照計數：\\n\"\n\"這種記憶體管理技術會追蹤物件的參照數量，並在計數達到零時取消分配物件。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"return:  \\n\"\n\"A keyword in Rust used to indicate the value to be returned from a function.\"\nmsgstr \"\"\n\"return：\\n\"\n\"Rust 中的關鍵字，用來指出要從函式傳回的值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust:  \\n\"\n\"A systems programming language that focuses on safety, performance, and \"\n\"concurrency.\"\nmsgstr \"\"\n\"Rust：\\n\"\n\"著重安全性、效能和並行的系統程式設計語言。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust Fundamentals:  \\n\"\n\"Days 1 to 4 of this course.\"\nmsgstr \"\"\n\"Rust 基礎知識：\\n\"\n\"本課程第 1 到 4 天的內容。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Android:  \\n\"\n\"See [Rust in Android](android.md).\"\nmsgstr \"\"\n\"Android 中的 Rust：\\n\"\n\"請參閱 [Android 中的 Rust](android.md) 相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"Rust in Chromium:  \\n\"\n\"See [Rust in Chromium](chromium.md).\"\nmsgstr \"\"\n\"Chromium 中的 Rust：\\n\"\n\"請參閱 [Chromium 中的 Rust](chromium.md) 相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"safe:  \\n\"\n\"Refers to code that adheres to Rust's ownership and borrowing rules, \"\n\"preventing memory-related errors.\"\nmsgstr \"\"\n\"安全：\\n\"\n\"指符合 Rust 擁有權和借用規則的程式碼，可避免記憶體相關錯誤。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"scope:  \\n\"\n\"The region of a program where a variable is valid and can be used.\"\nmsgstr \"\"\n\"範圍：\\n\"\n\"程式的區域，位於其中的變數皆有效且可供使用。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"standard library:  \\n\"\n\"A collection of modules providing essential functionality in Rust.\"\nmsgstr \"\"\n\"標準程式庫：\\n\"\n\"提供 Rust 必要功能的一系列模組。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"static:  \\n\"\n\"A keyword in Rust used to define static variables or items with a `'static` \"\n\"lifetime.\"\nmsgstr \"\"\n\"static：\\n\"\n\"Rust 中的關鍵字，可定義靜態變數或具有 'static` 生命週期的項目。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"string:  \\n\"\n\"A data type storing textual data. See [`String` vs `str`](basic-syntax/\"\n\"string-slices.html) for more.\"\nmsgstr \"\"\n\"字串：\\n\"\n\"儲存文本資料的資料型別。詳情請參閱[比較 `String` 與 `str`](basic-syntax/\"\n\"string-slices.html) 的相關課程。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"struct:  \\n\"\n\"A composite data type in Rust that groups together variables of different \"\n\"types under a single name.\"\nmsgstr \"\"\n\"結構體：\\n\"\n\"Rust 中的複合資料型別，能以一個名稱將不同型別的變數歸入同一組。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"test:  \\n\"\n\"A Rust module containing functions that test the correctness of other \"\n\"functions.\"\nmsgstr \"\"\n\"測試：\\n\"\n\"Rust 模組，其中的函式可測試其他函式的正確性。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread:  \\n\"\n\"A separate sequence of execution in a program, allowing concurrent execution.\"\nmsgstr \"\"\n\"執行緒：\\n\"\n\"程式中獨立的執行作業序列，可允許並行執行作業。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"thread safety:  \\n\"\n\"The property of a program that ensures correct behavior in a multithreaded \"\n\"environment.\"\nmsgstr \"\"\n\"執行緒安全：\\n\"\n\"程式的屬性，可在多執行緒環境中確保正確的行為。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait:  \\n\"\n\"A collection of methods defined for an unknown type, providing a way to \"\n\"achieve polymorphism in Rust.\"\nmsgstr \"\"\n\"特徵：\\n\"\n\"為不明型別定義的一系列方法，可在 Rust 中實現多型。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"trait bound:  \\n\"\n\"An abstraction where you can require types to implement some traits of your \"\n\"interest.\"\nmsgstr \"\"\n\"特徵繫結：\\n\"\n\"這種抽象機制可用來要求型別實作一些您感興趣的特徵。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"tuple:  \\n\"\n\"A composite data type that contains variables of different types. Tuple \"\n\"fields have no names, and are accessed by their ordinal numbers.\"\nmsgstr \"\"\n\"元組：\\n\"\n\"包含各種變數的複合資料型別。元組欄位沒有名稱，可透過序數存取。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type:  \\n\"\n\"A classification that specifies which operations can be performed on values \"\n\"of a particular kind in Rust.\"\nmsgstr \"\"\n\"型別：\\n\"\n\"一種分類機制，能指定在 Rust 特定種類的值中可執行哪些作業。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"type inference:  \\n\"\n\"The ability of the Rust compiler to deduce the type of a variable or \"\n\"expression.\"\nmsgstr \"\"\n\"型別推斷：\\n\"\n\"Rust 編譯器功能，可推斷變數或運算式的型別。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"undefined behavior:  \\n\"\n\"Actions or conditions in Rust that have no specified result, often leading \"\n\"to unpredictable program behavior.\"\nmsgstr \"\"\n\"未定義的行為：\\n\"\n\"Rust 中未定義結果的動作或條件，經常導致無法預測的程式行為。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"union:  \\n\"\n\"A data type that can hold values of different types but only one at a time.\"\nmsgstr \"\"\n\"聯集：\\n\"\n\"這種資料型別可保留不同型別的值，但一次只能保留一個值。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit test:  \\n\"\n\"Rust comes with built-in support for running small unit tests and larger \"\n\"integration tests. See [Unit Tests](testing/unit-tests.html).\"\nmsgstr \"\"\n\"單元測試：\\n\"\n\"Rust 內建支援功能，可執行小型單元測試和規模較大的整合測試。請參閱「[單元測試]\"\n\"(testing/unit-tests.html)」。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unit type:  \\n\"\n\"Type that holds no data, written as a tuple with no members.\"\nmsgstr \"\"\n\"單值型別：\\n\"\n\"不保留資料的型別，寫為元組的形式，但不含成員。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"unsafe:  \\n\"\n\"The subset of Rust which allows you to trigger _undefined behavior_. See \"\n\"[Unsafe Rust](unsafe.html).\"\nmsgstr \"\"\n\"不安全：\\n\"\n\"這個 Rust 子集可觸發「未定義的行為」。請參閱「[不安全的 Rust](unsafe.\"\n\"html)」。\"\n\n#: src/glossary.md\nmsgid \"\"\n\"variable:  \\n\"\n\"A memory location storing data. Variables are valid in a _scope_.\"\nmsgstr \"\"\n\"變數：\\n\"\n\"儲存資料的記憶體位置。變數在「範圍」內有效。\"\n\n#: src/other-resources.md\nmsgid \"Other Rust Resources\"\nmsgstr \"其他 Rust 資源\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"The Rust community has created a wealth of high-quality and free resources \"\n\"online.\"\nmsgstr \"Rust 社群在線上提供了大量優質的免費資源。\"\n\n#: src/other-resources.md\nmsgid \"Official Documentation\"\nmsgstr \"官方說明文件\"\n\n#: src/other-resources.md\nmsgid \"The Rust project hosts many resources. These cover Rust in general:\"\nmsgstr \"Rust 專案中有許多資源。您可以透過這些資源瞭解 Rust 的一般概念：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/): the \"\n\"canonical free book about Rust. Covers the language in detail and includes a \"\n\"few projects for people to build.\"\nmsgstr \"\"\n\"[The Rust Programming Language](https://doc.rust-lang.org/book/)：Rust 的免費\"\n\"標準用書，詳細介紹這個語言的種種知識，也收錄了一些可供使用者建構的專案。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the \"\n\"Rust syntax via a series of examples which showcase different constructs. \"\n\"Sometimes includes small exercises where you are asked to expand on the code \"\n\"in the examples.\"\nmsgstr \"\"\n\"[Rust By Example](https://doc.rust-lang.org/rust-by-example/)：透過一系列範例\"\n\"示範不同結構，進而介紹 Rust 語法。偶爾也會提供牛刀小試的練習，請您擴寫範例的\"\n\"程式碼。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation \"\n\"of the standard library for Rust.\"\nmsgstr \"\"\n\"[Rust Standard Library](https://doc.rust-lang.org/std/)：Rust 標準程式庫的完\"\n\"整說明文件。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete \"\n\"book which describes the Rust grammar and memory model.\"\nmsgstr \"\"\n\"[The Rust Reference](https://doc.rust-lang.org/reference/)：本書並不完整，但\"\n\"會說明 Rust 文法和記憶體模型。\"\n\n#: src/other-resources.md\nmsgid \"More specialized guides hosted on the official Rust site:\"\nmsgstr \"在 Rust 官方網站上還有更多專業指南：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, \"\n\"including working with raw pointers and interfacing with other languages \"\n\"(FFI).\"\nmsgstr \"\"\n\"[The Rustonomicon](https://doc.rust-lang.org/nomicon/)：說明不安全的 Rust，包\"\n\"括如何使用原始指標並與其他語言 (FFI) 互動。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): \"\n\"covers the new asynchronous programming model which was introduced after the \"\n\"Rust Book was written.\"\nmsgstr \"\"\n\"[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/)：\"\n\"主要探討在 Rust 標準用書出版後問世的全新非同步程式設計模型。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): \"\n\"an introduction to using Rust on embedded devices without an operating \"\n\"system.\"\nmsgstr \"\"\n\"[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/)：說\"\n\"明如何在沒有作業系統的內嵌裝置上使用 Rust。\"\n\n#: src/other-resources.md\nmsgid \"Unofficial Learning Material\"\nmsgstr \"非官方學習教材\"\n\n#: src/other-resources.md\nmsgid \"A small selection of other guides and tutorial for Rust:\"\nmsgstr \"以下精選一些 Rust 的其他指南和教學課程：\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust \"\n\"from the perspective of low-level C programmers.\"\nmsgstr \"\"\n\"[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/)：以低階 C 程\"\n\"式設計師的角度介紹 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/): covers Rust from the perspective of developers who write \"\n\"firmware in C.\"\nmsgstr \"\"\n\"[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/\"\n\"rust_for_c/)：從以 C 語言編寫韌體的開發人員角度介紹 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/): \"\n\"covers the syntax of Rust using side-by-side comparisons with other \"\n\"languages such as C, C++, Java, JavaScript, and Python.\"\nmsgstr \"\"\n\"[Rust for professionals](https://overexact.com/rust-for-professionals/)：利用\"\n\"與其他語言 (例如 C、C++、Java、JavaScript 和 Python) 並列比較的方式介紹 Rust \"\n\"語法。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help \"\n\"you learn Rust.\"\nmsgstr \"\"\n\"[Rust on Exercism](https://exercism.org/tracks/rust)：提供超過 100 項練習幫助\"\n\"您學習 Rust。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html): a series of small presentations covering both basic \"\n\"and advanced part of the Rust language. Other topics such as WebAssembly, \"\n\"and async/await are also covered.\"\nmsgstr \"\"\n\"[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-\"\n\"material/index.html)：一系列精簡簡報，涵蓋 Rust 語言的基礎和進階部分，並說明 \"\n\"WebAssembly 和 async/await 等其他主題。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-\"\n\"series-to-rust/) and [Take your first steps with Rust](https://docs.\"\n\"microsoft.com/en-us/learn/paths/rust-first-steps/): two Rust guides aimed at \"\n\"new developers. The first is a set of 35 videos and the second is a set of \"\n\"11 modules which covers Rust syntax and basic constructs.\"\nmsgstr \"\"\n\"「[Rust 初學者系列](https://docs.microsoft.com/zh-TW/shows/beginners-series-\"\n\"to-rust/)」和「[使用 Rust 邁出您的第一步](https://docs.microsoft.com/zh-TW/\"\n\"learn/paths/rust-first-steps/)」：專為新手開發人員編寫的兩份 Rust 指南。前者\"\n\"包含一套 35 部的影片，後者則是一套 11 個模組的課程，探討 Rust 語法和基本結\"\n\"構。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/): in-depth exploration of Rust's memory management \"\n\"rules, through implementing a few different types of list structures.\"\nmsgstr \"\"\n\"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.\"\n\"github.io/too-many-lists/)：透過實作幾種不同型別的清單結構，深入探討 Rust 的\"\n\"記憶體管理規則。\"\n\n#: src/other-resources.md\nmsgid \"\"\n\"Please see the [Little Book of Rust Books](https://lborb.github.io/book/) \"\n\"for even more Rust books.\"\nmsgstr \"\"\n\"如需更多 Rust 相關書籍，請參閱 [Little Book of Rust Books](https://lborb.\"\n\"github.io/book/)。\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material here builds on top of the many great sources of Rust \"\n\"documentation. See the page on [other resources](other-resources.md) for a \"\n\"full list of useful resources.\"\nmsgstr \"\"\n\"這份教材是以許多優質的 Rust 說明文件來源為基礎。請參閱 [其他資源](other-\"\n\"resources.md) 頁面，查看完整的實用資源清單。\"\n\n#: src/credits.md\nmsgid \"\"\n\"The material of Comprehensive Rust is licensed under the terms of the Apache \"\n\"2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-\"\n\"rust/blob/main/LICENSE) for details.\"\nmsgstr \"\"\n\"Comprehensive Rust 的教材是根據 Apache 授權條款第 2.0 版取得授權，詳情請參閱 \"\n\"[`LICENSE`](https://github.com/google/comprehensive-rust/blob/main/LICENSE) \"\n\"頁面。\"\n\n#: src/credits.md\nmsgid \"Rust by Example\"\nmsgstr \"Rust by Example\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some examples and exercises have been copied and adapted from [Rust by \"\n\"Example](https://doc.rust-lang.org/rust-by-example/). Please see the \"\n\"`third_party/rust-by-example/` directory for details, including the license \"\n\"terms.\"\nmsgstr \"\"\n\"部分範例和習題是複製自 [Rust by Example](https://doc.rust-lang.org/rust-by-\"\n\"example/)，並經過調整。詳情請參閱 `third_party/rust-by-example/` 目錄，包括授\"\n\"權條款。\"\n\n#: src/credits.md\nmsgid \"Rust on Exercism\"\nmsgstr \"Exercism 上的 Rust\"\n\n#: src/credits.md\nmsgid \"\"\n\"Some exercises have been copied and adapted from [Rust on Exercism](https://\"\n\"exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"部分習題是複製自 [Exercism 上的 Rust](https://exercism.org/tracks/rust) 相關\"\n\"內容，並經過調整。詳情請參閱 `third_party/rust-on-exercism/` 目錄，包括授權條\"\n\"款。\"\n\n#: src/credits.md\nmsgid \"CXX\"\nmsgstr \"CXX\"\n\n#: src/credits.md\nmsgid \"\"\n\"The [Interoperability with C++](android/interoperability/cpp.md) section \"\n\"uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` \"\n\"directory for details, including the license terms.\"\nmsgstr \"\"\n\"在「互通性」該節的「[與 C++](android/interoperability/cpp.md)」部分中，所使用\"\n\"的圖片是出自 [CXX](https://cxx.rs/)。詳情請參閱 `third_party/cxx/` 目錄，包括\"\n\"授權條款。\"\n\n#~ msgid \"Small Example\"\n#~ msgstr \"簡短範例\"\n\n#~ msgid \"Why Rust?\"\n#~ msgstr \"為什麼要使用 Rust？\"\n\n#~ msgid \"Compile Time Guarantees\"\n#~ msgstr \"編譯時期保證\"\n\n#~ msgid \"Runtime Guarantees\"\n#~ msgstr \"執行時期保證\"\n\n#~ msgid \"Modern Features\"\n#~ msgstr \"新潮的功能\"\n\n#~ msgid \"Basic Syntax\"\n#~ msgstr \"基本語法\"\n\n#~ msgid \"String vs str\"\n#~ msgstr \"String 和 str\"\n\n#~ msgid \"Overloading\"\n#~ msgstr \"超載\"\n\n#~ msgid \"Arrays and for Loops\"\n#~ msgstr \"陣列和 for 迴圈\"\n\n#~ msgid \"Stack vs Heap\"\n#~ msgstr \"堆疊和堆積\"\n\n#~ msgid \"Stack Memory\"\n#~ msgstr \"堆疊記憶體\"\n\n#~ msgid \"Manual Memory Management\"\n#~ msgstr \"手動記憶體管理\"\n\n#~ msgid \"Scope-Based Memory Management\"\n#~ msgstr \"作用域式記憶體管理\"\n\n#~ msgid \"Garbage Collection\"\n#~ msgstr \"垃圾回收\"\n\n#~ msgid \"Rust Memory Management\"\n#~ msgstr \"Rust 記憶體管理\"\n\n#~ msgid \"Comparison\"\n#~ msgstr \"比較\"\n\n#~ msgid \"Moved Strings in Rust\"\n#~ msgstr \"Rust 中移動的字串\"\n\n#~ msgid \"Moves in Function Calls\"\n#~ msgstr \"函式呼叫中的移動\"\n\n#~ msgid \"Copying and Cloning\"\n#~ msgstr \"複製和克隆\"\n\n#~ msgid \"Shared and Unique Borrows\"\n#~ msgstr \"共用借用和專屬借用\"\n\n#~ msgid \"Designing a Library\"\n#~ msgstr \"設計程式庫\"\n\n#~ msgid \"Iterators and Ownership\"\n#~ msgstr \"疊代器和擁有權\"\n\n#~ msgid \"Field Shorthand Syntax\"\n#~ msgstr \"欄位簡寫語法\"\n\n#~ msgid \"Variant Payloads\"\n#~ msgstr \"變體負載\"\n\n#~ msgid \"Enum Sizes\"\n#~ msgstr \"列舉大小\"\n\n#~ msgid \"Method Receiver\"\n#~ msgstr \"方法接收器\"\n\n#~ msgid \"Destructuring Structs\"\n#~ msgstr \"解構結構體\"\n\n#~ msgid \"Destructuring Arrays\"\n#~ msgstr \"解構陣列\"\n\n#~ msgid \"Match Guards\"\n#~ msgstr \"配對守衛\"\n\n#~ msgid \"Points and Polygons\"\n#~ msgstr \"點和多邊形\"\n\n#~ msgid \"if expressions\"\n#~ msgstr \"if 表達式\"\n\n#~ msgid \"if let expressions\"\n#~ msgstr \"if let 運算式\"\n\n#~ msgid \"while expressions\"\n#~ msgstr \"while 運算式\"\n\n#~ msgid \"for expressions\"\n#~ msgstr \"for 運算式\"\n\n#~ msgid \"loop expressions\"\n#~ msgstr \"loop 運算式\"\n\n#~ msgid \"match expressions\"\n#~ msgstr \"match 運算式\"\n\n#~ msgid \"break & continue\"\n#~ msgstr \"break 和 continue\"\n\n#~ msgid \"Option and Result\"\n#~ msgstr \"Option 和 Result\"\n\n#~ msgid \"Vec\"\n#~ msgstr \"Vec\"\n\n#~ msgid \"HashMap\"\n#~ msgstr \"HashMap\"\n\n#~ msgid \"Box\"\n#~ msgstr \"Box\"\n\n#~ msgid \"Recursive Data Types\"\n#~ msgstr \"遞迴資料型別\"\n\n#~ msgid \"Rc\"\n#~ msgstr \"Rc\"\n\n#~ msgid \"Strings and Iterators\"\n#~ msgstr \"字串和疊代器\"\n\n#~ msgid \"Generic Methods\"\n#~ msgstr \"泛型方法\"\n\n#~ msgid \"Monomorphization\"\n#~ msgstr \"單型化\"\n\n#~ msgid \"Default Methods\"\n#~ msgstr \"預設方法\"\n\n#~ msgid \"impl Trait\"\n#~ msgstr \"impl Trait\"\n\n#~ msgid \"Important Traits\"\n#~ msgstr \"重要特徵\"\n\n#~ msgid \"From and Into\"\n#~ msgstr \"From 和 Into\"\n\n#~ msgid \"Default\"\n#~ msgstr \"Default\"\n\n#~ msgid \"Operators: Add, Mul, ...\"\n#~ msgstr \"運算子：Add、Mul、...\"\n\n#~ msgid \"Closures: Fn, FnMut, FnOnce\"\n#~ msgstr \"閉包：Fn、FnMut、FnOnce\"\n\n#~ msgid \"A Simple GUI Library\"\n#~ msgstr \"簡易 GUI 程式庫\"\n\n#~ msgid \"Catching Stack Unwinding\"\n#~ msgstr \"捕獲解開堆疊的動作\"\n\n#~ msgid \"Structured Error Handling\"\n#~ msgstr \"結構化錯誤處理\"\n\n#~ msgid \"Propagating Errors with ?\"\n#~ msgstr \"使用 ? 傳播錯誤\"\n\n#~ msgid \"Converting Error Types\"\n#~ msgstr \"轉換錯誤型別\"\n\n#~ msgid \"Deriving Error Enums\"\n#~ msgstr \"推導錯誤列舉\"\n\n#~ msgid \"Adding Context to Errors\"\n#~ msgstr \"為錯誤添加背景資訊\"\n\n#~ msgid \"no_std\"\n#~ msgstr \"no_std\"\n\n#~ msgid \"alloc\"\n#~ msgstr \"alloc\"\n\n#~ msgid \"embedded-hal\"\n#~ msgstr \"embedded-hal\"\n\n#~ msgid \"zerocopy\"\n#~ msgstr \"zerocopy\"\n\n#~ msgid \"aarch64-paging\"\n#~ msgstr \"aarch64-paging\"\n\n#~ msgid \"buddy_system_allocator\"\n#~ msgstr \"buddy_system_allocator\"\n\n#~ msgid \"tinyvec\"\n#~ msgstr \"tinyvec\"\n\n#~ msgid \"spin\"\n#~ msgstr \"旋轉\"\n\n#~ msgid \"Send and Sync\"\n#~ msgstr \"Send 和 Sync\"\n\n#~ msgid \"Send\"\n#~ msgstr \"Send\"\n\n#~ msgid \"Sync\"\n#~ msgstr \"Sync\"\n\n#~ msgid \"Arc\"\n#~ msgstr \"Arc\"\n\n#~ msgid \"Mutex\"\n#~ msgstr \"Mutex\"\n\n#~ msgid \"async/await\"\n#~ msgstr \"async/await\"\n\n#~ msgid \"Pin\"\n#~ msgstr \"釘選\"\n\n#~ msgid \"Day 1 Morning\"\n#~ msgstr \"第 1 天上午\"\n\n#~ msgid \"Day 1 Afternoon\"\n#~ msgstr \"第 1 天下午\"\n\n#~ msgid \"Day 2 Morning\"\n#~ msgstr \"第 2 天上午\"\n\n#~ msgid \"Day 2 Afternoon\"\n#~ msgstr \"第 2 天下午\"\n\n#~ msgid \"Day 3 Morning\"\n#~ msgstr \"第 3 天上午\"\n\n#~ msgid \"Day 3 Afternoon\"\n#~ msgstr \"第 3 天下午\"\n\n#~ msgid \"Bare Metal Rust Morning\"\n#~ msgstr \"Rust 裸機開發：上午\"\n\n#~ msgid \"Concurrency Morning\"\n#~ msgstr \"並行：上午\"\n\n#~ msgid \"Concurrency Afternoon\"\n#~ msgstr \"並行：下午\"\n\n#~ msgid \"The course is fast paced and covers a lot of ground:\"\n#~ msgstr \"本課程步調快速，涵蓋許多層面：\"\n\n#~ msgid \"Day 1: Basic Rust, ownership and the borrow checker.\"\n#~ msgstr \"\"\n#~ \"第 1 天：Rust 基礎知識、擁有權 (ownership) 與借用檢查器 (borrow checker)。\"\n\n#~ msgid \"Day 2: Compound data types,  pattern matching, the standard library.\"\n#~ msgstr \"第 2 天：複合資料型別、模式比對 (pattern matching)、標準程式庫。\"\n\n#~ msgid \"Day 3: Traits and generics, error handling, testing, unsafe Rust.\"\n#~ msgstr \"\"\n#~ \"第 3 天：特徵 (traits) 與泛型 (generics)、錯誤處理、測試、不安全的 Rust。\"\n\n#~ msgid \"Concurrency\"\n#~ msgstr \"並行\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"cargo init concurrency\\n\"\n#~ \"cd concurrency\\n\"\n#~ \"cargo add tokio --features full\\n\"\n#~ \"cargo run\\n\"\n#~ \"```\"\n\n#~ msgid \"Rustup (Recommended)\"\n#~ msgstr \"Rustup (建議)\"\n\n#~ msgid \"\"\n#~ \"You can follow the instructions to install cargo and rust compiler, among \"\n#~ \"other standard ecosystem tools with the [rustup](https://rust-analyzer.\"\n#~ \"github.io/) tool, which is maintained by the Rust Foundation.\"\n#~ msgstr \"\"\n#~ \"您可以按照指示安裝 Cargo 和 Rust 編譯器，並運用 Rust Foundation 維護的 \"\n#~ \"[rustup](https://rust-analyzer.github.io/) 工具安裝其他標準生態系統工具。\"\n\n#~ msgid \"Package Managers\"\n#~ msgstr \"套件管理員\"\n\n#~ msgid \"Debian\"\n#~ msgstr \"Debian\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ sudo apt install cargo rust-src rustfmt\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"This will allow \\\\[rust-analyzer\\\\]\\\\[1\\\\] to jump to the definitions. We \"\n#~ \"suggest using [VS Code](https://code.visualstudio.com/) to edit the code \"\n#~ \"(but any LSP compatible editor works).\"\n#~ msgstr \"\"\n#~ \"這樣一來，\\\\[rust-analyzer\\\\]\\\\[1\\\\] 就能跳至定義。建議您使用 [VS Code]\"\n#~ \"(https://code.visualstudio.com/) 編輯程式碼，不過任何與 LSP 相容的編輯器都\"\n#~ \"能運作。\"\n\n#~ msgid \"\"\n#~ \"Some folks also like to use the [JetBrains](https://www.jetbrains.com/\"\n#~ \"clion/) family of IDEs, which do their own analysis but have their own \"\n#~ \"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://\"\n#~ \"www.jetbrains.com/rust/). Please take note that as of January 2023 \"\n#~ \"debugging only works on the CLion version of the JetBrains IDEA suite.\"\n#~ msgstr \"\"\n#~ \"有些人也偏好使用 [JetBrains](https://www.jetbrains.com/clion/) 系列的 \"\n#~ \"IDE，這些工具會自行分析，但也各有缺點。如果您偏好這些工具，可以安裝 [Rust \"\n#~ \"外掛程式](https://www.jetbrains.com/rust/)。請注意，自 2023 年 1 月起，偵\"\n#~ \"錯功能僅適用於 JetBrains IDEA 套件的 CLion 版本。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"% rustc --version\\n\"\n#~ \"rustc 1.69.0 (84c898d65 2023-04-16)\\n\"\n#~ \"% cargo --version\\n\"\n#~ \"cargo 1.69.0 (6e9a83356 2023-04-12)\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo new exercise\\n\"\n#~ \"     Created binary (application) `exercise` package\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cd exercise\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.75s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Hello, world!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"Edit me!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```shell\\n\"\n#~ \"$ cargo run\\n\"\n#~ \"   Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\\n\"\n#~ \"    Finished dev [unoptimized + debuginfo] target(s) in 0.24s\\n\"\n#~ \"     Running `target/debug/exercise`\\n\"\n#~ \"Edit me!\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Memory management: stack vs heap, manual memory management, scope-based \"\n#~ \"memory management, and garbage collection.\"\n#~ msgstr \"\"\n#~ \"記憶體管理：堆疊和堆積、手動管理記憶體、範圍式記憶體管理，以及垃圾收集。\"\n\n#~ msgid \"\"\n#~ \"Ownership: move semantics, copying and cloning, borrowing, and lifetimes.\"\n#~ msgstr \"擁有權：轉移語意、複製、借用，以及生命週期。\"\n\n#~ msgid \"\"\n#~ \"The idea for the first day is to show _just enough_ of Rust to be able to \"\n#~ \"speak about the famous borrow checker. The way Rust handles memory is a \"\n#~ \"major feature and we should show students this right away.\"\n#~ msgstr \"\"\n#~ \"第一天的規畫是說明 Rust 基礎概念，「只要剛好」能介紹到著名的借用檢查器就行\"\n#~ \"了。Rust 處理記憶體的方式是一大特色，我們應該立即向學生展示這一點。\"\n\n#~ msgid \"\"\n#~ \"If you're teaching this in a classroom, this is a good place to go over \"\n#~ \"the schedule. We suggest splitting the day into two parts (following the \"\n#~ \"slides):\"\n#~ msgstr \"\"\n#~ \"如果您是在教室授課，就很適合參考這裡的時間表。建議您將一天分為兩部分 (根據\"\n#~ \"投影片安排)：\"\n\n#~ msgid \"Morning: 9:00 to 12:00,\"\n#~ msgstr \"上午：9 點到 12 點\"\n\n#~ msgid \"Afternoon: 13:00 to 16:00.\"\n#~ msgstr \"下午：1 點到 4 點\"\n\n#~ msgid \"\"\n#~ \"You can of course adjust this as necessary. Please make sure to include \"\n#~ \"breaks, we recommend a break every hour!\"\n#~ msgstr \"\"\n#~ \"您當然可以視需要調整這個時間表。但請務必要加入休息時段，建議每小時休息一\"\n#~ \"次！\"\n\n#~ msgid \"Here is a small example program in Rust:\"\n#~ msgstr \"以下是使用 Rust 語言的簡短範例程式：\"\n\n#~ msgid \"\"\n#~ \"The code implements the Collatz conjecture: it is believed that the loop \"\n#~ \"will always end, but this is not yet proved. Edit the code and play with \"\n#~ \"different inputs.\"\n#~ msgstr \"\"\n#~ \"這是「考拉茲猜想」的實作程式碼，考拉茲相信迴圈不管怎樣終會結束，但這尚未得\"\n#~ \"證。您可以編輯該程式碼，試著輸入不同內容。\"\n\n#~ msgid \"\"\n#~ \"Explain that all variables are statically typed. Try removing `i32` to \"\n#~ \"trigger type inference. Try with `i8` instead and trigger a runtime \"\n#~ \"integer overflow.\"\n#~ msgstr \"\"\n#~ \"解釋所有變數都是靜態的。試著移除 `i32` 來觸發型別推斷。接著嘗試改用 `i8`，\"\n#~ \"並觸發執行階段的整數溢位現象。\"\n\n#~ msgid \"Change `let mut x` to `let x`, discuss the compiler error.\"\n#~ msgstr \"將 `let mut x` 改為 `let x`，討論編譯器錯誤。\"\n\n#~ msgid \"\"\n#~ \"Show how `print!` gives a compilation error if the arguments don't match \"\n#~ \"the format string.\"\n#~ msgstr \"說明如果引數與格式字串不符，`print!` 會如何呈現編譯錯誤。\"\n\n#~ msgid \"\"\n#~ \"Show how you need to use `{}` as a placeholder if you want to print an \"\n#~ \"expression which is more complex than just a single variable.\"\n#~ msgstr \"\"\n#~ \"說明要輸出比單一變數更複雜的運算式時，需如何使用 `{}` 做為預留位置。\"\n\n#~ msgid \"\"\n#~ \"Show the students the standard library, show them how to search for `std::\"\n#~ \"fmt` which has the rules of the formatting mini-language. It's important \"\n#~ \"that the students become familiar with searching in the standard library.\"\n#~ msgstr \"\"\n#~ \"向學生介紹標準程式庫，示範如何搜尋具有格式化迷你語言規則的 `std::fmt`。請\"\n#~ \"務必確保學生熟悉如何在標準程式庫中搜尋。\"\n\n#~ msgid \"Compile time memory safety.\"\n#~ msgstr \"在編譯期間確保記憶體安全性。\"\n\n#~ msgid \"Lack of undefined runtime behavior.\"\n#~ msgstr \"沒有未定義的執行階段行為。\"\n\n#~ msgid \"Modern language features.\"\n#~ msgstr \"現代的語言特色。\"\n\n#~ msgid \"Static memory management at compile time:\"\n#~ msgstr \"編譯期間的靜態記憶體管理機制好處多多，包括：\"\n\n#~ msgid \"No memory leaks (_mostly_, see notes).\"\n#~ msgstr \"不會造成記憶體流失 (「一般」來說是這樣，請參閱附註)。\"\n\n#~ msgid \"\"\n#~ \"It is possible to produce memory leaks in (safe) Rust. Some examples are:\"\n#~ msgstr \"\"\n#~ \"在 (安全的) Rust 範疇內，可能還是有機會造成記憶體流失。以下是一些例子：\"\n\n#~ msgid \"\"\n#~ \"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak) to leak a pointer. A use of this could be to get \"\n#~ \"runtime-initialized and runtime-sized static variables\"\n#~ msgstr \"\"\n#~ \"您可能會使用 [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box.\"\n#~ \"html#method.leak)，以致洩漏指標。如果您為了取得在執行階段中初始化或設定大\"\n#~ \"小的靜態變數，就可能發生這個情況。\"\n\n#~ msgid \"\"\n#~ \"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) to make the compiler \\\"forget\\\" about a value (meaning the \"\n#~ \"destructor is never run).\"\n#~ msgstr \"\"\n#~ \"您可能會透過 [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.\"\n#~ \"forget.html) 讓編譯器「忘記」某個值 (亦即解構函式永遠不會執行)。\"\n\n#~ msgid \"\"\n#~ \"You can also accidentally create a [reference cycle](https://doc.rust-\"\n#~ \"lang.org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`.\"\n#~ msgstr \"\"\n#~ \"您也可能會不小心使用 `Rc` 或 `Arc` 建立[參照循環](https://doc.rust-lang.\"\n#~ \"org/book/ch15-06-reference-cycles.html)。\"\n\n#~ msgid \"\"\n#~ \"In fact, some will consider infinitely populating a collection a memory \"\n#~ \"leak and Rust does not protect from those.\"\n#~ msgstr \"\"\n#~ \"事實上，有些人會認為無限地填充集合是一種記憶體流失，而 Rust 並不能避免這種\"\n#~ \"情況。\"\n\n#~ msgid \"\"\n#~ \"For the purpose of this course, \\\"No memory leaks\\\" should be understood \"\n#~ \"as \\\"Pretty much no _accidental_ memory leaks\\\".\"\n#~ msgstr \"\"\n#~ \"因此，以本課程的宗旨來說，「沒有記憶體流失」應理解為「幾乎沒有『意外的』記\"\n#~ \"憶體流失」。\"\n\n#~ msgid \"\"\n#~ \"Bounds checking cannot be disabled with a compiler flag. It can also not \"\n#~ \"be disabled directly with the `unsafe` keyword. However, `unsafe` allows \"\n#~ \"you to call functions such as `slice::get_unchecked` which does not do \"\n#~ \"bounds checking.\"\n#~ msgstr \"\"\n#~ \"您無法使用編譯器參數停用邊界檢查，也無法直接透過 `unsafe` 關鍵字停用。不\"\n#~ \"過，您可以使用 `unsafe` 呼叫 `slice::get_unchecked` 這類不執行邊界檢查的函\"\n#~ \"式。\"\n\n#~ msgid \"Language Features\"\n#~ msgstr \"語言特色\"\n\n#~ msgid \"Tooling\"\n#~ msgstr \"工具\"\n\n#~ msgid \"\"\n#~ \"Zero-cost abstractions, similar to C++, means that you don't have to \"\n#~ \"'pay' for higher-level programming constructs with memory or CPU. For \"\n#~ \"example, writing a loop using `for` should result in roughly the same low \"\n#~ \"level instructions as using the `.iter().fold()` construct.\"\n#~ msgstr \"\"\n#~ \"與 C++ 類似，零成本抽象化機制是指您不必為使用記憶體或 CPU 的高階程式設計結\"\n#~ \"構「付費」。舉例來說，使用 `for` 編寫迴圈時，應產生與使用 `.iter().\"\n#~ \"fold()` 結構大致相同的低階指示。\"\n\n#~ msgid \"\"\n#~ \"It may be worth mentioning that Rust enums are 'Algebraic Data Types', \"\n#~ \"also known as 'sum types', which allow the type system to express things \"\n#~ \"like `Option<T>` and `Result<T, E>`.\"\n#~ msgstr \"\"\n#~ \"值得一提的是，Rust 列舉屬於「代數資料型別」(也稱為「加總型別」)，可讓型別\"\n#~ \"系統表達 `Option<T>` 和 `Result<T, E>` 等項目。\"\n\n#~ msgid \"\"\n#~ \"Remind people to read the errors --- many developers have gotten used to \"\n#~ \"ignore lengthy compiler output. The Rust compiler is significantly more \"\n#~ \"talkative than other compilers. It will often provide you with \"\n#~ \"_actionable_ feedback, ready to copy-paste into your code.\"\n#~ msgstr \"\"\n#~ \"提醒使用者詳讀錯誤訊息，許多開發人員已習慣忽略冗長的編譯器輸出結果。Rust \"\n#~ \"編譯器的表達能力比其他編譯器高出許多，通常都會提供「實用」的意見回饋，您可\"\n#~ \"以直接將其複製貼到程式碼中。\"\n\n#~ msgid \"\"\n#~ \"The Rust standard library is small compared to languages like Java, \"\n#~ \"Python, and Go. Rust does not come with several things you might consider \"\n#~ \"standard and essential:\"\n#~ msgstr \"\"\n#~ \"與 Java、Python 和 Go 等語言相比，Rust 標準程式庫較小。Rust 並不提供某些您\"\n#~ \"可能認為是標準和基本項目的內容：\"\n\n#~ msgid \"a random number generator, but see [rand](https://docs.rs/rand/).\"\n#~ msgstr \"隨機號碼產生器，請參閱 [rand](https://docs.rs/rand/)。\"\n\n#~ msgid \"support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/).\"\n#~ msgstr \"SSL 或 TLS 支援，請參閱 [rusttls](https://docs.rs/rustls/)。\"\n\n#~ msgid \"support for JSON, but see [serde_json](https://docs.rs/serde_json/).\"\n#~ msgstr \"JSON 支援，請參閱 [serde_json](https://docs.rs/serde_json/)。\"\n\n#~ msgid \"\"\n#~ \"The reasoning behind this is that functionality in the standard library \"\n#~ \"cannot go away, so it has to be very stable. For the examples above, the \"\n#~ \"Rust community is still working on finding the best solution --- and \"\n#~ \"perhaps there isn't a single \\\"best solution\\\" for some of these things.\"\n#~ msgstr \"\"\n#~ \"未提供此支援的原因是，標準程式庫中的功能無法移除，因此必須相當穩定。對於以\"\n#~ \"上範例，Rust 社群仍在努力尋找最佳解決方案，但其中某幾個例子或許並沒有單一\"\n#~ \"的「最佳解決方案」。\"\n\n#~ msgid \"\"\n#~ \"Rust comes with a built-in package manager in the form of Cargo and this \"\n#~ \"makes it trivial to download and compile third-party crates. A \"\n#~ \"consequence of this is that the standard library can be smaller.\"\n#~ msgstr \"\"\n#~ \"Rust 內建採用 Cargo 形式的套件管理工具，因此可讓您輕鬆下載及編譯第三方 \"\n#~ \"Crate。這樣一來，就可以縮小標準程式庫的規模。\"\n\n#~ msgid \"\"\n#~ \"Discovering good third-party crates can be a problem. Sites like <https://\"\n#~ \"lib.rs/> help with this by letting you compare health metrics for crates \"\n#~ \"to find a good and trusted one.\"\n#~ msgstr \"\"\n#~ \"如何找到理想的第三方 Crate 可能是一大問題。但請放心，<https://lib.rs/> 這\"\n#~ \"類網站可協助您比較 Crate 的健康指標，找出優質且值得信賴的 Crate。\"\n\n#~ msgid \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP \"\n#~ \"implementation used in major IDEs and text editors.\"\n#~ msgstr \"\"\n#~ \"[rust-analyzer](https://rust-analyzer.github.io/) 是廣受支援的 LSP 實作項\"\n#~ \"目，適用於主要的 IDE 和文字編輯器。\"\n\n#~ msgid \"Much of the Rust syntax will be familiar to you from C, C++ or Java:\"\n#~ msgstr \"如果您有 C、C++ 或 Java 基礎，會覺得大部分的 Rust 語法都似曾相識：\"\n\n#~ msgid \"Blocks and scopes are delimited by curly braces.\"\n#~ msgstr \"區塊和範圍會以大括號分隔。\"\n\n#~ msgid \"\"\n#~ \"Line comments are started with `//`, block comments are delimited by `/\"\n#~ \"* ... */`.\"\n#~ msgstr \"行註解以 `//` 開頭，區塊註解則以 `/* ... */` 分隔。\"\n\n#~ msgid \"Keywords like `if` and `while` work the same.\"\n#~ msgstr \"`if` 和 `while` 等關鍵字的功用相同。\"\n\n#~ msgid \"Variable assignment is done with `=`, comparison is done with `==`.\"\n#~ msgstr \"變數指派作業透過 `=` 完成，等於運算則透過 `==` 完成。\"\n\n#~ msgid \"`\\\"foo\\\"`, `\\\"two\\\\nlines\\\"`\"\n#~ msgstr \"`\\\"foo\\\"`、`\\\"two\\\\nlines\\\"`\"\n\n#~ msgid \"`[T; N]`\"\n#~ msgstr \"`[T; N]`\"\n\n#~ msgid \"`[20, 30, 40]`, `[0; 3]`\"\n#~ msgstr \"`[20, 30, 40]`、`[0; 3]`\"\n\n#~ msgid \"`()`, `(T,)`, `(T1, T2)`, ...\"\n#~ msgstr \"`()`、`(T,)`、`(T1, T2)`...\"\n\n#~ msgid \"`()`, `('x',)`, `('x', 1.2)`, ...\"\n#~ msgstr \"`()`、`('x',)`、`('x', 1.2)`...\"\n\n#~ msgid \"Array assignment and access:\"\n#~ msgstr \"陣列指派與存取：\"\n\n#~ msgid \"Tuple assignment and access:\"\n#~ msgstr \"元組指派與存取：\"\n\n#~ msgid \"Arrays:\"\n#~ msgstr \"陣列：\"\n\n#~ msgid \"Tuples:\"\n#~ msgstr \"元組：\"\n\n#~ msgid \"\"\n#~ \"The empty tuple `()` is also known as the \\\"unit type\\\". It is both a \"\n#~ \"type, and the only valid value of that type - that is to say both the \"\n#~ \"type and its value are expressed as `()`. It is used to indicate, for \"\n#~ \"example, that a function or expression has no return value, as we'll see \"\n#~ \"in a future slide. \"\n#~ msgstr \"\"\n#~ \"空白元組 `()` 也稱為「單位型別」。它既是型別，也是該型別唯一的有效值，亦即\"\n#~ \"該型別及其值都以 `()` 表示。舉例來說，空白元組可用於表示函式或運算式沒有任\"\n#~ \"何回傳值，我們會在之後的投影片看到這個例子。\"\n\n#~ msgid \"\"\n#~ \"You can think of it as `void` that can be familiar to you from other  \"\n#~ \"programming languages.\"\n#~ msgstr \"您可以將其視為其他程式設計語言中的 `void`，可能就不會感到陌生。\"\n\n#~ msgid \"Like C++, Rust has references:\"\n#~ msgstr \"和 C++ 一樣，Rust 具有參照：\"\n\n#~ msgid \"\"\n#~ \"We must dereference `ref_x` when assigning to it, similar to C and C++ \"\n#~ \"pointers.\"\n#~ msgstr \"指派至 `ref_x` 時，我們必須對其解除參照，這類似於 C 和 C++ 指標。\"\n\n#~ msgid \"\"\n#~ \"References that are declared as `mut` can be bound to different values \"\n#~ \"over their lifetime.\"\n#~ msgstr \"宣告為 `mut` 的參照可在其生命週期內綁定至不同的值。\"\n\n#~ msgid \"A reference is said to \\\"borrow\\\" the value it refers to.\"\n#~ msgstr \"所謂參照項目，可說是「借用」其參照的值。\"\n\n#~ msgid \"\"\n#~ \"Rust is tracking the lifetimes of all references to ensure they live long \"\n#~ \"enough.\"\n#~ msgstr \"Rust 會追蹤所有參照項目的生命週期，確保其存留時間夠長。\"\n\n#~ msgid \"`String` vs `str`\"\n#~ msgstr \"`String` 和 `str`\"\n\n#~ msgid \"We can now understand the two string types in Rust:\"\n#~ msgstr \"現在，我們可以瞭解 Rust 中有兩種字串型別：\"\n\n#~ msgid \"\"\n#~ \"You can borrow `&str` slices from `String` via `&` and optionally range \"\n#~ \"selection.\"\n#~ msgstr \"您可以透過 `&str` 和可選的範圍選項，從 `String` 借用 `&str` 切片。\"\n\n#~ msgid \"\"\n#~ \"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/\"\n#~ \"Fizz_buzz) interview question:\"\n#~ msgstr \"\"\n#~ \"這是知名面試問題 [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz) 的 \"\n#~ \"Rust 版本：\"\n\n#~ msgid \"\"\n#~ \"We refer in `main` to a function written below. Neither forward \"\n#~ \"declarations nor headers are necessary. \"\n#~ msgstr \"我們在 `main` 中參照以下所寫的函式。不需前向宣告，也不需標頭。\"\n\n#~ msgid \"\"\n#~ \"The range expression in the `for` loop in `print_fizzbuzz_to()` contains \"\n#~ \"`=n`, which causes it to include the upper bound.\"\n#~ msgstr \"\"\n#~ \"`print_fizzbuzz_to()` 中 `for` 迴圈的範圍運算式含有 `=n`，因此會包含上限\"\n#~ \"值。\"\n\n#~ msgid \"\"\n#~ \"All language items in Rust can be documented using special `///` syntax.\"\n#~ msgstr \"Rust 中的所有語言項目都能以特殊的 `///` 語法來描述使用方法。\"\n\n#~ msgid \"\"\n#~ \"This course does not include rustdoc on slides, just to save space, but \"\n#~ \"in real code they should be present.\"\n#~ msgstr \"\"\n#~ \"本課程未在投影片中加入 rustdoc 只是為了節省空間，但在實際程式碼中不應這麼\"\n#~ \"做。\"\n\n#~ msgid \"\"\n#~ \"Inner doc comments are discussed later (in the page on modules) and need \"\n#~ \"not be addressed here.\"\n#~ msgstr \"文件內註解會在稍後討論 (在模組相關頁面中)，因此這裡不需提到。\"\n\n#~ msgid \"\"\n#~ \"Methods are functions associated with a type. The `self` argument of a \"\n#~ \"method is an instance of the type it is associated with:\"\n#~ msgstr \"\"\n#~ \"方法是與型別相關聯的函式。方法的 `self` 引數是與其相關聯的型別執行個體：\"\n\n#~ msgid \"\"\n#~ \"We will look much more at methods in today's exercise and in tomorrow's \"\n#~ \"class.\"\n#~ msgstr \"我們將在今天的練習和明天的課程中深入探討更多方法。\"\n\n#~ msgid \"Function Overloading\"\n#~ msgstr \"函式超載\"\n\n#~ msgid \"Overloading is not supported:\"\n#~ msgstr \"Rust 不支援超載：\"\n\n#~ msgid \"Always takes a fixed number of parameters.\"\n#~ msgstr \"一律採用固定數量的參數。\"\n\n#~ msgid \"Default values are not supported:\"\n#~ msgstr \"不支援預設值：\"\n\n#~ msgid \"All call sites have the same number of arguments.\"\n#~ msgstr \"所有呼叫的引數數目都相同。\"\n\n#~ msgid \"Macros are sometimes used as an alternative.\"\n#~ msgstr \"有時系統會改用巨集。\"\n\n#~ msgid \"However, function parameters can be generic:\"\n#~ msgstr \"不過，函式參數可能為泛型：\"\n\n#~ msgid \"\"\n#~ \"When using generics, the standard library's `Into<T>` can provide a kind \"\n#~ \"of limited polymorphism on argument types. We will see more details in a \"\n#~ \"later section.\"\n#~ msgstr \"\"\n#~ \"使用泛型時，標準程式庫的 `Into<T>` 可以為引數型別提供一種受限的多態性。我\"\n#~ \"們會在後續章節中進一步說明。\"\n\n#~ msgid \"Day 1: Morning Exercises\"\n#~ msgstr \"第 1 天：上午練習\"\n\n#~ msgid \"In these exercises, we will explore two parts of Rust:\"\n#~ msgstr \"在這些練習中，我們將探索 Rust 的兩個部分：\"\n\n#~ msgid \"Implicit conversions between types.\"\n#~ msgstr \"不同型別間的隱含轉換。\"\n\n#~ msgid \"Arrays and `for` loops.\"\n#~ msgstr \"陣列和 `for` 迴圈。\"\n\n#~ msgid \"A few things to consider while solving the exercises:\"\n#~ msgstr \"練習解題時的注意事項：\"\n\n#~ msgid \"\"\n#~ \"Use a local Rust installation, if possible. This way you can get auto-\"\n#~ \"completion in your editor. See the page about [Using Cargo](../../cargo.\"\n#~ \"md) for details on installing Rust.\"\n#~ msgstr \"\"\n#~ \"如果可以，請在本機安裝 Rust。這樣即可在編輯器中使用自動完成功能。如要進一\"\n#~ \"步瞭解如何安裝 Rust，請參閱「[使用 Cargo](../../cargo.md)」。\"\n\n#~ msgid \"Alternatively, use the Rust Playground.\"\n#~ msgstr \"或者，您也可以使用 Rust Playground。\"\n\n#~ msgid \"\"\n#~ \"The code snippets are not editable on purpose: the inline code snippets \"\n#~ \"lose their state if you navigate away from the page.\"\n#~ msgstr \"\"\n#~ \"系統會特意將程式碼片段設為無法編輯：如果您離開網頁，內嵌程式碼片段的狀態就\"\n#~ \"會遺失。\"\n\n#~ msgid \"\"\n#~ \"Rust will not automatically apply _implicit conversions_ between types \"\n#~ \"([unlike C++](https://en.cppreference.com/w/cpp/language/\"\n#~ \"implicit_conversion)). You can see this in a program like this:\"\n#~ msgstr \"\"\n#~ \"Rust 不會自動在型別間套用「隱含轉換」 ([與 C++ 不同](https://en.\"\n#~ \"cppreference.com/w/cpp/language/implicit_conversion))。您可以在類似下方的\"\n#~ \"程式中發現這點：\"\n\n#~ msgid \"\"\n#~ \"The Rust integer types all implement the [`From<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.From.html) and [`Into<T>`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.Into.html) traits to let us convert between \"\n#~ \"them. The `From<T>` trait has a single `from()` method and similarly, the \"\n#~ \"`Into<T>` trait has a single `into()` method. Implementing these traits \"\n#~ \"is how a type expresses that it can be converted into another type.\"\n#~ msgstr \"\"\n#~ \"Rust 整數型別全都會實作 [`From<T>`](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) 和 [`Into<T>`](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.Into.html) 特徵，方便我們在兩者間轉換。`From<T>` 特徵有單一的 \"\n#~ \"`from() 方法；同樣地，`Into<T>` 特徵也有單一的 `into()` 方法。實作這些特\"\n#~ \"徵，是型別表示自身可轉換為另一種型別的方式。\"\n\n#~ msgid \"\"\n#~ \"The standard library has an implementation of `From<i8> for i16`, which \"\n#~ \"means that we can convert a variable `x` of type `i8` to an `i16` by \"\n#~ \"calling  `i16::from(x)`. Or, simpler, with `x.into()`, because `From<i8> \"\n#~ \"for i16` implementation automatically create an implementation of \"\n#~ \"`Into<i16> for i8`.\"\n#~ msgstr \"\"\n#~ \"標準程式庫會內有 `From<i8> for i16` 實作項目，這表示我們可以呼叫 `i16::\"\n#~ \"from(x)`，將類型 `i8` 的變數 `x` 轉換為 `i16`。或者，更簡單的方法是使用 \"\n#~ \"`x.into()`，因為 `From<i8> for i16` 實作會自動建立 `Into<i16> for i8` 的實\"\n#~ \"作。\"\n\n#~ msgid \"\"\n#~ \"The same applies for your own `From` implementations for your own types, \"\n#~ \"so it is sufficient to only implement `From` to get a respective `Into` \"\n#~ \"implementation automatically.\"\n#~ msgstr \"\"\n#~ \"這同樣適用於您自身型別專屬的 `From` 實作，因此只要實作 `From`，就能自動取\"\n#~ \"得相應的 `Into` 實作。\"\n\n#~ msgid \"Execute the above program and look at the compiler error.\"\n#~ msgstr \"執行上述程式，並查看編譯器錯誤。\"\n\n#~ msgid \"Update the code above to use `into()` to do the conversion.\"\n#~ msgstr \"更新上述程式碼，使用 `into()` 執行轉換。\"\n\n#~ msgid \"\"\n#~ \"Change the types of `x` and `y` to other things (such as `f32`, `bool`, \"\n#~ \"`i128`) to see which types you can convert to which other types. Try \"\n#~ \"converting small types to big types and the other way around. Check the \"\n#~ \"[standard library documentation](https://doc.rust-lang.org/std/convert/\"\n#~ \"trait.From.html) to see if `From<T>` is implemented for the pairs you \"\n#~ \"check.\"\n#~ msgstr \"\"\n#~ \"將 `x` 和 `y` 的型別變更為其他型別 (例如 `f32`、`bool`、`i128`)，查看這些\"\n#~ \"型別可以轉換成其他哪些型別。不妨試著將小型別轉換成大型別，反之亦然。接著參\"\n#~ \"閱[標準程式庫說明文件](https://doc.rust-lang.org/std/convert/trait.From.\"\n#~ \"html)，瞭解系統是否已為您查看的配對實作 `From<T>`。\"\n\n#~ msgid \"Arrays and `for` Loops\"\n#~ msgstr \"陣列和 `for` 迴圈\"\n\n#~ msgid \"We saw that an array can be declared like this:\"\n#~ msgstr \"我們已瞭解陣列的宣告方式可能如下：\"\n\n#~ msgid \"\"\n#~ \"You can print such an array by asking for its debug representation with \"\n#~ \"`{:?}`:\"\n#~ msgstr \"您可以使用 `{:?}` 偵錯表示法輸出這樣的陣列：\"\n\n#~ msgid \"\"\n#~ \"Rust lets you iterate over things like arrays and ranges using the `for` \"\n#~ \"keyword:\"\n#~ msgstr \"您可在 Rust 中使用 `for` 關鍵字，對陣列和範圍等項目進行疊代作業：\"\n\n#~ msgid \"Bonus Question\"\n#~ msgstr \"加分題\"\n\n#~ msgid \"\"\n#~ \"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for \"\n#~ \"your argument and return types? Something like `&[&[i32]]` for a two-\"\n#~ \"dimensional slice-of-slices. Why or why not?\"\n#~ msgstr \"\"\n#~ \"您是否能夠使用 `&[i32]` 切片 (而非硬式編碼的 3 × 3 矩陣) 做為引數和傳回型\"\n#~ \"別？例如針對二維切片使用 `&[&[i32]]`。原因為何？\"\n\n#~ msgid \"\"\n#~ \"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production \"\n#~ \"quality implementation.\"\n#~ msgstr \"\"\n#~ \"請參閱 [`ndarray` Crate](https://docs.rs/ndarray/)，瞭解如何在確保實際工作\"\n#~ \"環境品質的情況下實作。\"\n\n#~ msgid \"\"\n#~ \"The solution and the answer to the bonus section are available in the  \"\n#~ \"[Solution](solutions-morning.md#arrays-and-for-loops) section.\"\n#~ msgstr \"\"\n#~ \"如需加分題的解決方案和答案，請前往「[解決方案](solutions-morning.\"\n#~ \"md#arrays-and-for-loops)」一節。\"\n\n#~ msgid \"\"\n#~ \"Due to type inference the `i32` is optional. We will gradually show the \"\n#~ \"types less and less as the course progresses.\"\n#~ msgstr \"\"\n#~ \"由於型別推論的關係，`i32` 為選用項目。隨著課程進行，我們會逐漸減少示範型別\"\n#~ \"的比例。\"\n\n#~ msgid \"\"\n#~ \"The following code tells the compiler to copy into a certain generic \"\n#~ \"container without the code ever explicitly specifying the contained type, \"\n#~ \"using `_` as a placeholder:\"\n#~ msgstr \"\"\n#~ \"以下程式碼會指示編譯器使用 `_` 做為預留位置，進而複製到特定泛型容器中，而\"\n#~ \"無須明確指出包含的型別：\"\n\n#~ msgid \"Static and Constant Variables\"\n#~ msgstr \"靜態和常數變數\"\n\n#~ msgid \"\"\n#~ \"The following code demonstrates why the compiler can't simply reuse \"\n#~ \"memory locations when shadowing an immutable variable in a scope, even if \"\n#~ \"the type does not change.\"\n#~ msgstr \"\"\n#~ \"下列程式碼說明遮蔽範圍中不可變動的變數時，為何編譯器就是無法重複使用記憶體\"\n#~ \"位置 (即使型別未變更也一樣)。\"\n\n#~ msgid \"First, let's refresh how memory management works.\"\n#~ msgstr \"首先，讓我們回顧記憶體管理的運作方式。\"\n\n#~ msgid \"The Stack vs The Heap\"\n#~ msgstr \"堆疊與堆積\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n#~ \"    // String provides no guarantees about its layout, so this could lead \"\n#~ \"to\\n\"\n#~ \"    // undefined behavior.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (capacity, ptr, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut s1 = String::from(\\\"Hello\\\");\\n\"\n#~ \"    s1.push(' ');\\n\"\n#~ \"    s1.push_str(\\\"world\\\");\\n\"\n#~ \"    // DON'T DO THIS AT HOME! For educational purposes only.\\n\"\n#~ \"    // String provides no guarantees about its layout, so this could lead \"\n#~ \"to\\n\"\n#~ \"    // undefined behavior.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        let (capacity, ptr, len): (usize, usize, usize) = std::mem::\"\n#~ \"transmute(s1);\\n\"\n#~ \"        println!(\\\"ptr = {ptr:#x}, len = {len}, capacity = \"\n#~ \"{capacity}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"You allocate and deallocate heap memory yourself.\"\n#~ msgstr \"您可以自行配置及釋放堆積記憶體。\"\n\n#~ msgid \"\"\n#~ \"If not done with care, this can lead to crashes, bugs, security \"\n#~ \"vulnerabilities, and memory leaks.\"\n#~ msgstr \"如果操作時不夠小心，可能會導致當機、錯誤、安全漏洞和記憶體泄漏。\"\n\n#~ msgid \"C Example\"\n#~ msgstr \"C 範例\"\n\n#~ msgid \"You must call `free` on every pointer you allocate with `malloc`:\"\n#~ msgstr \"使用 `malloc` 配置每個指標時，都必須呼叫 `free`：\"\n\n#~ msgid \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = (int*)malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c\\n\"\n#~ \"void foo(size_t n) {\\n\"\n#~ \"    int* int_array = (int*)malloc(n * sizeof(int));\\n\"\n#~ \"    //\\n\"\n#~ \"    // ... lots of code\\n\"\n#~ \"    //\\n\"\n#~ \"    free(int_array);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Memory is leaked if the function returns early between `malloc` and \"\n#~ \"`free`: the pointer is lost and we cannot deallocate the memory.\"\n#~ msgstr \"\"\n#~ \"如果函式在 `malloc` 和 `free` 之間提早傳回記憶體，就會發生記憶體泄漏：指標\"\n#~ \"遺失，我們也無法釋放記憶體。\"\n\n#~ msgid \"\"\n#~ \"Constructors and destructors let you hook into the lifetime of an object.\"\n#~ msgstr \"建構函式和解構函式可讓您掌握物件的生命週期。\"\n\n#~ msgid \"\"\n#~ \"By wrapping a pointer in an object, you can free memory when the object \"\n#~ \"is destroyed. The compiler guarantees that this happens, even if an \"\n#~ \"exception is raised.\"\n#~ msgstr \"\"\n#~ \"只要在物件中包裝指標，即可在物件刪除時釋放記憶體。即使發生例外狀況，編譯器\"\n#~ \"仍會保證執行這項作業。\"\n\n#~ msgid \"\"\n#~ \"This is often called _resource acquisition is initialization_ (RAII) and \"\n#~ \"gives you smart pointers.\"\n#~ msgstr \"這通常稱為「資源取得即初始化」(RAII)，且會提供智慧指標。\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"void say_hello(std::unique_ptr<Person> person) {\\n\"\n#~ \"  std::cout << \\\"Hello \\\" << person->name << std::endl;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The `std::unique_ptr` object is allocated on the stack, and points to \"\n#~ \"memory allocated on the heap.\"\n#~ msgstr \"`std::unique_ptr` 物件會在堆疊上配置，並指向在堆積上配置的記憶體。\"\n\n#~ msgid \"\"\n#~ \"At the end of `say_hello`, the `std::unique_ptr` destructor will run.\"\n#~ msgstr \"`say_hello` 結束時，`std::unique_ptr` 解構函式就會執行。\"\n\n#~ msgid \"The destructor frees the `Person` object it points to.\"\n#~ msgstr \"解構函式會釋放其指向的 `Person` 物件。\"\n\n#~ msgid \"\"\n#~ \"Special move constructors are used when passing ownership to a function:\"\n#~ msgstr \"將所有權傳遞至函式時，系統會使用特殊的移動建構函式：\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::unique_ptr<Person> person = find_person(\\\"Carla\\\");\\n\"\n#~ \"say_hello(std::move(person));\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::unique_ptr<Person> person = find_person(\\\"Carla\\\");\\n\"\n#~ \"say_hello(std::move(person));\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"An alternative to manual and scope-based memory management is automatic \"\n#~ \"memory management:\"\n#~ msgstr \"\"\n#~ \"除了手動記憶體管理和作用域式記憶體管理之外，自動記憶體管理是另一種做法：\"\n\n#~ msgid \"The programmer never allocates or deallocates memory explicitly.\"\n#~ msgstr \"程式設計師一律不會明確配置或釋放記憶體。\"\n\n#~ msgid \"\"\n#~ \"A garbage collector finds unused memory and deallocates it for the \"\n#~ \"programmer.\"\n#~ msgstr \"垃圾收集器會找到未使用的記憶體，並釋放給程式設計師。\"\n\n#~ msgid \"Java Example\"\n#~ msgstr \"Java 範例\"\n\n#~ msgid \"The `person` object is not deallocated after `sayHello` returns:\"\n#~ msgstr \"`sayHello` 傳回後，系統不會釋放 `person` 物件：\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"void sayHello(Person person) {\\n\"\n#~ \"  System.out.println(\\\"Hello \\\" + person.getName());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Memory Management in Rust\"\n#~ msgstr \"Rust 中的記憶體管理\"\n\n#~ msgid \"Memory management in Rust is a mix:\"\n#~ msgstr \"Rust 中的記憶體管理融合了以下特色：\"\n\n#~ msgid \"Safe and correct like Java, but without a garbage collector.\"\n#~ msgstr \"像 Java 一樣安全又正確，但沒有垃圾回收機制。\"\n\n#~ msgid \"\"\n#~ \"Depending on which abstraction (or combination of abstractions) you \"\n#~ \"choose, can be a single unique pointer, reference counted, or atomically \"\n#~ \"reference counted.\"\n#~ msgstr \"\"\n#~ \"可以是單一不重複指標、採用參考計數或採用原子參考計數，須視您選擇的抽象方\"\n#~ \"法 (或抽象方法組合) 而定。\"\n\n#~ msgid \"Scope-based like C++, but the compiler enforces full adherence.\"\n#~ msgstr \"像 C++ 一樣的作用域式管理，但編譯器會強制遵循完整規定。\"\n\n#~ msgid \"\"\n#~ \"A Rust user can choose the right abstraction for the situation, some even \"\n#~ \"have no cost at runtime like C.\"\n#~ msgstr \"\"\n#~ \"Rust 使用者可選擇適合情境的抽象方法，部分方法甚至像 C 一樣在執行階段無額外\"\n#~ \"成本。\"\n\n#~ msgid \"It achieves this by modeling _ownership_ explicitly.\"\n#~ msgstr \"實現這種記憶體管理的方法是明確建立「所有權」模型。\"\n\n#~ msgid \"\"\n#~ \"If asked how at this point, you can mention that in Rust this is usually \"\n#~ \"handled by RAII wrapper types such as [Box](https://doc.rust-lang.org/std/\"\n#~ \"boxed/struct.Box.html), [Vec](https://doc.rust-lang.org/std/vec/struct.\"\n#~ \"Vec.html), [Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html), or [Arc]\"\n#~ \"(https://doc.rust-lang.org/std/sync/struct.Arc.html). These encapsulate \"\n#~ \"ownership and memory allocation via various means, and prevent the \"\n#~ \"potential errors in C.\"\n#~ msgstr \"\"\n#~ \"如果這時學員詢問相關做法，您可以表示這在 Rust 中通常會以 RAII 包裝函式型別\"\n#~ \"處理，例如 [Box](https://doc.rust-lang.org/std/boxed/struct.Box.html)、\"\n#~ \"[Vec](https://doc.rust-lang.org/std/vec/struct.Vec.html)、[Rc](https://\"\n#~ \"doc.rust-lang.org/std/rc/struct.Rc.html) 或 [Arc](https://doc.rust-lang.\"\n#~ \"org/std/sync/struct.Arc.html)。這些型別會透過多種方法封裝所有權和記憶體配\"\n#~ \"置，防止在 C 中可能出現的錯誤。\"\n\n#~ msgid \"\"\n#~ \"You may be asked about destructors here, the [Drop](https://doc.rust-lang.\"\n#~ \"org/std/ops/trait.Drop.html) trait is the Rust equivalent.\"\n#~ msgstr \"\"\n#~ \"這時學員可能會詢問解構函式，Rust 中的類似項目就是 [Drop](https://doc.rust-\"\n#~ \"lang.org/std/ops/trait.Drop.html) 特徵。\"\n\n#~ msgid \"Here is a rough comparison of the memory management techniques.\"\n#~ msgstr \"以下概略比較各種記憶體管理技巧。\"\n\n#~ msgid \"Pros of Different Memory Management Techniques\"\n#~ msgstr \"不同記憶體管理技巧的優點\"\n\n#, fuzzy\n#~ msgid \"Manual like C:\"\n#~ msgstr \"手動管理，例如 C：\"\n\n#, fuzzy\n#~ msgid \"No runtime overhead.\"\n#~ msgstr \"沒有執行階段負擔。\"\n\n#, fuzzy\n#~ msgid \"Automatic like Java:\"\n#~ msgstr \"自動管理，例如 Java：\"\n\n#, fuzzy\n#~ msgid \"Fully automatic.\"\n#~ msgstr \"完全自動化。\"\n\n#, fuzzy\n#~ msgid \"Safe and correct.\"\n#~ msgstr \"安全又正確。\"\n\n#, fuzzy\n#~ msgid \"Scope-based like C++:\"\n#~ msgstr \"作用域式管理，例如 C++：\"\n\n#, fuzzy\n#~ msgid \"Partially automatic.\"\n#~ msgstr \"部分自動化。 \\\\*沒有執行階段負擔。\"\n\n#, fuzzy\n#~ msgid \"Compiler-enforced scope-based like Rust:\"\n#~ msgstr \"由編譯器強制執行。\"\n\n#, fuzzy\n#~ msgid \"Enforced by compiler.\"\n#~ msgstr \"沒有執行階段負擔。\"\n\n#~ msgid \"Cons of Different Memory Management Techniques\"\n#~ msgstr \"不同記憶體管理技巧的缺點\"\n\n#~ msgid \"Use-after-free.\"\n#~ msgstr \"使用已釋放記憶體。\"\n\n#~ msgid \"Double-frees.\"\n#~ msgstr \"重複釋放。\"\n\n#~ msgid \"Memory leaks.\"\n#~ msgstr \"記憶體泄漏。\"\n\n#~ msgid \"Garbage collection pauses.\"\n#~ msgstr \"垃圾回收機制會暫停。\"\n\n#~ msgid \"Destructor delays.\"\n#~ msgstr \"解構函式會延遲。\"\n\n#~ msgid \"Complex, opt-in by programmer.\"\n#~ msgstr \"相當複雜，由程式設計師自行選用。\"\n\n#~ msgid \"Potential for use-after-free.\"\n#~ msgstr \"可能會使用已釋放記憶體。\"\n\n#~ msgid \"Compiler-enforced and scope-based like Rust:\"\n#~ msgstr \"編譯器強制執行的範圍式管理，例如 Rust：\"\n\n#~ msgid \"Some upfront complexity.\"\n#~ msgstr \"一開始較為複雜。\"\n\n#~ msgid \"Can reject valid programs.\"\n#~ msgstr \"可能會拒絕有效程式。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    {\\n\"\n#~ \"        let p = Point(3, 4);\\n\"\n#~ \"        println!(\\\"x: {}\\\", p.0);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"y: {}\\\", p.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    {\\n\"\n#~ \"        let p = Point(3, 4);\\n\"\n#~ \"        println!(\\\"x: {}\\\", p.0);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"y: {}\\\", p.1);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"A destructor can run here to free up resources.\"\n#~ msgstr \"解構函式可在這時執行，用來釋放資源。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Hello!\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"    println!(\\\"s2: {s2}\\\");\\n\"\n#~ \"    // println!(\\\"s1: {s1}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"The data was _moved_ from `s1` and `s1` is no longer accessible.\"\n#~ msgstr \"資料已從 `s1`「移出」，`s1` 無法再供存取。\"\n\n#~ msgid \"There is always _exactly_ one variable binding which owns a value.\"\n#~ msgstr \"一律「只有」一個變數綁定會擁有值。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Rust\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s1: String = String::from(\\\"Rust\\\");\\n\"\n#~ \"    let s2: String = s1;\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"The heap data from `s1` is reused for `s2`.\"\n#~ msgstr \"系統會為 `s2` 重複使用 `s1` 的堆積資料。\"\n\n#~ msgid \"\"\n#~ \"When `s1` goes out of scope, nothing happens (it has been moved from).\"\n#~ msgstr \"當 `s1` 超出範圍時，系統不會執行任何動作，因為 `s1` 已移出。\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                           :\\n\"\n#~ \":    s1                     :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| R  | u  | s  | t  |   :\\n\"\n#~ \":   | len       |     4 |   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | capacity  |     4 |   :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :                           :\\n\"\n#~ \":                           :     `- - - - - - - - - - - - - -'\\n\"\n#~ \":                           :\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" 堆疊                             堆積\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                           :\\n\"\n#~ \":    s1                     :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| R  | u  | s  | t  |   :\\n\"\n#~ \":   | len       |     4 |   :     :   +----+----+----+----+   :\\n\"\n#~ \":   | capacity  |     4 |   :     :                           :\\n\"\n#~ \":   +-----------+-------+   :     :                           :\\n\"\n#~ \":                           :     `- - - - - - - - - - - - - -'\\n\"\n#~ \":                           :\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // Duplicate the data in s1.\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```c++\\n\"\n#~ \"std::string s1 = \\\"Cpp\\\";\\n\"\n#~ \"std::string s2 = s1;  // 重複 s1 中的資料。\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" 堆疊                             堆積\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```bob\\n\"\n#~ \" Stack                             Heap\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```bob\\n\"\n#~ \" 堆疊                             堆積\\n\"\n#~ \".- - - - - - - - - - - - - -.     .- - - - - - - - - - - -.\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s1                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+--+--+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     :                       :\\n\"\n#~ \":    s2                     :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :   +----+----+----+    :\\n\"\n#~ \":   | ptr       |   o---+---+-----+-->| C  | p  | p  |    :\\n\"\n#~ \":   | len       |     3 |   :     :   +----+----+----+    :\\n\"\n#~ \":   | capacity  |     3 |   :     :                       :\\n\"\n#~ \":   +-----------+-------+   :     :                       :\\n\"\n#~ \":                           :     `- - - - - - - - - - - -'\\n\"\n#~ \"`- - - - - - - - - - - - - -'\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = String::from(\\\"Alice\\\");\\n\"\n#~ \"    say_hello(name);\\n\"\n#~ \"    // say_hello(name);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn say_hello(name: String) {\\n\"\n#~ \"    println!(\\\"Hello {name}\\\")\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let name = String::from(\\\"Alice\\\");\\n\"\n#~ \"    say_hello(name);\\n\"\n#~ \"    // say_hello(name);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = 42;\\n\"\n#~ \"    let y = x;\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"    println!(\\\"y: {y}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Copy, Clone, Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = p1;\\n\"\n#~ \"    println!(\\\"p1: {p1:?}\\\");\\n\"\n#~ \"    println!(\\\"p2: {p2:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Copy, Clone, Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = p1;\\n\"\n#~ \"    println!(\\\"p1: {p1:?}\\\");\\n\"\n#~ \"    println!(\\\"p2: {p2:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"If students ask about `derive`, it is sufficient to say that this is a \"\n#~ \"way to generate code in Rust at compile time. In this case the default \"\n#~ \"implementations of `Copy` and `Clone` traits are generated.\"\n#~ msgstr \"\"\n#~ \"如有學員問起 `derive`，只需回答這是在 Rust 編譯時間中產生程式碼的方式。在\"\n#~ \"這種情形下，系統會產生 `Copy` 和 `Clone` 特徵的預設實作方式。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    Point(p1.0 + p2.0, p1.1 + p2.1)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    Point(p1.0 + p2.0, p1.1 + p2.1)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    let p = Point(p1.0 + p2.0, p1.1 + p2.1);\\n\"\n#~ \"    println!(\\\"&p.0: {:p}\\\", &p.0);\\n\"\n#~ \"    p\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"&p3.0: {:p}\\\", &p3.0);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn add(p1: &Point, p2: &Point) -> Point {\\n\"\n#~ \"    let p = Point(p1.0 + p2.0, p1.1 + p2.1);\\n\"\n#~ \"    println!(\\\"&p.0: {:p}\\\", &p.0);\\n\"\n#~ \"    p\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1 = Point(3, 4);\\n\"\n#~ \"    let p2 = Point(10, 20);\\n\"\n#~ \"    let p3 = add(&p1, &p2);\\n\"\n#~ \"    println!(\\\"&p3.0: {:p}\\\", &p3.0);\\n\"\n#~ \"    println!(\\\"{p1:?} + {p2:?} = {p3:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: i32 = 10;\\n\"\n#~ \"    let b: &i32 = &a;\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let c: &mut i32 = &mut a;\\n\"\n#~ \"        *c = 20;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"a: {a}\\\");\\n\"\n#~ \"    println!(\\\"b: {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut a: i32 = 10;\\n\"\n#~ \"    let b: &i32 = &a;\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let c: &mut i32 = &mut a;\\n\"\n#~ \"        *c = 20;\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"a: {a}\\\");\\n\"\n#~ \"    println!(\\\"b: {b}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"A borrowed value has a _lifetime_:\"\n#~ msgstr \"借用的值具有「生命週期」：\"\n\n#~ msgid \"\"\n#~ \"The lifetime can be implicit: `add(p1: &Point, p2: &Point) -> Point`.\"\n#~ msgstr \"生命週期可以採用隱含方式：`add(p1: &Point, p2: &Point) -> Point`。\"\n\n#~ msgid \"Lifetimes can also be explicit: `&'a Point`, `&'document str`.\"\n#~ msgstr \"生命週期也可以採用明確方式：`&'a Point`、`&'document str`。\"\n\n#~ msgid \"\"\n#~ \"Read `&'a Point` as \\\"a borrowed `Point` which is valid for at least the \"\n#~ \"lifetime `a`\\\".\"\n#~ msgstr \"請將 `&'a Point` 讀做「至少對生命週期 `a` 有效的借用 `Point`」。\"\n\n#~ msgid \"\"\n#~ \"Lifetimes are always inferred by the compiler: you cannot assign a \"\n#~ \"lifetime yourself.\"\n#~ msgstr \"生命週期一律會由編譯器推論：您無法自行指派生命週期。\"\n\n#~ msgid \"\"\n#~ \"In addition to borrowing its arguments, a function can return a borrowed \"\n#~ \"value:\"\n#~ msgstr \"除了借用引數，函式也可以傳回借用的值：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p2: Point = Point(20, 20);\\n\"\n#~ \"    let p3: &Point = left_most(&p1, &p2);\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p2: Point = Point(20, 20);\\n\"\n#~ \"    let p3: &Point = left_most(&p1, &p2);\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`'a` is a generic parameter, it is inferred by the compiler.\"\n#~ msgstr \"`'a` 是由編譯器推論的泛型參數。\"\n\n#~ msgid \"Lifetimes start with `'` and `'a` is a typical default name.\"\n#~ msgstr \"生命週期的開頭為 `'`，一般預設名稱為 `'a`。\"\n\n#~ msgid \"\"\n#~ \"The _at least_ part is important when parameters are in different scopes.\"\n#~ msgstr \"如果參數位於不同的範圍，「至少」一詞就至關重要。\"\n\n#~ msgid \"\"\n#~ \"Move the declaration of `p2` and `p3` into a new scope (`{ ... }`), \"\n#~ \"resulting in the following code:\"\n#~ msgstr \"將 `p2` 和 `p3` 的宣告移至新範圍 (`{ ... }`)，會產生以下程式碼：\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p3: &Point;\\n\"\n#~ \"    {\\n\"\n#~ \"        let p2: Point = Point(20, 20);\\n\"\n#~ \"        p3 = left_most(&p1, &p2);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Point(i32, i32);\\n\"\n#~ \"\\n\"\n#~ \"fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point {\\n\"\n#~ \"    if p1.0 < p2.0 { p1 } else { p2 }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let p1: Point = Point(10, 10);\\n\"\n#~ \"    let p3: &Point;\\n\"\n#~ \"    {\\n\"\n#~ \"        let p2: Point = Point(20, 20);\\n\"\n#~ \"        p3 = left_most(&p1, &p2);\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"left-most point: {:?}\\\", p3);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Note how this does not compile since `p3` outlives `p2`.\"\n#~ msgstr \"請注意，這在 `p3` 超越 `p2` 並繼續留存後，就沒有編譯。\"\n\n#~ msgid \"\"\n#~ \"Reset the workspace and change the function signature to `fn \"\n#~ \"left_most<'a, 'b>(p1: &'a Point, p2: &'a Point) -> &'b Point`. This will \"\n#~ \"not compile because the relationship between the lifetimes `'a` and `'b` \"\n#~ \"is unclear.\"\n#~ msgstr \"\"\n#~ \"重設工作區，並將函式簽章變更為 `fn left_most<'a, 'b>(p1: &'a Point, p2: \"\n#~ \"&'a Point) -> &'b Point`。這不會編譯，因為生命週期 `'a` 和 `'b` 之間的關係\"\n#~ \"不明確。\"\n\n#~ msgid \"Another way to explain it:\"\n#~ msgstr \"另一種說明方式：\"\n\n#~ msgid \"\"\n#~ \"Two references to two values are borrowed by a function and the function \"\n#~ \"returns another reference.\"\n#~ msgstr \"函式會借用兩個值的兩個參照，而函式會傳回另一個參照。\"\n\n#~ msgid \"\"\n#~ \"It must have come from one of those two inputs (or from a global \"\n#~ \"variable).\"\n#~ msgstr \"該參照必須來自這兩種輸入來源的其中之一 (或來自全域變數)。\"\n\n#~ msgid \"\"\n#~ \"Which one is it? The compiler needs to know, so at the call site the \"\n#~ \"returned reference is not used for longer than a variable from where the \"\n#~ \"reference came from.\"\n#~ msgstr \"\"\n#~ \"究竟是哪一個來源？編譯器需要知道來源為何，因此在呼叫點上，所傳回參照的使用\"\n#~ \"時間不會長於來自參照來源的變數。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"struct Highlight<'doc>(&'doc str);\\n\"\n#~ \"\\n\"\n#~ \"fn erase(text: String) {\\n\"\n#~ \"    println!(\\\"Bye {text}!\\\");\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let text = String::from(\\\"The quick brown fox jumps over the lazy dog.\"\n#~ \"\\\");\\n\"\n#~ \"    let fox = Highlight(&text[4..19]);\\n\"\n#~ \"    let dog = Highlight(&text[35..43]);\\n\"\n#~ \"    // erase(text);\\n\"\n#~ \"    println!(\\\"{fox:?}\\\");\\n\"\n#~ \"    println!(\\\"{dog:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Day 1: Afternoon Exercises\"\n#~ msgstr \"第 1 天：下午練習\"\n\n#~ msgid \"We will look at two things:\"\n#~ msgstr \"我們將著重在以下兩點：\"\n\n#~ msgid \"\"\n#~ \"We will learn much more about structs and the `Vec<T>` type tomorrow. For \"\n#~ \"now, you just need to know part of its API:\"\n#~ msgstr \"\"\n#~ \"明天我們會進一步講解結構體和 `Vec<T>` 型別。現階段，您只需要瞭解相關 API \"\n#~ \"的部分內容：\"\n\n#~ msgid \"[Solution](solutions-afternoon.md#designing-a-library)\"\n#~ msgstr \"[解決方案](solutions-afternoon.md#designing-a-library)\"\n\n#~ msgid \"\"\n#~ \"The ownership model of Rust affects many APIs. An example of this is the \"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) traits.\"\n#~ msgstr \"\"\n#~ \"Rust 的擁有權模型會影響許多 API。[`Iterator`](https://doc.rust-lang.org/\"\n#~ \"std/iter/trait.Iterator.html) 和 [`IntoIterator`](https://doc.rust-lang.\"\n#~ \"org/std/iter/trait.IntoIterator.html) 特徵就是一例。\"\n\n#~ msgid \"\"\n#~ \"Traits are like interfaces: they describe behavior (methods) for a type. \"\n#~ \"The `Iterator` trait simply says that you can call `next` until you get \"\n#~ \"`None` back:\"\n#~ msgstr \"\"\n#~ \"特徵就像介面一樣，可以說明型別的行為 (方法)。`Iterator` 特徵就是指您可以呼\"\n#~ \"叫 `next`，直到取回 `None` 為止：\"\n\n#~ msgid \"You use this trait like this:\"\n#~ msgstr \"您可以像下方這樣使用這個特徵：\"\n\n#~ msgid \"What is the type returned by the iterator? Test your answer here:\"\n#~ msgstr \"如要瞭解疊代器傳回的型別為何，不妨在這裡測試答案：\"\n\n#~ msgid \"Why is this type used?\"\n#~ msgstr \"思考一下，為什麼會使用這種型別？\"\n\n#~ msgid \"Like before, what  is the type returned by the iterator?\"\n#~ msgstr \"和先前一樣，思考疊代器傳回的型別為何。\"\n\n#~ msgid \"\"\n#~ \"Now that we know both `Iterator` and `IntoIterator`, we can build `for` \"\n#~ \"loops. They call `into_iter()` on an expression and iterates over the \"\n#~ \"resulting iterator:\"\n#~ msgstr \"\"\n#~ \"現在我們已瞭解 `Iterator` 和 `IntoIterator`，可以建構 `for` 迴圈了。這會在\"\n#~ \"運算式上呼叫 `into_iter()`，並對產生的疊代器進行疊代：\"\n\n#, fuzzy\n#~ msgid \"Structs, enums, methods.\"\n#~ msgstr \"結構體和方法。\"\n\n#~ msgid \"\"\n#~ \"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, \"\n#~ \"and `continue`.\"\n#~ msgstr \"\"\n#~ \"控制流程結構：`if`、`if let`、`while`、`while let`、`break` 和 \"\n#~ \"`continue`。\"\n\n#~ msgid \"\"\n#~ \"The Standard Library: `String`, `Option` and `Result`, `Vec`, `HashMap`, \"\n#~ \"`Rc` and `Arc`.\"\n#~ msgstr \"\"\n#~ \"標準程式庫：`String`、`Option` 和 `Result`、`Vec`、`HashMap`、`Rc` 和 \"\n#~ \"`Arc`。\"\n\n#~ msgid \"Modules: visibility, paths, and filesystem hierarchy.\"\n#~ msgstr \"模組：瀏覽權限、路徑和檔案系統階層。\"\n\n#~ msgid \"\"\n#~ \"Methods are defined in an `impl` block, which we will see in following \"\n#~ \"slides.\"\n#~ msgstr \"方法會在 `impl` 區塊中定義，我們將於接下來的投影片說明這點。\"\n\n#~ msgid \"\"\n#~ \"The `new` function could be written using `Self` as a type, as it is \"\n#~ \"interchangeable with the struct type name\"\n#~ msgstr \"\"\n#~ \"您可以將 `Self` 用做型別來編寫 `new` 函式，因為它可和結構體型別名稱互通。\"\n\n#~ msgid \"\"\n#~ \"Implement the `Default` trait for the struct. Define some fields and use \"\n#~ \"the default values for the other fields.\"\n#~ msgstr \"\"\n#~ \"實作結構體的 `Default` 特徵。請定義部分欄位，並針對其他欄位使用預設值。\"\n\n#~ msgid \"Methods are defined in the `impl` block.\"\n#~ msgstr \"方法會在 `impl` 區塊中定義。\"\n\n#~ msgid \"\"\n#~ \"Use struct update syntax to define a new structure using `peter`. Note \"\n#~ \"that the variable `peter` will no longer be accessible afterwards.\"\n#~ msgstr \"\"\n#~ \"使用結構體更新語法，利用 `peter` 定義新結構。請注意，`peter` 這個變數之後\"\n#~ \"將再也無法存取。\"\n\n#~ msgid \"\"\n#~ \"Use `{:#?}` when printing structs to request the `Debug` representation.\"\n#~ msgstr \"輸出結構體時，請使用 `{:#?}` 提出 `Debug` 表示法要求。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    // Implementation based on https://xkcd.com/221/\\n\"\n#~ \"    4  // Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum CoinFlip {\\n\"\n#~ \"    Heads,\\n\"\n#~ \"    Tails,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn flip_coin() -> CoinFlip {\\n\"\n#~ \"    let random_number = generate_random_number();\\n\"\n#~ \"    if random_number % 2 == 0 {\\n\"\n#~ \"        return CoinFlip::Heads;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        return CoinFlip::Tails;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"You got: {:?}\\\", flip_coin());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn generate_random_number() -> i32 {\\n\"\n#~ \"    // Implementation based on https://xkcd.com/221/\\n\"\n#~ \"    4  // Chosen by fair dice roll. Guaranteed to be random.\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum CoinFlip {\\n\"\n#~ \"    Heads,\\n\"\n#~ \"    Tails,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn flip_coin() -> CoinFlip {\\n\"\n#~ \"    let random_number = generate_random_number();\\n\"\n#~ \"    if random_number % 2 == 0 {\\n\"\n#~ \"        return CoinFlip::Heads;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        return CoinFlip::Tails;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"You got: {:?}\\\", flip_coin());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"This page offers an enum type `CoinFlip` with two variants `Heads` and \"\n#~ \"`Tail`. You might note the namespace when using variants.\"\n#~ msgstr \"\"\n#~ \"本頁面提供列舉類別 `CoinFlip`，以及 `Heads` 和 `Tail` 這兩個變體。您可以在\"\n#~ \"使用變體時記下命名空間。\"\n\n#~ msgid \"In both, associated functions are defined within an `impl` block.\"\n#~ msgstr \"無論使用何者，相關函式都會在 `impl` 區塊中定義。\"\n\n#~ msgid \"\"\n#~ \"You can define richer enums where the variants carry data. You can then \"\n#~ \"use the `match` statement to extract the data from each variant:\"\n#~ msgstr \"\"\n#~ \"您可以定義更豐富的列舉，讓列舉的變體攜帶資料。接著，您可以使用 `match` 陳\"\n#~ \"述式，從各個變體擷取資料：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"enum WebEvent {\\n\"\n#~ \"    PageLoad,                 // Variant without payload\\n\"\n#~ \"    KeyPress(char),           // Tuple struct variant\\n\"\n#~ \"    Click { x: i64, y: i64 }, // Full struct variant\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(event: WebEvent) {\\n\"\n#~ \"    match event {\\n\"\n#~ \"        WebEvent::PageLoad       => println!(\\\"page loaded\\\"),\\n\"\n#~ \"        WebEvent::KeyPress(c)    => println!(\\\"pressed '{c}'\\\"),\\n\"\n#~ \"        WebEvent::Click { x, y } => println!(\\\"clicked at x={x}, \"\n#~ \"y={y}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let load = WebEvent::PageLoad;\\n\"\n#~ \"    let press = WebEvent::KeyPress('x');\\n\"\n#~ \"    let click = WebEvent::Click { x: 20, y: 80 };\\n\"\n#~ \"\\n\"\n#~ \"    inspect(load);\\n\"\n#~ \"    inspect(press);\\n\"\n#~ \"    inspect(click);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"enum WebEvent {\\n\"\n#~ \"    PageLoad,                 // Variant without payload\\n\"\n#~ \"    KeyPress(char),           // Tuple struct variant\\n\"\n#~ \"    Click { x: i64, y: i64 }, // Full struct variant\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"#[rustfmt::skip]\\n\"\n#~ \"fn inspect(event: WebEvent) {\\n\"\n#~ \"    match event {\\n\"\n#~ \"        WebEvent::PageLoad       => println!(\\\"page loaded\\\"),\\n\"\n#~ \"        WebEvent::KeyPress(c)    => println!(\\\"pressed '{c}'\\\"),\\n\"\n#~ \"        WebEvent::Click { x, y } => println!(\\\"clicked at x={x}, \"\n#~ \"y={y}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let load = WebEvent::PageLoad;\\n\"\n#~ \"    let press = WebEvent::KeyPress('x');\\n\"\n#~ \"    let click = WebEvent::Click { x: 20, y: 80 };\\n\"\n#~ \"\\n\"\n#~ \"    inspect(load);\\n\"\n#~ \"    inspect(press);\\n\"\n#~ \"    inspect(click);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The expression is matched against the patterns from top to bottom. There \"\n#~ \"is no fall-through like in C or C++.\"\n#~ msgstr \"\"\n#~ \"系統會從上到下將運算式與模式進行配對。在 Rust 中，不會像在 C 或 C++ 中一樣\"\n#~ \"出現貫穿 (fall-through) 情形。\"\n\n#~ msgid \"\"\n#~ \"The match expression has a value. The value is the last expression in the \"\n#~ \"match arm which was executed.\"\n#~ msgstr \"配對運算式具有值。此值是系統執行的配對分支中的最後一個運算式。\"\n\n#~ msgid \"\"\n#~ \"Starting from the top we look for what pattern matches the value then run \"\n#~ \"the code following the arrow. Once we find a match, we stop. \"\n#~ msgstr \"\"\n#~ \"我們會從上方開始尋找符合該值的模式，然後執行箭頭後方的程式碼。一旦發現相符\"\n#~ \"項目，就會停止。\"\n\n#~ msgid \"`match` inspects a hidden discriminant field in the `enum`.\"\n#~ msgstr \"`match` 會檢查 `enum` 中隱藏的判別值欄位。\"\n\n#~ msgid \"\"\n#~ \"It is possible to retrieve the discriminant by calling `std::mem::\"\n#~ \"discriminant()`\"\n#~ msgstr \"只要呼叫 `std::mem::discriminant()`，就有可能擷取該判別值。\\\\`\"\n\n#~ msgid \"\"\n#~ \"This is useful, for example, if implementing `PartialEq` for structs \"\n#~ \"where comparing field values doesn't affect equality.\"\n#~ msgstr \"\"\n#~ \"舉例來說，如果在為結構體實作 `PartialEq` 時，比較欄位值不會對相等性造成影\"\n#~ \"響，這種做法就很實用。\"\n\n#~ msgid \"\"\n#~ \"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::\"\n#~ \"Click(Click)` with a top level `struct Click { ... }`. The inlined \"\n#~ \"version cannot implement traits, for example.\"\n#~ msgstr \"\"\n#~ \"`WebEvent::Click { ... }` 與具有頂層 `struct Click { ... }` 的 `WebEvent::\"\n#~ \"Click(Click)` 並非完全相同。舉例來說，內嵌版本無法實作特徵。\"\n\n#~ msgid \"\"\n#~ \"Rust enums are packed tightly, taking constraints due to alignment into \"\n#~ \"account:\"\n#~ msgstr \"Rust 列舉會緊密封裝，並考量因對齊而造成的限制：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_size {\\n\"\n#~ \"    ($t:ty) => {\\n\"\n#~ \"        println!(\\\"{}: size {} bytes, align: {} bytes\\\",\\n\"\n#~ \"                 stringify!($t), size_of::<$t>(), align_of::<$t>());\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"enum Foo {\\n\"\n#~ \"    A,\\n\"\n#~ \"    B,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    dbg_size!(Foo);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::{align_of, size_of};\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_size {\\n\"\n#~ \"    ($t:ty) => {\\n\"\n#~ \"        println!(\\\"{}: size {} bytes, align: {} bytes\\\",\\n\"\n#~ \"                 stringify!($t), size_of::<$t>(), align_of::<$t>());\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"enum Foo {\\n\"\n#~ \"    A,\\n\"\n#~ \"    B,\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    dbg_size!(Foo);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Internally Rust is using a field (discriminant) to keep track of the enum \"\n#~ \"variant.\"\n#~ msgstr \"在內部，Rust 會使用欄位 (判別值) 追蹤列舉變體。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[repr(u32)]\\n\"\n#~ \"enum Bar {\\n\"\n#~ \"    A,  // 0\\n\"\n#~ \"    B = 10000,\\n\"\n#~ \"    C,  // 10001\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"A: {}\\\", Bar::A as u32);\\n\"\n#~ \"    println!(\\\"B: {}\\\", Bar::B as u32);\\n\"\n#~ \"    println!(\\\"C: {}\\\", Bar::C as u32);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#[repr(u32)]\\n\"\n#~ \"enum Bar {\\n\"\n#~ \"    A,  // 0\\n\"\n#~ \"    B = 10000,\\n\"\n#~ \"    C,  // 10001\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"A: {}\\\", Bar::A as u32);\\n\"\n#~ \"    println!(\\\"B: {}\\\", Bar::B as u32);\\n\"\n#~ \"    println!(\\\"C: {}\\\", Bar::C as u32);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Try out other types such as\"\n#~ msgstr \"請嘗試其他型別，例如以下項目：\"\n\n#~ msgid \"`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,\"\n#~ msgstr \"`dbg_size!(bool)`：大小為 1 個位元組，對齊：1 個位元組。\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<bool>)`: size 1 bytes, align: 1 bytes (niche \"\n#~ \"optimization, see below),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<bool>)`：大小為 1 個位元組，對齊：1 個位元組 (區位最佳\"\n#~ \"化，請見下文)。\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(&i32)`：大小為 8 個位元組，對齊：8 個位元組 (在 64 位元機器\"\n#~ \"上)。\"\n\n#~ msgid \"\"\n#~ \"`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer \"\n#~ \"optimization, see below).\"\n#~ msgstr \"\"\n#~ \"`dbg_size!(Option<&i32>)`：大小為 8 個位元組，對齊：8 個位元組 (空值指標最\"\n#~ \"佳化，請見下文)。\"\n\n#~ msgid \"\"\n#~ \"Niche optimization: Rust will merge use unused bit patterns for the enum \"\n#~ \"discriminant.\"\n#~ msgstr \"區位最佳化：Rust 會為列舉判別值合併未使用的位元模式。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_bits {\\n\"\n#~ \"    ($e:expr, $bit_type:ty) => {\\n\"\n#~ \"        println!(\\\"- {}: {:#x}\\\", stringify!($e), transmute::<_, \"\n#~ \"$bit_type>($e));\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    // TOTALLY UNSAFE. Rust provides no guarantees about the bitwise\\n\"\n#~ \"    // representation of types.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        println!(\\\"Bitwise representation of bool\\\");\\n\"\n#~ \"        dbg_bits!(false, u8);\\n\"\n#~ \"        dbg_bits!(true, u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<bool>\\\");\\n\"\n#~ \"        dbg_bits!(None::<bool>, u8);\\n\"\n#~ \"        dbg_bits!(Some(false), u8);\\n\"\n#~ \"        dbg_bits!(Some(true), u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<Option<bool>>\\\");\\n\"\n#~ \"        dbg_bits!(Some(Some(false)), u8);\\n\"\n#~ \"        dbg_bits!(Some(Some(true)), u8);\\n\"\n#~ \"        dbg_bits!(Some(None::<bool>), u8);\\n\"\n#~ \"        dbg_bits!(None::<Option<bool>>, u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<&i32>\\\");\\n\"\n#~ \"        dbg_bits!(None::<&i32>, usize);\\n\"\n#~ \"        dbg_bits!(Some(&0i32), usize);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_bits {\\n\"\n#~ \"    ($e:expr, $bit_type:ty) => {\\n\"\n#~ \"        println!(\\\"- {}: {:#x}\\\", stringify!($e), transmute::<_, \"\n#~ \"$bit_type>($e));\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    // TOTALLY UNSAFE. Rust provides no guarantees about the bitwise\\n\"\n#~ \"    // representation of types.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        println!(\\\"Bitwise representation of bool\\\");\\n\"\n#~ \"        dbg_bits!(false, u8);\\n\"\n#~ \"        dbg_bits!(true, u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<bool>\\\");\\n\"\n#~ \"        dbg_bits!(None::<bool>, u8);\\n\"\n#~ \"        dbg_bits!(Some(false), u8);\\n\"\n#~ \"        dbg_bits!(Some(true), u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<Option<bool>>\\\");\\n\"\n#~ \"        dbg_bits!(Some(Some(false)), u8);\\n\"\n#~ \"        dbg_bits!(Some(Some(true)), u8);\\n\"\n#~ \"        dbg_bits!(Some(None::<bool>), u8);\\n\"\n#~ \"        dbg_bits!(None::<Option<bool>>, u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of Option<&i32>\\\");\\n\"\n#~ \"        dbg_bits!(None::<&i32>, usize);\\n\"\n#~ \"        dbg_bits!(Some(&0i32), usize);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"More complex example if you want to discuss what happens when we chain \"\n#~ \"more than 256 `Option`s together.\"\n#~ msgstr \"\"\n#~ \"如果想討論將超過 256 個 `Option` 鏈結在一起的情況，可以使用下列更複雜的範\"\n#~ \"例。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#![recursion_limit = \\\"1000\\\"]\\n\"\n#~ \"\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_bits {\\n\"\n#~ \"    ($e:expr, $bit_type:ty) => {\\n\"\n#~ \"        println!(\\\"- {}: {:#x}\\\", stringify!($e), transmute::<_, \"\n#~ \"$bit_type>($e));\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// Macro to wrap a value in 2^n Some() where n is the number of \\\"@\\\" \"\n#~ \"signs.\\n\"\n#~ \"// Increasing the recursion limit is required to evaluate this macro.\\n\"\n#~ \"macro_rules! many_options {\\n\"\n#~ \"    ($value:expr) => { Some($value) };\\n\"\n#~ \"    ($value:expr, @) => {\\n\"\n#~ \"        Some(Some($value))\\n\"\n#~ \"    };\\n\"\n#~ \"    ($value:expr, @ $($more:tt)+) => {\\n\"\n#~ \"        many_options!(many_options!($value, $($more)+), $($more)+)\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    // TOTALLY UNSAFE. Rust provides no guarantees about the bitwise\\n\"\n#~ \"    // representation of types.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        assert_eq!(many_options!(false), Some(false));\\n\"\n#~ \"        assert_eq!(many_options!(false, @), Some(Some(false)));\\n\"\n#~ \"        assert_eq!(many_options!(false, @@), \"\n#~ \"Some(Some(Some(Some(false)))));\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 128 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(false, @@@@@@@), u8);\\n\"\n#~ \"        dbg_bits!(many_options!(true, @@@@@@@), u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 256 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(false, @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(true, @@@@@@@@), u16);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 257 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(Some(false), @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(Some(true), @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(None::<bool>, @@@@@@@@), u16);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"#![recursion_limit = \\\"1000\\\"]\\n\"\n#~ \"\\n\"\n#~ \"use std::mem::transmute;\\n\"\n#~ \"\\n\"\n#~ \"macro_rules! dbg_bits {\\n\"\n#~ \"    ($e:expr, $bit_type:ty) => {\\n\"\n#~ \"        println!(\\\"- {}: {:#x}\\\", stringify!($e), transmute::<_, \"\n#~ \"$bit_type>($e));\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"// 在 2^n Some() 中包裝值的巨集，n 為「@」符號的數字。\\n\"\n#~ \"// 評估此巨集時，必須提高遞迴限制。\\n\"\n#~ \"macro_rules! many_options {\\n\"\n#~ \"    ($value:expr) => { Some($value) };\\n\"\n#~ \"    ($value:expr, @) => {\\n\"\n#~ \"        Some(Some($value))\\n\"\n#~ \"    };\\n\"\n#~ \"    ($value:expr, @ $($more:tt)+) => {\\n\"\n#~ \"        many_options!(many_options!($value, $($more)+), $($more)+)\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    // TOTALLY UNSAFE. Rust provides no guarantees about the bitwise\\n\"\n#~ \"    // representation of types.\\n\"\n#~ \"    unsafe {\\n\"\n#~ \"        assert_eq!(many_options!(false), Some(false));\\n\"\n#~ \"        assert_eq!(many_options!(false, @), Some(Some(false)));\\n\"\n#~ \"        assert_eq!(many_options!(false, @@), \"\n#~ \"Some(Some(Some(Some(false)))));\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 128 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(false, @@@@@@@), u8);\\n\"\n#~ \"        dbg_bits!(many_options!(true, @@@@@@@), u8);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 256 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(false, @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(true, @@@@@@@@), u16);\\n\"\n#~ \"\\n\"\n#~ \"        println!(\\\"Bitwise representation of a chain of 257 Option's.\"\n#~ \"\\\");\\n\"\n#~ \"        dbg_bits!(many_options!(Some(false), @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(Some(true), @@@@@@@@), u16);\\n\"\n#~ \"        dbg_bits!(many_options!(None::<bool>, @@@@@@@@), u16);\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"We describe the distinction between method receivers next.\"\n#~ msgstr \"接下來我們將說明方法接收器之間的差異。\"\n\n#~ msgid \"\"\n#~ \"Consider emphasizing \\\"shared and immutable\\\" and \\\"unique and mutable\\\". \"\n#~ \"These constraints always come together in Rust due to borrow checker \"\n#~ \"rules, and `self` is no exception. It isn't possible to reference a \"\n#~ \"struct from multiple locations and call a mutating (`&mut self`) method \"\n#~ \"on it.\"\n#~ msgstr \"\"\n#~ \"建議您強調「共用且不可變動」，以及「不重複且可變動」這兩個概念。由於借用檢\"\n#~ \"查器規則的關係，這些限制在 Rust 中一律會一起出現，而 `self` 也不例外。您無\"\n#~ \"法從多個位置參照結構體，並對其呼叫變異 (`&mut self`) 方法。\"\n\n#~ msgid \"All four methods here use a different method receiver.\"\n#~ msgstr \"這裡的四個方法都使用不同的方法接收器。\"\n\n#~ msgid \"\"\n#~ \"You can point out how that changes what the function can do with the \"\n#~ \"variable values and if/how it can be used again in `main`.\"\n#~ msgstr \"\"\n#~ \"您可以指出這會如何變更函式能對變數值執行的動作，以及可否/如何在 `main` 中\"\n#~ \"再次使用該函式。\"\n\n#~ msgid \"\"\n#~ \"You can showcase the error that appears when trying to call `finish` \"\n#~ \"twice.\"\n#~ msgstr \"您可以演示嘗試呼叫 `finish` 兩次時會出現什麼錯誤。\"\n\n#~ msgid \"\"\n#~ \"Note that although the method receivers are different, the non-static \"\n#~ \"functions are called the same way in the main body. Rust enables \"\n#~ \"automatic referencing and dereferencing when calling methods. Rust \"\n#~ \"automatically adds in the `&`, `*`, `muts` so that that object matches \"\n#~ \"the method signature.\"\n#~ msgstr \"\"\n#~ \"請注意，雖然方法接收器不同，但主體中非靜態函式的呼叫方式相同。Rust 會在呼\"\n#~ \"叫方法時啟用自動參照和取消參照功能，並自動加入 `&`、`*`、`muts`，讓該物件\"\n#~ \"與方法簽章相符。\"\n\n#~ msgid \"\"\n#~ \"You might point out that `print_laps` is using a vector that is iterated \"\n#~ \"over. We describe vectors in more detail in the afternoon. \"\n#~ msgstr \"\"\n#~ \"您或許可以指出 `print_laps` 使用了不斷疊代的向量。我們會在下午詳細介紹向\"\n#~ \"量。\"\n\n#~ msgid \"The `_` pattern is a wildcard pattern which matches any value.\"\n#~ msgstr \"`_` 模式是可與任何值配對的萬用字元模式。\"\n\n#~ msgid \"\"\n#~ \"It can be useful to show how binding works, by for instance replacing a \"\n#~ \"wildcard character with a variable, or removing the quotes around `q`.\"\n#~ msgstr \"\"\n#~ \"示範綁定的運作方式可能會很有幫助，例如您可以將萬用字元取代為變數，或是移\"\n#~ \"除 `q` 前後的引號。\"\n\n#~ msgid \"You can demonstrate matching on a reference.\"\n#~ msgstr \"您可以在參照項目上示範如何配對。\"\n\n#~ msgid \"\"\n#~ \"This might be a good time to bring up the concept of irrefutable \"\n#~ \"patterns, as the term can show up in error messages.\"\n#~ msgstr \"\"\n#~ \"這時候可能很適合提到「不可反駁的模式」這個概念，因為這個詞可能會出現在錯誤\"\n#~ \"消息中。\"\n\n#~ msgid \"You can also destructure `structs`:\"\n#~ msgstr \"您也可以解構 `struct`：\"\n\n#~ msgid \"\"\n#~ \"You can destructure arrays, tuples, and slices by matching on their \"\n#~ \"elements:\"\n#~ msgstr \"您可以在陣列、元組和切片的元素上配對，藉此解構陣列、元組和切片：\"\n\n#~ msgid \"\"\n#~ \"Destructuring of slices of unknown length also works with patterns of \"\n#~ \"fixed length.\"\n#~ msgstr \"您可以解構未知長度的切片，同樣的方法也適用於固定長度的模式。\"\n\n#~ msgid \"Create a new pattern using `_` to represent an element. \"\n#~ msgstr \"建立使用 `_` 來代表元素的新模式。\"\n\n#~ msgid \"Add more values to the array.\"\n#~ msgstr \"在陣列中加入更多值。\"\n\n#~ msgid \"\"\n#~ \"Point out that how `..` will expand to account for different number of \"\n#~ \"elements.\"\n#~ msgstr \"向學員指出為了因應不同元素數量的情況，`..` 會如何展開。\"\n\n#~ msgid \"\"\n#~ \"Show matching against the tail with patterns `[.., b]` and `[a@..,b]`\"\n#~ msgstr \"向學員說明與模式 (`[.., b]` 和 `[a@..,b]`) 末端的配對情形。\"\n\n#~ msgid \"\"\n#~ \"When matching, you can add a _guard_ to a pattern. This is an arbitrary \"\n#~ \"Boolean expression which will be executed if the pattern matches:\"\n#~ msgstr \"\"\n#~ \"配對時，您可以為模式新增「守衛」。這是任意的布林運算式，會在模式配對成功時\"\n#~ \"執行：\"\n\n#~ msgid \"\"\n#~ \"You can use the variables defined in the pattern in your if expression.\"\n#~ msgstr \"您可以在 if 運算式中使用模式內定義的變數。\"\n\n#~ msgid \"Day 2: Morning Exercises\"\n#~ msgstr \"第 2 天：上午練習\"\n\n#~ msgid \"We will look at implementing methods in two contexts:\"\n#~ msgstr \"我們會探討如何在以下兩種情況下實作方法：\"\n\n#~ msgid \"Polygon Struct\"\n#~ msgstr \"多邊形結構體\"\n\n#~ msgid \"\"\n#~ \"We will create a `Polygon` struct which contain some points. Copy the \"\n#~ \"code below to <https://play.rust-lang.org/> and fill in the missing \"\n#~ \"methods to make the tests pass:\"\n#~ msgstr \"\"\n#~ \"我們會建立一個包含某幾個點的 `Polygon` 結構體。請將下方程式碼複製到 \"\n#~ \"<https://play.rust-lang.org/>，並填入缺少的方法，設法通過測試：\"\n\n#~ msgid \"\"\n#~ \"Since the method signatures are missing from the problem statements, the \"\n#~ \"key part of the exercise is to specify those correctly. You don't have to \"\n#~ \"modify the tests.\"\n#~ msgstr \"\"\n#~ \"由於問題陳述式缺少方法簽章，因此練習的關鍵部分就是正確指定這些簽章。您不需\"\n#~ \"要修改測試。\"\n\n#~ msgid \"Other interesting parts of the exercise:\"\n#~ msgstr \"練習中的其他有趣部分如下：\"\n\n#~ msgid \"\"\n#~ \"Derive a `Copy` trait for some structs, as in tests the methods sometimes \"\n#~ \"don't borrow their arguments.\"\n#~ msgstr \"\"\n#~ \"針對部分結構體衍生 `Copy` 特徵，因為在測試中，方法有時不會借用其引數。\"\n\n#~ msgid \"\"\n#~ \"Discover that `Add` trait must be implemented for two objects to be \"\n#~ \"addable via \\\"+\\\". Note that we do not discuss generics until Day 3.\"\n#~ msgstr \"\"\n#~ \"發現必須實作 `Add` 特徵才能透過「+」新增兩個物件。請注意，我們在第 3 天以\"\n#~ \"前不會討論泛型。\"\n\n#~ msgid \"\"\n#~ \"As we have seen, `if` is an expression in Rust. It is used to \"\n#~ \"conditionally evaluate one of two blocks, but the blocks can have a value \"\n#~ \"which then becomes the value of the `if` expression. Other control flow \"\n#~ \"expressions work similarly in Rust.\"\n#~ msgstr \"\"\n#~ \"如同我們所見，`if` 是 Rust 中的一種表達式。它可以用來根據條件執行兩個區塊\"\n#~ \"之中的一個，而區塊的執行結果可以進一步轉變成 `if` 表達式的賦值。其他控制流\"\n#~ \"程表達式在 Rust 中也有類似的用法。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = {\\n\"\n#~ \"        let y = 10;\\n\"\n#~ \"        println!(\\\"y: {y}\\\");\\n\"\n#~ \"        let z = {\\n\"\n#~ \"            let w = {\\n\"\n#~ \"                3 + 4\\n\"\n#~ \"            };\\n\"\n#~ \"            println!(\\\"w: {w}\\\");\\n\"\n#~ \"            y * w\\n\"\n#~ \"        };\\n\"\n#~ \"        println!(\\\"z: {z}\\\");\\n\"\n#~ \"        z - y\\n\"\n#~ \"    };\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let x = {\\n\"\n#~ \"        let y = 10;\\n\"\n#~ \"        println!(\\\"y: {y}\\\");\\n\"\n#~ \"        let z = {\\n\"\n#~ \"            let w = {\\n\"\n#~ \"                3 + 4\\n\"\n#~ \"            };\\n\"\n#~ \"            println!(\\\"w: {w}\\\");\\n\"\n#~ \"            y * w\\n\"\n#~ \"        };\\n\"\n#~ \"        println!(\\\"z: {z}\\\");\\n\"\n#~ \"        z - y\\n\"\n#~ \"    };\\n\"\n#~ \"    println!(\\\"x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The same rule is used for functions: the value of the function body is \"\n#~ \"the return value:\"\n#~ msgstr \"同樣的規則也適用於函式：函式的數值即為函式本體的回傳值：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn double(x: i32) -> i32 {\\n\"\n#~ \"    x + x\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"doubled: {}\\\", double(7));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn double(x: i32) -> i32 {\\n\"\n#~ \"    x + x\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"doubled: {}\\\", double(7));\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The point of this slide is to show that blocks have a type and value in \"\n#~ \"Rust. \"\n#~ msgstr \"這張投影片所表達的重點在於 Rust 中的區塊具有一個數值以及一個型別。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    if x % 2 == 0 {\\n\"\n#~ \"        x = x / 2;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        x = 3 * x + 1;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    if x % 2 == 0 {\\n\"\n#~ \"        x = x / 2;\\n\"\n#~ \"    } else {\\n\"\n#~ \"        x = 3 * x + 1;\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    x = if x % 2 == 0 {\\n\"\n#~ \"        x / 2\\n\"\n#~ \"    } else {\\n\"\n#~ \"        3 * x + 1\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    x = if x % 2 == 0 {\\n\"\n#~ \"        x / 2\\n\"\n#~ \"    } else {\\n\"\n#~ \"        3 * x + 1\\n\"\n#~ \"    };\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Program name: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Missing name?\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let arg = std::env::args().next();\\n\"\n#~ \"    if let Some(value) = arg {\\n\"\n#~ \"        println!(\\\"Program name: {value}\\\");\\n\"\n#~ \"    } else {\\n\"\n#~ \"        println!(\\\"Missing name?\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"`if let` can be more concise than `match`, e.g., when only one case is \"\n#~ \"interesting. In contrast, `match` requires all branches to be covered.\"\n#~ msgstr \"\"\n#~ \"`if let` 可以比 `match` 更為精簡，例如只有一個有趣案例時。相對地，`match` \"\n#~ \"必須涵蓋所有分支。\"\n\n#~ msgid \"\"\n#~ \"Since 1.65, a similar [let-else](https://doc.rust-lang.org/rust-by-\"\n#~ \"example/flow_control/let_else.html) construct allows to do a \"\n#~ \"destructuring assignment, or if it fails, have a non-returning block \"\n#~ \"branch (panic/return/break/continue):\"\n#~ msgstr \"\"\n#~ \"自 1.65 版起，類似的 [let-else](https://doc.rust-lang.org/rust-by-example/\"\n#~ \"flow_control/let_else.html) 結構可以解構指派項目，或在失敗時具有不會傳回的\"\n#~ \"區塊分支 (panic/return/break/continue)：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", second_word_to_upper(\\\"foo bar\\\"));\\n\"\n#~ \"}\\n\"\n#~ \" \\n\"\n#~ \"fn second_word_to_upper(s: &str) -> Option<String> {\\n\"\n#~ \"    let mut it = s.split(' ');\\n\"\n#~ \"    let (Some(_), Some(item)) = (it.next(), it.next()) else {\\n\"\n#~ \"        return None;\\n\"\n#~ \"    };\\n\"\n#~ \"    Some(item.to_uppercase())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    println!(\\\"{:?}\\\", second_word_to_upper(\\\"foo bar\\\"));\\n\"\n#~ \"}\\n\"\n#~ \" \\n\"\n#~ \"fn second_word_to_upper(s: &str) -> Option<String> {\\n\"\n#~ \"    let mut it = s.split(' ');\\n\"\n#~ \"    let (Some(_), Some(item)) = (it.next(), it.next()) else {\\n\"\n#~ \"        return None;\\n\"\n#~ \"    };\\n\"\n#~ \"    Some(item.to_uppercase())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    while x != 1 {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Final x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    while x != 1 {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Final x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"\\n\"\n#~ \"    while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`for` loops\"\n#~ msgstr \"`for` 迴圈\"\n\n#~ msgid \"\"\n#~ \"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is \"\n#~ \"closely related to the [`while let` loop](while-let-expression.md). It \"\n#~ \"will automatically call `into_iter()` on the expression and then iterate \"\n#~ \"over it:\"\n#~ msgstr \"\"\n#~ \"[`for` 迴圈](https://doc.rust-lang.org/std/keyword.for.html)與 [`while \"\n#~ \"let` 迴圈](while-let-expression.md)密切相關，會自動在運算式上呼叫 \"\n#~ \"`into_iter()`，然後對其進行疊代：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"\\n\"\n#~ \"    for x in v {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    \\n\"\n#~ \"    for i in (0..10).step_by(2) {\\n\"\n#~ \"        println!(\\\"i: {i}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"\\n\"\n#~ \"    for x in v {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    \\n\"\n#~ \"    for i in (0..10).step_by(2) {\\n\"\n#~ \"        println!(\\\"i: {i}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"You can use `break` and `continue` here as usual.\"\n#~ msgstr \"您可以照常使用 `break` 和 `continue`。\"\n\n#~ msgid \"Index iteration is not a special syntax in Rust for just that case.\"\n#~ msgstr \"在 Rust 中，索引疊代不是只適用於該情況的特殊語法。\"\n\n#~ msgid \"`(0..10)` is a range that implements an `Iterator` trait. \"\n#~ msgstr \"`(0..10)` 是實作 `Iterator` 特徵的範圍。\"\n\n#~ msgid \"\"\n#~ \"`step_by` is a method that returns another `Iterator` that skips every \"\n#~ \"other element. \"\n#~ msgstr \"`step_by` 這個方法會傳回另一個略過其他所有元素的 `Iterator`。\"\n\n#~ msgid \"\"\n#~ \"Modify the elements in the vector and explain the compiler errors. Change \"\n#~ \"vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.\"\n#~ msgstr \"\"\n#~ \"請修改向量中的元素，並說明編譯器錯誤。將向量 `v` 變更為可變動項，並將 for \"\n#~ \"迴圈變更為 `for x in v.iter_mut()`。\"\n\n#~ msgid \"`loop` expressions\"\n#~ msgstr \"`loop` 運算式\"\n\n#~ msgid \"\"\n#~ \"Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops) which creates an endless loop.\"\n#~ msgstr \"\"\n#~ \"最後，有一個 [`loop` 關鍵字](https://doc.rust-lang.org/reference/\"\n#~ \"expressions/loop-expr.html#infinite-loops)會建立無限迴圈。\"\n\n#~ msgid \"Here you must either `break` or `return` to stop the loop:\"\n#~ msgstr \"這時您必須執行 `break` 或 `return` 來停止迴圈：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    loop {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"        if x == 1 {\\n\"\n#~ \"            break;\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Final x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let mut x = 10;\\n\"\n#~ \"    loop {\\n\"\n#~ \"        x = if x % 2 == 0 {\\n\"\n#~ \"            x / 2\\n\"\n#~ \"        } else {\\n\"\n#~ \"            3 * x + 1\\n\"\n#~ \"        };\\n\"\n#~ \"        if x == 1 {\\n\"\n#~ \"            break;\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"    println!(\\\"Final x: {x}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Break the `loop` with a value (e.g. `break 8`) and print it out.\"\n#~ msgstr \"請使用 `break 8` 等值中斷 `loop`，然後顯示出來。\"\n\n#~ msgid \"\"\n#~ \"The [`match` keyword](https://doc.rust-lang.org/reference/expressions/\"\n#~ \"match-expr.html) is used to match a value against one or more patterns. \"\n#~ \"In that sense, it works like a series of `if let` expressions:\"\n#~ msgstr \"\"\n#~ \"[`match` 關鍵字](https://doc.rust-lang.org/reference/expressions/match-\"\n#~ \"expr.html)是用來將值與一或多個模式進行比對。因此，這個關鍵字的運作方式類似\"\n#~ \"於一系列的 `if let` 運算式：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    match std::env::args().next().as_deref() {\\n\"\n#~ \"        Some(\\\"cat\\\") => println!(\\\"Will do cat things\\\"),\\n\"\n#~ \"        Some(\\\"ls\\\")  => println!(\\\"Will ls some files\\\"),\\n\"\n#~ \"        Some(\\\"mv\\\")  => println!(\\\"Let's move some files\\\"),\\n\"\n#~ \"        Some(\\\"rm\\\")  => println!(\\\"Uh, dangerous!\\\"),\\n\"\n#~ \"        None        => println!(\\\"Hmm, no program name?\\\"),\\n\"\n#~ \"        _           => println!(\\\"Unknown program name!\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    match std::env::args().next().as_deref() {\\n\"\n#~ \"        Some(\\\"cat\\\") => println!(\\\"Will do cat things\\\"),\\n\"\n#~ \"        Some(\\\"ls\\\")  => println!(\\\"Will ls some files\\\"),\\n\"\n#~ \"        Some(\\\"mv\\\")  => println!(\\\"Let's move some files\\\"),\\n\"\n#~ \"        Some(\\\"rm\\\")  => println!(\\\"Uh, dangerous!\\\"),\\n\"\n#~ \"        None        => println!(\\\"Hmm, no program name?\\\"),\\n\"\n#~ \"        _           => println!(\\\"Unknown program name!\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Save the match expression to a variable and print it out.\"\n#~ msgstr \"請將比對運算式儲存為變數，然後顯示出來。\"\n\n#~ msgid \"Remove `.as_deref()` and explain the error.\"\n#~ msgstr \"請移除 `.as_deref()` 並說明錯誤。\"\n\n#~ msgid \"\"\n#~ \"`std::env::args().next()` returns an `Option<String>`, but we cannot \"\n#~ \"match against `String`.\"\n#~ msgstr \"\"\n#~ \"`std::env::args().next()` 會傳回 `Option<String>`，但我們無法與`String` 進\"\n#~ \"行比對。\"\n\n#~ msgid \"\"\n#~ \"`as_deref()` transforms an `Option<T>` to `Option<&T::Target>`. In our \"\n#~ \"case, this turns `Option<String>` into `Option<&str>`.\"\n#~ msgstr \"\"\n#~ \"`as_deref()` 會將 `Option<T>` 轉換成 `Option<&T::Target>`。在我們的案例\"\n#~ \"中，這會將 `Option<String>` 轉換成`Option<&str>`。\"\n\n#~ msgid \"\"\n#~ \"We can now use pattern matching to match against the `&str` inside \"\n#~ \"`Option`.\"\n#~ msgstr \"我們現在可以使用模式比對，與 `Option` 內的 `&str` 進行比對。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"    'outer: while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"        let mut i = 0;\\n\"\n#~ \"        while i < x {\\n\"\n#~ \"            println!(\\\"x: {x}, i: {i}\\\");\\n\"\n#~ \"            i += 1;\\n\"\n#~ \"            if i == 3 {\\n\"\n#~ \"                break 'outer;\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let mut iter = v.into_iter();\\n\"\n#~ \"    'outer: while let Some(x) = iter.next() {\\n\"\n#~ \"        println!(\\\"x: {x}\\\");\\n\"\n#~ \"        let mut i = 0;\\n\"\n#~ \"        while i < x {\\n\"\n#~ \"            println!(\\\"x: {x}, i: {i}\\\");\\n\"\n#~ \"            i += 1;\\n\"\n#~ \"            if i == 3 {\\n\"\n#~ \"                break 'outer;\\n\"\n#~ \"            }\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"In this case we break the outer loop after 3 iterations of the inner loop.\"\n#~ msgstr \"\"\n#~ \"在這個範例中，內層迴圈經過三次迭代後，我們使用 `break` 跳出外層迴圈。\"\n\n#~ msgid \"The common vocabulary types include:\"\n#~ msgstr \"常見的詞彙型別包括：\"\n\n#~ msgid \"\"\n#~ \"[`Option` and `Result`](std/option-result.md) types: used for optional \"\n#~ \"values and [error handling](error-handling.md).\"\n#~ msgstr \"\"\n#~ \"[`Option` 和 `Result`](std/option-result.md) 型別：用於選擇性的值和[錯誤處\"\n#~ \"理](error-handling.md)。\"\n\n#~ msgid \"\"\n#~ \"[`String`](std/string.md): the default string type used for owned data.\"\n#~ msgstr \"[`String`](std/string.md)：用於自有資料的預設字串型別。\"\n\n#~ msgid \"[`Vec`](std/vec.md): a standard extensible vector.\"\n#~ msgstr \"[`Vec`](std/vec.md)：標準的可延伸向量。\"\n\n#~ msgid \"\"\n#~ \"[`HashMap`](std/hashmap.md): a hash map type with a configurable hashing \"\n#~ \"algorithm.\"\n#~ msgstr \"[`HashMap`](std/hashmap.md)：採用可設定雜湊演算法的雜湊映射型別。\"\n\n#~ msgid \"[`Box`](std/box.md): an owned pointer for heap-allocated data.\"\n#~ msgstr \"[`Box`](std/box.md)：堆積配置資料的擁有所有權的指標。\"\n\n#~ msgid \"\"\n#~ \"[`Rc`](std/rc.md): a shared reference-counted pointer for heap-allocated \"\n#~ \"data.\"\n#~ msgstr \"[`Rc`](std/rc.md)：堆積配置資料的共用參考指標。\"\n\n#~ msgid \"`Option` and `Result`\"\n#~ msgstr \"`Option` 和 `Result`\"\n\n#~ msgid \"The types represent optional data:\"\n#~ msgstr \"這些型別代表選擇性的資料：\"\n\n#~ msgid \"`Option<&T>` has zero space overhead compared to `&T`.\"\n#~ msgstr \"相較於 `&T`，`Option<&T>` 的空間開銷為零。\"\n\n#~ msgid \"`binary_search` returns `Result<usize, usize>`.\"\n#~ msgstr \"`binary_search` 會回傳 `Result<usize, usize>`。\"\n\n#~ msgid \"If found, `Result::Ok` holds the index where the element is found.\"\n#~ msgstr \"如果找到該元素，`Result::Ok` 會保留該元素所在位置的索引。\"\n\n#~ msgid \"\"\n#~ \"Otherwise, `Result::Err` contains the index where such an element should \"\n#~ \"be inserted.\"\n#~ msgstr \"如果沒有找到，`Result::Err` 會包含應插入這類元素的索引。\"\n\n#~ msgid \"\"\n#~ \"Show iterating over a vector and mutating the value: `for e in &mut v \"\n#~ \"{ *e += 50; }`\"\n#~ msgstr \"示範如何對向量進行疊代並修改值：`for e in &mut v { *e += 50; }`\"\n\n#~ msgid \"\"\n#~ \"In the above example, you can even leave out the `*` in the `println!` \"\n#~ \"statement thanks to `Deref`. \"\n#~ msgstr \"上面的範例使用 `Deref`，因此 `println!` 陳述式甚至可以省略 `*`。\"\n\n#~ msgid \"Box with Recursive Data Structures\"\n#~ msgstr \"包含遞迴資料結構的 Box\"\n\n#, fuzzy\n#~ msgid \"\"\n#~ \"If you need to mutate the data inside an `Rc`, you will need to wrap the \"\n#~ \"data in a type such as [`Cell` or `RefCell`](../concurrency/shared_state/\"\n#~ \"arc.md).\"\n#~ msgstr \"\"\n#~ \"如要在 `Rc` 內修改資料，必須將資料加入 [`Cell` 或 `RefCell`](../\"\n#~ \"concurrency/shared_state/arc.md) 等型別中。\\\\* 如果是多執行緒的環境，請參\"\n#~ \"閱 [`Arc`](https://doc.rust-lang.org/std/sync/struct.Mutex.html)。\\\\* 您可\"\n#~ \"以將共用指標「降級」為 [`Weak`](https://doc.rust-lang.org/std/rc/struct.\"\n#~ \"Weak.html) 指標，建立之後會捨棄的循環。\"\n\n#~ msgid \"Like C++'s `std::shared_ptr`.\"\n#~ msgstr \"Rust 的 `Rc` 就好比是 C++ 的 `std::shared_ptr`。\"\n\n#~ msgid \"\"\n#~ \"Compare the different datatypes mentioned. `Box` enables (im)mutable \"\n#~ \"borrows that are enforced at compile time. `RefCell` enables (im)mutable \"\n#~ \"borrows that are enforced at run time and will panic if it fails at \"\n#~ \"runtime.\"\n#~ msgstr \"\"\n#~ \"比較提及的不同資料型別。`Box` 可啟用在編譯時強制執行的可變/不可變借用。\"\n#~ \"`RefCell` 可啟用在執行階段強制執行的可變/不可變借用，如果在執行階段失敗，\"\n#~ \"將觸發恐慌。\"\n\n#~ msgid \"Day 2: Afternoon Exercises\"\n#~ msgstr \"第 2 天：下午練習\"\n\n#~ msgid \"\"\n#~ \"The exercises for this afternoon will focus on strings and iterators.\"\n#~ msgstr \"今天下午的練習著重在字串和疊代器。\"\n\n#~ msgid \"\"\n#~ \"In this exercise, you are implementing a routing component of a web \"\n#~ \"server. The server is configured with a number of _path prefixes_ which \"\n#~ \"are matched against _request paths_. The path prefixes can contain a \"\n#~ \"wildcard character which matches a full segment. See the unit tests below.\"\n#~ msgstr \"\"\n#~ \"在本次練習中，您將實作網路伺服器的路由元件。伺服器設定了多個與「要求路徑」\"\n#~ \"__相符的「路徑前置字元」__。路徑前置字元可包含與完整片段相符的萬用字元。請\"\n#~ \"參閱下方的單元測試。\"\n\n#~ msgid \"\"\n#~ \"Traits: deriving traits, default methods, and important standard library \"\n#~ \"traits.\"\n#~ msgstr \"特徵：衍生特徵、預設方法，以及重要的標準程式庫特徵。\"\n\n#~ msgid \"\"\n#~ \"Generics: generic data types, generic methods, monomorphization, and \"\n#~ \"trait objects.\"\n#~ msgstr \"泛型：泛型資料型別、泛型方法、單型，以及特徵物件。\"\n\n#~ msgid \"Testing: unit tests, documentation tests, and integration tests.\"\n#~ msgstr \"測試：單元測試、說明文件測試，以及整合測試。\"\n\n#~ msgid \"\"\n#~ \"Unsafe Rust: raw pointers, static variables, unsafe functions, and extern \"\n#~ \"functions.\"\n#~ msgstr \"不安全的 Rust：原始指標、靜態變數、不安全的函式，以及 extern 函式。\"\n\n#~ msgid \"Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\"\n#~ msgstr \"試著宣告一個新的變數 `let p = Point { x: 5, y: 10.0 };`.\"\n\n#~ msgid \"Fix the code to allow points that have elements of different types.\"\n#~ msgstr \"修改程式碼，讓 points 能擁有不同型別的元素。\"\n\n#~ msgid \"You can declare a generic type on your `impl` block:\"\n#~ msgstr \"你可以將 `impl` 區塊宣告為泛型型別：\"\n\n#~ msgid \"\"\n#~ \"Generic code is turned into non-generic code based on the call sites:\"\n#~ msgstr \"\"\n#~ \"Rust 在編譯時進行單型化 (Monomorphization)，根據不同呼叫者，將泛型程式碼轉\"\n#~ \"換成實際型別的程式碼：\"\n\n#~ msgid \"behaves as if you wrote\"\n#~ msgstr \"以上程式碼等同於下方的程式碼\"\n\n#~ msgid \"You can let the compiler derive a number of traits:\"\n#~ msgstr \"您可以讓編譯器衍生多種特徵：\"\n\n#~ msgid \"Traits can implement behavior in terms of other trait methods:\"\n#~ msgstr \"特徵可以依照其他特徵方法來實作行為：\"\n\n#~ msgid \"\"\n#~ \"Traits may specify pre-implemented (default) methods and methods that \"\n#~ \"users are required to implement themselves. Methods with default \"\n#~ \"implementations can rely on required methods.\"\n#~ msgstr \"\"\n#~ \"特徵可能會指定預先實作的 (預設) 方法，以及使用者必須自行實作的方法。採用預\"\n#~ \"設實作項目的方法可以信賴必要方法。\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"fn duplicate<T>(a: T) -> (T, T)\\n\"\n#~ \"where\\n\"\n#~ \"    T: Clone,\\n\"\n#~ \"{\\n\"\n#~ \"    (a.clone(), a.clone())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"fn duplicate<T>(a: T) -> (T, T)\\n\"\n#~ \"where\\n\"\n#~ \"    T: Clone,\\n\"\n#~ \"{\\n\"\n#~ \"    (a.clone(), a.clone())\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"`impl Trait` allows you to work with types which you cannot name.\"\n#~ msgstr \"`impl Trait` 可讓您使用無法命名的型別。\"\n\n#~ msgid \"\"\n#~ \"This example is great, because it uses `impl Display` twice. It helps to \"\n#~ \"explain that nothing here enforces that it is _the same_ `impl Display` \"\n#~ \"type. If we used a single  `T: Display`, it would enforce the constraint \"\n#~ \"that input `T` and return `T` type are the same type. It would not work \"\n#~ \"for this particular function, as the type we expect as input is likely \"\n#~ \"not what `format!` returns. If we wanted to do the same via `: Display` \"\n#~ \"syntax, we'd need two independent generic parameters.\"\n#~ msgstr \"\"\n#~ \"這個例子非常好，因為 `impl Display` 使用了兩次。這有助於說明此處沒有 任何\"\n#~ \"項目會強制使用「相同的」`impl Display` 型別。如果我們使用單一的  `T: \"\n#~ \"Display`，則會強制限制「輸入」`T` 和「回傳」`T` 屬於同一型別。 但這並不適\"\n#~ \"合這個特定函式，因為我們預期做為「輸入」的型別不一定 會是 `format!` 回傳的\"\n#~ \"內容。如要透過 `: Display` 語法執行相同操作，我們會 需要兩個獨立的泛型參\"\n#~ \"數。\"\n\n#~ msgid \"\"\n#~ \"We will now look at some of the most common traits of the Rust standard \"\n#~ \"library:\"\n#~ msgstr \"現在來探討 Rust 標準程式庫最常見的幾個特徵：\"\n\n#~ msgid \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) and \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) used in `for` loops,\"\n#~ msgstr \"\"\n#~ \"[`Iterator`](https://doc.rust-lang.org/std/iter/trait.Iterator.html) 和 \"\n#~ \"[`IntoIterator`](https://doc.rust-lang.org/std/iter/trait.IntoIterator.\"\n#~ \"html) 用於 `for` 迴圈。\"\n\n#~ msgid \"\"\n#~ \"[`From`](https://doc.rust-lang.org/std/convert/trait.From.html) and \"\n#~ \"[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) used to \"\n#~ \"convert values,\"\n#~ msgstr \"\"\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#~ \"值。\"\n\n#~ msgid \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) used for IO,\"\n#~ msgstr \"\"\n#~ \"[`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) 和 [`Write`]\"\n#~ \"(https://doc.rust-lang.org/std/io/trait.Write.html) 用於 IO。\"\n\n#~ msgid \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html), [`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... used for operator \"\n#~ \"overloading, and\"\n#~ msgstr \"\"\n#~ \"[`Add`](https://doc.rust-lang.org/std/ops/trait.Add.html)、[`Mul`]\"\n#~ \"(https://doc.rust-lang.org/std/ops/trait.Mul.html) 等用於運算子超載。\"\n\n#~ msgid \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) \"\n#~ \"used to construct a default instance of a type.\"\n#~ msgstr \"\"\n#~ \"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) 用於\"\n#~ \"建構型別的預設執行個體。\"\n\n#~ msgid \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n#~ msgstr \"\"\n#~ \"`Iterator` implements `fn collect<B>(self) -> B where B: \"\n#~ \"FromIterator<Self::Item>, Self: Sized`\"\n\n#~ msgid \"`Add`, `Mul`, ...\"\n#~ msgstr \"`Add`、`Mul`...\"\n\n#~ msgid \"Day 3: Morning Exercises\"\n#~ msgstr \"第 3 天：上午練習\"\n\n#~ msgid \"\"\n#~ \"Let us design a classical GUI library using our new knowledge of traits \"\n#~ \"and trait objects.\"\n#~ msgstr \"我們對特徵和特徵物件有了新的瞭解，現在來設計經典的 GUI 程式庫吧！\"\n\n#~ msgid \"We will have a number of widgets in our library:\"\n#~ msgstr \"我們的程式庫中會有許多小工具：\"\n\n#~ msgid \"`Window`: has a `title` and contains other widgets.\"\n#~ msgstr \"`Window`：有 `title` 且包含其他小工具。\"\n\n#~ msgid \"\"\n#~ \"`Button`: has a `label` and a callback function which is invoked when the \"\n#~ \"button is pressed.\"\n#~ msgstr \"`Button`：含有 `label` 和回呼函式，按下按鈕就會叫用這個函式。\"\n\n#~ msgid \"`Label`: has a `label`.\"\n#~ msgstr \"`Label`：含有 `label`。\"\n\n#~ msgid \"The widgets will implement a `Widget` trait, see below.\"\n#~ msgstr \"小工具會實作 `Widget` 特徵，請參閱下文。\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/>, fill in the missing \"\n#~ \"`draw_into` methods so that you implement the `Widget` trait:\"\n#~ msgstr \"\"\n#~ \"請將以下程式碼複製到 <https://play.rust-lang.org/>，並填入缺少的 \"\n#~ \"`draw_into` 方法，以便實作 `Widget` 特徵：\"\n\n#~ msgid \"The output of the above program can be something simple like this:\"\n#~ msgstr \"上方程式的輸出內容可以很簡單，像下面這樣：\"\n\n#~ msgid \"\"\n#~ \"If you want to draw aligned text, you can use the [fill/alignment]\"\n#~ \"(https://doc.rust-lang.org/std/fmt/index.html#fillalignment) formatting \"\n#~ \"operators. In particular, notice how you can pad with different \"\n#~ \"characters (here a `'/'`) and how you can control alignment:\"\n#~ msgstr \"\"\n#~ \"如要繪製對齊的文字，可以使用 [fill/alignment](https://doc.rust-lang.org/\"\n#~ \"std/fmt/index.html#fillalignment) 格式化運算子。請特別注意如何使用不同的字\"\n#~ \"元 (此處為 `'/'`) 設定邊框間距，以及可以如何控制對齊方式：\"\n\n#~ msgid \"\"\n#~ \"Using such alignment tricks, you can for example produce output like this:\"\n#~ msgstr \"使用這種對齊技巧，您可以產生如下的輸出內容：\"\n\n#~ msgid \"Error handling in Rust is done using explicit control flow:\"\n#~ msgstr \"在 Rust 中，是透過明確的控制流程完成錯誤處理作業：\"\n\n#~ msgid \"Functions that can have errors list this in their return type,\"\n#~ msgstr \"可能含有錯誤的函式會在回傳型別中列出相關資訊。\"\n\n#~ msgid \"There are no exceptions.\"\n#~ msgstr \"沒有任何例外。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,should_panic\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    println!(\\\"v[100]: {}\\\", v[100]);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Catching the Stack Unwinding\"\n#~ msgstr \"擷取解開堆疊的動作\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::panic;\\n\"\n#~ \"\\n\"\n#~ \"let result = panic::catch_unwind(|| {\\n\"\n#~ \"    println!(\\\"hello!\\\");\\n\"\n#~ \"});\\n\"\n#~ \"assert!(result.is_ok());\\n\"\n#~ \"\\n\"\n#~ \"let result = panic::catch_unwind(|| {\\n\"\n#~ \"    panic!(\\\"oh no!\\\");\\n\"\n#~ \"});\\n\"\n#~ \"assert!(result.is_err());\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::panic;\\n\"\n#~ \"\\n\"\n#~ \"let result = panic::catch_unwind(|| {\\n\"\n#~ \"    println!(\\\"hello!\\\");\\n\"\n#~ \"});\\n\"\n#~ \"assert!(result.is_ok());\\n\"\n#~ \"\\n\"\n#~ \"let result = panic::catch_unwind(|| {\\n\"\n#~ \"    panic!(\\\"oh no!\\\");\\n\"\n#~ \"});\\n\"\n#~ \"assert!(result.is_err());\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"We have already seen the `Result` enum. This is used pervasively when \"\n#~ \"errors are expected as part of normal operation:\"\n#~ msgstr \"\"\n#~ \"我們先前介紹了 `Result` 列舉。當正常運作過程中預期發生錯誤時，普遍都會使用\"\n#~ \"這個列舉：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs::File;\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let file = File::open(\\\"diary.txt\\\");\\n\"\n#~ \"    match file {\\n\"\n#~ \"        Ok(mut file) => {\\n\"\n#~ \"            let mut contents = String::new();\\n\"\n#~ \"            file.read_to_string(&mut contents);\\n\"\n#~ \"            println!(\\\"Dear diary: {contents}\\\");\\n\"\n#~ \"        },\\n\"\n#~ \"        Err(err) => {\\n\"\n#~ \"            println!(\\\"The diary could not be opened: {err}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs::File;\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let file = File::open(\\\"diary.txt\\\");\\n\"\n#~ \"    match file {\\n\"\n#~ \"        Ok(mut file) => {\\n\"\n#~ \"            let mut contents = String::new();\\n\"\n#~ \"            file.read_to_string(&mut contents);\\n\"\n#~ \"            println!(\\\"Dear diary: {contents}\\\");\\n\"\n#~ \"        },\\n\"\n#~ \"        Err(err) => {\\n\"\n#~ \"            println!(\\\"The diary could not be opened: {err}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Propagating Errors with `?`\"\n#~ msgstr \"使用 `?` 傳播錯誤\"\n\n#~ msgid \"\"\n#~ \"The try-operator `?` is used to return errors to the caller. It lets you \"\n#~ \"turn the common\"\n#~ msgstr \"try 運算子 `?` 用於將錯誤傳回呼叫端，讓您將下列常見的程式碼：\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match some_expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err) => return Err(err),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match some_expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err) => return Err(err),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"some_expression?\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"some_expression?\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs;\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, io::Error> {\\n\"\n#~ \"    let username_file_result = fs::File::open(path);\\n\"\n#~ \"    let mut username_file = match username_file_result {\\n\"\n#~ \"        Ok(file) => file,\\n\"\n#~ \"        Err(err) => return Err(err),\\n\"\n#~ \"    };\\n\"\n#~ \"\\n\"\n#~ \"    let mut username = String::new();\\n\"\n#~ \"    match username_file.read_to_string(&mut username) {\\n\"\n#~ \"        Ok(_) => Ok(username),\\n\"\n#~ \"        Err(err) => Err(err),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n#~ \"    let username = read_username(\\\"config.dat\\\");\\n\"\n#~ \"    println!(\\\"username or error: {username:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::fs;\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, io::Error> {\\n\"\n#~ \"    let username_file_result = fs::File::open(path);\\n\"\n#~ \"    let mut username_file = match username_file_result {\\n\"\n#~ \"        Ok(file) => file,\\n\"\n#~ \"        Err(err) => return Err(err),\\n\"\n#~ \"    };\\n\"\n#~ \"\\n\"\n#~ \"    let mut username = String::new();\\n\"\n#~ \"    match username_file.read_to_string(&mut username) {\\n\"\n#~ \"        Ok(_) => Ok(username),\\n\"\n#~ \"        Err(err) => Err(err),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"alice\\\").unwrap();\\n\"\n#~ \"    let username = read_username(\\\"config.dat\\\");\\n\"\n#~ \"    println!(\\\"username or error: {username:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"expression?\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"expression?\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err)  => return Err(From::from(err)),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,ignore\\n\"\n#~ \"match expression {\\n\"\n#~ \"    Ok(value) => value,\\n\"\n#~ \"    Err(err)  => return Err(From::from(err)),\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"use std::fmt::{self, Display, Formatter};\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum ReadUsernameError {\\n\"\n#~ \"    IoError(io::Error),\\n\"\n#~ \"    EmptyUsername(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl Error for ReadUsernameError {}\\n\"\n#~ \"\\n\"\n#~ \"impl Display for ReadUsernameError {\\n\"\n#~ \"    fn fmt(&self, f: &mut Formatter) -> fmt::Result {\\n\"\n#~ \"        match self {\\n\"\n#~ \"            Self::IoError(e) => write!(f, \\\"IO error: {e}\\\"),\\n\"\n#~ \"            Self::EmptyUsername(filename) => write!(f, \\\"Found no \"\n#~ \"username in {filename}\\\"),\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl From<io::Error> for ReadUsernameError {\\n\"\n#~ \"    fn from(err: io::Error) -> ReadUsernameError {\\n\"\n#~ \"        ReadUsernameError::IoError(err)\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, ReadUsernameError> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(ReadUsernameError::EmptyUsername(String::\"\n#~ \"from(path)));\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    let username = read_username(\\\"config.dat\\\");\\n\"\n#~ \"    println!(\\\"username or error: {username:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"use std::fmt::{self, Display, Formatter};\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::{self, Read};\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug)]\\n\"\n#~ \"enum ReadUsernameError {\\n\"\n#~ \"    IoError(io::Error),\\n\"\n#~ \"    EmptyUsername(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl Error for ReadUsernameError {}\\n\"\n#~ \"\\n\"\n#~ \"impl Display for ReadUsernameError {\\n\"\n#~ \"    fn fmt(&self, f: &mut Formatter) -> fmt::Result {\\n\"\n#~ \"        match self {\\n\"\n#~ \"            Self::IoError(e) => write!(f, \\\"IO error: {e}\\\"),\\n\"\n#~ \"            Self::EmptyUsername(filename) => write!(f, \\\"Found no \"\n#~ \"username in {filename}\\\"),\\n\"\n#~ \"        }\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"impl From<io::Error> for ReadUsernameError {\\n\"\n#~ \"    fn from(err: io::Error) -> ReadUsernameError {\\n\"\n#~ \"        ReadUsernameError::IoError(err)\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, ReadUsernameError> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(ReadUsernameError::EmptyUsername(String::\"\n#~ \"from(path)));\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    let username = read_username(\\\"config.dat\\\");\\n\"\n#~ \"    println!(\\\"username or error: {username:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug, Error)]\\n\"\n#~ \"enum ReadUsernameError {\\n\"\n#~ \"    #[error(\\\"Could not read: {0}\\\")]\\n\"\n#~ \"    IoError(#[from] io::Error),\\n\"\n#~ \"    #[error(\\\"Found no username in {0}\\\")]\\n\"\n#~ \"    EmptyUsername(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, ReadUsernameError> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    fs::File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(ReadUsernameError::EmptyUsername(String::\"\n#~ \"from(path)));\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Debug, Error)]\\n\"\n#~ \"enum ReadUsernameError {\\n\"\n#~ \"    #[error(\\\"Could not read: {0}\\\")]\\n\"\n#~ \"    IoError(#[from] io::Error),\\n\"\n#~ \"    #[error(\\\"Found no username in {0}\\\")]\\n\"\n#~ \"    EmptyUsername(String),\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, ReadUsernameError> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    fs::File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(ReadUsernameError::EmptyUsername(String::\"\n#~ \"from(path)));\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"`thiserror`'s derive macro automatically implements `std::error::Error`, \"\n#~ \"and optionally `Display` (if the `#[error(...)]` attributes are provided) \"\n#~ \"and `From` (if the `#[from]` attribute is added). It also works for \"\n#~ \"structs.\"\n#~ msgstr \"\"\n#~ \"`thiserror` 的衍生巨集會自動實作 `std::error::Error`，並視情況實作 \"\n#~ \"`Display` (如果提供了 `#[error(...)]` 屬性的話) 和 `From` (如果新增了 \"\n#~ \"`#[from]` 屬性的話)。上述原則也適用於結構體。\"\n\n#~ msgid \"\"\n#~ \"It doesn't affect your public API, which makes it good for libraries.\"\n#~ msgstr \"這個不會影響你的公用API，因此這對程式庫很好。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Clone, Debug, Eq, Error, PartialEq)]\\n\"\n#~ \"#[error(\\\"Found no username in {0}\\\")]\\n\"\n#~ \"struct EmptyUsernameError(String);\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, Box<dyn Error>> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(EmptyUsernameError(String::from(path)).into());\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::fs::{self, File};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use thiserror::Error;\\n\"\n#~ \"use std::error::Error;\\n\"\n#~ \"\\n\"\n#~ \"#[derive(Clone, Debug, Eq, Error, PartialEq)]\\n\"\n#~ \"#[error(\\\"Found no username in {0}\\\")]\\n\"\n#~ \"struct EmptyUsernameError(String);\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String, Box<dyn Error>> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    File::open(path)?.read_to_string(&mut username)?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        return Err(EmptyUsernameError(String::from(path)).into());\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"The widely used [anyhow](https://docs.rs/anyhow/) crate can help you add \"\n#~ \"contextual information to your errors and allows you to have fewer custom \"\n#~ \"error types:\"\n#~ msgstr \"\"\n#~ \"透過廣泛使用的 [anyhow](https://docs.rs/anyhow/) crate，您可以為錯誤添加背\"\n#~ \"景資訊，並減少自訂錯誤型別的數量：\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use anyhow::{Context, Result, bail};\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    fs::File::open(path)\\n\"\n#~ \"        .with_context(|| format!(\\\"Failed to open {path}\\\"))?\\n\"\n#~ \"        .read_to_string(&mut username)\\n\"\n#~ \"        .context(\\\"Failed to read\\\")?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        bail!(\\\"Found no username in {path}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err:?}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::{fs, io};\\n\"\n#~ \"use std::io::Read;\\n\"\n#~ \"use anyhow::{Context, Result, bail};\\n\"\n#~ \"\\n\"\n#~ \"fn read_username(path: &str) -> Result<String> {\\n\"\n#~ \"    let mut username = String::with_capacity(100);\\n\"\n#~ \"    fs::File::open(path)\\n\"\n#~ \"        .with_context(|| format!(\\\"Failed to open {path}\\\"))?\\n\"\n#~ \"        .read_to_string(&mut username)\\n\"\n#~ \"        .context(\\\"Failed to read\\\")?;\\n\"\n#~ \"    if username.is_empty() {\\n\"\n#~ \"        bail!(\\\"Found no username in {path}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"    Ok(username)\\n\"\n#~ \"}\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    //fs::write(\\\"config.dat\\\", \\\"\\\").unwrap();\\n\"\n#~ \"    match read_username(\\\"config.dat\\\") {\\n\"\n#~ \"        Ok(username) => println!(\\\"Username: {username}\\\"),\\n\"\n#~ \"        Err(err)     => println!(\\\"Error: {err:?}\\\"),\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"Mark unit tests with `#[test]`:\"\n#~ msgstr \"用 `#[test]` 標記單元測試：\"\n\n#~ msgid \"Use `cargo test` to find and run the unit tests.\"\n#~ msgstr \"用 `cargo test` 尋找並執行單元測試。\"\n\n#~ msgid \"\"\n#~ \"Unit tests are often put in a nested module (run tests on the [Playground]\"\n#~ \"(https://play.rust-lang.org/)):\"\n#~ msgstr \"\"\n#~ \"單元測試通常會位於巢狀模組中 (在 [Playground](https://play.rust-lang.\"\n#~ \"org/) 上執行測試)：\"\n\n#~ msgid \"Useful crates for writing tests\"\n#~ msgstr \"有助於編寫測試的 crate\"\n\n#~ msgid \"Rust comes with only basic support for writing tests.\"\n#~ msgstr \"Rust 只提供基本的編寫測試支援。\"\n\n#~ msgid \"\"\n#~ \"Here are some additional crates which we recommend for writing tests:\"\n#~ msgstr \"以下列出幾個額外的 crate，建議您在編寫測試時使用：\"\n\n#~ msgid \"\"\n#~ \"[proptest](https://docs.rs/proptest): Property-based testing for Rust.\"\n#~ msgstr \"\"\n#~ \"[proptest](https://docs.rs/proptest)：讓您對 Rust 執行以屬性為基礎的測試。\"\n\n#~ msgid \"\"\n#~ \"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised \"\n#~ \"tests.\"\n#~ msgstr \"[rstest](https://docs.rs/rstest)：支援 Fixture 和參數化測試。\"\n\n#~ msgid \"Calling External Code\"\n#~ msgstr \"呼叫外部程式碼\"\n\n#~ msgid \"\"\n#~ \"Functions from other languages might violate the guarantees of Rust. \"\n#~ \"Calling them is thus unsafe:\"\n#~ msgstr \"其他語言的函式可能會違反 Rust 保證，因此呼叫這類函式並不安全：\"\n\n#~ msgid \"Day 3: Afternoon Exercises\"\n#~ msgstr \"第 3 天：下午練習\"\n\n#~ msgid \"Let us build a safe wrapper for reading directory content!\"\n#~ msgstr \"我們來建構用於讀取目錄內容的安全包裝函式吧！\"\n\n#~ msgid \"\"\n#~ \"After looking at the exercise, you can look at the [solution](solutions-\"\n#~ \"afternoon.md) provided.\"\n#~ msgstr \"\"\n#~ \"完成練習後，您可以看看我們提供的[解決方案](solutions-afternoon.md)。\"\n\n#~ msgid \"\"\n#~ \"```java\\n\"\n#~ \"package com.example.birthdayservice;\\n\"\n#~ \"\\n\"\n#~ \"/** Birthday service interface. */\\n\"\n#~ \"interface IBirthdayService {\\n\"\n#~ \"    /** Generate a Happy Birthday message. */\\n\"\n#~ \"    String wishHappyBirthday(String name, int years, in String[] text);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```java\\n\"\n#~ \"package com.example.birthdayservice;\\n\"\n#~ \"\\n\"\n#~ \"/** 生日功能介面 */\\n\"\n#~ \"interface IBirthdayService {\\n\"\n#~ \"    /** 生成一段生日快樂的祝賀訊息 */\\n\"\n#~ \"    String wishHappyBirthday(String name, int years, in String[] text);\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            println!(\\\"Count in thread: {i}!\\\");\\n\"\n#~ \"            thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"        }\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    for i in 1..5 {\\n\"\n#~ \"        println!(\\\"Main thread: {i}\\\");\\n\"\n#~ \"        thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            println!(\\\"Count in thread: {i}!\\\");\\n\"\n#~ \"            thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"        }\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    for i in 1..5 {\\n\"\n#~ \"        println!(\\\"Main thread: {i}\\\");\\n\"\n#~ \"        thread::sleep(Duration::from_millis(5));\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"Notice that the thread is stopped before it reaches 10 — the main thread \"\n#~ \"is not waiting.\"\n#~ msgstr \"\"\n#~ \"請注意，執行緒會在達到 10 之前停止運作，因為主執行緒不會 等待其完成運作。\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(|| {\\n\"\n#~ \"        println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::scope(|scope| {\\n\"\n#~ \"        scope.spawn(|| {\\n\"\n#~ \"            println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"        });\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let s = String::from(\\\"Hello\\\");\\n\"\n#~ \"\\n\"\n#~ \"    thread::scope(|scope| {\\n\"\n#~ \"        scope.spawn(|| {\\n\"\n#~ \"            println!(\\\"Length: {}\\\", s.len());\\n\"\n#~ \"        });\\n\"\n#~ \"    });\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    tx.send(10).unwrap();\\n\"\n#~ \"    tx.send(20).unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"\\n\"\n#~ \"    let tx2 = tx.clone();\\n\"\n#~ \"    tx2.send(30).unwrap();\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    tx.send(10).unwrap();\\n\"\n#~ \"    tx.send(20).unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"\\n\"\n#~ \"    let tx2 = tx.clone();\\n\"\n#~ \"    tx2.send(30).unwrap();\\n\"\n#~ \"    println!(\\\"Received: {:?}\\\", rx.recv());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::channel();\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::sync_channel(3);\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::mpsc;\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::time::Duration;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let (tx, rx) = mpsc::sync_channel(3);\\n\"\n#~ \"\\n\"\n#~ \"    thread::spawn(move || {\\n\"\n#~ \"        let thread_id = thread::current().id();\\n\"\n#~ \"        for i in 1..10 {\\n\"\n#~ \"            tx.send(format!(\\\"Message {i}\\\")).unwrap();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: sent Message {i}\\\");\\n\"\n#~ \"        }\\n\"\n#~ \"        println!(\\\"{thread_id:?}: done\\\");\\n\"\n#~ \"    });\\n\"\n#~ \"    thread::sleep(Duration::from_millis(100));\\n\"\n#~ \"\\n\"\n#~ \"    for msg in rx.iter() {\\n\"\n#~ \"        println!(\\\"Main: got {msg}\\\");\\n\"\n#~ \"    }\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::sync::Arc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(vec![10, 20, 30]);\\n\"\n#~ \"    let mut handles = Vec::new();\\n\"\n#~ \"    for _ in 1..5 {\\n\"\n#~ \"        let v = Arc::clone(&v);\\n\"\n#~ \"        handles.push(thread::spawn(move || {\\n\"\n#~ \"            let thread_id = thread::current().id();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: {v:?}\\\");\\n\"\n#~ \"        }));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handles.into_iter().for_each(|h| h.join().unwrap());\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"use std::sync::Arc;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(vec![10, 20, 30]);\\n\"\n#~ \"    let mut handles = Vec::new();\\n\"\n#~ \"    for _ in 1..5 {\\n\"\n#~ \"        let v = Arc::clone(&v);\\n\"\n#~ \"        handles.push(thread::spawn(move || {\\n\"\n#~ \"            let thread_id = thread::current().id();\\n\"\n#~ \"            println!(\\\"{thread_id:?}: {v:?}\\\");\\n\"\n#~ \"        }));\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handles.into_iter().for_each(|h| h.join().unwrap());\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::Mutex;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Mutex::new(vec![10, 20, 30]);\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut guard = v.lock().unwrap();\\n\"\n#~ \"        guard.push(40);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::Mutex;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Mutex::new(vec![10, 20, 30]);\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut guard = v.lock().unwrap();\\n\"\n#~ \"        guard.push(40);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {:?}\\\", v.lock().unwrap());\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"// use std::sync::{Arc, Mutex};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let handle = thread::spawn(|| {\\n\"\n#~ \"        v.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"    v.push(1000);\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable,compile_fail\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"// use std::sync::{Arc, Mutex};\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = vec![10, 20, 30];\\n\"\n#~ \"    let handle = thread::spawn(|| {\\n\"\n#~ \"        v.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"    v.push(1000);\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::{Arc, Mutex};\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(Mutex::new(vec![10, 20, 30]));\\n\"\n#~ \"\\n\"\n#~ \"    let v2 = Arc::clone(&v);\\n\"\n#~ \"    let handle = thread::spawn(move || {\\n\"\n#~ \"        let mut v2 = v2.lock().unwrap();\\n\"\n#~ \"        v2.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut v = v.lock().unwrap();\\n\"\n#~ \"        v.push(1000);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n#~ msgstr \"\"\n#~ \"```rust,editable\\n\"\n#~ \"use std::sync::{Arc, Mutex};\\n\"\n#~ \"use std::thread;\\n\"\n#~ \"\\n\"\n#~ \"fn main() {\\n\"\n#~ \"    let v = Arc::new(Mutex::new(vec![10, 20, 30]));\\n\"\n#~ \"\\n\"\n#~ \"    let v2 = Arc::clone(&v);\\n\"\n#~ \"    let handle = thread::spawn(move || {\\n\"\n#~ \"        let mut v2 = v2.lock().unwrap();\\n\"\n#~ \"        v2.push(10);\\n\"\n#~ \"    });\\n\"\n#~ \"\\n\"\n#~ \"    {\\n\"\n#~ \"        let mut v = v.lock().unwrap();\\n\"\n#~ \"        v.push(1000);\\n\"\n#~ \"    }\\n\"\n#~ \"\\n\"\n#~ \"    handle.join().unwrap();\\n\"\n#~ \"\\n\"\n#~ \"    println!(\\\"v: {v:?}\\\");\\n\"\n#~ \"}\\n\"\n#~ \"```\"\n\n#~ msgid \"You will find solutions to the exercises on the following pages.\"\n#~ msgstr \"您可以在以下幾頁查看練習的解決方案。\"\n\n#~ msgid \"\"\n#~ \"Feel free to ask questions about the solutions [on GitHub](https://github.\"\n#~ \"com/google/comprehensive-rust/discussions). Let us know if you have a \"\n#~ \"different or better solution than what is presented here.\"\n#~ msgstr \"\"\n#~ \"歡迎[前往 GitHub](https://github.com/google/comprehensive-rust/\"\n#~ \"discussions)針對解決方案提問。如果您有與本書不同或更好的解決方案，請告訴我\"\n#~ \"們。\"\n\n#~ msgid \"\"\n#~ \"**Note:** Please ignore the `// ANCHOR: label` and `// ANCHOR_END: label` \"\n#~ \"comments you see in the solutions. They are there to make it possible to \"\n#~ \"re-use parts of the solutions as the exercises.\"\n#~ msgstr \"\"\n#~ \"**注意：**請忽略解決方案中的 `// ANCHOR: label` 和 `// ANCHOR_END: label` \"\n#~ \"註解。之所以有這些註解，是要方便您重複利用解決方案的某些部分來練習。\"\n\n#~ msgid \"Day 1 Morning Exercises\"\n#~ msgstr \"第 1 天：上午練習\"\n\n#~ msgid \"([back to exercise](for-loops.md))\"\n#~ msgstr \"([返回練習](for-loops.md))\"\n\n#~ msgid \"Bonus question\"\n#~ msgstr \"加分題\"\n\n#~ msgid \"\"\n#~ \"It requires more advanced concepts. It might seem that we could use a \"\n#~ \"slice-of-slices (`&[&[i32]]`) as the input type to transpose and thus \"\n#~ \"make our function handle any size of matrix. However, this quickly breaks \"\n#~ \"down: the return type cannot be `&[&[i32]]` since it needs to own the \"\n#~ \"data you return.\"\n#~ msgstr \"\"\n#~ \"這需要用到更進階的概念。表面上看起來我們可以使用多維度切片 (`&[&[i32]]`) \"\n#~ \"做為轉置的輸入型別，進而讓函式處理任何大小的矩陣。但實際上這很快就會失敗，\"\n#~ \"也就是說傳回型別不能是 `&[&[i32]]`，因為它需要擁有您傳回的資料。\"\n\n#~ msgid \"\"\n#~ \"You can attempt to use something like `Vec<Vec<i32>>`, but this doesn't \"\n#~ \"work out-of-the-box either: it's hard to convert from `Vec<Vec<i32>>` to \"\n#~ \"`&[&[i32]]` so now you cannot easily use `pretty_print` either.\"\n#~ msgstr \"\"\n#~ \"您可以嘗試使用 `Vec<Vec<i32>>` 這類代碼，但這也不能立即見效，因為從 \"\n#~ \"`Vec<Vec<i32>>` 轉換成 `&[&[i32]]` 並不容易，因此您現在也無法輕易使用 \"\n#~ \"`pretty_print`。\"\n\n#~ msgid \"\"\n#~ \"Once we get to traits and generics, we'll be able to use the [`std::\"\n#~ \"convert::AsRef`](https://doc.rust-lang.org/std/convert/trait.AsRef.html) \"\n#~ \"trait to abstract over anything that can be referenced as a slice.\"\n#~ msgstr \"\"\n#~ \"一旦瞭解特徵和泛型，我們就能使用 [`std::convert::AsRef`](https://doc.rust-\"\n#~ \"lang.org/std/convert/trait.AsRef.html) 特徵，對任何可當做切片參照的資料進\"\n#~ \"行抽象化。\"\n\n#~ msgid \"\"\n#~ \"In addition, the type itself would not enforce that the child slices are \"\n#~ \"of the same length, so such variable could contain an invalid matrix.\"\n#~ msgstr \"\"\n#~ \"此外，型別本身不會強制規定子項切片的長度必須相同，因此這類變數可能含有無效\"\n#~ \"的矩陣。\"\n\n#~ msgid \"Day 1 Afternoon Exercises\"\n#~ msgstr \"第 1 天：下午練習\"\n\n#~ msgid \"([back to exercise](book-library.md))\"\n#~ msgstr \"([返回練習](book-library.md))\"\n\n#~ msgid \"Day 2 Morning Exercises\"\n#~ msgstr \"第 2 天：上午練習\"\n\n#~ msgid \"([back to exercise](points-polygons.md))\"\n#~ msgstr \"([返回練習](points-polygons.md))\"\n\n#~ msgid \"Day 2 Afternoon Exercises\"\n#~ msgstr \"第 2 天：下午練習\"\n\n#~ msgid \"([back to exercise](luhn.md))\"\n#~ msgstr \"([返回練習](luhn.md))\"\n\n#~ msgid \"([back to exercise](strings-iterators.md))\"\n#~ msgstr \"([返回練習](strings-iterators.md))\"\n\n#~ msgid \"Day 3 Morning Exercise\"\n#~ msgstr \"第 3 天：上午練習\"\n\n#~ msgid \"([back to exercise](simple-gui.md))\"\n#~ msgstr \"([返回練習](simple-gui.md))\"\n\n#~ msgid \"Day 3 Afternoon Exercises\"\n#~ msgstr \"第 3 天：下午練習\"\n\n#~ msgid \"([back to exercise](safe-ffi-wrapper.md))\"\n#~ msgstr \"([返回練習](safe-ffi-wrapper.md))\"\n\n#~ msgid \"Pattern Matching (TBD)\"\n#~ msgstr \"模式配對 (未定)\"\n\n#~ msgid \"Cell/RefCell\"\n#~ msgstr \"Cell/RefCell\"\n\n#~ msgid \"\"\n#~ \"Day 1: Basic Rust, syntax, control flow, creating and consuming values.\"\n#~ msgstr \"第 1 天：Rust 基本概念、語法、控制流程、建立及取用值。\"\n\n#~ msgid \"\"\n#~ \"This slide tries to make the students comfortable with Rust code. They \"\n#~ \"will see a ton of it over the next three days so we start small with \"\n#~ \"something familiar.\"\n#~ msgstr \"\"\n#~ \"我們會藉由這張投影片，試著讓學生熟悉 Rust 程式碼。在接下來的三天裡，他們會\"\n#~ \"大量接觸到這些內容，所以我們得從他們熟悉的小地方著手。\"\n\n#~ msgid \"\"\n#~ \"In a shell `rustup doc std::fmt` will open a browser on the local std::\"\n#~ \"fmt documentation\"\n#~ msgstr \"\"\n#~ \"在殼層中，`rustup doc std::fmt` 會開啟本機 std::fmt 說明文件上的瀏覽器。\"\n\n#~ msgid \"\"\n#~ \"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-\"\n#~ \"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time \"\n#~ \"flag. If enabled, the program will panic (a controlled crash of the \"\n#~ \"program), otherwise you get wrap-around semantics. By default, you get \"\n#~ \"panics in debug mode (`cargo build`) and wrap-around in release mode \"\n#~ \"(`cargo build --release`).\"\n#~ msgstr \"\"\n#~ \"整數溢位的處理是透過 [`overflow-checks`](https://doc.rust-lang.org/rustc/\"\n#~ \"codegen-options/index.html#overflow-checks) 編譯時間標記定義的。如果啟用的\"\n#~ \"話，程式就會恐慌 (程式受控地異常終止)，如未啟用，則會發生語意迴繞現象。根\"\n#~ \"據預設，在偵錯模式 (`cargo build`) 中會發生恐慌，在發布模式 (`cargo build \"\n#~ \"--release`) 中會發生迴繞。\"\n\n#~ msgid \"Rust is built with all the experience gained in the last decades.\"\n#~ msgstr \"Rust 是根據過去數十年累積的所有經驗打造而成。\"\n\n#~ msgid \"\"\n#~ \"Rustdoc comments can contain code snippets that we can run and test using \"\n#~ \"`cargo test`. We will discuss these tests in the [Testing section](../\"\n#~ \"testing/doc-tests.html).\"\n#~ msgstr \"\"\n#~ \"Rustdoc 註解可包含能使用 `cargo test` 執行及測試的程式碼片段。我們會在\"\n#~ \"[「測試」一節](../testing/doc-tests.html)討論這些測試。\"\n\n#~ msgid \"\"\n#~ \"Add a static method called `Rectangle::new` and call this from `main`:\"\n#~ msgstr \"新增名為 `Rectangle::new` 的靜態方法，然後從 `main` 呼叫此方法：\"\n\n#~ msgid \"\"\n#~ \"While _technically_, Rust does not have custom constructors, static \"\n#~ \"methods are commonly used to initialize structs (but don't have to). The \"\n#~ \"actual constructor, `Rectangle { width, height }`, could be called \"\n#~ \"directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html).\"\n#~ msgstr \"\"\n#~ \"雖然「技術上」來說，Rust 沒有自訂的建構函式，但靜態方法經常用來初始化結構\"\n#~ \"體 (儘管並非必須)。因此，您可直接呼叫實際的建構函式 `Rectangle { width, \"\n#~ \"height }`。詳情請參閱 [Rustnomicon](https://doc.rust-lang.org/nomicon/\"\n#~ \"constructors.html)。\"\n\n#~ msgid \"\"\n#~ \"Add a `Rectangle::square(width: u32)` constructor to illustrate that such \"\n#~ \"static methods can take arbitrary parameters.\"\n#~ msgstr \"\"\n#~ \"新增 `Rectangle::square(width: u32)` 建構函式，說明這類靜態方法可以採用任\"\n#~ \"意參數。\"\n\n#~ msgid \"\"\n#~ \"The use of the reference `&array` within `for n in &array` is a subtle \"\n#~ \"preview of issues of ownership that will come later in the afternoon.\"\n#~ msgstr \"\"\n#~ \"在 `for n in &array` 內使用 `&array` 參照項目是一個巧妙方式，可稍微預示下\"\n#~ \"午將談到的擁有權問題。\"\n\n#~ msgid \"Without the `&`...\"\n#~ msgstr \"沒有 `&` 的影響...\"\n\n#~ msgid \"\"\n#~ \"The loop would have been one that consumes the array.  This is a change \"\n#~ \"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/\"\n#~ \"rust-2021/IntoIterator-for-arrays.html).\"\n#~ msgstr \"\"\n#~ \"迴圈會是取用陣列的迴圈。這是 [2021 年版導入](https://doc.rust-lang.org/\"\n#~ \"edition-guide/rust-2021/IntoIterator-for-arrays.html)的變更。\"\n\n#~ msgid \"\"\n#~ \"An implicit array copy would have occurred.  Since `i32` is a copy type, \"\n#~ \"then `[i32; 3]` is also a copy type.\"\n#~ msgstr \"\"\n#~ \"會發生隱含陣列複製的情形。由於 `i32` 是複製型別，因此 `[i32; 3]` 也會是複\"\n#~ \"製型別。\"\n\n#~ msgid \"The Luhn algorithm,\"\n#~ msgstr \"盧恩演算法\"\n\n#~ msgid \"An exercise on pattern matching.\"\n#~ msgstr \"練習模式配對\"\n\n#~ msgid \"\"\n#~ \"Copy the code below to <https://play.rust-lang.org/> and implement the \"\n#~ \"function.\"\n#~ msgstr \"將下方程式碼複製到 <https://play.rust-lang.org/>，並實作函式。\"\n\n#~ msgid \"\"\n#~ \"Try to solve the problem the \\\"simple\\\" way first, using `for` loops and \"\n#~ \"integers. Then, revisit the solution and try to implement it with \"\n#~ \"iterators.\"\n#~ msgstr \"\"\n#~ \"使用「for」迴圈和整數，先嘗試以「簡單」的方式解決問題。接著，重新查看解決\"\n#~ \"方案，試著使用疊代器實作。\"\n\n#~ msgid \"Stack and Heap Example\"\n#~ msgstr \"堆疊和堆積範例\"\n\n#~ msgid \"Storing books and querying the collection\"\n#~ msgstr \"儲存書籍並查詢館藏\"\n\n#~ msgid \"Keeping track of health statistics for patients\"\n#~ msgstr \"追蹤病患的健康統計資料\"\n\n#~ msgid \"\"\n#~ \"Use this to model a library's book collection. Copy the code below to \"\n#~ \"<https://play.rust-lang.org/> and update the types to make it compile:\"\n#~ msgstr \"\"\n#~ \"這可用來建立圖書館的館藏模型。請將下列程式碼複製到 <https://play.rust-\"\n#~ \"lang.org/>，然後更新型別以利編譯：\"\n\n#~ msgid \"`Cell` and `RefCell`\"\n#~ msgstr \"`Cell` 和 `RefCell`\"\n\n#~ msgid \"\"\n#~ \"`Cell` is typically used for simple types, as it requires copying or \"\n#~ \"moving values. More complex interior types typically use `RefCell`, which \"\n#~ \"tracks shared and exclusive references at runtime and panics if they are \"\n#~ \"misused.\"\n#~ msgstr \"\"\n#~ \"`Cell` 因為需要複製或移動值，通常用於簡單的型別。較複雜的內部型別通常會使\"\n#~ \"用 `RefCell`，可在執行階段和恐慌時追蹤共用和專屬的參照 (如果這些參照遭到濫\"\n#~ \"用的話)。\"\n\n#~ msgid \"\"\n#~ \"If we were using `Cell` instead of `RefCell` in this example, we would \"\n#~ \"have to move the `Node` out of the `Rc` to push children, then move it \"\n#~ \"back in. This is safe because there's always one, un-referenced value in \"\n#~ \"the cell, but it's not ergonomic.\"\n#~ msgstr \"\"\n#~ \"如果我們在本例中使用 `Cell` 而非 `RefCell`，可能須將 `Node` 移出 `Rc` 才能\"\n#~ \"推送子項，然後再將其移回。您可以放心執行這項操作，因為儲存格中始終有一個未\"\n#~ \"參照的值，但不符人體工學。\"\n\n#~ msgid \"\"\n#~ \"To do anything with a Node, you must call a `RefCell` method, usually \"\n#~ \"`borrow` or `borrow_mut`.\"\n#~ msgstr \"\"\n#~ \"如要對節點執行任何操作，您必須呼叫 `RefCell` 方法，通常是 `borrow` 或 \"\n#~ \"`borrow_mut`。\"\n\n#~ msgid \"\"\n#~ \"Experiment with the code above and then consult the documentation for \"\n#~ \"[`impl IntoIterator for &Vec<T>`](https://doc.rust-lang.org/std/vec/\"\n#~ \"struct.Vec.html#impl-IntoIterator-for-%26'a+Vec%3CT,+A%3E) and [`impl \"\n#~ \"IntoIterator for Vec<T>`](https://doc.rust-lang.org/std/vec/struct.Vec.\"\n#~ \"html#impl-IntoIterator-for-Vec%3CT,+A%3E) to check your answers.\"\n#~ msgstr \"\"\n#~ \"請用上方的程式碼進行試驗，並參閱 [`impl IntoIterator for &Vec<T>`]\"\n#~ \"(https://doc.rust-lang.org/std/vec/struct.Vec.html#impl-IntoIterator-for-\"\n#~ \"%26'a+Vec%3CT,+A%3E) 和 [`impl IntoIterator for Vec<T>`](https://doc.rust-\"\n#~ \"lang.org/std/vec/struct.Vec.html#impl-IntoIterator-for-Vec%3CT,+A%3E) 的說\"\n#~ \"明文件確認答案。\"\n\n#~ msgid \"\"\n#~ \"Rust derive macros work by automatically generating code that implements \"\n#~ \"the specified traits for a data structure.\"\n#~ msgstr \"\"\n#~ \"Rust 衍生巨集的運作原理是自動產生程式碼，用於實作資料結構的指定特徵。\"\n\n#~ msgid \"Move method `not_equals` to a new trait `NotEquals`.\"\n#~ msgstr \"將 `not_equals` 方法移至新特徵 `NotEquals`。\"\n\n#~ msgid \"Make `Equals` a super trait for `NotEquals`.\"\n#~ msgstr \"將 `Equals` 設為 `NotEquals` 的超特徵。\"\n\n#~ msgid \"Provide a blanket implementation of `NotEquals` for `Equals`.\"\n#~ msgstr \"為 `Equals` 提供 `NotEquals` 的大量實作。\"\n\n#~ msgid \"\"\n#~ \"With the blanket implementation, you no longer need `Equals` as a super \"\n#~ \"trait for `NotEqual`.\"\n#~ msgstr \"\"\n#~ \"採用大量實作後，您就不再需要使用 `Equals` 做為 `NotEqual` 的超特徵。\"\n\n#~ msgid \"\"\n#~ \"We will design a classical GUI library using traits and trait objects.\"\n#~ msgstr \"我們將使用特徵和特徵物件設計一個典型的 GUI 程式庫。\"\n\n#~ msgid \"\"\n#~ \"We will also look at enum dispatch with an exercise involving points and \"\n#~ \"polygons.\"\n#~ msgstr \"我們也會透過點和多邊形的相關練習，探討列舉分派情形。\"\n\n#~ msgid \"\"\n#~ \"The return type of the function has to be compatible with the nested \"\n#~ \"functions it calls. For instance, a function returning a `Result<T, Err>` \"\n#~ \"can only apply the `?` operator on a function returning a  `Result<AnyT, \"\n#~ \"Err>`. It cannot apply the `?` operator on a function returning an \"\n#~ \"`Option<AnyT>` or `Result<T, OtherErr>` unless `OtherErr` implements \"\n#~ \"`From<Err>`. Reciprocally, a function returning an `Option<T>` can only \"\n#~ \"apply the `?` operator  on a function returning an `Option<AnyT>`.\"\n#~ msgstr \"\"\n#~ \"函式的傳回型別必須與它呼叫的巢狀函式相容。舉例來說，傳回 `Result<T, Err>` \"\n#~ \"的函式只能在傳回 `Result<AnyT, Err>` 的函式上套用 `?` 運算子；無法在傳回 \"\n#~ \"`Option<AnyT>` 或 `Result<T, OtherErr>` 的函式上套用該運算子，除非 \"\n#~ \"`OtherErr` 實作了 `From<Err>` 則例外。反之，傳回 `Option<T>` 的函式只能在\"\n#~ \"傳回 `Option<AnyT>` 的函式上套用 `?` 運算子。\"\n\n#~ msgid \"\"\n#~ \"You can convert incompatible types into one another with the different \"\n#~ \"`Option` and `Result` methods  such as `Option::ok_or`, `Result::ok`, \"\n#~ \"`Result::err`.\"\n#~ msgstr \"\"\n#~ \"您可以使用不同的 `Option` 和 `Result` 方法，例如 `Option::ok_or`、\"\n#~ \"`Result::ok`、`Result::err` 等，將不相容的型別轉換為其他型別。\"\n\n#~ msgid \"\"\n#~ \"It is good practice for all error types that don't need to be `no_std` to \"\n#~ \"implement `std::error::Error`, which requires `Debug` and `Display`. The \"\n#~ \"`Error` crate for `core` is only available in [nightly](https://github.\"\n#~ \"com/rust-lang/rust/issues/103765), so not fully `no_std` compatible yet.\"\n#~ msgstr \"\"\n#~ \"對所有不需要是 `no_std` 的錯誤型別來說，實作 `std::error::Error` 是很好的\"\n#~ \"做法，`std::error::Error` 會需要 `Debug` 和 `Display`。`core` 的 `Error` \"\n#~ \"Crate 僅於 [nightly](https://github.com/rust-lang/rust/issues/103765) 提\"\n#~ \"供，因此與 `no_std` 尚未完全相容。\"\n\n#~ msgid \"\"\n#~ \"It's generally helpful for them to implement `Clone` and `Eq` too where \"\n#~ \"possible, to make life easier for tests and consumers of your library. In \"\n#~ \"this case we can't easily do so, because `io::Error` doesn't implement \"\n#~ \"them.\"\n#~ msgstr \"\"\n#~ \"對這種錯誤型別來說，在可能的情況下實作 `Clone` 和 `Eq` 通常也很有用，不僅\"\n#~ \"有利於程式庫的測試，使用者也會更輕鬆。但在本例中，我們無法輕易這麼做，因\"\n#~ \"為 `io::Error` 並未實作 `Clone` 和 `Eq`。\"\n\n#~ msgid \"\"\n#~ \"For this exercise, we suggest using a local dev environment instead of \"\n#~ \"the Playground. This will allow you to run your binary on your own \"\n#~ \"machine.\"\n#~ msgstr \"\"\n#~ \"在這個練習中，建議您使用本機開發環境，不要用 Playground。這可讓您在自己的\"\n#~ \"機器上執行二進位檔。\"\n\n#~ msgid \"\"\n#~ \"To get started, follow the [running locally](../../cargo/running-locally.\"\n#~ \"md) instructions.\"\n#~ msgstr \"\"\n#~ \"首先，請按照[在本機執行](../../cargo/running-locally.md)的說明操作。\"\n\n#~ msgid \"Pattern matching\"\n#~ msgstr \"模式配對\"\n\n#~ msgid \"TBD.\"\n#~ msgstr \"未定。\"\n"
  },
  {
    "path": "rustfmt.toml",
    "content": "# Please use a nightly rustfmt for these settings.\nunstable_features = true\nimports_granularity = \"Module\"\nwrap_comments = true\n\n# The code blocks get a scrollbar if they are wider than this.\nmax_width = 85\n# Allow all constructs to take up max_width columns.\nuse_small_heuristics = \"Max\"\n"
  },
  {
    "path": "src/README.md",
    "content": "<!--\nCopyright 2024 Google LLC\nSPDX-License-Identifier: CC-BY-4.0\n-->\n\n# Course Content\n\nThe files in this directory make up the content of the course. The files here\ncan include third-party content from `../third_party/` as well.\n\nWhen we publish a translation of the course, we `git restore` the `src/` and\n`third_party/` directories at the repository root back to the date listed in the\nPOT-Creation-Date header of the translation. **It is crucial, that all\ntranslatable content lives in those two directories.** The other files (such as\n`book.toml` and `theme/`) are not restored and we always use the latest version\nof them.\n"
  },
  {
    "path": "src/android/aidl/birthday-service.md",
    "content": "<!--\nCopyright 2024 Google LLC\nSPDX-License-Identifier: CC-BY-4.0\n-->\n\n# Birthday Service Tutorial\n\nTo illustrate using Rust with Binder, we will create a Binder interface. Then,\nwe'll implement the service and write a client that talks to it.\n"
  },
  {
    "path": "src/android/aidl/birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl",
    "content": "package com.example.birthdayservice;\n\nparcelable BirthdayInfo {\n    String name;\n    int years;\n}\n"
  },
  {
    "path": "src/android/aidl/birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider.aidl",
    "content": "// Copyright 2024 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// ANCHOR: IBirthdayInfoProvider\npackage com.example.birthdayservice;\n\ninterface IBirthdayInfoProvider {\n    String name();\n    int years();\n}\n"
  },
  {
    "path": "src/android/aidl/birthday_service/src/client.rs",
    "content": "// Copyright 2022 Google LLC\n// SPDX-License-Identifier: Apache-2.0\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//! Birthday service.\nuse com_example_birthdayservice::aidl::com::example::birthdayservice::BirthdayInfo::BirthdayInfo;\nuse com_example_birthdayservice::aidl::com::example::birthdayservice::IBirthdayInfoProvider::{\n    BnBirthdayInfoProvider, IBirthdayInfoProvider,\n};\nuse com_example_birthdayservice::aidl::com::example::birthdayservice::IBirthdayService::IBirthdayService;\nuse com_example_birthdayservice::binder::{self, BinderFeatures, ParcelFileDescriptor};\nuse std::error::Error;\nuse std::fs::File;\nuse std::io::prelude::*;\n\n// ANCHOR: main\nconst SERVICE_IDENTIFIER: &str = \"birthdayservice\";\n\n/// Call the birthday service.\nfn main() -> Result<(), Box<dyn Error>> {\n    let name = std::env::args().nth(1).unwrap_or_else(|| String::from(\"Bob\"));\n    let years = std::env::args()\n        .nth(2)\n        .and_then(|arg| arg.parse::<i32>().ok())\n        .unwrap_or(42);\n\n    binder::ProcessState::start_thread_pool();\n    let service = binder::get_interface::<dyn IBirthdayService>(SERVICE_IDENTIFIER)\n        .map_err(|_| \"Failed to connect to BirthdayService\")?;\n\n    // Call the service.\n    let msg = service.wishHappyBirthday(&name, years)?;\n    println!(\"{msg}\");\n    // ANCHOR_END: main\n\n    service.wishWithInfo(&BirthdayInfo { name: name.clone(), years })?;\n\n    // ANCHOR: wish_with_provider\n\n    // Create a binder object for the `IBirthdayInfoProvider` interface.\n    let provider = BnBirthdayInfoProvider::new_binder(\n        InfoProvider { name: name.clone(), age: years as u8 },\n        BinderFeatures::default(),\n    );\n\n    // Send the binder object to the service.\n    service.wishWithProvider(&provider)?;\n\n    // Perform the same operation but passing the provider as an `SpIBinder`.\n    service.wishWithErasedProvider(&provider.as_binder())?;\n    // ANCHOR_END: wish_with_provider\n\n    // ANCHOR: wish_with_file\n\n    // Open a file and put the birthday info in it.\n    let mut file = File::create(\"/data/local/tmp/birthday.info\").unwrap();\n    writeln!(file, \"{name}\")?;\n    writeln!(file, \"{years}\")?;\n\n    // Create a `ParcelFileDescriptor` from the file and send it.\n    let file = ParcelFileDescriptor::new(file);\n    service.wishFromFile(&file)?;\n    // ANCHOR_END: wish_with_file\n\n    Ok(())\n}\n\n// ANCHOR: InfoProvider\n/// Rust struct implementing the `IBirthdayInfoProvider` interface.\nstruct InfoProvider {\n    name: String,\n    age: u8,\n}\n\nimpl binder::Interface for InfoProvider {}\n\nimpl IBirthdayInfoProvider for InfoProvider {\n    fn name(&self) -> binder::Result<String> {\n        Ok(self.name.clone())\n    }\n\n    fn years(&self) -> binder::Result<i32> {\n        Ok(self.age as i32)\n    }\n}\n// ANCHOR_END: InfoProvider\n"
  },
  {
    "path": "src/android/aidl/example-service/deploy.md",
    "content": "<!--\nCopyright 2024 Google LLC\nSPDX-License-Identifier: CC-BY-4.0\n-->\n\n# Deploy\n\nWe can now build, push, and start the service:\n\n```shell\n{{#include ../../build_all.sh:birthday_server}}\n```\n\nIn another terminal, check that the service runs:\n\n```shell\n{{#include ../../build_all.sh:service_check_birthday_server}}\n```\n\n```text\nService birthdayservice: found\n```\n\nYou can also call the service with `service call`:\n\n```shell\n{{#include ../../build_all.sh:service_call_birthday_server}}\n```\n\n```text\nResult: Parcel(\n  0x00000000: 00000000 00000036 00610048 00700070 '....6...H.a.p.p.'\n  0x00000010: 00200079 00690042 00740072 00640068 'y. .B.i.r.t.h.d.'\n  0x00000020: 00790061 00420020 0062006f 0020002c 'a.y. .B.o.b.,. .'\n  0x00000030: 006f0063 0067006e 00610072 00750074 'c.o.n.g.r.a.t.u.'\n  0x00000040: 0061006c 00690074 006e006f 00200073 'l.a.t.i.o.n.s. .'\n  0x00000050: 00690077 00680074 00740020 00650068 'w.i.t.h. .t.h.e.'\n  0x00000060: 00320020 00200034 00650079 00720061 ' .2.4. .y.e.a.r.'\n  0x00000070: 00210073 00000000                   's.!.....        ')\n```\n"
  },
  {
    "path": "src/unsafe-deep-dive/Cargo.toml",
    "content": ""
  }
]